/* --- Google Font & Basic Setup --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    /* Updated Color Scheme */
    --color-dark-blue: #01073C; /* Specific dark blue */
    --color-black: #000000;      /* Black */
    --color-light-gray: #f4f4f4;
    --color-white: #fff;
    --color-accent-orange: #f36f21;
    --color-accent-green: #4CAF50;
    --font-family: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--color-light-gray);
    color: var(--color-black); /* Changed default text to black */
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background: var(--color-white);
    color: var(--color-black); /* Text color black for contrast */
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: var(--color-black); /* Menu text black */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent-orange); /* Orange on hover */
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-black);
}

/* --- News Ticker Styles --- */
.news-ticker-container {
    background-color: var(--color-dark-blue); /* Match theme dark blue */
    color: var(--color-white);
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    z-index: 900; /* Below header but above hero */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.news-ticker {
    display: inline-block;
    padding: 10px 0;
    /* Faster animation speed (15s instead of 25s) */
    animation: ticker 28s linear infinite;
}

/* Pause animation on hover */
.news-ticker:hover {
    animation-play-state: paused;
}

.ticker-link {
    text-decoration: none;
    color: var(--color-white);
    display: inline-block;
}

.ticker-content {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    /* Removed padding-left: 100% to make it appear immediately (handled by keyframe) */
}

.ticker-logo {
    height: 24px; /* Adjust size as needed */
    margin-right: 10px;
    vertical-align: middle;
    background-color: white; /* Ensure logo is visible on dark bg if transparent */
    padding: 2px;
    border-radius: 2px;
}

@keyframes ticker {
    0% {
        /* Start from right edge of screen */
        transform: translateX(100vw); 
    }
    100% {
        /* Move completely off to the left */
        transform: translateX(-100%); 
    }
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: transform 0.3s ease, background-color 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-accent-orange);
    color: var(--color-white);
}

.btn-accent-orange {
    background: var(--color-accent-orange);
    color: var(--color-white);
}

.btn-accent-green {
    background: var(--color-accent-green);
    color: var(--color-white);
}

/* --- Hero Section with Parallax Effect --- */
#hero {
    min-height: 80vh;
    background-image: url('Images/Background BRAIN.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

#hero h1 {
    font-size: 3.5rem;
}

#hero h2 { /* Theme text */
    font-size: 1.5rem;
    margin: 10px 0;
    /* color: #fff; /* Ensure theme text is white */
}

#hero h3 { /* Date/Host text */
    font-size: 1.2rem;
    font-weight: 400;
}

/* Added: Style for Venue line */
.venue {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 5px;
    color: var(--color-accent-orange); /* Orange for emphasis */
}


.hero-buttons {
    margin-top: 30px;
}

.hero-buttons .btn {
    margin: 0 10px;
}


/* --- Sections General --- */
section {
    padding: 60px 0;
    position: relative;
    background-color: var(--color-light-gray);
}

/* Page content for static pages like submission, contact, etc. */
.page-content {
     background-color: var(--color-light-gray);
     padding-top: 0; /* No top padding as page-header handles it */
}


section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--color-dark-blue); /* Section titles in dark blue */
}

section h3 { /* Sub-section titles like About BRAIN */
     font-size: 1.8rem;
     color: var(--color-black); /* Black for sub-titles */
     margin-bottom: 15px;
     padding-bottom: 5px;
     border-bottom: 2px solid var(--color-accent-orange);
     display: inline-block; /* Make border fit text */
}

/* --- Important Dates Section --- */
#important-dates {
    background: var(--color-white);
}

/* Updated Countdown Styles */
.countdown {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 20px;
    margin-bottom: 40px;
}

.countdown-block {
    background-color: var(--color-dark-blue); /* Dark blue background */
    color: var(--color-white);
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    min-width: 90px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.countdown-label {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Updated Dates List Styles */
.dates-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
    text-align: left; /* Align text left */
}

.dates-list li {
    padding: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
}
.dates-list li:last-child {
    border-bottom: none;
}
.dates-list strong {
    color: var(--color-accent-green); /* Green for emphasis */
}

/* --- About Section --- */
/* Updated: Two-column layout for About BRAINCON */
#about {
    background: var(--color-white); /* White background for this section */
}
.about-layout {
    display: flex;
    align-items: center;
    gap: 40px;
}
.about-text {
    flex: 1; /* Take available space */
}
.about-image {
    flex-basis: 40%; /* Fixed width for image container */
    max-width: 450px;
}
.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}


/* --- About Partners Section --- */
#about-partners {
     background: var(--color-light-gray); /* Keep light gray background */
}

