/* assets/css/styles.css */
/* ==========================================================================
   VARIABLES Y RECURSOS GLOBALES
========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap');

:root {
  /* Colores institucionales */
  --color-Gris-Neutro-Urbano: #98989A;
  --color-Negro-Profundo: #161a1d;
  --color-Carmesí-Clásico: #9b2247;
  --color-Guinda-Imperial: #611232;
  --color-Verde-Pino-Oscuro: #1e5b4f;
  --color-Verde-Abismo: #002f2a;
  --color-Marfil-Dorado: #e6d194;
  --color-Oro-Antiguo: #a57f2c;

  /* Tipografía */
  --font-base-pc: 16px;
  --font-base-tablet: 15px;
  --font-base-mobile: 14px;
  --font-note-small: 12px;
  --font-note-smaller: 11px;
  --font-weight-normal: 400;
  --font-weight-semi: 600;

  /* Espaciados */
  --spacing-horizontal-pc: 40px;
  --spacing-horizontal-tablet: 24px;
  --spacing-horizontal-mobile: 16px;
  --spacing-vertical: 20px;
}

/* ==========================================================================
   RESET BÁSICO Y CUERPO
========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--font-base-pc);
  font-weight: var(--font-weight-normal);
  color: var(--color-Negro-Profundo);
  line-height: 1.6;
  background-color: #ffffff;
}

main, header, footer {
  width: 100%;
}

section {
  max-width: 1200px;
  width: 100%;
  padding: 10px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Textos dentro de section */
section p,
section h3,
section h4,
section h5,
section h6 {
  text-align: left;
  width: 100%;
}

section > * {
  width: 100%;
}

.migas {
  max-width: 1200px; 
  width: 100%;
  margin: auto; 
}

/* ==========================================================================
   TIPOGRAFÍA
========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semi);
  color: var(--color-Negro-Profundo);
  text-align: center;
}

h1 { font-size: 2.5rem; color: var(--color-Guinda-Imperial); }
h2 { font-size: 2.125rem; color: var(--color-Carmesí-Clásico); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

#nota, .texto-nota {
  font-size: var(--font-note-small);
  font-style: italic;
  color: var(--color-Negro-Profundo);
}

/* ==========================================================================
   MEDIA QUERIES TIPOGRAFÍA
========================================================================== */
@media (max-width: 1024px) {
  body { font-size: var(--font-base-tablet); }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.875rem; }
  .texto-nota { font-size: 0.8125rem; }
}

@media (max-width: 768px) {
  body { font-size: var(--font-base-mobile); }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.375rem; }
  h4 { font-size: 1.125rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.9375rem; }

  .texto-nota { font-size: var(--font-note-smaller); }
}

/* ==========================================================================
   HEADER INSTITUCIONAL
========================================================================== */
.gob-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: var(--color-Guinda-Imperial);
}

.gob-barra {
  background-color: var(--color-Guinda-Imperial);
  padding: 5px 0;
}

.gob-barra-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

.gob-barra img {
  height: 50px;
  width: 150px;
  display: block;
}

.gob-menu {
  background-color: var(--color-Oro-Antiguo);
}

.gob-menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5px;
}

.gob-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.gob-menu ul li {
  padding: 5px 5px;
}

.gob-menu ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.gob-menu ul li a:hover {
  text-decoration: underline;
}

/* ===================================================
   MENU INSTITUCIONAL
=================================================== */

/* Contenedor del menú */
.menu-principal {
  background-color: #3A0B1E;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Ícono del menú hamburguesa (oculto en desktop) */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 200;
}

.menu-icon span {
  height: 3px;
  width: 25px;
  background-color: white;
  margin: 4px 0;
  display: block;
  transition: 0.3s;
}

/* Menú principal */
.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 5px;
  background-color: var(#3A0B1E);
}

.menu > li {
  position: relative;
}

.menu a {
  display: block;
  height: 40px;
  line-height: 40px;
  padding: 0px 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: bold;
}

.menu a:hover {
  background-color: var(--color-Guinda-Imperial);
}

/* Submenús */
.submenu-lista {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-Carmesí-Clásico);
  display: none;
  list-style: none;
  min-width: 180px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

.submenu:hover > .submenu-lista {
  display: block;
}

.submenu-lista li {
  position: relative;
}

.submenu-lista a {
  display: block;
  min-height: 40px;
  line-height: 40px;
  padding: 0 15px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
}

