/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #0078d4;
    --primary-dark: #005a9e;
    --primary-light: #50a9ff;
    --secondary-color: #f3c302;
    --text-primary: #2d2d2d;
    --text-secondary: #5a5a5a;
    --text-muted: #888888;
    --bg-color: #ffffff;
    --bg-soft: #f8f9fa;
    --bg-accent: #e8f4fd;
    --border-color: #e1e4e8;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --container-max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 16px;
    --line-height: 1.6;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--bg-soft);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== Header Section ===== */
.main-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.site-logo {
    width: 80px;
    height: 80px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-normal);
    display: block;
}

.header-text {
    flex: 1;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo-link:hover .site-logo {
    transform: scale(1.05);
}

.title-link {
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

.title-link:hover {
    opacity: 0.85;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.5px;
}

.site-tagline {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 400;
}

/* ===== Main Content ===== */
.main-content {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 300px);
}

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

.page-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Accordion Styles ===== */
.labs-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    background: var(--bg-color);
    border-radius: 12px;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    user-select: none;
}

.accordion-header:hover {
    background-color: var(--bg-soft);
}

.accordion-item.active .accordion-header {
    background-color: var(--bg-accent);
    border-bottom: 1px solid var(--border-color);
}

.lab-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.lab-number {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lab-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.accordion-icon {
    color: var(--text-secondary);
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Accordion Content */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
}

.content-inner {
    padding: var(--spacing-lg);
}

.lab-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== File List Styles ===== */
.file-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-soft);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.file-item:hover {
    background-color: var(--bg-accent);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.file-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-link {
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.file-link:hover {
    color: var(--primary-color);
}

/* Button Styles */
.btn-download,
.btn-view {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-download:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-view {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-view:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* ===== Footer ===== */
.main-footer {
    background-color: var(--text-primary);
    color: white;
    padding: var(--spacing-lg) 0;
    text-align: center;
    margin-top: var(--spacing-xl);
}

.main-footer p {
    margin: 0;
    opacity: 0.9;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .site-logo {
        width: 60px;
        height: 60px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-tagline {
        font-size: 0.9rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .site-tagline {
        font-size: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .accordion-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .lab-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lab-title {
        font-size: 1.1rem;
    }
    
    .lab-info {
        gap: var(--spacing-sm);
    }
    
    .content-inner {
        padding: var(--spacing-md);
    }
    
    .file-item {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .file-link {
        flex-basis: 100%;
    }
    
    .btn-download,
    .btn-view {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-logo {
        width: 50px;
        height: 50px;
    }
    
    .main-header {
        padding: var(--spacing-sm) 0;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
        padding: var(--spacing-lg) 0;
    }
    
    .site-title {
        font-size: 1.75rem;
    }
    
    .accordion-item {
        border-radius: 8px;
    }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #e8e8e8;
        --text-secondary: #b5b5b5;
        --text-muted: #888888;
        --bg-color: #1e1e1e;
        --bg-soft: #2a2a2a;
        --bg-accent: #1a3a52;
        --border-color: #3a3a3a;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
    
    .main-footer {
        background-color: #141414;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-item {
    animation: fadeIn 0.4s ease forwards;
}

.accordion-item:nth-child(1) { animation-delay: 0.05s; }
.accordion-item:nth-child(2) { animation-delay: 0.08s; }
.accordion-item:nth-child(3) { animation-delay: 0.11s; }
.accordion-item:nth-child(4) { animation-delay: 0.14s; }
.accordion-item:nth-child(5) { animation-delay: 0.17s; }
.accordion-item:nth-child(6) { animation-delay: 0.20s; }
.accordion-item:nth-child(7) { animation-delay: 0.23s; }
.accordion-item:nth-child(8) { animation-delay: 0.26s; }
.accordion-item:nth-child(9) { animation-delay: 0.29s; }
.accordion-item:nth-child(10) { animation-delay: 0.32s; }
.accordion-item:nth-child(11) { animation-delay: 0.35s; }
.accordion-item:nth-child(12) { animation-delay: 0.38s; }
.accordion-item:nth-child(13) { animation-delay: 0.41s; }
.accordion-item:nth-child(14) { animation-delay: 0.44s; }
