/* ─── COMPONENTES GLOBALES — GERNECIO ───────────────────────── */

/* NAV -------------------------------------------------------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition), border-color var(--transition);
}

nav.scrolled {
  border-bottom-color: transparent;
}

nav.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  overflow: visible;
}

/* LOGO ------------------------------------------------------- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  max-height: 36px;
  width: auto;
  max-width: none;
  display: block;
  flex-shrink: 0;
}

/* NAV LINKS -------------------------------------------------- */
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links > li > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-dk);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  display: block;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--brand);
  background: var(--brand-lt);
}

.nav-cta {
  background: var(--brand) !important;
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition) !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--brand-dk) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand) !important;
}

/* DROPDOWN --------------------------------------------------- */
.dropdown { position: relative; }

.dropdown-toggle { cursor: default; }

.dropdown-toggle.active {
  color: var(--brand);
  background: var(--brand-lt);
}

.dropdown-menu a.active {
  background: var(--brand-lt);
  color: var(--brand);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 8px;
  z-index: 200;
}

/* Puente invisible que cubre el gap entre el link y el menú, para
   que el hover no se pierda al bajar el mouse hacia los ítems. */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-dk);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.dropdown-menu a:hover {
  background: var(--brand-lt);
  color: var(--brand);
}

.dropdown-menu .dm-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-menu .dm-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* NAV TOGGLE (mobile) --------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* BUTTONS ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  font-family: var(--sans);
  line-height: 1;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dk);
  border-color: var(--brand-dk);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn-outline-brand {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-brand:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn-dark {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.btn-dark:hover {
  background: var(--gray-dk);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* SECTION HEADERS ------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--brand);
  flex-shrink: 0;
}

.eyebrow--white { color: rgba(255,255,255,0.7); }
.eyebrow--white::before { background: rgba(255,255,255,0.5); }

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--dark);
  margin-bottom: 18px;
}

.section-title--white { color: var(--white); }

.section-desc {
  font-size: 17px;
  color: var(--mid);
  max-width: 600px;
  line-height: 1.8;
}

.section-desc--white { color: rgba(255,255,255,0.72); }

/* CARDS ----------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--brand-lt);
}

/* ICON BOX -------------------------------------------------- */
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.icon-box svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-box--dark { background: rgba(255,255,255,0.1); }
.icon-box--dark svg { stroke: var(--brand); }

/* STAT NUMBERS ---------------------------------------------- */
.stat-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
}

/* DIVIDER ---------------------------------------------------- */
.divider {
  width: 48px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 20px 0 28px;
}

/* INNER PAGE HERO ------------------------------------------- */
.page-hero {
  background: var(--dark-bg);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(30,64,175,0.22) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero .eyebrow { margin-bottom: 18px; }

.page-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 680px;
}

.page-hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.68);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 36px;
}

/* BREADCRUMB ------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 32px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { color: rgba(255,255,255,0.65); }

/* FOOTER ---------------------------------------------------- */
footer {
  background: var(--dark-bg);
  color: rgba(255,255,255,0.6);
}

.footer-top {
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  margin-top: 18px;
  max-width: 300px;
}

.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }

.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--brand); color: var(--white); }

.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* SCROLL REVEAL --------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* RESPONSIVE ------------------------------------------------- */
@media (max-width: 960px) {
  .nav-inner { overflow: hidden; }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 12px;
    z-index: 99;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links > li > a { padding: 12px 16px; }
  .nav-toggle { display: flex; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--light);
    border-radius: var(--radius);
    margin: 4px 0;
    display: block;
  }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
}
