* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f59e0b;

    /* Text Colors */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-white: white;
    --text-muted: rgba(255, 255, 255, 0.8);
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.7);

    /* Background Colors */
    --white: #ffffff;
    --bg-light: #f8fafc;
    --dark-bg: #0f0f23;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.2);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-intense: 0 25px 50px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-gradient);
    position: relative;
    line-height: 1.6;
}

/* Animated Background */
.koolioppekava-background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.koolioppekava-floating-element {
    position: absolute;
    opacity: 0.1;
    animation: floatComplex 12s ease-in-out infinite;
}

.koolioppekava-floating-element:nth-child(1) {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.koolioppekava-floating-element:nth-child(2) {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #45B7D1, #96C93D);
    top: 70%;
    right: 20%;
    animation-delay: 3s;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.koolioppekava-floating-element:nth-child(3) {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #FFA726, #FF7043);
    top: 40%;
    right: 10%;
    animation-delay: 6s;
    border-radius: 20px;
    transform: rotate(45deg);
}

.koolioppekava-floating-element:nth-child(4) {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #AB47BC, #8E24AA);
    bottom: 30%;
    left: 10%;
    animation-delay: 9s;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

@keyframes floatComplex {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-40px) rotate(90deg) scale(1.2);
    }
    50% {
        transform: translateY(-20px) rotate(180deg) scale(0.8);
    }
    75% {
        transform: translateY(-60px) rotate(270deg) scale(1.1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Container */
.koolioppekava-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.koolioppekava-header {
    text-align: center;
    margin-top: 0;
    margin-bottom: 80px;
    animation: slideDown 1s ease-out;
}

.koolioppekava-header h1 {
    font-size: 4.5rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #e8eaf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

@keyframes expandGradient {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 150px;
        opacity: 1;
    }
}

.koolioppekava-header p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-80px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General Section */
.koolioppekava-general-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 50px;
    margin-bottom: 60px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    position: relative;
    overflow: hidden;
}

.koolioppekava-general-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s;
}

.koolioppekava-general-section:hover::before {
    left: 100%;
}

.koolioppekava-general-section:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.koolioppekava-general-section h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.koolioppekava-general-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    animation: iconSpin 3s ease-in-out infinite;
}

@keyframes iconSpin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

.koolioppekava-general-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 30px;
}

.koolioppekava-general-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.koolioppekava-general-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.koolioppekava-general-btn:hover::before {
    width: 300px;
    height: 300px;
}

.koolioppekava-general-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headers */
.koolioppekava-section-title {
    text-align: center;
    margin: 80px 0 50px;
    color: white;
}

.koolioppekava-section-title h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.koolioppekava-section-title p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Curriculum Grid */
.koolioppekava-curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.koolioppekava-subject-area {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideInStagger 0.8s ease-out both;
}

