/* ==========================================================================
   INSTITUCIÓN EDUCATIVA NUEVA ESPERANZA — HOJA DE ESTILOS
   Organización del archivo:
   1. Variables / tokens de diseño
   2. Reset y base
   3. Utilidades y tipografía
   4. Encabezado y navegación
   5. Carrusel principal
   6. Sección "Nuestra Institución"
   7. Misión y Visión
   8. Proyectos Institucionales + Modal
   9. Galería de Actividades + Modal
   10. Formulario PQRS
   11. Contacto
   12. Footer
   13. Botón volver arriba
   14. Animaciones de aparición (scroll reveal)
   15. Media Queries (Responsive)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES / TOKENS DE DISEÑO
   Modifique aquí los colores y fuentes institucionales.
   -------------------------------------------------------------------------- */
:root {
  /* Paleta institucional — tomada del escudo de la institución */
  --color-ink: #16213e;        /* Azul oscuro institucional / texto principal */
  --color-ink-soft: #4b5876;   /* Texto secundario */
  --color-paper: #f7f5ef;      /* Fondo general */
  --color-paper-alt: #ffffff;  /* Fondo de tarjetas / secciones alternas */
  --color-red: #c1272d;        /* Rojo institucional — acento primario e interacción */
  --color-red-dark: #8f1b20;   /* Hover / estados oscuros del rojo */
  --color-navy: #1f3363;       /* Azul institucional para fondos oscuros (PQRS, insignias) */
  --color-gold: #eab308;       /* Amarillo institucional — acento secundario */
  --color-line: #e3ddca;       /* Líneas divisorias sutiles */
  --color-error: #b3452e;
  --color-success: #1f3363;

  /* Tipografía */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Karla", "Segoe UI", sans-serif;

  /* Espaciado / ritmo */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5.5rem;

  /* Layout */
  --max-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --header-height: 78px;

  /* Sombra única del sitio, usada con moderación */
  --shadow-soft: 0 12px 30px -18px rgba(28, 43, 50, 0.35);
}

/* --------------------------------------------------------------------------
   2. RESET Y BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0;
}

/* Accesibilidad: foco visible en toda la navegación por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* Respeta la preferencia de reducción de movimiento del usuario */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Clase de utilidad para lectores de pantalla */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. UTILIDADES Y TIPOGRAFÍA
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

section {
  padding-block: var(--space-xl);
}

.section-heading {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.section-heading__label {
  display: inline-block;
  color: var(--color-red);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 600;
}

.section-heading p {
  color: var(--color-ink-soft);
  margin-top: var(--space-xs);
  font-size: 1.05rem;
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--color-red);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-red-dark);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-red);
  color: var(--color-red);
}

.btn-outline:hover {
  background-color: var(--color-red);
  color: #fff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   4. ENCABEZADO Y NAVEGACIÓN
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 246, 241, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-soft);
  border-bottom-color: var(--color-line);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.logo-group img {
  height: 46px;
  width: 46px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tagline {
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin-top: 2px;
}

.main-nav .nav-list {
  display: flex;
  gap: var(--space-md);
}

.nav-link {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--color-ink-soft);
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-red-dark);
  border-bottom-color: var(--color-gold);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  padding: 0;
}

.menu-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. CARRUSEL PRINCIPAL
   -------------------------------------------------------------------------- */
.hero-carousel {
  position: relative;
  height: min(78vh, 620px);
  min-height: 380px;
  overflow: hidden;
  background-color: var(--color-navy);
}

.carousel-track {
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease;
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--color-navy);
}

/* Ya no se aplica un velo oscuro sobre las imágenes: las piezas del
   carrusel son gráficas institucionales con texto propio y colores
   que deben verse fieles al diseño original. */

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--space-lg) var(--space-md) 4.5rem;
}

.carousel-caption-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.carousel-caption h1,
.carousel-caption p {
  color: #fdfcf8;
}

.carousel-caption h1 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  max-width: 720px;
  font-weight: 600;
}

.carousel-caption p {
  margin-top: var(--space-xs);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 560px;
  opacity: 0.92;
}

