/* ═══════════════════════════════════════════════════════════════════════
   styles.css
   Dr. Alfredo Elías Alfaro Ramos — Personal Campaign Website
   Design system: custom properties, base resets, typography.
   Component-specific styles are added in subsequent sub-tasks.
═══════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────────
   §3.1 Color Tokens
──────────────────────────────────────────────────────────────────────── */
:root {
  /* Brand palette */
  --color-primary:        #003DA5; /* Primary blue — navbar, headings, buttons */
  --color-primary-light:  #1A56DB; /* Hover states, active nav link            */
  --color-accent:         #0EA5E9; /* Section dividers, icons, highlights       */

  /* Backgrounds */
  --color-bg:             #FFFFFF; /* Default section background                */
  --color-bg-alt:         #F0F6FF; /* Alternating section background            */

  /* Borders */
  --color-border:         #e5e7eb; /* Subtle dividers, accordion borders        */

  /* Text */
  --color-text:           #1E293B; /* Body text                                 */
  --color-text-muted:     #64748B; /* Captions, labels                          */
  --color-white:          #FFFFFF; /* Text on dark / blue backgrounds           */

  /* Footer */
  --color-footer-bg:      #001D6C; /* Dark navy footer background               */
}

/* ───────────────────────────────────────────────────────────────────────
   §3.2 Typography Scale
   Fonts loaded via Google Fonts in <head>:
     Inter       — body, labels/captions
     Merriweather — headings
──────────────────────────────────────────────────────────────────────── */
:root {
  /* Font families */
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-h1:      3rem;      /* Page heading  (h1) */
  --text-h2:      2.25rem;   /* Section heading (h2) */
  --text-h3:      1.5rem;    /* Sub-heading (h3) */
  --text-body:    1rem;      /* Body text — 16 px */
  --text-caption: 0.875rem;  /* Labels / captions */

  /* Font weights */
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;

  /* Line heights */
  --leading-tight:  1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
}

/* ───────────────────────────────────────────────────────────────────────
   Base Resets
──────────────────────────────────────────────────────────────────────── */

/* Use border-box sizing everywhere */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Smooth scrolling for same-page anchor navigation */
html {
  scroll-behavior: smooth;
  font-size: 16px; /* 1rem base */
}

body {
  font-family:    var(--font-body);
  font-size:      var(--text-body);
  font-weight:    var(--weight-regular);
  line-height:    var(--leading-normal);
  color:          var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color:       var(--color-primary);
}

h1 { font-size: var(--text-h1);  font-weight: var(--weight-bold); }
h2 { font-size: var(--text-h2);  font-weight: var(--weight-bold); }
h3 { font-size: var(--text-h3);  font-weight: var(--weight-semibold); }

