html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Fix for sticky nav covering titles */
}

:root {
  --color-bg: #0a0a0a;
  --color-text: #f0f0f0;
  --color-accent: #b24bf3; /* El lila dels pòsters */
  --color-accent-dim: #7a2aab;
  --color-paper: #e3e3e3;
  --color-black: #000;

  --font-display: 'Black Ops One', cursive;
  --font-body: 'Courier Prime', monospace;
}

/* --- Reset & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Efecte de soroll de fons (Noise texture) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}

/* --- Components --- */
.container {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-black);
  padding: 10px 25px;
  font-weight: bold;
  text-transform: uppercase;
  border: 2px solid var(--color-accent);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.btn:hover {
  background: transparent;
  color: var(--color-accent);
  box-shadow: 4px 4px 0 var(--color-accent);
  transform: translate(-2px, -2px);
}

/* Títols amb efecte "glitch" estàtic */
h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1;
}

h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-shadow: 3px 3px 0 var(--color-accent-dim);
  border-bottom: 4px solid var(--color-accent);
  display: inline-block;
  padding-right: 20px;
  transform: rotate(-1deg);
}

/* --- Header / Hero --- */
header {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden; /* Important per si la imatge es mou */

  /* MÀGIA CSS AQUÍ: */
  background-color: #000; /* Color de base */
  background-image: 
        /* Capa 1: Un degradat lila semitransparent per sobre */
    linear-gradient(to bottom, rgba(178, 75, 243, 0.4) 0%, rgba(0, 0, 0, 0.9) 80%),
    /* Capa 2: La teva imatge "punk/feminista" (POSA LA TEVA URL AQUÍ) */
    url('../img/hero-background.jpg');

  background-size: cover;
  background-position: center center;
  /* Això fusiona la imatge amb el negre i el lila, donant un look de serigrafia fosca */
  background-blend-mode: hard-light;

  /* Aplicant filtres animats per canviar la tonalitat */
  animation: hero-tonality 8s infinite alternate ease-in-out;
}

/* Opcional: Un efecte parallax molt subtil només amb CSS - Desactivat per no conflicte amb animació */
/* header:hover {
    background-position: center 48%; 
    transition: background-position 0.5s ease-out; 
} */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(178, 75, 243, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(122, 42, 171, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 15% 85%, rgba(122, 42, 171, 0.2) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
  background-size:
    cover,
    cover,
    cover,
    300px 300px;
  z-index: 0;
  animation: lights-pulse 6s infinite alternate ease-in-out;
}

header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(10, 10, 10, 1) 100%);
  z-index: 1;
}

header > * {
  position: relative;
  z-index: 2;
}

@keyframes hero-tonality {
  0% {
    filter: hue-rotate(0deg) saturate(100%) brightness(100%);
  }
  50% {
    filter: hue-rotate(15deg) saturate(120%) brightness(105%);
  }
  100% {
    filter: hue-rotate(0deg) saturate(90%) brightness(95%);
  }
}

@keyframes lights-pulse {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

header h1 {
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.9;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(178, 75, 243, 0.5); /* Slight glow for text too */
}

header h1 span {
  display: block;
  color: var(--color-accent);
}

.hero-meta {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  border: 1px dashed var(--color-accent);
  padding: 10px;
  transform: rotate(1deg);
}

.event-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  width: 100%;
  max-width: 900px;
}

.info-item {
  border: 1px dashed var(--color-accent);
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-item:hover {
  background: rgba(178, 75, 243, 0.1);
  border-style: solid;
}

.info-item h3 {
  color: var(--color-accent);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.info-item p {
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 1.1rem;
}

/* --- Nav --- */
nav {
  position: sticky;
  top: 0;
  background: var(--color-black);
  border-bottom: 2px solid var(--color-accent);
  z-index: 100;
  padding: 1rem 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 0 10px;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto; /* Allow width to adjust based on aspect ratio */
  height: 50px;
  transition: transform 0.2s ease;
  border: none !important;
  padding: 0 !important;
  margin-right: 1.5rem;
}

.nav-logo img {
  height: 100%;
  width: auto; /* Mantiene la proporción original de la Q */
  object-fit: contain;
}

.nav-logo:hover {
  transform: scale(1.1) rotate(-5deg);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  font-weight: bold;
  text-transform: uppercase;
}
nav a:hover {
  color: var(--color-accent);
}

.lang-switch {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  margin-left: 20px;
}
.lang-switch button {
  background: none;
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  padding: 2px 5px;
  cursor: pointer;
  font-family: var(--font-body);
}
.lang-switch button.active {
  background: var(--color-accent);
  color: var(--color-black);
}

/* --- Sections Generics --- */
section {
  padding: 4rem 0;
  position: relative;
}

/* Separadors estil paper estripat */
.torn-separator {
  height: 30px;
  background: var(--color-accent);
  clip-path: polygon(
    0% 10%,
    5% 80%,
    10% 10%,
    15% 90%,
    20% 10%,
    25% 80%,
    30% 10%,
    35% 90%,
    40% 10%,
    45% 80%,
    50% 10%,
    55% 90%,
    60% 10%,
    65% 80%,
    70% 10%,
    75% 90%,
    80% 10%,
    85% 90%,
    90% 10%,
    95% 80%,
    100% 10%,
    100% 100%,
    0% 100%
  );
  margin-bottom: 3rem; /* fix subpixel rendering */
}

/* --- Line Up / Concerts --- */
.band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.band-card {
  background: #111;
  border: 1px solid #333;
  padding: 1rem;
  position: relative;
  transition: 0.3s;
}

.band-card:hover {
  border-color: var(--color-accent);
}

.band-img {
  width: 100%;
  height: 400px;
  background-color: #333;
  margin-bottom: 1rem;
  filter: grayscale(100%) contrast(120%);
  transition: 0.3s;
  object-fit: cover;
  object-position: top;
}

.band-card:hover .band-img {
  filter: grayscale(0%) contrast(100%);
}

.band-external-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.external-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--color-accent);
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background: rgba(178, 75, 243, 0.1);
}

