:root {
  --bg-primary: #faf6ef;
  --bg-secondary: #f3ece0;
  --bg-card: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.92);
  --text-primary: #2a2118;
  --text-secondary: #5c4d3c;
  --text-muted: #8a7965;
  --gold-primary: #b88928;
  --gold-light: #e2c16b;
  --gold-dark: #8c6514;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #b38422 50%, #8f6510 100%);
  --gold-soft-bg: rgba(212, 175, 55, 0.12);
  --border-gold: rgba(184, 137, 40, 0.28);
  --border-subtle: rgba(92, 77, 60, 0.12);
  --shadow-soft: 0 12px 34px rgba(42, 33, 24, 0.08);
  --shadow-frame: 0 18px 42px rgba(42, 33, 24, 0.14);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-theme="nocturna"] {
  --bg-primary: #110f0d;
  --bg-secondary: #191612;
  --bg-card: #211c17;
  --bg-elevated: rgba(28, 24, 19, 0.92);
  --text-primary: #f7efe2;
  --text-secondary: #d4c4ae;
  --text-muted: #9b8b76;
  --gold-primary: #dfba53;
  --gold-light: #f3d98b;
  --gold-dark: #b68d2c;
  --gold-soft-bg: rgba(223, 186, 83, 0.14);
  --border-gold: rgba(223, 186, 83, 0.32);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-frame: 0 20px 50px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

.container {
  width: min(1320px, 92%);
  margin: 0 auto;
}

/* ==================== PANTALLA DE ACCESO PRIVADO ==================== */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(184, 137, 40, 0.15), transparent 50%),
    var(--bg-primary);
}

.auth-card {
  width: min(520px, 100%);
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 24px;
  padding: 3rem 2.4rem;
  text-align: center;
  box-shadow: var(--shadow-frame);
  position: relative;
}

.auth-ornament-top {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.auth-monogram {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  background: var(--gold-soft-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.auth-monogram .amp {
  font-family: var(--font-script);
  font-size: 1.6rem;
  font-weight: 400;
}

.auth-script-title {
  font-family: var(--font-script);
  font-size: 3.1rem;
  font-weight: 400;
  color: var(--gold-primary);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.auth-verse {
  background: var(--bg-secondary);
  border-left: 3px solid var(--gold-primary);
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 1.8rem;
}

.auth-verse cite {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  margin-top: 0.25rem;
  font-weight: 600;
}

.auth-form {
  text-align: left;
}

.auth-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.55rem;
  font-weight: 500;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-gold);
  border-radius: 12px;
  background: var(--bg-primary);
  padding: 0.25rem 0.6rem;
  margin-bottom: 1rem;
}

.auth-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.7rem 0.6rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  outline: none;
}

.auth-error {
  color: #c93b3b;
  background: rgba(201, 59, 59, 0.1);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.auth-footer-note {
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== BOTONES ==================== */
.btn-gold-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--gold-gradient);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.82rem 1.55rem;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(184, 137, 40, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-gold-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(184, 137, 40, 0.42);
}

.btn-gold-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border-gold);
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gold-secondary:hover {
  background: var(--gold-soft-bg);
  border-color: var(--gold-primary);
}

.btn-pill-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-soft-bg);
  color: var(--gold-primary);
  border: 1px solid var(--border-gold);
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill-gold:hover {
  background: var(--gold-gradient);
  color: #fff;
}

.btn-pill-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill-outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.35rem;
  color: var(--text-secondary);
}

.btn-full {
  width: 100%;
}

/* ==================== BARRA DE NAVEGACIÓN ==================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-gold);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(184, 137, 40, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.brand-text span {
  font-size: 0.74rem;
  color: var(--gold-primary);
  letter-spacing: 0.06em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-primary);
  background: var(--gold-soft-bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==================== SECCIÓN 1: HERO ==================== */
.hero-section {
  position: relative;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 175, 55, 0.14), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(184, 137, 40, 0.12), transparent 48%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.eyebrow-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-primary);
  background: var(--gold-soft-bg);
  border: 1px solid var(--border-gold);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 1.2rem;
}

