/* =========================================================
   ROOT
========================================================= */

:root{
  --bg-light:#f3f4f6;
  --bg-dark:#0f172a;
  --bg-darker:#111827;
  --card:#ffffff;

  --accent-hue: 200;
  --accent: hsl(var(--accent-hue), 100%, 55%);

  --text-dark:#111827;
  --text-light:#e5e7eb;
  --muted:#94a3b8;
  --radius:16px;
}

/* =========================================================
   BASE
========================================================= */

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  background:var(--bg-light);
  color:var(--text-dark);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  line-height:1.6;
}

h1,h2,h3{
  margin:0 0 15px;
  font-weight:800;
}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:60px 20px;
}

/* ============================= */
/* NAVBAR REFINED */
/* ============================= */

.navbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:linear-gradient(180deg,#0f172a,#0b1220);
  padding:14px 0;
}

.nav-container{
  max-width:1200px;
  margin:auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* ============================= */
/* BRAND */
/* ============================= */

.nav-brand{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;

  text-decoration:none;
  font-weight:700;
  font-size:18px;
  color:#ffffff;

  transition:all .3s ease;
}

/* Aura dietro il brand */
.nav-brand::before{
  content:"";
  position:absolute;
  inset:-12px;
  border-radius:14px;

  background:radial-gradient(
    circle at center,
    var(--accent) 0%,
    transparent 70%
  );

  opacity:0;
  filter:blur(20px);

  z-index:-1;
  transition:opacity .35s ease;
}

/* Hover testo */
.nav-brand:hover{
  color:var(--accent);
  text-shadow:0 0 10px var(--accent);
}

/* Hover aura */
.nav-brand:hover::before{
  opacity:.6;
}

/* Logo IMG */
.nav-logo{
  width:26px;
  height:26px;
  transition:all .3s ease;
}

/* Glow sul logo */
.nav-brand:hover .nav-logo{
  filter:
    drop-shadow(0 0 6px var(--accent))
    drop-shadow(0 0 14px var(--accent));
}

/* ============================= */
/* GLASS BUTTON */
/* ============================= */

.btn-glass{
  padding:8px 18px;
  border-radius:999px;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  color:#ffffff;
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,0.15);
  transition:all .2s ease;
}

.btn-glass:hover{
  background:rgba(255,255,255,0.18);
  border-color:rgba(255,255,255,0.25);
  transform:translateY(-1px);
}

/* =========================================================
   HERO
========================================================= */

.hero{
  text-align:center;
  margin-bottom:80px;
}

.hero h1{
  font-size:42px;
  letter-spacing:-0.5px;
}

.hero-sub{
  color:#666;
  margin-bottom:30px;
}

/* =========================================================
   FORM
========================================================= */

.search-box{
  max-width:720px;
  margin:0 auto;
}

.form-row{
  display:flex;
  gap:16px;
  margin-bottom:16px;
}

select,
input{
  flex:1;
  padding:14px 16px;
  border-radius:10px;
  border:1px solid #ddd;
  font-size:15px;
}

.btn-primary{
  padding:14px 22px;
  border-radius:10px;
  border:none;
  background:#111;
  color:#fff;
  cursor:pointer;
  transition:.2s ease;
}

.btn-primary:hover{
  background:#333;
}

/* =========================================================
   AUTOCOMPLETE
========================================================= */

.autocomplete-wrapper{
  position:relative;
  flex:1;
}

.autocomplete-dropdown{
  position:absolute;
  top:100%;
  left:0;
  width:100%;
  background:#fff;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
  max-height:260px;
  overflow-y:auto;
  z-index:1000;
}

.autocomplete-dropdown div{
  padding:12px 16px;
  cursor:pointer;
}

.autocomplete-dropdown div:hover{
  background:#f3f4f6;
}

.dropdown-item.active{
  background:#e2e8f0;
}

/* =========================================================
   SECTIONS
========================================================= */

.section{
  margin-top:80px;
}

.section-header{
  margin-bottom:30px;
}

.section.alt{
  background:#fafafa;
  padding:60px 20px;
  border-radius:20px;
}

/* =========================================================
   CARDS
========================================================= */

