/* ==========================================================================
   1. VARIABLES Y COLORES CORPORATIVOS SCAMAS
   ========================================================================== */
:root {
  --scamas-blue-dark: #1A2E3C;
  --scamas-blue-medium: #2C4A5D;
  --scamas-orange: #D35400;
  --scamas-beige: #F5DEB3;
  --scamas-bg-light: #FFFFFF;

  /* Sobrescribimos variables de Simple.css */
  --bg: var(--scamas-bg-light);
  --text: var(--scamas-blue-dark);
  --accent: var(--scamas-orange);
  --sans-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   2. ESTILOS GENERALES Y SCROLL
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans-font);
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-bottom: 130px; /* Espacio para el footer fijo en escritorio */
}

#contact {
  scroll-margin-top: 2rem;
}

/* ==========================================================================
   3. HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
  text-align: center;
  padding: 1.5rem 0;
  background-color: #010303;
  position: relative;
}

.header-lang-selector {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.9rem;
}

.header-lang-selector a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-lang-selector a:hover {
  color: var(--scamas-orange);
}

.header-logo-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.menu-toggle {
  display: none; /* Se activa solo en móvil */
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
}

#main-nav ul {
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nav-link:hover {
  color: var(--scamas-orange);
  background-color: rgba(211, 84, 0, 0.1);
}

/* ==========================================================================
   4. HERO Y SECCIONES
   ========================================================================== */
.hero {
  background: linear-gradient(to right, var(--scamas-blue-dark), var(--scamas-blue-medium));
  color: var(--scamas-beige);
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.section-bg {
  background-color: #fafafa;
  padding: 2.5rem 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
}

/* ==========================================================================
   5. BOTONES Y UTILIDADES
   ========================================================================== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--scamas-beige);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.2s;
}

.btn:hover {
  background: #b34700;
  color: var(--scamas-beige);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   6. PDF RESPONSIVE
   ========================================================================== */
.pdf-preview-desktop {
  display: block;
  margin-top: 1.5rem;
}

.pdf-download-mobile {
  display: none;
  text-align: center;
  margin-top: 1.5rem;
}
/* ==========================================================================
   7. FOOTER FIJO INFERIOR (Versión Slim - 2 columnas forzadas)
   ========================================================================== */

body {
  padding-bottom: 80px;
}

.footer-fijo {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(26, 46, 60, 0.85);
  color: var(--scamas-beige);
  z-index: 9990;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  border-top: 2px solid var(--scamas-orange);
  padding: 0.6rem 1.5rem;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* FORZAR UNA SOLA LÍNEA HORIZONTAL */
.footer-content {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important; /* Prohibido saltar de línea */
  justify-content: space-between !important;
  align-items: center !important;
  gap: 2rem !important;
  max-width: 1200px;
  margin: 0 auto;
}

/* Columna IZQUIERDA: Selector (no se encoge) */
.footer-left {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-shrink: 0 !important;
}

/* Columna DERECHA: Dirección + Scroll */
.footer-right {
  display: flex !important;
  flex-direction: row !important; /* Forzar fila también aquí */
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 2rem !important;
  flex-shrink: 1 !important;
}

.footer-link {
  color: var(--scamas-beige);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  opacity: 1;
  transition: all 0.2s ease;
  white-space: nowrap !important; /* Prohibido que el texto salte de línea en escritorio */
  font-weight: 500;
}

.footer-link:hover {
  opacity: 1;
  color: var(--scamas-orange);
}

.selector-locales {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 0.25rem;
  gap: 0.25rem;
  flex-shrink: 0;
}

.local-btn {
  padding: 0.4rem 1.2rem;
  color: var(--scamas-beige);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  white-space: nowrap !important;
}

.local-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.local-activo {
  background: var(--scamas-orange);
  color: white;
  font-weight: 700;
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVE UNIFICADO)
   ========================================================================== */

/* MÓVIL: Diseño horizontal compacto */
@media (max-width: 768px) {
  /* Ajustes generales de cuerpo y secciones */
  body {
    padding: 0;
    max-width: 100%;
    padding-bottom: 110px; /* Aumentado por si el texto ocupa 2 líneas */
  }

  .hero,
  .section-bg {
    margin: 0;
    border-radius: 0;
    padding: 2rem 1rem;
  }

  .hero {
    margin-top: 0.5rem;
    padding: 3rem 1rem;
  }

  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.1rem; }

  /* Header y menú en móvil */
  .site-header {
    padding: 1rem 0;
  }

  .header-logo-link img {
    width: 100px;
    height: 100px;
  }

  .menu-toggle {
    display: block !important;
  }

  #main-nav ul {
    display: none !important;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
  }

  #main-nav ul.active {
    display: flex !important;
  }

  /* PDF en móvil */
  .pdf-preview-desktop {
    display: none;
  }

  .pdf-download-mobile {
    display: block;
  }

  /* Footer fijo compacto en móvil - HORIZONTAL */
  .footer-fijo {
    padding: 0.5rem 0.8rem;
    background-color: rgba(26, 46, 60, 0.95); /* Casi opaco para legibilidad */
  }

  .footer-content {
    flex-direction: row !important; /* Forzar horizontal */
    flex-wrap: nowrap !important; /* Prohibido que el contenedor salte de línea */
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  .footer-left {
    justify-content: flex-start !important;
    flex-shrink: 0 !important; /* El selector no se encoge */
  }

  .footer-right {
    flex-direction: row !important; /* Dirección y scroll en la misma línea */
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
    flex-shrink: 1 !important;
  }

  /* AQUÍ ESTÁ EL CAMBIO CLAVE: Permitir que el TEXTO salte de línea */
  .footer-link {
    font-size: 0.7rem !important; 
    white-space: normal !important; /* PERMITIR salto de línea en móvil */
    gap: 0.2rem !important;
    text-align: center; /* Centrar texto si ocupa 2 líneas */
    line-height: 1.2; /* Mejor legibilidad en 2 líneas */
  }

  .selector-locales {
    padding: 0.15rem !important;
    gap: 0.15rem !important;
  }

  .local-btn {
    padding: 0.25rem 0.6rem !important; /* Botones muy compactos */
    font-size: 0.7rem !important;
    white-space: nowrap !important; /* Los botones SÍ se mantienen en 1 línea */
  }
}

/* ESCRITORIO */
@media (min-width: 769px) {
  body {
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .hero,
  .section-bg {
    border-radius: 8px;
    margin: 2rem 0;
  }
}