/* =======================
   ESTILOS GENERALES
   ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
}

/* =======================
   NAVBAR
   ======================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  z-index: 1000;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 40px;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #ffd54f;
}

/* =======================
   HERO SECTION
   ======================= */
.hero {
  position: relative;
  height: 100vh;
  background: url("../img/hero.jpg") center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-overlay-melon {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 80vh;
  background: linear-gradient(135deg, #ff4343 0%, #ff9966 100%);
  clip-path: polygon(
    0% 25%,
    100% 80%,
    100% 100%,
    0% 100%
  );
  z-index: 2;
  transform: translateY(0);
  transition: transform 0.5s ease-out;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  width: 220px;
  max-width: 90%;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
  filter: drop-shadow(4px 4px 0 #ff4343);
}

.hero-text {
  font-size: 1.3rem;
  margin-top: 20px;
  color: #fff;
  font-weight: 400;
  line-height: 1.5;
  text-shadow: 2px 2px #ff4343;
}

.download-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-block;
  width: 180px;
  height: 60px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.store-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.store-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
}

/* =======================
   SLIDER
   ======================= */
.slider-container {
  width: 100%;
  max-width: 1000px;
  margin: 70px auto;
  position: relative;
}

.slider {
  width: 100%;
  position: relative;
}

.slider img {
  width: 100%;
  display: block;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 1s ease-in-out;
}

.slider img.active {
  opacity: 1;
  position: relative;
}

.hero-logo,
.hero-text,
.store-btn {
  transition: transform 0.1s linear;
}

/* =======================
   FOOTER
   ======================= */
/* Footer */
footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.95rem;
  position: relative;
}

/* Logo en footer como botón */
.footer-logo {
  display: inline-block;
  margin-bottom: 15px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-logo img {
  width: 120px;
  height: auto;
  display: block;
  transition: filter 0.3s ease, transform 0.3s ease;
  filter: brightness(1); /* color normal */
}

/* Hover: zoom + cambio a color melón */
.footer-logo:hover img {
  transform: scale(1.15);
  filter: drop-shadow(4px 4px 0 #ff4343); /* sombra melón */
}

/* =======================
   ANIMACIONES
   ======================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 768px) {
  .navbar ul { gap: 20px; }
  .hero-logo { width: 180px; }
  .store-btn { width: 150px; }
  .slider { max-width: 95%; margin: 60px auto; }
  .slider img { max-height: 400px; }
}

@media (max-width: 480px) {
  .hero-text { font-size: 1rem; }
  .download-buttons { flex-direction: column; gap: 25px; }
  .store-btn { width: 130px; height: 50px; }
  .slider img { max-height: 320px; }
}

/* =======================
   PORTADAS 2x2
   ======================= */
.portadas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  max-width: 1200px;
  margin: 70px auto;
  padding: 0 20px;
}

.portada {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.portada[data-color="sepia"] { filter: sepia(0.2); }
.portada[data-color="frio"] { filter: saturate(0.7) brightness(0.9) hue-rotate(200deg); }
.portada[data-color="verde"] { filter: saturate(0.6) brightness(0.9) hue-rotate(90deg); }
.portada[data-color="rosa"] { filter: saturate(0.7) brightness(0.95) hue-rotate(-20deg); }

.portada:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.portada .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.portada h2 {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 15px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.btn-portada {
  padding: 10px 25px;
  background: #ffd54f;
  color: #111;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.btn-portada:hover { background: #ffc107; }

.portada.in-view .overlay {
  opacity: 1;
  transform: translateY(0);
}

/* =======================
   TRIÁNGULO BLANCO
   ======================= */
.white-overlay-triangle {
  position: absolute;
  bottom: -115vh;
  left: 0;
  width: 100%;
  height: 160vh;
  background: white;
  clip-path: polygon(
    0% 100%,
    100% 100%,
    100% 30%,
    0% 60%
  );
  z-index: 3;
  transform: translateY(0);
  transition: transform 0.3s ease-out;
  will-change: transform;
}

/* =======================
   PORTADA DE PÁGINA
   ======================= */
.page-hero {
  position: relative;
  width: 100%;
  height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/dummy.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.page-hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  z-index: 10;
}

.logo-container {
  position: relative;
  display: inline-block;
  filter: drop-shadow(4px 4px 0 #ff4343);
}

.logo-main {
  position: relative;
  width: 120px;
  z-index: 2;
}

.separator {
  width: 10px;
  height: 80px;
  background: rgb(255, 255, 255);
}

.page-title {
  position: relative;
  font-size: 2rem;
  font-weight: 700;
  color: #ff4343;
}

.page-title::before {
  content: attr(data-title);
  position: absolute;
  top: -2px;
  left: -2px;
  color: #fff;
  z-index: -1;
}

/* =======================
   ANIMACIÓN DE ENTRADA PORTADA
   ======================= */
.page-hero-content > .logo-container,
.page-hero-content > .separator,
.page-hero-content > .page-title {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.page-hero-content.visible > .logo-container,
.page-hero-content.visible > .separator,
.page-hero-content.visible > .page-title {
  opacity: 1;
  transform: translateY(0);
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  transition: transform 0.4s ease;
  z-index: 1000;
}
body {
  padding-top: 1px; /* Ajusta según la altura de tu header */
}

/* --- PORTADAS IDEOLOGÍA --- */
/* Portada principal */
.portada-ideologia {
  background: url('../img/dummy.jpg') center/cover no-repeat;
  height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.portada-ideologia .portada-overlay {
  background: rgba(0,0,0,0.4);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portada-ideologia h1 {
  color: #fff;
  font-size: 3.5em;
  text-shadow: 2px 2px 15px rgba(0,0,0,0.8);
}

/* Bloques de fondo */
.bloque {
  position: relative;
  z-index: 0;
  background-size: cover;
  background-position: center;
  min-height: 90vh;
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease-out;
}

.bloque.in-view {
  opacity: 1;
  transform: translateY(0);
}

.bloque::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.bloque[data-color="frio"]::before { filter: saturate(0.7) brightness(0.9) hue-rotate(200deg); }
.bloque[data-color="calido"]::before { filter: saturate(1.2) brightness(1.1) hue-rotate(-20deg); }
.bloque[data-color="sepia"]::before { filter: sepia(0.3); }

.contenido {
  position: relative;
  z-index: 2;
  width: 85%;
  max-width: 1400px;
  color: #333;
  text-align: center;
}

.logo-kaly {
  width: 180px;
  margin-bottom: 40px;
  filter: none;
}

.bloque-transparente {
  background: rgba(255,255,255,0.55);
  border-radius: 15px;
  padding: 30px 50px;
  margin: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-align: left;
  line-height: 2;
}

.bloque-transparente h2, 
.bloque-transparente h3 {
  margin-bottom: 15px;
}

.subtitulo {
  color: #ff9966; /* melón */
}

/* Flex layout */
.mision-vision, .mision-vision-valores, .servicios {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.izquierda, .derecha, .centro {
  flex: 1 1 40%;
  min-width: 320px;
}

/* Títulos principales con shadow */
.titulo-seccion {
  color: #ff9966;
  font-size: 3em;
  text-shadow: 3px 3px 0 #fff; /* igual que la portada */
  margin-bottom: 60px;
}

.servicio {
  margin-top: 60px; /* baja un poco para no tocar la orilla */
}

/* Fade-in efecto */
.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease-out;
}

.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =======================
   FAQ CONTENT
   ======================= */
.faq-content {
  max-width: 1000px;
  margin: 80px auto 60px auto; /* separa de portada y footer */
  padding: 0 20px;
}

.faq-bloque {
  margin-bottom: 60px;
}

.faq-subtitulo {
  font-size: 2rem;
  font-weight: 700;
  color: #ff4343; /* melón */
  text-shadow: 2px 2px #ff4343; /* shadow tipo portada */
  margin-bottom: 20px;
}

.faq-bloque p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

.faq-bloque ul {
  margin-left: 25px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.faq-bloque ul li {
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .faq-content {
    margin: 60px 15px 40px 15px;
  }

  .faq-subtitulo {
    font-size: 1.6rem;
  }

  .faq-bloque p, .faq-bloque ul li {
    font-size: 1rem;
  }
}

.faq-item {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.faq-question {
  cursor: pointer;
  position: relative;
  font-weight: 600;
  font-size: 1.15rem;
  color: #333;
  padding: 12px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  transition: background 0.3s;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 1);
}

/* Respuestas ocultas inicialmente */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

/* Cuando el item está activo */
.faq-item.active .faq-answer {
  max-height: 1000px; /* suficiente para mostrar todo el contenido */
  opacity: 1;
}

/* Flecha giratoria */
.faq-question::after {
  content: "▼"; /* flecha */
  float: right;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(180deg);
}

/* Sections */
.section {
  padding: 80px 10%;
  text-align: center;
  background: #fff;
}
.section:nth-child(even) {
  background: #f5f5f5;
}
.section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #222;
}
.section p {
  max-width: 800px;
  margin: auto;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

/* Grid cards */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}
.card {
  background: #fff;
  padding: 25px;
  flex: 1 1 280px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.card:hover {
  transform: translateY(-5px);
}
.card h3 {
  color: #ff4444;
  margin-bottom: 10px;
}

/* Videos responsivos en testimonios */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-top: 15px;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

/* Botón con animación de deslizamiento */
.btn {
  position: relative;
  overflow: hidden;
  background: #ff4444;
  color: #fff;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
  z-index: 1;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff7a00, #ff4444);
  transition: all 0.4s ease;
  z-index: -1;
}
.btn:hover::before {
  left: 0;
}
.btn:hover {
  transform: translateY(-3px);
}

/* Register form */
.register {
  /*background: linear-gradient(90deg, #ff7a00, #ff4444);*/
  position: relative;
  margin-top: 120px;
}
.register::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/cafe.jpg') center/cover no-repeat;
}
.register h2 {
  color: #fff;
  text-shadow: 2px 2px #ff4343;
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}
.register-form {
  position: relative;
  z-index: 2;
  background: #c9c9c9;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.register-form input,
.register-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}
.register-form button {
  align-self: center;
  margin-top: 10px;
}

/* ===========================
   Toast Notification (arriba centrado, 2 líneas)
   =========================== */
#toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  background: linear-gradient(90deg, #ff7a00, #ff4444);
  color: #fff;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-family: "Poppins", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
  max-width: 400px;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast .titulo {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

#toast .subtexto {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.3;
}

/* ======== FIX SLIDER IMÁGENES RESPONSIVAS ======== */
.slider-container {
  width: 100%;
  max-width: 1000px;
  margin: 70px auto;
  position: relative;
  overflow: hidden;
}

.slider img {
  width: 100%;
  height: auto; /* 🔥 evita compresión vertical */
  object-fit: contain; /* mantiene proporción real */
  position: absolute;
  top: 0;
  left: 0;
}

.slider img.active {
  opacity: 1;
  position: relative;
}

/* En pantallas pequeñas, deja que el alto se ajuste al ancho */
@media (max-width: 768px) {
  .slider img {
    position: relative;
    max-height: none;
  }
}

/* ======== FIX PORTADAS EN CELULAR ======== */
@media (max-width: 768px) {
  .portadas {
    grid-template-columns: 1fr; /* 🔥 1 por fila */
    gap: 25px;
    padding: 0 15px;
  }

  .portada h2 {
    font-size: 1.5rem;
    text-align: center;
    white-space: normal; /* permite salto de línea */
  }

  .btn-portada {
    font-size: 1rem;
    padding: 10px 20px;
  }

  .portada .overlay {
    justify-content: center;
    text-align: center;
    padding: 20px;
  }
}

/* ======== FIX MENÚ SUPERIOR (BOTONES EN UNA LÍNEA) ======== */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap; /* 🔥 no permite que un botón baje */
  overflow-x: auto;
  padding: 10px 15px;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* 🔥 mucho menos espacio */
  flex-wrap: nowrap;
}

.navbar a {
  display: inline-block;
  text-align: center;
  white-space: normal;
  line-height: 1.1em;
  width: 90px; /* 🔥 más angosto para que quepan todos */
  font-size: 0.9rem;
  text-decoration: none;
}

/* En pantallas pequeñas, reducir un poco más */
@media (max-width: 768px) {
  .navbar a {
    width: 75px;
    font-size: 0.8rem;
  }
}

/* ======== FIX ALINEACIÓN LOGO + SEPARADOR + TÍTULO EN PAGE-HERO ======== */
.page-hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px; /* 🔥 misma distancia entre logo, divisor y título */
  flex-wrap: wrap; /* permite que se adapte en móvil */
  text-align: center;
}

.page-hero-content .logo-container img.logo-main {
  width: 120px;
  height: auto;
}

.page-hero-content .separator {
  width: 2px;
  height: 80px;
  background-color: white;
  opacity: 0.8;
}

.page-hero-content .page-title {
  font-size: 3rem;
  color: #ff4343;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.1em;
}

/* 🔧 Responsivo */
@media (max-width: 768px) {
  .page-hero-content {
    flex-direction: column; /* en móvil, apila verticalmente */
    gap: 20px;
  }

  .page-hero-content .separator {
    width: 60%;
    height: 2px;
  }

  .page-hero-content .page-title {
    font-size: 2rem;
  }
}

/* ===== CENTRAR TEXTO DENTRO DE LOS CUADROS DE IDEOLOGÍA ===== */
.ideologia-contenido .bloque-transparente {
  text-align: center;
}

.ideologia-contenido .bloque-transparente .subtitulo {
  text-align: center;
  margin-bottom: 15px;
}

.ideologia-contenido .bloque-transparente p {
  text-align: center;
  margin: 8px 0;
}

.ideologia-contenido .bloque-transparente .btn {
  display: inline-block;
  margin-top: 20px;
  text-align: center;
}

/* Centrar el logo dentro del cuadro */
.ideologia-contenido .bloque-transparente img {
  display: block;
  margin: 0 auto 20px;
}

/* ===== ESTILOS PÁGINAS LEGALES (T&C y Privacidad) ===== */
.legal-contenido h2 {
  font-size: 2rem;
  color: #333;
  text-transform: uppercase;
}

.legal-contenido h3 {
  color: #444;
  margin-top: 25px;
  font-size: 1.2rem;
}

.legal-contenido p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.legal-contenido a {
  color: #d35400;
  text-decoration: none;
}

.legal-contenido a:hover {
  text-decoration: underline;
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 40px 20px;
  background: #111;
  color: #fff;
  position: relative;
}



.footer-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-link {
  color: #fff;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

.footer-link::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: #fff;
  transition: width 0.3s ease;
}

.footer-link:hover {
  transform: translateY(-2px);
  color: #f0f0f0;
}

.footer-link:hover::after {
  width: 100%;
}

.alert {
  padding: 15px;
  border-radius: 6px;
  margin: 15px 0;
  text-align: center;
  font-weight: bold;
}
.alert.success {
  background: #c8f7c5;
  color: #1a7a1a;
}
.alert.error {
  background: #f7c5c5;
  color: #7a1a1a;
}