.hero-title .script-accent {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 4.6vw, 4.2rem);
  font-weight: 400;
  color: var(--gold-primary);
  margin-bottom: 0.15rem;
}

.gold-amp {
  font-family: var(--font-script);
  color: var(--gold-primary);
  font-weight: 400;
}

.hero-lead {
  font-size: 1.06rem;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
  max-width: 640px;
}

.hero-verse-box {
  display: inline-flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-primary);
  padding: 0.9rem 1.35rem;
  border-radius: 12px;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-soft);
}

.verse-quote {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 600;
  color: var(--text-primary);
}

.verse-ref {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 700;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.2rem;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-item strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--gold-primary);
}

.metric-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.metric-divider {
  width: 1px;
  height: 34px;
  background: var(--border-subtle);
}

.museum-frame-double {
  position: relative;
  padding: 1rem;
}

.frame-card {
  background: var(--bg-card);
  padding: 14px 14px 18px;
  border-radius: 18px;
  border: 1.5px solid var(--border-gold);
  box-shadow: var(--shadow-frame);
}

.frame-card img {
  width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.frame-card-main img {
  aspect-ratio: 4 / 3;
}

.frame-card-Before {
  position: absolute;
  bottom: -20px;
  left: -24px;
  width: 44%;
  transform: rotate(-3deg);
  z-index: 2;
}

.frame-card-Before img {
  aspect-ratio: 3 / 4;
  object-position: top center;
}

.frame-caption {
  margin-top: 0.65rem;
  text-align: center;
}

.frame-caption strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.frame-caption span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==================== SECCIONES GENERALES ==================== */
.section-block {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ==================== SECCIÓN 2: EXPOSICIÓN Y LÍNEA DE TIEMPO ==================== */
.timeline-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.sala-tab-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.85rem 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.3rem;
}

.sala-tab-btn:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.sala-tab-btn.active {
  background: var(--gold-soft-bg);
  border-color: var(--gold-primary);
  box-shadow: 0 8px 22px rgba(184, 137, 40, 0.18);
}

.sala-tab-year {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.sala-tab-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sala-tab-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.active-sala-banner {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: 20px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.sala-banner-info {
  max-width: 680px;
}

.sala-era-pill {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: var(--gold-soft-bg);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.sala-banner-info h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.15rem;
}

.sala-subtitle-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-primary);
  margin-bottom: 0.45rem;
}

.sala-desc-text {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.sala-banner-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
}

.sala-stats-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.badge-item {
  font-size: 0.8rem;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
}

.badge-gold {
  background: var(--gold-soft-bg);
  color: var(--gold-primary);
  border: 1px solid var(--border-gold);
}

.sala-action-buttons {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Barra de selección múltiple */
.selection-toolbar {
  position: sticky;
  top: 72px;
  z-index: 80;
  background: var(--bg-card);
  border: 2px solid var(--gold-primary);
  border-radius: 16px;
  padding: 0.85rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-frame);
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
}

.selection-badge {
  background: var(--gold-gradient);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.selection-buttons {
  display: flex;
  gap: 0.6rem;
}

/* Cuadrícula de Fotos Tipo Museo */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.6rem;
}

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-frame);
}

.photo-card.selected {
  border: 2px solid var(--gold-primary);
  background: var(--gold-soft-bg);
}

.photo-mat-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.photo-mat-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform-origin: center top;
  display: block;
  transition: transform 0.45s ease;
}

.photo-card:hover .photo-mat-frame img {
  transform: scale(1.04);
}

.photo-select-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(20, 16, 12, 0.68);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.photo-card.selected .photo-select-check {
  background: var(--gold-primary);
  border-color: #fff;
}

.photo-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(160, 28, 28, 0.82);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.photo-delete-btn:hover {
  background: #c93b3b;
  transform: scale(1.08);
}

