:root {
  --red: #d54744;
  --white: #fffefe;
  --contrast: #f09ba1;
  --black: #000;
  --beige: #fdeec9;
  --main-bg-color: var(--red);
}

* {
  box-sizing: border-box;
}

html {
  font-family: TuskerMedium, sans-serif;
  font-size: 2rem;
}

h2 {
  margin: 0;
}

h3 {
  font-size: 1.6rem;
  margin: 0;
}

ul {
  list-style-type: none;
}

a {
  color: inherit;
}

body {
  font-family: TuskerMedium, sans-serif;
  background-color: var(--main-bg-color);
  min-height: 100vh;
  width: 100vw;
}

.seasonpass-highlight .trix-content div {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-direction: column;
}

.full-image-bg {
  background-image: url("/assets/FORMA_VERD.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position-x: center;
}

.hidden {
  display: none;
}

/* Header and Navigation */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  background-color: var(--beige);
}

.logo-with-bubbles {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  padding: 1rem 0;
}

.header-bubbles {
  flex-shrink: 0;
}

.header-bubbles-left {
  align-self: flex-start;
}

.header-bubbles-right {
  align-self: flex-end;
}

.logo-link {
  display: block;
  text-decoration: none;
  width: 50%;
  max-width: 500px;
  margin: 0 1rem;
}

.logo-festival {
  width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .header-bubbles {
    width: 80px;
    height: 120px;
  }

  .logo-link {
    width: 60%;
  }
}

@media (max-width: 480px) {
  .header-bubbles {
    display: none;
  }

  .logo-link {
    width: 85%;
    margin: 1rem auto;
  }
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.hamburger span {
  width: 2rem;
  height: 0.25rem;
  background: var(--white);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Navigation */
.main-nav {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0;
}

.main-nav ul#navMenu {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  margin: 0;
}

.main-nav .nav-link {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: block;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.main-nav .nav-link:hover {
  color: var(--contrast);
  border-bottom-color: var(--contrast);
}

.main-nav .nav-link.active {
  color: var(--contrast);
  border-bottom-color: var(--contrast);
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: " ▼";
  font-size: 0.5em;
  vertical-align: middle;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.9);
  min-width: 152px;
  border-radius: 4px;
  padding: 0.5rem 0;
  z-index: 1000;
  list-style: none;
  margin: 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-link {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  color: var(--contrast);
  background: rgba(255, 255, 255, 0.1);
}

/* Page Content Styles */
#pageContent {
  width: 100%;
}

.page-content {
  width: 100%;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  margin: 1rem 0;
  border-radius: 8px;
}

.page-header {
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--main-bg-color);
  padding-bottom: 1rem;
}

.page-title {
  color: var(--main-bg-color);
  text-transform: uppercase;
  font-size: 2rem;
  margin: 0;
}

.page-body {
  font-family: TuskerMedium;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--black);
}

.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body h5,
.page-body h6 {
  font-family: TuskerMedium;
  color: var(--main-bg-color);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.page-body h1 {
  font-size: 1.8rem;
}
.page-body h2 {
  font-size: 1.5rem;
}
.page-body h3 {
  font-size: 1.2rem;
}

.page-body p {
  margin: 1rem 0;
}

.page-body a {
  color: var(--contrast);
  text-decoration: underline;
}

.page-body a:hover {
  color: var(--main-bg-color);
}

.page-body ul,
.page-body ol {
  list-style-position: inside;
  margin: 1rem 0;
  padding-left: 1rem;
}

.page-body ul {
  list-style-type: disc;
}

.page-body img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 4px;
}

.page-error {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--white);
}

.page-error h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-error a {
  color: var(--contrast);
  text-decoration: underline;
  font-size: 1rem;
}

