/*
==================================================
 ÍNDICE
==================================================
1.  VARIABLES GLOBALES
2.  MODO OSCURO (DARK MODE)
3.  RESET Y ESTILOS BASE
4.  TIPOGRAFÍA
5.  ESTRUCTURA Y CONTENEDORES
6.  BOTONES
7.  ANIMACIONES Y EFECTOS GENERALES
8.  COMPONENTES
    - Navbar
    - Menú Hamburguesa
    - Hero Section
    - Secciones Generales
    - Tarjetas (Services, About)
    - Servicio Especial
    - Carrusel de Servicios
    - Carrusel de Eventos/Publicidad
    - Modal de Imágenes
    - Formulario de Contacto
    - Footer
    - Botón Scroll Top
9.  ACCESIBILIDAD Y UTILIDADES
10. ESTILOS DE IMPRESIÓN
11. DISEÑO RESPONSIVE
==================================================
*/

/*
================================
1. VARIABLES GLOBALES
================================
*/
:root {
  /* Colores Principales */
  --color-primary: #1CA6DD; /* Azul principal */
  --color-primary-hover: #1590C4;
  --color-primary-active: #1279AB;
  --color-secondary: #8CD444; /* Verde principal */
  --color-secondary-hover: #7AC43D;
  --color-secondary-active: #68B236;
  --color-accent: #4ECDC4; /* Turquesa para acentos */
  --color-highlight: #81de57;

  /* Colores Neutros y de Texto */
  --color-background: #F8FDFF; /* Fondo general */
  --color-surface: #FFFFFF; /* Fondo de tarjetas, cajas */
  --color-card-background: #FAFEFF; /* Fondo de tarjetas suave */
  --color-text: #1A4B5C; /* Texto principal */
  --color-text-secondary: #2C6B7D;
  --color-text-muted: #5A8A9B;

  /* Colores de Estado */
  --color-success: var(--color-secondary);
  --color-error: #E74C3C;
  --color-warning: #F39C12;
  --color-info: var(--color-primary);

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-hero: linear-gradient(135deg, var(--color-primary) 0%, #1590C4 50%, #0D7A9A 100%);
  --gradient-card: linear-gradient(135deg, #FAFEFF 0%, #F0F9FF 100%);

  /* Bordes y Sombras */
  --color-border: rgba(28, 166, 221, 0.15);
  --color-card-border: rgba(140, 212, 68, 0.12);
  --color-focus-ring: rgba(28, 166, 221, 0.4);

  /* Tipografía */
  --font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-heading: "Poppins", var(--font-family-base);
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --letter-spacing-tight: -0.025em;

  /* Espaciado */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */

  /* Radios */
  --radius-sm: 0.375rem; /* 6px */
  --radius-base: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;  /* 12px */
  --radius-lg: 1rem;     /* 16px */
  --radius-xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(28, 166, 221, 0.1), 0 1px 2px rgba(28, 166, 221, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(28, 166, 221, 0.1), 0 2px 4px -1px rgba(28, 166, 221, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(28, 166, 221, 0.1), 0 4px 6px -2px rgba(28, 166, 221, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(28, 166, 221, 0.1), 0 10px 10px -5px rgba(28, 166, 221, 0.04);
  --shadow-card: 0 4px 20px rgba(28, 166, 221, 0.08);
  --shadow-hover: 0 8px 30px rgba(28, 166, 221, 0.12);

  /* Transiciones */
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* Layout */
  --navbar-height: 150px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/*
================================
2. MODO OSCURO (DARK MODE)
================================
*/
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #0F1F27;
    --color-surface: #1A2E37;
    --color-card-background: #233A44;
    --color-text: #1CA6DD;
    --color-text-secondary: #B8D4DC;
    --color-text-muted: #8BB4C2;
    --color-border: rgba(28, 166, 221, 0.2);
    --color-card-border: rgba(140, 212, 68, 0.15);
    --gradient-card: linear-gradient(135deg, #1A2E37 0%, #233A44 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
  }
  .typing-text {
    color: #FFFFFF;
  }
  .slide-caption {
    background: linear-gradient(transparent, rgba(15, 31, 39, 0.9));
  }
}

/*
================================
3. RESET Y ESTILOS BASE
================================
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  padding-top: var(--navbar-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  word-wrap: break-word;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-background);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}

/*
================================
4. TIPOGRAFÍA
================================
*/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

.highlight {
  color: #8ac340;
  position: relative;
  text-shadow:
    -1px -1px 0 #FFF,
    1px -1px 0 #FFF,
    -1px 1px 0 #FFF,
    1px 1px 0 #FFF;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-highlight), var(--color-secondary));
  border-radius: 2px;
}

/*
================================
5. ESTRUCTURA Y CONTENEDORES
================================
*/
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.services,
.about,
.contact,
.events-carousel-section {
  padding: var(--space-16) 0;
  background: var(--color-background);
}

.about {
  background: linear-gradient(135deg, var(--color-card-background) 0%, var(--color-background) 100%);
}

.events-carousel-section {
  padding: var(--space-8) 0 var(--space-16);
  position: relative;
  z-index: 5;
}

/*
================================
6. BOTONES
================================
*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--duration-slow) var(--ease-standard);
}

.btn:hover::before {
  left: 100%;
}

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-secondary-hover) 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-hero {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-lg);
  min-width: 200px;
}

/*
================================
7. ANIMACIONES Y EFECTOS GENERALES
================================
*/
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--color-highlight);
  animation: typing 3s steps(40, end), blink 1s infinite;
}

.animate-on-scroll {
  opacity: 0;
  transition: all 0.6s var(--ease-standard);
}

.animate-on-scroll.animate {
  opacity: 1;
}

/*
================================
8. COMPONENTES
================================
*/

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-standard);
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: var(--navbar-height);
  padding: var(--space-4) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.logo img {
  max-height: 160px;
  width: auto;
  object-fit: contain;
  padding: 10px 30px 10px 10px;
  border-radius: 20px;
  filter: drop-shadow(0 8px 32px rgba(28, 166, 221, 0.15));
  transition: all var(--duration-normal) var(--ease-standard);
}

.logo:hover img {
  transform: scale(1.02);
  filter: drop-shadow(0 12px 40px rgba(28, 166, 221, 0.25));
}

.logo h2 {
  color: var(--color-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
}

.nav-link {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-base);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--duration-normal) var(--ease-standard);
}

.nav-link:hover {
  color: var(--color-primary);
  background: rgba(28, 166, 221, 0.1);
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Menú Hamburguesa --- */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  padding: 12px 8px;
  z-index: 1002;
  border-radius: var(--radius-sm);
  background: white;
  border: 2px solid #098cd2;
}

.hamburger span {
  width: 32px;
  height: 4px;
  background: #098cd2;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* --- Hero Section --- */
.hero {
  min-height: calc(100vh - var(--navbar-height));
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.hero-text {
  color: white;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.typing-text {
  display: inline-block;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  margin: 0 auto var(--space-8);
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: var(--space-6);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.1;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(140, 212, 68, 0.1));
  animation: float 6s ease-in-out infinite;
}
.circle-1 { width: 300px; height: 300px; top: 10%; right: 10%; animation-delay: 0s; }
.circle-2 { width: 200px; height: 200px; bottom: 20%; left: 15%; animation-delay: 2s; }
.circle-3 { width: 150px; height: 150px; top: 50%; right: 25%; animation-delay: 4s; }


/* --- Secciones Generales --- */
.section-header {
  text-align: center;
  margin: 0 auto var(--space-8);
  max-width: 600px;
}

.section-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.section-divider {
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 0 auto var(--space-4);
  border-radius: 2px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* <-- ESTE ES EL CAMBIO CLAVE */
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.service-card, .about-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.service-card:hover, .about-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.service-icon, .about-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-standard);
}

.service-icon i, .about-icon i {
  font-size: 2rem;
  color: white;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
}

.service-card h3, .about-card h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.service-card p, .about-card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Servicio Especial --- */
.service-special {
  grid-column: 1 / -1;
  background: var(--gradient-card);
  border: 2px solid var(--color-card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-16);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-standard);
  margin-top: var(--space-4);
}

.service-special:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.service-special-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-16);
}

