/* =========================================================
   VARIABLES
========================================================= */
:root {
  --primary: #004080;
  --bg: #f3f3f3;
  --card: #ffffff;
  --text: #222;
  --submenu-bg: rgba(0, 51, 102, 0.95);
  --white: #fff;
  --hover-light: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   RESET Y BASE GENERAL
========================================================= */
* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
}

/* =========================================================
   HEADER (sitio + branding + navegación)
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  background-color: var(--primary);
  color: var(--white);
  z-index: 1200;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  max-width: 75rem;
  margin: 0 auto;
}

/* Branding */
.branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: default;
  user-select: none;
}

.logo {
  display: block;
  width: auto;
  height: 2.75rem;
  border-radius: 0.375rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .logo:hover,
  .logo:focus {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    outline: none;
  }
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  user-select: text;
}

.subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  user-select: text;
}

/* Responsive en móviles */
@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .branding {
    gap: 0.5rem;
  }
  .site-title {
    font-size: 0.9rem;
  }
  .subtitle {
    font-size: 0.7rem;
  }
  .logo {
    height: 2.25rem;
  }
}

/* =========================================================
   NAVEGACIÓN PRINCIPAL
========================================================= */
.main-nav {
  position: relative;
  width: 100%;
}

/* Botón hamburguesa */
.nav-toggle {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  padding: 0.5rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}
.nav-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.2);
  outline-offset: 2px;
}

