:root {
    --bg: #0b0f14;
    --panel: #111822;
    --panel-2: #0e1520;
    --text: #ffffff;
    --muted: #b0b6c0;
    --accent: #5dd3ff;
    --accent-2: #7c5cff;
    --border: rgba(255, 255, 255, 0.15);
    --shadow: 0 10px 30px rgba(0, 0, 0, .55);
    --radius: 14px;
    --transition: all 0.3s ease;
}

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

html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial;
    color: var(--text);
    background: linear-gradient(180deg, #0a0e13, #0b0f14);
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92vw);
    margin-inline: auto;
}

/* Base section padding for mobile */
.section {
    padding: 60px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 20, 28, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    animation: slideDown 0.6s ease forwards 0.3s;
}

@keyframes slideDown {
    to {
        transform: translateY(0);
    }
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
}

.nav-inner a img {
    height: 5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    font-size: 1.4rem;
}

.brand .dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(93, 211, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(93, 211, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(93, 211, 255, 0);
    }
}

/* Mobile Navigation Menu (hidden by default, toggled with JS) */
.nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    margin: 0;
}

.nav ul.active {
    display: flex;
}

.nav ul li {
    width: 100%;
    text-align: center;
    list-style: none;
}

.nav a {
    display: block;
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--text);
    position: relative;
}

/* Hamburger Menu Icon (visible on mobile by default) */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    width: 100%;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}


/* --- HERO SECTION --- */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    height: 30vh; /* Shorter height for mobile */
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(11, 15, 20, 0.9) 0%, rgba(11, 15, 20, 0.6) 100%);
    z-index: 1;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1), transform 10s ease;
    pointer-events: none;
}
.hero-img.active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.dsi-presents-logo {
    width: 60%;
    height: 50%;
}

.hero:hover .hero-img {
    transform: scale(1);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 100%;
    text-align: center; /* Centered for mobile */
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text);
    background: rgba(125, 92, 255, 0.3);
    border: 1px solid var(--border);
    display: inline-block;
    margin-bottom: 20px;
    animation: fadeIn 1s ease forwards 0.5s;
    opacity: 0;
}

.hero h1 {
    margin: 4px 0 15px;
    font-size: clamp(32px, 8vw, 48px);
    color: var(--text);
    line-height: 1.2;
    animation: fadeInUp 1s ease forwards 0.7s;
    opacity: 0;
}

.hero p {
    margin: 0 auto;
    max-width: 60ch;
    color: var(--text);
    font-size: 16px;
    animation: fadeInUp 1s ease forwards 0.9s;
    opacity: 0;
}

/* --- SPONSOR SECTION --- */
.sponsors-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 30px;
    margin-top: 40px;
}

.sponsor-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
}

.sponsor-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.sponsor-card .sponsor-role {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.sponsor-card .sponsor-logo {
    max-height: 60px; /* Smaller logo for mobile */
    width: auto;
    max-width: 80%;
    margin-inline: auto;
}

.rounded-logo {
    border-radius: 8px;
}

/* --- EVENTS SECTION --- */
.events-header {
    display: flex;
    align-items: flex-start; /* Aligned left for mobile */
    flex-direction: column; /* Stacked for mobile */
    margin-bottom: 40px;
    gap: 20px;
}

.events-header h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    color: var(--text);
    position: relative;
    display: inline-block;
}

.events-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 380px;
    height: 4px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    border-radius: 2px;
}

.muted {
    color: var(--muted);
    font-size: 18px;
}

.event-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: flex-start; /* Aligned left for mobile */
}

.chip {
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chip:hover {
    background: var(--panel);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.chip.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
    border-color: transparent;
}

.chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    transition: var(--transition);
}

.chip.active .dot {
    background: var(--bg);
}

/* Single column card layout for mobile */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    transform: translateY(50px);
    opacity: 0;
}

.card.visible {
    transform: translateY(0);
    opacity: 1;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.card:hover img {
    transform: scale(1.05);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

.card h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 20px;
}

.meta {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta i {
    color: var(--accent);
}

/* Stacked buttons for mobile */
.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    width: 100%; /* Full width buttons */
    justify-content: center; /* Centered text */
}

.btn:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:hover i {
    transform: translateX(3px);
}

.btn i {
    transition: var(--transition);
}

/* --- ABOUT & CONTACT SECTIONS --- */
.about-content,
.contact-content {
    display: grid;
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 60px;
    margin-top: 40px;
}

.about-text {
    padding-right: 0;
}

.about-text h2 {
    margin-bottom: 20px;
    font-size: 36px;
    position: relative;
    display: inline-block;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    border-radius: 2px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
}

/* Single column stats for smallest screens */
.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 40px;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: var(--muted);
}