.photo-index-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(20, 16, 12, 0.72);
  color: #fff;
  font-size: 0.74rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.photo-card-body {
  padding: 0.85rem 0.35rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.photo-meta-text {
  overflow: hidden;
}

.photo-meta-text h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-meta-text span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.photo-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.dl-count-chip {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold-primary);
  background: var(--gold-soft-bg);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.btn-dl-single {
  background: var(--gold-gradient);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ==================== SECCIÓN 3: VOCACIÓN (MÉDICO E INGENIERO) ==================== */
.section-vocation {
  background: var(--bg-secondary);
}

.vocation-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: stretch;
}

.vocation-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: 22px;
  padding: 2.2rem;
  box-shadow: var(--shadow-soft);
}

.vocation-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
}

.vocation-portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--gold-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.vocation-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.vocation-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-primary);
  margin-bottom: 0.2rem;
}

.vocation-meta h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  line-height: 1.15;
}

.vocation-degree {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.vocation-body {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.vocation-pillars {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.vocation-pillars li + li {
  margin-top: 0.4rem;
}

.vocation-centerpiece {
  display: flex;
  align-items: center;
  justify-content: center;
}

.synergy-emblem {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px dashed var(--gold-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

.synergy-years {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-primary);
}

.synergy-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.synergy-emblem p {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ==================== SECCIÓN 4: PACTO Y TARJETAS ==================== */
.vows-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.vow-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

.vow-img-frame {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.vow-img-frame img {
  width: 100%;
  display: block;
  transition: transform 0.35s ease;
}

.vow-img-frame:hover img {
  transform: scale(1.02);
}

.vow-card-footer {
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.vow-card-footer h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.vow-card-footer span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.gratitude-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.6rem;
}

.gratitude-img {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  padding: 10px;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.gratitude-img img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* ==================== SECCIÓN 5: ÁRBOL GENEALÓGICO ==================== */
.section-tree {
  background:
    radial-gradient(circle at 50% 10%, rgba(212, 175, 55, 0.1), transparent 60%),
    var(--bg-secondary);
}

.family-tree-container {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.tree-level {
  position: relative;
}

.tree-level-label {
  text-align: center;
  margin-bottom: 1.2rem;
}

.tree-level-label span {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
}

.tree-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
}

.tree-branch-group {
  background: rgba(255, 255, 255, 0.35);
  border: 1px dashed var(--border-gold);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

html[data-theme="nocturna"] .tree-branch-group {
  background: rgba(255, 255, 255, 0.03);
}

.tree-branch-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.04em;
}

.tree-nodes-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
}

.tree-member-card {
  width: 215px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: 18px;
  padding: 1.2rem 0.9rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform 0.22s ease;
}

.tree-member-card:hover {
  transform: translateY(-4px);
}

.tree-member-card.protagonist {
  width: 255px;
  border-width: 2.5px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--gold-soft-bg) 100%);
}

.member-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 0.75rem;
  cursor: zoom-in;
}

.tree-member-card.protagonist .member-avatar-wrap {
  width: 116px;
  height: 116px;
}

.member-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--gold-primary);
  background: var(--bg-secondary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.member-avatar-wrap:hover img {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(184, 137, 40, 0.35);
}

.edit-avatar-btn {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.16;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.edit-avatar-btn:hover {
  opacity: 0.9;
  background: var(--gold-soft-bg);
  color: var(--gold-primary);
}

.tree-member-card h4 {
  font-family: var(--font-serif);
  font-size: 1.14rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.member-role {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.member-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==================== SECCIÓN 6: MÚSICA Y VIDEOS ==================== */
.multimedia-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
}

.music-box-card,
.cinema-box-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.music-box-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.vinyl-disc {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2420 0%, #0f0d0c 68%, #2e2924 70%, #0d0b0a 100%);
  border: 3px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.vinyl-disc.spinning {
  animation: spinVinyl 6s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tracklist {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.track-item.active {
  border-color: var(--gold-primary);
  background: var(--gold-soft-bg);
}

.track-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  flex: 1;
}

.track-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.track-text h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.track-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cinema-header {
  margin-bottom: 1.2rem;
}

.cinema-header h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
}

.cinema-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.video-player-wrapper {
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border-gold);
}

.video-player-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-selector-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.video-choice-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
}

.video-choice-btn.active {
  border-color: var(--gold-primary);
  background: var(--gold-soft-bg);
}

/* ==================== SECCIÓN 7: LIBRO DE ORO ==================== */
.guestbook-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  align-items: start;
}

.guestbook-form-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.guestbook-form-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.guestbook-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.gb-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-primary);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.gb-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.gb-entry-head strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.gb-entry-head .gb-meta-sub {
  font-size: 0.76rem;
  color: var(--gold-primary);
  font-weight: 600;
}

.gb-entry-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.gb-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.22;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.gb-action-btn:hover {
  opacity: 0.95;
  background: var(--gold-soft-bg);
  color: var(--gold-primary);
}

.gb-delete-btn:hover {
  color: #c93b3b;
}

.gb-entry-msg {
  font-size: 0.94rem;
  color: var(--text-secondary);
  white-space: pre-line;
}

.gb-edit-box {
  margin-top: 0.5rem;
}

.gb-edit-textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--gold-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.gb-edit-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ==================== REPRODUCTOR FLOTANTE ==================== */
.floating-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 95;
  background: var(--bg-card);
  border: 1.5px solid var(--gold-primary);
  border-radius: 999px;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: var(--shadow-frame);
  max-width: 330px;
}

.fp-disc-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fp-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.2;
}

