/* ====== Brand palette ====== */
:root{
  --blue-900:#0b3a6e;
  --blue-400:#6db7ff;
  --ocra:#d59b00;
  --ink:#0b1220;
  --muted:#6b7280;
  --soft:#f5f7fb;
  --brand:var(--blue-900);
  --brand-600:#072c55;
  --radius-xl: 18px;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}


/* ====== Base ====== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
}

/* ====== Link ====== */
.link-arrow{
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
  position: relative;
}
.link-arrow::after{
  content: "→";
  margin-left: .35rem;
  transition: transform .2s ease;
}
.link-arrow:hover::after{ transform: translateX(3px); }

/* ====== Navbar ====== */
.site-header .navbar .nav-link{ font-weight: 500; }
.site-header .navbar .nav-link.active{ color: var(--brand); }
.brand-text{ letter-spacing:.2px; }

/* ====== Buttons ====== */
.btn-brand{
  background-color: var(--brand);
  border-color: var(--brand);
  color:#fff;
}
.btn-brand:hover{
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color:#fff;
}
.btn-outline-brand{
  border-color: var(--brand);
  color: var(--brand);
}
.btn-outline-brand:hover{
  background-color: var(--brand);
  color:#fff;
}
.btn-ocra{
  background-color: var(--ocra);
  border-color: var(--ocra);
  color:#111;
}
.btn-ocra:hover{ filter: brightness(.95); }

.btn{ font-size: .95rem; }
.btn.btn-lg{ font-size: 1rem; padding: .65rem 1.05rem; }
.btn.btn-sm{ font-size: .9rem; }

/* ====== Bedge ====== */
.badge-ocra{ background-color: var(--ocra); }
.bg-brand-soft{ background: rgba(11,58,110,.08); }
.text-brand{ color: var(--brand); }
.text-ocra{ color: var(--ocra); }

