:root {
  --azul-marino: #1e3a8a;
  --gris: #eaf0f8;
  --texto: #ffffff;
  --rojo: #d62828;
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== BASE ===== */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--gris);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header {
  background: var(--azul-marino);
  color: white;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

header h1 {
  font-size: 22px;
  font-weight: 700;
}

/* ===== NAV ===== */
nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

nav a:hover {
  color: #ffdd57;
}

/* ===== DROPDOWN ===== */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 1000;
}

.dropdown-content a {
  display: block;
  padding: 12px 16px;
  color: var(--azul-marino);
  text-decoration: none;
  font-weight: 500;
}

.dropdown-content a:hover {
  background: var(--rojo);
  color: white;
}

.dropdown.show .dropdown-content {
  display: block;
}

/* ===== MENÚ HAMBURGUESA ===== */
.menu-toggle {
  display: none;
  font-size: 26px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* ===== RESPONSIVE MENU ===== */
@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 0;
    background: var(--azul-marino);
    width: 100%;
    text-align: center;
    padding: 16px 0;
    gap: 15px;
    animation: slideDown 0.3s ease-out;
  }

  nav.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .dropdown-content {
    position: relative;
    background: #fff;
    box-shadow: none;
    border-radius: 0;
  }
}

/* ===== ANIMACIÓN DEL MENÚ ===== */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CARRUSEL ===== */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 420px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  background: #000;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel img.active {
  opacity: 1;
}

/* ===== FLECHAS Y BOTONES ===== */
.carousel .arrow, .carousel .pause {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 22px;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.carousel .arrow:hover, .carousel .pause:hover {
  background: rgba(0,0,0,0.7);
}

.carousel .prev { left: 15px; }
.carousel .next { right: 15px; }

.carousel .pause {
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  border-radius: 8px;
  font-size: 18px;
}

/* ===== SECCIÓN CARRERAS ===== */
.carreras {
  text-align: center;
  padding: 60px 20px;
  background: white;
  color: #1e3a8a;
}

.carreras h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--azul-marino);
}

/* CONTENEDOR */
.contenedor-carreras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

/* CAJAS INDIVIDUALES */
.caja-info {
  background: #ffffff;
  border-radius: 16px;
  padding: 25px 20px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 6px solid var(--azul-marino);
}

.caja-info h3 {
  font-size: 1.2rem;
  color: var(--azul-marino);
  margin-bottom: 10px;
}

.caja-info p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

/* EFECTO HOVER */
.caja-info:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
  border-left-color: var(--rojo);
}

/* ===== FOOTER ===== */
footer {
  background: var(--azul-marino);
  color: white;
  text-align: center;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

footer img {
  width: 40px;
  height: auto;
}

/* ===== LOGO EN EL ENCABEZADO ===== */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-header {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