.about-partner-block {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--color-white); /* White background for cards */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.about-partner-block.two-column {
    display: flex;
    align-items: flex-start; /* Align items top */
    gap: 30px;
}
.about-partner-block .text-content {
    flex: 1; /* Take more space */
}
.about-partner-block .image-content {
    flex-basis: 35%; /* Fixed width for image */
    max-width: 350px;
}
.about-partner-block .image-content img {
    width: 100%;
    border-radius: 8px;
}


/* --- Tracks Section --- */
#tracks { background: var(--color-white); }

.cmt-notice {
    background-color: #e7f3ff; /* Lighter blue */
    border-left: 5px solid var(--color-dark-blue); /* Dark blue border */
    padding: 15px 20px;
    margin: 0 auto 40px auto;
    max-width: 800px;
    border-radius: 5px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.cmt-notice p {
    margin: 0;
}


/* Accordion Styles */
.accordion {
    max-width: 1100px;
    margin: 0 auto;
}

.accordion-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden; /* Important for transition */
}

.accordion-header {
    background-color: var(--color-white);
    color: var(--color-black);
    padding: 15px 20px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f0f0f0;
}

.accordion-header.active {
    background-color: var(--color-dark-blue); /* Dark blue when active */
    color: var(--color-white);
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0 20px;
    background-color: var(--color-white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.accordion-content ul {
    list-style: disc;
    padding-left: 20px;
    margin: 15px 0;
}
.accordion-content li {
    margin-bottom: 8px;
}

.accordion-item.active .accordion-content {
    max-height: 900px; /* Adjust as needed */
    padding: 20px 25px;
}

#tracks .btn { display: block; width: fit-content; margin: 30px auto 0 auto; } /* Button below accordion */


/* --- Downloads Section --- */
.downloads-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.download-item {
    background: var(--color-white);
    padding: 15px 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: var(--color-black);
    font-weight: 600;
    transition: all 0.3s ease;
}
.download-item:hover {
    background: var(--color-accent-orange);
    color: var(--color-white);
    border-color: var(--color-accent-orange);
}

/* --- Styles for Committee, Submission, Registration Pages --- */
.page-header {
    background-color: var(--color-dark-blue); /* Dark blue header background */
    color: var(--color-white);
    padding: 40px 0;
    text-align: center;
}
/* Remove margin-bottom from page-header */
/* .page-header { margin-bottom: 40px; } */


.page-content {
     padding-top: 40px; /* Add padding to top of content */
     padding-bottom: 40px; /* Add padding to bottom of content */
     background-color: var(--color-light-gray); /* Match body bg */
}


.content-section {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}
.content-section:last-child {
    margin-bottom: 0; /* No margin on last section */
}

.content-section h3 {
    color: var(--color-dark-blue); /* Dark blue for subheadings */
    font-size: 1.6rem;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--color-accent-orange);
    display: inline-block;
}
.content-section ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}
.content-section li {
    margin-bottom: 8px;
}


/* Committee Page Specific Styles */
#committee-page .page-content {
    background-color: var(--color-white); /* White bg for committee page */
}

.committee-role {
    font-size: 1.8rem;
    color: var(--color-black);
    margin-top: 30px; /* Reduced top margin */
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-accent-orange);
    text-align: left;
}
.committee-role:first-of-type {
    margin-top: 0; /* No top margin for the first role */
}

.committee-member-card {
    background: var(--color-white);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; /* Needed for smooth transition */
    border: 1px solid #eee;
}

.member-summary {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background-color: var(--color-white);
    transition: background-color 0.3s ease;
}

.member-summary:hover {
    background-color: #f9f9f9;
}

.member-summary img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 3px solid var(--color-light-gray);
}

.member-info {
    flex-grow: 1;
}

.member-info h4 {
    font-size: 1.2rem;
    margin-bottom: 3px;
    color: var(--color-dark-blue);
}

.member-info p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

.expand-icon {
    font-size: 1.8rem;
    color: var(--color-accent-orange);
    transition: transform 0.3s ease;
    margin-left: 15px;
}

.member-bio {
    padding: 0 20px; /* Padding applied when active */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--color-light-gray); /* Slight background difference */
    font-size: 0.95rem;
    line-height: 1.7;
    border-top: 1px solid #eee; /* Separator */
}
.member-bio p, .member-bio ul, .member-bio h2 {
    margin-bottom: 15px;
}
.member-bio ul {
    list-style: disc;
    margin-left: 20px;
}
.member-bio a {
    color: var(--color-accent-orange);
    text-decoration: none;
}
.member-bio a:hover {
    text-decoration: underline;
}