/* Day Groups and Concerts */
.day-group {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.qui-som-text-and-image-right {
  display: flex;
}

.qui-som-text-and-image-left {
}

/* Decorative bubbles */
.bubbles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.bubble-group {
  position: absolute;
  opacity: 0.9;
}

.day-group .day-title,
.day-group article.concert {
  position: relative;
  z-index: 1;
}

.day-group .day-title {
  margin: 1.6rem 0 1rem 0;
  text-transform: uppercase;
  padding: 1rem;
}

/* Divendres - Vermell */
.day-group.day-friday {
  color: var(--white);
  background-color: #d54744;
}

.day-group.day-friday .day-title {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Dissabte - Blau */
.day-group.day-saturday {
  color: var(--white);
  background-color: #5c6ea6;
}

.day-group.day-saturday .day-title {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Diumenge - Beige */
.day-group.day-sunday {
  color: var(--black);
  background-color: var(--beige);
}

.day-group.day-sunday .day-title {
  background-color: rgba(0, 0, 0, 0.1);
}

article.concert {
  display: flex;
  width: 100%;
  margin: 1rem 0;
  justify-content: center;
}

article.concert .artist-picture {
  display: flex;
  justify-content: flex-end;
  margin: 0 1rem 0 0;
  flex: 1;
}

.tour-visit {
  width: 70vw;
}

article.concert .artist-description {
  flex: 1;
}

.event-details {
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 0.7rem;
}

.event-details li {
  margin-bottom: 0.25rem;
}

.event-label {
  font-weight: bold;
  opacity: 0.8;
}

.concert-info {
  font-size: 0.7rem;
}

main.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.mt-2 {
  margin-top: 2rem;
}

.centered {
  align-self: center;
}

.artist-picture {
  width: 16rem;
  height: 16rem;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.artist-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

div.seasonpass-highlight p.more-info {
  font-size: 0.6rem;
}

div.seasonpass-highlight {
  background-color: var(--white);
  color: black;
  width: 100%;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

div.seasonpass-highlight a {
  color: var(--contrast);
}

.qui-som {
  font-family: Open Sans;
  font-size: 0.6rem;
}

footer.body-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  font-size: 0.6rem;
  gap: 1rem;
}

#entities {
  width: 100%;
}

.organized-by h4 {
  margin: 1rem 0 0 0;
}

.organized-by {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.entity-logo {
  height: 2rem;
}

#entities .entities-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

#logo-without-padding-less {
  padding: 12px;
}

#logo-without-padding {
  padding: 16px;
}

/* Responsive Styles */
@media (max-width: 600px) {
  html {
    font-size: 1.5rem;
  }

  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }

  /* Hide navigation by default on mobile */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    transition: right 0.3s ease-in-out;
    z-index: 999;
    padding: 4rem 0 2rem 0;
    margin: 0;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    height: 100%;
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav .nav-link {
    font-size: 1rem;
    padding: 1rem 2rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .main-nav .nav-link:hover,
  .main-nav .nav-link.active {
    background: rgba(85, 175, 184, 0.2);
    border-left-color: var(--contrast);
    border-bottom-color: transparent;
  }

  /* Mobile dropdown styles */
  .nav-dropdown-menu {
    position: static;
    background: rgba(255, 255, 255, 0.05);
    min-width: 192px;
    border-radius: 0;
    padding: 0;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-link {
    padding: 0.75rem 2rem 0.75rem 3rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .page-content {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-body {
    font-size: 0.7rem;
  }

  article.concert {
    flex-direction: column;
  }

  article.concert .artist-picture img {
    width: 100%;
  }

  article.concert .artist-picture {
    margin: 0;
    width: 100%;
    height: auto;
  }

  article.concert .artist-description {
    padding: 1rem;
  }

  h2 {
    font-size: 1rem;
  }

  p {
    margin: 0.1rem;
  }

  #entities .entity-category h4 {
    margin-top: 2rem;
  }

  #entities .entity-category {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #entities .entities-group {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #entities .entity-logo {
    height: 3rem;
  }

  #entities h4 {
    font-size: 0.7rem;
    margin: 0;
  }
}

@media (min-width: 600px) {
  #entities {
    display: flex;
    flex-direction: row;
    align-items: space-around;
  }

  #entities h4 {
    font-size: 0.7rem;
    margin: 0;
  }

  #entities .entity-category {
    align-self: flex-start;
    align-items: center;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 800px) AND (max-width: 1080px) {
  article.concert .artist-picture {
    height: 10rem;
  }
}

