/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2 {
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  font-weight: 400;
  margin: 0 0 0.6em;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  text-align: center;
}

@media (min-width: 821px) {
  h1 {
    white-space: nowrap;
    font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  }
}

.stacked-title .title-line {
  display: inline;
}

@media (max-width: 820px) {
  .stacked-title .title-line {
    display: block;
  }
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-align: center;
}

a {
  color: #000;
}

section {
  padding: clamp(5rem, 12vw, 9rem) 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* ==========================================================================
   Language toggling
   ========================================================================== */

.lang-block,
.lang-inline {
  display: none;
}

html[data-lang="en"] .lang-block[data-lang-text="en"] { display: block; }
html[data-lang="ca"] .lang-block[data-lang-text="ca"] { display: block; }
html[data-lang="es"] .lang-block[data-lang-text="es"] { display: block; }

html[data-lang="en"] .lang-inline[data-lang-text="en"] { display: inline; }
html[data-lang="ca"] .lang-inline[data-lang-text="ca"] { display: inline; }
html[data-lang="es"] .lang-inline[data-lang-text="es"] { display: inline; }

/* ==========================================================================
   Sidebars (desktop: fixed vertical, centered on viewport height)
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}

.sidebar-left {
  left: 1.5rem;
}

.sidebar-right {
  right: 1.5rem;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-left ul {
  align-items: flex-start;
}

.sidebar-right ul {
  align-items: flex-end;
}

.sidebar a {
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.4em 0.7em;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar a:hover,
.sidebar a:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

/* ==========================================================================
   Main content offset (keeps text clear of the fixed sidebars)
   ========================================================================== */

main {
  padding: 0 1.5rem;
}

@media (min-width: 821px) {
  main {
    max-width: 1500px;
    margin: 0 auto;
    padding-left: 230px;
    padding-right: 230px;
  }
}

/* ==========================================================================
   Hero / Section 1
   ========================================================================== */

.hero {
  padding-top: clamp(5rem, 14vw, 10rem);
}

.tagline {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.tagline + .tagline {
  margin-top: 1.2rem;
}

.lang-switch {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

.lang-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  background: #fff;
  color: #000;
  border: none;
  padding: 0.45em 1.1em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible,
.lang-btn.active {
  background: #000;
  color: #fff;
  outline: none;
}

/* ==========================================================================
   Songs / Section 2
   ========================================================================== */

.players {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 3rem;
}

.players iframe {
  width: 100%;
  border: none;
  height: 470px;
}

@media (min-width: 821px) {
  .songs {
    max-width: 1300px;
  }

  .players {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ==========================================================================
   Carousels / Sections 3 & 4
   ========================================================================== */

.gallery-section h2,
.poems-section h2 {
  margin-bottom: 1rem;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 3rem auto;
  max-width: 100%;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}

.carousel-track::-webkit-scrollbar {
  height: 8px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: #000;
}

.carousel-track::-webkit-scrollbar-track {
  background: #fff;
}

.carousel-track img {
  flex: 0 0 auto;
  width: min(70vw, 320px);
  height: min(70vw, 320px);
  object-fit: cover;
  scroll-snap-align: center;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.carousel-track img:hover,
.carousel-track img:focus-visible {
  opacity: 0.85;
  outline: none;
}

.carousel-btn {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: #fff;
  color: #000;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  -webkit-appearance: none;
  appearance: none;
  border: none;
  border-radius: 0;
  background-color: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.5em 0.8em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: #000;
  color: #fff;
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 0px solid #000;
  outline-offset: -4px;
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 0.75rem;
}

.lightbox-next {
  right: 0.75rem;
}

@media (max-width: 820px) {
  .lightbox-close {
    top: 4rem;
  }
}

/* ==========================================================================
   Give Me Money / Section 5
   ========================================================================== */

.shop-links {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 400px;
}

.shop-links a {
  display: block;
  width: 100%;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 0.7em 1em;
  transition: background 0.15s ease, color 0.15s ease;
}

.shop-links a:hover,
.shop-links a:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 3rem 1.5rem 6rem;
  text-align: center;
}

.copyright {
  font-size: 0.85rem;
  margin: 0;
}

@media (min-width: 821px) {
  .site-footer {
    padding-bottom: 3rem;
  }
}

/* ==========================================================================
   Mobile: sidebars become fixed top / bottom bars
   ========================================================================== */

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    top: auto;
    bottom: auto;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    background: #fff;
    overflow-x: auto;
  }

  .sidebar-left {
    top: 0;
    left: 0;
  }

  .sidebar-right {
    bottom: 0;
    right: 0;
  }

  .sidebar ul {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    min-width: max-content;
    margin: 0 auto;
  }

  .sidebar a {
    font-size: 0.72rem;
    white-space: nowrap;
    padding: 0.4em 0.6em;
  }

  main {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .site-footer {
    padding-bottom: 4.5rem;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}