/* Define CSS Variables */
:root {
    --primary-color: #003399;
    --text-color: #333;
    --bg-light: #f4f4f4;
    --border-color: #ddd;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.9rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.2rem;
    --font-size-2xl: 1.3rem;
    --font-size-3xl: 1.5rem;
    --max-width-main: 1200px;
    --max-width-table: 800px;
    --box-width: 200px;
    --box-min-height: 150px;
    --host-logo-min-height: 160px;
    --host-logo-max-width: 300px;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
}

header {
    background: var(--bg-light);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: var(--font-size-3xl);
    font-weight: bold;
}

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

.nav-menu li {
    margin: 0 var(--spacing-md);
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    padding: var(--spacing-sm);
}

.nav-menu a.active {
    border-bottom: 2px solid var(--primary-color);
}

.nav-menu a.external {
    /* Optional: Add a subtle style if desired */
    font-style: italic; /* Example: makes "Program" stand out */
}

.hamburger {
    display: none;
    font-size: var(--font-size-3xl);
    cursor: pointer;
}

main {
    padding: var(--spacing-xl);
    min-height: calc(100vh - 150px);
    max-width: var(--max-width-main);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

section {
    margin-bottom: var(--spacing-xl);
}

.hidden {
    display: none;
}

/* Hero Section */
.hero {
    width: 100%;
    margin-bottom: var(--spacing-xl);
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}


/* Banner Container for Side-by-Side Layout */
.banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-3xl); /* Space between banners */
    margin-bottom: var(--spacing-xl);
}

/* Adjust AIAA and Host Banner for larger screens */
.aiaa-banner,
.host-banner {
    text-align: center;
    flex: 1; /* Equal width for both banners */
    max-width: 30%; /* Maintain original max-width */
}

.aiaa-banner img,
.host-banner img {
    max-width: 100%; /* Ensure images scale within their container */
    height: auto;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .banner-container {
        flex-direction: column; /* Stack vertically on mobile */
        gap: var(--spacing-md); /* Smaller gap for mobile */
    }

    .aiaa-banner,
    .host-banner {
        max-width: 70%; /* Match your existing mobile max-width */
        flex: none; /* Remove flex growth on mobile */
    }
}

.welcome-text {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.welcome-text p {
    font-size: var(--font-size-lg);
    margin: var(--spacing-sm) 0;
}

/* Footer */
footer {
    background: var(--bg-light);
    text-align: center;
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

footer p {
    margin: 0; /* Remove default margin for cleanliness */
    text-align: center; /* Explicitly center, overriding global p */
}

/* Schedule Section */
.schedule-table {
    width: 100%;
    max-width: var(--max-width-table);
    margin: var(--spacing-md) auto;
    border-collapse: collapse;
}

.schedule-table td {
    padding: 0.25rem var(--spacing-lg); /* Tighter vertical, keep horizontal */
}

.schedule-table td:first-child {
    width: 40%;
    font-weight: bold;
}

h2.day-title {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    margin: var(--spacing-lg) auto var(--spacing-sm);
    max-width: var(--max-width-table);
    padding-left: var(--spacing-lg);
    position: relative;
}

h2.day-title::after {
    content: "";
    display: block;
    height: 1px;
    background: var(--border-color);
    width: 100%;
    margin: var(--spacing-sm) auto 0;
}

.program-link {
    text-align: center;
    margin: var(--spacing-md) auto;
    max-width: var(--max-width-main); /* Matches main's 1200px */
}

/* Style the link itself */
.program-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--font-size-lg);
}

.program-link a:hover {
    text-decoration: underline;
}

/* Speaker Styles */
.speaker {
    margin: var(--spacing-xl) 0;
    display: flex;
    width: 100%;
}

.speaker-images {
    width: 25%; /* Larger images as adjusted */
    padding-right: var(--spacing-lg);
    text-align: center;
}

.speaker-image {
    width: 100%;
    height: auto;
    min-width: 200px; /* Minimum size */
    margin-bottom: var(--spacing-lg);
    border-radius: 5px;
}

.speaker-content h2 {
    font-size: var(--font-size-3xl);
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.speaker-content h3 {
    font-size: var(--font-size-xl);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.speaker-content p {
    margin-bottom: var(--spacing-md);
}

.speaker-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) auto;
    width: 100%;
}

/* Event Styles */
.event {
    margin: var(--spacing-xl) 0;
    display: flex;
    width: 100%;
}

.event-images {
    width: 33%; /* Larger images as adjusted */
    padding-right: var(--spacing-lg);
}

.event-image {
    width: 100%;
    height: auto;
    min-width: 200px; /* Minimum size */
    margin-bottom: var(--spacing-lg);
    border-radius: 5px;
}

.event-content h2 {
    font-size: var(--font-size-3xl);
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.event-content h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
}

.event-subheader {
    font-size: var(--font-size-md);
    font-style: italic;
    margin-left: var(--spacing-md);
}