/* Links */
a {
  color: var(--color-primary-light);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Remove list decoration from nav lists */
ul, ol {
  list-style: none;
}

/* Focus outline — ensure keyboard accessibility */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ───────────────────────────────────────────────────────────────────────
   Component styles added in subsequent sub-tasks:
     Sub-Task 3  — Hero section
     Sub-Task 4  — About Me section
     Sub-Task 5  — Achievements carousel
     Sub-Task 6  — Research, Teaching, Community
     Sub-Task 7  — Publications accordion, Awards carousel
     Sub-Task 8  — Contact form, Footer
     Sub-Task 9  — Scroll-reveal animations (@keyframes fadeInUp)
──────────────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════
   Sub-Task 2 — Navbar
═══════════════════════════════════════════════════════════════════════ */

/* ── Navbar container ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
  z-index: 50;
}

/* ── Inner row: logo + links + hamburger ─────────────────────────────── */
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

/* ── Logo / name mark ────────────────────────────────────────────────── */
.navbar__logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 1.15rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar__logo:hover,
.navbar__logo:focus-visible {
  color: var(--color-primary-light);
  text-decoration: none;
}

/* ── Desktop nav links ───────────────────────────────────────────────── */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ── Nav link base ───────────────────────────────────────────────────── */
.nav-link {
  font-family: var(--font-body);
  font-size: 0.8125rem;   /* ~13px for clean fit */
  font-weight: var(--weight-medium);
  color: var(--color-text);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0;
  height: 2px;
  background-color: var(--color-primary-light);
  transform: scaleX(0);
  transition: transform 0.2s ease;
  transform-origin: left;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-primary-light);
  text-decoration: none;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* ── Active nav link (set by scroll-spy) ────────────────────────────── */
.nav-link.active {
  color: var(--color-primary-light);
}
.nav-link.active::after {
  transform: scaleX(1);
}

/* ── Hamburger button ────────────────────────────────────────────────── */
.navbar__hamburger {
  display: none;          /* hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s ease;
}
.navbar__hamburger:hover,
.navbar__hamburger:focus-visible {
  color: var(--color-primary-light);
}

/* ── Mobile slide-down drawer ────────────────────────────────────────── */
.nav-drawer {
  display: none;            /* collapsed by default */
  overflow: hidden;
  background-color: var(--color-bg);
  border-top: 1px solid #e5e7eb;
  /* transition applied via max-height trick when .open is toggled by JS */
}
.nav-drawer.open {
  display: block;
}
.nav-drawer ul {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1rem;
  gap: 0.25rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════
   Sub-Task 3 — Hero Section (#inicio)
═══════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────────────────────────────── */
.hero {
  height: 100vh;
  position: relative;
  /* push content below fixed 64px navbar */
  padding-top: 64px;
}

/* ── Swiper fills the full hero height ───────────────────────────────── */
.hero .swiper,
.hero .swiper-slide {
  height: 100%;
}

/* ── All slides: base positioning ────────────────────────────────────── */
.hero__slide {
  position: relative;
  overflow: hidden;
}

/* ── Per-slide background colours ────────────────────────────────────── */
.hero__slide--1 { background-color: #003DA5; }
.hero__slide--2 { background-color: #1A3A6B; }
.hero__slide--3 { background-color: #0A2744; }

/* ── Slide background image (used via <img> so Swiper clones it too) ─── */
.hero__slide-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* ── Dark-blue gradient overlay ──────────────────────────────────────── */
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(0, 61, 165, 0.55) 0%,
    rgba(0, 29, 108, 0.45) 100%
  );
  pointer-events: none;
}

/* ── Content block — centered vertically, left-aligned ──────────────── */
.hero__content {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: clamp(1.5rem, 8vw, 7rem);
  max-width: 800px;
  color: var(--color-white);
  text-align: left;
  z-index: 1;
}

/* ── Subtitle ─────────────────────────────────────────────────────────── */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

/* ── Candidate name h1 ────────────────────────────────────────────────── */
.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-h1);      /* 3rem */
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: var(--leading-tight);
  margin-bottom: 1rem;
}

/* ── Tagline ──────────────────────────────────────────────────────────── */
.hero__tagline {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: var(--weight-regular);
  color: rgba(255, 255, 255, 0.80);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: var(--leading-relaxed);
}

/* ── CTA button ───────────────────────────────────────────────────────── */
.hero__cta {
  display: inline-block;
  background-color: var(--color-primary-light);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.hero__cta:hover,
.hero__cta:focus-visible {
  background-color: var(--color-primary);
  text-decoration: none;
  color: var(--color-white);
}

/* ── Swiper pagination dots ───────────────────────────────────────────── */
.hero .swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.55);
  opacity: 1;
}
.hero .swiper-pagination-bullet-active {
  background-color: var(--color-accent);
}

/* ── Swiper nav arrows ────────────────────────────────────────────────── */
.hero .swiper-button-prev,
.hero .swiper-button-next {
  color: var(--color-white);
}
.hero .swiper-button-prev:hover,
.hero .swiper-button-next:hover {
  color: var(--color-accent);
}

/* ── Responsive: smaller heading on mobile ──────────────────────────── */
@media (max-width: 767px) {
  .hero__title {
    font-size: 1.875rem;
  }
  .hero__tagline {
    font-size: 1rem;
  }
}
.nav-drawer .nav-link {
  display: block;
  padding: 0.625rem 0.5rem;
  font-size: var(--text-body);
  border-bottom: 1px solid #f0f0f0;
}
.nav-drawer .nav-link:last-child {
  border-bottom: none;
}

/* ── Responsive breakpoint: hide desktop links, show hamburger ───────── */
@media (max-width: 1100px) {
  .navbar__links {
    display: none;
  }
  .navbar__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   §5.3  Hero Panel — Sobre mí (#sobre-mi)
═══════════════════════════════════════════════════════════════════════ */

/* ── Section: full viewport, project primary blue background with foto3 ─── */
.about {
  position: relative;
  background: linear-gradient(135deg, rgba(14, 43, 92, 0.78) 0%, rgba(7, 24, 54, 0.82) 100%),
              url('../assets/images/foto3.JPG') center/cover no-repeat;
  padding: calc(64px + 48px) 0 0; /* 64px navbar offset + 48px breathing room */
  overflow: hidden;
}

/* ── Container ───────────────────────────────────────────────────────── */
.about__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ── Two-column hero layout ──────────────────────────────────────────── */
.about__hero {
  display: grid;
  grid-template-columns: 1fr 345px;
  gap: 3rem;
  align-items: center;
}

/* ── Left: text block ────────────────────────────────────────────────── */
.about__hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
}

/* ── Small caps eyebrow label ────────────────────────────────────────── */
.about__label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0;
}

/* ── Candidate name ──────────────────────────────────────────────────── */
.about__hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: var(--weight-bold);
  color: #ffffff;
  line-height: 1.1;
  margin: 0;
}

/* ── Role line ───────────────────────────────────────────────────────── */
.about__hero-role {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

/* ── Short bio ───────────────────────────────────────────────────────── */
.about__hero-bio {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.7;
  max-width: 540px;
  margin: 0;
}

/* ── Stat counters row ───────────────────────────────────────────────── */
.about__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0;
}

/* ── Individual counter ──────────────────────────────────────────────── */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

/* ── Counter number ──────────────────────────────────────────────────── */
.stat-number {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-accent);
}

