/* ============================================================
   PUBLIC LAYOUT — estilos compartidos por TODAS las páginas públicas
   (topstrip, header, mobile drawer, footer).
   Tokens (--ecm-*) viven en refresh-system.css; acá se alias en
   nombres cortos (--ink-*, --brand-*) para compatibilidad con el
   mockup base.
   ============================================================ */

:root {
  --ink-900: var(--ecm-ink-900); --ink-800: var(--ecm-ink-800);
  --ink-600: var(--ecm-ink-600); --ink-500: var(--ecm-ink-500);
  --ink-400: var(--ecm-ink-400); --ink-200: var(--ecm-ink-200);
  --ink-100: var(--ecm-ink-100); --ink-50:  var(--ecm-ink-50);
  --brand-700: var(--ecm-brand-700); --brand-600: var(--ecm-brand-600);
  --brand-500: var(--ecm-brand-500); --brand-100: var(--ecm-brand-100);
  --brand-50:  var(--ecm-brand-50);
  --mint-700: var(--ecm-mint-700); --mint-600: var(--ecm-mint-600);
  --mint-500: var(--ecm-mint-500); --mint-50:  var(--ecm-mint-50);
  --amber-500: var(--ecm-amber-500);
  --shadow-sm: var(--ecm-shadow-sm); --shadow-md: var(--ecm-shadow-md);
  --shadow-lg: var(--ecm-shadow-lg); --shadow-xl: var(--ecm-shadow-xl);
  --radius-sm: var(--ecm-radius-sm); --radius-md: var(--ecm-radius-md);
  --radius-lg: var(--ecm-radius-lg); --radius-xl: var(--ecm-radius-xl);
  --radius-full: var(--ecm-radius-full);
}

