:root {
    /* Color Palette */
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --secondary: #e74c3c;
    --accent: #3498db;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --max-width: 800px;
    --content-padding: 2rem;
    
    /* Typography */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Inter', var(--font-base);
    --line-height-base: 1.6;
    --line-height-heading: 1.2;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Container */
    --container-padding: var(--space-md);
    --container-max-width: var(--max-width);
}

/* Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: var(--line-height-base);
}

body {
    font-family: var(--font-base);
    color: var(--dark);
    background-color: var(--light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: var(--line-height-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--line-height-heading);
    color: var(--primary);
    margin: 1.5rem 0 1rem;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
}

h1 {
    font-size: 2.5rem;
    margin: 2rem 0 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem;
}

h3 {
    font-size: 1.75rem;
    margin: 2rem 0 1.25rem;
}

p, li, a {
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
header {
    padding: 2rem 0;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.school-logo {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: none;
    image-rendering: auto;
    filter: none;
}

.project-title {
    font-size: 2.5rem;
    margin: 0.5rem 0;
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--gray);
    margin: 0.5rem auto 0;
    max-width: 700px;
    line-height: 1.5;
    font-weight: 400;
}

/* Navigation */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

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

/* Content Sections */
.content-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-sm);
}

/* Footer */
.site-footer {
    background-color: var(--primary);
    color: var(--light);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

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

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1rem;
}

.footer-content a {
    color: var(--light);
    text-decoration: underline;
}

.footer-content a:hover {
    color: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.25rem;
        --content-padding: 1.5rem;
    }

    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
        margin: 1.5rem 0 1rem;
    }
    
    h2 {
        font-size: 1.75rem;
        margin: 2rem 0 1.25rem;
    }
    
    h3 {
        font-size: 1.5rem;
        margin: 1.75rem 0 1rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .nav-btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .content-section {
        padding: 1.5rem;
        margin: 0 0 2rem;
        border-radius: 0;
    }

    .footer-content p {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .nav-buttons,
    .nav-btn,
    .audio-item,
    .video-container,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0 1cm;
    }
    
    .content-section {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
        color: #666;
    }
}
