@import url('https://fonts.googleapis.com/css2?family=Jersey+15&family=Jura:wght@700&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Pixelify+Sans:wght@400..700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

.events-container {
    max-width: 1200px;
    padding: 10vh 20px;
    margin-left: auto;
    margin-top: 100px;
    margin-right: auto;
    color: var(--text-color);
    text-align: center;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    align-self: flex-start;
}

.events-container h1 {
    font-size: 3em;
    margin-bottom: 50px;
    background-image: linear-gradient(45deg, var(--secondary-color), var(--primary-color) 25%, #c461a0 50%, #aa7fd2 75%, var(--accent-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    font-family: 'Pixelify Sans', sans-serif;
}

.events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    justify-items: center;
}

.event {
    position: relative;
    width: 80%;
    min-height: 400px;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    color: white;
    background: linear-gradient(135deg, #05040a, #0a0a15);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    text-align: left;
}

.event::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    z-index: 0;
    transition: all 0.4s ease;
}

/* Each card’s image */
.event img {
    display: none; /* Hide inline <img> since we’ll use its URL as a background via JS or manually */
}

/* Event-specific backgrounds (example) */
.event:nth-child(1)::before { background-image: url('/static/posters/hacka.png'); }
.event:nth-child(2)::before { background-image: url('/static/posters/gaming.jpg'); }
.event:nth-child(3)::before { background-image: url('/static/posters/ai.jpg'); }
.event:nth-child(4)::before { background-image: url('/static/posters/idea.jpg'); }
.event:nth-child(5)::before { background-image: url('/static/posters/multi.jpg'); }
.event:nth-child(6)::before { background-image: url('/static/posters/vr.jpg'); }
.event:nth-child(7)::before { background-image: url('/static/posters/webdesign.jpg'); }
.event:nth-child(8)::before { background-image: url('/static/posters/codewars.jpg'); }
.event:nth-child(9)::before { background-image: url('/static/posters/hurdles.jpg'); }
.event:nth-child(10)::before { background-image: url('/static/posters/rally.jpg'); }
.event:nth-child(11)::before { background-image: url('/static/posters/dangal.jpg'); }
.event:nth-child(12)::before { background-image: url('/static/posters/soccer.jpg'); }
.event h2,
.event p {
    position: relative;
    z-index: 1;
}

.event h2 {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 1.8em;
    margin-bottom: 10px;
    color: rgb(7, 156, 255);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(8, 68, 250, 0.3);
}

.event p {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: #ddd;
    line-height: 1.6em;
}

/* Hover animation */
.event:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 25px rgba(16, 173, 216, 0.4);
}