.external-link:hover {
  border-color: var(--color-accent);
  background: rgba(178, 75, 243, 0.2);
  transform: translateY(-2px);
}

.external-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Voluntariat --- */
#voluntaris {
  background-color: var(--color-paper);
  color: var(--color-black);
  clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%); /* Lleuger angle */
  padding: 5rem 0;
}

#voluntaris h2 {
  border-color: var(--color-black);
  text-shadow: none;
}

.roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2rem 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.roles-list li {
  background: var(--color-black);
  color: var(--color-paper);
  padding: 5px 15px;
  transform: rotate(-2deg);
}
.roles-list li:nth-child(even) {
  transform: rotate(2deg);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 3rem;
  border-top: 1px solid #333;
  font-size: 0.8rem;
  opacity: 0.8;
  background: #000;
}

footer a {
  color: var(--color-paper);
  text-decoration: underline;
}
footer a:hover {
  color: #fff;
}

/* Helpers */
.text-center {
  text-align: center;
}
.mb-2 {
  margin-bottom: 2rem;
}

/* --- Activitats Side-by-Side --- */
.activity-split {
  display: flex;
  gap: 3rem;
  align-items: center;
  background: #111;
  border: 1px solid #333;
  padding: 2.5rem;
  margin-top: 2rem;
  transition: border-color 0.3s;
}

.activity-split:hover {
  border-color: var(--color-accent);
}

.activity-image {
  flex: 1;
  min-width: 300px;
}

.activity-image img {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--color-accent);
  box-shadow: 10px 10px 0 rgba(178, 75, 243, 0.2);
}

.activity-content {
  flex: 1.2;
  min-width: 300px;
}

.activity-content h3 {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  transform: rotate(-1deg);
}

.activity-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.speakers-list,
.schedule-list {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #444;
}

.speakers-list h4,
.schedule-list h4 {
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.speakers-list p,
.schedule-list p {
  font-weight: bold;
  font-style: italic;
  opacity: 0.9;
}

/* --- Mercadillo --- */
.mercadillo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.mercadillo-card {
  background: #111;
  border: 1px solid #333;
  padding: 0.5rem; /* Reduced padding */
  position: relative;
  transition: 0.3s;
}

.mercadillo-card:hover {
  border-color: var(--color-accent);
}

.mercadillo-img {
  width: 100%;
  height: 300px; /* Fixed height to force crop */
  background-color: transparent;
  margin-bottom: 0.5rem;
  filter: grayscale(100%) contrast(120%);
  transition: 0.3s;
  object-fit: cover; /* Zoom in/crop */
  object-position: top; /* Keep top, crop bottom (player) */
}

.mercadillo-card:hover .mercadillo-img {
  filter: grayscale(0%) contrast(100%);
}

.mercadillo-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: inherit; /* Inherit form parent link (white -> accent on hover) */
}

.mercadillo-card p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  nav .container {
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 1rem;
  }

  .nav-main {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .nav-logo {
    margin-right: 0;
    margin-bottom: 0.5rem;
    transform: scale(1.1); /* Slightly larger on mobile for presence */
  }

  nav ul {
    justify-content: center;
    width: 100%;
    gap: 1rem 1.5rem;
  }

  .lang-switch {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .activity-split {
    flex-direction: column;
    padding: 1.5rem;
    gap: 2rem;
  }

  header h2 {
    font-size: 1.5rem;
    letter-spacing: 2px !important;
  }
}

#map {
  width: 100%;
  height: 100%;
  filter: grayscale(0.8);
  transition: filter 0.5s ease;
}

#map:hover {
  filter: grayscale(0.1);
}
