/* ============================================================
   PROSPERA V27 — Header Mega Menu + Simple Footer Services Modal
   Goal: header Services opens a full luxury mega-menu like the approved
   reference; footer Services opens a simpler, refined category modal.
============================================================ */
:root{
  --p27-deep:#062b36;
  --p27-deeper:#031f28;
  --p27-line:rgba(255,255,255,.13);
  --p27-line-strong:rgba(239,143,90,.36);
  --p27-soft:rgba(255,255,255,.72);
  --p27-muted:rgba(255,255,255,.54);
  --p27-copper:#ef8f5a;
  --p27-copper-2:#d87342;
  --p27-glass:rgba(255,255,255,.055);
  --p27-glass-2:rgba(255,255,255,.085);
  --p27-shadow:0 32px 100px rgba(0,0,0,.38);
}

/* HEADER SERVICES — full premium mega menu */
html body .site-header .nav-dropdown{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
}
html body .site-header .nav-dropdown-link[data-prospera-header-services-open],
html body .site-header .nav-dropdown-toggle[data-prospera-header-services-open]{
  cursor:pointer !important;
}
html body .site-header .nav-dropdown-link[data-prospera-header-services-open][aria-expanded="true"],
html body .site-header .nav-dropdown.mega-open .nav-dropdown-link,
html body .site-header .nav-dropdown.is-services-mega-open .nav-dropdown-link{
  color:#fff !important;
}
html body .site-header .nav-dropdown-toggle[data-prospera-header-services-open] i{
  transition:transform .22s ease,color .22s ease;
}
html body .site-header .nav-dropdown-toggle[data-prospera-header-services-open][aria-expanded="true"] i,
html body .site-header .nav-dropdown.mega-open .nav-dropdown-toggle i,
html body .site-header .nav-dropdown.is-services-mega-open .nav-dropdown-toggle i{
  transform:rotate(180deg) !important;
  color:var(--p27-copper) !important;
}