/* ====== Hero ====== */
.hero {
  /* ELIMINA il min-height con clamp */
  min-height: auto !important; 
  padding-top: 80px !important;
  padding-bottom: 80px !important;

  background:
    radial-gradient(1200px 600px at 85% 20%, rgba(109,183,255,0.25), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero--minimal{
  background:
    radial-gradient(900px 360px at 10% 20%, rgba(109,183,255,.22), transparent 55%),
    radial-gradient(900px 360px at 95% 15%, rgba(213,155,0,.16), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero-content{
  padding: clamp(8px, 1.2vw, 18px) 0;
}
@media (min-width: 992px){
  .hero-content{
    padding: clamp(16px, 2.2vw, 34px) 0;
  }
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding: .48rem .7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1;
  white-space: nowrap;
}
.chip--soft{
  background: rgba(11,58,110,.06);
  border: 1px solid rgba(11,58,110,.10);
  color: var(--brand);
}
@media (max-width: 991.98px){ .chip{ white-space: normal; } }

.hero-metric{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding: 12px 14px;
  border-radius: 16px;
}
.hero-metric--light{
  background: rgba(11,58,110,.04);
  border: 1px solid rgba(11,58,110,.08);
}
.hero-metric-icon{
  width: 42px; height: 42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(11,58,110,.08);
  color: var(--brand);
  font-size: 1.15rem;
}

.hero-contact{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.hero-contact-badge{
  width: 46px; height: 46px;
  border-radius: 16px;
  display:grid; place-items:center;
  background: rgba(213,155,0,.16);
  color: var(--ocra);
  font-size: 1.25rem;
  flex: 0 0 auto;
  margin-bottom: 18px;
}
.hero-phone{
  display:flex;
  align-items:center;
  font-weight: 700;
  font-size: 1.15rem;
}
.hero-phone-link{
  text-decoration: none;
  color: var(--brand);
}
.hero-phone-link:hover{ text-decoration: underline; }

.hero-contact h2{ font-size: 2rem !important; }

.hero-rotator{
  position: relative;
  height: auto;
  min-height: 480px;
  border-radius: 18px;
  overflow: hidden;
}

@media (min-width: 768px){
  .hero-rotator{
    height: clamp(360px, 48vh, 440px);
    min-height: 0;
  }
}

@media (min-width: 992px){
  .hero-rotator{
    height: 440px;
  }
}

.hero-rotator-panel{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .45s ease, transform .45s ease;
}
.hero-rotator-panel.is-active{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-rotator-inner{
  height: 100%;
  padding: 18px;
  overflow: auto;
  scrollbar-width: thin; 
  position: relative;
}

.hero-rotator-inner::-webkit-scrollbar{ width: 8px; }
.hero-rotator-inner::-webkit-scrollbar-thumb{
  background: rgba(11,58,110,.18);
  border-radius: 999px;
}

.hero-rotator-panel[data-panel="content"] .hero-rotator-inner{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 24px;
  overflow: auto;
}

@media (min-width: 992px){
  .hero-rotator-panel[data-panel="content"] .hero-rotator-inner{
    padding: 28px;
    overflow: hidden;
  }
}

.hero-rotator-panel[data-panel="content"] .hero-rotator-inner .d-flex.gap-2.flex-wrap{
  padding-bottom: 6px;
}

.hero-rotator-panel[data-panel="image"] .hero-rotator-inner{
  padding: 0;
  overflow: hidden;
}

.hero-rotator-media{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
}
.hero-rotator-media::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,58,110,.12) 0%, rgba(11,58,110,.28) 100%);
}
.hero-rotator-caption{
  position:absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

/* ====== Cards ====== */
.card-lift{ transition: transform .2s ease, box-shadow .2s ease; }
.card-lift:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(2,8,20,.08);
}
.card-icon{
  --size: 48px;
  width: var(--size); height: var(--size);
  display:grid; place-items:center;
  border-radius: 12px;
  background: rgba(11,58,110,.08);
  color: var(--brand);
  font-size: 1.25rem;
  margin-bottom: .75rem;
}
.icon-blob{
  --size: 56px;
  width: var(--size); height: var(--size);
  border-radius: 16px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(213,155,0,.25), rgba(109,183,255,.25));
  color: var(--brand);
  font-size: 1.4rem;
}

/* ====== Sections ====== */
.bg-soft{ background: var(--soft); }
.section-gradient{
  background: linear-gradient(180deg, #fff 0%, #f7fbff 60%, #ffffff 100%);
}

.vcard{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius: 14px;
  padding: 18px;
}
.vcard-icon{
  --size: 40px;
  width: var(--size); height: var(--size);
  border-radius: 10px;
  display:grid; place-items:center;
  margin-bottom:.5rem;
  color:#111;
}
.bg-ocra{ background: var(--ocra) !important; }
.bg-ocra-10{ background: rgba(213,155,0,.10) !important; }

.mission.box{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius: 14px;
  padding: 18px;
}
.mission.box.alt{
  border:1px dashed rgba(11,58,110,.25);
}

.contact-callout{
  background:
    linear-gradient(180deg, rgba(11,58,110,.06), rgba(109,183,255,.08));
  border-top:1px solid rgba(11,58,110,.08);
  border-bottom:1px solid rgba(11,58,110,.08);
}

/* ====== Mini-gallery ====== */
.gallery-item{
  display:block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(11,58,110,.10);
  background: #fff;
  transform: translateZ(0);
}

.gallery-item img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.gallery-item:hover img{
  transform: scale(1.03);
  filter: saturate(1.05);
}

@media (max-width: 575.98px){
  .gallery-item img{ height: 150px; }
}

/* ====== ADVA Hero ====== */
.adva-hero-visual{
  position: relative;
  width: 100%;
  border-radius: 18px;
  border:1px solid #e9eef5;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
  min-height: 260px;
}

.adva-hero-visual::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,58,110,.10) 0%, rgba(11,58,110,.30) 100%);
}