/* ── Counter label ───────────────────────────────────────────────────── */
.stat-label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.55);
}

/* ── CTA button ──────────────────────────────────────────────────────── */
.about__hero-cta {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
  transition: background-color 0.2s ease;
}
.about__hero-cta:hover,
.about__hero-cta:focus-visible {
  background-color: var(--color-primary-light);
  text-decoration: none;
}

/* ── Right: photo ────────────────────────────────────────────────────── */
.about__hero-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__hero-img {
  display: block;
  width: 100%;
  max-width: 345px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  border: 3px solid rgba(255, 255, 255, 0.2);
  filter: brightness(1.05) contrast(1.03);
}

/* ── Responsive: tablet ──────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .about__hero {
    grid-template-columns: 1fr 275px;
    gap: 2rem;
  }
  .about__hero-img {
    max-width: 275px;
  }
}

/* ── Responsive: mobile ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .about {
    padding: calc(64px + 32px) 0 0;
  }
  .about__hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .about__hero-text {
    align-items: center;
    padding-bottom: 0;
  }
  .about__hero-bio {
    max-width: 100%;
  }
  .about__stats {
    justify-content: center;
  }
  .stat-item {
    align-items: center;
  }
  .about__hero-photo {
    order: -1;
    justify-content: center;
  }
  .about__hero-img {
    max-width: 230px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   §5.4  Achievements Section (#logros)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────────────────────────────── */
.achievements {
  background-color: var(--color-bg-alt);
  padding: 80px 0;
}

