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

html,
body {
  /* Critical: Tells the browser not to let the page be wider than the content */
  overflow-x: hidden;

  /* Ensure no weird padding or margin on the body itself */
  margin: 0;
  padding: 0;

  /* Set the initial width to the device width */
  width: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Montserrat", sans-serif;
  background: #0d0d0d;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  padding: 20px 5%;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  /* background-color: #0d0d0d; */
  background: rgba(0, 0, 0, 0.9);
  /* Fix for iOS interference with fixed positioning */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
header span {
  color: #39ff14;
  font-size: 2rem;
  letter-spacing: 2px;
  max-width: 150px;
  height: 40px;
  display: flex;
  align-items: center;
}
header span a {
  display: flex;
  align-items: center;
}
header span img {
  width: 100%;
  height: auto;
  animation: pulse 5s infinite;
}
nav a {
  margin-left: 20px;
  font-weight: 600;
  transition: color 0.3s;
}
nav a:hover {
  color: #39ff14;
}

/* --- ACTIVE LINK HIGHLIGHT (SCROLL SPY) --- */

/* Style for the link that is currently active */
nav a.active-link {
  color: #39ff14; /* Neon Green color */
  border-bottom: 2px solid #39ff14; /* Add a clear indicator */
}

/* On hover, don't remove the active highlight */
nav a.active-link:hover {
  color: #39ff14;
}

/* Adjust the mobile menu active state */
@media (max-width: 900px) {
  header nav a.active-link {
    /* On mobile, use a background or thicker border for better visibility */
    background: rgba(57, 255, 20, 0.1);
    color: #39ff14;
    border-left: 5px solid #39ff14;
    border-bottom: none; /* Remove desktop border */
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 5%;

  /* --- NEW: Background Image for Hero --- */
  background-image: url("../assets/crainicu_hero_background.webp");
  background-size: auto;
  background-position: center;
  background-repeat: no-repeat;

  position: relative; /* Essential for positioning pseudo-elements */
  overflow: hidden; /* Ensures animations stay within the hero boundaries */

  /* Fallback background if image fails or for initial dark look */
  background-color: #0d0d0d;
}

/* --- REINTRODUCED: ANIMATED HERO BACKGROUND (::before) --- */

/* The glowing/moving background layer */
.hero::before {
  content: "";
  position: absolute;
  top: -50%; /* Start off-screen */
  left: -50%; /* Start off-screen */
  width: 200%; /* Make it large to cover moves */
  height: 200%; /* Make it large to cover moves */

  /* The radial glow effect */
  background: radial-gradient(
      circle at 20% 20%,
      rgba(57, 255, 20, 0.3),
      transparent 40%
    ),
    radial-gradient(circle at 80% 80%, rgba(57, 255, 20, 0.3), transparent 40%);

  /* Combined animations */
  animation: moveBackground 30s linear infinite,
    flickerGlow 4s ease-in-out infinite alternate;

  z-index: 1; /* Above the background image */
  pointer-events: none; /* Allows clicks to pass through */
}

/* --- REINTRODUCED: SUBTLE ANIMATION LAYER (::after) --- */

/* The panning grid lines */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* The repeating linear gradient pattern */
  background: repeating-linear-gradient(
    45deg,
    rgba(57, 255, 20, 0.1),
    rgba(57, 255, 20, 0.1) 1px,
    transparent 1px,
    transparent 15px
  );
  animation: panLines 60s linear infinite; /* Slow panning effect */

  z-index: 2; /* Between the main animated layer and the content */
  pointer-events: none;
}

/* Ensure hero content stays on top */
.hero-content {
  position: relative;
  z-index: 3; /* Make sure content is above ALL animated layers */
}

/* Hero Content Styles */
.hero-content h2 {
  font-size: 4rem;
  color: #39ff14;
  margin-bottom: 20px;
  letter-spacing: 5px;
  animation: neonPulse 2s infinite alternate;
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.hero-content .btn {
  border: 2px solid #39ff14;
  color: #39ff14;
  padding: 10px 25px;
  font-weight: 700;
  transition: all 0.3s;
}
.hero-content .btn:hover {
  background: #39ff14;
  color: #0d0d0d;
}

/* Keyframes for Hero Text */
@keyframes neonPulse {
  0% {
    text-shadow: 0 0 8px #39ff14, 0 0 15px #39ff14;
  }
  100% {
    text-shadow: 0 0 12px #39ff14, 0 0 25px #39ff14;
  }
}

/* Keyframes for the background movement animation */
@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-100px, -100px);
  }
}

/* Keyframes for a subtle glow flicker */
@keyframes flickerGlow {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.45;
  } /* Slight fade */
}