.service-special-text {
  width: 100%;
  max-width: 800px;
}

.service-special-icon {
  width: 100px;
  height: 100px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-lg);
}

.service-special-icon i {
  font-size: var(--font-size-4xl);
  color: white;
}

.service-special-icon.custom-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.service-special h3 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
}

.intro-text {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin: 0 auto var(--space-10);
  max-width: 700px;
}

.benefits-section h4 {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-10);
}

.benefits-grid {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-width: 120px;
  max-width: 140px;
  transition: all var(--duration-normal) var(--ease-standard);
  box-shadow: var(--shadow-sm);
  flex: 1;
}

.benefit-item:hover {
  background: var(--color-card-background);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.benefit-icon {
  width: 35px;
  height: 35px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-standard);
}

.benefit-item:hover .benefit-icon {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.benefit-icon i {
  font-size: var(--font-size-lg);
  color: white;
}

.benefit-text h4 {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

/* --- Carrusel de Servicios --- */
.service-carousel {
  width: 100%;
  max-width: 700px;
}

.carousel-container {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--color-surface);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s var(--ease-standard);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}

.carousel-slide:hover .image-zoom-hint {
  opacity: 1;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(26, 75, 92, 0.9));
  color: white;
  padding: var(--space-10) var(--space-8) var(--space-6);
}