.event:hover::before {
    filter: brightness(0.7) saturate(1.2);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    /* Override generic .main styles from style.css that break this page's layout */
    .main {
        padding: 0;
        margin: 0;
        height: auto; /* Allow the content to determine the page height and enable scrolling */
        display: block; /* Reset flex properties to prevent unwanted centering */
    }

    .events-container {
        padding: 0;
        padding-top: 10vh;
        margin-top: 90px; /* Adjust spacing to be just below the navbar */
    }

    .events-container h1 {
        font-size: 2.2em;
    }
    
    .event {
        min-height: 350px;
        padding: 20px;
        margin-left: auto;
        margin-right: auto;
        width: 80% /* Make cards wider on mobile to match the design */
    }

    .events {
        gap: 30px; /* Adjust gap between cards for mobile view */
    }
}
    /* ===============================
       SLIDE BEHAVIOR
    =============================== */
    .slide {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      opacity: 0;
      transform: translateX(100%);
      transition: all 0.6s ease-in-out;
      display: none;
      overflow-y: auto;
      padding: 2rem 1.5rem;
      box-sizing: border-box;
    }

    .slide.active {
      display: block;
      opacity: 1;
      transform: translateX(0);
    }

    .roundbtn {
      background: linear-gradient(135deg, #010617, #05010d);
      color: #fff;
      border: none;
      border-radius: 30px;
      font-family: 'Pixelify Sans', sans-serif !important;
      padding: 10px 20px;
      width: 10%;
      margin: 0 10px;
      cursor: pointer;
      font-size: 1em !important;
      transition: background 0.3s ease;
    }

    .slide.exit-left {
      opacity: 0;
      transform: translateX(-100%);
    }

    /* ===============================
       EVENT & TIER CONTAINERS
    =============================== */
    .tier-container,
    .event-container {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
      justify-items: center;
      align-items: stretch;
      margin-top: 2rem;
    }

    .tier-card,
    .event-card {
      background: linear-gradient(135deg, #0f0e16, #070211);
      backdrop-filter: blur(6px);
      border-radius: 16px;
      padding: 2rem 1.2rem;
      transition: all 0.3s ease;
      width: 90%;
      max-width: 260px;
      height: 50vh;
      cursor: pointer;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      color: #fff;
      text-align: center;
    }

    .tier-card h3,
    .event-card h3 {
      font-size: 1.4rem;
      margin-bottom: 0.5rem;
    }

    .tier-card p,
    .event-card p {
      font-size: 0.95rem;
      color: #ccc;
    }

    .tier-card img,
    .event-card img {
      width: 130px;
      height: auto;
      margin-top: 0.5rem;
    }

    .tier-card:hover,
    .event-card:hover {
      transform: translateY(-5px);
      background: rgba(0, 0, 0, 0.074);
    }

    /* ===============================
       BUTTON STYLING
    =============================== */
    .button {
      background: #e2031f;
      color: #fff;
      padding: 12px 30px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      margin-top: 2rem;
      display: inline-block;
      font-size: 1rem;
      transition: background 0.3s ease;
    }

    .button:hover {
      background: #ff335a;
    }

    /* ===============================
       TIER SECTION STYLING
    =============================== */
    .tier-section {
      text-align: center;
      padding: 3rem 1rem;
      color: #fff;
      background: linear-gradient(135deg, #0a0a0a, #0f022a);
    }

    .tier-heading {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

    .tier-subtext {
      font-size: 1rem;
      opacity: 0.8;
      margin-bottom: 2rem;
    }

    .reg-container {
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(10px);
      border-radius: 16px;
      margin-top: 15vh;
      padding: 7em;
      max-width: 1300px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
      color: #fff;
    }

    /* Center the gaming card on desktop */
    .event-container {
      display: grid;
      grid-template-columns: 1fr;
      /* Single column to center the card */
      justify-items: center;
      /* Horizontal centering */
      align-items: center;
      /* Vertical centering */
      margin-top: 3rem;
      min-height: 50vh;
      /* Optional: ensures vertical centering if container is taller */
    }

    /* Mobile override */
    @media (max-width: 768px) {
      .event-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* vertical centering */
        align-items: center;
        /* horizontal centering */
        margin-top: 2rem;
      }

      .gaming-card {
        width: 90%;
        /* optional: ensures proper scaling */
        margin: 0 auto;
      }
    }

    /* ===============================
       RESPONSIVE BEHAVIOR
    =============================== */
    @media (max-width: 1024px) and (min-width: 769px) {
      .tier-container {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 768px) {
      .slide {
        padding: 1.2rem;
        position: relative;
        /* optional, can stay absolute if you want slide animation */
        overflow-y: auto;
        height: auto;
      }

      .tier-container,
      .event-container {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
        margin-top: 1.5rem;
        overflow-y: auto;
        max-height: 80vh;
        padding-right: 0.5rem;
      }

      .tier-card,
      .event-card {
        width: 90%;
        margin: 0 auto;
        height: auto;
      }

      .reg-container {
        width: 90% !important;
        margin: 0 auto;
        padding: 2rem 1rem !important;
        overflow: scroll !important;
      }

      h1,
      h2 {
        font-size: 1.8rem !important;
        line-height: 2.2rem;
      }

      p {
        font-size: 1rem;
      }

      .tier-heading {
        font-size: 1.7rem;
      }

    }

    @media (max-width: 480px) {

      .tier-card img,
      .event-card img {
        width: 100px;
      }

      .button {
        width: 100%;
      }
    }

.team-members-input {
  display: block;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
  transition: 0.3s ease;
}

.team-members-input:focus {
  border-color: #0af;
  background: rgba(255,255,255,0.15);
}