.event-sponsor {
    font-size: var(--font-size-md);
    font-weight: bold;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.event-content p {
    margin-bottom: var(--spacing-md);
}

.event-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) auto;
    width: 100%;
}

/* Location Section */
.location-wrapper {
    display: flex;
    width: 100%;
}

.location-images {
    width: 25%;
    padding-right: var(--spacing-lg);
}

.location-image {
    width: 100%;
    height: auto;
    margin-bottom: var(--spacing-lg);
    border-radius: 5px;
}

.location-text {
    width: 75%;
}

.location-text p {
    margin-bottom: var(--spacing-md);
}

.address-container {
    display: flex;
    justify-content: space-between;
    margin: var(--spacing-xl) 0;
    max-width: var(--max-width-table);
}

.address {
    width: 45%;
    padding: var(--spacing-md);
    background: #f9f9f9;
    border-radius: 5px;
}

.address h2 {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.address p {
    margin: var(--spacing-sm) 0;
}

.attractions-list {
    list-style-type: disc;
    margin-left: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.attractions-list li {
    margin: var(--spacing-sm) 0;
}

/* Sponsors/Partners Shared Styles */
.sponsor-level, .partner-level {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.sponsor-box, .partner-box {
    width: var(--box-width);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    text-align: center;
    border-radius: 5px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--box-min-height);
}

/* Constrain dropdown within sponsor box */
.sponsor-box .dropdown {
    margin-top: var(--spacing-sm);
    width: 100%; /* Fit within sponsor-box width */
}

.sponsor-box .dropdown select {
    width: 100%; /* Match parent width (200px minus padding) */
    max-width: 100%; /* Prevent overflow */
    padding: var(--spacing-sm);
    font-size: var(--font-size-sm);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-sizing: border-box; /* Include padding in width */
    overflow: hidden; /* Prevent text from spilling */
    text-overflow: ellipsis; /* Truncate long options */
    white-space: nowrap; /* Keep options on one line */
}

.sponsor-box .dropdown button {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    font-size: var(--font-size-sm);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 100%; /* Match select width */
}

.sponsor-box .dropdown button:hover {
    background: #0056d2; /* Darker shade of primary color */
}

.sponsor-logo, .partner-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: var(--spacing-sm);
}

.sponsor-material, .partner-material {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-xs);
    color: var(--primary-color);
    text-decoration: none;
}

.sponsor-material:hover, .partner-material:hover {
    text-decoration: underline;
}

.sponsor-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) auto;
    width: 100%;
}

/* Host School Section */
.host-school-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