/* Menú */
.menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.menu .menu-item {
  background: transparent;
  border-radius: 6px;
  position: relative;
}
.menu a,
.submenu-toggle {
  display: block;
  color: var(--white);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.menu a:hover,
.submenu-toggle:hover,
.menu .menu-item a:hover,
.menu .menu-item button:hover {
  background-color: var(--hover-light);
}

/* Submenús */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.menu-item.open > .submenu {
  max-height: 360px;
}
.submenu a {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  display: block;
}

/* Botón de submenú */
.submenu-toggle {
  background: transparent;
  border: none;
  font: inherit;
  color: var(--white);
  cursor: pointer;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
}

/* Menú horizontal en pantallas grandes */
@media (min-width: 768px) {
  .menu {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .menu-item .submenu {
    display: none;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: var(--submenu-bg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: none;
    z-index: 999;
  }
  .menu-item.open .submenu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle {
    display: none;
  }
  .main-nav {
    width: auto;
  }
}

/* =========================================================
   ESTILO PRINCIPAL - ACADÉMICO MINIMAL
   Autor: Mosquera Zevallos Valerio
   ========================================================= */

/* ----------- VARIABLES DE COLOR Y FUENTE ----------- */
:root {
  --color-primario: #003366;
  --color-secundario: #0059b3;
  --color-texto: #1c1c1c;
  --color-fondo: #f8f9fb;
  --color-borde: #dcdcdc;
  --color-acento: #004a99;
  --color-enlace: #0066cc;
  --radius: 10px;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  --fuente-principal: 'Roboto', 'Open Sans', sans-serif;
}

/* ----------- RESET SUAVE ----------- */
.semana-main * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.semana-main {
  font-family: var(--fuente-principal);
  color: var(--color-texto);
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  line-height: 1.6;
}

/* ----------- TITULOS GENERALES ----------- */
.semana-main h1,
.semana-main h2,
.semana-main h3 {
  font-weight: 600;
  color: var(--color-primario);
  letter-spacing: 0.5px;
}

.semana-main h1 {
  font-size: 2rem;
  border-left: 5px solid var(--color-acento);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

.semana-main h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--color-borde);
  padding-bottom: 0.4rem;
}

.semana-main h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* ----------- SECCIONES ----------- */
.semana-main section {
  background: #fff;
  border: 1px solid var(--color-borde);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.semana-main section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* ----------- LISTAS ----------- */
.semana-main ul {
  list-style: none;
  padding-left: 1rem;
}

.semana-main ul li {
  position: relative;
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
}

.semana-main ul li::before {
  content: "•";
  color: var(--color-secundario);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* ----------- INTRO ----------- */
.semana-intro p {
  font-size: 1.05rem;
  margin-top: 0.5rem;
  color: #444;
}

/* ----------- TEMAS ----------- */
.tema {
  margin-bottom: 1.5rem;
}

.tema img {
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius);
  margin-top: 0.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

.tema img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ----------- MATERIALES ----------- */
.materiales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.material-card {
  border: 1px solid var(--color-borde);
  border-radius: var(--radius);
  padding: 1rem;
  background-color: #fff;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.material-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.material-card h3 {
  margin-bottom: 0.5rem;
}

.btn-material {
  display: inline-block;
  margin-top: 0.75rem;
  background: var(--color-primario);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-material:hover {
  background: var(--color-secundario);
  transform: translateY(-2px);
}

/* ----------- RESUMEN ----------- */
.semana-resumen p {
  font-style: italic;
  color: #333;
}

/* ----------- RECURSOS ----------- */
.semana-recursos ul li a {
  color: var(--color-enlace);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-enlace);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.semana-recursos ul li a:hover {
  color: var(--color-secundario);
  border-color: var(--color-secundario);
}

/* ----------- ANIMACIONES DE ENTRADA ----------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.semana-main section {
  animation: fadeUp 0.8s ease both;
}

/* ----------- RESPONSIVIDAD ----------- */
@media (max-width: 768px) {
  .semana-main {
    padding: 1rem;
  }

  .semana-main h1 {
    font-size: 1.6rem;
  }

  .semana-main h2 {
    font-size: 1.3rem;
  }

  .btn-material {
    width: 100%;
    text-align: center;
  }
}



/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 2rem 1rem;
  margin-top: 2rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: left;
}
.footer-column {
  flex: 1;
  min-width: 220px;
}
.footer-column h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(255,255,255,0.6);
  padding-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.footer-column p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.85);
}

/* Enlaces */
.footer-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  transition: color 0.3s ease;
  outline: none;
}
.footer-link:focus-visible {
  outline: 3px solid #00acee;
  outline-offset: 3px;
  text-decoration: none;
  color: #00acee;
}
.footer-link:hover,
.footer-link:focus {
  color: #00acee;
  text-decoration: none;
}

/* Redes sociales */
.redes-column .social-icons {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.5rem;
}
.redes-column .footer-link {
  font-size: 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.95);
  display: inline-block;
  transition: color 0.3s ease;
}
.redes-column .footer-link i {
  font-size: 2.4rem;
  vertical-align: middle;
  margin: 0;
  transition: transform 0.3s ease, color 0.3s ease;
}
.redes-column .footer-link:hover i,
.redes-column .footer-link:focus i {
  color: #00acee;
  transform: scale(1.2);
  outline: none;
}

/* Responsive footer */
@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-column {
    min-width: auto;
    margin-bottom: 2rem;
  }
  .redes-column .social-icons {
    justify-content: center;
  }
  .redes-column .footer-link i {
    font-size: 3rem;
    margin: 0 1rem;
  }
}

/* =========================================================
   MEDIA QUERIES
========================================================= */
@media (min-width: 600px) {
  .grid-units {
    grid-template-columns: repeat(2, 1fr);
  }
  .comp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu {
    flex-direction: row;
    align-items: center;
  }
  .nav-toggle {
    display: none;
  }
  .menu li.has-submenu {
    position: relative;
  }
  .submenu {
    position: absolute;
    left: 0;
    top: 100%;
    background: var(--submenu-bg);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: .5rem 0;
    max-height: 0;
    width: 220px;
    overflow: hidden;
    transition: max-height 0.28s ease;
    z-index: 999;
  }
  .menu-item.open > .submenu {
    max-height: 600px;
  }
  .submenu a {
    color: #fff;
  }
}

@media (min-width: 992px) {
  .grid-units {
    grid-template-columns: repeat(4, 1fr);
  }
  .comp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hero {
    padding: 6rem 1rem;
  }
  .hero h2 {
    font-size: 2.2rem;
  }
}