/* Переменные для цветовых схем */
:root {
    /* Светлая тема (по умолчанию) */
    --bg-color: #f9f9f9;
    --text-color: #333;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --section-title-color: #1a1a1a;
    --section-description-color: #666;
    --btn-primary-bg: linear-gradient(90deg, #3498db, #2980b9);
    --btn-primary-color: white;
    --btn-secondary-bg: #f0f0f0;
    --btn-secondary-color: #333;
    --footer-bg: #f0f0f0;
    --footer-text: #333333;
    --deal-card-bg: #fff;
    --deal-card-border: #eaeaea;
    --modal-bg: rgba(0, 0, 0, 0.9);
    --modal-text: #f1f1f1;
    --theme-toggle-bg: #f0f0f0;
    --theme-toggle-circle: #3498db;
}

/* Темная тема */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --header-bg: #1e1e1e;
    --card-bg: #1e1e1e;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --section-title-color: #e0e0e0;
    --section-description-color: #b0b0b0;
    --btn-primary-bg: linear-gradient(90deg, #2980b9, #1a5276);
    --btn-primary-color: white;
    --btn-secondary-bg: #2a2a2a;
    --btn-secondary-color: #e0e0e0;
    --btn-secondary-hover-bg: rgba(255, 255, 255, 0.15);
    --btn-secondary-hover-color: #ffffff;
    --btn-secondary-hover-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
    --footer-bg: #0a0a0a;
    --footer-text: #e0e0e0;
    --deal-card-bg: #1e1e1e;
    --deal-card-border: #333;
    --modal-bg: rgba(0, 0, 0, 0.95);
    --modal-text: #e0e0e0;
    --theme-toggle-bg: #333;
    --theme-toggle-circle: #2980b9;
    --hero-bg: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
    --hero-text: #e0e0e0;
    --hero-subtitle: #b0b0b0;
    --about-bg: #1a1a1a;
    --deals-bg: #151515;
    --deals-block-bg: #1e1e1e;
    --deals-block-border: #333;
    --courses-bg: #1a1a1a;
    --course-card-border: #333;
    --testimonials-bg: #151515;
    --testimonial-bg: #1e1e1e;
    --contact-bg: #1a1a1a;
    --contact-form-bg: #252525;
    --form-border: #444;
}

/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Стили для слайдера в блоке О наставнике */
.about-image-slider {
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.slider-container {
    width: 100%;
    position: relative;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 400px;
}

.slide {
    min-width: 100%;
    display: none;
    height: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    padding: 0 15px;
}

.slider-btn {
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 2;
}

.slider-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #fff;
}

/* Модальное окно для увеличенного изображения */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-bg);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin-top: 2%;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--modal-text);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.zoomable {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.zoomable:hover {
    transform: scale(1.05);
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--section-title-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    margin: 15px auto 30px;
    border-radius: 2px;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    color: var(--section-description-color);
}

/* Переключатель темы */
.logo-container {
    display: flex;
    align-items: center;
}

.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.theme-toggle {
    position: relative;
    width: 60px; /* Увеличим ширину */
    height: 30px; /* Увеличим высоту */
    background-color: var(--theme-toggle-bg);
    border-radius: 15px; /* Сделаем более круглым */
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-around; /* Равномерно распределим иконки */
    padding: 0 5px; /* Небольшие отступы по бокам */
}

.theme-toggle i { /* Стили для иконок */
    font-size: 16px; /* Немного увеличим иконки */
    color: var(--text-color);
    z-index: 1;
    transition: color 0.3s ease;
}

.theme-toggle .fa-sun {
    color: #f39c12; /* Цвет солнца */
}

.theme-toggle .fa-moon {
    color: #bdc3c7; /* Цвет луны по умолчанию */
}

[data-theme="dark"] .theme-toggle .fa-moon {
    color: #3498db; /* Цвет луны в темной теме */
}

[data-theme="dark"] .theme-toggle .fa-sun {
    color: #7f8c8d; /* Приглушенный цвет солнца в темной теме */
}

.theme-toggle .toggle-circle {
    position: absolute;
    left: 3px; /* Начальное положение */
    width: 24px; /* Увеличим размер кружка */
    height: 24px; /* Увеличим размер кружка */
    background-color: var(--theme-toggle-circle);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 0; /* Чтобы был под иконками, но виден */
}

[data-theme="dark"] .theme-toggle .toggle-circle {
    transform: translateX(30px); /* Сдвиг для темной темы (60 - 24 - 3 - 3 = 30) */
}

/* Кнопки */
.btn-primary {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #3498db;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f0f8ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--btn-secondary-hover-bg, rgba(255, 255, 255, 0.15));
    color: var(--btn-secondary-hover-color, #ffffff);
    box-shadow: var(--btn-secondary-hover-shadow, 0 4px 15px rgba(255, 255, 255, 0.25));
    transform: translateY(-3px);
}

.btn-telegram-contact {
    display: inline-flex;
    align-items: center;
    background: #0088cc;
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.btn-telegram-contact i {
    margin-right: 5px;
    font-size: 1.1em;
}

.btn-telegram-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    background: #0099e6;
    color: white;
}

/* Шапка */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.logo h1 {
    font-size: 1.8rem;
    color: #3498db;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.logo h1:hover {
    transform: scale(1.05);
    color: #2980b9;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3498db;
}

/* Герой-секция */
.hero {
    background: var(--hero-bg, linear-gradient(135deg, #f5f7fa 0%, #e4eff9 100%));
    padding: 100px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--hero-text, #1a1a1a);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--hero-subtitle, #666);
}

.hero-image {
    flex: 1;
    text-align: center;
    min-height: 400px; /* Минимальная высота для контейнера */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: block; /* Гарантирует блочное отображение */
    width: 100%; /* Устанавливает ширину на 100% контейнера */
    animation: float 3s ease-in-out infinite; /* Возвращаем анимацию */
}

/* Специальные стили для SVG в hero секции */
.hero-image svg, .hero-image img[src$='.svg'], .hero-image object {
    width: 100%;
    height: 400px;
    object-fit: contain;
    visibility: visible !important;
    opacity: 1 !important;
    display: block;
    margin: 0 auto;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* О тренере */
.about {
    background-color: var(--about-bg, white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--section-title-color, #1a1a1a);
}

.about-text .subtitle {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.achievements {
    list-style: none;
    margin-top: 30px;
}

.achievements li {
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.achievements li i {
    color: #3498db;
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Сделки */
.deals {
    background-color: var(--deals-bg, #f5f7fa);
}

.deals-blocks {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

.deals-block {
    background-color: var(--deals-block-bg, white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px var(--card-shadow, rgba(0, 0, 0, 0.08));
    border: 1px solid var(--deals-block-border, #e0e0e0);
}

.block-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--section-title-color, #2980b9);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--deal-card-border, #f0f0f0);
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.deal-card {
    background-color: var(--deal-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--deal-card-border);
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.deal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.deal-header.success {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.deal-header.neutral {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.deal-header.failure {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.deal-profit {
    font-weight: 700;
    font-size: 1.2rem;
}

.deal-body {
    padding: 20px;
}

.result-body h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.result-body p {
    margin-bottom: 8px;
    color: var(--section-description-color, #666);
}

.deal-analysis {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--deal-card-border, #eee);
    font-style: italic;
    color: var(--section-description-color, #666);
    margin-bottom: 15px;
}

.deal-chart {
    margin: 15px 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.deal-chart img {
    width: 100%;
    height: auto;
    display: block;
}

.deal-details {
    margin-top: 15px;
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    background-color: #0088cc;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-telegram:hover {
    background-color: #0077b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.4);
}

[data-theme="dark"] .btn-telegram:hover {
    background-color: #0099ff;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.8);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-telegram i {
    margin-right: 8px;
}

.telegram-link {
    text-align: center;
    margin-top: 40px;
}

.telegram-link a i {
    margin-right: 10px;
}

/* Курсы */
.courses {
    background-color: var(--courses-bg, white);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--course-card-border, #eee);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.course-card.featured {
    border: 2px solid #3498db;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
    position: relative;
}

.course-card.featured::before {
    content: 'Популярный выбор';
    position: absolute;
    top: 0;
    right: 0;
    background: #3498db;
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom-left-radius: 10px;
}

.course-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.course-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.course-header .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3498db;
}

.course-body {
    padding: 25px 20px;
}

.course-features {
    list-style: none;
    margin-bottom: 25px;
}

.course-features li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
}

.course-features li i {
    color: #2ecc71;
    margin-right: 10px;
    margin-top: 3px;
}

.course-card .btn-primary {
    width: 100%;
    text-align: center;
}

/* Отзывы */
.testimonials {
    background-color: var(--testimonials-bg, #f5f7fa);
}

.testimonials-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
}

.testimonials-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.testimonial {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 300px;
    background-color: var(--testimonial-bg, white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--card-shadow, rgba(0, 0, 0, 0.05));
    scroll-snap-align: start;
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    color: #555;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.testimonial-author h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.testimonial-author p {
    color: #777;
    font-size: 0.9rem;
}

/* Контакты */
.contact {
    background-color: var(--contact-bg, white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form {
    background-color: var(--contact-form-bg, #f9f9f9);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow, rgba(0, 0, 0, 0.05));
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--form-border, #ddd);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.contact-info {
    padding: 20px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.contact-methods {
    list-style: none;
    margin: 30px 0;
}

.contact-methods li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.contact-methods li i {
    color: #3498db;
    margin-right: 15px;
    font-size: 1.3rem;
    width: 25px;
}

.guarantee {
    background-color: #f0f8ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    margin-top: 40px;
}

.guarantee h4 {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.guarantee h4 i {
    color: #3498db;
    margin-right: 10px;
}

/* Футер */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #3498db;
}

.footer-logo p {
    color: var(--footer-text);
}

.footer-links h4,
.footer-social h4 {
    color: var(--footer-text);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #3498db;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--card-shadow);
    color: var(--footer-text);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #3498db;
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero .container,
    .about-content {
        flex-direction: column;
    }
    
    .hero-content,
    .about-text {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .course-card.featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .theme-toggle-wrapper {
        margin-left: 10px; /* Уменьшенный отступ для мобильных */
    }
    
    .theme-toggle {
        width: 50px; /* Уменьшенная ширина */
        height: 25px; /* Уменьшенная высота */
        border-radius: 12.5px;
        padding: 0 4px;
    }
    
    .theme-toggle i { /* Обновленный селектор и стиль */
        font-size: 14px; /* Уменьшенный размер иконок */
    }
    
    .theme-toggle .toggle-circle {
        width: 21px; /* Уменьшенный кружок */
        height: 21px;
        left: 2px; /* Скорректированное начальное положение */
    }
    
    [data-theme="dark"] .theme-toggle .toggle-circle { /* Обновленный селектор и значение */
        transform: translateX(25px); /* Скорректированный сдвиг для мобильных: 50 - 21 - 2 - 2 = 25 */
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .theme-toggle-wrapper {
        margin-left: 10px;
    }
    
    .theme-toggle {
        width: 44px; /* Уменьшенная ширина */
        height: 22px; /* Уменьшенная высота */
        border-radius: 11px;
        padding: 0 3px;
    }
    .theme-toggle i { /* Обновленный селектор и стиль */
        font-size: 12px; /* Уменьшенный размер иконок */
    }
    .theme-toggle .toggle-circle {
        width: 18px; /* Уменьшенный кружок */
        height: 18px;
        left: 2px; /* Скорректированное начальное положение */
    }
    [data-theme="dark"] .theme-toggle .toggle-circle { /* Обновленный селектор и значение */
        transform: translateX(22px); /* Скорректированный сдвиг: 44 - 18 - 2 - 2 = 22 */
    }
}

/* Стили для мобильного меню-бургера */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #3498db;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 900px) {
    .theme-toggle-wrapper {
        /* position: absolute; right: 15px; top: 60px; - Removed to keep toggle next to logo */
        /* margin-left will be inherited from base (15px) or set by more specific media queries */
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }
    
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 0;
    }
    
    .logo h1 {
        font-size: 1.2rem; /* Уменьшаем размер логотипа для мобильных устройств */
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--header-bg);
        box-shadow: -5px 0 15px var(--card-shadow);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 70px;
    }
    
    nav.active .theme-toggle-wrapper {
        /* position: fixed; top: 15px; right: 70px; z-index: 1001; - Removed to keep toggle next to logo */
    }
    
    .theme-toggle-wrapper {
        /* position: absolute; right: 70px; top: 15px; - Removed to keep toggle next to logo */
        /* margin-left: 10px; should apply from an earlier rule at this breakpoint */
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 10px;
        font-size: 1.1rem;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .about-text h3 {
        font-size: 1.6rem;
    }
    
    .testimonial {
        flex: 0 0 100%;
    }
    
    .logo h1 {
        font-size: 1rem; /* Делаем логотип еще меньше для очень маленьких экранов */
    }
    
    header {
        padding: 8px 0;
    }
    
    nav ul li a {
        font-size: 1rem;
    }
}

/* Стиль для блокировки прокрутки при открытом меню */
body.menu-open {
    overflow: hidden;
}

/* Стили для баннера бесплатного урока */
.free-lesson-banner {
    background: linear-gradient(135deg, #2c3e50, #4a69bd);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.free-lesson-banner::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.free-lesson-banner h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ffd700;
}

.free-lesson-banner p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

.free-lesson-banner .fas {
    font-size: 32px;
    margin-bottom: 15px;
    color: #ffd700;
}

.free-lesson-banner .btn-secondary {
    background-color: #ffd700;
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.free-lesson-banner .btn-secondary:hover {
    background-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .free-lesson-banner {
        padding: 20px 15px;
    }
    
    .free-lesson-banner h3 {
        font-size: 20px;
    }
}

/* Результаты */
.results {
    background-color: var(--courses-bg, #f5f7fa);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.result-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--course-card-border, #eee);
    padding: 25px;
    text-align: center;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.result-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--section-title-color, #2980b9);
}

.result-stats {
    margin-bottom: 20px;
}

.result-stats .stat {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--section-description-color, #666);
}

.result-stats .stat .highlight {
    color: #2ecc71;
    font-weight: 700;
    font-size: 1.2rem;
}

.result-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.result-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.result-image img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-card {
        padding: 20px;
    }
}