/* style.css — Mino Cerezo Barredo — v3 */

:root {
  --bg-dark: #2C1810;
  --bg-dark-alt: #362018;
  --bg-dark-elevated: #3E2A1E;
  --bg-light: #F5E6D0;
  --bg-light-alt: #EDD9BE;
  --bg-warm: #F0DCC3;

  --ocre: #C4883A;
  --ocre-light: #D4A05A;
  --ocre-dark: #A06E2A;

  --rojo: #8B2E16;
  --rojo-light: #A84428;

  --azul: #1B3F5E;
  --azul-light: #2A5A80;
  --verde: #2D5A27;
  --verde-light: #3D7A35;

  --text-on-dark: #F5E6D0;
  --text-on-dark-secondary: #BFA88A;
  --text-on-light: #2C1810;
  --text-on-light-secondary: #5A3E2B;

  --border-light: rgba(196, 136, 58, 0.18);
  --border-dark: rgba(196, 136, 58, 0.15);
  --overlay: rgba(44, 24, 16, 0.92);
  --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.08);
  --shadow-md: 0 4px 24px rgba(44, 24, 16, 0.12);
  --shadow-lg: 0 12px 48px rgba(44, 24, 16, 0.2);
  --shadow-xl: 0 24px 64px rgba(44, 24, 16, 0.3);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.75rem;
  --text-4xl: 3.25rem;

  --leading-tight: 1.08;
  --leading-snug: 1.3;
  --leading-normal: 1.65;
  --leading-loose: 1.8;

  --header-height: 64px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  :root {
    --text-base: 1.125rem;
    --text-lg: 1.375rem;
    --text-xl: 1.75rem;
    --text-2xl: 2.5rem;
    --text-3xl: 3.5rem;
    --text-4xl: 4.5rem;
    --header-height: 72px;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-on-light);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--leading-tight); }
::selection { background: var(--ocre); color: var(--bg-dark); }

/* ── Layout ── */
.container { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

section {
  padding: clamp(5rem, 10vw, 10rem) 0;
  scroll-margin-top: var(--header-height);
  position: relative;
}

.section-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section-light { background: var(--bg-light); color: var(--text-on-light); }

.section-title {
  font-size: var(--text-2xl);
  margin-bottom: 0.4em;
  letter-spacing: -0.015em;
}

.section-subtitle {
  font-size: var(--text-lg);
  font-weight: 300;
  margin-bottom: 3rem;
  opacity: 0.7;
  max-width: 42ch;
}

/* Decorative line at section tops */
.section-light::before,
.section-dark::before {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--ocre);
  opacity: 0.35;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

#inicio::before { display: none; }

/* Grain texture on dark sections */
.section-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  z-index: 0;
}

.section-dark > * { position: relative; z-index: 1; }

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger > .fade-in:nth-child(2) { transition-delay: 0.06s; }
.fade-in-stagger > .fade-in:nth-child(3) { transition-delay: 0.12s; }
.fade-in-stagger > .fade-in:nth-child(4) { transition-delay: 0.18s; }
.fade-in-stagger > .fade-in:nth-child(5) { transition-delay: 0.24s; }
.fade-in-stagger > .fade-in:nth-child(6) { transition-delay: 0.30s; }
.fade-in-stagger > .fade-in:nth-child(7) { transition-delay: 0.36s; }
.fade-in-stagger > .fade-in:nth-child(8) { transition-delay: 0.42s; }
.fade-in-stagger > .fade-in:nth-child(9) { transition-delay: 0.48s; }

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-height);
  display: flex; align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
  background: rgba(44, 24, 16, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(196, 136, 58, 0.08);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}

.header-brand {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 400;
  letter-spacing: 0.02em; color: var(--text-on-dark);
  opacity: 0; transition: opacity 0.4s ease; white-space: nowrap;
}

.site-header.scrolled .header-brand { opacity: 1; }

.nav-links { display: none; list-style: none; gap: 2rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: var(--text-sm); font-weight: 400;
  color: var(--text-on-dark-secondary);
  transition: color 0.3s ease;
  letter-spacing: 0.04em; position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--ocre);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover, .nav-links a.active { color: var(--ocre-light); }
.nav-links a.active::after { width: 100%; }

.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px; z-index: 1010;
}
@media (min-width: 768px) { .hamburger { display: none; } }

.hamburger span {
  display: block; width: 22px; height: 1.5px; background: var(--text-on-dark);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 1005;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }

.mobile-nav a {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400;
  color: var(--text-on-dark); transition: color 0.3s ease; letter-spacing: 0.02em;
}
.mobile-nav a:hover { color: var(--ocre-light); }

/* ============================================
   HERO — Clean, solid background, left-aligned
   ============================================ */

.hero-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 0;
  background: var(--bg-dark);
}

