 :root {
            --clay-primary: #4A90E2;
            --clay-secondary: #A3D0EF;
            --clay-light: #E6F4FF;
            --clay-dark: #2C3E50;
            --clay-text: #5D6D7E;
            --clay-white: #F9FBFD;
            --clay-accent: #3A7BC8;
            --clay-success: #8FB9AA;
            --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
            --border-radius: 16px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Montserrat', sans-serif;
        }

        body {
            background-color: var(--clay-white);
            color: var(--clay-dark);
            line-height: 1.7;
            overflow-x: hidden;
            position: relative;
            transition: background-color 0.5s ease;
        }

            body.dark-mode {
                --clay-dark: #e6e0d9;
                --clay-text: #c8c1ba;
                --clay-white: #1A2A3A;
                background-color: #0F1A26;
                color: #e6e0d9;
            }

            body::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10,10 Q50,5 90,10 Q95,50 90,90 Q50,95 10,90 Q5,50 10,10 Z" fill="none" stroke="%23A3D0EF" stroke-opacity="0.1" stroke-width="0.8"/></svg>');
                background-size: 120px;
                z-index: -1;
                opacity: 0.5;
            }

            body.dark-mode::before {
                opacity: 0.1;
                background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10,10 Q50,5 90,10 Q95,50 90,90 Q50,95 10,90 Q5,50 10,10 Z" fill="none" stroke="%232C3E50" stroke-opacity="0.2" stroke-width="0.8"/></svg>');
            }

        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Анимация загрузки */
        .loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--clay-primary);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            transition: opacity 0.5s, visibility 0.5s;
        }

            .loader.hidden {
                opacity: 0;
                visibility: hidden;
            }


        .loader-logo {
            width: 125px;
            height: 125px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: spin 1.5s linear infinite; /* Добавлено вращение */
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* Добавлена тень для лучшего визуального эффекта */
        }


            .loader-logo img {
                width: 90px; /* Размер логотипа */
                height: 90px; /* Размер логотипа */
                border-radius: 50%;
                object-fit: cover; /* Чтобы изображение правильно заполняло пространство */
            }

            .loader-logo i {
                color: var(--clay-primary);
                font-size: 28px;
            }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        /* Шапка */
        header {
            background: rgba(255, 255, 255, 0.95);
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInDown 0.8s forwards 0.5s;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(74, 144, 226, 0.15);
        }

        body.dark-mode header {
            background: rgba(26, 42, 58, 0.95);
            border-bottom: 1px solid rgba(58, 123, 200, 0.2);
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1820px;
            width: 100%;
            margin: 0 auto;
            padding: 0 40px;
        }

        .logo {
            display: flex;
            align-items: center;
            cursor: pointer;
        }

        .logo-img {
            height: 70px;
            width: 70px;
            margin-right: 20px;
            border-radius: 50%;
            transition: transform 0.3s ease;
        }

        .logo:hover .logo-img {
            transform: scale(1.05);
        }

        .logo-text {
            font-weight: 600;
            font-size: 1.4rem;
            color: var(--clay-dark);
            letter-spacing: 0.5px;
        }

            .logo-text span {
                display: block;
                font-size: 1rem;
                font-weight: 400;
                color: var(--clay-text);
            }

        nav ul {
            display: flex;
            list-style: none;
        }

            nav ul li {
                margin-left: 40px;
            }

                nav ul li a {
                    text-decoration: none;
                    color: var(--clay-dark);
                    font-weight: 500;
                    font-size: 1.2rem;
                    position: relative;
                    padding: 8px 0;
                    transition: color 0.3s;
                    display: flex;
                    align-items: center;
                    gap: 8px;
                }

        body.dark-mode nav ul li a {
            color: #e6e0d9;
        }

        nav ul li a:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 3px;
            background-color: var(--clay-primary);
            transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
            border-radius: 2px;
        }

        nav ul li a:hover {
            color: var(--clay-primary);
        }

            nav ul li a:hover:after {
                width: 100%;
            }

        nav ul li a.active {
            color: var(--clay-primary);
        }

            nav ul li a.active:after {
                width: 100%;
            }

        .mobile-menu-btn {
            display: none;
            font-size: 24px;
            background: none;
            border: none;
            color: var(--clay-dark);
            cursor: pointer;
            transition: transform 0.3s;
            z-index: 1001;
        }

        body.dark-mode .mobile-menu-btn {
            color: #e6e0d9;
        }

        .mobile-menu-btn:hover {
            transform: scale(1.1);
        }

        /* Главный контент */
        main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 15px 15px 30px;
        }

        .page {
            display: none;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeIn 0.8s ease forwards;
        }

            .page.active {
                display: block;
                opacity: 1;
                transform: translateY(0);
            }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Герой секция */
        .hero {
            height: 85vh;
            min-height: 600px;
            background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('images/fon.jpeg');
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: center;
            position: relative;
            border-radius: var(--border-radius);
            margin-bottom: 40px;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(74, 144, 226, 0.15);
        }

            .hero::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, rgba(255,255,255,0) 70%);
                z-index: -1;
            }

        .hero-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url(images/fon_conteiner.png);
            z-index: 1;
        }

        .hero-content {
            position: relative;
            z-index: 2;
            color: white;
            max-width: 700px;
            padding: 0 20px;
            text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
        }

        .hero h1 {
            font-family: 'Playfair Display', serif;
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 20px;
            line-height: 1.2;
            letter-spacing: -0.5px;
        }

        .hero p {
            font-size: 1.3rem;
            margin-bottom: 30px;
            max-width: 90%;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background-color: var(--clay-primary);
            color: white;
            padding: 14px 40px;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
            border: 2px solid var(--clay-primary);
            position: relative;
            overflow: hidden;
            font-size: 1.1rem;
            box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
            letter-spacing: 0.5px;
            cursor: pointer;
        }

            .btn:hover {
                background: transparent;
                color: var(--clay-primary);
                transform: translateY(-4px);
                box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
            }

        body.dark-mode .btn:hover {
            color: white;
        }

        .btn-outline {
            background: transparent;
            color: var(--clay-dark); /* Темный текст в светлой теме */
            border: 2px solid var(--clay-primary);
        }

        body.dark-mode .btn-outline {
            color: white; /* Белый текст в темной теме */
        }

        .btn-outline:hover {
            background: var(--clay-primary);
            color: white;
        }

        /* Секции */
        section {
            padding: 80px 0;
        }

        .section-title {
            text-align: center;
            margin-bottom: 60px;
        }

            .section-title h2 {
                font-family: 'Playfair Display', serif;
                font-size: 2.5rem;
                color: var(--clay-dark);
                position: relative;
                display: inline-block;
                padding-bottom: 15px;
                font-weight: 700;
            }

                .section-title h2:after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 80px;
                    height: 4px;
                    background-color: var(--clay-primary);
                    border-radius: 2px;
                }

            .section-title p {
                color: var(--clay-text);
                margin-top: 20px;
                font-size: 1.1rem;
                max-width: 700px;
                margin-left: auto;
                margin-right: auto;
            }

        /* О нас */
        .about-content {
            display: flex;
            align-items: center;
            gap: 50px;
            margin-bottom: 50px;
        }

        .about-text {
            flex: 1;
        }

            .about-text h3 {
                font-size: 1.8rem;
                margin-bottom: 20px;
                color: var(--clay-dark);
                font-family: 'Playfair Display', serif;
                font-weight: 600;
            }

            .about-text p {
                margin-bottom: 20px;
                color: var(--clay-text);
                line-height: 1.8;
            }

        .about-image {
            flex: 1;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            position: relative;
            transition: var(--transition);
            height: 350px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.7rem;
            font-weight: bold;
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
            font-family: 'Playfair Display', serif;
            text-align: center;
            padding: 20px;
            background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('images/fon.jpeg') center/cover;
            cursor: pointer;
        }

            .about-image:hover {
                transform: translateY(-10px);
                box-shadow: var(--shadow-hover);
            }

        /* Преподаватели - ИСПРАВЛЕННЫЙ БЛОК */
        .teachers {
            padding: 0;
            margin-bottom: 40px;
            position: relative;
        }

            .teachers > .container {
                background-color: var(--clay-light);
                padding: 80px 20px;
                border-radius: var(--border-radius);
                box-shadow: var(--shadow);
                position: relative;
                overflow: hidden;
                margin: 0 auto;
            }

        body.dark-mode .teachers > .container {
            background-color: #2d2a26;
        }

        .teachers > .container::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="none" stroke="%234A90E2" stroke-opacity="0.1" stroke-width="1"/></svg>');
            background-size: 200px;
            z-index: 0;
        }

        /* ПИРАМИДАЛЬНАЯ СТРУКТУРА */
        .teachers-pyramid {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            z-index: 1;
        }

        .featured-teacher {
            position: relative;
            z-index: 3;
            margin-bottom: 40px;
            width: 100%;
            max-width: 800px;
        }

        .other-teachers {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 30px;
            position: relative;
            z-index: 2;
            width: 100%;
        }

            .other-teachers .teacher-card {
                flex: 1;
                min-width: 300px;
                max-width: calc(50% - 15px);
            }

        /* СТИЛЬ ДЛЯ ВСЕХ КАРТОЧЕК ОДИНАКОВЫЙ */
        .teacher-card {
            background-color: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            position: relative;
            border: 1px solid rgba(74, 144, 226, 0.1);
            text-align: center;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        body.dark-mode .teacher-card {
            background-color: #2d2a26;
            color: #e6e0d9;
        }

        .teacher-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-hover);
            border-color: var(--clay-primary);
        }

        .teacher-img-container {
            position: relative;
            width: 100%;
            padding-top: 100%; /* Квадратное соотношение */
            overflow: hidden;
            background-color: #f8f9fa;
        }

        body.dark-mode .teacher-img-container {
            background-color: #3a3530;
        }

        .teacher-img-container img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .teacher-card:hover .teacher-img-container img {
            transform: scale(1.05);
        }

        .teacher-info {
            padding: 25px;
            text-align: center;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

            .teacher-info h3 {
                font-size: 1.8rem;
                margin-bottom: 10px;
                color: var(--clay-dark);
                font-family: 'Playfair Display', serif;
                font-weight: 900;
            }

        body.dark-mode .teacher-info h3 {
            color: #e6e0d9;
        }

        .teacher-info p {
            font-size: 1.2rem;
            color: var(--clay-text);
            font-style: italic;
            margin-bottom: 15px;
            line-height: 1.6;
            flex: 1;
        }

        body.dark-mode .teacher-info p {
            color: #c8c1ba;
        }

        .teacher-more {
            display: inline-block;
            margin-top: 15px;
            color: var(--clay-primary);
            font-weight: 600;
            transition: var(--transition);
        }

            .teacher-more:hover {
                color: var(--clay-accent);
                transform: translateX(5px);
            }

        body.dark-mode .teacher-more {
            color: #4A90E2;
        }

        /* Убраны кнопки соцсетей */
        .teacher-social {
            display: none; /* Убраны соцсети */
        }

        /* Услуги */
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .service-card {
            background-color: white;
            padding: 40px 30px;
            border-radius: var(--border-radius);
            text-align: center;
            box-shadow: var(--shadow);
            transition: var(--transition);
            border: 1px solid rgba(0, 0, 0, 0.05);
            position: relative;
            overflow: hidden;
        }

        body.dark-mode .service-card {
            background-color: #2d2a26;
        }

        .service-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-hover);
            border-color: var(--clay-secondary);
        }

        .service-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: var(--clay-primary);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.5s ease;
        }

        .service-card:hover::before {
            transform: scaleX(1);
        }

        .service-icon {
            width: 80px;
            height: 80px;
            background-color: var(--clay-light);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 25px;
            color: var(--clay-primary);
            font-size: 30px;
            transition: var(--transition);
        }

        .service-card:hover .service-icon {
            background: var(--clay-primary);
            color: white;
            transform: scale(1.1);
        }

        .service-card h3 {
            font-size: 1.4rem;
            margin-bottom: 15px;
            color: var(--clay-dark);
            font-family: 'Playfair Display', serif;
            font-weight: 600;
        }

        .service-card p {
            color: var(--clay-text);
            margin-bottom: 20px;
            line-height: 1.6;
        }

        .service-price {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--clay-primary);
            margin: 15px 0 20px;
        }

        /* Галерея */
        .gallery {
            background-color: var(--clay-secondary);
            padding: 80px 0;
            border-radius: var(--border-radius);
            margin-bottom: 40px;
        }

        body.dark-mode .gallery {
            background-color: #3a3530;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .gallery-item {
            height: 280px;
            border-radius: var(--border-radius);
            overflow: hidden;
            position: relative;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

            .gallery-item img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: var(--transition);
            }

            .gallery-item:hover {
                transform: translateY(-10px);
                box-shadow: var(--shadow-hover);
            }

                .gallery-item:hover img {
                    transform: scale(1.05);
                }

        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 20px;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
            color: white;
            opacity: 0;
            transition: var(--transition);
            transform: translateY(10px);
        }

        .gallery-item:hover .gallery-overlay {
            opacity: 1;
            transform: translateY(0);
        }

        /* Контакты */
        .contact {
            background-color: var(--clay-light);
            padding: 80px 0;
            border-radius: var(--border-radius);
            margin-bottom: 40px;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }

        body.dark-mode .contact {
            background-color: #3a3530;
        }

        .contact::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10,10 Q50,5 90,10 Q95,50 90,90 Q50,95 10,90 Q5,50 10,10 Z" fill="none" stroke="%234A90E2" stroke-opacity="0.1" stroke-width="0.8"/></svg>');
            background-size: 150px;
            z-index: 0;
        }

        .contact-info {
            width: 100%;
            max-width: 700px;
            margin: 0 auto;
        }

            .contact-info h3 {
                font-size: 1.8rem;
                margin-bottom: 25px;
                color: var(--clay-dark);
                font-family: 'Playfair Display', serif;
                font-weight: 600;
                text-align: center;
            }

        .contact-details {
            margin-bottom: 30px;
        }

        .contact-item {
            display: flex;
            margin-bottom: 20px;
            align-items: flex-start;
        }

        .contact-icon {
            width: 50px;
            height: 50px;
            background-color: var(--clay-primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            color: white;
            font-size: 20px;
            flex-shrink: 0;
        }

        .contact-text h4 {
            font-size: 1.1rem;
            margin-bottom: 5px;
            color: var(--clay-dark);
            font-weight: 600;
        }

        .contact-text p {
            color: var(--clay-text);
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 30px;
            justify-content: center;
        }

            .social-links a {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 45px;
                height: 45px;
                background-color: var(--clay-primary);
                border-radius: 50%;
                color: white;
                font-size: 20px;
                transition: var(--transition);
            }

                .social-links a:hover {
                    transform: translateY(-5px);
                    background-color: var(--clay-accent);
                }

        /* Карта */
        .map-section {
            padding: 0;
            height: 500px;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            margin-bottom: 40px;
            position: relative;
        }

        #map {
            width: 100%;
            height: 100%;
            background: #e9e5e0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--clay-text);
            font-weight: 500;
        }

        body.dark-mode #map {
            background: #2d2a26;
        }

        .map-overlay {
            background-color: rgba(255, 255, 255, 0.95);
            padding: 25px;
            border-radius: var(--border-radius);
            position: absolute;
            bottom: 40px;
            left: 40px;
            max-width: 350px;
            box-shadow: var(--shadow);
            z-index: 100;
            border: 1px solid rgba(74, 144, 226, 0.1);
        }

        body.dark-mode .map-overlay {
            background-color: rgba(26, 42, 58, 0.95);
            color: #e6e0d9;
        }

        .map-overlay h3 {
            font-size: 1.3rem;
            margin-bottom: 10px;
            color: var(--clay-dark);
            font-family: 'Playfair Display', serif;
        }

        .map-overlay p {
            color: var(--clay-text);
            margin-bottom: 5px;
        }

        /* Подвал */
        footer {
            background-color: var(--clay-dark);
            color: white;
            padding: 60px 0 30px;
            text-align: center;
            position: relative;
        }

        body.dark-mode footer {
            background-color: #0F1A26;
        }

        .footer-content {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            margin-bottom: 30px;
        }

        .footer-column {
            flex: 1;
            min-width: 250px;
            margin-bottom: 30px;
            padding: 0 20px;
            text-align: left;
        }

            .footer-column h3 {
                font-size: 1.3rem;
                margin-bottom: 20px;
                position: relative;
                padding-bottom: 10px;
                font-family: 'Playfair Display', serif;
                font-weight: 600;
                color: var(--clay-secondary);
            }

                .footer-column h3:after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 50px;
                    height: 3px;
                    background-color: var(--clay-primary);
                    border-radius: 2px;
                }

            .footer-column p {
                color: #bbb;
                margin-bottom: 15px;
                line-height: 1.7;
            }

            .footer-column ul {
                list-style: none;
            }

                .footer-column ul li {
                    margin-bottom: 12px;
                }

                    .footer-column ul li a {
                        color: #bbb;
                        text-decoration: none;
                        transition: color 0.3s;
                        display: flex;
                        align-items: center;
                        gap: 8px;
                    }

                        .footer-column ul li a:hover {
                            color: var(--clay-primary);
                        }

        .copyright {
            padding-top: 30px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #999;
            font-size: 0.9rem;
        }

        /* Переключатель темной темы */
        .dark-mode-toggle {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background: var(--clay-primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
            z-index: 100;
            border: 2px solid white;
            transition: var(--transition);
        }

            .dark-mode-toggle:hover {
                transform: scale(1.1);
            }

            .dark-mode-toggle i {
                color: white;
                font-size: 1.3rem;
            }

        /* Галерея на главной */
        .gallery-preview {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-top: 40px;
        }

        .gallery-preview-item {
            height: auto;
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            box-shadow: var(--shadow);
            transition: var(--transition);
            display: flex; /* Добавляем flex для центрирования */
            align-items: center; /* Центрируем по вертикали */
            justify-content: center;
        }

            .gallery-preview-item img {
                width: auto; /* Меняем ширину на auto */
                height: auto; /* Меняем высоту на auto */
                max-width: 100%; /* Ограничиваем максимальную ширину */
                max-height: 100%; /* Ограничиваем максимальную высоту */
                object-fit: contain; /* Меняем cover на contain */
            }

            .gallery-preview-item:hover {
                transform: translateY(-5px);
                box-shadow: var(--shadow-hover);
            }

        /* Новые элементы */
        .mission-statement {
            background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('images/fon.jpeg');
            background-size: cover;
            background-position: center;
            padding: 100px 0;
            text-align: center;
            color: white;
            border-radius: var(--border-radius);
            margin: 60px 0;
        }

            .mission-statement h2 {
                font-family: 'Playfair Display', serif;
                font-size: 2.8rem;
                margin-bottom: 30px;
                position: relative;
                display: inline-block;
            }

                .mission-statement h2:after {
                    content: '';
                    position: absolute;
                    bottom: -15px;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 80px;
                    height: 4px;
                    background-color: var(--clay-primary);
                    border-radius: 2px;
                }

            .mission-statement p {
                max-width: 800px;
                margin: 0 auto;
                font-size: 1.2rem;
                line-height: 1.8;
            }

        .testimonials {
            background-color: var(--clay-white);
            padding: 80px 0;
            border-radius: var(--border-radius);
            margin: 60px 0;
        }

        body.dark-mode .testimonials {
            background-color: #0F1A26;
        }

        .testimonials-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .testimonial-card {
            background: white;
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            position: relative;
        }

        body.dark-mode .testimonial-card {
            background-color: #2d2a26;
        }

        .testimonial-card:before {
            content: '"';
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 5rem;
            font-family: 'Playfair Display', serif;
            color: var(--clay-secondary);
            line-height: 1;
        }

        .testimonial-content {
            margin-top: 30px;
            padding: 0 10px;
        }

        .testimonial-text {
            font-style: italic;
            color: var(--clay-text);
            margin-bottom: 20px;
            line-height: 1.7;
        }

        .testimonial-author {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .author-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: var(--clay-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--clay-primary);
            font-weight: bold;
            font-size: 1.2rem;
        }

        .author-info h4 {
            color: var(--clay-dark);
            margin-bottom: 5px;
            font-size: 1.1rem;
        }

        .author-info p {
            color: var(--clay-text);
            font-size: 0.9rem;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin: 60px 0;
        }

        .stat-card {
            text-align: center;
            padding: 30px;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        body.dark-mode .stat-card {
            background-color: #2d2a26;
        }

        .stat-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-hover);
        }

        .stat-number {
            font-size: 3rem;
            font-weight: 700;
            color: var(--clay-primary);
            margin-bottom: 15px;
            font-family: 'Playfair Display', serif;
        }

        .stat-text {
            color: var(--clay-text);
            font-size: 1.1rem;
        }

        .featured-products {
            margin: 60px 0;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
        }

        .product-card {
            background: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        body.dark-mode .product-card {
            background-color: #2d2a26;
        }

        .product-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-hover);
        }

        .product-image {
            height: 200px;
            background-color: var(--clay-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--clay-dark);
            font-size: 3rem;
        }

        body.dark-mode .product-image {
            background-color: #4a4038;
        }

        .product-info {
            padding: 20px;
        }

        .product-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.4rem;
            margin-bottom: 10px;
            color: var(--clay-dark);
        }

        .product-price {
            font-weight: 700;
            color: var(--clay-primary);
            font-size: 1.3rem;
            margin-bottom: 15px;
        }

        .product-description {
            color: var(--clay-text);
            margin-bottom: 15px;
            line-height: 1.6;
        }

        /* Новые страницы: Партнеры и Документы */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.partner-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    height: 200px; /* Фиксированная высота */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.dark-mode .partner-card {
    background-color: #2d2a26;
}

