/* Reset y variables */
:root {
  --azul: #003870;
  --blanco: #FFFFFF;
  --rojo: #d80024;
  --gris-claro: #F2F2F2;
  --negro: #000000;
  --sombra: 0 2px 8px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--negro);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- Encabezado --- */











/* --- Encabezado fijo --- */
.header-sticky {
    position: sticky;
    top: 0;
    background-color: var(--azul);
    color: var(--blanco);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  
  .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* Evita que se apilen */
    gap: 15px;
    padding: 8px 0;
  }
  
  .logo {
    display: flex;
    flex-direction: row; /* Cambiado de column a row */
    align-items: center; /* Centra verticalmente */
    justify-content: space-between; /* Espacio entre logo y botón */
    max-width: 100%;
    margin-top: 10px;
  }
  
  .logo img {
    height: 50px;
    width: auto;
    display: block;
  }
  
  .slogan {
    font-size: 0.85rem;
    font-style: italic;
    margin: 4px 0 0;
    color: var(--blanco);
    line-height: 1.3;
  }
  
  /* Menú hamburguesa */
  .menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
  }
  
  /* Menú de escritorio */
  .desktop-menu {
    background-color: var(--azul);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
  }
  
  .nav-menu a {
    color: var(--blanco);
    text-decoration: none;
    padding: 12px 16px;
    display: block;
    transition: background 0.3s;
  }
  
  .nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--azul);
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
  }
  
  .dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .submenu a {
    padding: 10px 16px;
  }
  
  /* === Menú móvil lateral === */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--azul);
    color: var(--blanco);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
    z-index: 1010;
    transition: right 0.35s ease;
    padding: 20px 20px 20px 20px;
    overflow-y: auto;
  }
  
  .mobile-menu.active {
    right: 0;
  }
  
  .mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-menu li {
    margin-bottom: 12px;
  }
  
  .mobile-menu a {
    color: var(--blanco);
    text-decoration: none;
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
  }
  
  .mobile-menu .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 20, 50, 0.6);
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 8px;
  }
  
  .mobile-menu .dropdown:hover .submenu,
  .mobile-menu .dropdown:focus-within .submenu {
    max-height: 500px;
  }
  
  .close-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
  }
  
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* === Responsive: Móviles === */
  @media (max-width: 768px) {
    .menu-toggle {
      display: block;
    }
  
    .desktop-menu {
      display: none;
    }
  
    /* Ajuste fino para móviles pequeños */
    .slogan {
      font-size: 0.75rem;
      display: none;
    }
  
    .logo img {
      height: 45px;
    }
  }








/* Logo en el encabezado */
.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre eslogan y logo */
    flex-shrink: 1;
    min-width: 0;
  }
  
/* Logo a la DERECHA (dentro del contenedor .logo) */
.logo img {
    height: 45px;
    width: auto;
    display: block;
    flex-shrink: 0;
  }
  
  
    /* Eslogan a la IZQUIERDA */
    .slogan {
        font-size: 0.85rem;
        font-style: italic;
        color: var(--blanco);
        margin: 0;
        white-space: nowrap;
        text-align: left;
        flex-shrink: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    } 
  

    /* Asegurar que todo quepa en una fila */
    .header-top {
        flex-wrap: nowrap;
      }
    



  /* Ajuste en móviles */
  @media (max-width: 768px) {
    .header .container {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  
    .logo {
      align-items: center;
      margin-bottom: 1px;
    }
  
    .search-bar {
      width: 100%;
      max-width: 300px;
    }
  
    .search-bar input {
      width: 100%;
    }
  }


/* Menú de navegación */
.navbar {
  background-color: var(--azul);
  box-shadow: var(--sombra);
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--blanco);
  text-decoration: none;
  padding: 12px 16px;
  display: block;
  transition: background 0.3s;
}

.nav-menu a:hover {
  background-color: rgba(255,255,255,0.1);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--azul);
  min-width: 200px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10;
}

.dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu a {
  padding: 10px 16px;
}

/* Menú móvil */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: rgb(255, 255, 255);
  font-size: 1.5rem;
  cursor: pointer;
  
}





