.hero-content {
  padding: calc(var(--header-height) + 2rem) 0 4rem;
  max-width: 600px;
}

.hero-name {
  font-size: var(--text-4xl);
  color: var(--text-on-dark);
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-reveal 1s var(--ease-out-expo) 0.2s forwards;
}

.hero-rule {
  width: 48px;
  height: 2px;
  background: var(--ocre);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: hero-reveal 0.8s var(--ease-out-expo) 0.45s forwards;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--ocre);
  margin-bottom: 2rem;
  font-weight: 400;
  opacity: 0;
  transform: translateY(15px);
  animation: hero-reveal 1s var(--ease-out-expo) 0.55s forwards;
}

.hero-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--text-on-dark-secondary);
  line-height: var(--leading-loose);
  max-width: 30ch;
  position: relative;
  padding-left: 1.5em;
  opacity: 0;
  transform: translateY(15px);
  animation: hero-reveal 1s var(--ease-out-expo) 0.7s forwards;
}

.hero-quote::before {
  content: '';
  position: absolute; left: 0; top: 0.15em; bottom: 0.15em;
  width: 2px; background: var(--rojo);
}

@keyframes hero-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-on-dark-secondary);
  font-size: var(--text-xs); letter-spacing: 0.12em;
  animation: scroll-hint 2.5s ease-in-out infinite;
  z-index: 4; opacity: 0.5;
}

.scroll-indicator svg { width: 18px; height: 18px; stroke: var(--ocre); fill: none; stroke-width: 2; }

@keyframes scroll-hint {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   CITAS
   ============================================ */

.cita-mino {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-xl); line-height: var(--leading-loose);
  max-width: 36ch; position: relative; padding-left: 1.5em; margin: 3rem 0;
}
.section-dark .cita-mino { color: var(--ocre); }
.section-light .cita-mino { color: var(--ocre-dark); }

.cita-mino::before {
  content: '';
  position: absolute; left: 0; top: 0.15em; bottom: 0.15em;
  width: 2px; background: var(--rojo);
}

.cita-mino cite {
  display: block; font-size: var(--text-sm); font-style: normal;
  font-family: var(--font-body); margin-top: 0.5em; opacity: 0.6;
}

/* ============================================
   BIOGRAPHY IMAGES — Centered, contained
   ============================================ */

.bio-image-breakout {
  width: 100%;
  max-width: 680px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
  overflow: hidden;
  text-align: center;
}

.bio-image-breakout img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
  display: inline-block;
  margin: 0 auto;
}

.bio-image-breakout figcaption {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-on-light-secondary);
  padding: 0.8rem 0 0;
  font-weight: 300;
  font-style: italic;
  text-align: center;
}

/* Inline bio images (for smaller/portrait images) */
.bio-image {
  margin: 2.5rem 0;
  overflow: hidden;
  position: relative;
}

.bio-image img {
  width: 100%; height: auto; display: block;
  transition: transform 8s var(--ease-out-expo);
}

.bio-image:hover img { transform: scale(1.02); }

.bio-image figcaption {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-on-light-secondary);
  padding: 0.75rem 0 0;
  text-align: left;
  font-weight: 300;
}

.bio-image.bio-image-portrait {
  max-width: 240px;
  margin-left: auto; margin-right: auto;
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute; left: 4px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--ocre) 4%, var(--ocre) 96%, transparent);
  opacity: 0.25;
}

.timeline-item { position: relative; margin-bottom: 4.5rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute; left: -2.5rem; top: 0.4em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ocre); transform: translateX(-0.5px);
  box-shadow: 0 0 0 4px var(--bg-light), 0 0 0 5px rgba(196, 136, 58, 0.15);
}

.timeline-year {
  font-family: var(--font-body); font-weight: 400;
  font-size: var(--text-sm); color: var(--ocre-dark);
  letter-spacing: 0.08em; margin-bottom: 0.4rem; display: inline-block;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: var(--text-xl); font-weight: 700;
  margin-bottom: 1.2rem; color: var(--text-on-light);
  letter-spacing: -0.01em;
}

.timeline-text {
  margin-bottom: 1.2rem; color: var(--text-on-light-secondary); max-width: 62ch;
}
.timeline-text:last-of-type { margin-bottom: 0; }

/* ============================================
   GALLERY
   ============================================ */

.gallery-intro {
  max-width: 550px; margin-bottom: 0.75rem;
  color: var(--text-on-dark-secondary); font-size: var(--text-lg); font-weight: 300;
}

.gallery-counter {
  font-size: var(--text-sm); color: var(--ocre-light);
  margin-bottom: 2.5rem; letter-spacing: 0.03em; opacity: 0.6;
}

