/* ==========================================
   1. VARIABLES GLOBALES (Escudo EEST N.º 2)
   ========================================== */
:root {
  --primary-color: #008744;     /* Verde Institucional */
  --primary-hover: #146c43;
  --accent-color: #e52d27;      /* Rojo Institucional */
  --accent-hover: #b02a37;
  --text-dark: #222222;
  --text-light: #666666;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

/* ==========================================
   2. RESET GENERAL Y TIPOGRAFÍA
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================
   3. LÍNEAS INSTITUCIONALES (Roja y Verde)
   ========================================== */
.line-red {
  background-color: var(--accent-color);
  height: 6px;
  width: 100%;
  display: block;
}

.line-green {
  background-color: var(--primary-color);
  height: 6px;
  width: 100%;
  display: block;
}

/* ==========================================
   4. ENCABEZADO INSTITUCIONAL (HEADER)
   ========================================== */
.main-header {
  background-color: var(--white);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.1;
}

.brand-text p {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
}

/* ==========================================
   5. NAVEGACIÓN Y MENÚ VERDE DESPLEGABLE
   ========================================== */
.main-nav {
  background-color: var(--primary-color);
  position: relative;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  background-color: var(--primary-color);
  padding: 0.5rem 0;
  gap: 1.5rem;
  margin: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  display: block;
  transition: background-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: rgba(0, 0, 0, 0.15);
}

/* Menú Desplegable (Dropdown Verde) */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 220px;
  z-index: 100;
  border-radius: 0 0 4px 4px;
}

.dropdown-menu li a {
  padding: 0.6rem 1rem;
  display: block;
  background-color: transparent;
}

.dropdown-menu li a:hover {
  background-color: var(--primary-hover);
  color: var(--white);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Botón Hamburguesa para Móviles */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--white);
}

/* ==========================================
   6. SECCIÓN HERO / BANNER PRINCIPAL
   ========================================== */
