/* ============================================================
   PARKER SOLUTIONS — LAYOUT
   CSS reset · container · navbar · footer
   Builds on css/base.css
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-1);
  color: var(--fg-2);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   TOP FADE
   Fixed strip across the top of the viewport, behind the floating
   nav (z 49 < nav z 50). Background colour is driven by
   --top-fade-color which js/scroll.js updates to match the
   section currently sitting under the nav. Fades to transparent
   via a mask so the boundary with content below isn't a hard line.
   Colour crossfades smoothly between sections.
   ============================================================ */
:root { --top-fade-color: var(--bg-page); }

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  pointer-events: none;
  z-index: 49;
  background-color: var(--top-fade-color);
  mask-image: linear-gradient(to bottom,
    #000 0%,
    #000 50%,
    rgba(0, 0, 0, 0.65) 70%,
    rgba(0, 0, 0, 0.30) 88%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%,
    #000 50%,
    rgba(0, 0, 0, 0.65) 70%,
    rgba(0, 0, 0, 0.30) 88%,
    transparent 100%);
  transition: background-color 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  padding: 0 32px;
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--nav-shadow);
}
.site-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo-img { height: 2rem; width: auto; max-width: none; flex-shrink: 0; display: block; }
.site-logo-img-dark { display: none; }
.dark .site-logo-img-light { display: none; }
.dark .site-logo-img-dark  { display: block; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  font-family: var(--font-display);
  font-size: 13px; color: var(--text-body);
  text-decoration: none; padding: 6px 12px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}
.site-nav a:hover { color: var(--text-strong); background: rgba(107, 125, 245, 0.12); }
.site-nav a.active { color: var(--parker-primary); background: rgba(107, 125, 245, 0.15); }
.site-actions { display: flex; gap: 10px; align-items: center; }

/* Theme toggle button */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-body);
  transition: all var(--transition-fast);
}
.theme-toggle:hover {
  color: var(--text-strong);
  background: rgba(107, 125, 245, 0.10);
  border-color: rgba(107, 125, 245, 0.35);
}
.theme-toggle svg { width: 16px; height: 16px; }

/* Selector de idioma (ES / EN): mismo aspecto que el botón de tema */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 9px;
  border: 1px solid var(--nav-border); border-radius: 8px;
  color: var(--text-body); text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  transition: all var(--transition-fast);
}
.lang-switch:hover {
  color: var(--text-strong);
  background: rgba(107, 125, 245, 0.10);
  border-color: rgba(107, 125, 245, 0.35);
}
.lang-switch svg { width: 15px; height: 15px; }
.lang-switch-lg { height: 44px; padding: 0 16px; color: #fff; border-color: rgba(255,255,255,.22); font-size: 14px; }
.site-actions .lang-switch-lg { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-emphasis);
  padding: 64px 0 32px;
  margin-top: 96px;
  color: var(--text-on-emphasis-muted);
}
.site-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.site-footer-brand {
  display: flex; flex-direction: column; gap: 14px;
}
.site-footer-tagline {
  font-size: 13px;
  line-height: 1.7;
  max-width: 280px;
}
.site-footer h6, .site-footer .site-footer-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-on-emphasis);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a {
  font-size: 13px;
  color: var(--text-on-emphasis-muted);
  text-decoration: none;
}
.site-footer ul a:hover { color: var(--parker-primary); }
.site-footer-base {
  border-top: 1px solid rgba(107, 125, 245, 0.15);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
  color: var(--text-on-emphasis-soft);
}

@media (max-width: 960px) {
  .site-footer-inner { grid-template-columns: 1fr !important; }
}

/* Submenús de la cabecera (escritorio) */
.nav-drop{ position:relative; display:flex; }
.nav-drop-panel{ position:absolute; top:calc(100% + 6px); left:0; min-width:220px; padding:8px; border-radius:14px; background:var(--bg-surface); border:1px solid var(--border-1); box-shadow:0 18px 40px -18px rgba(20,24,60,.35); display:grid; gap:2px; opacity:0; visibility:hidden; transform:translateY(-4px); transition:opacity .15s ease, transform .15s ease, visibility 0s linear .15s; z-index:80; }
.nav-drop-panel.dos{ grid-template-columns:repeat(2,minmax(190px,1fr)); }
.nav-drop-panel::before{ content:""; position:absolute; left:0; right:0; top:-8px; height:8px; }
.nav-drop:hover .nav-drop-panel, .nav-drop:focus-within .nav-drop-panel{ opacity:1; visibility:visible; transform:none; transition-delay:0s; }
.site-nav .nav-drop-panel a{ display:block; padding:8px 12px; white-space:nowrap; }

/* Menú en una sola línea (con el selector de idioma ya no cabía «Por tu negocio» / «Cómo trabajamos») */
.site-nav a { white-space: nowrap; }
.site-nav, .site-actions { flex-shrink: 0; }
.site-header-inner { gap: 12px; }
@media (max-width: 1320px) {
  .site-nav { gap: 0; }
  .site-nav a { padding: 6px 9px; }
  .site-actions { gap: 8px; }
}

/* Logo a tamaño completo: menú algo más compacto para que todo quepa en una línea */
.site-nav { gap: 0; }
.site-nav a { padding: 6px 9px; }
.site-actions { gap: 8px; }
@media (max-width: 1440px) { .site-nav a { padding: 6px 7px; font-size: 12.5px; } }
