/* ============================== VARIABLES ============================== */
:root {
  --primary: #004a99;
  --primary-dark: #00366d;
  --accent: #ffcf24;
  --gray-50: #f9fafc;
  --gray-100: #f2f4f7;
  --gray-700: #424242;
  --gray-900: #1a1a1a;
  --shadow: 0 4px 12px rgba(0,0,0,.15);
  --radius: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
/* ============================== RESET ============================== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button {
  background: none; border: none; color: inherit; cursor: pointer; font: inherit;
}
/* ============================== TOP BAR ============================== */
.top-bar {
  background: var(--gray-100);
  padding: 8px 24px;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1100;
}
/* ============================== NAV ============================== */
.main-nav {
  position: sticky;
  top: 40px;
  z-index: 1090;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.main-nav .logo { height: 44px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 30px;
  height: 24px;
  z-index: 1301;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  font-weight: 500;
  align-items: center;
}
.nav-links a {
  display: block;
  padding: 8px 4px;
  transition: color 0.25s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.25s;
}
.btn--secondary {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn:hover { background: var(--primary-dark); }
.btn--secondary:hover { background: #f8c513; }

.search-icon {
  font-size: 1.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
}
/* ============================== RESPONSIVE NAV ============================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 32px;
    background: #fff;
    flex-direction: column;
    gap: 14px;
    padding: 20px 28px 28px;
    box-shadow: var(--shadow);
    border-radius: 0 0 var(--radius) var(--radius);
    display: none;
    min-width: 200px;
    max-width: 280px;
    z-index: 1300;
  }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 10px 8px; font-size: 1rem; }
  .btn, .btn--secondary {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 1rem;
  }
  .main-nav .logo { height: 200px; }
}

/* ============================== DARK MODE ============================== */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}
body.dark-mode .hamburger span { background-color: var(--accent); }
body.dark-mode .top-bar,
body.dark-mode .main-nav,
body.dark-mode .footer-social,
body.dark-mode .footer-columns,
body.dark-mode .site-footer,
body.dark-mode .hero,
body.dark-mode .exchange-rates,
body.dark-mode .icons-row {
  background-color: #1e1e1e;
  color: #e0e0e0;
}
body.dark-mode #dark-mode-toggle { color: var(--accent); }

/* =================================================
   EXCHANGE RATES (Cotizaciones)
================================================== */
.exchange-rates {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  padding: 10px 24px;
  background: var(--gray-100);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  flex-wrap: wrap;
  margin-top: 8px;
}

.exchange-rates .currency {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.exchange-rates .rate {
  font-weight: 700;
  color: var(--primary-dark);
  transition: color 0.4s, transform 0.3s;
}

.exchange-rates .rate.updated {
  color: var(--accent);
  transform: scale(1.15);
}

.exchange-rates img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.exchange-rates .rate {
  font-weight: 700;
  color: var(--primary-dark);
}

/* =================================================
   ICONS ROW
================================================== */
.icons-row {
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 16px 8px;
}
.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.icon-card i {
  font-size: 1.4rem;
  color: var(--primary);
}
.icon-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: var(--primary);
}

/* =================================================
   HERO
================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-size: contain;  /* Se adapta la imagen completa dentro del contenedor */
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #00255a; /* o el color que combine con la imagen */
  transition: background-image 1s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}



.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.25));
  z-index: 0;
}
.hero-content {
  color: white;
  z-index: 2;
   position: relative;
  color: white;
}
.hero-content h1 {
  margin: 0 0 12px;
  font-size: 2.25rem;
  font-weight: 700;
}
.hero-content p {
  margin: 0 0 24px;
  font-size: 1.25rem;
}
.dorado {
  color: var(--accent);
}
.hero .btn {
  font-size: 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}


/* =================================================
   SIDE PROMOCIONES
================================================== */
.side-promociones {
  position: fixed;
  top: 40%;
  left: 0;
  background: var(--accent);
  color: var(--gray-900);
  padding: 14px 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 700;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 2px 2px 6px rgba(0,0,0,.3);
  cursor: pointer;
  z-index: 900;
}

.side-promociones:hover {
  background: var(--primary);
}

/* =================================================
   BOTONES FLOTANTES
================================================== */
.floating-buttons {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 950;
}
.floating-buttons img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  object-fit: cover;
  transition: transform 0.25s;
  cursor: pointer;
}
.floating-buttons img:hover {
  transform: scale(1.1);
}

/* =================================================
   FOOTER
================================================== */
.site-footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 48px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.footer-social {
  display: flex;
  gap: 18px;
  font-size: 1.4rem;
}
.footer-social a {
  transition: transform 0.2s, color 0.2s;
}
.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}
.footer-columns {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  text-align: center;
}
.footer-col h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--accent);
}
.footer-col .placeholder {
  opacity: 0.85;
  font-size: 0.95rem;
}
.footer-copy {
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: center;
}

/* =================================================
   RESPONSIVE
================================================== */
@media (max-width: 768px) {
  /* Ya se incluye hamburger y nav-links arriba */
}

@media (max-width: 600px) {
  .exchange-rates {
    flex-direction: column;
    gap: 12px;
  }
}

/* Oculto por defecto */
#chatbot {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  max-height: 400px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
  z-index: 2000;
}

#chatbot.active {
  display: flex;
}

.chatbot-header {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-messages {
  padding: 12px 16px;
  overflow-y: auto;
  flex-grow: 1;
  background: #f5f5f5;
  font-size: 0.9rem;
}

.chatbot-messages .bot-message {
  background: var(--gray-100);
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 16px;
  max-width: 80%;
}

.chatbot-messages .user-message {
  background: var(--primary);
  color: white;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 16px;
  align-self: flex-end;
  max-width: 80%;
}

.chatbot-form {
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid #ddd;
}

.chatbot-form input {
  flex-grow: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 1rem;
  outline-offset: 2px;
}

.chatbot-form button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.25s;
}