/* ── Shared section primitives ───────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Section header ──────────────────────────────────────────────────── */
.achievements__header {
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Trayectoria Académica (Bespoke 5-Item Showcase) ─────────────────── */
.academic-showcase {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 1160px;
  margin: 0 auto;
}

/* Featured Lead Card (Docencia y Formación) */
.academic-lead-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafd 100%);
  border: 1px solid rgba(0, 61, 165, 0.15);
  border-left: 6px solid var(--color-primary);
  border-radius: 14px;
  padding: 2.25rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 8px 24px rgba(0, 61, 165, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.academic-lead-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 61, 165, 0.12);
}

.academic-lead-card__icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 61, 165, 0.25);
}

.academic-lead-card__icon-wrap i {
  color: #ffffff;
  font-size: 2rem;
}

.academic-lead-card__body {
  flex: 1;
}

.academic-lead-card__top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.academic-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(0, 61, 165, 0.08);
  color: var(--color-primary);
}

.academic-badge--highlight {
  background-color: var(--color-primary);
  color: #ffffff;
}

.academic-lead-card__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.academic-lead-card__desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.academic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.academic-chip {
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Secondary 4-Cards Grid (2x2) */
.academic-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.academic-sub-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary-light);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-top-color 0.25s ease;
}

.academic-sub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 61, 165, 0.08);
  border-top-color: var(--color-accent);
}

.academic-sub-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.academic-sub-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(0, 61, 165, 0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.academic-sub-card__year {
  font-size: 0.8rem;
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.academic-sub-card__title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: 1.35;
  margin: 0;
}

.academic-sub-card__desc {
  font-family: var(--font-body);
  font-size: 0.885rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 860px) {
  .academic-lead-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem;
    gap: 1.25rem;
  }
  .academic-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Sub-Task 6 — Research, Teaching, Community
═══════════════════════════════════════════════════════════════════════ */

.research {
  background-color: var(--color-bg);
  padding: 80px 0;
}

.research__header,
.teaching__header,
.community__header {
  text-align: center;
  margin-bottom: 3rem;
}

.research__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.research-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.research-card:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.research-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.research-card__status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  line-height: 1;
}

.status--active {
  background-color: #dcfce7;
  color: #166534;
}

.status--done {
  background-color: #e5e7eb;
  color: #475569;
}

.research-card__year {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

.research-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--color-text);
}