.grid.cards{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.card{
  padding:10px 16px;
  border-radius:30px;
  background:#f2f2f2;
  text-decoration:none;
  font-size:14px;
  transition:0.2s;
  color:#111;
}

.card:hover{
  background:#e5e5e5;
}

/* =========================================================
   STIMA PAGE
========================================================= */

.price-card{
  background:linear-gradient(135deg,#111827,#1f2937);
  padding:50px 30px;
  border-radius:20px;
  text-align:center;
  box-shadow:0 30px 70px rgba(0,0,0,0.35);
  color:#ffffff;
}

.price-main{
  font-size:64px;
  font-weight:800;
  color:var(--accent);
}

/* =========================================================
   FOOTER
========================================================= */

.aeq-footer{
  margin-top:auto;
  background:#0f172a;
  color:#cbd5e1;
  padding:60px 20px 40px;
  font-size:14px;
}

.aeq-footer-inner{
  max-width:1100px;
  margin:auto;
  display:flex;
  flex-direction:column;
  gap:30px;
}

.aeq-footer-top{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:30px;
}

.aeq-footer-brand strong{
  display:block;
  font-size:16px;
  margin-bottom:8px;
  color:#ffffff;
}

.aeq-footer-brand p{
  max-width:400px;
  color:#94a3b8;
  line-height:1.5;
}

.aeq-footer-links{
  display:flex;
  gap:20px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.aeq-footer-links a{
  color:#94a3b8;
  text-decoration:none;
  transition:.2s ease;
}

.aeq-footer-links a:hover{
  color:var(--accent);
}

.aeq-footer-note{
  max-width:800px;
  color:#64748b;
  line-height:1.5;
}

.aeq-footer-copy{
  border-top:1px solid rgba(255,255,255,0.05);
  padding-top:20px;
  color:#64748b;
}

.aeq-footer-copy a{
  color:#94a3b8;
  text-decoration:none;
}

.aeq-footer-copy a:hover{
  color:var(--accent);
}

.aeq-footer a{
  position:relative;
  color:#cbd5e1;
  text-decoration:none;
  font-weight:500;
  padding:4px 10px;
  transition:all .2s ease;
}

.aeq-footer a:hover{
  color:#ffffff;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width:768px){

  .form-row{
    flex-direction:column;
  }

  .grid.cards{
    justify-content:center;
  }

  .hero h1{
    font-size:32px;
  }

}


/* =========================================================
   AUTOCOMPLETE
========================================================= */

.autocomplete-dropdown{
  position:absolute;
  top:100%;
  left:0;
  width:100%;
  background:#fff;
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,0.15);
  max-height:260px;
  overflow-y:auto;
  z-index:1000;

  opacity:0;
  transform:translateY(-6px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
}

.autocomplete-dropdown.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.dropdown-item{
  padding:12px 16px;
  cursor:pointer;
  transition:background .15s ease;
}

.dropdown-item:hover,
.dropdown-item.active{
  background:#e2e8f0;
}

.dropdown-item strong{
  color:#2563eb;
  font-weight:600;
}


/* =========================================================
   BACK TO TOP
========================================================= */

#backToTop{
  position:fixed;
  bottom:28px;
  right:28px;
  width:52px;
  height:52px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  cursor:pointer;

  background:#000;
  color:#fff;

  border:2px solid #ffffff;   
  box-shadow:0 8px 20px rgba(0,0,0,0.4);

  opacity:0;
  transform:translateY(10px);
  transition:all .25s ease;
  pointer-events:none;
}

#backToTop.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

#backToTop:hover{
  background:#111;
  border-color:var(--accent);       
}

/* =========================================================
   CARD PILL
========================================================= */

.card.pill{
  padding:12px 22px;
  border-radius:999px;
  background:#fff;
  border:2px solid #000;   
  font-weight:500;
  transition:all .2s ease;
}

.card.pill:hover{
  background:#000;
  color:#fff;
}

.btn-glass{
  padding:8px 20px;
  border-radius:999px;
  background:#000;
  color:#fff;
  font-weight:600;
  border:2px solid #ffffff;   
  transition:all .2s ease;
}

.btn-glass:hover{
  background:#111;
  border-color:var(--accent);
}

.footer-cta{
  border:2px solid rgba(255,255,255,0.25);
  border-radius:999px;
  transition:all .25s ease;
}

/* Glow + border shift */
.footer-cta:hover{
  border-color:var(--accent);
  color:#ffffff;
  box-shadow:
    0 0 6px rgba(56,189,248,0.4),
    0 0 12px rgba(56,189,248,0.25);
}

.footer-cta::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  border:2px solid transparent;
  pointer-events:none;
  transition:all .25s ease;
}

