/* ============================================================
   styles.css — Hoja de estilos del sitio del concierto
   ============================================================
   Todos los colores y tipografías se definen aquí como
   variables CSS para que puedas cambiarlos fácilmente.
   ============================================================ */

/* ---------- VARIABLES EDITABLES ---------- */
:root {
  /* Colores institucionales */
  --color-bg:          #F7F3EC;  /* Fondo marfil / crema */
  --color-bg-alt:      #EFE9DD;  /* Fondo alterno para secciones */
  --color-wine:        #5C1A2B;  /* Vino profundo (color principal) */
  --color-wine-light:  #7A2438;  /* Vino más claro para hover */
  --color-gold:        #B8924A;  /* Dorado mate (detalles discretos) */
  --color-gold-light:  #D4B068;  /* Dorado más claro */
  --color-text:        #1E1E1E;  /* Negro / gris muy oscuro para texto */
  --color-text-soft:   #4A4A4A;  /* Gris oscuro para texto secundario */
  --color-white:       #FFFFFF;
  --color-border:      #D8CFC0;  /* Borde sutil */
  --color-overlay:     rgba(28, 12, 16, 0.82); /* Overlay del visor */

  /* Tipografías */
  --font-heading: "Georgia", "Times New Roman", serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Medidas */
  --max-width:      860px;
  --radius:         10px;
  --radius-sm:      6px;
  --spacing-section: 3.5rem;
  --touch-target:   48px;
}

/* ---------- RESET BÁSICO ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-wine); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- UTILIDADES ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: var(--spacing-section) 0; }
.section--alt { background-color: var(--color-bg-alt); }

.section-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--color-wine);
  text-align: center;
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Línea decorativa dorada */
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  margin: 0.6rem auto 2rem;
  border: none;
  border-radius: 1px;
}

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target);
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.15s ease;
  font-family: var(--font-body);
}

.btn--primary {
  background: var(--color-wine);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-wine-light);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-wine);
  border: 1.5px solid var(--color-wine);
}
.btn--ghost:hover {
  background: var(--color-wine);
  color: var(--color-white);
  text-decoration: none;
}

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-wine);
  font-weight: bold;
  letter-spacing: 0.3px;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-wine);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 300px;
  height: 100vh;
  background: var(--color-bg);
  box-shadow: -4px 0 20px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  padding: 4rem 1.5rem 1.5rem;
  gap: 0.3rem;
  transition: right 0.3s ease;
  z-index: 99;
}
.nav__menu.open { right: 0; }

.nav__link {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0.75rem 0.5rem;
  font-size: 1.05rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}
.nav__link:hover, .nav__link:focus {
  color: var(--color-wine);
  text-decoration: none;
}

.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 98;
}
.nav__overlay.show { opacity: 1; visibility: visible; }

/* ---------- HERO / PORTADA ---------- */
.hero {
  text-align: center;
  padding: 3rem 1.25rem 3.5rem;
}

.hero__image {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 3px solid var(--color-gold);
  overflow: hidden;
  background: var(--color-bg-alt);
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }

.hero__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-wine);
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--color-gold);
  font-style: italic;
  margin-bottom: 1rem;
}

.hero__institution {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.hero__details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--color-text-soft);
}

.hero__details p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.hero__details svg { flex-shrink: 0; }

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}

/* ---------- PROGRAMA ---------- */
.program-list { display: flex; flex-direction: column; gap: 1rem; }

.program-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}
.program-card:hover { box-shadow: 0 3px 14px rgba(92,26,43,0.08); }

.program-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.program-card__number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-wine);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: bold;
}

.program-card__info { flex: 1; min-width: 0; }

.program-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-wine);
  margin-bottom: 0.15rem;
}

.program-card__composer {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.program-card__chevron {
  flex-shrink: 0;
  margin-top: 4px;
  transition: transform 0.3s ease;
  color: var(--color-gold);
}
.program-card__header[aria-expanded="true"] .program-card__chevron {
  transform: rotate(180deg);
}

.program-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.program-card__body-inner {
  padding: 0 1.2rem 1.2rem 3.6rem;
}
.program-card__performers {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.program-card__performers strong { color: var(--color-wine); }
.program-card__notes {
  font-size: 0.88rem;
  color: var(--color-text-soft);
  font-style: italic;
  border-left: 2px solid var(--color-gold);
  padding-left: 0.8rem;
}

/* ---------- ACERCA DE ---------- */
.about__text {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 1.8rem;
  text-align: justify;
}

.about__fields {
  display: grid;
  gap: 0.8rem;
}
.about__field {
  display: flex;
  flex-direction: column;
  padding: 0.8rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-gold);
}
.about__field-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-soft);
  margin-bottom: 0.2rem;
}
.about__field-value {
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- GALERÍA ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--color-bg-alt);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item__caption {
  font-size: 0.78rem;
  color: var(--color-text-soft);
  padding: 0.4rem 0.2rem;
  text-align: center;
}

/* ---------- VISOR DE IMÁGENES (LIGHTBOX) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-gold);
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: var(--touch-target);
  height: var(--touch-target);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox__caption {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  padding: 0 2rem;
}

/* ---------- VIDEOS ---------- */
.video-list { display: flex; flex-direction: column; gap: 1.2rem; }

.video-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-wine);
  cursor: pointer;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.video-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28,12,16,0.25);
  transition: background 0.25s ease;
}
.video-thumb__play:hover { background: rgba(28,12,16,0.4); }
.video-thumb__play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.video-thumb__play-btn svg { color: var(--color-wine); margin-left: 3px; }

.video-card__title {
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.video-iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

/* ---------- CRÉDITOS ---------- */
.credits-list {
  display: grid;
  gap: 0.7rem;
}
.credit-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
}
.credit-item__role {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.credit-item__name {
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: right;
  font-weight: 500;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.social-link {
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: 50%;
  border: 1.5px solid var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-wine);
  transition: background 0.25s ease, color 0.25s ease;
}
.social-link:hover {
  background: var(--color-gold);
  color: var(--color-white);
  text-decoration: none;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--color-wine);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.site-footer p { font-size: 0.85rem; margin-bottom: 0.3rem; }
.site-footer a { color: var(--color-gold-light); }

/* ---------- BOTÓN VOLVER ARRIBA ---------- */
.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: 50%;
  background: var(--color-wine);
  color: var(--color-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--color-wine-light); }

/* ---------- ANIMACIONES DE ENTRADA ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPETAR "REDUCIR MOVIMIENTO" ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE: TABLET ---------- */
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .about__fields { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 2.4rem; }
}

/* ---------- RESPONSIVE: ESCRITORIO ---------- */
@media (min-width: 860px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static;
    flex-direction: row;
    height: auto;
    width: auto;
    max-width: none;
    box-shadow: none;
    padding: 0;
    gap: 1.5rem;
    background: none;
  }
  .nav__link {
    border-bottom: none;
    padding: 0.3rem 0;
    min-height: auto;
    font-size: 0.95rem;
  }
  .nav__overlay { display: none !important; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 4rem 1.25rem; }
  .hero__title { font-size: 2.8rem; }
  .section-title { font-size: 2rem; }
  body { font-size: 18px; }
}

/* ---------- ESTADO DE CARGA / ERROR ---------- */
.fallback-msg {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-soft);
  font-style: italic;
}