.submenu-lista a:hover {
  background-color: var(--color-Guinda-Imperial);
}

/* Segundo nivel de submenús (PC) */
.submenu-lista .submenu {
  position: relative;
}

.submenu-lista .submenu .submenu-lista {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background-color: var(--color-Carmesí-Clásico);
  min-width: 180px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

.submenu-lista .submenu:hover .submenu-lista {
  display: block;
}

/* ===================================================
   RESPONSIVE MENU (HAMBURGUESA)
=================================================== */

@media screen and (max-width: 768px) {
  .menu-principal {
    justify-content: flex-end;
    flex-direction: column;
    align-items: flex-end;
    min-height: 45px;
    padding: 0 10px;
    background-color: #3A0B1E;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 10px;
    height: 45px;
    width: 45px;
    padding: 0;
    z-index: 200;
  }

  .menu {
    display: none;
    flex-direction: column;
    background-color: #3A0B1E;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .menu-toggle:checked + .menu-icon + .menu {
    display: flex;
  }

  .menu li {
    text-align: center;
    padding: 0;
  }

  .menu a,
  .submenu-lista a {
    height: 45px;
    line-height: 45px;
    font-size: 0.9rem;
    padding: 0 15px;
  }

  .submenu-lista {
    position: relative;
    background-color: var(--color-Oro-Antiguo);
    box-shadow: none;
  }

  .submenu-lista .submenu .submenu-lista {
    position: relative;
    top: auto;
    left: auto;
    background-color: var(--color-Carmesí-Clásico);
    box-shadow: none;
  }

  .submenu-lista a {
    background-color: var(--color-Carmesí-Clásico);
    color: white;
  }

  .submenu-lista a:hover {
    background-color: var(--color-Guinda-Imperial);
  }
}

/* ===================================================
   AJUSTE PARA TABLETS Y MÓVILES HORIZONTALES (769px–1024px)
   Evita desbordamiento del menú horizontal en pantallas intermedias
=================================================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu li {
    flex: 0 0 auto;
    text-align: center;
  }
}

/* ===================================================
   BANNER PRINCIPAL
=================================================== */
.banner-principal {
  width: 100%;
  overflow: hidden;
  height: 300px;
  border-bottom: 5px solid var(--color-Guinda-Imperial);

}

.banner-principal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===================================================
   BOTONES GENERALES
=================================================== */
button,
.button {
  background-color: var(--color-Verde-Pino-Oscuro);
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Noto Sans', sans-serif;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover {
  background-color: var(--color-Verde-Abismo);
}

/* Contenedor de botones (centrado) */
.descarga-container {
  text-align: center;
  margin: 20px 0;
}

.btn-acceso {
  background-color: var(--color-Verde-Pino-Oscuro);
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Noto Sans', sans-serif;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.btn-acceso:hover {
  background-color: var(--color-Verde-Abismo);
}

/* ===================================================
   FOOTER INSTITUCIONAL
=================================================== */
.gob-footer {
  background-color: var(--color-Guinda-Imperial);
  color: white;
  font-size: 0.9rem;
  line-height: 1.6;
  width: 100%;
  padding: 40px 10px 0;
  overflow: hidden;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 20px;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  flex-grow: 1;
}

.footer-col {
  min-width: 200px;
}

.footer-col h4 {
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--color-texto-footer);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: white;
  text-decoration: none;
}

.footer-col ul li a:hover {
  text-decoration: underline;
}

.social-icons img {
  height: 24px;
  margin-right: 10px;
}

/* Textura decorativa del footer */
.footer-texture {
  background-image: url('img/texture-r-2.svg');
  background-repeat: repeat-x;
  background-position: top center;
  background-size: auto 150px;
  height: 50px;
  overflow: hidden;
  margin-top: 20px;
}

/* ===================================================
   RESPONSIVE DESIGN
=================================================== */
@media screen and (max-width: 1024px) {
  section {
    padding: var(--spacing-vertical) var(--spacing-horizontal-tablet);
  }
}

@media screen and (max-width: 768px) {
  section {
    padding: var(--spacing-vertical) var(--spacing-horizontal-mobile);
  }

  .footer-columns {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-col {
    width: 100%;
  }

  .social-icons img {
    margin-top: 10px;
  }

  .gob-menu ul {
    flex-direction: column;
    align-items: center;
  }

  .gob-menu ul li {
    padding: 8px 0;
  }
}