:root {
  --primary-blue: #1e5288;      /* Azul marino profesional */
  --turquois-light: #64d1d2;    /* Turquesa brillante para el menú y destacados */
  --turquois-dark: #3aa8a9;     /* Turquesa medio para hovers */
  --bg-gradient: #eaf7f8;       /* Fondo con matiz azul/turquesa suave */
  --card-bg: #ffffff;
  --text-color: #2b3a4a;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-gradient);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header */
.main-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 2rem 0.5rem;
  background-color: var(--white);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo-container h1 {
  color: var(--primary-blue);
  font-size: 2rem;
  font-weight: bold;
}

/* Menú Principal Redondeado (Pill Navigation) */
.main-nav {
  background-color: var(--turquois-light);
  border-radius: 30px;
  padding: 0.4rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.main-nav > ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.main-nav a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.25 ease;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: rgba(255, 255, 255, 0.4);
  color: var(--primary-blue);
}

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

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background-color: var(--turquois-light);
  min-width: 200px;
  list-style: none;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  
  /* Animación de apertura */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s ease;
  z-index: 100;
}

.dropdown-menu a {
  color: var(--primary-blue);
  padding: 0.7rem 1rem;
  border-radius: 0;
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Banner Central / Hero Banner */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  transition: background-image 0.6s ease-in-out;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Sombra/Gradiente sobre la imagen para mejorar legibilidad del texto */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10, 25, 47, 0.85) 100%);
  border-radius: 12px;
  z-index: 1;
}

.hero-card {
  position: relative;
  z-index: 2;
  color: #fbf9f1; /* Tono crema */
  max-width: 600px;
}

.hero-card h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.hero-card p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #f3efe0;
}

/* Indicadores / Dots */
.carousel-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background-color: #2563eb; /* Azul de acento */
  width: 28px;
  border-radius: 6px;
}

/* Introducción */
.intro-text {
  text-align: center;
  max-width: 800px;
  margin: 1.5rem auto 2.5rem;
  color: var(--primary-blue);
  font-weight: 500;
}

/* Grilla de Tarjetas Circulares */
.cards-grid {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto 3rem;
}

.circular-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 220px;
}

.img-wrapper {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 6px solid var(--turquois-light);
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

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

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

.circular-card h3 {
  color: var(--primary-blue);
  font-size: 1.1rem;
}

/* Footer */
.main-footer {
  background-color: var(--turquois-light);
  color: var(--primary-blue);
  text-align: center;
  padding: 1rem;
  font-weight: 600;
  margin-top: 2rem;
}

/* ===================================================
   VISTA MÓVIL Y TABLET (Menor a 992px)
   =================================================== */

@media screen and (max-width: 992px) {

  /* Botón para abrir el panel */
  .nav-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background-color: var(--turquois-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
  }

  .hamburger, .hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--primary-blue);
    position: relative;
    transition: all 0.3s ease;
  }
  .hamburger::before { top: -6px; }
  .hamburger::after { top: 4px; }

  /* Fondo oscuro semi-transparente */
  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
  }
  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Panel lateral que se desliza desde la derecha */
  .main-nav {
    position: fixed;
    top: 0;
    right: -300px; /* Oculto fuera de pantalla */
    width: 280px;
    height: 100vh;
    background-color: var(--white);
    border-radius: 0;
    padding: 1.5rem 1rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
  }

  .main-nav.active {
    right: 0; /* Desliza hacia la vista */
  }

  /* Encabezado del panel móvil */
  .nav-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    color: var(--primary-blue);
  }

  .close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    cursor: pointer;
  }

  .main-nav > ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-nav a, .dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0.8rem;
    border-radius: 10px;
    background-color: #f5f8fa;
  }

  /* Submenús dentro del panel */
  .has-dropdown:hover .dropdown-menu {
    display: none; /* Inactiva hover en móvil */
  }

  .dropdown-menu {
    position: static;
    display: none;
    background-color: #eef6f7;
    border-radius: 10px;
    margin-top: 0.4rem;
    padding: 0.3rem 0;
    box-shadow: none;
  }

  .has-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding-left: 1.8rem;
    background-color: transparent;
  }

  .has-dropdown.open .arrow {
    transform: rotate(180deg);
  }
}