/* =======================
   VARIABLES DE TEMA
======================= */
@keyframes heroZoom {
  from {
    transform: scale(1.1);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

:root {
  --bg: #ffffff;
  --text: #4b3f3f;
  --surface: #f6f1ee;
  --border: #e5dfdb;
  --muted: #4b5563;
}

html.dark {
  --bg: #111827;
  --text: #f9fafb;
  --surface: #1f2937;
  --border: #374151;
  --muted: #d1d5db;
}

/* =======================
   ESTILOS GENERALES
======================= */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

.logo a {
  color: var(--text);
  text-decoration: none;
}

/* =======================
   HERO
======================= */
.hero {
  /* Mantenemos tu imagen pero con scroll fijo para parallax */
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.35)),
    url("https://www.diputacionalicante.es/wp-content/uploads/2017/02/La-Romana-foto-rotonda.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* <--- Esto crea el efecto Parallax */

  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 220px 20px;
  /* Un poco más de aire */
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 2;
}

/* Overlay más oscuro SOLO en modo oscuro */
html.dark .hero::after {
  background: rgba(0, 0, 0, 0.6);
}

.hero-text {
  position: relative;
  z-index: 1;
  animation: heroZoom 1.5s ease-out;
  /* Animación de entrada suave */
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4em;
  /* Más grande para impacto */
  margin-bottom: 10px;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

/* =======================
   CONTENIDO PRINCIPAL
======================= */
.contenido {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px;
  background-color: var(--bg);
  /* 🔑 CLAVE */
}

.contenido-text {
  flex: 1;
  text-align: left;
}

.contenido-text h1 {
  font-size: 1.75rem;
  margin-bottom: 15px;
  text-align: center;
  color: var(--text);
}

.contenido-text p {
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
}

/* =======================
   MAPA
======================= */
.mapa {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.mapa iframe {
  width: 100%;
  max-width: 600px;
  height: 450px;
  border: 0;
  border-radius: 10px;
}

/* Estilo Glassmorphism */
.glass-button {
  /* Fondo blanco muy transparente */
  background: rgba(255, 255, 255, 0.2);
  /* El truco del cristal: desenfoca lo que hay detrás */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Borde fino para dar sensación de cristal */
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Color de la flecha (usando tu color corporativo) */
  color: #b08b60;
}

/* Ajuste para Modo Oscuro */
.dark .glass-button {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b08b60;
}

/* Clase para mostrar el botón */
.glass-button.show {
  opacity: 1;
  visibility: visible;
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 768px) {
  .contenido {
    flex-direction: column;
    text-align: center;
  }

  .mapa {
    justify-content: center;
  }

  .mapa iframe {
    width: 100%;
    height: 300px;
  }
}

/* ===============================
   MODO OSCURO + BOOTSTRAP (DEFINITIVO)
   (deja este bloque al FINAL)
================================ */

/* Bootstrap manda en body con --bs-body-bg, lo alineamos con tu tema */
html.dark {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
}

/* Asegurar fondo/texto siempre desde variables */
body {
  background-color: var(--bg);
  color: var(--text);
}

/* El contenido principal también */
.contenido {
  background-color: var(--bg);
  color: var(--text);
}

/* Hero overlay más oscuro en dark (solo una vez) */
html.dark .hero::after {
  background: rgba(0, 0, 0, 0.65);
}

/* =========================
   FIX FOOTER MODO OSCURO
   (pegar al final)
========================= */

/* En modo oscuro: footer oscuro sí o sí */
html.dark footer {
  background-color: #111827 !important;
  /* o var(--bg) */
  color: #f9fafb !important;
  border-top: 1px solid #374151 !important;
}

/* Si el UL de iconos tiene fondo propio (muy típico en tu footer.css) */
html.dark footer .example-2 {
  background-color: transparent !important;
}

/* El párrafo del copyright (a veces viene con color fijo) */
html.dark footer p {
  color: #f9fafb !important;
}

/* Importante: NO tocar color de los iconos (quedan como tu footer.css los tenga) */
html.dark footer .icon-content a,
html.dark footer .icon-content svg {
  color: inherit;
  /* quita tus reglas de blanco fijo si molestan */
}

/* =========================================
   LOGIN OVERLAY (Iniciar sesión encima)
========================================= */

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.login-overlay.hidden {
  display: none;
}

.login-panel {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 22px;
  position: relative;
}

.login-panel h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 14px 0;
}

.login-panel label {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 12px 0 6px;
  display: block;
}

.login-panel input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.login-panel input:focus {
  border-color: #b08b60;
  box-shadow: 0 0 0 3px rgba(176, 139, 96, 0.25);
}

.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.login-submit {
  flex: 1;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #b08b60;
  color: #fff;
  font-weight: 800;
}

.login-cancel {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.login-close-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
}

/* Evita scroll cuando el overlay está abierto */
body.no-scroll {
  overflow: hidden;
}