.carousel {
    width: 100%;
    height: 600px; /* Altura fija */
    position: relative;
    overflow: hidden;
  }

  .slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.8s ease-in-out;
  }

  .slide.active {
    opacity: 1;
    z-index: 2;
  }

  .slide-content {
    text-align: center;
    max-width: 850px;
    z-index: 1;
  }

  .slide img {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }

  @media (min-width: 768px) {
    .slide {
      flex-direction: row;
      text-align: left;
      padding: 0 40px;
    }

    .slide img {
      margin-bottom: 0;
      margin-right: 40px;
      max-width: 350px;
    }

    .slide-content {
      text-align: left;
    }
  }

  .slide h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
  }

  @media (min-width: 768px) {
    .slide h2 {
      font-size: 2.3rem;
    }
  }

  .slide h2 span {
    color: #ff004c;
    font-weight: bold;
  }

  .slide p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
  }

  /* Puntos de control */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 3;
  }

  .carousel-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.815);
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
  }

  .carousel-dots button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.15);
  }

  .carousel-dots button.active {
    background: #00376b;
  }


















/* === GALERÍA DE CARRERAS – ESTILOS AISLADOS === */
.carreras-galeria {
    --azul: #003870;
    --blanco: #FFFFFF;
    --rojo: #d80024;
    --gris-claro: #F2F2F2;
    --negro: #000000;
    --sombra: 0 4px 16px rgba(0, 0, 0, 0.12);
  
    width: 100%;
    padding: 0 30px; /* margen lateral */
    margin: 40px 0;
  }
  
  .carreras-galeria h2 {
    color: var(--azul);
    text-align: center;
    margin-bottom: 32px;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: inherit;
  }
  
  .carreras-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
  }
  
  .carrera-card {
    background: var(--blanco);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--sombra);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .carrera-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  }
  
  .carrera-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
  }
  
  .carrera-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .carrera-nivel {
    font-size: 0.9rem;
    color: var(--azul);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-family: inherit;
  }
  
  .carrera-titulo {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--negro);
    margin-bottom: 14px;
    line-height: 1.2;
    font-family: inherit;
  }
  
  .carrera-duracion {
    font-size: 0.95rem;
    color: var(--rojo);
    font-weight: 700;
    margin-bottom: 16px;
    display: inline-block;
    background: rgba(216, 0, 36, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: inherit;
  }
  
  .carrera-descripcion {
    font-size: 1rem;
    color: #555;
    margin-bottom: 18px;
    line-height: 1.5;
    flex-grow: 1;
    font-family: inherit;
  }
  
  .carrera-info {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 18px;
    line-height: 1.6;
    font-family: inherit;
  }
  
  .carrera-info strong {
    color: var(--azul);
    font-weight: 700;
  }
  
  .carrera-inicio {
    font-weight: 700;
    color: var(--rojo);
    font-size: 1.05rem;
    margin: 12px 0;
    display: block;
    font-family: inherit;
  }
  
  .carrera-certificacion {
    font-size: 0.95rem;
    color: var(--azul);
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 600;
    font-family: inherit;
  }
  
  .carrera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
  }
  
  /* === BOTONES AISLADOS – SIN COLISIONES === */
  .carreras-galeria .carrera-btn {
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    flex: 1;
    min-width: 130px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Reset seguro sin usar all: unset */
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    box-sizing: border-box;
  }
  
  .carreras-galeria .carrera-btn-leer {
    background: var(--azul);
    color: var(--blanco);
  }
  
  .carreras-galeria .carrera-btn-leer:hover {
    background: #002a56;
    color: var(--blanco);
  }
  
  .carreras-galeria .carrera-btn-whatsapp {
    background: var(--rojo);
    color: var(--blanco);
  }
  
  .carreras-galeria .carrera-btn-whatsapp:hover {
    background: #a8001c;
    color: var(--blanco);
  }
  
  /* === RESPONSIVE === */
  @media (max-width: 600px) {
    .carreras-galeria .carrera-actions {
      flex-direction: column;
    }
  
    .carreras-galeria .carrera-btn {
      width: 100%;
    }
  
    .carreras-galeria h2 {
      font-size: 1.8rem;
    }
  
    .carrera-titulo {
      font-size: 1.5rem;
    }
  }





























