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

/* Page styling */
body {
  background: #102628;
  color: #e7e7e7;
  font-family: 'Oswald', sans-serif;   /* Updated font */
  padding: 50px;                       /* Global 50px margin */
  overflow-x: hidden;                  /* Prevent horizontal scroll */
}

.white {
  color:#e7e7e7
}

.green {
  color: #11c647;
}

/* Global links */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout grid */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: 100vh;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 30px; /* equal vertical spacing stays here */
}

.left-column > * {
  margin: 0;
  padding: 0;
}

.title-svg,
.date-svg {
  display: block;        /* Removes inline whitespace */
  height: auto;
  aspect-ratio: attr(width) / attr(height); /* attempt to normalize */
  padding-bottom: 0;
  margin-bottom: 0 !important;
  max-width: 100%;       /* Ensure SVGs never exceed container */
}

.title-svg {
  width: 100%;
}

/* Date SVG still full width */
.date-svg {
  width: 75%;
}

/* Info text (new block) */
.info-text {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.4;
  color: #e7e7e7;
  max-width: 100%;
  word-wrap: break-word; /* Ensure long words wrap */
}

.info-text p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Logos (equal height, horizontal) */
.logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
}

.logos img {
  height: 50px;       /* Equal-height logos */
  width: auto;
  display: block;
}

/* List grid — dynamic columns based on available space */
.list-grid {
  font-size: 1.4rem;
  line-height: 1.35;
  color: #e7e7e7;
}

.list-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  column-count: auto;
  column-width: 200px; /* Minimum column width - will create as many columns as fit */
  column-gap: 30px;
}

.list-grid li {
  margin-bottom: 2px;
  break-inside: avoid; /* Prevents names from breaking across columns */
}

/* Right column P5 frame */
.right-column {
  width: 100%;
  height: 100%;
  position: relative;
}

.tickets-link {
  position: absolute;
  top: 0;
  right: 5px;
  font-size: 1.5rem;
  font-weight: 500;
  color: #11c647;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  border: 2px solid #11c647;
  transition: all 0.3s ease;
  z-index: 10;
}

.tickets-link:hover {
  background-color: #11c647;
  color: #102628;
  text-decoration: none;
}

#p5-container {
  padding: 70px 5px 20px 5px; /* 70px top for tickets link, 5px sides, 20px bottom */
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.p5-frame {
  width: 100%;
  height: 100%;
  border: none;
  overflow: hidden;
}

/* Remove default iframe scrollbars in all browsers */
.p5-frame::-webkit-scrollbar {
  display: none;
}
.p5-frame {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Tablet breakpoint */
@media (max-width: 900px) and (min-width: 701px) {
  body {
    padding: 30px; /* Reduce padding on tablets */
  }
}

/* Mobile: collapse to 1 column and adjust sizing */
@media (max-width: 700px) {
  body {
    padding: 15px; /* Smaller padding on mobile for more space */
  }

  .container {
    grid-template-columns: 1fr; /* Stack columns vertically */
    gap: 30px; /* Gap between stacked sections */
    max-width: 100vw; /* Ensure container doesn't overflow viewport */
    width: 100%;
    box-sizing: border-box;
    position: relative; /* For absolute positioning of tickets link */
  }

  .left-column {
    gap: 20px; /* Tighter spacing on mobile */
    max-width: 100%; /* Prevent overflow */
    width: 100%; /* Explicit width */
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow in content */
    padding-top: 50px; /* Make room for tickets link above */
  }

  /* Reduce font sizes for mobile */
  .info-text {
    font-size: 1rem; /* Smaller on mobile */
    max-width: 100%;
    letter-spacing: 0.3px; /* Reduce letter spacing */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .list-grid {
    font-size: 1.2rem; /* Smaller on mobile */
  }

  .list-grid ul {
    column-width: 120px; /* Smaller column width for mobile */
    column-gap: 15px; /* Tighter gap */
  }

  /* Smaller logos on mobile */
  .logos img {
    height: 30px; /* Even smaller on mobile */
  }

  .logos {
    gap: 20px; /* Reduce gap between logos */
  }

  /* Adjust tickets link for mobile */
  .tickets-link {
    position: absolute; /* Position at top of container */
    top: 0;
    left: 0;
    right: auto;
    font-size: 1rem;
    padding: 8px 15px;
    display: inline-block;
    width: auto; /* Let it size to content */
  }

  /* Right column adjustments for mobile */
  .right-column {
    width: 100%;
    position: static; /* Remove positioning context so tickets link positions relative to container */
    order: 2; /* Ensure right column comes after left */
  }

  /* Fix p5-container for mobile - don't use 100vh */
  #p5-container {
    height: auto;
    min-height: 300px; /* Smaller minimum on mobile */
    padding: 50px 0 10px 0; /* 50px top for smaller tickets link */
    max-width: 100%;
  }

  /* Ensure SVGs fit properly */
  .title-svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  .date-svg {
    width: 90%; /* Slightly smaller on mobile */
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* Additional mobile safety for very small screens */
@media (max-width: 400px) {
  body {
    padding: 10px;
  }

  .tickets-link {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(16, 38, 40, 0.95);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #102628;
  margin: 10% auto;
  padding: 40px;
  border: 2px solid #11c647;
  width: 80%;
  max-width: 600px;
  border-radius: 0;
  color: #e7e7e7;
  font-family: 'Oswald', sans-serif;
  position: relative;
}

.modal-content img {
  width: 100%;
  height: auto;
  margin-bottom: 5px;
  display: block;
}

.photo-credit {
  font-size: 0.9rem;
  font-style: italic;
  color: #11c647;
  margin-bottom: 20px;
  margin-top: 0;
}

.modal-content h2 {
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: #11c647;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-content p {
  font-size: 1.7rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 20px;
  white-space: pre-line;
}

.modal-content a {
  color: #11c647;
  text-decoration: none;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content a:hover {
  text-decoration: underline;
}

.close {
  color: #11c647;
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.close:hover,
.close:focus {
  color: #e7e7e7;
}

.list-grid li a {
  cursor: pointer;
  transition: color 0.2s;
}

.list-grid li a:hover {
  color: #11c647;
}

/* Mobile modal adjustments */
@media (max-width: 700px) {
  .modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 30px;
  }

  .modal-content h2 {
    font-size: 2.2rem;
  }

  .modal-content p {
    font-size: 1.4rem;
  }

  .close {
    top: 15px;
    right: 20px;
    font-size: 2rem;
  }
}