html body .site-header .services-mega-menu.prospera-header-services-mega-v27,
html body .site-header .nav-dropdown:hover .services-mega-menu.prospera-header-services-mega-v27,
html body .site-header .nav-dropdown:focus-within .services-mega-menu.prospera-header-services-mega-v27,
html body .site-header .nav-dropdown.is-open .services-mega-menu.prospera-header-services-mega-v27{
  display:block !important;
  position:fixed !important;
  left:50% !important;
  right:auto !important;
  top:var(--prospera-header-safe-height, 92px) !important;
  width:min(calc(100vw - 48px), 1760px) !important;
  max-height:calc(100dvh - var(--prospera-header-safe-height, 92px) - 22px) !important;
  overflow:auto !important;
  overscroll-behavior:contain !important;
  z-index:9998 !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
  transform:translateX(-50%) translateY(-8px) !important;
  border-radius:0 0 30px 30px !important;
  border:1px solid rgba(239,143,90,.34) !important;
  border-top:2px solid rgba(239,143,90,.9) !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(239,143,90,.16), transparent 34%),
    radial-gradient(circle at 95% 16%, rgba(255,255,255,.08), transparent 32%),
    linear-gradient(180deg, rgba(6,43,54,.985), rgba(3,31,40,.975)) !important;
  box-shadow:var(--p27-shadow) !important;
  backdrop-filter:blur(24px) saturate(1.12) !important;
  -webkit-backdrop-filter:blur(24px) saturate(1.12) !important;
  transition:opacity .2s ease, transform .24s ease, visibility .2s ease !important;
}
html body .site-header .nav-dropdown.mega-open .services-mega-menu.prospera-header-services-mega-v27,
html body .site-header .nav-dropdown.is-services-mega-open .services-mega-menu.prospera-header-services-mega-v27,
html body .site-header .services-mega-menu.prospera-header-services-mega-v27.is-open{
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
  transform:translateX(-50%) translateY(0) !important;
}
html body .prospera-v27-mega-inner{
  width:100% !important;
  padding:clamp(22px,2.15vw,34px) clamp(22px,2.4vw,40px) 22px !important;
}
html body .prospera-v27-mega-grid{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:0 !important;
}
html body .prospera-v27-mega-col{
  min-width:0 !important;
  padding:0 clamp(16px,1.55vw,28px) !important;
  border-right:1px solid rgba(255,255,255,.105) !important;
}
html body .prospera-v27-mega-col:first-child{padding-left:0 !important;}
html body .prospera-v27-mega-col:last-child{padding-right:0 !important;border-right:0 !important;}
html body .prospera-v27-mega-title{
  display:grid !important;
  grid-template-columns:44px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:start !important;
  padding-bottom:22px !important;
  border-bottom:1px solid rgba(255,255,255,.11) !important;
}
html body .prospera-v27-icon{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;
  color:var(--p27-copper);background:rgba(255,255,255,.075);border:1px solid rgba(239,143,90,.32);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
html body .prospera-v27-mega-title strong{
  display:block;color:#fff;font-weight:950;letter-spacing:.085em;text-transform:uppercase;font-size:clamp(.86rem,.42vw + .72rem,1.05rem);line-height:1.18;
}
html body .prospera-v27-mega-title small{
  display:block;margin-top:7px;color:var(--p27-soft);font-size:.92rem;line-height:1.42;font-weight:650;text-transform:none;letter-spacing:0;
}
html body .prospera-v27-mega-links{
  list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px;
}
html body .prospera-v27-mega-links a{
  min-height:48px;padding:11px 12px;border-radius:14px;display:grid;grid-template-columns:24px minmax(0,1fr) 20px;align-items:center;gap:12px;
  color:rgba(255,255,255,.9);text-decoration:none;font-weight:900;letter-spacing:.01em;
  background:transparent;border:1px solid transparent;transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease;
}
html body .prospera-v27-mega-links a i{color:var(--p27-copper);font-size:.95rem;text-align:center;}
html body .prospera-v27-mega-links a span{white-space:normal;line-height:1.22;}
html body .prospera-v27-mega-links a em{font-style:normal;color:rgba(255,255,255,.48);transition:transform .18s ease,color .18s ease;}
html body .prospera-v27-mega-links a:hover,
html body .prospera-v27-mega-links a:focus-visible{
  color:#fff;background:rgba(255,255,255,.085);border-color:rgba(255,255,255,.13);transform:translateX(3px);outline:0;
}
html body .prospera-v27-mega-links a:hover em,
html body .prospera-v27-mega-links a:focus-visible em{transform:translateX(3px);color:var(--p27-copper);}
html body .prospera-v27-mega-links a.prospera-v27-view{
  display:inline-flex;justify-content:flex-start;width:max-content;max-width:100%;margin-top:8px;padding:12px 0;background:transparent;border:0;border-radius:0;
  color:#fff;text-transform:uppercase;letter-spacing:.16em;font-size:.82rem;
}
html body .prospera-v27-mega-links a.prospera-v27-view:hover{transform:none;color:var(--p27-copper);}
html body .prospera-v27-mega-strip{
  margin-top:clamp(20px,2vw,32px);padding:18px;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:rgba(255,255,255,.052);
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(210px,.9fr);gap:0;align-items:center;
}
html body .prospera-v27-mega-strip a,
html body .prospera-v27-mega-cta{
  min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;align-items:center;padding:8px 18px;text-decoration:none;color:#fff;border-right:1px solid rgba(255,255,255,.11);
}
html body .prospera-v27-mega-strip a i{color:var(--p27-copper);font-size:1.1rem;}
html body .prospera-v27-mega-strip strong{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:.84rem;line-height:1.14;}
html body .prospera-v27-mega-strip small{display:block;margin-top:3px;color:var(--p27-soft);font-size:.82rem;line-height:1.2;}
html body .prospera-v27-mega-cta{display:flex;justify-content:space-between;gap:14px;border-right:0;}
html body .prospera-v27-mega-cta span{font-weight:900;text-transform:uppercase;letter-spacing:.09em;line-height:1.05;color:#fff;}
html body .prospera-v27-mega-cta a{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 20px;border-radius:12px;border:0;background:linear-gradient(135deg,var(--p27-copper),var(--p27-copper-2));box-shadow:0 18px 40px rgba(216,115,66,.26);font-weight:950;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;}

/* FOOTER SERVICES — simple, sophisticated modal, independent from header mega. */
html body #prospera-footer-services-modal.prospera-services-modal{
  position:fixed !important;inset:0 !important;z-index:10020 !important;display:grid !important;place-items:center !important;padding:clamp(14px,2.5vw,34px) !important;
  opacity:0 !important;visibility:hidden !important;pointer-events:none !important;transition:opacity .2s ease,visibility .2s ease !important;
}
html body #prospera-footer-services-modal.prospera-services-modal.is-open{opacity:1 !important;visibility:visible !important;pointer-events:auto !important;}
html body #prospera-footer-services-modal .prospera-services-modal-backdrop{position:absolute;inset:0;background:rgba(0,18,25,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);}
html body #prospera-footer-services-modal .prospera-services-modal-dialog{
  position:relative;width:min(1120px,calc(100vw - 28px)) !important;max-height:min(760px,calc(100dvh - 34px)) !important;overflow:auto !important;border-radius:28px !important;
  border:1px solid rgba(255,255,255,.16) !important;background:linear-gradient(180deg,rgba(8,47,59,.98),rgba(3,31,40,.98)) !important;box-shadow:0 30px 110px rgba(0,0,0,.45) !important;
}
html body #prospera-footer-services-modal .prospera-services-modal-head{padding:24px clamp(20px,3vw,34px) !important;display:flex !important;justify-content:space-between !important;align-items:flex-start !important;gap:18px !important;border-bottom:1px solid rgba(255,255,255,.11) !important;}
html body #prospera-footer-services-modal .prospera-services-modal-head span{color:var(--p27-copper);font-weight:950;text-transform:uppercase;letter-spacing:.14em;font-size:.78rem;}
html body #prospera-footer-services-modal .prospera-services-modal-head h2{margin:8px 0 0;color:#fff;font-size:clamp(1.45rem,1.4vw + 1rem,2.25rem);line-height:1.05;letter-spacing:-.04em;}
html body #prospera-footer-services-modal .prospera-services-modal-head p{margin:10px 0 0;color:var(--p27-soft);max-width:720px;line-height:1.55;}
html body #prospera-footer-services-modal .prospera-services-modal-close{width:46px;height:46px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.075);color:#fff;cursor:pointer;flex:0 0 auto;}
html body #prospera-footer-services-modal .prospera-services-modal-body{display:grid !important;grid-template-columns:minmax(240px,.38fr) minmax(0,1fr) !important;gap:20px !important;padding:clamp(18px,2vw,28px) !important;}
html body #prospera-footer-services-modal .prospera-services-modal-tabs{display:grid !important;gap:10px !important;align-content:start !important;}
html body #prospera-footer-services-modal .prospera-services-modal-category{min-height:62px;border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.045);color:#fff;display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;align-items:center;padding:12px;text-align:left;cursor:pointer;}
html body #prospera-footer-services-modal .prospera-services-modal-category.is-active,
html body #prospera-footer-services-modal .prospera-services-modal-category:hover{background:rgba(255,255,255,.09);border-color:rgba(239,143,90,.34);}
html body #prospera-footer-services-modal .prospera-services-modal-category-icon{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;color:var(--p27-copper);background:rgba(239,143,90,.12);}
html body #prospera-footer-services-modal .prospera-services-modal-category strong{display:block;font-size:.88rem;letter-spacing:.04em;text-transform:uppercase;}
html body #prospera-footer-services-modal .prospera-services-modal-category small{display:block;margin-top:2px;color:var(--p27-soft);font-size:.78rem;}
html body #prospera-footer-services-modal .prospera-services-modal-content{min-width:0;}
html body #prospera-footer-services-modal .prospera-services-modal-panel{border:1px solid rgba(255,255,255,.11);border-radius:22px;background:rgba(255,255,255,.045);padding:clamp(18px,2vw,26px);}
html body #prospera-footer-services-modal .prospera-services-modal-panel[hidden]{display:none !important;}
html body #prospera-footer-services-modal .prospera-services-modal-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1);}
html body #prospera-footer-services-modal .prospera-services-modal-panel-head span{color:var(--p27-copper);font-weight:950;text-transform:uppercase;letter-spacing:.12em;font-size:.76rem;}
html body #prospera-footer-services-modal .prospera-services-modal-panel-head h3{margin:8px 0 4px;color:#fff;font-size:clamp(1.15rem,.8vw + 1rem,1.65rem);}
html body #prospera-footer-services-modal .prospera-services-modal-panel-head p{margin:0;color:var(--p27-soft);line-height:1.45;}
html body #prospera-footer-services-modal .prospera-services-modal-view{flex:0 0 auto;color:#fff;text-decoration:none;font-weight:900;text-transform:uppercase;letter-spacing:.1em;font-size:.78rem;}
html body #prospera-footer-services-modal .prospera-services-modal-services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
html body #prospera-footer-services-modal .prospera-services-modal-service{display:grid;grid-template-columns:38px minmax(0,1fr) 18px;gap:12px;align-items:center;padding:13px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:rgba(255,255,255,.045);text-decoration:none;color:#fff;transition:transform .18s ease,background .18s ease,border-color .18s ease;}
html body #prospera-footer-services-modal .prospera-services-modal-service:hover{transform:translateY(-2px);background:rgba(255,255,255,.08);border-color:rgba(239,143,90,.25);}
html body #prospera-footer-services-modal .prospera-services-modal-service-icon{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:var(--p27-copper);background:rgba(239,143,90,.12);}
html body #prospera-footer-services-modal .prospera-services-modal-service strong{display:block;font-size:.92rem;line-height:1.2;}
html body #prospera-footer-services-modal .prospera-services-modal-service small{display:block;margin-top:3px;color:var(--p27-soft);font-size:.78rem;line-height:1.25;}
html body #prospera-footer-services-modal .prospera-services-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px clamp(20px,3vw,34px);border-top:1px solid rgba(255,255,255,.1);}
html body #prospera-footer-services-modal .prospera-services-modal-foot p{margin:0;color:var(--p27-soft);line-height:1.45;}
html body #prospera-footer-services-modal .prospera-services-modal-cta{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 18px;border-radius:999px;background:linear-gradient(135deg,var(--p27-copper),var(--p27-copper-2));color:#fff;text-decoration:none;font-weight:950;white-space:nowrap;}

