/* =====================
   ESTILOS BASE - SEGUROS AGS
   ===================== */

/* Fuentes mágicas */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;500;700&display=swap');

:root {
  --color-primario: #ff6b00;
  --color-secundario: #000000;
  --color-fondo: #ffffff;
  --color-texto: #1a1a1a;
  --color-magico: #ff9f1c;
  --sombra: 0 4px 16px rgba(0, 0, 0, 0.1);
  --borde: 1px solid #eaeaea;
  --radio: 12px;
  --transicion: all 0.3s ease-in-out;
}

body {
  font-family: 'Rubik', sans-serif;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

header {
  background: linear-gradient(to right, var(--color-primario), var(--color-magico));
  padding: 1rem 2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--sombra);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transicion);
}

nav a:hover {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Carrusel animado */
.carrusel {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 1rem;
}

.carrusel img {
  width: 100%;
  height: auto;
  animation: deslizar 20s infinite linear;
}

@keyframes deslizar {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Botones flotantes */
.boton-gandalf, .boton-camila {
  position: fixed;
  bottom: 2rem;
  padding: 1rem 1.5rem;
  color: #fff;
  background-color: var(--color-primario);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  cursor: pointer;
  font-weight: bold;
  animation: brillar 3s infinite alternate;
  z-index: 999;
}

.boton-gandalf {
  right: 2rem;
}

.boton-camila {
  right: 12rem;
  background-color: #3d5afe;
}

@keyframes brillar {
  from { transform: scale(1); opacity: 0.85; }
  to { transform: scale(1.05); opacity: 1; }
}

/* Contadores visuales */
.contadores {
  display: flex;
  justify-content: space-around;
  margin: 3rem 0;
  text-align: center;
}

.contador {
  background-color: #f9f9f9;
  border: var(--borde);
  border-radius: var(--radio);
  padding: 2rem;
  box-shadow: var(--sombra);
  transition: var(--transicion);
}

.contador:hover {
  transform: scale(1.05);
  background-color: #fffaf3;
}

.contador span {
  display: block;
  font-size: 2.5rem;
  color: var(--color-primario);
  font-weight: bold;
}

footer {
  background-color: var(--color-secundario);
  color: #fff;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  border-top: 4px solid var(--color-primario);
}

footer a {
  color: var(--color-magico);
  text-decoration: underline;
}

/* BONUS: Modo noche automático */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111;
    color: #eee;
  }
  header, .boton-gandalf, .boton-camila {
    background-color: #222;
  }
  .contador {
    background-color: #1a1a1a;
    color: #fff;
  }
}
/* Día */
.tema-dia {
  --fondo-principal: #ffffff;
  --texto-principal: #111111;
  --color-primario: #f37021;
  --fondo-menu: linear-gradient(to right, #f37021, #ffae00);
}

/* Noche */
.tema-noche {
  --fondo-principal: #111111;
  --texto-principal: #ffffff;
  --color-primario: #f37021;
  --fondo-menu: linear-gradient(to right, #222, #444);
}

/* Temporada (ejemplo: Halloween 🎃) */
.tema-temporada {
  --fondo-principal: #2c1a0f;
  --texto-principal: #ff9900;
  --color-primario: #ff6600;
  --fondo-menu: linear-gradient(to right, #4b1e00, #000);
}

/* Aplicación general */
body {
  background: var(--fondo-principal);
  color: var(--texto-principal);
  transition: background 0.5s ease, color 0.5s ease;
}

nav {
  background: var(--fondo-menu);
  transition: background 0.5s ease;
}

button, .boton, .burbuja {
  background-color: var(--color-primario);
  color: white;
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

button:hover, .boton:hover, .burbuja:hover {
  transform: scale(1.05);
}
.modal-chat {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-contenido {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: 400px;
  height: 600px;
  position: relative;
  box-shadow: 0 0 30px rgba(255,165,0,0.7);
  animation: aparecer 0.4s ease;
}

.modal-contenido iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.cerrar {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #ff6b00;
  font-weight: bold;
  z-index: 10001;
}

@keyframes aparecer {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
#particulas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Muy importante */
  pointer-events: none;
}
.menu-principal {
  background: var(--fondo-menu);
  padding: 1rem 2rem;
  box-shadow: var(--sombra);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.menu-principal ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.menu-principal ul li {
  position: relative;
}

.menu-principal ul li ul.submenu {
  position: absolute;
  top: 2rem;
  left: 0;
  background: var(--color-primario);
  display: none;
  flex-direction: column;
  padding: 1rem;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  z-index: 1000;
}

.menu-principal ul li:hover ul.submenu {
  display: flex;
}

.menu-principal a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

/* Burbuja flotante */
.flotante-gandalf, .flotante-camila {
  position: fixed;
  bottom: 2rem;
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--sombra);
  animation: brillar 3s infinite alternate;
  z-index: 999;
}

.flotante-gandalf {
  right: 2rem;
  background-color: var(--color-primario);
}

.flotante-camila {
  right: 13rem;
  background-color: #3d5afe;
}
.contenido {
  position: relative;
  z-index: 10;
  padding: 2rem;
}
body:hover {
  --x: calc((var(--mouse-x, 0.5) - 0.5) * 30px);
  --y: calc((var(--mouse-y, 0.5) - 0.5) * 30px);
}

.contador:hover {
  transform: translate3d(var(--x), var(--y), 0) scale(1.05);
  box-shadow: 0 0 40px rgba(255, 107, 0, 0.5);
}
.logo {
  width: 100px;        /* antes era sin límite */
  max-width: 100%;
  margin: 20px auto 10px;
  display: block;
}
header {
  text-align: center;
  padding-top: 20px;
  z-index: 10;
  position: relative;
}
/* Header en formato flexible */
.encabezado-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px;
  background: linear-gradient(to right, #ff6a00, #ffa800);
  position: relative;
  z-index: 10;
}

/* Logo */
.logo {
  width: 120px;
  height: auto;
}

/* Menú principal */
.menu-principal ul {
  display: flex;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-principal li {
  position: relative;
}

.menu-principal a {
  color: white;
  text-decoration: none;
  padding: 10px;
  display: block;
  font-weight: 600;
}

/* Submenú */
.menu-principal li:hover > .submenu {
  display: block;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #000;
  padding: 0;
  min-width: 180px;
  z-index: 99;
}

.submenu li {
  border-bottom: 1px solid #333;
}

.submenu a {
  color: #fff;
  padding: 10px;
  display: block;
}

.submenu a:hover {
  background: #ff6a00;
}

/* Selector de tema */
.tema-selector {
  margin-left: auto;
  display: flex;
  align-items: center;
  color: white;
}

.tema-selector label {
  margin-right: 8px;
  font-weight: bold;
}
/* HEADER GENERAL */
.header {
  width: 100%;
  background: linear-gradient(to right, #f80, #f60);
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 999;
  position: relative;
}

/* Contenedor central */
.header-container {
  max-width: 1400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo a la izquierda */
.logo img {
  height: 60px;
  margin-right: 20px;
}

/* Menú principal */
.nav .menu {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu li a {
  text-decoration: none;
  padding: 10px 16px;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.3s;
}

.menu li a:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Submenú */
.has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  padding: 8px 0;
  border-radius: 10px;
  display: none;
  flex-direction: column;
  min-width: 180px;
  z-index: 1000;
}

.has-submenu:hover .submenu {
  display: flex;
}

/* Botones de submenú */
.submenu li a {
  padding: 12px 20px;
  color: #fff;
  display: block;
  width: 100%;
  transition: background 0.3s, transform 0.2s;
}

.submenu li a:hover {
  background-color: #f80;
  transform: scale(1.05);
  border-radius: 6px;
}

/* Selector de tema (derecha) */
.tema-selector {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
}
.has-submenu {
  padding-bottom: 10px; /* espacio fantasma debajo */
}
/* --- SUBMENÚ: APARIENCIA --- */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  display: none;
  flex-direction: column;
  min-width: 200px;
  padding: 8px 0;
  border-radius: 10px;
  z-index: 1000;
  overflow: hidden; /* ✅ evita que la animación se salga */
}

/* --- SUBMENÚ: ACTIVACIÓN --- */
.has-submenu {
  position: relative;
  padding-bottom: 10px; /* fantasma para mantenerlo abierto si el mouse roza abajo */
}

.has-submenu:hover .submenu {
  display: flex;
  animation: fadeSlide 0.3s ease-in-out forwards;
}

/* --- ANIMACIÓN SUTIL --- */
@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- BOTONES DEL SUBMENÚ --- */
.submenu li {
  width: 100%;
}

.submenu li a {
  display: flex;
  justify-content: center;  /* ✅ centra el texto horizontalmente */
  align-items: center;      /* ✅ centra verticalmente */
  padding: 14px;
  width: 100%;
  color: #fff;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s, transform 0.2s ease;
  border-radius: 0;
}

.submenu li a:hover {
  background-color: #f80;
  transform: scale(1.05);
  border-radius: 6px;
}