.research-card__abstract {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.research-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  color: var(--color-primary-light);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

.research-card__link:hover,
.research-card__link:focus-visible {
  text-decoration: underline;
}

.teaching {
  background-color: var(--color-bg-alt);
  padding: 80px 0;
}

.teaching__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.teaching__courses,
.teaching__philosophy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.teaching__course-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.teaching__course-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.teaching__course-item i {
  color: var(--color-primary);
  margin-top: 0.2rem;
}

.teaching__course-item div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.teaching__course-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.teaching__course-name {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.teaching__blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.8;
}

.teaching__notes {
  color: var(--color-text-muted);
  line-height: 1.7;
}

.community {
  background-color: var(--color-bg);
  padding: 80px 0;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: var(--color-accent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 45%;
  margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
  margin-left: 0;
}

.timeline-item:nth-child(even) {
  margin-left: 55%;
}

.timeline-item__dot {
  position: absolute;
  top: 1.25rem;
  right: -10.5%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-primary);
  z-index: 1;
}

.timeline-item:nth-child(even) .timeline-item__dot {
  left: -10.5%;
  right: auto;
}

.timeline-item__card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.timeline-item__year {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.timeline-item__title {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.timeline-item__org {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.timeline-item__desc {
  color: var(--color-text);
  line-height: 1.6;
}

@media (max-width: 1023px) {
  .research__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .section-subtitle {
    margin: 0;
  }

  .research__header,
  .teaching__header,
  .community__header {
    text-align: left;
  }

  .research__grid,
  .teaching__grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline::before {
    left: 0.5rem;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even),
  .timeline-item:nth-child(odd) {
    width: 100%;
    margin-left: 0;
  }

  .timeline-item__dot,
  .timeline-item:nth-child(even) .timeline-item__dot {
    left: -1.95rem;
    right: auto;
  }
}

/* ───────────────────────────────────────────────────────────────────────
   §5.8 Propuestas — Cards grid
──────────────────────────────────────────────────────────────────────── */
.propuestas {
  background-color: var(--color-bg);
  padding: 80px 0;
}

.propuestas__header {
  text-align: center;
  margin-bottom: 3rem;
}

.propuestas__timeline-container {
  max-width: 900px;
  margin: 0 auto;
}

.propuestas__pillars-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.propuestas__badge {
  display: inline-block;
  background-color: rgba(14, 43, 92, 0.08);
  color: var(--color-primary);
  font-weight: var(--weight-bold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 43, 92, 0.15);
}

/* ── Vertical Flow Stepper ── */
.propuestas__vflow {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.propuesta-step {
  display: flex;
  gap: 1.75rem;
  position: relative;
}

.propuesta-step__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 54px;
}

.propuesta-step__number {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(14, 43, 92, 0.22);
  z-index: 2;
  transition: transform 0.3s ease;
}

.propuesta-step:hover .propuesta-step__number {
  transform: scale(1.08);
}

.propuesta-step__line {
  flex: 1;
  width: 3px;
  background: linear-gradient(to bottom, var(--color-accent), rgba(59, 130, 212, 0.2));
  margin-top: 0.5rem;
  border-radius: 2px;
}

.propuesta-step__card {
  flex: 1;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(14, 43, 92, 0.04);
}

.propuesta-step:hover .propuesta-step__card {
  transform: translateX(6px);
  box-shadow: 0 10px 24px rgba(14, 43, 92, 0.09);
  border-left-color: var(--color-primary);
}

.propuesta-step__card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.propuesta-step__icon {
  width: 44px;
  height: 44px;
  background-color: rgba(59, 130, 212, 0.12);
  color: var(--color-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.propuesta-step:hover .propuesta-step__icon {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.propuesta-step__tag {
  display: block;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}

.propuesta-step__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: 1.35;
  margin: 0;
}

.propuesta-step__body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 0.85rem;
}

.propuesta-step__sublist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.propuesta-step__sublist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.55;
}

.propuesta-step__sublist li i {
  color: var(--color-accent);
  font-size: 0.95rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.propuesta-step__sublist li strong {
  color: var(--color-primary);
}

.propuesta-step__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(14, 43, 92, 0.05);
  border: 1px solid rgba(14, 43, 92, 0.08);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.step-chip i {
  color: var(--color-accent);
  font-size: 0.75rem;
}

.propuesta-step:hover .step-chip {
  background-color: rgba(59, 130, 212, 0.1);
}

/* ── Outcomes / Impact Section ── */
.propuestas__outcomes {
  margin-top: 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 2.5rem 2rem;
}

.propuestas__outcomes-header {
  text-align: center;
  margin-bottom: 2rem;
}

.propuestas__outcomes-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.propuestas__outcomes-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0;
}

.propuestas__outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.outcome-card {
  background-color: var(--color-white);
  border: 1px solid rgba(14, 43, 92, 0.08);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.outcome-card__icon {
  width: 40px;
  height: 40px;
  background-color: rgba(59, 130, 212, 0.12);
  color: var(--color-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.outcome-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.outcome-card__desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* ── Governance Section ── */
.propuestas__governance {
  margin-top: 2rem;
}

.governance-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, #153c7c 100%);
  color: var(--color-white);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.governance-card__icon {
  width: 64px;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.governance-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: 0.35rem;
}

.governance-card__desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 1023px) {
  .propuestas__outcomes-grid {
    grid-template-columns: 1fr;
  }
  .governance-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .propuesta-step {
    flex-direction: column;
    gap: 0.75rem;
  }
  .propuesta-step__marker {
    flex-direction: row;
    width: 100%;
  }
  .propuesta-step__line {
    display: none;
  }
  .propuesta-step__card {
    padding: 1.25rem 1.25rem;
  }
}

/* ───────────────────────────────────────────────────────────────────────
   §5.8B Testimonios y Apoyo Comunal (#apoyo)
──────────────────────────────────────────────────────────────────────── */
.apoyo {
  background-color: var(--color-bg-alt);
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
}

.apoyo__header {
  text-align: center;
  margin-bottom: 3rem;
}

.apoyo__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.apoyo-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(14, 43, 92, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.apoyo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(14, 43, 92, 0.12);
}

.apoyo-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  overflow: hidden;
}

.apoyo-card__media iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.apoyo-card__content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.apoyo-card__author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}

.apoyo-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}

.apoyo-card__desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* ── Call to action box ── */
.apoyo__cta-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, #153c7c 100%);
  border-radius: 14px;
  padding: 2.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--color-white);
  box-shadow: 0 10px 25px rgba(14, 43, 92, 0.2);
}

.apoyo__cta-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: 0.35rem;
}