/* ===== TOP STRIP ===== */
.topstrip{background:var(--ink-900);color:var(--ink-400);font-size:12.5px;padding:8px 0}
.topstrip-inner{max-width:1440px;margin:0 auto;padding:0 32px;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 20px}
.topstrip-info{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;min-width:0}
.topstrip-info span{display:inline-flex;align-items:center;gap:6px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topstrip-info .material-symbols-outlined{font-size:16px}
.topstrip-socials{display:flex;gap:8px}
.topstrip-socials a{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);transition:background .15s;color:#fff}
.topstrip-socials a:hover{background:var(--brand-600);color:#fff}
.topstrip-socials svg{width:12px;height:12px;fill:currentColor}

/* ===== HEADER ===== */
.header-refresh{background:#fff;border-bottom:1px solid var(--ink-200);position:sticky;top:0;z-index:100;backdrop-filter:saturate(180%) blur(8px);background:rgba(255,255,255,.95)}
.header-refresh .header-inner{max-width:1440px;margin:0 auto;padding:18px 32px;display:flex;align-items:center;justify-content:space-between;gap:32px}
.header-refresh .logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px;letter-spacing:-.02em;color:var(--ink-900)}
.header-refresh .logo img{height:40px;width:auto;object-fit:contain;object-position:left center}
.header-refresh .logo-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--brand-600),#5e94f5);display:grid;place-items:center;color:#fff;font-size:18px;font-weight:700}
.header-refresh .nav{display:flex;gap:28px;align-items:center}
.header-refresh .nav > a{color:var(--ink-600);font-weight:500;font-size:14.5px;transition:color .15s;display:inline-flex;align-items:center;gap:4px;text-decoration:none}
.header-refresh .nav > a:hover{color:var(--ink-900)}
.header-refresh .nav .material-symbols-outlined{font-size:18px}
.header-refresh .nav-cta{padding:10px 20px;background:var(--ink-900);color:#fff !important;border-radius:var(--radius-full);font-weight:600;font-size:14px}
.header-refresh .nav-cta:hover{background:var(--ink-800);color:#fff !important;transform:translateY(-1px);box-shadow:var(--shadow-md)}

/* ===== MEGAMENÚS DESKTOP ===== */
.header-refresh .nav-item{position:relative}
.header-refresh .nav-item > a{color:var(--ink-600);font-weight:500;font-size:14.5px;transition:color .15s;display:inline-flex;align-items:center;gap:4px;text-decoration:none;padding:8px 0;cursor:pointer}
.header-refresh .nav-item > a:hover{color:var(--ink-900)}
.header-refresh .nav-item > a .material-symbols-outlined{font-size:18px;transition:transform .2s}
.header-refresh .nav-item.has-megamenu:hover > a .material-symbols-outlined,
.header-refresh .nav-item.has-megamenu:focus-within > a .material-symbols-outlined{transform:rotate(180deg)}
.header-refresh .nav-item.has-megamenu::after{content:"";position:absolute;top:100%;left:-20px;right:-20px;height:16px;z-index:1}
.header-refresh .megamenu{position:absolute;top:100%;left:50%;margin-top:12px;background:#fff;border:1px solid var(--ink-200);border-radius:var(--radius-lg);box-shadow:var(--shadow-xl);padding:28px;opacity:0;visibility:hidden;transform:translateX(-50%) translateY(8px);transition:opacity .2s,transform .2s,visibility .2s;z-index:50}
.header-refresh .nav-item.has-megamenu:hover .megamenu,
.header-refresh .nav-item.has-megamenu:focus-within .megamenu{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.header-refresh .megamenu--4col{min-width:720px;display:grid;grid-template-columns:repeat(4,1fr);gap:28px}
.header-refresh .megamenu--2col{min-width:440px;display:grid;grid-template-columns:repeat(2,1fr);gap:28px}
.header-refresh .megamenu-col h5{font-size:11px;font-weight:700;color:var(--brand-600);text-transform:uppercase;letter-spacing:.08em;margin:0 0 12px}
.header-refresh .megamenu-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.header-refresh .megamenu-col a{font-size:14px;color:var(--ink-600);transition:color .15s;text-decoration:none;display:block;padding:2px 0}
.header-refresh .megamenu-col a:hover{color:var(--brand-600)}

/* ===== HAMBURGUESA (solo mobile) ===== */
.mobile-menu-toggle{display:none;background:none;border:none;padding:8px;color:var(--ink-900);cursor:pointer;line-height:0}
.mobile-menu-toggle:hover{color:var(--brand-600)}
.mobile-menu-toggle .material-symbols-outlined{font-size:28px}

/* ===== MOBILE DRAWER ===== */
.mobile-drawer-backdrop{position:fixed;inset:0;background:rgba(11,18,32,.5);opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s;z-index:200}
.mobile-drawer-backdrop.is-open{opacity:1;visibility:visible}
.mobile-drawer{position:fixed;top:0;right:0;bottom:0;width:min(360px,88vw);background:#fff;z-index:201;transform:translateX(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;overflow-y:auto;box-shadow:var(--shadow-xl)}
.mobile-drawer.is-open{transform:translateX(0)}
.mobile-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--ink-100);flex-shrink:0}
.mobile-drawer-header .logo{display:flex;align-items:center;gap:10px;font-weight:800;color:var(--ink-900);text-decoration:none}
.mobile-drawer-header .logo img{height:36px;width:auto}
.mobile-drawer-close{background:none;border:none;color:var(--ink-800);cursor:pointer;padding:8px;border-radius:var(--radius-sm);line-height:0}
.mobile-drawer-close:hover{background:var(--ink-50)}
.mobile-drawer-close .material-symbols-outlined{font-size:24px}
.mobile-nav{flex:1;padding:12px 0;display:flex;flex-direction:column}
.mobile-nav > a,
.mobile-nav > details > summary{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;font-size:16px;color:var(--ink-800);font-weight:500;text-decoration:none;cursor:pointer;transition:background .15s;list-style:none;border:none;background:none;font-family:inherit;width:100%;text-align:left}
.mobile-nav > a:hover,
.mobile-nav > details > summary:hover{background:var(--ink-50)}
.mobile-nav > details > summary::-webkit-details-marker{display:none}
.mobile-nav > details > summary::marker{display:none;content:""}
.mobile-nav > details[open] > summary{background:var(--ink-50)}
.mobile-nav > details[open] > summary .material-symbols-outlined{transform:rotate(180deg)}
.mobile-nav > details > summary .material-symbols-outlined{font-size:20px;color:var(--ink-500);transition:transform .2s}
.mobile-nav-submenu{padding:4px 20px 12px;display:flex;flex-direction:column;gap:2px;background:var(--ink-50)}
.mobile-submenu-section{margin-top:10px}
.mobile-submenu-section:first-child{margin-top:0}
.mobile-submenu-section h6{font-size:11px;font-weight:700;color:var(--brand-600);text-transform:uppercase;letter-spacing:.08em;margin:0 0 6px;padding:0 12px}
.mobile-nav-submenu a{display:block;padding:8px 12px;font-size:14px;color:var(--ink-600);text-decoration:none;border-radius:var(--radius-sm)}
.mobile-nav-submenu a:hover{background:#fff;color:var(--ink-900)}
.mobile-cta{display:block !important;margin:20px;padding:14px 20px !important;background:var(--ink-900) !important;color:#fff !important;border-radius:var(--radius-full) !important;font-weight:600 !important;text-align:center;text-decoration:none}
.mobile-cta:hover{background:var(--ink-800) !important}
.mobile-drawer-contact{padding:20px;border-top:1px solid var(--ink-100);display:flex;flex-direction:column;gap:10px;background:var(--ink-50);flex-shrink:0}
.mobile-drawer-contact a{display:flex;align-items:center;gap:10px;color:var(--ink-600);font-size:14px;text-decoration:none}
.mobile-drawer-contact .material-symbols-outlined{font-size:18px;color:var(--brand-600)}

/* ===== FOOTER ===== */
.footer-refresh{background:var(--ink-900);color:var(--ink-400);padding:80px 0 0}
.footer-refresh .footer-inner{max-width:1440px;margin:0 auto;padding:0 32px}
.footer-refresh .footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1.2fr;gap:48px;padding-bottom:60px;border-bottom:1px solid rgba(255,255,255,.08)}
.footer-refresh .footer-brand .logo{color:#fff;margin-bottom:16px}
.footer-refresh .footer-brand p{font-size:14px;line-height:1.6;margin-bottom:20px}
.footer-refresh .footer-socials{display:flex;gap:10px}
.footer-refresh .footer-socials a{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.08);display:grid;place-items:center;color:#fff;transition:background .15s}
.footer-refresh .footer-socials a:hover{background:var(--brand-600)}
.footer-refresh .footer-socials svg{width:15px;height:15px;fill:currentColor}
.footer-refresh h4,.footer-refresh .footer-titulo{color:#fff;font-size:14px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;margin-bottom:20px}
.footer-refresh ul{list-style:none;margin:0;padding:0}
.footer-refresh li{margin-bottom:10px}
.footer-refresh a{color:inherit;text-decoration:none;transition:color .15s}
.footer-refresh a:hover{color:#fff}
.footer-refresh .logo{text-decoration:none}
.footer-cta-box{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:var(--radius-md);padding:20px}
.footer-cta-box h5,.footer-cta-box .footer-cta-titulo{color:#fff;font-size:15px;font-weight:700;margin-bottom:8px}
.footer-cta-box p{font-size:13px;line-height:1.5;margin-bottom:14px}
.footer-cta-btn{display:inline-flex;align-items:center;gap:6px;padding:10px 18px;background:var(--brand-600);color:#fff !important;border-radius:var(--radius-full);font-weight:600;font-size:13px;transition:all .15s}
.footer-cta-btn:hover{background:var(--brand-500);transform:translateY(-1px)}
.footer-bottom{padding:24px 0;text-align:center;font-size:13px;color:var(--ink-500);display:flex;flex-direction:column;gap:6px;align-items:center}
.footer-bottom-links{display:inline-flex;gap:14px;flex-wrap:wrap;justify-content:center}
.footer-bottom-links a{color:var(--ink-500);text-decoration:none;border-bottom:1px solid transparent;transition:border-color .15s,color .15s}
.footer-bottom-links a:hover{color:#fff;border-bottom-color:rgba(255,255,255,.4)}

/* ===== RESPONSIVE: reglas que afectan solo al layout compartido ===== */
@media (max-width: 1024px) {
  .header-refresh .nav{display:none}
  .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center}
  .topstrip-inner,
  .header-refresh .header-inner,
  .footer-refresh .footer-inner{padding-left:20px;padding-right:20px}
  .footer-refresh .footer-grid{grid-template-columns:1fr 1fr;gap:32px}
  .header-refresh .logo img{max-width:140px}
}
@media (max-width: 640px) {
  .footer-refresh .footer-grid{grid-template-columns:1fr}
  .topstrip-info span:not(:first-child){display:none}
  .topstrip-info{max-width:60vw}
  .topstrip-socials{flex-wrap:wrap;justify-content:flex-end}
  .header-refresh .header-inner{padding-top:12px;padding-bottom:12px}
  .header-refresh .header-inner .logo img{max-width:190px;height:48px}
}

/* Cambio 23: antes venía en menu.css (template 2019, retirado). */
object, embed, video { max-width: 100%; }

/* Cambio 23: títulos del pie como h2/h3 (orden de encabezados); mismo aspecto que los h4/h5 de antes. */
.footer-refresh .footer-titulo, .footer-refresh .footer-cta-titulo { color: #fff !important; }

/* Header fijo en escritorio: #page{overflow:hidden} (style.css) anulaba el sticky.
   overflow-x:clip recorta igual sin crear contenedor de scroll. */
@media (min-width: 641px) {
  #page { overflow: visible; overflow-x: clip; }
}