.hero-green-section {
  background: linear-gradient(135deg, var(--accent-color), #b3201a);
  color: var(--white);
  padding: 3.5rem 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.hero-container-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================
   CARRUSEL (Alineado a la izquierda, achicado y sin recortes)
   ========================================== */
.carousel-container {
  background: rgba(235, 4, 4, 0.986);
  border-radius: 8px;
  padding: 8px;
  text-align: left; /* Alineado a la izquierda */
  border: 1px solid rgba(241, 4, 4, 0.979);
  max-width: 100%; /* Ancho máximo más chico para achicarlo */
  margin: 0;        /* Quita el centrado automático para que inicie a la izquierda */
}

.carousel-slide img, 
.hero-container-grid img {
  width: 100%;
  height: auto;       /* Altura automática para que no se deforme ni recorte */
  max-height: 280px;  /* Límite de altura para que no quede muy grande */
  object-fit: contain; /* Muestra la imagen completa sin recortarla */
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}


.hero-text-content p {
  font-size: 1.1rem;
  opacity: 0.95;
}
/* ==========================================
   ANIMACIÓN DE LAS IMÁGENES
   ========================================== */
.pic-ctn {
  position: relative;
  width: 100%;
  height: 200px; /* Altura más compacta */
  margin-top: 0;
}

.pic-ctn > img {
  position: absolute;
  top: 0;
  left: 35%; /* Alineado al inicio (izquierda) */
  opacity: 0;
  animation: display 10s infinite;
}

img:nth-child(2) {
  animation-delay: 2s;
}
img:nth-child(3) {
  animation-delay: 4s;
}
img:nth-child(4) {
  animation-delay: 6s;
}
img:nth-child(5) {
  animation-delay: 8s;
}

@keyframes display {
  0% {
    transform: translateX(50px);
    opacity: 0;
  }
  10% {
    transform: translateX(0);
    opacity: 1;
  }
  20% {
    transform: translateX(0);
    opacity: 1;
  }
  
  }


/* ==========================================
   7. BOTONES Y COMPONENTES GENERALES
   ========================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--bg-light);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--white);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
}

/* ==========================================
   8. SECCIONES Y TARJETAS
   ========================================== */
.section {
  padding: 4rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card-info, .card-news {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.card-info h3, .card-news h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.highlight-box {
  border-left: 5px solid var(--accent-color);
  background-color: #fffdfd;
}

.tag {
  display: inline-block;
  background-color: rgba(25, 135, 84, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* ==========================================
   9. PIE DE PÁGINA (FOOTER)
   ========================================== */
.main-footer {
  background: linear-gradient(180deg, #101d17 0%, #171717 100%);
  color: #edf2f7;
  padding: 3rem 0 1.2rem;
  border-top: 4px solid var(--primary-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.footer-column {
  min-width: 0;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.main-footer h4 {
  color: var(--white);
  margin-bottom: 0.75rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer-text,
.footer-contact-item,
.footer-bottom p {
  color: #dfe7ee;
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-social-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: #dfe7ee;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(2px);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.footer-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-icon-instagram {
  color: #e1306c;
}

.footer-icon-facebook {
  color: #1877f2;
}

.footer-contact-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-contact-item strong {
  color: var(--white);
}

.footer-contact-item + .footer-contact-item {
  margin-top: 0;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom p {
  color: #c7d3db;
}

/* ==========================================
   10. RESPONSIVE DESIGN (Móviles y Tablets)
   ========================================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 1rem 0;
    align-items: flex-start;
  }

  .nav-menu.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.1);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-links a.footer-social-link,
  .footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
  }
}
/*==========================================================================
   ESTILOS ESPECÍFICOS: SECCIÓN MAESTRO MAYOR DE OBRAS (MMO)
   ========================================================================== */

/* Contenedor principal de la página de MMO */
.mmo-main-container {
    padding: 4rem 1rem;
}

.mmo-main-title {
    margin-bottom: 2rem;
}


/* ==========================================================================
   MENÚ DE BARRAS HORIZONTALES (Grandes botones uno debajo del otro)
   ========================================================================== */
.mmo-menu-bar {
    display: flex;
    flex-direction: column; /* Esto los pone uno debajo del otro verticalmente */
    gap: 15px;              /* Espacio vertical entre cada botón */
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.mmo-bar-item {
    display: block;         /* Hace que ocupe todo el ancho disponible del contenedor */
    background-color: #f0f0f0; /* Fondo gris claro estilo botón */
    padding: 1.2rem 1.5rem;   /* Altura y grosor del botón */
    text-align: center;     /* Texto centrado */
    text-decoration: none;  /* Saca el subrayado azul feo de los enlaces */
    color: #cc0000;         /* Color de texto rojo institucional */
    font-weight: 700;       /* Negrita */
    font-size: 1.1rem;      /* Tamaño de letra grande */
    letter-spacing: 0.5px;
    border-radius: 6px;     /* Bordes redondeados sutiles */
    border: 1px solid #ddd; /* Un borde sutil para darle relieve */
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Efecto cuando pasas el mouse por encima */
.mmo-bar-item:hover {
    background-color: #e2e2e2;
    color: #a30000;
    transform: translateY(-2px); /* Pequeño efecto de elevación */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
/* ==========================================================================
   CONTENEDOR GENERAL DE PLAN DE ESTUDIOS
   ========================================================================== */
.mmo-plan-container {
    scroll-margin-top: 2rem;
}

.mmo-year-section {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    margin-bottom: 3rem;
}

.mmo-year-section.last-section {
    margin-bottom: 0;
}

.mmo-year-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.mmo-grid-gap {
    gap: 1.5rem;
}

/* ==========================================================================
   TARJETAS DE MATERIAS Y CATEGORÍAS
   ========================================================================== */
.mmo-subject-card {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

.mmo-category-title {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.mmo-subject-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mmo-subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    font-size: 0.95rem;
}

.mmo-subject-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ==========================================================================
   BOTONES DE INFORMACIÓN DE MATERIAS
   ========================================================================== */
.mmo-info-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-weight: 600;
}

.mmo-info-btn.primary {
    background: var(--primary-color);
}

.mmo-info-btn.accent {
    background: var(--accent-color);
}