.apoyo__cta-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.apoyo__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--weight-bold);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.apoyo__cta-btn:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 900px) {
  .apoyo__grid {
    grid-template-columns: 1fr;
  }
  .apoyo__cta-box {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem;
  }
}

/* ───────────────────────────────────────────────────────────────────────
   §5.9B Artículos y Columnas de Opinión (#opinion)
──────────────────────────────────────────────────────────────────────── */
.opinion-section {
  background-color: #f8fafc;
  padding: 85px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.opinion__header {
  text-align: center;
  margin-bottom: 2rem;
}

/* ── Press Outlets Strip ── */
.opinion-outlets-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.opinion-outlet-chip {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.opinion-outlet-chip:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary-light);
}

.outlet-larepublica i { color: #dc2626; }
.outlet-lanacion i { color: #003da5; }
.outlet-elfinanciero i { color: #ea580c; }
.outlet-myt i { color: #0d9488; }
.outlet-tec i { color: #2563eb; }

/* ── Carousel Toolbar ── */
.opinion__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto 1.25rem;
  padding: 0 0.5rem;
}

.opinion__count-pill {
  font-size: 0.85rem;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.opinion__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.opinion-ctrl-btn {
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  background-color: #ffffff;
  border: 1.5px solid var(--color-primary);
  border-radius: 8px;
  padding: 0.45rem 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 61, 165, 0.08);
  transition: all 0.2s ease;
}

.opinion-ctrl-btn:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 61, 165, 0.2);
}

.opinion-ctrl-btn:active {
  transform: translateY(0);
}

.opinion-ctrl-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Carousel Container & Swiper ── */
.opinion__carousel-container {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
}

.opinion__swiper {
  padding: 6px 4px 44px;
  overflow: hidden;
}

#opinion-swiper .swiper-slide {
  height: auto;
  display: flex;
}

/* ── Individual Opinion Card ── */
.opinion-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--color-primary);
  border-radius: 12px;
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-top-color 0.25s ease;
}

.opinion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 61, 165, 0.12);
  border-top-color: var(--color-accent);
}

.opinion-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.opinion-card__source {
  font-size: 0.725rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
}

.source-larepublica {
  background-color: rgba(220, 38, 38, 0.09);
  color: #b91c1c;
}

.source-lanacion {
  background-color: rgba(0, 61, 165, 0.09);
  color: #003da5;
}

.source-elfinanciero {
  background-color: rgba(234, 88, 12, 0.09);
  color: #c2410c;
}

.source-myt {
  background-color: rgba(13, 148, 136, 0.09);
  color: #0f766e;
}

.source-tec, .source-uned, .source-ran {
  background-color: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
}

.opinion-card__tag {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: var(--weight-semibold);
  background-color: #f8fafc;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.opinion-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  margin: 0 0 0.65rem;
}

