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

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --card-bg: #ffffff;
    --section-bg: #f8f9fa;
    --border-color: rgba(0,0,0,0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* System preference for dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e4e4e4;
        --text-light: #d0d0d0;
        --card-bg: #2d2d2d;
        --section-bg: #242424;
        --border-color: rgba(255,255,255,0.1);
        --shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
}

/* Manual theme overrides */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --card-bg: #ffffff;
    --section-bg: #f8f9fa;
    --border-color: rgba(0,0,0,0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e4e4e4;
    --text-light: #d0d0d0;
    --card-bg: #2d2d2d;
    --section-bg: #242424;
    --border-color: rgba(255,255,255,0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background: var(--bg-color);
    box-shadow: 0 2px 20px var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand-link {
    text-decoration: none;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FF6B6B;
    transition: color 0.3s ease;
}

.nav-brand-link:hover h1 {
    color: #e55656;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #FF6B6B;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: #FF6B6B;
    transform: scale(1.1);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0 20px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #FF6B6B;
}

.btn-primary:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #FF6B6B;
}

.btn-outline {
    background: transparent;
    color: #FF6B6B;
    border: 2px solid #FF6B6B;
}

.btn-outline:hover {
    background: #FF6B6B;
    color: white;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* About Section */
.about {
    background: var(--section-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FF6B6B;
    margin-bottom: 0.5rem;
    text-align: center;
}

.stat p {
    font-weight: 500;
    color: var(--text-light);
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Challenges Section */
.challenges-container {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.challenges-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: clip;
    scroll-behavior: smooth;
    padding: 0 2rem 1rem calc(50vw - 600px + 20px);
    -webkit-overflow-scrolling: touch;
}

.challenges-grid::-webkit-scrollbar {
    display: none;
}

.challenges-grid {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.challenge-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.challenge-nav-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.challenge-nav-btn:hover {
    border-color: #FF6B6B;
    background: #FF6B6B;
    color: white;
    transform: scale(1.1);
}

.challenge-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.challenge-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    width: calc(100vw - 8rem);
    max-width: 400px;
    flex-shrink: 0;
}

.challenge-card:hover {
    transform: translateY(-5px);
}

.challenge-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
}

.challenge-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1rem 1.5rem 0.5rem;
    color: var(--text-color);
}

.challenge-card p {
    color: var(--text-light);
    margin: 0 1.5rem;
}

.challenge-date {
    display: block;
    font-size: 0.9rem;
    color: #FF6B6B;
    font-weight: 500;
    margin: 0.5rem 1.5rem 1.5rem;
}

/* Achievements Section */
.achievements {
    background: var(--section-bg);
}

.achievements-list {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.achievement-icon {
    font-size: 3rem;
    min-width: 60px;
}

.achievement-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.achievement-content p {
    color: var(--text-light);
}

/* Sponsorships Section */
.sponsorship-intro {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.sponsorship-intro p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.package {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.package:hover {
    border-color: #FF6B6B;
    transform: translateY(-5px);
}

.package h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.package-subtitle {
    color: #FF6B6B;
    font-weight: 500;
    margin-bottom: 1rem;
    font-style: italic;
}

.package ul {
    list-style: none;
    margin: 1rem 0;
}

.package li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.package li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #FF6B6B;
    font-weight: bold;
}

.package em {
    color: #4ECDC4;
    font-style: italic;
    font-weight: 500;
}

.pricing-note {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid #4ECDC4;
}

.pricing-note h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.pricing-note p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Contact Section */
.contact {
    background: var(--section-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info h3,
.social-links h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
}

.contact-method strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-method p {
    color: var(--text-light);
    margin: 0;
}

.email-link {
    text-decoration: none;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.email-link:hover {
    transform: scale(1.2);
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    padding: 10px 20px;
    background: #FF6B6B;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #e55656;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--border-color);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .challenges-grid {
        padding: 0 20px 1rem 20px !important;
    }

    .sponsorship-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .achievement {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .social-icons {
        justify-content: center;
    }
}