@media (min-width: 1400px) {
  main.main {
    padding: 0 20vw;
  }

  .page-content {
    max-width: 1200px;
    margin: 1rem auto;
  }

  #entities .entities-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
  }

  #entities .entities-row {
    display: flex;
    flex-direction: row;
  }
}

/* Gallery Styles */
.gallery-edition {
  margin-bottom: 2rem;
}

.gallery-edition-title {
  color: var(--white);
  font-family: TuskerSuper;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 0 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-overlay-text {
  color: var(--white);
  font-family: TuskerSuper;
  font-size: 1.2rem;
  text-align: center;
  padding: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Gallery year navigation */
.gallery-year-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.gallery-year-link {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--main-bg-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  font-family: TuskerSuper;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.gallery-year-link:hover {
  background: var(--contrast);
  color: var(--white);
}

.gallery-year-link.active {
  background: var(--contrast);
  color: var(--white);
}

.gallery-empty {
  text-align: center;
  color: #666;
  font-family: "Open Sans", sans-serif;
  font-size: 0.9rem;
  padding: 2rem;
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.gallery-modal.active {
  display: flex;
}

.gallery-modal-content {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.gallery-modal-caption {
  color: var(--white);
  font-family: "Open Sans", sans-serif;
  font-size: 1rem;
  text-align: center;
  margin-top: 1rem;
  padding: 0 1rem;
}

.gallery-modal-close,
.gallery-modal-prev,
.gallery-modal-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.gallery-modal-close:hover,
.gallery-modal-prev:hover,
.gallery-modal-next:hover {
  opacity: 1;
}

.gallery-modal-close {
  top: 1rem;
  right: 1rem;
}

.gallery-modal-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-modal-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .gallery-modal-prev,
  .gallery-modal-next {
    font-size: 1.5rem;
    padding: 0.5rem;
  }

  .gallery-modal-close {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .gallery-overlay-text {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
}

/* Contact Form */
.contact-form-container {
  margin-top: 2rem;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.contact-form-title {
  color: var(--white);
  font-family: TuskerSuper;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  color: var(--white);
  font-family: "Open Sans", sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.9rem;
  border: 2px solid transparent;
  border-radius: 4px;
  background-color: var(--white);
  color: var(--black);
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--contrast);
}

.form-input::placeholder {
  color: #999;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.form-submit {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  font-family: TuskerSuper;
  font-size: 1.2rem;
  color: var(--white);
  background-color: var(--main-bg-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.form-submit:hover {
  background-color: var(--contrast);
}

.form-submit:active {
  transform: scale(0.98);
}

/* Flash Messages */
.flash-notice,
.flash-alert {
  padding: 1rem 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.9rem;
  text-align: center;
}

.flash-notice {
  background-color: rgba(76, 175, 80, 0.2);
  color: #c8e6c9;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.flash-alert {
  background-color: rgba(244, 67, 54, 0.2);
  color: #ffcdd2;
  border: 1px solid rgba(244, 67, 54, 0.4);
}

@media (max-width: 600px) {
  .contact-form-container {
    padding: 1rem;
    margin-top: 1.5rem;
  }

  .contact-form-title {
    font-size: 1.2rem;
  }

  .form-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Home Page Sections */
.home-section {
  background-color: var(--white);
  padding: 2rem 1rem;
}

.home-section-content {
  max-width: 900px;
  margin: 0 auto;
  color: var(--black);
  font-family: "Open Sans", sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-section-content h1,
.home-section-content h2,
.home-section-content h3 {
  font-family: TuskerSuper;
  color: var(--red);
  margin-bottom: 1rem;
}

.home-section-content h1 {
  font-size: 2rem;
}

.home-section-content h2 {
  font-size: 1.5rem;
}

.home-section-content h3 {
  font-size: 1.2rem;
}

.home-section-content p {
  margin-bottom: 1rem;
}

.home-section-content a {
  color: var(--red);
  text-decoration: underline;
}

.home-section-content a:hover {
  color: var(--contrast);
}

@media (max-width: 600px) {
  .home-section {
    padding: 1.5rem 1rem;
  }

  .home-section-content {
    font-size: 0.85rem;
  }

  .home-section-content h1 {
    font-size: 1.5rem;
  }

  .home-section-content h2 {
    font-size: 1.2rem;
  }
}
