/* General Styles */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a; /* Dark background */
    color: #e0e0e0; /* Light text color */
    line-height: 1.6;
}

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

h1, h2, h3, h4 {
    color: #ffffff;
    margin-top: 0;
}

h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 10px; /* Space before the line */
    padding-bottom: 10px; /* Space for the line */
    position: relative;
}

h2::after { /* Underline for section titles */
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background-color: #5c9dde; /* Accent blue */
    margin: 10px auto 0; /* Centered below text */
}

a {
    color: #5c9dde; /* Accent blue for links */
    text-decoration: none;
    transition: transform 0.2s ease-in-out; /* 平滑過渡效果 */
}

/* Header */
header {
    background-color: #2c2c2c; /* Slightly lighter dark for header */
    padding: 15px 0;
    border-bottom: 1px solid #3a3a3a;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px; /* Add some horizontal padding for smaller screens */
}

header .logo {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffffff;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: #e0e0e0;
    font-size: 1em;
    padding: 5px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease; /* Smooth transition for hover/active */
}

header nav ul li a.active,
header nav ul li a:hover {
    color: #5c9dde; /* Accent blue */
    border-bottom: 2px solid #5c9dde;
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 100;
    padding: 5px;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* --- Mobile Styles (Media Query) --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
        flex-wrap: nowrap;
        padding: 0 15px;
    }

    .header-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 10px 0;
    }

    header .logo {
        text-align: left;
        margin: 0;
        flex-grow: 0;
        flex-shrink: 0;
    }

    .hamburger-menu {
        display: flex;
        margin: 0;
        flex-grow: 0;
        flex-shrink: 0;
    }

    header nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
    }

    header nav.active {
        max-height: 500px;
    }

    header nav ul {
        flex-direction: column;
        padding: 15px 0;
        text-align: center;
        width: 100%;
    }

    header nav ul li {
        margin: 10px 0;
    }

    header nav ul li a {
        border-radius: 10px;
        padding: 10px 20px;
        display: block;
        color: #e0e0e0;
        border-bottom: none;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    header nav ul li a.active,
    header nav ul li a:hover {
        background-color: #3a3a3a;
        color: #5c9dde;
        border-bottom: none;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Main Content Sections */
.content-section {
    background-color: #252525; /* Dark grey for content blocks */
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Timetable Section */
#timetable-section h2 {
    margin-bottom: 30px;
}
.timeline-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    position: relative;
}

.timeline-column {
    flex: 1;
    position: relative;
    padding-left: 30px;
}

.timeline-column::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: #4a4a4a;
    z-index: 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    position: relative;
}

.time-dot-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
    position: relative;
    z-index: 1;
}

.timeline-item .time {
    font-weight: bold;
    color: #b0b0b0;
    width: 50px;
    flex-shrink: 0;
}

.timeline-item .dot {
    width: 12px;
    height: 12px;
    background-color: #5c9dde;
    border-radius: 50%;
    border: 2px solid #252525;
    margin-left: -23px;
    position: relative;
}

.event-details {
    background-color: #333333;
    padding: 10px 15px;
    border-radius: 5px;
    flex-grow: 1;
}

.timeline-item .event-name {
    margin: 0;
    font-size: 0.95em;
}

.timeline-item.active-event .event-details {
    background-color: #5c9dde;
}
.timeline-item.active-event .event-name {
    color: #ffffff;
    font-weight: bold;
}

/* Exhibition Map Section */
.map-table-container {
    overflow-x: auto;
}

#exhibition-map-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    text-align: center;
}

#exhibition-map-section th,
#exhibition-map-section td {
    border: 1px solid #444444;
    padding: 12px 15px;
    background-color: #333333;
}

#exhibition-map-section td.activity-area {
    background-color: #3f3f3f;
    font-weight: bold;
    font-size: 1.1em;
}

/* Hero Sections for Project/Web Pages */
.hero-section {
    padding: 80px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: white;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.7);

    margin-bottom: 30px;
}

.project-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://via.placeholder.com/1200x400.png/2c3e50/ffffff?text=Project+Background') no-repeat center center; /* Placeholder */
}

.web-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://via.placeholder.com/1200x400.png/34495e/ffffff?text=Web+Dev+Background') no-repeat center center; /* Placeholder */
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 0;
}

.page-content ul {
    padding-left: 20px;
}
.page-content li {
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: #2c2c2c;
    color: #a0a0a0;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #3a3a3a;
    font-size: 0.9em;
}

footer .container {
    /* Container already handles width and margin */
}

footer .footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

footer .footer-about,
footer .footer-links,
footer .footer-groups {
    flex: 1;
    min-width: 200px;
}

footer h3 {
    font-size: 1.2em;
    color: #e0e0e0;
    margin-bottom: 10px;
}
footer h4 {
    font-size: 1.1em;
    color: #d0d0d0;
    margin-bottom: 10px;
}

footer p {
    margin-bottom: 10px;
}