/* Hero */
.hero {
  background: linear-gradient(rgb(0, 42, 85), rgb(3, 76, 148)), url('../img/banner1.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 80px 20px;
}

.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.btn {
  display: inline-block;
  background-color: var(--rojo);
  color: white;
  padding: 10px 24px;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 15px;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #b0001d;
}

/* Secciones */
.section {
  padding: 60px 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 40px;
  color: var(--azul);
  font-size: 2rem;
}

.bg-light {
  background-color: var(--gris-claro);
}

/* Cards */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--sombra);
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.card h3 {
  color: var(--azul);
  margin-bottom: 12px;
}

.btn-link {
  color: var(--rojo);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-top: 10px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Noticias / Cursos */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: var(--sombra);
}

.date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* Convocatorias */
.convocatorias {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.convocatorias li {
  padding: 15px;
  background: white;
  margin-bottom: 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--sombra);
}

.convocatorias a {
  color: var(--rojo);
  text-decoration: none;
  font-weight: 500;
}

/* Contacto */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.contact-form, .map {
  flex: 1;
  min-width: 300px;
}


/* Desplegable */
.contact-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.contact-form label {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
/*  */


.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}






/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--azul);
  }

  .nav-menu.active {
    display: flex;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0,0,0,0.1);
    padding-left: 20px;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .cards, .contact-container {
    flex-direction: column;
    align-items: center;
  }
}


#carreras-galeria {
  scroll-margin-top: 125px; /* Ajusta según la altura de tu encabezado fijo */
}

#contacto {
  scroll-margin-top: 70px; /* Ajusta según la altura de tu encabezado fijo */
}



/* === ESTILOS PARA ACORDEONES DE MÓDULOS === */
.modulo-seccion {
  margin: 18px 0 20px;
}

.modulo-acordeon summary {
  font-weight: 700;
  color: var(--azul);
  background-color: var(--gris-claro);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  list-style: none; /* Quita la flecha predeterminada */
  position: relative;
  font-size: 1rem;
  transition: background-color 0.2s;
}

/* Flecha personalizada (opcional, pero mejora el diseño) */
.modulo-acordeon summary::after {
  content: '▼';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  color: var(--azul);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.modulo-acordeon[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.modulo-acordeon summary:hover {
  background-color: #e6e6e6;
}

.modulo-acordeon ul {
  padding: 14px 16px 10px;
  margin: 10px 0 0;
  background-color: #fafafa;
  border-radius: 0 0 8px 8px;
  list-style: none;
  border-left: 3px solid var(--azul);
}

.modulo-acordeon li {
  padding: 6px 0;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
  position: relative;
  padding-left: 20px;
}

.modulo-acordeon li::before {
  content: '✔️';
  color: var(--rojo);
  font-weight: bold;
  position: absolute;
  left: 0px;
  top: 6px;
  font-size: 0.8rem;
}




/* ====== FOOTER ====== */
.footer {
  background-color: var(--azul);
  color: var(--blanco);
  padding: 0;
  margin-top: auto;
}

/* BANNER SUPERIOR DEL FOOTER (título grande) */
.footer-banner {
  background-color: var(--rojo);
  text-align: center;
  padding: 16px 0;
  box-shadow: var(--sombra);
}
.footer-banner h1 {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.8rem); /* Responsive font size */
  font-weight: 700;
  letter-spacing: 1px;
}

/* CONTENIDO PRINCIPAL */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 32px 20px;
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 6px;
}
.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--rojo);
}

/* Estilos generales para párrafos e íconos */
.footer-section p {
  margin: 8px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.footer-section i {
  width: 20px;
  text-align: center;
  margin-right: 8px;
  color: var(--rojo);
}

/* Enlaces de WhatsApp y teléfono */
.footer-section a {
  color: var(--blanco);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.5);
}
.footer-section a:hover {
  border-bottom: 1px solid var(--blanco);
}

/* Redes sociales */
.social-icons {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--blanco);
  font-size: 1.25rem;
  transition: all 0.3s ease;
}
.social-icons a:hover {
  background-color: var(--rojo);
  transform: translateY(-3px);
}

/* SECCIÓN LEGAL (resoluciones + copyright) */
.footer-legal {
  background-color: var(--azul);
  padding: 16px 20px;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  border-top: 2px solid var(--rojo);
}
.footer-legal p {
  margin: 6px 0;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    padding: 24px 16px;
  }
  .footer-banner h1 {
    font-size: clamp(1rem, 6vw, 1.5rem);
  }
}

@media (max-width: 480px) {
  .social-icons a {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}