/* 
* Bengaluru 10K Challenge - Main Stylesheet
* Design Aesthetic: Dark Mode, High Energy, Premium
*/

:root {
    --primary-red: #e30613;
    --primary-black: #000000;
    --primary-white: #ffffff;
    --dark-grey: #1a1a1a;
    --light-grey: #f4f4f4;
    --text-grey: #cccccc;
    --font-main: 'Montserrat', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-black);
    color: var(--primary-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-red);
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-grey);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.bg-dark { background-color: #111; }
.bg-darker { background-color: #222; }
.text-muted { color: #666; }
.text-grey { color: var(--text-grey); }
.text-white { color: var(--primary-white); }
.font-lg { font-size: 1.5rem; }
.font-sm { font-size: 0.9rem; }
.mt-4 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.mb-30 { margin-bottom: 30px; }
.spacer-80 { margin: 80px 0; }
.align-start { align-items: flex-start; }

.btn-full {
    padding: 10px 20px;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
}

.footer-company {
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--primary-white);
    text-transform: uppercase;
}

.footer-bottom {
    margin-top: 50px;
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #666;
}

.route-placeholder {
    padding: 0;
    overflow: visible;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dark-grey);
    background-image: var(--route-map-bg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.prize-categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
    margin-top: 20px;
}

.category-box {
    border: 1px solid #444;
    padding: 10px;
}


.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--primary-red);
    color: var(--primary-white);
    font-weight: 700;
    text-transform: uppercase;
    font-style: italic;
    border: 2px solid var(--primary-red);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-white);
    transform: translateY(-3px);
    box-shadow: 4px 4px 0 var(--primary-white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-white);
}

.btn-outline:hover {
    background-color: var(--primary-white);
    color: var(--primary-black);
    box-shadow: 4px 4px 0 var(--primary-red);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Nav */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color var(--transition-speed);
}

#main-header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-white);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    font-style: italic;
    color: var(--primary-white);
    text-transform: uppercase;
}

.logo span {
    color: var(--primary-red);
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a,
.nav-links .dropdown-toggle {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
    color: inherit;
    display: inline-block;
}

.nav-links a::after,
.nav-links .dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links .dropdown-toggle:hover::after,
.dropdown:hover .dropdown-toggle::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    /* Align below the parent */
    left: 0;
    background-color: var(--primary-black);
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 0;
    display: none;
    flex-direction: column;
    border-top: 2px solid var(--primary-red);
    z-index: 1001;
    text-align: left;
}

.dropdown:hover .dropdown-menu {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.dropdown-menu a {
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    width: 100%;
    display: block;
    margin: 0;
    /* Remove potential margins */
    font-size: 0.85rem;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #1a1a1a;
    color: var(--primary-red);
}

.dropdown-menu a::after {
    display: none;
    /* Remove underline effect for dropdown items */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    background-image: var(--hero-banner);
    background-size: cover;
    background-position: top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero.has-carousel {
    background-image: none;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 4;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 var(--primary-black);
}

.hero-content h1 span {
    display: block;
    color: var(--primary-red);
    -webkit-text-stroke: 1px var(--primary-white);
    /* Outline effect */
}

.hero-buttons {
    margin-top: 20%;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Sub-page Header */
.page-header {
    height: 50vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), var(--primary-black)),
        var(--page-banner);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
}

.page-header h1 {
    font-size: 4rem;
    border-left: 10px solid var(--primary-red);
    padding-left: 30px;
}

/* Layered Card Component */
.layered-card {
    background-color: var(--dark-grey);
    padding: 30px;
    position: relative;
    border: 1px solid #333;
    margin-bottom: 30px;
    transition: transform var(--transition-speed);
}

.layered-card::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-red);
    z-index: -1;
    transition: transform var(--transition-speed);
}

.layered-card:hover {
    transform: translateY(-5px);
}

.layered-card:hover::before {
    transform: translate(10px, 10px);
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-top: 50px;
}