.carousel-controls button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: rgba(22, 33, 62, 0.4);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.carousel-controls button:hover {
  background-color: rgba(22, 33, 62, 0.7);
}

.carousel-prev {
  left: var(--space-sm);
}

.carousel-next {
  right: var(--space-sm);
}

.carousel-indicators {
  position: absolute;
  bottom: var(--space-md);
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background-color: transparent;
  padding: 0;
}

.carousel-dot.is-active {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   6. SECCIÓN "NUESTRA INSTITUCIÓN"
   -------------------------------------------------------------------------- */
.about-section {
  background-color: var(--color-paper);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-media {
  position: relative;
}

.about-media img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.founding-badge {
  position: absolute;
  bottom: -1.25rem;
  right: -1rem;
  background-color: var(--color-navy);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.founding-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.founding-badge span {
  font-size: 0.78rem;
  opacity: 0.9;
}

.about-content h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.about-content p {
  color: var(--color-ink-soft);
  margin-bottom: var(--space-sm);
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   7. MISIÓN Y VISIÓN
   -------------------------------------------------------------------------- */
.values-section {
  background-color: var(--color-paper-alt);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.value-card {
  background-color: var(--color-paper);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  border-left: 4px solid var(--color-red);
}

.value-card--vision {
  border-left-color: var(--color-gold);
}

.value-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(193, 39, 45, 0.12);
  color: var(--color-red);
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}

.value-card--vision .value-icon {
  background-color: rgba(217, 164, 65, 0.16);
  color: #a9791f;
}

.value-card h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-xs);
}

.value-card p {
  color: var(--color-ink-soft);
}

/* --------------------------------------------------------------------------
   8. PROYECTOS INSTITUCIONALES + MODAL
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--space-md);
}

.project-card {
  background-color: var(--color-paper-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.project-card__image {
  height: 170px;
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card__period {
  font-size: 0.82rem;
  color: var(--color-red-dark);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.project-card__body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card__body p {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.project-card__cta {
  margin-top: var(--space-sm);
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-red);
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--color-gold);
}

/* Modal de detalle (compartido por Proyectos y Galería) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(22, 33, 62, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background-color: var(--color-paper-alt);
  max-width: 560px;
  width: 100%;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.4);
  transform: scale(0.94) translateY(10px);
  transition: transform 0.28s ease;
}

.modal-overlay.is-open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-paper);
  font-size: 1.2rem;
  color: var(--color-ink);
  z-index: 2;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: var(--color-line);
}

.modal-period {
  color: var(--color-red-dark);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.modal-description {
  color: var(--color-ink-soft);
}

/* Variante del modal para publicaciones de la Galería: imagen ampliada
   arriba, contenido debajo, sin el padding general del modal-box */
.modal-box--gallery {
  padding: 0;
  max-width: 640px;
  overflow: hidden;
}

.modal-box--gallery .modal-close {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
}

.modal-gallery-image {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  background-color: var(--color-navy);
}

.modal-gallery-body {
  padding: var(--space-lg);
  max-height: calc(85vh - 380px);
  overflow-y: auto;
}

.modal-gallery-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-red-dark);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
}

/* --------------------------------------------------------------------------
   9. GALERÍA DE ACTIVIDADES
   -------------------------------------------------------------------------- */
.gallery-section {
  background-color: var(--color-paper-alt);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

/* Grid de publicaciones: 3 columnas en escritorio (ver media queries
   para 2 columnas en tablet y 1 en móvil) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Estado inicial mientras js/app.js genera las tarjetas */
.gallery-grid[data-state="loading"]::after {
  content: "Cargando publicaciones...";
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-ink-soft);
  padding: var(--space-lg) 0;
}

.gallery-card {
  background-color: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card:hover,
.gallery-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.gallery-card__image-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
  background-color: var(--color-navy);
}

.gallery-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-card:hover .gallery-card__image-wrap img {
  transform: scale(1.07);
}

.gallery-card__date {
  position: absolute;
  left: var(--space-sm);
  bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(22, 33, 62, 0.85);
  color: #fdfcf8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.gallery-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.gallery-card__body h3 {
  font-size: 1.2rem;
}