.gallery-filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5em 1.4em;
  border: 1px solid var(--border-dark); background: transparent;
  color: var(--text-on-dark-secondary);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400;
  border-radius: 2px; cursor: pointer;
  transition: all 0.3s ease; letter-spacing: 0.02em;
}

.filter-btn:hover { border-color: var(--ocre); color: var(--ocre-light); }
.filter-btn.active { background: var(--ocre); color: var(--bg-dark); border-color: var(--ocre); font-weight: 600; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.obra { cursor: pointer; }
.obra figure { margin: 0; }

.obra-img {
  overflow: hidden;
  position: relative;
  background: var(--bg-dark-alt);
  aspect-ratio: 4/3;
}

.obra-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s var(--ease-out-expo), filter 0.6s ease;
}

.obra:hover .obra-img img {
  transform: scale(1.06);
}

/* Color overlay on hover */
.obra-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(139, 46, 22, 0.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.obra:hover .obra-img::after { opacity: 1; }

.obra figcaption { padding: 0.85rem 0; }
.obra figcaption h3 {
  font-family: var(--font-display); font-size: var(--text-base);
  font-weight: 700; margin-bottom: 0.2em; line-height: var(--leading-snug);
}
.obra figcaption p { font-size: var(--text-sm); opacity: 0.55; font-weight: 300; }
.obra.hidden { display: none; }

.gallery-link {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 600; color: var(--ocre-light); font-size: var(--text-base);
  transition: color 0.3s ease, gap 0.3s ease; margin-top: 1rem;
}
.gallery-link:hover { color: var(--rojo-light); gap: 0.7em; }

/* ============================================
   LIGHTBOX — with share button
   ============================================ */

.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(44, 24, 16, 0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease; padding: 1.5rem;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-inner {
  max-width: 850px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}

.lightbox-inner img {
  max-width: 100%; max-height: 70vh; object-fit: contain;
}

.lightbox-caption { text-align: center; color: var(--text-on-dark); }
.lightbox-caption h3 { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: 0.3em; font-weight: 400; }
.lightbox-caption p { font-size: var(--text-sm); color: var(--text-on-dark-secondary); max-width: 520px; line-height: var(--leading-normal); font-weight: 300; }

.lightbox-share {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.2rem;
  padding: 0.6em 1.5em;
  background: rgba(196, 136, 58, 0.1);
  border: 1px solid rgba(196, 136, 58, 0.3);
  color: var(--ocre-light);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 100px;
}
.lightbox-share:hover {
  background: rgba(196, 136, 58, 0.2);
  border-color: var(--ocre);
  color: var(--text-on-dark);
}
.lightbox-share svg { flex-shrink: 0; }
.lightbox-share.copied {
  background: rgba(45, 90, 39, 0.15);
  border-color: rgba(45, 90, 39, 0.4);
  color: var(--verde-light);
}

.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; color: var(--text-on-dark-secondary);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s ease;
}
.lightbox-close:hover { color: var(--ocre); }

/* ============================================
   MAP
   ============================================ */

#mapa-murales { height: 450px; margin-top: 2rem; z-index: 1; border: 1px solid rgba(196, 136, 58, 0.12); }
@media (min-width: 768px) { #mapa-murales { height: 550px; } }

.leaflet-tile-pane { filter: sepia(25%) saturate(85%) brightness(95%); }
.leaflet-popup-content-wrapper { border-radius: 4px; font-family: var(--font-body); font-size: var(--text-sm); box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 0.8rem 1rem; line-height: 1.5; }
.leaflet-popup-content strong { font-family: var(--font-display); font-weight: 700; display: block; margin-bottom: 0.3em; }
.mapa-legend { margin-top: 1.2rem; font-size: var(--text-sm); color: var(--text-on-light-secondary); font-style: italic; opacity: 0.6; }

/* ============================================
   TESTIMONIOS
   ============================================ */

.testimonios-scroll {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.testimonio-card {
  background: var(--bg-dark-elevated);
  padding: 2rem 1.75rem;
  position: relative;
  border-left: 2px solid var(--rojo);
  transition: background 0.4s ease, transform 0.4s var(--ease-out-expo);
}

.testimonio-card:hover { background: var(--bg-dark-alt); transform: translateY(-2px); }

.testimonio-card::before {
  content: '\201C';
  font-family: var(--font-display); font-size: 3.5rem;
  color: var(--ocre); opacity: 0.12;
  position: absolute; top: 0.4rem; left: 1rem; line-height: 1;
}

.testimonio-text {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-base); line-height: var(--leading-loose);
  color: var(--text-on-dark); margin-bottom: 1.2rem; padding-top: 0.8rem;
}

.testimonio-author { font-size: var(--text-sm); font-weight: 600; color: var(--ocre-light); }
.testimonio-context { font-size: var(--text-xs); color: var(--text-on-dark-secondary); margin-top: 0.2em; }

.testimonios-photo { margin-top: 4rem; text-align: center; }
.testimonios-photo img {
  max-width: 560px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  object-fit: contain;
}
.testimonios-photo figcaption { font-family: var(--font-display); font-style: italic; font-size: var(--text-sm); color: var(--text-on-dark-secondary); margin-top: 1rem; }

/* CTA button */
.testimonios-cta {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-dark);
}

.testimonios-cta p {
  font-size: var(--text-base);
  color: var(--text-on-dark-secondary);
  margin-bottom: 1.2rem;
  font-weight: 300;
}

.btn-testimonio {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.7em 2em;
  border: 1px solid var(--ocre);
  color: var(--ocre-light);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.btn-testimonio:hover {
  background: var(--ocre);
  color: var(--bg-dark);
}

/* ============================================
   LEGADO
   ============================================ */

.legado-grid {
  display: grid; gap: 1.25rem; margin-bottom: 3.5rem;
}
@media (min-width: 768px) { .legado-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .legado-grid { grid-template-columns: repeat(3, 1fr); } }

/* Featured card spans 2 columns */
.legado-card-featured {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .legado-card-featured {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .legado-card-featured .legado-card-img {
    margin: -1.75rem 0 -1.75rem -1.75rem;
    border-radius: 0;
  }
  .legado-card-featured h3,
  .legado-card-featured p,
  .legado-card-featured a {
    padding-left: 0;
  }
}

.legado-card {
  border: 1px solid var(--border-light);
  padding: 1.75rem;
  transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease-out-expo);
  position: relative;
}

.legado-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(196, 136, 58, 0.3);
  transform: translateY(-3px);
}

.legado-card h3 { font-size: var(--text-base); margin-bottom: 0.6em; line-height: var(--leading-snug); }
.legado-card p { font-size: var(--text-sm); color: var(--text-on-light-secondary); margin-bottom: 1.2rem; font-weight: 300; line-height: var(--leading-normal); }
.legado-card a { font-size: var(--text-sm); font-weight: 600; color: var(--ocre-dark); transition: color 0.3s ease; }
.legado-card a:hover { color: var(--rojo); }

.legado-card-img {
  overflow: hidden; margin: -1.75rem -1.75rem 1.25rem; aspect-ratio: 16/9;
}
.legado-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}
.legado-card:hover .legado-card-img img { transform: scale(1.03); }