.category-specs li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #444;
    padding: 10px 0;
    margin-bottom: 10px;
}

.category-specs span {
    color: var(--primary-white);
    font-weight: 700;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #333;
    margin-bottom: 10px;
}

.faq-question {
    padding: 20px;
    background-color: var(--dark-grey);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color var(--transition-speed);
}

.faq-question:hover {
    background-color: #252525;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-red);
    transition: transform var(--transition-speed);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    background-color: #111;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
    /* Approximate max height */
}

/* Sticky CTA Bar */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-red);
    padding: 15px 0;
    z-index: 999;
    transform: translateY(100%);
    transition: transform var(--transition-speed);
    display: flex;
    justify-content: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sticky-cta h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-white);
}

.sticky-btn {
    background-color: var(--primary-white);
    color: var(--primary-red);
    padding: 10px 30px;
    font-weight: 800;
    text-transform: uppercase;
    font-style: italic;
    border: none;
    cursor: pointer;
}

.sticky-btn:hover {
    background-color: var(--primary-black);
    color: var(--primary-white);
}

/* Tables (Prize Money) */
.table-container {
    overflow-x: auto;
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--dark-grey);
    margin-top: 20px;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    background-color: var(--primary-red);
    color: var(--primary-white);
    text-transform: uppercase;
    font-weight: 800;
    font-style: italic;
}

tr:hover td {
    background-color: #252525;
}

/* Rules Page */
.rules-list {
    counter-reset: rule-counter;
}

.rules-list li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
}

.rules-list li::before {
    counter-increment: rule-counter;
    content: counter(rule-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: var(--primary-red);
    color: var(--primary-white);
    border-radius: 50%;
    /* Reverting to circle for bullet numbers only, optional based on user pref, keeping clear */
    text-align: center;
    line-height: 30px;
    font-weight: 700;
    font-style: italic;
    border-radius: 0;
    /* Keeping with square edge design */
}

/* Footer */
footer {
    background-color: #0a0a0a;
    padding: 80px 0 100px;
    /* Extra bottom padding for sticky CTA */
    border-top: 1px solid #333;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: var(--primary-white);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    display: inline-block;
    padding-bottom: 5px;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        background-image: var(--hero-banner);
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .mobile-menu-btn {
        display: block;
        /* Show hamburger on mobile */
    }

    .nav-links {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-black);
        flex-direction: column;
        padding: 20px 0;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .nav-links a,
    .nav-links .dropdown-toggle {
        padding: 15px 0;
        display: block;
        width: 100%;
        text-align: center;
    }

    .dropdown {
        width: 100%;
        display: block;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        background-color: #1a1a1a;
        border-top: none;
        padding: 0;
    }

    /* Simple interaction for mobile: tap/hover expands */
    .dropdown:hover .dropdown-menu {
        display: flex;
        animation: none;
    }

    .dropdown-menu a {
        padding: 15px 0;
        color: #bbb;
        font-size: 0.85rem;
        background-color: #111;
        border-bottom: 1px solid #222;
        padding-left: 0;
        /* Centered text inheritance */
    }

    .page-header {
        height: 40vh;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    header .btn {
        display: none;
        /* Hide header CTA on mobile to save space */
    }
}

/* Partners Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    align-items: center;
    justify-items: center;
    margin-top: 50px;
}

.partner-item {
    background-color: var(--dark-grey);
    padding: 20px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 250px;
    height: 120px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.3);
}

.partner-item img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-speed);
}

.partner-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.expo-item {
    filter: none !important;
    opacity: 1 !important;
}

.expo-item img {
    filter: none !important;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .partner-item {
        height: 100px;
    }

    .partner-item img {
        filter: grayscale(0%);
        opacity: 1;
    }
    .hero {
        height: 50vh; /* More natural height for banners on mobile */
        background-size: contain;
        background-position: center;
    }
    .hero-slide {
        background-size: contain;
        background-position: center;
        background-attachment: scroll;
    }
}