.adva-hero-visual-caption{
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

@media (min-width: 992px){
  .adva-hero-visual{
    aspect-ratio: auto;
    height: 440px;
  }
}

.adva-resources{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius: 18px;
  padding: 18px;
}

.adva-resources-icon{
  width: 46px; height: 46px;
  border-radius: 16px;
  display:grid; place-items:center;
  background: rgba(11,58,110,.08);
  color: var(--brand);
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.adva-impact-box{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius: 18px;
  padding: 22px;
}

.adva-impact-icon{
  width: 46px; height: 46px;
  border-radius: 16px;
  display:grid; place-items:center;
  background: rgba(213,155,0,.16);
  color: var(--ocra);
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.adva-impact-list{
  padding-left: 1.1rem;
  margin-bottom: 0;
}
.adva-impact-list li{
  margin-bottom: .55rem;
  color: var(--ink);
}
.adva-impact-list li:last-child{ margin-bottom: 0; }

.adva-impact-media{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 260px;
  background-size: cover;
  background-position: center;
  border:1px solid #e9eef5;
}

.adva-impact-media::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,58,110,.10) 0%, rgba(11,58,110,.32) 100%);
}

.adva-impact-media-caption{
  position:absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}


/* ====== CHI SIAMO Hero ====== */
.chi-hero-visual{
  position: relative;
  width: 100%;
  border-radius: 18px;
  border: 1px solid #e9eef5;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
  min-height: 260px;
}

.chi-hero-visual::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,58,110,.10) 0%, rgba(11,58,110,.30) 100%);
}

.chi-hero-visual-caption{
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

@media (min-width: 992px){
  .chi-hero-visual{
    aspect-ratio: auto;
    height: 440px;
  }
}


/* ====== CONTATTI Hero ====== */
.contatti-hero-visual{
  position: relative;
  width: 100%;
  border-radius: 18px;
  border: 1px solid #e9eef5;
  overflow: hidden;

  background-size: cover;
  background-position: center;

  aspect-ratio: 4 / 3;
  min-height: 260px;
}

.contatti-hero-visual::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,58,110,.10) 0%, rgba(11,58,110,.30) 100%);
}

.contatti-hero-visual-caption{
  position:absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

@media (min-width: 992px){
  .contatti-hero-visual{
    aspect-ratio: auto;
    height: 440px;
  }
}

/* ====== Card contatti ====== */
.contatti-card{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
}

.contatti-card-icon{
  width: 46px; height: 46px;
  border-radius: 16px;
  display:grid; place-items:center;
  background: rgba(213,155,0,.16);
  color: var(--ocra);
  font-size: 1.25rem;
  flex: 0 0 auto;
}

/* ====== Footer ====== */
.site-footer {
  background-color: var(--brand-600); 
  padding: 3rem 0;
  border-top: 4px solid var(--ocra);
  color: rgba(255, 255, 255, 0.8);
}

.footer-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--ocra);
}

.footer-text {
  color: rgba(255, 255, 255, 0.7);
}

/* ====== Stile per i link di Iubenda ====== */
.footer-legal a {
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.footer-legal a:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.05);
}

/* ====== Sistemazioni home ====== */
/* Banner 5x1000 */
.banner-5x1000 {
  background-color: rgba(213, 155, 0, 0.05);
  border: 1px solid rgba(213, 155, 0, 0.2);
}

.card-lift.bg-white {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-lift.bg-white:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(11, 58, 110, 0.08) !important;
}

.bg-icon-decoration {
  font-size: 15rem;
  transform: translate(20%, 20%);
  color: var(--brand);
  pointer-events: none;
}

.card-icon.bg-brand-soft {
  background: rgba(11, 58, 110, 0.06);
  color: var(--brand);
}

/* Call to Action Finale Invertita */
.contact-callout-dark {
  background-color: var(--brand-600);
  color: #ffffff;
}