.opinion-card__title a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.opinion-card__title a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.opinion-card__summary {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 1.15rem;
  flex: 1;
}

.opinion-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.785rem;
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.opinion-card__link:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  text-decoration: none;
}

/* ── Pagination Dots ── */
.opinion-pagination {
  bottom: 8px !important;
}

.opinion-pagination .swiper-pagination-bullet {
  background-color: var(--color-primary);
  opacity: 0.22;
  width: 8px;
  height: 8px;
  transition: all 0.25s ease;
}

.opinion-pagination .swiper-pagination-bullet-active {
  opacity: 1;
  width: 26px;
  border-radius: 4px;
  background-color: var(--color-primary);
}

/* ── Floating Side Navigation Buttons ── */
.opinion-side-btn {
  position: absolute;
  top: calc(50% - 20px);
  transform: translateY(-50%);
  z-index: 25;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 61, 165, 0.18);
  transition: all 0.2s ease;
}

.opinion-side-prev {
  left: -24px;
}

.opinion-side-next {
  right: -24px;
}

.opinion-side-btn:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 61, 165, 0.28);
}

.opinion-side-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .opinion-side-prev {
    left: 4px;
  }
  .opinion-side-next {
    right: 4px;
  }
}

@media (max-width: 640px) {
  .opinion__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .opinion__controls {
    justify-content: space-between;
  }
  .opinion-ctrl-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ───────────────────────────────────────────────────────────────────────
   §5.9 Testimonios
──────────────────────────────────────────────────────────────────────── */
.testimonios {
  background-color: var(--color-primary);
  padding: 80px 0;
}

.testimonios__header {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonios__header .section-label {
  color: var(--color-accent);
}

.testimonios__header .section-title {
  color: var(--color-white);
}

.testimonios__header .section-subtitle {
  color: rgba(255, 255, 255, 0.70);
}

/* ── 3-column grid ───────────────────────────────────────────────────── */
.testimonios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

/* ── Individual card ─────────────────────────────────────────────────── */
.testimonio-card {
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Media area (photo or video) ─────────────────────────────────────── */
.testimonio-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

/* ── Placeholder shown before real media is added ────────────────────── */
.testimonio-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.30);
  font-size: 3rem;
}

/* ── Real photo: swap placeholder div for <img> ──────────────────────── */
.testimonio-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Real video: swap placeholder div for <iframe> ───────────────────── */
.testimonio-card__media iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Video Card Content ──────────────────────────────────────────────── */
.testimonio-card__content {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.testimonio-card__video-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: 1.4;
  margin: 0 0 0.75rem;
}

.testimonio-card__video-desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin: 0;
}

/* ── Bottom note ─────────────────────────────────────────────────────── */
.testimonios__note {
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.50);
}

.testimonios__note-link {
  color: var(--color-accent);
  text-decoration: underline;
}

.testimonios__note-link:hover {
  color: var(--color-white);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .testimonios__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .testimonios__grid {
    grid-template-columns: 1fr;
  }
}

/* ───────────────────────────────────────────────────────────────────────
   §5.10 Publications — Accordion
──────────────────────────────────────────────────────────────────────── */
.publications {
  background-color: var(--color-bg-alt);
  padding: 80px 0;
}

.accordion {
  max-width: 900px;
  margin: 0 auto;
}

.accordion-group {
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-bg);
  border: none;
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s;
}

.accordion-trigger:hover {
  background-color: var(--color-bg-alt);
}

.accordion-trigger .fa-chevron-down {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-group.open .fa-chevron-down {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  background-color: var(--color-bg);
}

.accordion-group.open .accordion-panel {
  display: block;
}

.publication-list {
  list-style: none;
  padding: 0 1.5rem 1rem;
  margin: 0;
}

.publication-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0 0 0.25rem;
}

.publication-title {
  font-style: italic;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.25rem;
}

