/* Web Systems 3.1 · Header, navegación, cierres y heroes compartidos
 * Este módulo se carga de forma condicional desde functions.php.
 */

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; color: white; border-bottom: 1px solid var(--line-dark); background: rgba(7,9,13,.88); backdrop-filter: blur(18px); }
.header-inner { height: 76px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; }
.brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.main-nav { display: flex; align-items: center; gap: 29px; margin-left: auto; }
.nav-item { position: relative; color: #c4cad4; font-size: 11px; font-weight: 680; }
a.nav-item { display: inline-flex; align-items: center; height: 76px; }
.nav-item:hover, .nav-item:focus-within { color: white; }
.nav-dropdown-toggle { height: 76px; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font-size: 11px; font-weight: 680; }
.nav-dropdown-toggle > span { color: #6f7a8b; font-size: 14px; transition: transform .2s ease; }
.nav-has-menu.is-open .nav-dropdown-toggle > span { transform: rotate(45deg); }
.nav-dropdown { position: absolute; top: 67px; left: 50%; width: 390px; display: grid; gap: 1px; padding: 10px; border: 1px solid var(--line-dark); border-radius: 17px; opacity: 0; visibility: hidden; transform: translate(-50%, 9px); color: white; background: rgba(15,18,25,.98); box-shadow: 0 24px 70px rgba(0,0,0,.45); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.nav-dropdown-small { left: auto; right: -40px; width: 300px; transform: translate(0, 9px); }
.nav-has-menu:hover .nav-dropdown, .nav-has-menu:focus-within .nav-dropdown, .nav-has-menu.is-open .nav-dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-has-menu:hover .nav-dropdown-small, .nav-has-menu:focus-within .nav-dropdown-small, .nav-has-menu.is-open .nav-dropdown-small { transform: translate(0, 0); }
.nav-dropdown > a { min-height: 68px; display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 11px; transition: background .2s ease; }
.nav-dropdown > a:hover { background: #202531; }
.nav-dropdown > a > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #91a8ff; background: rgba(69,101,255,.13); }
.nav-dropdown > a > span { display: grid; gap: 2px; }
.nav-dropdown b { font-size: 11px; }
.nav-dropdown small { color: #828b9a; font-size: 9px; font-weight: 500; }
.nav-dropdown .nav-overview { min-height: 42px; display: flex; justify-content: space-between; grid-template-columns: none; color: #a9b9ff; border-bottom: 1px solid var(--line-dark); border-radius: 8px 8px 4px 4px; font-size: 10px; font-weight: 750; }
.header-cta { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; border: 1px solid rgba(91,124,255,.55); border-radius: 8px; color: white; background: rgba(36,88,255,.13); font-size: 10px; font-weight: 800; }
.menu-button { display: none; margin-left: auto; padding: 0; border: 0; background: none; color: white; }
.menu-close-icon { display: none; }

/* Shared hero details */
.hero-grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: .6; background-image: linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.availability { width: fit-content; display: flex; align-items: center; gap: 8px; margin-bottom: 19px; padding: 7px 10px; border: 1px solid rgba(91,230,143,.22); border-radius: 99px; color: #9ce9b8; background: rgba(57,172,102,.07); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.availability > span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(85,217,139,.11); }

/* Final CTA and footer */
.final-cta { position: relative; overflow: hidden; padding: 112px 0; color: white; text-align: center; background: var(--blue); }
.final-cta:before, .final-cta:after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.final-cta:before { width: 620px; height: 620px; left: -300px; top: -250px; }
.final-cta:after { width: 460px; height: 460px; right: -220px; bottom: -240px; }
.final-cta-inner { position: relative; z-index: 1; max-width: 960px; }
.final-cta h2 { margin: 0; font-size: clamp(42px, 5.3vw, 74px); line-height: .99; letter-spacing: -.06em; }
.final-cta p { max-width: 720px; margin: 24px auto 32px; color: #d9e2ff; font-size: 15px; line-height: 1.7; }
.final-cta .button-row { justify-content: center; }
.footer { padding: 76px 0 25px; color: white; background: #05070a; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, .72fr); gap: 70px; }
.footer-brand > p { max-width: 340px; margin: 22px 0; color: #888f9c; font-size: 12px; line-height: 1.7; }
.footer-status { width: fit-content; display: flex; align-items: center; gap: 8px; color: #79db9e; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.footer-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-column > span { margin-bottom: 8px; color: #67707e; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .13em; }
.footer-column a { color: #acb3be; font-size: 10px; transition: color .2s; }
.footer-column a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; margin-top: 65px; padding-top: 22px; border-top: 1px solid var(--line-dark); color: #626a76; font-size: 8px; }

/* Inner heroes */
.inner-hero, .project-detail-hero, .quote-page-hero, .analysis-page-hero, .contact-page { position: relative; overflow: hidden; color: white; background: #06080c; }
.inner-hero:after, .project-detail-hero:after, .quote-page-hero:after, .analysis-page-hero:after, .contact-page:after { content: ""; position: absolute; width: 650px; height: 650px; right: -180px; top: -220px; border-radius: 50%; background: rgba(36,88,255,.18); filter: blur(110px); }
.inner-hero-layout { position: relative; z-index: 1; min-height: 560px; display: grid; grid-template-columns: .88fr 1.12fr; gap: 85px; align-items: center; padding: 68px 0; }
.inner-hero-copy h1, .compact-hero-copy h1, .projects-hero h1, .project-detail-copy h1, .quote-page-copy h1, .analysis-page-copy h1, .contact-page-copy h1 { margin: 0; font-size: clamp(45px, 5.4vw, 76px); line-height: .98; letter-spacing: -.06em; }
.inner-hero-copy > p, .compact-hero-copy > p, .project-detail-copy > p, .quote-page-copy > p, .analysis-page-copy > p, .contact-page-copy > p { margin: 24px 0 31px; color: #a8b0bd; font-size: 15px; line-height: 1.72; }
.inner-hero-proof { position: relative; z-index: 2; min-height: 75px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: center; border-top: 1px solid var(--line-dark); color: #89929f; font-size: 9px; }
.inner-hero-proof span { display: flex; align-items: center; gap: 8px; }
.inner-hero-proof svg { color: #718dff; }
.compact-hero-copy { position: relative; z-index: 2; max-width: 980px; padding: 108px 0 118px; }
.compact-hero-copy h1 { max-width: 980px; }
.compact-hero-copy > p { max-width: 760px; }

@media (max-width: 1120px) {
  .main-nav { gap: 19px; }
  .header-cta { display: none; }
  .inner-hero-layout { gap: 48px; }
}

@media (max-width: 900px) {
  .menu-button { width: 42px; height: 42px; display: grid; place-items: center; }
  .menu-button[aria-expanded="true"] .menu-open-icon { display: none; }
  .menu-button[aria-expanded="true"] .menu-close-icon { display: block; }
  .main-nav { position: fixed; inset: 76px 0 auto; max-height: calc(100vh - 76px); display: none; overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 16px 21px 28px; border-top: 1px solid var(--line-dark); background: rgba(7,9,13,.99); }
  .main-nav.is-open { display: flex; }
  a.nav-item, .nav-dropdown-toggle { width: 100%; height: 55px; justify-content: space-between; border-bottom: 1px solid var(--line-dark); font-size: 13px; }
  .nav-dropdown { position: static; width: auto; display: none; padding: 5px 0 11px; border: 0; border-radius: 0; opacity: 1; visibility: visible; transform: none !important; background: transparent; box-shadow: none; }
  .nav-has-menu.is-open .nav-dropdown { display: grid; }
  .nav-dropdown > a { min-height: 61px; }
  .nav-dropdown .nav-overview { display: flex; }
  .nav-resources { order: 5; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .inner-hero-layout { min-height: 0; padding: 75px 0 60px; }
  .inner-hero-proof { grid-template-columns: 1fr 1fr; padding: 20px 0; }
}

@media (max-width: 640px) {
  .header-inner { height: 68px; }
  .main-nav { inset: 68px 0 auto; max-height: calc(100vh - 68px); }
  .brand-name { font-size: 9px; }
  .final-cta { padding: 78px 0; }
  .final-cta h2 { font-size: 42px; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .inner-hero-proof { grid-template-columns: 1fr; }
}
