/* =========================================
   VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================= */
:root {
  --primary-color: #00796b;
  --secondary-color: #0f5c4c;
  --dark-color: #004d40;
  --light-bg: #fafafa;
  --white: #ffffff;
  --gradient-bg: linear-gradient(to right, #ffffff, #daf0e4);
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  --font-main: "Poppins", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

body {
  background-color: var(--light-bg);
  color: #333;
  padding-top: 120px;
  /* Espacio para el navbar fijo */
}

/* =========================================
   BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--gradient-bg);
  box-shadow: var(--shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 100px;
  /* Altura fija para consistencia */
}

.logo img {
  height: 60px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* Menú Desktop */
.menu {
  list-style: none;
  display: flex;
  gap: 20px;
  transition: all 0.5s ease;
}

.menu li a {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 600;
  transition: color 0.3s;
}

.menu li a:hover,
.menu li a.activo {
  color: #000000;
}

/* Botón Menú Hamburguesa (Móvil) */
.menu-toggle {
  display: none;
  /* Oculto en desktop por defecto */
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
}

/* =========================================
   MENÚ LATERAL (DRAWER) - MÓVIL
   ========================================= */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 300px;
  height: 100%;
  background-color: var(--white);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  padding: 30px 20px;
  z-index: 1001;
  /* Encima del header */
}

.nav-drawer.open {
  right: 0;
}

.nav-drawer ul {
  list-style: none;
  padding-top: 40px;
}

.nav-drawer ul li {
  margin-bottom: 20px;
}

.nav-drawer ul li a {
  text-decoration: none;
  font-weight: 600;
  color: var(--dark-color);
  font-size: 1.2rem;
  display: block;
  /* Aumentar área de clic */
}

.drawer-close {
  background: none;
  border: none;
  font-size: 26px;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  color: var(--dark-color);
}

/* Overlay para el fondo oscuro cuando se abre el menú */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   SLIDER / CARRUSEL
   ========================================= */
.slider-container {
  position: relative;
  width: 100%;
  height: 720px;
  /* Ajustar según necesidad */
  overflow: hidden;
  /* border-radius: 10px; Eliminado si ocupa todo el ancho, opcional */
}

.slider {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

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

.texto-slider {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: var(--white);
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
  max-width: 80%;
}

.texto-slider h1 {
  font-size: clamp(24px, 5vw, 40px);
  /* Tipografía responsiva */
  font-weight: bold;
  line-height: 1.2;
}

.texto-slider p {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 500;
}

/* Flechas de navegación */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: 0.3s;
  z-index: 10;
}

.arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.left {
  left: 20px;
}

.right {
  right: 20px;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  background-color: #00695c;
  color: var(--white);
  text-align: center;
  padding: 25px 10px;
  font-size: 0.9rem;
}

.social {
  margin-top: 10px;
}

.social a img {
  width: 100px;
  /* Ajustar tamaño si es necesario */
  margin: 0 8px;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s;
}

.social a img:hover {
  opacity: 0.8;
}

/* =========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================= */
@media (max-width: 768px) {
  .menu {
    display: none;
    /* Ocultar menú desktop en móviles */
  }

  .menu-toggle {
    display: block;
    /* Mostrar botón hamburguesa */
  }

  .slider-container {
    height: 500px;
    /* Altura menor en móviles */
  }

  .navbar {
    padding: 0 20px;
  }
}

/* ===============================
   MEJORAS UI (WhatsApp, Loader, Scroll)
=============================== */

/* WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 35px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Page Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader-content img {
  width: 100px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   NUEVAS SECCIONES (INDEX)
   ========================================= */

/* Utilidades */
.section-padding {
  padding: 60px 5%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.bg-light {
  background-color: #f0f4f8;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--dark-color);
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Botones */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 121, 107, 0.3);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: #f1f1f1;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Slider Link */
.slide-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Quick Access Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card-item {
  background: var(--white);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: var(--dark-color);
  border: 1px solid transparent;
}

.card-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.card-item h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

/* About Preview */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h2 {
  font-size: 2.5rem;
  color: var(--dark-color);
  margin-bottom: 20px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 30px;
  color: #555;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

/* CTA Register */
.cta-register {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Responsive Adjustments */
@media (max-width: 768px) {

  .section-title,
  .about-text h2,
  .cta-content h2 {
    font-size: 2rem;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text,
  .about-image {
    width: 100%;
  }
}