.chatbot-form button:hover {
  background: var(--primary-dark);
}

#chatbot-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2001;
  font-size: 1.4rem;
}

#chatbot-toggle:hover {
  background: var(--primary-dark);
}

/* Modo oscuro base */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* Ajusta los fondos y textos de otros elementos */
body.dark-mode header.top-bar,
body.dark-mode nav.main-nav,
body.dark-mode .footer-social,
body.dark-mode .footer-columns,
body.dark-mode .site-footer,
body.dark-mode .hero,
body.dark-mode .exchange-rates,
body.dark-mode .icons-row {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

#dark-mode-toggle {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.3s;
}

body.dark-mode #dark-mode-toggle {
  color: var(--accent);
}

/* =============================
   Mejoras generales para móvil
============================== */
@media (max-width: 480px) {
  /* Reduce padding y márgenes para ahorrar espacio */
  body, .top-bar, .main-nav, .footer-columns, .footer-social {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Top bar: texto más pequeño */
  .top-bar .fecha {
    font-size: 0.75rem;
  }

  /* Nav: muestra hamburguesa y oculta menú por defecto */
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 60px; /* Ajusta para dejar espacio a top-bar */
    left: 0;
    right: 0;
    background: var(--gray-50);
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px;
    box-shadow: var(--shadow);
    border-radius: 0 0 var(--radius) var(--radius);
    display: none;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1300;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    padding: 10px 8px;
    font-size: 1rem;
  }
  .btn, .btn--secondary {
    padding: 10px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }

  /* Logo más pequeño */
  .main-nav .logo {
    height: 36px;
  }

  /* Hero: reduce fuente y altura */
  .hero {
    height: 60vh;
    padding: 0 16px;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .hero .btn {
    font-size: 0.9rem;
  }

  /* Exchange rates: columna */
  .exchange-rates {
    flex-direction: column;
    gap: 12px;
    padding: 8px 12px;
  }

  /* Icons row: ajuste para que no queden tan pequeños */
  .icons-row {
    gap: 12px;
    padding: 12px 8px;
  }
  .icon-card {
    font-size: 0.75rem;
  }
  .icon-card i {
    font-size: 1.1rem;
  }

  /* Footer: más compactos */
  .footer-columns {
    gap: 16px;
  }
  .footer-social {
    gap: 12px;
    font-size: 1.1rem;
  }
  .footer-copy {
    font-size: 0.75rem;
  }

  /* Chatbot: tamaño más pequeño y botón menos intrusivo */
  #chatbot {
    width: 280px;
    max-height: 350px;
    bottom: 70px;
    right: 12px;
  }
  #chatbot-toggle {
    width: 42px;
    height: 42px;
    bottom: 12px;
    right: 12px;
    font-size: 1.2rem;
  }

  /* Side promociones: no mostrar en móviles */
  .side-promociones {
    display: none;
  }
}

/* === PERFIL ===================================== */
.perfil-card {
  max-width: 480px;
  margin: 60px auto;
  padding: 32px 28px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.perfil-card h2 {
  margin-top: 0;
  color: var(--primary);
}

.datos-perfil {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
  font-size: 1rem;
}

.datos-perfil li {
  margin-bottom: 10px;
}

.datos-perfil strong {
  color: var(--primary-dark);
}

/* ==== PANEL DE PROMOCIONES ==== */
.promociones-panel {
  position: fixed;
  top: 0;
  left: -100%; /* Oculto inicialmente a la izquierda */
  width: 360px;
  height: 100vh;
  background: #ffffff;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  transition: left 0.4s ease;
  z-index: 2000; /* Encima de menú */
  overflow-y: auto;
  padding: 25px 20px;
  border-right: 5px solid var(--accent);
}

.promociones-panel.abierto {
  left: 0;
}

.promociones-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.promociones-header h2 {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

.promociones-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color 0.3s ease;
}

.promociones-header button:hover {
  color: #cc0000;
}

.promociones-contenido {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.promo {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.promo:hover {
  transform: translateY(-3px);
}

.promo img {
  width: 100%;
  height: auto;
  display: block;
}

.promo p {
  padding: 12px 15px;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}

/* ==== BOTÓN LATERAL (IZQUIERDA) ==== */
.side-promociones {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 1999;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
  transition: background 0.3s ease;
}

.side-promociones:hover {
  background: var(--primary);
}

/* Formulario búsqueda estilo profesional */
.search-form {
  position: absolute;
  top: 110%;
  right: 20px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  display: none;
  width: 280px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  font-family: 'Inter', sans-serif;
}

/* Mostrar el formulario con transición */
.search-form.active {
  display: flex;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
}

/* Input del buscador */
#search-input {
  flex: 1;
  border: 1.5px solid #004a99;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 1rem;
  color: #00366d;
  outline: none;
  transition: border-color 0.3s ease;
  font-weight: 500;
}

#search-input:focus {
  border-color: #ffcf24;
  box-shadow: 0 0 6px #ffcf24aa;
}

/* Botón del formulario */
.search-form button {
  background-color: #004a99;
  border: none;
  color: #fff;
  padding: 9px 16px;
  margin-left: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: #00366d;
}

/* Ícono dentro del botón */
.search-form button i {
  font-size: 1.1rem;
}

/* Para que no se vea scroll horizontal si el input es muy largo */
.search-form {
  overflow: hidden;
}

.search-icon {
  background: transparent;
  border: none;
  color: #004a99;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 6px 10px;
  transition: color 0.3s ease;
}

.search-icon:hover {
  color: #ffcf24;
}