footer .footer-links a,
footer .footer-groups ul li a {
    color: #a0a0a0;
    display: block;
    margin-bottom: 5px;
}
footer .footer-links a:hover,
footer .footer-groups ul li a:hover {
    color: #5c9dde;
}

footer .footer-groups ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer .copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3f3f3f;
    margin-top: 20px;
    font-size: 0.85em;
}

/* Responsive Adjustments (Basic) */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }
    header nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    header nav ul li {
        margin: 5px 10px;
    }

    .timeline-container {
        flex-direction: column;
    }
    .timeline-column::before {
        display: none;
    }
    .timeline-column {
        padding-left: 0;
    }
    .timeline-item .dot {
        margin-left: -15px;
    }

    footer .footer-content {
        flex-direction: column;
        align-items: center;
        text-align:center;
    }
    footer .footer-about,
    footer .footer-links,
    footer .footer-groups {
        margin-bottom: 20px;
        width:100%;
    }
}

/* Main Hero Section on index.html */
.main-hero-section {
    position: relative;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.main-hero-section .hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("mainpaper.png") no-repeat center center;
    background-size: cover;
    z-index: 1;
}

.main-hero-section .hero-overlay-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    border-radius: 8px;
}

.main-hero-section .hero-Eureka-text {
    font-family: 'Impact', Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 8vw;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: 2px;
}

.main-hero-section .event-date-hero {
    font-size: 1.8em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 4px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    display: inline-block;
    margin-top: 10px;
}

/* Welcome Section on index.html */
.welcome-section {
    padding: 40px 20px;
    text-align: center;
    background-color: #252525;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.welcome-section h2 {
    font-size: 2.2em;
    color: #ffffff;
    margin-bottom: 15px;
}

.welcome-section .welcome-text p {
    font-size: 1.1em;
    color: #e0e0e0;
    max-width: 800px;
    margin: 0 auto 15px auto;
    line-height: 1.7;
}

/* Responsive adjustments for hero text */
@media (max-width: 768px) {
    .main-hero-section .hero-Eureka-text {
        font-size: 12vw;
    }
    .main-hero-section .event-date-hero {
        font-size: 1.5em;
    }
    .welcome-section h2 {
        font-size: 1.8em;
    }
    .welcome-section .welcome-text p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .main-hero-section .hero-Eureka-text {
        font-size: 15vw;
        letter-spacing: -1px;
    }
    .main-hero-section .event-date-hero {
        font-size: 1.2em;
        padding: 8px 15px;
    }
}

/* Loader Styles */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a; /* Dark background for loader */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.75s, visibility 0.75s;
}

.loader {
    border: 8px solid #383838; /* Dark grey */
    border-top: 8px solid #5c9dde; /* Accent blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* --- Projects Carousel Section --- */
/* REMOVED: .projects-grid rules as they are replaced by carousel */

.projects-carousel-section {
    padding: 30px 0;
    /* Optional: Add a subtle background to this section */
    /* background-color: #202020; /* Slightly lighter dark background for the section */
}

.projects-carousel-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2em;
    color: #ffffff; /* White color for the section title */
    position: relative;
    padding-bottom: 10px;
}

.projects-carousel-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #5c9dde;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* The main viewport for the carousel */
.projects-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden; /* Hide anything outside this view */
    cursor: grab; /* Indicates it's draggable */
}

/* This is the element that will be moved/transformed */
.projects-carousel-inner {
    display: flex; /* Arrange cards in a row */
    will-change: transform; /* Hint to browser for optimization */
    gap: 30px; /* Space between cards */
    padding-bottom: 20px; /* Space for potential scrollbar if needed, or visual padding */
    padding-left: 15px; /* Visual padding for first/last card */
    padding-right: 15px;
    box-sizing: border-box; /* Include padding in width calculations */
}

.project-card {
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: 350px; /* Fixed width for each card */
    
    background-color: #242424; /* Darker background for individual cards */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* Stronger shadow for dark theme */
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); /* Stronger hover shadow */
}

.project-card h3 {
    font-size: 1.6em;
    color: #5c9dde; /* Accent blue for project titles */
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #4a4a4a; /* Darker border for consistency */
}

.project-card .project-info p {
    font-size: 0.95em;
    line-height: 1.7;
    color: #a0a0a0; /* Lighter grey for main text */
    margin-bottom: 10px;
}

.project-card .project-info strong {
    color: #c0c0c0; /* Even lighter grey for strong text */
}

/* Responsive adjustments for project cards within carousel */
@media (max-width: 768px) {
    .projects-carousel-inner {
        gap: 20px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .project-card {
        width: 85vw; /* Make cards take up 85% of viewport width on small screens */
        padding: 20px;
    }

    .projects-carousel-section h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .project-card {
        width: 90vw; /* Slightly larger on very small screens */
        padding: 15px;
    }
    .project-card h3 {
        font-size: 1.3em;
    }
    .project-card .project-info p {
        font-size: 0.9em;
    }
}