/* =========================================================
   ==== MULTIMEDIA (GALERÍAS + VIDEOS + POPUPS ANIMADOS) ====
   ========================================================= */

/* ==== ESTRUCTURA GENERAL ==== */
.multimedia-section {
  background-color: #0c0c0c;
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 2px solid #1a1a1a;
}

.multimedia-section h1 {
  font-family: var(--font-heading, 'Oswald', sans-serif);
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--color-guitar-highlight, #d1a470);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

/* ==== GALERÍA DE IMÁGENES ==== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: #111;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item::after {
  content: "🔍";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0);
  background: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
}

.gallery-item:hover::after {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.5);
}

/* ==== SECCIÓN DE VIDEOS ==== */
.video-section {
  margin-top: 4rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
  max-width: 1200px;
  margin: 0 auto;
}

.video-card {
  position: relative;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
}

.video-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover img {
  transform: scale(1.05);
}

.video-info {
  padding: 1rem;
}

.video-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-guitar-highlight, #d1a470);
  margin-bottom: 0.5rem;
}

.video-info p {
  font-size: 0.9rem;
  color: #bbb;
}

/* ==== POPUP ANIMADO ==== */
.media-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  backdrop-filter: blur(6px);
}

.media-modal.active {
  opacity: 1;
  visibility: visible;
}

.media-modal-content {
  position: relative;
  width: min(92vw, 980px);
  max-height: 90vh;
  background: #0f0f0f;
  border-radius: 12px;
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
}

.media-modal-title {
  margin: 0 0 12px;
  color: #fff;
  text-align: center;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.media-modal-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.media-video-container iframe {
  width: min(88vw, 760px);
  height: min(50vw, 430px);
  max-height: 72vh;
  border: 0;
  border-radius: 8px;
}

.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
}

.media-nav.prev { left: 14px; }
.media-nav.next { right: 14px; }

.media-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
}

.media-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97) translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  backdrop-filter: blur(5px);
}

.media-popup.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.media-popup-content {
  position: relative;
  background: #111;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  animation: popupIn 0.4s ease forwards;
}

.media-popup-content img,
.media-popup-content video {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==== CIERRE DEL POPUP ==== */
.media-popup-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  z-index: 10;
}
.media-popup-close:hover {
  color: var(--color-guitar-highlight, #d1a470);
  transform: rotate(90deg);
}

/* ==== RESPONSIVO ==== */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .video-card img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- MULTIMEDIA: ALBUM LIGHTBOX ---- */
#album-modal.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  padding: 28px;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  visibility: hidden;
  opacity: 0;
}

#album-modal.active {
  display: flex;
  visibility: visible;
  opacity: 1;
}

#album-modal .modal-content {
  width: 90%;
  max-width: 1100px;
  max-height: 85vh;
  background: #0f0f0f;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Track: centro con la imagen visible */
.album-track {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
  box-sizing: border-box;
}