.gallery-card__description {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  flex: 1;
  /* Recorta la descripción a 3 líneas en la tarjeta; el texto completo
     se muestra en el modal al hacer clic en "Ver más" */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card__cta {
  margin-top: 0.25rem;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-red);
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--color-gold);
}

/* --------------------------------------------------------------------------
   10. FORMULARIO PQRS
   -------------------------------------------------------------------------- */
.pqrs-section {
  background-color: var(--color-navy);
  color: #fdfcf8;
}

.pqrs-section .section-heading__label {
  color: var(--color-gold);
}

.pqrs-section .section-heading h2 {
  color: #fdfcf8;
}

.pqrs-section .section-heading p {
  color: rgba(253, 252, 248, 0.78);
}

.pqrs-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-lg);
  align-items: start;
}

.pqrs-info-card {
  background-color: rgba(253, 252, 248, 0.06);
  border: 1px solid rgba(253, 252, 248, 0.18);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.pqrs-info-card h3 {
  color: #fdfcf8;
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.pqrs-info-list li {
  display: flex;
  gap: 0.65rem;
  margin-bottom: var(--space-sm);
  color: rgba(253, 252, 248, 0.85);
  font-size: 0.95rem;
}

.pqrs-info-list li:last-child {
  margin-bottom: 0;
}

.pqrs-info-list .list-icon {
  color: var(--color-gold);
  flex-shrink: 0;
}

.pqrs-form {
  background-color: var(--color-paper-alt);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  color: var(--color-ink);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.98rem;
  background-color: var(--color-paper);
  color: var(--color-ink);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:invalid[data-touched="true"],
.form-group select:invalid[data-touched="true"],
.form-group textarea:invalid[data-touched="true"] {
  border-color: var(--color-error);
}

.field-error {
  display: none;
  color: var(--color-error);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.field-error.is-visible {
  display: block;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: var(--space-md);
}

.checkbox-group input {
  width: auto;
  margin-top: 0.25rem;
}

.checkbox-group label {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--color-ink-soft);
}

.form-feedback {
  margin-top: var(--space-sm);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  display: none;
}

.form-feedback.is-visible {
  display: block;
}

.form-feedback.is-success {
  background-color: rgba(31, 51, 99, 0.1);
  color: var(--color-success);
}

.form-feedback.is-error {
  background-color: rgba(179, 69, 46, 0.12);
  color: var(--color-error);
}

/* --------------------------------------------------------------------------
   11. CONTACTO
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.contact-card {
  background-color: var(--color-paper-alt);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.contact-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.contact-card p {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-ink);
  color: rgba(253, 252, 248, 0.85);
  padding-block: var(--space-xl) var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(253, 252, 248, 0.15);
}

.footer-col h4 {
  color: #fdfcf8;
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.footer-col p,
.footer-col li {
  font-size: 0.92rem;
  color: rgba(253, 252, 248, 0.72);
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: var(--color-gold);
}

.footer-social {
  display: flex;
  gap: 0.7rem;
  margin-top: var(--space-sm);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(253, 252, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.social-icon:hover {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-ink);
}

.footer-bottom {
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(253, 252, 248, 0.6);
}

/* --------------------------------------------------------------------------
   13. BOTÓN VOLVER ARRIBA
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-red);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--color-red-dark);
}

/* --------------------------------------------------------------------------
   14. ANIMACIONES DE APARICIÓN AL HACER SCROLL
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   15. MEDIA QUERIES (RESPONSIVE)
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .about-grid,
  .pqrs-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-paper-alt);
    border-bottom: 1px solid var(--color-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 420px;
  }

  .main-nav .nav-list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-sm) var(--space-md);
  }

  .nav-link {
    display: block;
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--color-line);
  }

  .menu-toggle {
    display: flex;
  }

  .values-grid,
  .form-row,
  .contact-grid,
  .footer-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .pqrs-form,
  .pqrs-info-card {
    padding: var(--space-md);
  }

  .founding-badge {
    right: 0.5rem;
  }

  section {
    padding-block: var(--space-lg);
  }
}