/* Footer trigger micro detail */
html body .footer-v26-services-trigger[data-prospera-footer-services-open] i,
html body .footer-v26-bottom-links button[data-prospera-footer-services-open] i{transition:transform .18s ease,color .18s ease;}
html body .footer-v26-services-trigger[data-prospera-footer-services-open]:hover i,
html body .footer-v26-services-trigger[data-prospera-footer-services-open][aria-expanded="true"] i{transform:translateX(2px);color:var(--p27-copper);}

@media (max-width:1320px){
  html body .site-header .services-mega-menu.prospera-header-services-mega-v27{width:calc(100vw - 24px) !important;}
  html body .prospera-v27-mega-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:24px 0 !important;}
  html body .prospera-v27-mega-col:nth-child(3){border-right:0 !important;}
  html body .prospera-v27-mega-col:nth-child(4){padding-left:0 !important;}
  html body .prospera-v27-mega-strip{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px !important;}
  html body .prospera-v27-mega-strip a{border-right:0 !important;}
  html body .prospera-v27-mega-cta{grid-column:1/-1;}
}
@media (max-width:980px){
  html body .site-header .services-mega-menu.prospera-header-services-mega-v27{display:none !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-body{grid-template-columns:1fr !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-tabs{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media (max-width:640px){
  html body #prospera-footer-services-modal.prospera-services-modal{align-items:end !important;padding:0 !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-dialog{width:100% !important;max-height:92dvh !important;border-radius:24px 24px 0 0 !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-head{padding:20px 18px !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-body{padding:16px !important;gap:16px !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-tabs{grid-template-columns:1fr !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-panel-head{display:grid;}
  html body #prospera-footer-services-modal .prospera-services-modal-services{grid-template-columns:1fr !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-foot{display:grid;padding:16px 18px 20px !important;}
  html body #prospera-footer-services-modal .prospera-services-modal-cta{width:100%;}
}
@media (prefers-reduced-motion:reduce){
  html body .site-header .services-mega-menu.prospera-header-services-mega-v27,
  html body #prospera-footer-services-modal.prospera-services-modal,
  html body #prospera-footer-services-modal *{transition:none !important;animation:none !important;}
}
