/* ===================================
   VARIABLES & RESET
   =================================== */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099ff;
    --accent-color: #ff6b35;
    --dark-bg: #0a0e27;
    --darker-bg: #050812;
    --card-bg: #141b3a;
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --border-color: #1e2749;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
    background: rgba(5, 8, 18, 0.97);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.school-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.15rem;
    display: block;
}

.logo-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===================================
   PAGE HERO
   =================================== */
.page-heading {
    padding: 5rem 1.5rem;
    text-align: center;
    background: radial-gradient(circle at center, var(--card-bg) 0%, var(--darker-bg) 100%);
    border-bottom: 1px solid var(--border-color);
}

.heading-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4rem);
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.school-name {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.heading-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    letter-spacing: 1.5px;
}

/* ===================================
   LAYOUT & CONTAINERS
   =================================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.main-content {
    width: 100%;
    overflow-x: hidden;
}

.card-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 3rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.section-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: clamp(1.3rem, 3vw, 2rem);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===================================
   GENERAL GUIDELINES LIST
   =================================== */
.general-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.general-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    background: var(--darker-bg);
    padding: 1.2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
    line-height: 1.5;
}

.general-list li:hover {
    transform: translateX(4px);
    background: rgba(0, 212, 255, 0.05);
    border-left-color: var(--secondary-color);
}

.general-list .icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ===================================
   EVENTS HEADER
   =================================== */
.events-header {
    margin-top: 5rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.main-event-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

.main-event-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

.robotics-title {
    background: linear-gradient(90deg, #00d4ff, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gaming-title {
    color: #ff6b35;
    background: linear-gradient(90deg, #ff6b35, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   EVENT SECTIONS
   =================================== */
.event-section {
    padding: 3rem 0;
}

.event-media {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.event-media::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    z-index: 10;
    pointer-events: none;
}

.event-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.event-media:hover img {
    transform: scale(1.04);
}

.standalone-media {
    max-width: 900px;
    margin: 0 auto;
}

.event-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 1.5rem auto;
    max-width: 800px;
}

/* ===================================
   DETAILS BOX & RULEBOOK
   =================================== */
.details-box {
    background: rgba(20, 27, 58, 0.5);
    padding: 2rem;
    border-radius: 15px;
    border-left: 3px solid var(--primary-color);
    width: 100%;
}

.event-name {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}

.rulebook-main-title {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.rulebook-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.rulebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.rulebook-heading {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rulebook-list {
    margin-bottom: 1.8rem;
    color: var(--text-secondary);
    list-style-type: disc;
    padding-left: 1.2rem;
}

.rulebook-list li {
    margin-bottom: 0.6rem;
    line-height: 1.65;
    font-size: 0.93rem;
}

/* Robotics rulebook variant */
.robotics-rulebook {
    border-top: 4px solid var(--primary-color) !important;
    border-left: none !important;
    background: rgba(20, 27, 58, 0.85) !important;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
    padding: 2rem;
}

.robotics-rulebook:hover {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.25);
    transition: 0.3s ease;
}

.robotics-event-name {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color) !important;
}

.robotics-main-title {
    color: var(--primary-color) !important;
}

/* COD / gaming unified rulebook */
.cod-unified {
    border-left: 3px solid var(--accent-color);
}

.cod-title {
    color: var(--accent-color) !important;
    border-bottom-color: var(--accent-color) !important;
}

.cod-main-title {
    color: var(--text-secondary);
}

/* GT7 Rulebook */
.gt7-rulebook {
    background: rgba(20, 27, 58, 0.85);
    border-top: 4px solid #e8c840;
    border-left: none;
    box-shadow: 0 0 30px rgba(232, 200, 64, 0.1);
    padding: 2rem;
    border-radius: 15px;
}

.gt7-title {
    color: #e8c840 !important;
    border-bottom-color: #e8c840 !important;
}

.gt7-main-title {
    color: #e8c840 !important;
}

.gt7-top-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(232, 200, 64, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(232, 200, 64, 0.2);
}

.gt7-top-banner span {
    color: #e8c840;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gt7-round-card {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #e8c840;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.gt7-round-card h5 {
    color: #e8c840;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   GAMING HIGHLIGHTS CARDS
   =================================== */
.gaming-highlights-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.gaming-highlights-card {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: rgba(20, 27, 58, 0.7);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.15);
}

.gaming-highlights-card.cod-card {
    border-color: #ff3b30;
    box-shadow: 0 0 25px rgba(255, 59, 48, 0.15);
}

.card-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-size: clamp(0.85rem, 2vw, 1rem);
    word-break: break-word;
}

.card-title.orange-title {
    color: var(--accent-color);
}

.card-title.red-title {
    color: #ff3b30;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--darker-bg);
    padding: 1.2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    transition: var(--transition);
}

.highlight-item.cod-item {
    border-color: rgba(255, 59, 48, 0.3);
}

.highlight-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

.highlight-item.cod-item:hover {
    border-color: #ff3b30;
    box-shadow: 0 5px 15px rgba(255, 59, 48, 0.2);
}

.highlight-item.prize-first {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), var(--darker-bg));
    border-color: rgba(255, 215, 0, 0.5);
}