.slide-caption h4 {
  font-size: var(--font-size-xl);
  margin: 0 0 var(--space-2);
  color: white;
}

.slide-caption p {
  font-size: var(--font-size-base);
  opacity: 0.9;
  margin: 0;
  color: white;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: var(--radius-full);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--font-size-lg);
  color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-standard);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl);
}

.carousel-btn-prev { left: var(--space-6); }
.carousel-btn-next { right: var(--space-6); }

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(28, 166, 221, 0.3);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
}

.indicator.active,
.indicator:hover {
  background: var(--color-primary);
  transform: scale(1.3);
}

/* --- Carrusel de Eventos/Publicidad --- */
.events-carousel {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.events-carousel-container {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--color-surface);
}

.events-carousel-track {
  display: flex;
  transition: transform 0.6s var(--ease-standard);
  align-items: flex-start;
}

.events-carousel-slide {
  min-width: 100%;
  position: relative;
}

.events-carousel-slide img,
.loading-placeholder {
  width: 100%;
  height: 500px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  display: block;
}

.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-placeholder i {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

.loading-placeholder p {
  font-size: var(--font-size-lg);
  margin: 0;
}

.events-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: var(--radius-full);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--font-size-lg);
  color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-standard);
  z-index: 10;
}

.events-carousel-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.events-carousel-btn-prev { left: var(--space-6); }
.events-carousel-btn-next { right: var(--space-6); }

.events-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.events-indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(28, 166, 221, 0.3);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
}

.events-indicator.active,
.events-indicator:hover {
  background: var(--color-primary);
  transform: scale(1.3);
}

/* --- Modal de Imágenes --- */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: modalFadeIn 0.3s ease;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.modal-caption {
  color: white;
  font-size: var(--font-size-lg);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.close-modal {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.image-zoom-hint {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* --- Formulario de Contacto --- */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin: var(--space-8) auto 0;
  max-width: 800px;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-standard);
}

.contact-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-hover);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.5rem;
  color: white;
}

.contact-details h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

.contact-details p {
  color: var(--color-text-secondary);
  margin: 0;
}

.contact-details a {
  color: var(--color-text-secondary);
}

.contact-details a:hover {
  color: var(--color-primary-hover);
}

/* --- Footer --- */
.footer {
  background: var(--gradient-hero);
  color: white;
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h3,
.footer-section h4 {
  color: white;
  margin-bottom: var(--space-4);
}

.footer-section p,
.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-2);
}

.footer-section ul li a:hover {
  color: var(--color-highlight);
}

.footer-section ul li i {
  margin-right: var(--space-2);
  color: var(--color-highlight);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* --- Botón Scroll Top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-standard);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/*
================================
9. ACCESIBILIDAD Y UTILIDADES
================================
*/
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/*
================================
10. ESTILOS DE IMPRESIÓN
================================
*/
@media print {
  body {
    background: white;
    color: black;
    padding-top: 0;
  }
  .navbar,
  .scroll-top,
  .hero-decoration,
  .footer {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: var(--space-8) 0;
  }
}

/*
================================
11. DISEÑO RESPONSIVE
================================
*/

