/* ============================================================
   PROSPERA V24 — Senior UX/UI final polish
   Focus: stable header, real professional footer, responsive
   services modal, clean hierarchy, Hostinger-safe behavior.
============================================================ */
:root{
  --p24-navy-980:#021720;
  --p24-navy-940:#031f2b;
  --p24-navy-900:#052b39;
  --p24-copper:#e88957;
  --p24-copper-2:#f29861;
  --p24-white:#ffffff;
  --p24-muted:rgba(255,255,255,.68);
  --p24-line:rgba(255,255,255,.12);
  --p24-line-strong:rgba(232,137,87,.35);
  --p24-radius:24px;
  --p24-shadow:0 28px 86px rgba(0,0,0,.36);
}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--prospera-header-safe-height,92px) + 18px);}
body{overflow-x:hidden;background:var(--p24-navy-980);}
body.prospera-services-modal-open{overflow:hidden!important;touch-action:none;}

/* Header: refined, stable, and not dependent on legacy mega-menu code */
.site-header{
  position:sticky!important;
  top:0!important;
  z-index:10000!important;
  background:linear-gradient(180deg,rgba(4,36,49,.97),rgba(3,28,39,.95))!important;
  border-bottom:1px solid rgba(232,137,87,.22)!important;
  box-shadow:0 16px 54px rgba(0,0,0,.26)!important;
  backdrop-filter:blur(18px) saturate(130%);
  -webkit-backdrop-filter:blur(18px) saturate(130%);
}
.site-header::after{content:"";position:absolute;left:clamp(18px,4vw,78px);right:clamp(18px,4vw,78px);bottom:-1px;height:1px;background:linear-gradient(90deg,rgba(232,137,87,.95),rgba(232,137,87,.18),transparent 76%);pointer-events:none;}
.header-inner{min-height:clamp(76px,6.4vw,94px)!important;gap:clamp(16px,2vw,34px)!important;}
.header-logo img{max-height:clamp(34px,3.8vw,48px)!important;width:auto!important;object-fit:contain!important;filter:drop-shadow(0 10px 20px rgba(0,0,0,.22));}
.header-nav{align-items:center!important;gap:clamp(4px,.75vw,12px)!important;}
.header-nav>li>a,.nav-dropdown-link{
  min-height:44px!important;
  display:inline-flex!important;
  align-items:center!important;
  border-radius:15px!important;
  padding:12px 14px!important;
  color:rgba(255,255,255,.88)!important;
  font-family:Montserrat,Inter,Arial,sans-serif!important;
  font-weight:900!important;
  letter-spacing:.015em!important;
  text-decoration:none!important;
  transition:background .2s ease,color .2s ease,transform .2s ease,border-color .2s ease!important;
}
.header-nav>li>a:hover,.header-nav>li>a:focus-visible,.nav-dropdown-link:hover,.nav-dropdown-link:focus-visible,.nav-dropdown-link[aria-expanded="true"]{
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  outline:none!important;
  transform:translateY(-1px);
}
.header-nav>li>a.active,.header-nav>li>a[aria-current="page"]{background:rgba(255,255,255,.095)!important;color:var(--p24-copper-2)!important;}
.nav-dropdown{display:flex!important;align-items:center!important;gap:4px!important;}
.nav-dropdown-toggle{
  width:36px!important;height:36px!important;border-radius:50%!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid rgba(255,255,255,.12)!important;background:rgba(255,255,255,.055)!important;
  color:rgba(255,255,255,.76)!important;cursor:pointer!important;transition:.2s ease!important;
}
.nav-dropdown-toggle:hover,.nav-dropdown-toggle:focus-visible,.nav-dropdown-toggle[aria-expanded="true"]{background:rgba(232,137,87,.16)!important;border-color:rgba(232,137,87,.36)!important;color:var(--p24-copper-2)!important;outline:none!important;}
/* The legacy mega menu is intentionally disabled. Services now opens a proper modal. */
.services-mega-menu{display:none!important;visibility:hidden!important;pointer-events:none!important;opacity:0!important;}

.header-cta,.btn.btn-primary,.footer-v23-call,.footer-v23-services-open,.prospera-services-modal-cta{
  box-shadow:0 16px 38px rgba(216,111,63,.24),inset 0 1px 0 rgba(255,255,255,.18)!important;
}
.header-cta:hover,.btn.btn-primary:hover,.footer-v23-call:hover,.footer-v23-services-open:hover,.prospera-services-modal-cta:hover{transform:translateY(-2px);filter:saturate(1.05);}