/* Keyframes for the panning lines */
@keyframes panLines {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 100%;
  } /* Pan diagonally */
}

/* About Section */
.about {
  padding: 80px 5%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background: #0d0d0d;
  scroll-margin-top: 80px;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* two columns on desktop */
  gap: 50px;
  max-width: 1200px;
  align-items: center;
}

/* About Image */
.about-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 0 30px #39ff14;
  transition: transform 0.3s, box-shadow 0.3s;
}

.about-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px #39ff14;
}

/* About Text */
.about-text h3 {
  font-size: 2.5rem;
  color: #39ff14;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 1.2rem;
  line-height: 1.8;
}

/* --- TAG LIST STYLES (Added to About Section) --- */

.tag-list {
  /* Provides spacing between the description and the tags */
  margin-top: 30px;

  /* Use Flexbox to lay out the tags nicely */
  display: flex;
  flex-wrap: wrap; /* Allows tags to wrap onto multiple lines */
  gap: 10px; /* Space between individual tags */

  /* Alignment fix for mobile/stacked layout */
  justify-content: center; /* Center tags on mobile if text is centered */
}

/* Style for individual tags */
.tag {
  /* Neon Look */
  background: rgba(57, 255, 20, 0.1); /* Very slight neon background */
  color: #39ff14; /* Neon text color */
  border: 1px solid rgba(57, 255, 20, 0.5); /* Subtle border */
  border-radius: 5px;

  /* Spacing and Typography */
  padding: 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  /* Hover/Interactive Effect */
  transition: all 0.3s ease;
  cursor: default; /* Indicate they are static tags */

  /* Initial subtle glow */
  box-shadow: 0 0 5px rgba(57, 255, 20, 0.3);
}

/* Hover Effect: Stronger Neon Glow */
.tag:hover {
  background: rgba(57, 255, 20, 0.2);
  box-shadow: 0 0 10px #39ff14; /* Brighter glow on hover */
  transform: translateY(-1px); /* Slight lift */
}

/* Responsive adjustment to left-align on desktop */
@media (min-width: 901px) {
  .about-container .about-text .tag-list {
    justify-content: flex-start; /* Left-align tags on wider screens */
  }
}

/* Responsive adjustment for general text alignment */
@media (max-width: 900px) {
  .about-container {
    text-align: center; /* Tags will center naturally because of tag-list style */
  }
}

/* Music Section */
.music {
  padding: 80px 5%;
  text-align: center;
  background: #111;
  scroll-margin-top: 80px;
}
.music h3 {
  font-size: 2.5rem;
  color: #39ff14;
  margin-bottom: 40px;
}
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.track-card iframe {
  border-radius: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.track-card iframe:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #39ff14;
}

/* Events Section */
.events {
  padding: 80px 5%;
  text-align: center;
  scroll-margin-top: 80px;
}
.events h3 {
  font-size: 2.5rem;
  color: #39ff14;
  margin-bottom: 40px;
}
.events ul {
  list-style: none;
  max-width: 400px;
  margin: 0 auto;
  padding: 0;
}
.events li {
  font-size: 1.2rem;
  padding: 15px 0;
  border-bottom: 1px solid #222;
  transition: color 0.3s;
}
.events li:last-child {
  border-bottom: none;
}
.events li:hover {
  color: #39ff14;
}

/* Remove old list styles (if any remain) */
.events ul {
  display: none; /* Hide the old list to ensure clean transition */
}

/* Event Grid Container */
.event-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  /* Two columns on desktop, wrapping to one on smaller screens */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding-top: 20px;
}

/* Individual Event Card */
.event-card {
  background: #111;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.1);
  height: 100%;
}

/* Event Card Hover Effect (Neon Glow) */
.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #39ff14, 0 0 30px rgba(57, 255, 20, 0.4);
}