.fp-info strong {
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== LIGHTBOX MODAL ==================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.95);
  display: flex;
  flex-direction: column;
  color: #fff;
}

.lightbox-topbar {
  padding: 1rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lb-counter-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-stat-pill {
  font-size: 0.82rem;
  color: #f3d98b;
}

.lb-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem 4rem;
  overflow: hidden;
}

.lb-img-container {
  max-width: 100%;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-container img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.45);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s;
}

.lb-nav-btn:hover {
  background: var(--gold-primary);
}

.lb-prev { left: 1.2rem; }
.lb-next { right: 1.2rem; }

/* ==================== MODALES (ESTADÍSTICAS Y AVATAR) ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(12, 10, 8, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-dialog {
  width: min(580px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 22px;
  padding: 1.8rem;
  box-shadow: var(--shadow-frame);
}

.modal-dialog.modal-lg {
  width: min(880px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
}

.stats-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--gold-primary);
  line-height: 1.1;
}

.stat-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stats-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stats-col h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.folder-stats-list,
.top-photos-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.folder-stat-row,
.top-photo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
}

.top-photo-row img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center top;
  margin-right: 0.65rem;
}

/* Recorte de avatar */
.avatar-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.avatar-tab {
  flex: 1;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
}

.avatar-tab.active {
  background: var(--gold-gradient);
  color: #fff;
}

.crop-stage {
  position: relative;
  width: 100%;
  max-height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  margin-bottom: 0.8rem;
}

.crop-stage img {
  width: 100%;
  display: block;
}

.crop-box {
  position: absolute;
  border: 2.5px solid #ffdf6b;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.52);
  pointer-events: none;
}

.crop-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.84rem;
}

.crop-controls input[type="range"] {
  width: 100%;
}

/* ==================== FOOTER & TOAST ==================== */
.portal-footer {
  padding: 3.5rem 0 5rem;
  text-align: center;
  background: var(--bg-secondary);
}

.footer-monogram {
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--gold-primary);
}

.portal-footer h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.footer-dates {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.25rem 0;
}

.footer-verse {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-primary);
}

.toast-notification {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 250;
  background: var(--gold-gradient);
  color: #fff;
  padding: 0.8rem 1.3rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-frame);
}

[hidden] {
  display: none !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .hero-grid,
  .vocation-grid,
  .multimedia-layout,
  .guestbook-grid,
  .stats-columns {
    grid-template-columns: 1fr;
  }
  .vocation-centerpiece {
    display: none;
  }
  .hide-md {
    display: none;
  }
}

@media (max-width: 680px) {
  .top-nav {
    padding: 0.65rem 1rem;
  }
  .nav-links {
    display: none;
  }
  .hide-sm {
    display: none;
  }
  .active-sala-banner {
    padding: 1.2rem;
  }
  .sala-banner-actions {
    align-items: flex-start;
  }
  .stats-summary-cards {
    grid-template-columns: 1fr;
  }
}