/* Each slide */
.album-slide {
  width: 100%;
  max-height: calc(85vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.album-slide img {
  max-width: 100%;
  max-height: calc(85vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  transition: transform 0.35s ease;
}

/* Prev/Next buttons (over modal edges) */
.album-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background 0.18s ease, transform 0.18s ease;
}
.album-btn:hover { background: rgba(0,0,0,0.75); transform: translateY(-50%) scale(1.04); }
.album-btn.prev { left: 18px; }
.album-btn.next { right: 18px; }

/* Close */
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 28px;
  z-index: 30;
  cursor: pointer;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .album-btn { width: 46px; height: 46px; font-size: 20px; }
  #album-modal .modal-content { width: 95%; max-height: 90vh; }
  .album-slide img { max-height: calc(90vh - 120px); }
}

/* Accessibility focus */
.album-btn:focus, .modal-close:focus { outline: 3px solid rgba(168,140,108,0.22); outline-offset: 2px; }


/* === GALERÍA DE FOTOS === */
.gallery {
  text-align: center;
  padding: 2.5rem 0 3rem;  /* 🔹 quitamos padding lateral */
  background: transparent;
  margin-top: -3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}


.gallery-grid, .video-grid {
  display: grid;
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.video-grid {
  grid-template-columns: minmax(220px, 420px);
  justify-content: center;
}

.gallery-card, .video-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-card img, .video-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-card:hover img, .video-card:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.gallery-card span, .video-card span {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 1rem;
  padding: 0.5rem 0;
  text-align: center;
  display: block;
}

/* ==== GALERÍA DE VIDEOS ==== */
.video-gallery {
  text-align: center;
  padding: 1rem 0 2rem;   /* 🔹 quitamos padding lateral */
  margin-top: -4rem;
  background: transparent;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.video-gallery .video-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-gallery .video-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.4s ease;
}

.video-gallery .video-card {
  flex: 0 0 280px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-gallery .video-card:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.video-gallery .video-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid #222;
}

.video-gallery .video-card span {
  display: block;
  padding: 0.8rem;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


/* ==== Botones de navegación ==== */
.video-gallery .video-btn {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 5;
  border-radius: 50%;
}

.video-gallery .video-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.video-gallery .video-btn.prev { left: 10px; }
.video-gallery .video-btn.next { right: 10px; }


/* === MODALES MULTIMEDIA === */
.media-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 9999;
}

.media-modal.active {
  opacity: 1;
  visibility: visible;
}

.media-modal-content {
  position: relative;
  background: #111;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
  overflow: hidden;
  transform: scale(0.96);
  opacity: 0;
  transition: all 0.45s ease;
  width: 80%;
  max-width: 1100px;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal.active .media-modal-content {
  transform: scale(1);
  opacity: 1;
}

.media-modal-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.media-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s;
}

.media-modal-close:hover {
  transform: rotate(90deg);
  color: var(--color-guitar-wood, #b38a5a);
}

.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.media-nav:hover {
  background: var(--color-guitar-wood, #b38a5a);
}

.media-nav.prev { left: 15px; }
.media-nav.next { right: 15px; }

.media-modal-title {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  color: #d1a470;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-align: center;
  width: calc(100% - 90px);
}


/* === VIDEO MODAL === */
.media-video-container {
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .media-modal-content {
    width: 95%;
  }
  .media-modal-title {
    font-size: 1rem;
  }
}

/* ==== MARCO METÁLICO DORADO UNIFICADO (fotos + videos) ==== */
.gallery-card, .video-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid rgba(209, 164, 112, 0.2); /* marco dorado sutil */
  background-color: #0e0e0e;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, filter 0.4s ease;
}

.gallery-card:hover, .video-card:hover {
  transform: scale(1.04);
  border-color: rgba(209, 164, 112, 0.5);
  box-shadow: 0 0 18px rgba(209, 164, 112, 0.4);
  filter: brightness(0.95);
}

.gallery-card img, .video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-card:hover img, .video-card:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* Texto inferior */
.gallery-card span, .video-card span {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(209, 164, 112, 0.25);
}

/* === CORRECCIÓN: RESPLANDOR DORADO TAMBIÉN EN VIDEOS === */
.video-gallery .video-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid rgba(209, 164, 112, 0.2); /* marco dorado */
  background-color: #0e0e0e;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, filter 0.4s ease;
}

.video-gallery .video-card:hover {
  transform: scale(1.04);
  border-color: rgba(209, 164, 112, 0.5);
  box-shadow: 0 0 18px rgba(209, 164, 112, 0.4);
  filter: brightness(0.95);
}

.video-gallery .video-card img {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.video-gallery .video-card:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.gallery h2, .video-gallery h2 {
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-highlight, #d1a470);
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.gallery h2::after, .video-gallery h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--color-highlight, #d1a470);
  border-radius: 2px;
}

/* === Uniformidad de altura con el resto de páginas === */
main {
  padding-bottom: 40px;
}

/* === CORRECCIÓN DE ALTURA DEL FOOTER EN MULTIMEDIA === */
#global-footer .site-footer {
  padding: 0.6rem 0.8rem !important;
  line-height: 1.2 !important;
}

#global-footer .footer-container {
  align-items: center !important;
  gap: 6px !important;
  min-height: auto !important;
}

/* Evita que el main empuje el footer innecesariamente */
.multimedia-section,
.gallery,
.video-gallery {
  margin-bottom: 0 !important;
  padding-bottom: 2rem !important; /* suficiente aire sin elevar el footer */
}

/* El padding global de main solo en multimedia */
main {
  padding-bottom: 0 !important;
}

/* === CORRECCIÓN DE ALTURA DEL FOOTER EN MULTIMEDIA === */
.gallery,
.video-gallery {
  padding-bottom: 0;
  margin-bottom: 0;
}

.page-banner.multimedia {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 60px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .page-banner.multimedia {
    padding: 0 24px;
  }
}

.multimedia-section {
  padding-bottom: 2rem; /* conservamos respiración visual moderada */
}

main {
  padding-bottom: 20px; /* mantiene coherencia con otras páginas */
}

/* === AJUSTE GLOBAL DE ALTURA Y MÁRGENES === */
body, main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  margin: 0 auto;
  width: 100%;
  max-width: 1200px;
  padding-bottom: 40px; /* espacio seguro para footer */
}

.page-banner,
.gallery,
.video-gallery,
.merch-section {
  margin-bottom: 40px !important; /* separa del footer */
}