/* Date Styling */
.event-date {
  text-align: left;
  line-height: 1;
  min-width: 80px; /* Ensure space for the date */
  margin-bottom: 10px;
}
.event-date .day {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #39ff14;
}
.event-date .month {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Details Styling */
.event-details {
  flex-grow: 1;
  min-width: 0;
  margin: 0 0 15px 0;
  text-align: left;
}
.event-details h4 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: #fff;
}
.event-details p {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Button Styling (Tickets/Sold Out) */
.event-btn {
  color: #39ff14;
  border: 2px solid #39ff14;
  transition: all 0.3s;
  padding: 8px 15px;
  font-size: 0.9rem;
  white-space: nowrap; /* Prevent button text from wrapping */
  flex-shrink: 0;
  align-self: flex-start;
  width: 100%;
}
.event-btn:hover {
  background: #39ff14;
  color: #0d0d0d;
}
.event-btn.sold-out {
  background: #333;
  color: #999;
  border: 2px solid #666;
  cursor: not-allowed;
  pointer-events: none; /* Disable clicking */
}
.event-btn.sold-out:hover {
  background: #333; /* Prevent hover effect */
  color: #999;
}

/* Styling for Coming Soon events (Muted placeholder style) */
.event-btn.coming-soon {
  background: #111; /* Dark background */
  color: #666; /* Muted gray text */
  border: 2px solid #333; /* Dark border */
  cursor: default; /* Change cursor to indicate no action */
  pointer-events: none; /* Disable all clicks/interactions */
  box-shadow: none; /* Remove neon glow */
}

/* Ensure default btn hover doesn't override it */
.event-btn.coming-soon:hover {
  background: #111;
  color: #666;
  transform: none;
  box-shadow: none;
}

/* Responsive Adjustments for Events */
@media (max-width: 600px) {
  .event-btn {
    width: 100%; /* Full width button on small screens */
    text-align: center;
  }
}

/* --- NO EVENTS STYLING --- */

.no-events-message {
  max-width: 600px;
  margin: 40px auto;
  padding: 40px;
  text-align: center;

  /* Neon Theme Background/Border */
  background: #111;
  border: 1px solid #39ff14; /* Neon border */
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4); /* Neon glow */

  transition: all 0.5s ease-in-out;
}

.no-events-message h4 {
  font-size: 2rem;
  color: #39ff14; /* Highlight the main message */
  margin-bottom: 15px;
  text-transform: uppercase;
}

.no-events-message p {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 30px;
}

/* Ensure the button maintains the correct style */
.no-events-message .btn {
  display: inline-block;
  padding: 8px 20px;
  color: #39ff14;
  border: 2px solid #39ff14;
  transition: all 0.3s;
}
.no-events-message .btn:hover {
  background: #39ff14;
  color: #0d0d0d;
}

/* Optional: Animation on load */
@keyframes neonFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.no-events-message {
  animation: neonFadeIn 1s ease-out;
}

/* Footer */
footer {
  padding: 30px 5%;
  background: #000;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px; /* space between elements */
}

footer p {
  margin-bottom: 0;
}

footer .social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

footer a.btn {
  padding: 8px 20px;
  color: #39ff14;
  border: 2px solid #39ff14;
  transition: all 0.3s;
}

footer a.btn:hover {
  background: #39ff14;
  color: #0d0d0d;
}

.footer-content {
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
  justify-content: space-between; /* Space out the columns */
  align-items: flex-start;
  gap: 30px;
  text-align: left;
}

/* Base style for the copyright text */
footer p {
  flex-basis: 100%; /* Ensure copyright takes full width */
  text-align: center;
  order: 3; /* Push to the bottom */
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Style for the group containers */
.social-group {
  flex: 1; /* Allow groups to take equal space */
  min-width: 250px; /* Minimum width before stacking */
}

.social-group h4 {
  color: #39ff14; /* Neon Green heading */
  margin-bottom: 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

/* Ensure the links inside the group still use the flex layout */
.social-group .social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start; /* Align buttons to the start */
}

/* Mobile adjustments: Stack the groups vertically */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .social-group {
    width: 100%; /* Take full width on mobile */
  }
  .social-group .social-links {
    justify-content: center; /* Center buttons on mobile */
  }
}

/* Slide-in Animations */
.animate-left,
.animate-right {
  opacity: 0;
  transition: all 1s ease-out;
}
.animate-left {
  transform: translateX(-50px);
}
.animate-right {
  transform: translateX(50px);
}
.animate-left.active,
.animate-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Header pulse animation */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 0 10px #39ff14;
  }
  50% {
    transform: scale(1.1);
    text-shadow: 0 0 20px #39ff14;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    min-height: 60vh;
  }
  .hero-content h2 {
    font-size: 3rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}

/* Responsive: single column on mobile */
@media (max-width: 900px) {
  .about-container {
    grid-template-columns: 1fr; /* stack columns on mobile */
    text-align: center;
  }
  .about-text h3 {
    font-size: 2rem;
  }
  .about-text p {
    font-size: 1rem;
  }
}

/* Mobile adjustments */
@media (max-width: 600px) {
  footer .social-links {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  footer a.btn {
    width: 80%;
    margin: 0 auto;
    text-align: center;
  }
}

/* --- MOBILE MENU STYLES --- */

/* Hide the hamburger button on desktop */
.menu-toggle {
  display: none;
}

/* Hamburger Button Style */
.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #39ff14;
  position: relative;
  transition: all 0.3s ease-in-out;
}