.publication-journal {
  color: var(--color-text-muted);
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.publication-doi {
  font-size: 0.875rem;
  color: var(--color-primary-light);
  text-decoration: none;
}

.publication-doi:hover {
  text-decoration: underline;
}

/* ───────────────────────────────────────────────────────────────────────
   §5.9 Awards — Swiper Carousel
──────────────────────────────────────────────────────────────────────── */
.awards {
  background-color: var(--color-bg);
  padding: 80px 0;
}

.awards__swiper {
  padding-bottom: 3rem; /* space for nav arrows */
}

.award-card {
  background-color: var(--color-bg);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.25s ease;
  height: auto;
}

.award-card:hover {
  box-shadow: 0 8px 24px rgba(0, 61, 165, 0.12);
}

.award-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: var(--color-white);
}

.award-card__name {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.award-card__year {
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 0.25rem;
}

.award-card__institution {
  font-style: italic;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.award-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════
   Sub-Task 8 — Contact Section (#contacto)
═══════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────────────────────────────── */
.contact {
  position: relative;
  background: linear-gradient(135deg, rgba(14, 43, 92, 0.78) 0%, rgba(7, 24, 54, 0.82) 100%),
              url('../assets/images/foto3.JPG') center/cover no-repeat;
  padding: 80px 0;
  color: var(--color-white);
}

/* ── Section header overrides for dark background ───────────────────── */
.contact .section-label {
  color: var(--color-accent);
}

.contact .section-header h2,
.contact__header h2 {
  color: var(--color-white);
}

.contact .section-subtitle {
  color: rgba(255, 255, 255, 0.80);
}

.contact__header {
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Two-column grid ─────────────────────────────────────────────────── */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Contact info column ─────────────────────────────────────────────── */
.contact-info__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: 0.25rem;
}

.contact-info__role {
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
}

.contact-info__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: var(--text-body);
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.6;
}

.contact-info__item i {
  color: var(--color-accent);
  font-size: 1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}

.contact-info__link {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info__link:hover,
.contact-info__link:focus-visible {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ── Social icon row ─────────────────────────────────────────────────── */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.20);
  color: var(--color-white);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.40);
  text-decoration: none;
  color: var(--color-white);
}

.contact-info__note {
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.70);
  font-style: italic;
  margin-top: 0.25rem;
}

/* ── Contact form column ─────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  color: var(--color-white);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-body);
  transition: border-color 0.2s ease;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.50);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ── Submit button ───────────────────────────────────────────────────── */
.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.75rem;
  cursor: pointer;
  transition: filter 0.2s ease;
  align-self: flex-start;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  filter: brightness(1.12);
}

.contact-form__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Inline form status messages ─────────────────────────────────────── */
#form-status {
  font-size: var(--text-caption);
  min-height: 1.25rem;
}

.form-status--success {
  color: #86efac; /* light green, readable on dark blue */
}

.form-status--error {
  color: #fca5a5; /* light red, readable on dark blue */
}

/* ── Responsive: stack on mobile ─────────────────────────────────────── */
@media (max-width: 767px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__header {
    text-align: left;
  }

  .contact .section-subtitle {
    margin: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Sub-Task 8 — Footer
═══════════════════════════════════════════════════════════════════════ */
.footer {
  background: #001D6C;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════════════
   Sub-Task 9 — Scroll-reveal animations
   Triggered by IntersectionObserver in main.js which adds .visible
═══════════════════════════════════════════════════════════════════════ */

/* ── Section scroll-margin so fixed navbar doesn't cover headings ──── */
section {
  scroll-margin-top: 64px;
}

/* ── Reveal base state: invisible + shifted down ───────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ── Revealed state (class added by IntersectionObserver) ───────────── */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Staggered children: small delay per direct child ──────────────── */
.reveal-group > *:nth-child(1) { transition-delay: 0s; }
.reveal-group > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-group > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-group > *:nth-child(6) { transition-delay: 0.5s; }

/* ── Respect prefers-reduced-motion ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