/* --- Pantallas Medianas (Tablets) --- */
@media (max-width: 768px) {
  :root {
    --navbar-height: 90px;
  }
  
  body, .hero {
    padding-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
  }
  
  .container {
    padding: 0 var(--space-2);
  }

  /* Navbar y Menú Hamburguesa */
  .navbar { height: var(--navbar-height); }
  .nav-content { min-height: var(--navbar-height); }

  .hamburger { display: flex; }

  .logo { max-width: 70%; }
  .logo img { max-height: 120px; padding: 5px 12px 5px 5px; }
  .logo h2 {
    font-size: 16px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--color-surface);
    flex-direction: column;
    z-index: 1001;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    box-shadow: 0 8px 32px rgba(28, 166, 221, 0.15);
  }

  .nav-menu.active {
    max-height: 400px;
    visibility: visible;
    opacity: 1;
  }
  
  .nav-menu li { width: 100%; }
  .nav-menu .nav-link {
    display: block;
    padding: var(--space-4);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-menu .nav-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(5px);
  }
  .nav-menu li:last-child .nav-link {
      border-bottom: none;
  }

  /* Hero */
  .hero-content { padding: 25px 0; }
  .hero-title { font-size: 2.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn-hero { width: 100%; max-width: 280px; }
  .decoration-circle { display: none; }
  
  /* Grids */
  .services-grid, .about-grid, .contact-info {
    grid-template-columns: 1fr;
  }

  /* Servicio Especial */
  .service-special { padding: var(--space-12) var(--space-6); margin: var(--space-8) 0; }
  .service-special-content { gap: var(--space-12); }
  .service-special-icon { width: 80px; height: 80px; }
  .service-special-icon i { font-size: var(--font-size-3xl); }
  .service-special h3 { font-size: var(--font-size-3xl); }
  .intro-text { font-size: var(--font-size-base); }
  
  .benefits-grid { flex-wrap: wrap; } /* Cambio crítico */
  .benefit-item { min-width: 90px; max-width: 100px; padding: var(--space-3) var(--space-2); }
  .benefit-icon { width: 40px; height: 40px; }
  .benefit-icon i { font-size: var(--font-size-base); }
  .benefit-text h4 { font-size: var(--font-size-xs); }

  /* Carruseles */
  .carousel-slide img { height: 350px; }
  .slide-caption { padding: var(--space-6) var(--space-4) var(--space-4); }
  .slide-caption h4 { font-size: var(--font-size-lg); }
  .slide-caption p { font-size: var(--font-size-sm); }
  .carousel-btn { width: 40px; height: 40px; font-size: var(--font-size-base); }
  .carousel-btn-prev { left: var(--space-4); }
  .carousel-btn-next { right: var(--space-4); }

  .events-carousel-slide img,
  .loading-placeholder { height: 455px; object-fit: cover; border-radius: 0; }
  .events-carousel-btn { width: 40px; height: 40px; font-size: var(--font-size-base); }
  .events-carousel-btn-prev { left: var(--space-4); }
  .events-carousel-btn-next { right: var(--space-4); }
  
  /* Modal */
  .modal-content { max-width: 95%; max-height: 95%; }
  .modal-image { max-height: 70vh; }
  .close-modal { top: -40px; font-size: 2rem; }
  .modal-caption { font-size: var(--font-size-base); }

  /* Footer */
  .footer-content { grid-template-columns: 1fr; text-align: center; }

  /* Control de desbordamiento */
  .hero-title, .hero-subtitle, .service-special h3, .intro-text, .slide-caption h4, .slide-caption p, .footer-section p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* --- Pantallas Pequeñas (Móviles grandes) --- */
@media (max-width: 600px) {
    .benefits-grid {
        justify-content: center;
        flex-wrap: wrap; 
        gap: var(--space-6);
    }
    .benefit-item {
        flex: 0 0 calc(33.333% - var(--space-6)); 
        max-width: 100px;
    }
}

/* --- Pantallas Extra Pequeñas (Móviles) --- */
@media (max-width: 480px) {
  .container { padding: 0 8px; }

  /* Tipografía */
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: var(--font-size-lg); }
  .section-title { font-size: var(--font-size-2xl); }
  .highlight { text-shadow: -0.5px -0.5px 0 #FFF, 0.5px -0.5px 0 #FFF, -0.5px 0.5px 0 #FFF, 0.5px 0.5px 0 #FFF; }
  
  /* Componentes */
  .logo img { max-height: 85px; }
  .service-card, .about-card { padding: var(--space-6); }
  .service-special { padding: var(--space-8) 8px; }
  .service-special h3 { font-size: 1.5rem; }
  .intro-text { font-size: var(--font-size-sm); }
  
  /* Carruseles */
  .carousel-slide img { height: 250px; }
  .slide-caption h4 { font-size: var(--font-size-base); }
  .slide-caption p { font-size: var(--font-size-xs); }
  .carousel-btn { width: 35px; height: 35px; }
  .carousel-btn-prev { left: var(--space-2); }
  .carousel-btn-next { right: var(--space-2); }
  
  .events-carousel-slide img,
  .loading-placeholder { height: 455px; }
  .events-carousel-btn { width: 35px; height: 35px; }

  /* Utilidades */
  .scroll-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
}

/* --- Pantallas Muy Pequeñas --- */
@media (max-width: 360px) {
  .logo img { max-height: 60px; }
  .logo h2 { display: none; }
  .hero-title { font-size: 1.5rem; }
  .section-title { font-size: var(--font-size-xl); }
}