/* =========================================
   GALLERY-PARALLAX.CSS
   Floating Parallax Gallery — scoped styles
   ========================================= */

/* --- SECTION WRAPPER --- */
#gallery-parallax-section {
  --gp-filter-rail: clamp(118px, 10vw, 160px);
  width: 100%;
  max-width: 100%;
  padding-top: 5vh;
  padding-bottom: 4vh;
  padding-left: clamp(160px, 15vw, 300px);
  padding-right: clamp(24px, 2vw, 48px);
  box-sizing: border-box;
  background: transparent;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

.gp-section-title {
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-align: center;
  margin: 0 0 4rem;
  padding-right: var(--gp-filter-rail);
  box-sizing: border-box;
}

html.js-pending .gp-deferred-reveal,
html.js-ready .gp-deferred-reveal {
  opacity: 0;
  visibility: hidden;
}

html.js-ready .gp-deferred-reveal.gp-is-visible {
  opacity: 1;
  visibility: visible;
}

.gp-noscript {
  max-width: 900px;
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.gp-noscript h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-raleway, sans-serif);
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--white);
}

.gp-noscript p {
  margin: 0 0 0.9rem;
  color: rgba(255, 255, 255, 0.74);
}

.gp-noscript-list {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.68);
}

.gp-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 5vw;
  width: 100%;
  max-width: 100%;
  padding-right: var(--gp-filter-rail);
  box-sizing: border-box;
  position: relative;
}

/* --- TITLE CARD --- */
.gp-title-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-raleway, sans-serif);
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.09), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  margin: 0;
  text-shadow: none; /* Applied dynamically by JS */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.4rem;
  box-sizing: border-box;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gp-title-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 8px;
}

.gp-cta-eyebrow {
  display: block;
  font-size: clamp(1.2rem, 2.4vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.92);
}

.gp-cta-copy {
  display: block;
  margin-top: 0.65rem;
  font-family: var(--font-sans, sans-serif);
  font-size: clamp(0.72rem, 0.95vw, 0.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.gp-cta-label {
  display: inline-flex;
  align-items: center;
  margin-top: 1.1rem;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.gp-cta-label::after {
  content: "";
  width: 32px;
  height: 1px;
  margin-left: 0.8rem;
  background: rgba(255, 255, 255, 0.38);
  transition: transform 0.35s ease, background 0.35s ease;
}

.gp-title-card:hover .gp-cta-label::after,
.gp-title-card:focus-visible .gp-cta-label::after {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.68);
}

/* --- SCENE CONTAINER --- */
#gp-scene {
  flex: 1;
  min-width: 0;
  position: relative;
  width: 100%;
  max-width: 1860px;
  overflow: visible;
  /* El height ahora fluirá naturalmente gracias al #gp-canvas */
  background: transparent;
}

#gp-canvas {
  position: relative;
  width: 100%;
  max-width: 100%;
  /* height set dynamically by JS based on card count */
  min-height: 100%;
}

/* --- FILTER BAR (Right Sidebar) --- */
#gp-filters-wrapper {
  position: absolute;
  top: 50vh;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 140px;
  z-index: 20;
}

.gp-filters-label {
  font-family: sans-serif;
  font-size: 12.375px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 24px;
  display: block;
}

#gallery-parallax-section .gp-filter-btn {
  font-size: 12.375px;
  letter-spacing: 0.11em;
}

#gp-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* --- CARD --- */
.gp-card {
  position: absolute;
  border-radius: 10px;
  overflow: visible; /* Changed from hidden to allow hover thumbs outside bounds */
  will-change: transform, opacity, top, left;
  transition: box-shadow 0.35s ease, transform 0.25s ease, opacity 0.45s ease;
  cursor: pointer;
}

.gp-card.gp-hidden {
  opacity: 0;
  pointer-events: none;
}

.gp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  user-select: none;
  pointer-events: none;
}

.gp-card-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  font-family: sans-serif;
  pointer-events: none;
  z-index: 2;
}

.gp-card:not(.gp-hidden):hover {
  transform: translateY(-6px) scale(1.025) !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  #gallery-parallax-section {
    padding: 10vh 5vw;
  }

  .gp-section-title {
    margin-bottom: 2.5rem;
    padding-right: 0;
  }

  .gp-layout {
    flex-direction: column-reverse;
    gap: 32px;
    padding-right: 0;
  }

  #gp-filters-wrapper {
    position: relative;
    top: 0;
    transform: none;
    width: 100%;
    align-items: center;
  }

  .gp-filters-label {
    text-align: center;
    margin-bottom: 16px;
  }

  #gp-filters {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  
  #gp-scene {
    border-radius: 10px;
    width: 100%;
  }
}