@keyframes slideInStagger {
    from {
        opacity: 0;
        transform: translateX(-50px) rotateY(-15deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
    }
}

.koolioppekava-subject-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.koolioppekava-subject-area:hover::before {
    transform: scaleX(1);
}

.koolioppekava-subject-area:hover {
    transform: translateY(-15px) scale(1.03);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Subject Area Colors */
.koolioppekava-language { --gradient: linear-gradient(45deg, #FF6B6B, #FF8E8E); }
.koolioppekava-foreign-lang { --gradient: linear-gradient(45deg, #4ECDC4, #44A08D); }
.koolioppekava-math { --gradient: linear-gradient(45deg, #45B7D1, #2196F3); }
.koolioppekava-science { --gradient: linear-gradient(45deg, #96C93D, #68B723); }
.koolioppekava-social { --gradient: linear-gradient(45deg, #FFA726, #FF7043); }
.koolioppekava-arts { --gradient: linear-gradient(45deg, #AB47BC, #8E24AA); }
.koolioppekava-technology { --gradient: linear-gradient(45deg, #26A69A, #00695C); }
.koolioppekava-pe { --gradient: linear-gradient(45deg, #FF7043, #D84315); }
.koolioppekava-overview { --gradient: linear-gradient(45deg, #667eea, #764ba2); }

.koolioppekava-subject-header {
    align-items: center;
    margin-bottom: 20px;
}

.koolioppekava-subject-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 28px;
    animation: iconFloat 2s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.koolioppekava-subject-area h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.koolioppekava-subject-area p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 1rem;
}

/* Modal Styles */
/* Modal Styles */
.koolioppekava-modal {
    display: none;
    position: fixed;
    z-index: 99999; /* Подымаем выше шапки сайта */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: modalFadeIn 0.4s ease;
    justify-content: center;
    align-items: center;
}

@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(15px); }
}

.koolioppekava-modal-content {
    background: white;
    margin: 0 !important; /* Обнуляем margin из глобального modals.css, ломавший центрирование */
    padding: 0;
    border-radius: 30px;
    width: 85%;
    max-width: 800px; /* Явно задаем максимальную ширину, если переменная --modal-max-width не подтянулась */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.koolioppekava-close {
    color: #667eea;
    font-size: 28px;
    font-weight: 1000;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: auto;
    height: auto;
}

.koolioppekava-close:hover {
    color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

/* Modal Header - Fixed at top */
.koolioppekava-modal-header {
    padding: 40px 50px 25px 50px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border-radius: 30px 30px 0 0;
    flex-shrink: 0;
    text-align: center;
}

.koolioppekava-modal-header h2 {
    color: #2d3748;
    margin: 0 0 15px 0;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    background: linear-gradient(45deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.koolioppekava-modal-header p {
    color: #4a5568;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

/* Modal Body - Scrollable content */
.koolioppekava-modal-body {
    padding: 30px 50px 50px 50px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    background: white;
    border-radius: 0 0 30px 30px;
}

/* Custom scrollbar for modal body */
.koolioppekava-modal-body::-webkit-scrollbar {
    width: 10px;
}

.koolioppekava-modal-body::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    margin: 10px 0;
}

.koolioppekava-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.koolioppekava-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c8ef0, #8a5bb2);
}

/* Content styling within modal body */
.koolioppekava-modal-body h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.25rem;
    text-align: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.koolioppekava-modal-body h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.koolioppekava-modal-body p,
.koolioppekava-modal-body li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1rem;
}

.koolioppekava-modal-body ul {
    margin-left: 30px;
    margin-bottom: 25px;
    list-style-type: disc;
}

/* Legacy support for old modal structure */
.koolioppekava-modal h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.25rem;
    text-align: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.koolioppekava-modal h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.koolioppekava-modal p, .koolioppekava-modal li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1rem;
}

.koolioppekava-modal ul {
    margin-left: 30px;
    margin-bottom: 25px;
}

.koolioppekava-modal-note {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    color: #667eea;
    font-weight: 500;
}

.koolioppekava-modal-pdf-button {
    margin-top: 30px;
    text-align: center;
}

.koolioppekava-pdf-btn {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    font-size: 1rem;
}

.koolioppekava-pdf-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

/* Header Top with Language Switcher */
.koolioppekava-header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.koolioppekava-language-switcher-header {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    transition: all 0.3s ease;
}

.koolioppekava-language-switcher-header:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.3);
    transform: translateY(-2px);
}

.koolioppekava-lang-btn-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.koolioppekava-lang-btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
}

.koolioppekava-lang-btn-header.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    transform: scale(1.05);
}

.koolioppekava-lang-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .koolioppekava-header h1 {
        font-size: 2.8rem;
    }

    .koolioppekava-curriculum-grid {
        grid-template-columns: 1fr;
    }

    .koolioppekava-modal-content {
        margin: 0;
        width: 95%;
        max-height: 90vh;
    }

    .koolioppekava-modal-header {
        padding: 30px 20px 20px 20px;
    }

    .koolioppekava-modal-header h2 {
        font-size: 1.8rem;
    }

    .koolioppekava-modal-header p {
        font-size: 1rem;
    }

    .koolioppekava-modal-body {
        padding: 20px;
    }

    .koolioppekava-general-section {
        padding: 30px 20px;
    }

    .koolioppekava-section-title h2 {
        font-size: 2rem;
    }
}

/* Scroll animations */
.koolioppekava-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.koolioppekava-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Mobile/Responsive Design */
@media (max-width: 1024px) {
    .koolioppekava-container {
        padding: 15px;
    }

    .koolioppekava-header h1 {
        font-size: 3.5rem;
    }

    .koolioppekava-curriculum-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .koolioppekava-modal-content {
        width: 90%;
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .koolioppekava-header {
        margin-bottom: 50px;
    }

    .koolioppekava-header h1 {
        font-size: 2.5rem;
    }

    .koolioppekava-header p {
        font-size: 1.1rem;
    }

    .koolioppekava-curriculum-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 40px;
    }

    .koolioppekava-general-section {
        padding: 30px 20px;
        margin-bottom: 40px;
    }

    .koolioppekava-general-section h2 {
        font-size: 1.8rem;
        gap: 10px;
    }

    .koolioppekava-general-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .koolioppekava-general-btn {
        padding: 12px 30px;
        font-size: 14px;
    }

    .koolioppekava-section-title {
        margin: 50px 0 30px;
    }

    .koolioppekava-section-title h2 {
        font-size: 1.8rem;
    }

    .koolioppekava-section-title p {
        font-size: 0.95rem;
    }

    .koolioppekava-subject-area {
        padding: 20px;
    }

    .koolioppekava-subject-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 15px;
    }

    .koolioppekava-subject-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .koolioppekava-subject-area h3 {
        font-size: 1.1rem;
    }

    .koolioppekava-subject-area p {
        font-size: 0.9rem;
    }

    .koolioppekava-modal-content {
        margin: 0;
        padding: 25px 20px;
        width: 95%;
        max-height: 90vh;
    }

    .koolioppekava-modal h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .koolioppekava-modal h3 {
        font-size: 1.2rem;
        margin-top: 20px;
    }

    .koolioppekava-modal p,
    .koolioppekava-modal li {
        font-size: 0.95rem;
    }

    .koolioppekava-close {
        font-size: 26px;
        right: 12px;
        top: 12px;
        padding: 6px;
    }

    .koolioppekava-pdf-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .koolioppekava-header-top {
        margin-bottom: 20px;
    }

    .koolioppekava-language-switcher-header {
        gap: 8px;
        padding: 8px 15px;
    }

    .koolioppekava-lang-btn-header {
        padding: 8px 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .koolioppekava-container {
        padding: 10px;
    }

    .koolioppekava-header {
        margin-bottom: 30px;
    }

    .koolioppekava-header h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .koolioppekava-header h1::before {
        width: 100px;
        height: 3px;
    }

    .koolioppekava-header p {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .koolioppekava-general-section {
        padding: 20px 15px;
        margin-bottom: 30px;
        border-radius: 20px;
    }

    .koolioppekava-general-section h2 {
        font-size: 1.4rem;
        flex-direction: column;
        align-items: center;
    }

    .koolioppekava-general-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 10px;
    }

    .koolioppekava-general-section p {
        font-size: 1rem;
    }

    .koolioppekava-general-btn {
        padding: 10px 25px;
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    .koolioppekava-section-title {
        margin: 30px 0 20px;
    }

    .koolioppekava-section-title h2 {
        font-size: 1.4rem;
    }

    .koolioppekava-section-title p {
        font-size: 0.85rem;
    }

    .koolioppekava-curriculum-grid {
        gap: 12px;
        margin-bottom: 30px;
    }

    .koolioppekava-subject-area {
        padding: 15px;
        border-radius: 15px;
        animation: none;
    }

    .koolioppekava-subject-header {
        margin-bottom: 10px;
    }

    .koolioppekava-subject-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .koolioppekava-subject-area h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .koolioppekava-subject-area p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .koolioppekava-modal {
        padding: 0;
    }

    .koolioppekava-modal-content {
        margin: 0;
        width: 98%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .koolioppekava-modal-header {
        padding: 20px 15px 15px 15px;
    }

    .koolioppekava-modal-header h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .koolioppekava-modal-header p {
        font-size: 0.9rem;
    }

    .koolioppekava-modal-body {
        padding: 15px;
    }

    .koolioppekava-modal h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .koolioppekava-modal h3 {
        font-size: 1rem;
        margin-top: 15px;
    }

    .koolioppekava-modal p,
    .koolioppekava-modal li {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .koolioppekava-modal ul {
        margin-left: 20px;
        margin-bottom: 15px;
    }

    .koolioppekava-close {
        font-size: 24px;
        right: 10px;
        top: 10px;
        padding: 5px;
    }

    .koolioppekava-modal-note {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .koolioppekava-modal-pdf-button {
        margin-top: 20px;
    }

    .koolioppekava-pdf-btn {
        display: block;
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .koolioppekava-header-top {
        margin-bottom: 15px;
    }

    .koolioppekava-language-switcher-header {
        gap: 6px;
        padding: 8px 10px;
        border-radius: 30px;
    }

    .koolioppekava-lang-btn-header {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 20px;
    }

    .koolioppekava-container {
        max-width: 100%;
    }

    /* Hide or simplify animations on very small screens */
    .koolioppekava-floating-element {
        opacity: 0.05;
    }

    /* Extra responsive fixes */
    .koolioppekava-curriculum-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .koolioppekava-subject-area {
        animation: none; /* Disable animations for performance */
    }

    /* Improve touch targets */
    .koolioppekava-general-btn,
    .koolioppekava-close,
    .koolioppekava-lang-btn-header,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}