/* Top and bottom lines of the hamburger */
.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
  width: 25px;
  height: 3px;
  background-color: #39ff14;
  position: absolute;
  left: 0;
  transition: all 0.3s ease-in-out;
}
.hamburger::before {
  transform: translateY(-8px);
}
.hamburger::after {
  transform: translateY(8px);
}

/* Active State (X transformation) - FIX APPLIED HERE */
.menu-toggle.active .hamburger {
  /* Hide the middle line */
  background: transparent;
}

/* Transform the top line into the first half of the 'X' (+45 degrees) */
.menu-toggle.active .hamburger::before {
  /* Move to center (translateY(0)) and rotate */
  transform: translateY(0) rotate(45deg);
}

/* Transform the bottom line into the second half of the 'X' (-45 degrees) */
.menu-toggle.active .hamburger::after {
  /* Move to center (translateY(0)) and rotate in the opposite direction */
  transform: translateY(0) rotate(-45deg);
}

/* Media Query for Small Screens (under 900px) */
@media (max-width: 900px) {
  /* Show the hamburger button */
  .menu-toggle {
    display: flex; /* Use flex to center the hamburger icon */
    align-items: center;
    justify-content: center;

    /* Make the button large enough to tap easily */
    height: 40px;
    width: 40px;
    padding: 8px; /* Give it some inner space */

    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
  }

  /* Transform the main menu (NAV) into a dropdown */
  header nav {
    /* Initially hide the menu */
    display: none;

    /* Dropdown styling */
    flex-direction: column;
    position: absolute;
    top: 77px; /* Position right below the header */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95); /* Semi-transparent background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 20px 0;
    border-top: 1px solid #39ff14;
    transition: transform 0.3s ease-out;
  }

  /* Style for links in the dropdown */
  header nav a {
    margin: 10px 0;
    padding: 10px 5%;
    display: block; /* Take full width */
    text-align: center;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(57, 255, 20, 0.1);
  }

  header nav a:last-child {
    border-bottom: none;
  }

  /* Javascript 'active' class makes the menu visible */
  header nav.active {
    display: flex;
  }
}
/* --- END OF MOBILE MENU STYLES --- */

/* --- BACK TO TOP BUTTON --- */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(57, 255, 20, 0.2); /* Faded neon background */
  color: #39ff14;
  border: 2px solid #39ff14;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  text-shadow: 0 0 5px #39ff14; /* Subtle initial glow */

  /* Initial state: Hidden */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 99; /* Below the sticky header (100) */
}

/* State when button is visible */
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: #39ff14;
  color: #0d0d0d;
  box-shadow: 0 0 15px #39ff14; /* Stronger neon glow on hover */
  transform: translateY(-2px);
}

/* --- COOKIE ALERT STYLES --- */

.cookie-alert {
  /* Ensure good browser support for fixed positioning. 
       Adding the vendor prefix can sometimes help older iOS versions.
    */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0d0d0d;
  border-top: 2px solid #39ff14;
  padding: 15px 25px;
  z-index: 1000;
  display: flex;
  flex-direction: row; /* Explicitly set row direction */
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;

  /* ---------------------------------------------------- */
  /* *** CRITICAL FIX FOR iOS TRANSITION/TRANSFORM *** */
  /* ---------------------------------------------------- */

  /* Use -webkit- vendor prefix for iOS Safari compatibility */
  -webkit-transform: translateY(100%);
  transform: translateY(100%); /* Start off-screen (hidden) */

  /* Use -webkit- prefix for transition */
  -webkit-transition: -webkit-transform 0.5s ease-out;
  transition: transform 0.5s ease-out;

  /* Add a property that forces hardware acceleration, which can fix rendering bugs */
  will-change: transform;
}

.cookie-alert.show {
  /* Set both vendor and standard prefix */
  -webkit-transform: translateY(0); /* Slide into view */
  transform: translateY(0);
}

.cookie-alert p {
  flex-grow: 1;
  margin-right: 20px;
  margin-bottom: 0;
}

.cookie-alert .cookie-btn {
  background: transparent;
  border: 2px solid #39ff14;
  color: #39ff14;
  padding: 10px 25px;
  font-weight: 700;
  transition: all 0.3s;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-right: 15px;
}
.cookie-alert .cookie-btn:hover {
  background: #39ff14;
  color: #0d0d0d;
}

.cookie-alert .cookie-link {
  color: #39ff14;
  text-decoration: underline;
  font-weight: 600;
  white-space: nowrap;
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
  .cookie-alert {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .cookie-alert p {
    margin-right: 0;
    margin-bottom: 10px;
  }
  .cookie-alert .cookie-btn {
    margin-bottom: 10px;
  }
}