.highlight-item.prize-first:hover {
    border-color: #FFD700;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.highlight-item.prize-second {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), var(--darker-bg));
    border-color: rgba(192, 192, 192, 0.5);
}

.highlight-item.prize-second:hover {
    border-color: #C0C0C0;
    box-shadow: 0 5px 15px rgba(192, 192, 192, 0.2);
}

.highlight-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.highlight-text h4 {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.highlight-text p {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.highlight-item.prize-first .highlight-text p {
    color: #FFD700;
}

.highlight-item.prize-second .highlight-text p {
    color: #C0C0C0;
}

.highlight-text p span {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===================================
   SCROLL FADE IN
   =================================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   ROBOTICS HEADER
   =================================== */
.robotics-header {
    margin-top: 5rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

/* ===================================
   LARGE TABLETS (max 1024px)
   =================================== */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1.2rem;
    }

    .rulebook-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .card-container {
        padding: 2rem;
    }
}

/* ===================================
   TABLETS (max 768px)
   =================================== */
@media (max-width: 768px) {

    /* --- NAVBAR --- */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 8, 18, 0.99);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 999;
        padding: 2rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: auto;
    }

    .nav-link {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    /* --- HERO --- */
    .page-heading {
        padding: 3.5rem 1.2rem;
    }

    /* --- LAYOUT --- */
    .section-container {
        padding: 0 1rem;
    }

    .card-container {
        padding: 1.5rem;
        margin: 2rem auto;
        border-radius: 16px;
    }

    .general-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .general-list li {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* --- EVENTS --- */
    .event-section {
        padding: 2rem 0;
    }

    .events-header {
        margin-top: 3.5rem;
        margin-bottom: 2rem;
    }

    .robotics-header {
        margin-top: 3.5rem;
    }

    /* --- RULEBOOK --- */
    .rulebook-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .robotics-rulebook,
    .details-box,
    .gt7-rulebook {
        padding: 1.5rem;
    }

    /* --- GT7 BANNER --- */
    .gt7-top-banner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
    }

    /* --- GAMING HIGHLIGHTS --- */
    .gaming-highlights-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .gaming-highlights-card {
        width: 100%;
        min-width: unset;
        padding: 1.5rem;
    }

    .highlight-item {
        padding: 1rem;
    }

    .highlight-icon {
        font-size: 1.8rem;
    }

    /* --- FOOTER --- */
    .footer {
        margin-top: 2.5rem;
    }
}

/* ===================================
   MOBILE PHONES (max 480px)
   =================================== */
@media (max-width: 480px) {

    body {
        font-size: 14px;
    }

    /* --- NAVBAR --- */
    .logo-main {
        font-size: 0.95rem;
    }

    .logo-sub {
        font-size: 0.7rem;
    }

    .school-logo {
        width: 36px;
        height: 36px;
    }

    /* --- HERO --- */
    .page-heading {
        padding: 3rem 1rem;
    }

    /* --- CARD --- */
    .card-container {
        padding: 1.2rem;
        border-radius: 14px;
    }

    /* --- GENERAL LIST --- */
    .general-list li {
        gap: 0.6rem;
        font-size: 0.85rem;
    }

    .general-list .icon {
        font-size: 1.1rem;
    }

    /* --- RULEBOOK --- */
    .rulebook-list {
        padding-left: 1rem;
    }

    .rulebook-list li {
        font-size: 0.87rem;
        line-height: 1.55;
        margin-bottom: 0.5rem;
    }

    .rulebook-heading {
        font-size: 0.82rem;
    }

    .robotics-rulebook,
    .details-box,
    .gt7-rulebook {
        padding: 1.2rem;
    }

    /* --- GAMING HIGHLIGHTS --- */
    .gaming-highlights-card {
        padding: 1.2rem;
        gap: 1rem;
    }

    .highlight-item {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        padding: 0.9rem;
    }

    .highlight-icon {
        font-size: 1.6rem;
    }

    .highlight-text h4 {
        font-size: 0.72rem;
    }

    /* --- GT7 --- */
    .gt7-round-card {
        padding: 0.9rem 1rem;
    }

    .gt7-round-card h5 {
        font-size: 0.78rem;
    }

    /* --- EVENT MEDIA --- */
    .event-media {
        border-radius: 14px;
    }
}

/* ===================================
   ULTRA SMALL (max 360px)
   =================================== */
@media (max-width: 360px) {

    .nav-link {
        font-size: 0.95rem;
    }

    .logo-main {
        font-size: 0.85rem;
    }

    .highlight-item {
        flex-direction: column;
        text-align: center;
    }

    .gaming-highlights-card {
        padding: 1rem;
    }

    .rulebook-list li {
        font-size: 0.82rem;
    }
}