/* Mobile navigation safety */
.mobile-nav-link.prospera-mobile-services-trigger{
  width:100%;border:0;text-align:left;background:transparent;color:inherit;font:inherit;cursor:pointer;
}
.mobile-nav.open{overscroll-behavior:contain;}
.mobile-overlay.open{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
@media (max-width:1260px){
  .desktop-nav{display:none!important;}
  .hamburger{display:inline-flex!important;}
  .header-actions{gap:10px!important;}
}
@media (max-width:680px){
  .header-inner{min-height:72px!important;}
  .header-phone{display:none!important;}
  .header-cta{min-height:44px!important;padding-inline:14px!important;font-size:.78rem!important;}
}
@media (max-width:430px){.header-cta{display:none!important;}.header-logo img{max-height:38px!important;}}

/* Services modal — stable, responsive, premium */
.prospera-services-modal{position:fixed!important;inset:0!important;z-index:999999!important;display:none;align-items:center;justify-content:center;padding:clamp(12px,2vw,30px)!important;}
.prospera-services-modal.is-open{display:flex!important;}
.prospera-services-modal-backdrop{position:absolute;inset:0;background:rgba(1,17,24,.76)!important;backdrop-filter:blur(15px) saturate(118%);-webkit-backdrop-filter:blur(15px) saturate(118%);}
.prospera-services-modal-dialog{width:min(1280px,calc(100vw - 28px))!important;max-height:min(88dvh,880px)!important;border-radius:30px!important;overflow:hidden!important;border:1px solid rgba(255,255,255,.16)!important;background:linear-gradient(145deg,rgba(7,41,53,.985),rgba(3,27,37,.99))!important;box-shadow:0 38px 120px rgba(0,0,0,.52),inset 0 1px 0 rgba(255,255,255,.13)!important;}
.prospera-services-modal-head{padding:clamp(20px,2.8vw,34px) clamp(20px,3vw,40px)!important;}
.prospera-services-modal-head h2{font-size:clamp(1.75rem,3vw,3.25rem)!important;line-height:.98!important;letter-spacing:-.055em!important;}
.prospera-services-modal-body{grid-template-columns:minmax(250px,.32fr) minmax(0,1fr)!important;}
.prospera-services-modal-category{border-radius:18px!important;min-height:68px!important;}
.prospera-services-modal-services{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:13px!important;}
.prospera-services-modal-service{border-radius:20px!important;min-height:104px!important;}
.prospera-services-modal-close:focus-visible,.prospera-services-modal-category:focus-visible,.prospera-services-modal-service:focus-visible,.prospera-services-modal-view:focus-visible,.prospera-services-modal-cta:focus-visible{outline:2px solid rgba(242,152,97,.85)!important;outline-offset:3px!important;}
@media (max-width:900px){
  .prospera-services-modal{padding:0!important;align-items:stretch!important;}
  .prospera-services-modal-dialog{width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border-left:0!important;border-right:0!important;}
  .prospera-services-modal-body{display:flex!important;flex-direction:column!important;overflow:auto!important;}
  .prospera-services-modal-tabs{position:sticky;top:0;z-index:3;display:flex!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;border-right:0!important;border-bottom:1px solid rgba(255,255,255,.1)!important;background:rgba(4,31,42,.98)!important;padding:12px 14px!important;scroll-snap-type:x proximity;}
  .prospera-services-modal-category{min-width:215px!important;scroll-snap-align:start;}
  .prospera-services-modal-content{overflow:visible!important;padding:18px 14px 24px!important;}
  .prospera-services-modal-panel-head{flex-direction:column!important;align-items:flex-start!important;}
  .prospera-services-modal-services{grid-template-columns:1fr!important;}
  .prospera-services-modal-foot{position:sticky;bottom:0;background:rgba(3,25,34,.96)!important;flex-direction:column;align-items:stretch;}
  .prospera-services-modal-cta{justify-content:center;}
}
@media (max-width:520px){
  .prospera-services-modal-head{padding:18px 14px!important;}
  .prospera-services-modal-head h2{font-size:clamp(1.45rem,8vw,2.15rem)!important;}
  .prospera-services-modal-head p{font-size:.94rem!important;line-height:1.55!important;}
  .prospera-services-modal-close{width:44px!important;height:44px!important;border-radius:14px!important;}
  .prospera-services-modal-service{grid-template-columns:42px minmax(0,1fr)!important;}
  .prospera-services-modal-service>i{display:none!important;}
}

/* Footer — real website footer, not a repeated header */
.site-footer.prospera-footer-v23{padding:clamp(52px,5.8vw,86px) 0 24px!important;background:radial-gradient(circle at 18% 0%,rgba(232,137,87,.09),transparent 30%),linear-gradient(180deg,#07303d 0%,#031d27 48%,#021821 100%)!important;border-top:1px solid rgba(232,137,87,.24)!important;}
.footer-v23-main{grid-template-columns:minmax(260px,1.08fr) minmax(170px,.55fr) minmax(250px,.85fr) minmax(280px,.9fr)!important;gap:clamp(26px,3.3vw,58px)!important;}
.footer-v23-brand p,.footer-v23-services p,.footer-v23-contact-list,.footer-v23-nav a{line-height:1.68!important;}
.footer-v23-logo{width:min(170px,52vw)!important;border-radius:18px!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(255,255,255,.08)!important;}
.footer-v23-logo img{display:block;width:100%!important;height:auto!important;object-fit:contain!important;}
.footer-v23-nav ul{gap:10px!important;}
.footer-v23-nav a{display:inline-flex!important;align-items:center!important;min-height:32px!important;}
.footer-v23-service-pills{gap:8px!important;}
.footer-v23-service-pills a{min-height:34px!important;}
.footer-v23-bottom{padding-top:22px!important;}
.footer-v23-bottom-links{gap:14px!important;}
@media (max-width:1120px){.footer-v23-main{grid-template-columns:1fr 1fr!important;}}
@media (max-width:760px){
  .footer-v23-main{grid-template-columns:1fr!important;gap:28px!important;}
  .footer-v23-actions{display:grid!important;grid-template-columns:1fr!important;}
  .footer-v23-actions a,.footer-v23-services-open{width:100%!important;justify-content:center!important;}
  .footer-v23-bottom{align-items:flex-start!important;flex-direction:column!important;}
  .footer-v23-bottom-links{justify-content:flex-start!important;}
}

/* General visual quality hardening */
a,button{touch-action:manipulation;}
:focus-visible{outline:2px solid rgba(242,152,97,.85);outline-offset:3px;}
img{max-width:100%;height:auto;}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important;}
}
/* Semantic safety for service pages that use detail layouts without a hero H1. */
.detail-content h1{font-size:clamp(2.1rem,4vw,3.1rem);line-height:1.12;margin:0 0 22px;color:var(--navy-primary,#062632);font-family:Montserrat,Inter,Arial,sans-serif;font-weight:900;letter-spacing:-.045em;}