.legado-credits {
  text-align: center; padding-top: 3.5rem; border-top: 1px solid var(--border-light);
}
.legado-credits p { font-size: var(--text-sm); color: var(--text-on-light-secondary); margin-bottom: 0.5em; font-weight: 300; }
.legado-credits strong { color: var(--text-on-light); }

.fuentes-list { margin-top: 2.5rem; text-align: left; max-width: 700px; margin-left: auto; margin-right: auto; }
.fuentes-list h3 { font-size: var(--text-base); margin-bottom: 1rem; }
.fuentes-list ul { list-style: none; padding: 0; }
.fuentes-list li { margin-bottom: 0.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid rgba(196, 136, 58, 0.07); }
.fuentes-list li:last-child { border-bottom: none; }
.fuentes-list a { font-size: var(--text-sm); color: var(--ocre-dark); transition: color 0.3s ease; font-weight: 400; }
.fuentes-list a:hover { color: var(--rojo); }
.fuente-desc { display: block; font-size: var(--text-xs); color: var(--text-on-light-secondary); margin-top: 0.15em; font-weight: 300; }

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--bg-dark); color: var(--text-on-dark-secondary);
  padding: 4rem 0 3rem; text-align: center; position: relative;
}

.site-footer::before {
  content: '';
  display: block; width: 32px; height: 1px;
  background: var(--ocre); opacity: 0.3;
  margin: 0 auto 2.5rem;
}

.footer-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-lg); color: var(--ocre);
  margin-bottom: 2rem; max-width: 30ch;
  margin-left: auto; margin-right: auto;
  line-height: var(--leading-loose); opacity: 0.8;
}

.footer-credit { font-size: var(--text-sm); margin-bottom: 0.3em; font-weight: 300; letter-spacing: 0.02em; }
.footer-year { font-size: var(--text-xs); opacity: 0.35; letter-spacing: 0.1em; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
  .testimonios-scroll { grid-template-columns: 1fr; }
  .timeline { padding-left: 2rem; }
  .timeline-dot { left: -2rem; }
}

@media (min-width: 1200px) {
  .container { max-width: 880px; }
  .container-wide { max-width: 1140px; }
}

@media print {
  .site-header, .scroll-indicator, .hamburger, .mobile-nav,
  .gallery-filters, .lightbox { display: none !important; }
  section { padding: 2rem 0; break-inside: avoid; }
  body { background: white; color: black; }
}