.about-image {
    position: relative;
}

.about-image img {
    position: flex;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
/*
.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    z-index: -1;
    opacity: 0.5;
    transition: var(--transition);
}*/

/*.about-image:hover::before {
    top: 0;
    left: 0;
}
*/
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.contact-details h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.contact-details p {
    color: var(--muted);
}

.contact-form {
    background: var(--panel);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.contact-form h3 {
    margin-bottom: 20px;
    font-size: 24px;
    position: relative;
    display: inline-block;
}

.contact-form h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    border-radius: 2px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.form-control {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(93, 211, 255, 0.2);
}

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

.submit-btn {
    padding: 14px 30px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.submit-btn i {
    transition: var(--transition);
}

.submit-btn:hover i {
    transform: translateX(5px);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    color: var(--text);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    font-size: 1.8rem;
}

.footer-logo .dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Stacked footer links for mobile */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.footer-links a {
    color: var(--muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: var(--transition);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: var(--bg);
    transform: translateY(-3px);
}

.copyright {
    color: var(--muted);
    margin-top: 20px;
}


/* --- UTILITIES --- */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    box-shadow: var(--shadow);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}


/* =================================================================
   RESPONSIVE DESIGN (MOBILE-FIRST APPROACH)
   ================================================================= */

/* 
  Base styles (from previous example) apply to all devices by default.
  The following queries adjust the layout for specific screen sizes.
*/

/* Extra small devices (phones, 600px and down) */
/* These styles are specific overrides for the smallest screens. Many are already covered by the mobile-first base styles. */
@media only screen and (max-width: 600px) {
    .hero-content p {
        font-size: 16px; /* Make hero text more compact */
    }

    .sponsor-card {
        padding: 30px 20px; /* Adjust padding on sponsor cards */
    }

    /* Stack action buttons vertically inside event cards */
    .actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Stack stats into a single column on the smallest screens */
    .about-stats {
        grid-template-columns: 1fr;
    }

    /* Stack footer links vertically */
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}


/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .sponsors-grid {
        /* Display two sponsor cards side-by-side */
        grid-template-columns: 1fr 1fr;
    }

    .cards {
        /* Display two event cards side-by-side */
        grid-template-columns: 1fr 1fr;
    }

    .about-stats {
        /* Display stats in a two-column layout */
        grid-template-columns: 1fr 1fr;
    }
}


/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    /* Restore larger padding for sections */
    .section {
        padding: 80px 0;
    }

    /* --- Desktop Navigation --- */
    .hamburger {
        display: none; /* Hide the hamburger icon */
    }

    .nav ul {
        display: flex; /* Show the desktop nav links */
        position: static;
        flex-direction: row;
        width: auto;
        background: transparent;
        border-bottom: none;
        padding: 0;
    }

    .nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(to right, var(--accent), var(--accent-2));
        transition: var(--transition);
        transform: translateX(-50%);
    }

    .nav a:hover::after {
        width: 80%;
    }

    /* --- Page Sections --- */
    .hero {
        height: 100vh; /* Make hero section taller */
    }

    .hero-content {
        text-align: left; /* Align hero text to the left */
        max-width: 700px;
    }

    .events-header {
        /* Place header title and description side-by-side */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .event-buttons {
        justify-content: center;
    }

    .actions {
        /* Place card buttons side-by-side again */
        flex-direction: row;
    }

    .btn {
        width: auto; /* Buttons take up only the space they need */
    }
}


/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .cards {
        /* Allow for three event cards per row */
        grid-template-columns: 1fr 1fr 1fr;
    }

    .about-content,
    .contact-content {
        /* Create two-column layouts for about and contact sections */
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .about-text {
        padding-right: 40px;
    }
}


/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .sponsors-grid {
        /* Ensure the grid doesn't stretch too wide */
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    
    .sponsor-card .sponsor-logo {
        max-height: 80px; /* Increase logo size on large screens */
    }
    
    .cards {
        /* Use a more robust auto-fill for perfect wrapping on large screens */
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}