.partner-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.partner-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.partner-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.partner-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

    .partner-logo a:hover .partner-logo-img {
        transform: scale(1.05);
    }

.partner-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: var(--clay-dark);
    line-height: 1.4;
    font-weight: 600;
}

body.dark-mode .partner-card h3 {
    color: #e6e0d9;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .partner-card {
        height: 180px;
        padding: 20px 15px;
    }

    .partner-logo {
        height: 70px;
    }
}

@media (max-width: 576px) {
    .partners-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .partner-card {
        height: 160px;
        padding: 15px 10px;
    }

    .partner-logo {
        height: 60px;
    }

    .partner-card h3 {
        font-size: 1rem;
    }
}

        .documents-container {
            background: white;
            border-radius: var(--border-radius);
            padding: 40px;
            box-shadow: var(--shadow);
            margin-top: 30px;
        }

        body.dark-mode .documents-container {
            background-color: #2d2a26;
        }

        .document-item {
            display: flex;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid rgba(74, 144, 226, 0.1);
            transition: var(--transition);
        }

            .document-item:last-child {
                border-bottom: none;
            }

            .document-item:hover {
                background-color: rgba(74, 144, 226, 0.05);
            }

        body.dark-mode .document-item:hover {
            background-color: rgba(58, 123, 200, 0.1);
        }

        .document-icon {
            width: 60px;
            height: 60px;
            background-color: var(--clay-light);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--clay-primary);
            font-size: 24px;
            margin-right: 20px;
        }

        .document-info {
            flex: 1;
        }

            .document-info h3 {
                font-size: 1.3rem;
                margin-bottom: 8px;
                color: var(--clay-dark);
            }

            .document-info p {
                color: var(--clay-text);
                margin-bottom: 10px;
            }

        .document-actions {
            display: flex;
            gap: 15px;
        }

            .document-actions .btn {
                padding: 10px 25px;
                font-size: 0.95rem;
            }

        .pdf-viewer {
            width: 100%;
            height: 700px;
            margin-top: 40px;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            border: 1px solid rgba(74, 144, 226, 0.1);
        }

            .pdf-viewer embed {
                width: 100%;
                height: 100%;
            }

        /* Новая страница сотрудника */
        .employee-detail {
            background: white;
            border-radius: var(--border-radius);
            padding: 40px;
            box-shadow: var(--shadow);
            margin-top: 30px;
            position: relative;
        }

        body.dark-mode .employee-detail {
            background-color: #2d2a26;
        }

        .employee-header {
            text-align: center;
            margin-bottom: 40px;
            position: relative;
        }

            .employee-header h2 {
                font-family: 'Playfair Display', serif;
                font-size: 2.5rem;
                margin-bottom: 15px;
            }

        .employee-position {
            color: var(--clay-primary);
            font-size: 1.4rem;
            font-style: italic;
        }

        .employee-content {
            display: flex;
            flex-wrap: wrap;
            gap: 40px;
            margin-bottom: 40px;
        }

        .employee-photo {
            flex: 1;
            min-width: 300px;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            height: 400px;
        }

            .employee-photo img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        .employee-info {
            flex: 2;
            min-width: 300px;
        }

        .info-section {
            margin-bottom: 30px;
        }

            .info-section h3 {
                font-size: 1.6rem;
                margin-bottom: 15px;
                position: relative;
                padding-bottom: 10px;
                font-family: 'Playfair Display', serif;
            }

                .info-section h3::after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 60px;
                    height: 3px;
                    background-color: var(--clay-primary);
                    border-radius: 2px;
                }

            .info-section p {
                color: var(--clay-text);
                line-height: 1.8;
                margin-bottom: 15px;
            }

            .info-section ul {
                margin-left: 25px;
                margin-bottom: 15px;
            }

            .info-section li {
                color: var(--clay-text);
                margin-bottom: 10px;
                line-height: 1.6;
                position: relative;
                padding-left: 20px;
            }

                .info-section li::before {
                    content: '•';
                    color: var(--clay-primary);
                    font-size: 1.5rem;
                    position: absolute;
                    left: 0;
                    top: -3px;
                }

        .back-button {
            text-align: center;
            margin-top: 40px;
        }

        /* НОВЫЙ РАЗДЕЛ: НОВОСТИ */
        .news-section {
            padding: 80px 0;
        }

        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 30px;
        }

        .news-card {
            background: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        body.dark-mode .news-card {
            background-color: #2d2a26;
        }

        .news-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-hover);
            border-color: var(--clay-primary);
        }

        .news-image {
            height: 220px;
            position: relative;
            overflow: hidden;
        }

            .news-image img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform 0.5s ease;
            }

        .news-card:hover .news-image img {
            transform: scale(1.05);
        }

        .news-date {
            position: absolute;
            top: 15px;
            left: 15px;
            background: var(--clay-primary);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 500;
            z-index: 2;
        }

        .news-content {
            padding: 25px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .news-title {
            font-size: 1.6rem;
            margin-bottom: 15px;
            color: var(--clay-dark);
            font-family: 'Playfair Display', serif;
        }

        body.dark-mode .news-title {
            color: #e6e0d9;
        }

        .news-excerpt {
            color: var(--clay-text);
            margin-bottom: 20px;
            line-height: 1.7;
            flex: 1;
        }

        .news-more {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--clay-primary);
            font-weight: 600;
            transition: var(--transition);
            margin-top: 10px;
        }

            .news-more:hover {
                color: var(--clay-accent);
                transform: translateX(5px);
            }

        .news-detail-section {
            padding: 80px 0;
        }

        .news-detail {
            background: white;
            border-radius: var(--border-radius);
            padding: 40px;
            box-shadow: var(--shadow);
            position: relative;
        }

        body.dark-mode .news-detail {
            background-color: #2d2a26;
        }

        .news-detail-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .news-detail-title {
            font-family: 'Playfair Display', serif;
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: var(--clay-dark);
        }

        body.dark-mode .news-detail-title {
            color: #e6e0d9;
        }

        .news-detail-meta {
            display: flex;
            justify-content: center;
            gap: 20px;
            color: var(--clay-text);
            margin-bottom: 10px;
        }

        .news-detail-image {
            height: 500px;
            border-radius: var(--border-radius);
            overflow: hidden;
            margin: 40px 0;
        }

            .news-detail-image img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        .news-detail-content {
            line-height: 1.8;
            color: var(--clay-text);
        }

            .news-detail-content p {
                margin-bottom: 20px;
            }

            .news-detail-content h2, .news-detail-content h3 {
                font-family: 'Playfair Display', serif;
                margin: 30px 0 20px;
                color: var(--clay-dark);
            }

        body.dark-mode .news-detail-content h2,
        body.dark-mode .news-detail-content h3 {
            color: #e6e0d9;
        }

        .back-to-news {
            margin-top: 40px;
            text-align: center;
        }

        /* Узкое модальное окно для новостей на компьютерах */
        @media (min-width: 769px) {
            .news-detail {
            max-width: 800px;
            margin: 0 auto;
        }

        .news-detail-content {
             max-width: 100%;
             line-height: 1.7;
        }

        .news-detail-image {
            height: 400px;
        }
        }


        /* Сохраняем адаптивность для мобильных устройств */
        @media (max-width: 768px) {
            .news-detail {
                max-width: 100%;
                padding: 0 15px;
        }

        .news-detail-image {
            height: 300px;
        }
}


        /* НОВАЯ СТРАНИЦА: ГАЛЕРЕЯ РАБОТ АСЛАНА ДАУРОВА */
        .gallery-aslan {
            padding: 80px 0;
        }

        .gallery-aslan-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            margin-top: 40px;
        }

        .gallery-aslan-item {
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            cursor: pointer;
            position: relative;
        }

            .gallery-aslan-item:hover {
                transform: translateY(-8px);
                box-shadow: var(--shadow-hover);
            }

        .gallery-aslan-img {
            width: 100%;
            height: 220px;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .gallery-aslan-item:hover .gallery-aslan-img {
            transform: scale(1.05);
        }

        .gallery-aslan-caption {
            padding: 15px;
            background: white;
            text-align: center;
        }

        body.dark-mode .gallery-aslan-caption {
            background-color: #2d2a26;
        }

        .gallery-aslan-caption h3 {
            font-size: 1.2rem;
            margin-bottom: 8px;
            color: var(--clay-dark);
        }

        body.dark-mode .gallery-aslan-caption h3 {
            color: #e6e0d9;
        }

        .gallery-aslan-caption p {
            color: var(--clay-text);
            font-size: 0.95rem;
            line-height: 1.5;
        }

        /* Модальное окно для галереи */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.85);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

            .modal-overlay.active {
                opacity: 1;
                visibility: visible;
            }

        .modal-content {
            background: white;
            max-width: 90%;
            max-height: 90%;
            width: auto;
            border-radius: var(--border-radius);
            overflow: hidden;
            position: relative;
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }

        body.dark-mode .modal-content {
            background: #2d2a26;
        }

        .modal-overlay.active .modal-content {
            transform: scale(1);
        }

        .modal-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(0, 0, 0, 0.5);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            transition: var(--transition);
        }

            .modal-close:hover {
                background: rgba(0, 0, 0, 0.8);
                transform: rotate(90deg);
            }

        .modal-image {
            max-width: 100%;
            max-height: 70vh;
            display: block;
        }

        .modal-details {
            padding: 20px;
            text-align: center;
        }

            .modal-details h3 {
                font-size: 1.5rem;
                margin-bottom: 10px;
                color: var(--clay-dark);
            }

        body.dark-mode .modal-details h3 {
            color: #e6e0d9;
        }

        .modal-details p {
            color: var(--clay-text);
            line-height: 1.6;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Кнопка галереи в карточке учителя */
        .teacher-gallery-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-top: 15px;
            padding: 10px 20px;
            background-color: var(--clay-success);
            color: white;
            border-radius: 30px;
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
        }

            .teacher-gallery-btn:hover {
                background-color: #7aa895;
                transform: translateY(-3px);
            }

        /* Улучшения для средних экранов (ноутбуки 14-16") */
        @media (max-width: 1366px) {
            .header-content {
                padding: 0 30px;
            }

            nav ul li {
                margin-left: 30px;
            }

                nav ul li a {
                    font-size: 1.1rem;
                }
        }

        @media (max-width: 1200px) {
            .header-content {
                padding: 0 25px;
            }

            nav ul li {
                margin-left: 25px;
            }

            .logo-text {
                font-size: 1.2rem;
            }

            .logo-img {
                height: 60px;
                margin-right: 15px;
            }
        }

        @media (max-width: 1024px) {
            .header-content {
                padding: 0 20px;
            }

            nav ul li {
                margin-left: 20px;
            }

                nav ul li a {
                    font-size: 1rem;
                }

            .logo-text {
                font-size: 1.1rem;
            }

            .logo-img {
                height: 55px;
                margin-right: 12px;
            }
        }

        /* Для планшетов и небольших ноутбуков */
        @media (max-width: 992px) {
            .mobile-menu-btn {
                display: block;
            }

            nav ul {
                display: none;
                position: absolute;
                top: 95px;
                left: 0;
                width: 100%;
                background: rgba(255, 255, 255, 0.98);
                flex-direction: column;
                padding: 20px 0;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
                backdrop-filter: blur(10px);
                z-index: 999;
                max-height: calc(100vh - 95px);
                overflow-y: auto;
            }

            body.dark-mode nav ul {
                background: rgba(26, 42, 58, 0.98);
            }

            nav ul.show {
                display: flex;
            }

            nav ul li {
                margin: 12px 0;
                text-align: center;
                margin-left: 0;
            }

                nav ul li a {
                    font-size: 1.1rem;
                    justify-content: center;
                }
        }

        /* Для очень маленьких ноутбуков и планшетов в альбомной ориентации */
        @media (max-width: 864px) {
            .logo-text {
                font-size: 1rem;
            }

                .logo-text span {
                    font-size: 0.9rem;
                }

            .logo-img {
                height: 50px;
            }
        }

        /* Для мобильных устройств */
        @media (max-width: 768px) {
            .header-content {
                padding: 0 15px;
            }

            .logo-img {
                height: 45px;
                margin-right: 10px;
            }

            .logo-text {
                font-size: 1.1rem;
            }

                .logo-text span {
                    display: none;
                }
        }

        @media (max-width: 576px) {
            .logo-img {
                height: 40px;
            }

            .logo-text {
                font-size: 1rem;
            }

            .mobile-menu-btn {
                font-size: 20px;
            }
        }

        /* Для очень маленьких мобильных устройств */
        @media (max-width: 360px) {
            .logo-text {
                font-size: 0.9rem;
            }

            .logo-img {
                height: 35px;
                margin-right: 8px;
            }
        }

        /* Улучшения для средних экранов (ноутбуки 14-16") */
        @media (max-width: 1366px) {
            .header-content {
                padding: 0 30px;
            }

            nav ul li {
                margin-left: 30px;
            }

                nav ul li a {
                    font-size: 1.1rem;
                }
        }

        @media (max-width: 1200px) {
            .header-content {
                padding: 0 25px;
            }

            nav ul li {
                margin-left: 25px;
            }

            .logo-text {
                font-size: 1.2rem;
            }

            .logo-img {
                height: 60px;
                margin-right: 15px;
            }
        }

        @media (max-width: 1024px) {
            .header-content {
                padding: 0 20px;
            }

            nav ul li {
                margin-left: 20px;
            }

                nav ul li a {
                    font-size: 1rem;
                }

            .logo-text {
                font-size: 1.1rem;
            }

            .logo-img {
                height: 55px;
                margin-right: 12px;
            }
        }

        /* Для планшетов и небольших ноутбуков */
        @media (max-width: 992px) {
            .mobile-menu-btn {
                display: block;
            }

            nav ul {
                display: none;
                position: absolute;
                top: 95px;
                left: 0;
                width: 100%;
                background: rgba(255, 255, 255, 0.98);
                flex-direction: column;
                padding: 20px 0;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
                backdrop-filter: blur(10px);
                z-index: 999;
                max-height: calc(100vh - 95px);
                overflow-y: auto;
            }

            body.dark-mode nav ul {
                background: rgba(26, 42, 58, 0.98);
            }

            nav ul.show {
                display: flex;
            }

            nav ul li {
                margin: 12px 0;
                text-align: center;
                margin-left: 0;
            }

                nav ul li a {
                    font-size: 1.1rem;
                    justify-content: center;
                }
        }

        /* Для очень маленьких ноутбуков и планшетов в альбомной ориентации */
        @media (max-width: 864px) {
            .logo-text {
                font-size: 1rem;
            }

                .logo-text span {
                    font-size: 0.9rem;
                }

            .logo-img {
                height: 50px;
            }
        }

        /* Для мобильных устройств */
        @media (max-width: 768px) {
            .header-content {
                padding: 0 15px;
            }

            .logo-img {
                height: 45px;
                margin-right: 10px;
            }

            .logo-text {
                font-size: 1.1rem;
            }

                .logo-text span {
                    display: none;
                }
        }

        @media (max-width: 576px) {
            .logo-img {
                height: 40px;
            }

            .logo-text {
                font-size: 1rem;
            }

            .mobile-menu-btn {
                font-size: 20px;
            }
        }

        /* Для очень маленьких мобильных устройств */
        @media (max-width: 360px) {
            .logo-text {
                font-size: 0.9rem;
            }

            .logo-img {
                height: 35px;
                margin-right: 8px;
            }
        }

        /* Базовые размеры шрифтов для мобильных устройств */
        html {
            font-size: 14px;
        }

        /* Адаптивные размеры шрифтов для разных устройств */
        @media (min-width: 576px) {
            html {
                font-size: 15px;
            }
        }

        @media (min-width: 768px) {
            html {
                font-size: 15.5px;
            }

            .hero h1 {
                font-size: 2.8rem;
            }

            .hero p {
                font-size: 1.1rem;
            }
        }

        @media (min-width: 992px) {
            html {
                font-size: 16px;
            }

            .hero h1 {
                font-size: 3.2rem;
            }
        }

        @media (min-width: 1200px) {
            .hero h1 {
                font-size: 3.5rem;
            }
        }

        /* Адаптивные заголовки секций */
        .section-title h2 {
            font-size: 2rem;
        }

        @media (min-width: 768px) {
            .section-title h2 {
                font-size: 2.3rem;
            }
        }

        @media (min-width: 992px) {
            .section-title h2 {
                font-size: 2.5rem;
            }
        }

        /* Улучшение читаемости на мобильных устройствах */
        @media (max-width: 767px) {
            body {
                line-height: 1.6;
                text-rendering: optimizeLegibility;
                -webkit-font-smoothing: antialiased;
            }

            h1, h2, h3, h4, h5, h6 {
                line-height: 1.3;
                margin-bottom: 0.8em;
            }

            p {
                margin-bottom: 1.2em;
            }

            /* Уменьшение отступов на мобильных устройствах */
            section {
                padding: 50px 0;
            }

            .section-title {
                margin-bottom: 40px;
            }

            /* Оптимизация текста в карточках */
            .teacher-info h3 {
                font-size: 1.4rem;
            }

            .teacher-info p {
                font-size: 1rem;
            }

            .service-card h3 {
                font-size: 1.2rem;
            }

            /* Адаптивные размеры текста в геро-секции */
            .hero {
                height: 70vh;
                min-height: 500px;
            }

                .hero h1 {
                    font-size: 2.2rem;
                    margin-bottom: 15px;
                }

                .hero p {
                    font-size: 1rem;
                    margin-bottom: 25px;
                }

            .btn {
                padding: 12px 30px;
                font-size: 1rem;
            }
        }

        /* Оптимизация для очень маленьких экранов */
        @media (max-width: 360px) {
            html {
                font-size: 13px;
            }

            .hero h1 {
                font-size: 1.8rem;
            }

            .section-title h2 {
                font-size: 1.7rem;
            }

            .teacher-info h3 {
                font-size: 1.2rem;
            }
        }

        /* Предотвращение переноса важных текстовых элементов */
        .logo-text {
            white-space: nowrap;
        }

        /* Улучшение читаемости длинных текстов */
        .about-text p, .news-detail-content p, .testimonial-text {
            text-align: justify;
            hyphens: auto;
        }

        /* Оптимизация межбуквенного интервала для заголовков */
        .hero h1, .section-title h2, .news-title {
            letter-spacing: -0.02em;
        }

        @media (max-width: 767px) {
            .hero h1, .section-title h2, .news-title {
                letter-spacing: -0.01em;
            }
        }

        /* Анимация вращения логотипа */
        @keyframes logoRotate {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .logo-rotate {
            animation: logoRotate 1.5s ease-in-out;
        }

        /* Стили для формы записи */
        .modal-content input,
        .modal-content select {
            font-family: 'Montserrat', sans-serif;
            font-size: 1rem;
            transition: var(--transition);
        }

            .modal-content input:focus,
            .modal-content select:focus {
                outline: none;
                border-color: var(--clay-primary);
                box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
            }

        .modal-content label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--clay-dark);
        }

        body.dark-mode .modal-content input,
        body.dark-mode .modal-content select {
            background-color: #3a3530;
            color: #e6e0d9;
            border-color: #5D6D7E;
        }

        body.dark-mode .modal-content label {
            color: #e6e0d9;
        }

        /* Для экранов меньше 1200px */
        @media (max-width: 1200px) {
            .hero h1 {
                font-size: 2.8rem;
            }

            .about-content {
                flex-direction: column;
                gap: 30px;
            }

            .about-image {
                order: -1;
                height: 300px;
            }

            .teachers-pyramid {
                flex-direction: column;
            }

            .other-teachers .teacher-card {
                max-width: 100%;
            }
        }

        /* Для экранов меньше 992px (планшеты) */
        @media (max-width: 992px) {
            .hero h1 {
                font-size: 2.5rem;
            }

            .hero p {
                font-size: 1.1rem;
            }

            .section-title h2 {
                font-size: 2rem;
            }

            .gallery-preview {
                grid-template-columns: repeat(2, 1fr);
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .testimonials-grid {
                grid-template-columns: 1fr;
            }

            .footer-content {
                flex-direction: column;
            }

            .footer-column {
                text-align: center;
                margin-bottom: 30px;
            }

                .footer-column h3:after {
                    left: 50%;
                    transform: translateX(-50%);
                }

                .footer-column ul {
                    display: inline-block;
                    text-align: left;
                }

            .map-overlay {
                left: 20px;
                bottom: 20px;
                max-width: 300px;
            }
        }

        /* Для экранов меньше 768px (мобильные устройства) */
        @media (max-width: 768px) {
            .hero {
                height: 70vh;
                min-height: 500px;
            }

                .hero h1 {
                    font-size: 2rem;
                    text-align: center;
                }

                .hero p {
                    font-size: 1rem;
                    text-align: center;
                    max-width: 100%;
                }

            .hero-content {
                text-align: center;
                padding: 0 15px;
            }

            .btn {
                width: 100%;
                justify-content: center;
                margin-bottom: 10px;
            }

            .section-title h2 {
                font-size: 1.8rem;
            }

            .section-title p {
                font-size: 1rem;
                padding: 0 15px;
            }

            .gallery-preview {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .gallery-preview-item img {
                width: 100%;
                height: auto;
            }

            .stats-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .stat-card {
                padding: 20px;
            }

            .stat-number {
                font-size: 2.5rem;
            }

            .mission-statement {
                padding: 60px 20px;
            }

                .mission-statement h2 {
                    font-size: 2rem;
                }

                .mission-statement p {
                    font-size: 1rem;
                    padding: 0 10px;
                }

            .news-grid {
                grid-template-columns: 1fr;
            }

            .services-grid {
                grid-template-columns: 1fr;
            }

            .products-grid {
                grid-template-columns: 1fr;
            }

            .partners-grid {
                grid-template-columns: 1fr;
            }

            .partner-logo i {
                font-size: 4rem;
            }

            .contact-item {
                flex-direction: column;
                text-align: center;
            }

            .contact-icon {
                margin-right: 0;
                margin-bottom: 10px;
            }

            .map-overlay {
                position: relative;
                left: 0;
                bottom: 0;
                max-width: 100%;
                margin-top: 20px;
            }

            .map-section {
                height: 400px;
            }

            /* Скрываем некоторые элементы на мобильных */
            .hero-overlay {
                display: none;
            }

            body::before {
                background-size: 80px;
            }

            .employee-content {
                flex-direction: column;
            }

            .employee-photo {
                min-width: 100%;
                height: 300px;
            }

            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* Для экранов меньше 576px (маленькие мобильные) */
        @media (max-width: 576px) {
            .hero {
                height: 60vh;
                min-height: 400px;
            }

                .hero h1 {
                    font-size: 1.8rem;
                }

            .header-content {
                padding: 0 10px;
            }

            .logo-text {
                font-size: 1rem;
            }

            .logo-img {
                height: 40px;
                width: 40px;
            }

            .section-title h2 {
                font-size: 1.6rem;
            }

            .about-image {
                height: 250px;
                font-size: 1.4rem;
            }

            .gallery-grid {
                grid-template-columns: 1fr;
            }

            .gallery-item {
                height: 250px;
            }

            .teacher-info h3 {
                font-size: 1.4rem;
            }

            .teacher-info p {
                font-size: 1rem;
            }

            .news-detail-title {
                font-size: 1.8rem;
            }

            .news-detail-image {
                height: 300px;
            }

            .document-item {
                flex-direction: column;
                text-align: center;
            }

            .document-icon {
                margin-right: 0;
                margin-bottom: 15px;
            }

            .document-actions {
                flex-direction: column;
                gap: 10px;
                margin-top: 15px;
            }

                .document-actions .btn {
                    width: 100%;
                }

            .pdf-viewer {
                height: 500px;
            }

            /* Скрываем дополнительные элементы на очень маленьких экранах */
            .logo-text span {
                display: none;
            }

            .news-detail-meta {
                flex-direction: column;
                gap: 5px;
            }
        }

        /* Для экранов меньше 400px (очень маленькие мобильные) */
        @media (max-width: 400px) {
            .hero h1 {
                font-size: 1.6rem;
            }

            .hero p {
                font-size: 0.9rem;
            }

            .section-title h2 {
                font-size: 1.4rem;
            }

            .about-image {
                height: 200px;
                font-size: 1.2rem;
            }

            .teacher-card {
                min-width: 100%;
            }

            .service-card {
                padding: 30px 20px;
            }

            .service-icon {
                width: 60px;
                height: 60px;
                font-size: 24px;
            }

            .news-title {
                font-size: 1.3rem;
            }

            .news-detail {
                padding: 20px;
            }

            .news-detail-title {
                font-size: 1.5rem;
            }

            .news-detail-content {
                font-size: 0.9rem;
            }

            .employee-detail {
                padding: 20px;
            }

            .employee-header h2 {
                font-size: 1.8rem;
            }

            .employee-position {
                font-size: 1.1rem;
            }

            .info-section h3 {
                font-size: 1.3rem;
            }

            /* Скрываем дополнительные декоративные элементы */
            .section-title h2:after {
                display: none;
            }

            .mission-statement h2:after {
                display: none;
            }
        }

        /* Улучшение читаемости на всех устройствах */
        .about-text p, .news-detail-content p, .testimonial-text {
            text-align: justify;
            hyphens: auto;
        }

        /* Гарантия, что изображения никогда не выходят за пределы контейнера */
        img {
            max-width: 100%;
            height: auto;
        }

        .map-section {
            padding: 0;
            height: 500px;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            margin-bottom: 40px;
            position: relative;
        }

        #map {
            width: 100%;
            height: 100%;
            background: #e9e5e0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--clay-text);
            font-weight: 500;
        }

        body.dark-mode #map {
            background: #2d2a26;
        }

        .map-overlay {
            background-color: rgba(255, 255, 255, 0.95);
            padding: 25px;
            border-radius: var(--border-radius);
            position: absolute;
            bottom: 40px;
            left: 40px;
            max-width: 350px;
            box-shadow: var(--shadow);
            z-index: 100;
            border: 1px solid rgba(74, 144, 226, 0.1);
        }

        body.dark-mode .map-overlay {
            background-color: rgba(26, 42, 58, 0.95);
            color: #e6e0d9;
        }

        .map-overlay h3 {
            font-size: 1.3rem;
            margin-bottom: 10px;
            color: var(--clay-dark);
            font-family: 'Playfair Display', serif;
        }

        .map-overlay p {
            color: var(--clay-text);
            margin-bottom: 5px;
        }

        /* Адаптация для мобильных устройств */
        @media (max-width: 768px) {
            .map-section {
                height: 400px;
            }

            .map-overlay {
                position: relative;
                left: 0;
                bottom: 0;
                max-width: 100%;
                margin-top: 20px;
                padding: 20px;
                text-align: center;
            }

            /* Улучшение отображения карты на мобильных */
            #map iframe {
                height: 100%;
                min-height: 300px;
            }
        }

        /* Для очень маленьких экранов */
        @media (max-width: 480px) {
            .map-section {
                height: 350px;
                border-radius: 12px;
            }

            .map-overlay {
                padding: 15px;
                margin-top: 15px;
            }

                .map-overlay h3 {
                    font-size: 1.1rem;
                }

                .map-overlay p {
                    font-size: 0.9rem;
                }
        }

        /* Улучшение для планшетов */
        @media (min-width: 769px) and (max-width: 1024px) {
            .map-section {
                height: 450px;
            }

            .map-overlay {
                left: 20px;
                bottom: 20px;
                max-width: 300px;
            }
        }

        @media (max-width: 768px) {
            .btn {
                min-height: 44px;
                padding: 12px 24px;
            }

            .nav-link {
                padding: 12px 15px;
            }
        }

        .contact-item {
            flex-direction: row;
            text-align: left;
            margin-bottom: 25px;
            align-items: center;
        }

        .contact-icon {
            width: 60px;
            height: 60px;
            margin-right: 20px;
            flex-shrink: 0;
        }

        .contact-text h4 {
            font-size: 1.2rem;
            margin-bottom: 8px;
        }

        .contact-text p {
            font-size: 1.1rem;
            line-height: 1.6;
        }

        .social-links a {
            width: 55px;
            height: 55px;
            font-size: 24px;
        }

        /* Адаптивность для мобильных устройств */
        @media (max-width: 768px) {
            .contact-item {
                flex-direction: column;
                text-align: center;
                margin-bottom: 30px;
            }

            .contact-icon {
                margin-right: 0;
                margin-bottom: 15px;
                width: 70px;
                height: 70px;
                font-size: 24px;
            }

            .contact-text h4 {
                font-size: 1.3rem;
            }

            .contact-text p {
                font-size: 1.1rem;
            }

            .social-links {
                flex-wrap: wrap;
                justify-content: center;
                gap: 15px;
            }

                .social-links a {
                    width: 60px;
                    height: 60px;
                    font-size: 26px;
                }
        }

        @media (max-width: 576px) {
            .contact-icon {
                width: 60px;
                height: 60px;
                font-size: 22px;
            }

            .contact-text h4 {
                font-size: 1.2rem;
            }

            .contact-text p {
                font-size: 1rem;
            }

            .social-links a {
                width: 50px;
                height: 50px;
                font-size: 22px;
            }

            .contact-info h3 {
                font-size: 1.5rem;
            }
        }

        @media (max-width: 400px) {
            .contact-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }

            .contact-text h4 {
                font-size: 1.1rem;
            }

            .contact-text p {
                font-size: 0.95rem;
            }

            .social-links a {
                width: 45px;
                height: 45px;
                font-size: 20px;
            }
        }

        /* Улучшение читаемости текста */
        .contact-text p {
            color: var(--clay-text);
            line-height: 1.6;
        }

        body.dark-mode .contact-text p {
            color: #c8c1ba;
        }

        /* Увеличение области клика для иконок на мобильных */
        @media (max-width: 768px) {
            .contact-icon {
                min-width: 60px;
                min-height: 60px;
            }

            .social-links a {
                min-width: 50px;
                min-height: 50px;
            }
        }

        /* Улучшения адаптивности для страницы сотрудника */
        .employee-info {
            font-size: 1.1rem;
            line-height: 1.8;
        }

        .info-section {
            margin-bottom: 2rem;
        }

            .info-section h3 {
                font-size: 1.6rem;
                margin-bottom: 1rem;
                color: var(--clay-dark);
            }

            .info-section p {
                margin-bottom: 1.2rem;
                text-align: justify;
                hyphens: auto;
            }

            .info-section ul {
                margin-left: 1.5rem;
                margin-bottom: 1.5rem;
            }

            .info-section li {
                margin-bottom: 0.8rem;
                line-height: 1.6;
                position: relative;
                padding-left: 1.5rem;
            }

                .info-section li::before {
                    content: '•';
                    color: var(--clay-primary);
                    font-size: 1.5rem;
                    position: absolute;
                    left: 0;
                    top: -0.2rem;
                }

        /* Адаптивность для мобильных устройств */
        @media (max-width: 768px) {
            .employee-info {
                font-size: 1rem;
                line-height: 1.7;
            }

            .info-section h3 {
                font-size: 1.4rem;
                margin-bottom: 0.8rem;
            }

            .info-section p {
                margin-bottom: 1rem;
                text-align: left;
            }

            .info-section ul {
                margin-left: 1rem;
            }

            .info-section li {
                padding-left: 1.2rem;
                margin-bottom: 0.6rem;
            }

            .employee-content {
                gap: 1.5rem;
            }
        }

        @media (max-width: 576px) {
            .employee-info {
                font-size: 0.95rem;
            }

            .info-section h3 {
                font-size: 1.3rem;
            }

            .info-section li {
                padding-left: 1rem;
            }

                .info-section li::before {
                    font-size: 1.3rem;
                    top: -0.1rem;
                }
        }

        /* Улучшение читаемости на всех устройствах */
        .employee-detail {
            line-height: 1.7;
        }

        .employee-header h2 {
            line-height: 1.2;
            margin-bottom: 0.5rem;
        }

        .employee-position {
            line-height: 1.4;
        }

        /* Улучшение контрастности в темном режиме */
        body.dark-mode .info-section h3 {
            color: #e6e0d9;
        }

        body.dark-mode .info-section p {
            color: #c8c1ba;
        }

        body.dark-mode .info-section li {
            color: #c8c1ba;
        }

        .employee-detail {
            max-width: 1200px;
            margin: 0 auto;
        }

        @media (max-width: 768px) {
            .employee-content {
                flex-direction: column;
                gap: 20px;
            }

            .employee-photo,
            .employee-info {
                min-width: 100%;
                max-width: 100%;
            }

            .employee-photo {
                height: 300px;
                order: -1; /* Изображение будет сверху */
            }
        }

        .employee-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            max-width: 100%;
        }

        .employee-info {
            font-size: 1.1rem;
            line-height: 1.7;
        }

        .info-section h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--clay-dark);
        }

        .info-section p {
            margin-bottom: 1.2rem;
            text-align: justify;
            hyphens: auto;
        }

        .info-section ul {
            margin-left: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .info-section li {
            margin-bottom: 0.8rem;
            line-height: 1.6;
        }

        @media (min-width: 769px) {
            .employee-content {
                justify-content: center;
                align-items: flex-start;
            }

            .employee-photo {
                max-width: 400px;
            }

            .employee-info {
                max-width: 600px;
            }
        }

        /* Скрываем кнопку просмотра PDF на мобильных устройствах */
        @media (max-width: 768px) {
            .document-actions .btn-outline {
                display: none;
            }
        }

        /* Обеспечиваем правильное отображение кнопок на мобильных */
        @media (max-width: 576px) {
            .document-actions .btn {
                width: 100%;
                margin-bottom: 10px;
            }
        }