:root {
  --primary-color: #f81c1c;       /* Rojo principal */
  --secondary-color: #e01919;     /* Rojo secundario para hover */
  --dark-color: #1a1a1a;          /* Texto e iconos oscuros */
  --light-bg: #ffffff;            /* Fondo blanco principal */
  --card-bg: #f8f8f8;             /* Fondo gris claro secundario */
  --accent-color: #f81c1c;
  --text-muted: #555555;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-bg);
  color: var(--dark-color);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ENCABEZADO Y NAVEGACIÓN */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-color);
  text-decoration: none;
}

.logo span {
  color: var(--primary-color);
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.navbar a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 600;
  transition: var(--transition);
}

.navbar a:hover {
  color: var(--primary-color);
}

/* SECCIÓN HERO */
.hero {
  background: linear-gradient(135deg, #fff5f5 0%, #f8f8f8 100%);
  padding: 80px 0;
  text-align: center;
}

.badge {
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 15px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: var(--dark-color);
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 30px auto;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* BOTONES */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--dark-color);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #333333;
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* SECCIONES Y TARJETAS */
.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  border-top: 4px solid var(--primary-color);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-bottom: 12px;
  color: var(--dark-color);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FORMULARIO */
.form-expositor {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 35px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dde1e5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(248, 28, 28, 0.2);
}

/* PIE DE PÁGINA */
.footer {
  background-color: var(--dark-color);
  color: #ffffff;
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.footer p {
  margin-bottom: 8px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* ESTILOS PARA TARJETAS DE EXPOSITORES */
.badge-categoria {
  background-color: #f8f8f8;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  border: 1px solid var(--primary-color);
  display: inline-block;
  margin-bottom: 10px;
}

.stand-info {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: var(--dark-color);
}

/* CARRUSEL DE IMÁGENES */
.carousel-section {
  background-color: var(--card-bg);
}

.carousel-container {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 450px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  font-size: 1.5rem;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition);
}

.carousel-btn:hover {
  background-color: var(--primary-color);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

@media (max-width: 768px) {
  .carousel-track {
    height: 280px;
  }
}

/* GRILLA DE FLYERS / INFORMACIÓN (MÁS GRANDES) */
.flyer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  align-items: center;
  max-width: 1200px; /* Amplía el contenedor general para dar más espacio a las imágenes */
  margin: 30px auto 0 auto;
}

.flyer-item {
  width: 100%;
}

.flyer-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flyer-img:hover {
  transform: scale(1.03); /* Ligero zoom interactivo */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

/* Adaptación a móviles (una debajo de otra para no perder legibilidad) */
@media (max-width: 768px) {
  .flyer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
  }
}


/* ANIMACIÓN DE TRANSICIÓN SUAVE ENTRE PÁGINAS */
body {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

body.page-loaded {
  opacity: 1;
}

body.page-exiting {
  opacity: 0;
}

/* AJUSTE PARA CARTA Y MINI CARRUSEL */
.card-actividad {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* REDUCIR ANCHO DEL MINI CARRUSEL Y CENTRAR */
.mini-carousel {
  position: relative;
  width: 80%; /* Reduce el ancho al 80% de la tarjeta */
  max-width: 280px;/* Define un límite máximo de ancho */
  margin: 15px auto 0 auto; /* El 'auto' en los laterales lo centra */
  border-radius: 8px;
  overflow: hidden;
  background-color: #f3f2f2;
}

.mini-carousel .carousel-track {
  position: relative;
  width: 100%;
  height: 350px;
}

.mini-carousel .carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.mini-carousel .carousel-slide.active {
  opacity: 1;
}

.mini-carousel .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* BOTONES MINI EXCLUSIVOS DENTRO DEL MINI-CARRUSEL */
.mini-btn {
  position: absolute;
  top: 98%;
  transform: translateY(-80%);
  background-color: rgba(250, 250, 250, 0.85);
  color: #f3f1f1;
  border: none;
  font-size: 0.85rem;
  padding: 1px 3px;
  cursor: pointer;
  border-radius: 4px;
  z-index: 5;
  transition: background-color 0.3s ease;
}

.mini-btn:hover {
  background-color: var(--primary-color);
}

.mini-carousel .prev-btn { left: 8px; }
.mini-carousel .next-btn { right: 8px; }



/* ESTILOS PARA LOGOS DE EXPOSITORES */
.card-expositor {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.expositor-logo {
  max-width: 150px;       /* Ancho máximo uniforme */
  height: 60px;           /* Altura fija para alineación */
  object-fit: contain;    /* Mantiene la proporción sin deformar */
  object-position: left;  /* Alinea el logo a la izquierda */
  margin-bottom: 15px;
}


/* ESTILOS PARA LA PÁGINA DE CONTACTO (CENTRADOS) */
.contacto-section {
  min-height: 75vh; /* Ocupa la mayor parte de la pantalla */
  display: flex;
  justify-content: center; /* Centra horizontalmente */
  align-items: center;     /* Centra verticalmente */
}

.contacto-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 450px;       /* Ancho contenido y elegante */
  margin: 0 auto;         /* Centra el contenedor completo */
}

.contacto-card {
  width: 100%;
  text-align: center;
  padding: 45px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;    /* Centra icono, título, teléfono y botón */
  justify-content: center;
}

.contacto-icon {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.contacto-card h3 {
  margin-bottom: 8px;
}

.contacto-card p {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 10px 0 25px 0;
  text-align: center;
}

.btn-contacto {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
}

.btn-contacto:hover {
  background-color: #d01414;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25d366; /* Verde característico de WhatsApp */
}

.btn-whatsapp:hover {
  background-color: #1eb954;
}

/* Adaptación a móviles */
@media (max-width: 768px) {
  .contacto-section {
    min-height: 65vh;
  }

  .contacto-grid {
    max-width: 90%; /* Se adapta suavemente al ancho del teléfono */
  }
}

/* CORRECCIÓN DEFINITIVA DE HEADER RESPONSIVE EN MÓVILES */
@media screen and (max-width: 768px) {
  body {
    padding-top: 105px !important; /* Espacio para el header de 2 filas */
  }

  .header {
    padding: 8px 0 !important;
  }

  .nav-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    gap: 6px !important;
  }

  .logo {
    font-size: 1.4rem !important;
  }

  .navbar {
    width: 100% !important;
  }

  .navbar ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .navbar ul li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .navbar ul li a {
    font-size: 0.8rem !important; /* Fuente reducida para que quepan las 4 palabras */
    padding: 4px 6px !important;
    display: inline-block !important;
    white-space: nowrap !important;
  }
}

