@charset "windows-1252";

/* ==========================================================================
   HOJA DE ESTILO 1: Modo Claro Moderno
   ========================================================================== */

:root {
  /* Paleta de colores */
  --bg-color: #f8fafc;
  --surface-bg: #ffffff;
  --surface-secondary: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary-color: #003366;
  --primary-hover: #002244;
  --accent-color: #0284c7;
  --border-color: #cbd5e1;
  --focus-ring: #2563eb;

  /* Tipografía y dimensiones */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --border-radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Reset básico y accesibilidad */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  font-size: 1.05rem;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Visibilidad accesibilidad (screen readers) */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Enlaces focus visibles */
a:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* 1. Enlaces "Saltar a" (Skip links) */
#enlaces ul {
  list-style: none;
}

#enlaces a {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary-color);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  transition: top 0.2s ease;
}

#enlaces a:focus {
  top: 1rem;
}

/* 2. Cabecera */
#cabecera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  gap: 1rem;
}

#cabecera h1 {
  width: 100%;
  order: 3;
  font-size: 2rem;
  margin-top: 0.5rem;
}

#cabecera h1 a {
  color: var(--primary-color);
  text-decoration: none;
}

#logo1 img, #logo2 img {
  max-width: 100%;
  height: auto;
}

/* 3. Menús Expandibles / Colapsables sin JavaScript (#menu y #submenu) */
#menu, #submenu {
  background-color: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

/* Encabezado visible indicando el estado */
#menu::before {
  content: "\1F7A7 Menú Principal (Desplegar)";
  display: block;
  padding: 0.85rem 1.25rem;
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
}

#submenu h2 {
  padding: 0.85rem 1.25rem;
  background-color: var(--surface-secondary);
  color: var(--primary-color);
  font-size: 1.1rem;
  cursor: pointer;
}

#submenu h2::after {
  content: "\1F7A7 (Desplegar)";
  font-size: 0.9rem;
  font-weight: normal;
}

/* Estado Colapsado por defecto */
#menu ul, #submenu ul {
  list-style: none;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem;
}

/* Estado Expandido al pasar el ratón o con foco (:hover y :focus-within) */
#menu:hover ul, #menu:focus-within ul,
#submenu:hover ul, #submenu:focus-within ul {
  max-height: 1000px;
  opacity: 1;
  visibility: visible;
  padding: 1rem;
}

#menu:hover::before, #menu:focus-within::before {
  content: "\25B2 Menú Principal (Colapsar)";
}

#submenu:hover h2::after, #submenu:focus-within h2::after {
  content:  "\25B2 (Colapsar)";
}

/* Estilos de los enlaces de los menús */
#menu ul li a, #submenu ul li a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  background-color: var(--surface-secondary);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#menu ul li a:hover, #submenu ul li a:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

#menu ul li a.seleccionado, #submenu ul li a.seleccionado {
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: bold;
}

/* 4. Migas de Pan */
#migas {
  background-color: var(--surface-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

#migas a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 5. Contenido Principal */
#contenido {
  background-color: var(--surface-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

#contenido h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--surface-secondary);
  padding-bottom: 0.5rem;
}

#contenido p {
  margin-bottom: 1.25rem;
}

#contenido blockquote {
  background-color: var(--surface-secondary);
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

#contenido a {
  color: var(--accent-color);
  font-weight: 500;
}

/* 6. Pie de página */
#pie {
  background-color: var(--surface-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border-top: 3px solid var(--primary-color);
}

#pie ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

#pie-enlaces {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#pie-enlaces a {
  color: var(--primary-color);
}