.committee-member-card.active .member-bio {
    max-height: 2500px; /* Increased max-height */
    padding: 20px;
}

.committee-member-card.active .expand-icon {
    transform: rotate(45deg);
}

/* Registration Page Table Styles */
.registration-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto; /* Center table */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: var(--color-white);
}

.registration-table th,
.registration-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: center;
    vertical-align: middle;
}

.registration-table thead th {
    background-color: var(--color-light-gray);
    font-weight: 600;
    color: var(--color-black);
    font-size: 0.9rem;
}

.registration-table .category-header {
    background-color: var(--color-dark-blue); /* Dark blue category header */
    color: var(--color-white);
    font-weight: 700;
    text-align: left;
    font-size: 1.1rem;
}

.registration-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.registration-table tbody tr:hover {
    background-color: #f1f1f1;
}

.registration-table .sub-header {
    background-color: #f0f0f0;
    font-weight: 600;
}

.registration-table .note-row td {
    text-align: left;
    font-style: italic;
    font-size: 0.9rem;
    background-color: #fdfdfd;
}

/* Contact Page Layout */
.contact-layout {
    display: flex;
    gap: 30px;
}
.contact-details {
    flex: 1;
}
.contact-form-container {
    flex: 1;
}
.contact-details h4 {
    font-size: 1.2rem;
    color: var(--color-dark-blue);
    margin-top: 20px;
    margin-bottom: 5px;
}
.contact-details p {
    margin-bottom: 10px;
}
.contact-details a {
    color: var(--color-accent-orange);
    text-decoration: none;
}
.contact-details a:hover {
    text-decoration: underline;
}

/* Responsive Google Form Container */
.google-form-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 160%; /* Adjusted ratio for taller form */
    border-radius: 8px;
    border: 1px solid #ddd;
}
.google-form-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* --- Footer --- */
footer {
    background: var(--color-black); /* Footer background black */
    color: var(--color-white);
    padding-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
}
.footer-col h4 {
    margin-bottom: 15px;
    color: var(--color-accent-orange);
}
.footer-col ul { list-style: none; }
.footer-col a { color: #ccc; text-decoration: none; }
.footer-col a:hover { color: var(--color-white); }
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #444;
}

/* --- Responsive Design --- */
@media(max-width: 768px) {
    header .container {
        flex-wrap: wrap;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 10px;
        background-color: var(--color-white);
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 10px 0; }
    .menu-toggle { display: block; }
    header .btn-primary { display: none; }
    #hero h1 { font-size: 2.5rem; }

    /* Stack About section elements on mobile */
    .about-layout {
        flex-direction: column;
    }
     .about-image {
        flex-basis: auto; /* Reset basis */
        max-width: 100%; /* Full width */
        margin-top: 20px;
    }

    /* Stack About Partners columns on mobile */
     .about-partner-block.two-column {
        flex-direction: column;
     }
    .about-partner-block .image-content {
        flex-basis: auto; /* Reset basis */
        max-width: 100%; /* Full width */
        margin-top: 20px;
    }

     /* Adjust countdown block size on mobile */
    .countdown-block {
        padding: 10px 15px;
        min-width: 70px;
    }
    .countdown-number {
        font-size: 1.8rem;
    }
    .countdown-label {
        font-size: 0.7rem;
    }

    /* Stack committee card on mobile */
    .member-summary {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .member-summary img {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .expand-icon {
        margin-left: 0;
        margin-top: 10px;
    }

    /* Stack Contact page on mobile */
    .contact-layout {
        flex-direction: column;
    }

    /* Responsive Table Styles */
    .registration-table thead {
        display: none; /* Hide table header */
    }
    .registration-table,
    .registration-table tbody,
    .registration-table tr,
    .registration-table td {
        display: block;
        width: 100%;
    }
    .registration-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        overflow: hidden;
    }
    .registration-table td {
        text-align: right;
        padding-left: 50%; /* Make space for label */
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
    }
    .registration-table tr:last-child td:last-child {
        border-bottom: none;
    }
     .registration-table td::before {
        content: attr(data-label); /* Use data-label attribute for header */
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--color-black);
    }
     /* Keep category header visible */
    .registration-table td.category-header {
        text-align: center;
        padding-left: 15px; /* Reset padding */
        background-color: var(--color-dark-blue);
        color: var(--color-white);
        font-weight: 700;
    }
    .registration-table td.category-header::before {
         display: none; /* Hide pseudo-element for category header */
    }
    .registration-table .note-row td {
        text-align: left;
        padding-left: 15px;
    }
    .registration-table .note-row td::before {
        display: none;
    }

}