.host-school {
    width: 100%;
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.host-school-container:has(> .host-school:nth-child(2)) .host-school {
    width: 48%;
    text-align: left;
}

.host-logo {
    max-width: var(--host-logo-max-width);
    height: auto;
    min-height: 75px;
    margin: 0 auto var(--spacing-md);
    display: block;
    object-fit: contain;
}

.host-content p {
    margin-bottom: var(--spacing-md);
}

/* Proceedings Section */
.category {
    margin: var(--spacing-md) 0;
}

summary {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
    cursor: pointer;
    padding: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: 5px;
    outline: none;
}

summary:hover {
    background: #e9ecef;
}

.proceedings-table {
    width: 100%;
    margin: var(--spacing-md) 0;
    border-collapse: collapse;
}

.proceedings-table th, .proceedings-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.proceedings-table th {
    background: #f9f9f9;
    font-weight: bold;
}

.proceedings-table td a {
    color: var(--primary-color);
    text-decoration: none;
}

.proceedings-table td a:hover {
    text-decoration: underline;
}

.hidden-presentation {
    display: none;
}
.hidden-presentation.visible {
    display: block;
}

.red {
    color: red !important;
}

/* Global Paragraph Styling */
p {
    text-align: justify;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: fixed;
        top: var(--spacing-md);
        right: var(--spacing-md);
        z-index: 1001;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-light);
        flex-direction: column;
        padding-top: 4rem;
        z-index: 1000;
        pointer-events: none;
    }

    .nav-menu.active {
        display: flex;
        pointer-events: auto;
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--border-color);
        pointer-events: auto;
    }

    .nav-menu a.active {
        border-bottom: 1px solid var(--border-color);
        background: #e9ecef;
    }

    /* Schedule */
    .schedule-table td {
        display: block;
        width: 100%;
        padding: 0.2rem var(--spacing-sm); /* Even tighter vertical on mobile */
    }

    .schedule-table td:first-child {
        width: 100%;
    }

    .schedule-table tr {
        margin-bottom: var(--spacing-md);
        display: block;
    }

    h2.day-title {
        font-size: var(--font-size-md);
        padding-left: var(--spacing-sm);
        z-index: 1; /* Keep below menu */
    }

    .program-link {
        margin: var(--spacing-sm) auto; /* Slightly less margin on mobile */
    }

    .speaker {
        flex-direction: column;
    }

    .speaker-images {
        width: 100%;
        padding-right: 0;
    }

    .speaker-image {
        width: 100%;
        max-width: 300px;
        min-width: 0; /* Reset for mobile */
        margin: 0 auto var(--spacing-md);
        display: block;
    }

    .speaker-content h2 {
        font-size: var(--font-size-2xl);
    }

    .speaker-content h3 {
        font-size: var(--font-size-md);
    }

    .event {
        flex-direction: column;
    }

    .event-images {
        width: 100%;
        padding-right: 0;
    }

    .event-image {
        width: 100%;
        max-width: 300px;
        min-width: 0; /* Reset for mobile */
        margin: 0 auto var(--spacing-md);
        display: block;
    }

    .event-content h2 {
        font-size: var(--font-size-2xl);
    }

    .event-content h3 {
        font-size: var(--font-size-md);
    }

    /* Location */
    .location-wrapper {
        flex-direction: column;
    }

    .location-images {
        width: 100%;
        padding-right: 0;
    }

    .location-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto var(--spacing-md);
        display: block;
    }

    .location-text {
        width: 100%;
    }

    .address-container {
        flex-direction: column;
    }

    .address {
        width: 100%;
        margin-bottom: var(--spacing-md);
    }

    .address h2 {
        font-size: var(--font-size-lg);
    }

    /* Sponsors/Partners */
    .sponsor-level, .partner-level {
        justify-content: center;
    }

    .sponsor-box, .partner-box {
        width: 100%;
        max-width: 300px;
    }
    
    .sponsor-box .dropdown select,
    .sponsor-box .dropdown button {
        width: 100%; /* Still full width on mobile */
        max-width: 300px; /* Respect sponsor-box max-width */
    }

    /* Host School */
    .host-school {
        width: 100%;
        text-align: center;
    }

    .host-school-container:has(> .host-school:nth-child(2)) .host-school {
        width: 100%;
    }

    /* Proceedings */
    .proceedings-table {
        display: block;
    }

    .proceedings-table thead {
        display: none;
    }

    .proceedings-table tbody, .proceedings-table tr {
        display: block;
    }

    .proceedings-table td {
        display: block;
        padding: 0.25rem 0;
        border-bottom: none;
        line-height: 1.2;
    }

    .proceedings-table td:nth-child(1) {
        font-weight: bold;
    }

    .proceedings-table td:nth-child(2) {
        font-style: italic;
    }

    .proceedings-table td:nth-child(3) {
        margin-bottom: var(--spacing-sm);
    }

    .proceedings-table tr:not(:last-child)::after {
        content: "";
        display: block;
        height: 2px;
        background: #bbb;
        margin: var(--spacing-lg) 0;
    }

    summary {
        font-size: var(--font-size-lg);
    }

    /* Global Mobile Adjustments */
    p {
        text-align: left;
    }

    .welcome-text h1 {
        font-size: var(--font-size-3xl);
    }

    .welcome-text h2 {
        font-size: var(--font-size-xl);
    }

    .welcome-text p {
        font-size: var(--font-size-md);
    }

    .hero-image {
        max-height: 300px;
    }
    
}

/* Winners Section */
.winners-section {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.winners-section h1 {
    font-size: var(--font-size-3xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
}

.winners-category {
    margin: var(--spacing-xl) 0;
    text-align: left;
    max-width: var(--max-width-main);
    margin-left: auto;
    margin-right: auto;
}

.winners-category h2 {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.winners-list {
    list-style: none;
    padding: 0;
}

.winners-list li {
    margin: var(--spacing-md) 0;
    display: flex;
    align-items: flex-start;
}

.winners-list .place {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: var(--spacing-md);
    min-width: 80px; /* Ensures alignment */
    padding-top: 0; /* Align with title instead of top of block */
}

.winners-list .winner-details {
    flex: 1;
}

.winners-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--font-size-md);
    display: block;
    margin-bottom: var(--spacing-xs); /* Reduced from --spacing-sm */
}

.winners-list a:hover {
    text-decoration: underline;
}

.winners-list .presenters {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    margin: 0 0 var(--spacing-xs) 0; /* Reduced from --spacing-sm */
}

.winners-list .university {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    font-style: italic;
    margin: 0;
}

/* Mobile Styles for Winners */
@media (max-width: 768px) {
    .winners-section h1 {
        font-size: var(--font-size-2xl);
    }

    .winners-category h2 {
        font-size: var(--font-size-xl);
    }

    .winners-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .winners-list .place {
        margin-bottom: var(--spacing-sm);
        margin-right: 0;
        min-width: unset;
    }

    .winners-list a {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs); /* Consistent reduction */
    }

    .winners-list .presenters {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-xs); /* Consistent reduction */
    }

    .winners-list .university {
        font-size: var(--font-size-xs);
    }
}