.footer-cta:hover::after{
  border-color:var(--accent);
  transform:scale(1.08);
  opacity:0.6;
}

@keyframes hueShift {
  0%   { --accent-hue: 180; }
  25%  { --accent-hue: 220; }
  50%  { --accent-hue: 260; }
  75%  { --accent-hue: 200; }
  100% { --accent-hue: 180; }
}

body.dynamic-accent{
  animation: hueShift 18s linear infinite;
}

input,
select{
    background:#f5f5f5;
    border:1px solid #ccc;
    border-radius:12px;
    padding:14px 16px;
    font-size:15px;
    transition:all .25s ease;
}

/* Focus elegante */
input:focus,
select:focus{
    outline:none;
    border-color:var(--accent);
    box-shadow:
        0 0 0 2px rgba(0,0,0,0.02),
        0 0 10px var(--accent);
}

/* Hover leggero */
input:hover,
select:hover{
    border-color:var(--accent);
}

select{
    appearance:none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 15px) calc(50% - 3px);
    background-size:5px 5px;
    background-repeat:no-repeat;
}

.autocomplete-dropdown{
    border:1px solid #ddd;
    border-radius:14px;
    background:#fff;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    overflow:hidden;
}

.dropdown-item:hover,
.dropdown-item.active{
    background:rgba(0,0,0,0.04);
    color:var(--accent);
}

.card.pill{
    display:inline-block;
    padding:10px 18px;
    border-radius:999px;

    background:#f5f5f5;
    border:1px solid #d0d0d0;

    color:#111;
    font-weight:500;

    transition:all .25s ease;
}

/* Hover */
.card.pill:hover{
    border-color:var(--accent);
    color:var(--accent);
    background:#fff;

    box-shadow:
        0 0 0 1px var(--accent),
        0 0 12px rgba(0,0,0,.06);
}

.card.pill:hover{
    box-shadow:
        0 0 6px var(--accent),
        0 0 18px rgba(0,0,0,.08);
}

.btn-primary{
    padding:14px 24px;
    border-radius:14px;

    background:#000;
    color:#fff;

    font-weight:600;
    letter-spacing:.3px;

    border:2px solid #ffffff;
    cursor:pointer;

    transition:all .25s ease;
}

/* Hover */
.btn-primary:hover{
    border-color:var(--accent);
    box-shadow:
        0 0 6px var(--accent),
        0 0 18px rgba(0,0,0,.1);
}

/* Active */
.btn-primary:active{
    transform:translateY(1px);
}

hr{
    border:none;
    height:1px;
    margin:40px 0;

    background:linear-gradient(
        to right,
        transparent,
        var(--accent),
        transparent
    );
    backdrop-filter:blur(4px);
    opacity:.6;
}

body.dynamic-accent hr{
    animation: hrPulse 6s linear infinite;
}

@keyframes hrPulse{
    0%   { opacity:.5; }
    50%  { opacity:1; }
    100% { opacity:.5; }
}

/* ============================= */
/* CUSTOM SELECT */
/* ============================= */

.custom-select-wrapper{
    position:relative;
    width:100%;
}

.custom-select-wrapper select{
    display:none;
}

.custom-select{
    background:#f5f5f5;
    border:2px solid #000;
    border-radius:14px;
    padding:14px 16px;
    cursor:pointer;
    position:relative;
    transition:.25s ease;
}

.custom-select:hover{
    border-color:var(--accent);
}

.custom-select::after{
    content:"▾";
    position:absolute;
    right:16px;
    top:50%;
    transform:translateY(-50%);
    color:var(--accent);
    font-size:14px;
}

.custom-options{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    background:#fff;
    border:2px solid #000;
    border-radius:14px;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
    overflow:hidden;
    z-index:999;
    display:none;
}

.custom-options.show{
    display:block;
}

.custom-option{
    padding:12px 16px;
    cursor:pointer;
    transition:.2s ease;
}

.custom-option:hover,
.custom-option.active{
    background:var(--accent);
    color:#fff;
}

.search-box {
    max-width: 760px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}

.form-row select,
.form-row input {
    flex: 1;
    min-width: 0;
}

.hero-reliability {
    margin-top: 1.5rem;
}

.reliability-label {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.reliability-bar {
    background: #e5e5e5;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.reliability-fill {
    background: #2d6cdf;
    height: 100%;
    transition: width 0.4s ease;
}

.reliability-value {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.reliability-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.6rem;
}