/* CercaTariffa - Light, modern, trustworthy UI (Celeste + Orange) */
:root{
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0ea5e9; /* Celeste */
  --primary-600: #0284c7;
  --accent: #f97316;  /* Arancio */
  --accent-600: #ea580c;
  --ring: rgba(14,165,233,.25);
  --ring-accent: rgba(249,115,22,.27);
  --danger: #dc2626;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;line-height:1.55}
body{
  /* Subtle modern gradient background */
  background:
    radial-gradient(1200px 400px at 10% -5%, rgba(14,165,233,.22), transparent 60%),
    radial-gradient(900px 320px at 90% -10%, rgba(249,115,22,.18), transparent 60%),
    linear-gradient(180deg, #fafdff 0%, var(--bg) 100%);
}
.container{max-width:1150px;margin:0 auto;padding:0 18px}
.site-header{background:rgba(255,255,255,.55);backdrop-filter:saturate(180%) blur(10px);border-bottom:1px solid rgba(2,8,23,.06);position:sticky;top:0;z-index:10;transition:background .25s ease, box-shadow .25s ease, border-color .25s ease}
.site-header.is-scrolled{background:rgba(255,255,255,.85);box-shadow:0 10px 30px rgba(2,8,23,.06);border-color:rgba(2,8,23,.09)}
.nav{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:14px 0}
.brand{font-weight:800;color:var(--text);text-decoration:none;font-size:22px;letter-spacing:.2px}
.logo-img{display:block;height:36px;width:auto}
/* Slightly larger logo in header to match buttons */
.site-header .logo-img{height:42px}
.nav-right{display:flex;align-items:center;gap:16px}
.menu a{color:var(--muted);text-decoration:none;margin:0 6px;padding:8px 10px;border-radius:10px;transition:color .15s ease, background .15s ease}
.menu a:hover{color:var(--text);background:rgba(2,8,23,.06)}
.auth{display:flex;gap:8px;align-items:center}
.nav-toggle{display:none;position:relative;width:42px;height:36px;border:1px solid rgba(2,8,23,.12);border-radius:10px;background:rgba(255,255,255,.65);backdrop-filter:saturate(180%) blur(10px);align-items:center;justify-content:center;gap:4px;cursor:pointer}
.nav-toggle span{display:block;width:18px;height:2px;background:#0b2142;border-radius:2px}
.chip{background:#e2efff;border:1px solid #bfdcff;color:#0b3b5e;padding:6px 10px;border-radius:999px;font-size:13px}
.btn{position:relative;overflow:hidden;background:linear-gradient(135deg, var(--primary), var(--primary-600));color:#fff;text-decoration:none;border:none;padding:10px 16px;border-radius:10px;font-weight:700;cursor:pointer;box-shadow:0 8px 22px rgba(14,165,233,.30);transition:transform .08s ease, box-shadow .2s}
.btn::after{content:"";position:absolute;inset:0;border-radius:12px;background:linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.3), rgba(255,255,255,.0));transform:translateX(-120%);transition:transform .6s ease;pointer-events:none}
.btn:hover::after{transform:translateX(120%)}
.btn:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(14,165,233,.4)}
.btn:active{transform:translateY(0)}
.btn-pulse{position:relative}
.btn-pulse:after{content:"";position:absolute;inset:-6px;border-radius:16px;border:2px solid rgba(14,165,233,.35);animation:pulse 1.8s infinite ease-out}
@keyframes pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(1.15)}100%{opacity:0;transform:scale(1.2)}}
.btn-outline{background:transparent;color:var(--accent);border:1.5px solid var(--accent);padding:9px 15px;border-radius:10px;font-weight:700}
.btn-outline:hover{background:var(--accent);color:#fff;box-shadow:0 8px 22px var(--ring-accent)}
.btn-accent{background:linear-gradient(135deg, var(--accent), var(--accent-600));box-shadow:0 10px 26px rgba(249,115,22,.32)}

/* Button icons */
.btn .i{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-right:8px;vertical-align:middle}
.btn .i img,.btn .i svg{display:block;width:18px;height:18px}
.btn:not(.btn-outline) .i img{filter: invert(1) brightness(1.2)}
.btn.btn-outline .i img{filter: none}
h1,h2{line-height:1.2;margin:18px 0}
.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;margin:28px 0;position:relative}
.hero:before{content:"";position:absolute;inset:-20px -10px auto -10px;height:180px;background:radial-gradient(1200px 300px at 20% 0%, rgba(14,165,233,.18), transparent 60%), radial-gradient(900px 250px at 80% 0%, rgba(249,115,22,.18), transparent 60%);z-index:-1}
.card{
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(180%) blur(10px);
  border: 1px solid rgba(2,8,23,.06);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(2,8,23,.10);
  transition: all .2s ease;
}
.card:hover{box-shadow:0 16px 40px rgba(2,8,23,.14);transform:translateY(-1px); background: rgba(255, 255, 255, 0.85);}
.muted{color:var(--muted)}
.hero-title{font-size:32px;margin-top:6px}
.subtitle{color:#334155;margin-top:6px}
.grid{display:grid;gap:16px}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.grid.cols-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.hero{grid-template-columns:1fr}}
label{display:block;margin:8px 0 6px;font-size:13px;color:#0b2142}
input,select,textarea{width:100%;padding:12px 12px;border-radius:12px;border:1px solid rgba(2,8,23,.12);background:#fff;color:var(--text);transition: all .2s ease;}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary-600);box-shadow:0 0 0 5px var(--ring);background:#fafdff}
.row{display:flex;gap:12px}
.row > *{flex:1}
.table{width:100%;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid rgba(2,8,23,.06);border-radius:12px;overflow:hidden}
.table th,.table td{padding:12px 10px;border-bottom:1px solid rgba(2,8,23,.06);text-align:left}
.table thead th{background:var(--surface-2);font-weight:700;color:#0b2142}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;border:1px solid rgba(2,8,23,.12);color:#0b2142;background:#f8fafc}
.sponsored{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.flash{padding:10px 0}
.flash .container{padding:10px 16px;border-radius:12px}
.flash.success .container{background:#ecfeff;border:1px solid #bae6fd;color:#0c4a6e}
.flash.error .container{background:#fef2f2;border:1px solid #fecaca;color:#7f1d1d}
.site-footer{margin-top:56px;background:linear-gradient(180deg, var(--primary), var(--primary-600));color:#e6f7ff;position:relative;overflow:hidden}
.site-footer::before{content:"";position:absolute;left:0;right:0;top:-24px;height:24px;background:radial-gradient(120% 24px at 50% 100%, rgba(255,255,255,.65), transparent 70%)}
.site-footer a{color:#e6f7ff;text-decoration:none}
.site-footer a:hover{opacity:.9;text-decoration:underline}
.footer-inner{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;padding:28px 0}
@media(max-width:900px){.footer-inner{grid-template-columns:1fr;gap:8px}}
.footer-brand{display:flex;align-items:center;gap:10px}
.footer-brand .logo-img{filter:drop-shadow(0 4px 10px rgba(0,0,0,.2))}
.footer-copy{border-top:1px solid rgba(255,255,255,.25);padding:10px 0;color:#e2f2ff;font-size:13px}
.list{display:grid;gap:12px}
.offer{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.offer h3{margin:0}
.price{font-weight:800;font-size:20px;color:#0b2142}
.sub{font-size:12px;color:#475569}
.actions{display:flex;gap:8px;justify-content:flex-end;align-items:center}
.danger{color:#be123c}
.text-right{text-align:right}
.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-6{margin-top:24px}
.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}

/* Trustbar & badges */
.trustbar .trust{display:flex;gap:16px;align-items:center;justify-content:space-between}
.trust-left{display:flex;gap:10px;align-items:center}
.stars{display:inline-flex;gap:2px;font-size:18px;color:#f59e0b}
.stars .half{position:relative}
.score{color:#0b2142}
.pill{display:inline-block;background:#eef6ff;border:1px solid #cde7ff;color:#0b3b5e;border-radius:999px;padding:6px 10px;font-size:12px}
.feature .icon{font-size:22px}

/* Checks list */
.checks{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:10px}
.checks li{display:flex;gap:10px;align-items:flex-start}
.check{width:22px;height:22px;display:inline-block;border-radius:999px;background:linear-gradient(180deg, var(--accent), var(--accent-600)); box-shadow:0 3px 10px rgba(249,115,22,.25); position:relative;flex-shrink:0}
.check:after{content:"";position:absolute;left:7px;top:4px;width:6px;height:11px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg)}

/* Steps */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.step{display:flex;gap:12px;align-items:center}
.step .num{width:36px;height:36px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#e0f2fe;color:#075985;font-weight:800}
@media(max-width: 768px){
  .steps{grid-template-columns:1fr}
  .step{align-items:flex-start}
}

/* Testimonials */
.testimonials .quote p{margin:0 0 10px 0;font-size:15px}
.testimonials .author{color:#475569;font-weight:600}

/* Logos */
.logos-row{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;align-items:center}
.logo{border:1px solid rgba(2,8,23,.08);border-radius:12px;padding:12px;text-align:center;color:#475569;background:#fff}

/* Admin attribute editor */
.admin-attrs{background:var(--surface-2);border:1px dashed rgba(2,8,23,.15);border-radius:12px;padding:12px}
.hint{font-size:12px;color:#64748b}

/* Testimonials modern layout + safe reset for external sliders */
.testimonials-section{position:relative}
/* Nasconde qualunque controllo di slider non stilizzato dentro la sezione */
.testimonials-section button,
.testimonials-section ul,
.testimonials-section [class*="prev"],
.testimonials-section [class*="next"],
.testimonials-section [class*="arrow"],
.testimonials-section nav,
.testimonials-section > ul,
.testimonials-section .carousel-control-prev,
.testimonials-section .carousel-control-next,
.testimonials-section .swiper-button-prev,
.testimonials-section .swiper-button-next,
.testimonials-section .splide__arrows,
.testimonials-section .glide__arrows,
.testimonials-section .glide__bullets,
.testimonials-section .swiper-pagination,
.testimonials-section .tns-nav{display:none!important}
/* Griglia responsive robusta che sovrascrive layout di plugin */
.testimonial-slider{display:grid!important;gap:18px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));align-items:stretch}
.testimonial-card{background:var(--surface);border:1px solid rgba(2,8,23,.06);border-radius:16px;box-shadow:0 6px 24px rgba(2,8,23,.06);padding:18px}
.testimonial-card .stars{color:#f59e0b;letter-spacing:2px;margin-bottom:6px;position:relative}
.testimonial-card .stars span{display:none}
.testimonial-card .stars:before{content:'★★★★★'}
.testimonial-card .author{color:#0b2142;font-weight:800;margin-top:8px}
.testimonial-card .card-text{color:#334155}

/* Native testimonials carousel */
.t-carousel{position:relative;overflow:hidden}
.t-track{display:flex;gap:16px;transition:transform .4s ease;will-change:transform}
.t-slide{flex:0 0 calc(100% / var(--slides,1))}
.t-nav{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:12px}
.t-nav .t-prev,.t-nav .t-next{display:inline-flex!important;align-items:center;justify-content:center;width:36px;height:36px;border-radius:999px;background:#fff;border:1px solid rgba(2,8,23,.12);color:#0b2142;box-shadow:0 4px 16px rgba(2,8,23,.08);cursor:pointer}
.t-dots{display:flex;align-items:center;gap:6px}
.t-dots .dot{width:8px;height:8px;border-radius:999px;background:#cbd5e1;border:none;padding:0}
.t-dots .dot.active{background:var(--primary)}
/* Override aggressive reset for our nav buttons */
.testimonials-section .t-nav button{display:inline-flex!important}
.testimonials-section .t-carousel{margin-bottom:12px}
/* Nasconde vecchio contenitore se presente */
.testimonials-section .testimonial-slider{display:none!important}

/* Modern Hero */
.hero-modern {
  padding: 5.5rem 0 4.5rem;
  min-height: 560px;
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
  animation: hero-bg-animation 22s ease-in-out infinite;
}

@keyframes hero-bg-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 420px at 15% -10%, rgba(14,165,233,.28), transparent 60%),
    radial-gradient(800px 360px at 85% -15%, rgba(249,115,22,.20), transparent 60%),
    linear-gradient(180deg, rgba(2,8,23,.58), rgba(2,8,23,.28));
}

.hero-modern::after{
  content:"";
  position:absolute;
  right:-80px; top:-60px; width:420px; height:420px;
  background: radial-gradient(closest-side, rgba(255,255,255,.25), rgba(255,255,255,0));
  filter: blur(10px);
  opacity:.7;
  pointer-events:none;
}

.hero-modern .container { position: relative; z-index: 1; }

/* Hero copy panel for readability */
.hero-copy{
  color:#fff;
  background: rgba(2,8,23,.58);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 10px 30px rgba(2,8,23,.35);
  backdrop-filter: saturate(150%) blur(6px);
}
.hero-copy .display-4{ text-shadow: 0 6px 28px rgba(0,0,0,.55); }
.hero-copy .lead{ color:#eff6ff; text-shadow: 0 4px 22px rgba(0,0,0,.5); }

/* Features ribbon with colorful icons */
.features-ribbon{ margin-top: 18px; }
.features{ display:grid; gap:14px; grid-template-columns: repeat(3, 1fr); }
.feature{
  background: var(--surface);
  border:1px solid rgba(2,8,23,.06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(2,8,23,.10);
  transition: transform .12s ease, box-shadow .2s ease;
}
.feature:hover{ transform: translateY(-2px); box-shadow: 0 16px 36px rgba(2,8,23,.14); }
.feature h3{ margin: 6px 0 4px; font-size: 18px; }
.f-icon{
  --c: var(--primary);
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:50%;
  /* Fallback */
  background: radial-gradient(closest-side, var(--c), rgba(0,0,0,.04));
  /* Enhanced with color-mix when available */
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 75%, white 25%), color-mix(in srgb, var(--c) 25%, transparent));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 25%, transparent);
}
.f-icon img{ filter: drop-shadow(0 2px 6px rgba(0,0,0,.2)); }

@media (max-width: 900px){
  .features{ grid-template-columns: 1fr; }
}

/* Mobile navigation */
@media (max-width: 900px){
  .nav-toggle{display:inline-flex}
  .nav-right{
    position:absolute;left:0;right:0;top:100%;
    display:none;flex-direction:column;gap:12px;
    margin-top:8px;padding:12px 14px;border-radius:14px;
    background:rgba(255,255,255,.9);
    border:1px solid rgba(2,8,23,.08);
    box-shadow:0 14px 34px rgba(2,8,23,.08);
  }
  .nav-right.open{display:flex}
  .menu{display:flex;flex-wrap:wrap}
  .menu a{margin:4px;padding:10px 12px}
}

/* Scrolling Logos */
.scrolling-logos {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.scrolling-logos .logos-slide {
  display: flex;
  animation: scroll 30s linear infinite;
}

.scrolling-logos .logos-slide img {
  height: 40px;
  margin: 0 40px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.scrolling-logos .logos-slide img:hover {
  filter: grayscale(0%);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Testimonials Section */
.testimonials-section {
    padding: 60px 0;
}

.testimonial-slider .slick-slide {
    padding: 0 15px;
}

.testimonial-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    padding: 40px;
    margin: 20px 0;
    height: 100%;
}

.testimonial-card .stars {
    color: #f59e0b;
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
}

.testimonial-card .author {
    font-weight: 700;
    color: var(--text);
    margin-top: 20px;
}

/* === Hero compatta e colori professionali === */
.hero-compact{ padding: 28px 0 18px; }
.hero-compact .hero-copy{
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(2,8,23,.08);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(2,8,23,.06);
}
.hero-compact .display-4{ font-size: 2rem; margin: 0 0 6px; }
.hero-compact .lead{ color: var(--muted); margin-bottom: 10px; }

/* Override stile scuro precedente per .hero-copy (se presente) */
.hero-copy{ color: var(--text); background: var(--surface); border: 1px solid rgba(2,8,23,.08); border-radius: 16px; padding: 22px; box-shadow: 0 12px 36px rgba(2,8,23,.10); }
.hero-copy .display-4{ text-shadow: none; }
.hero-copy .lead{ color: var(--muted); text-shadow: none; }

/* Reviews Slider Overrides (one-per-view, side arrows) */
.testimonials-section #t-carousel{position:relative;overflow:hidden}
.testimonials-section #t-carousel .t-track{display:flex;gap:0;transition:transform .55s ease}
.testimonials-section #t-carousel .t-slide{flex:0 0 100%}
.testimonials-section #t-carousel .t-nav{position:absolute;inset:0;pointer-events:none}
.testimonials-section #t-carousel .t-prev,
.testimonials-section #t-carousel .t-next{position:absolute;top:50%;transform:translateY(-50%);pointer-events:auto;display:inline-flex!important;align-items:center;justify-content:center;width:44px;height:44px;border-radius:999px;background:#fff;border:1px solid rgba(2,8,23,.12);box-shadow:0 10px 30px rgba(2,8,23,.1);color:#0b2142;cursor:pointer}
.testimonials-section #t-carousel .t-prev{left:8px}
.testimonials-section #t-carousel .t-next{right:8px}
.testimonials-section #t-carousel .t-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;align-items:center;justify-content:center;gap:6px;pointer-events:auto}
.testimonials-section #t-carousel .t-dots .dot{width:8px;height:8px;border-radius:999px;background:#cbd5e1;border:none}
.testimonials-section #t-carousel .t-dots .dot.active{background:var(--primary)}
.testimonials-section .testimonial-card{border-radius:28px;padding:56px 72px;box-shadow:0 18px 56px rgba(2,8,23,.12)}
.testimonials-section .testimonial-card .card-text{font-size:1.15rem;color:#334155}
.testimonials-section .testimonial-card .author{margin-top:16px}
.testimonials-section .testimonial-card .stars{display:flex;gap:6px;margin-bottom:12px;letter-spacing:0}
.testimonials-section .testimonial-card .stars:before{content:none!important}
.testimonials-section .testimonial-card .stars img{width:22px;height:22px;display:block}
@media (max-width: 720px){
  .testimonials-section .testimonial-card{padding:32px 24px}
  .testimonials-section #t-carousel .t-prev{left:4px}
  .testimonials-section #t-carousel .t-next{right:4px}
}

/* Points illustration box: keeps SVG neatly inside */
.points-illu-box{
  background:#fff;
  border:1px solid rgba(2,8,23,.08);
  border-radius:16px;
  padding:22px 26px;
  box-shadow:0 12px 36px rgba(2,8,23,.10);
  overflow:hidden;
  max-width:560px;
  margin:0 auto;
}
.points-illu-img{display:block;width:100%;height:auto;object-fit:contain}
@media (max-width: 900px){
  .points-illu-box{max-width:none;padding:18px}
  .points-illu-img{transform:scale(.92)}
}
