/* ===== CSS VARIABLES FOR THEMES ===== */
:root {
    /* Светлая тема (по умолчанию) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: rgba(248, 249, 250, 0.9);
    --text-primary: #000000;
    --text-secondary: #333333;
    --accent-primary: #723BF9;
    --accent-secondary: #C53EE5;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --button-gradient: linear-gradient(90deg, #723BF9 -50%, #0E012F 50%, #723BF9 150%);
    --header-gradient: linear-gradient(90deg, #723BF9 0%, #4E24B9 100%);
    --social-bg: #723BF9;
    --social-color: #ffffff;
}

[data-theme="dark"] {
    /* Темная тема */
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --bg-card: rgba(0, 0, 0, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-primary: #723BF9;
    --accent-secondary: #C53EE5;
    --border-color: #333333;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --button-gradient: linear-gradient(90deg, #723BF9 -50%, #0E012F 50%, #723BF9 150%);
    --header-gradient: linear-gradient(90deg, #723BF9 0%, #4E24B9 100%);
    --social-bg: #ffffff;
    --social-color: #723BF9;
}

/* ===== BASE STYLES ===== */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-section {
    min-height: 100vh;
    padding: 4rem 0;
    background: var(--bg-primary);
}

.section-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em;
}

.content-block {
    text-align: center;
}

/* ===== HEADER STYLES ===== */
.main-header {
    width: 100%;
}

.header-row {
    position: relative;
    padding: 7px;
    margin-top: 0 !important;
}

.logo-text {
    font-weight: bold;
    color: var(--text-primary) !important;
    text-shadow: 2px 2px 2px #4E24B9;
}

/* ДОБАВЬТЕ ЭТО ДЛЯ STICKY ЭЛЕМЕНТОВ */
[data-sticky] .header-gradient {
    background: var(--header-gradient) !important;
}

.top-bar.main-header[data-sticky] {
    background: var(--bg-primary) !important;
}

.header-gradient {
    background: var(--header-gradient) !important;
    border-bottom-left-radius: 2em;
    border-bottom-right-radius: 2em;
}

.header-gradient .menu a {
    color: white;
}

.header-gradient .menu a:hover {
    background: #4A20C4;
    border-radius: 4px;
}

.social-navigation .menu a {
    background: var(--social-bg);
    color: var(--social-color);
    border-radius: 4px;
    padding: 0.5rem;
}

.bg_none {
    background-color: transparent !important;
}

.m_top {
    margin-top: 0 !important;
}

.p_top {
    padding-top: 0 !important;
}

/* ===== OFF-CANVAS STYLES ===== */
.offcanvas-menu {
    padding: 6rem 2rem;
    background: var(--bg-card) !important;
}

.offcanvas-social {
    margin-top: 2rem;
}

.offcanvas-social a {
    margin-right: 1rem;
}

.offcanvas-dark {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .offcanvas-dark {
    background: rgba(255, 255, 255, 0.3);
}

.offcanvas-dark .menu a {
    color: var(--text-primary);
}

.offcanvas-dark .menu a:hover {
    background: rgba(var(--accent-primary), 0.2);
}

.hamburger-gradient {
    background: linear-gradient(135deg, #723BF9 0%, #4A20C4 50%) !important;
    color: white;
}

.offcanvas-dark .offcanvas-social a {
    background: var(--social-bg);
    color: var(--social-color);
    border-radius: 4px;
    padding: 0.5rem;
}

.cl_b {
    top: 2rem !important;
    right: 2rem !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--text-primary) !important;
    border-radius: 5px !important;
    padding: .5rem;
    font-size: 1rem;
}

/* ===== SECTION SPECIFIC STYLES ===== */
/* ABOUT */
.about-content {
    align-items: center;
}

.show-for-small-only .logo-link {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-weight: inherit;
    display: block;
}

.text-block {
    text-align: left;
}

.about-list {
    list-style: none;
    margin-left: 0;
}

.about-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
}

.about-list li:before {
    content: "★";
    color: var(--accent-primary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

.li_it {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-right: 2rem;
}

.oval-photo {
    width: 300px;
    height: auto;
    border-radius: 60% 40%;
    background: var(--accent-primary);
    transform: rotate(0deg);
    margin: 0 auto;
    overflow: hidden;
    border: 3px solid var(--accent-primary);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.oval-photo:hover {
    transform: rotate(5deg) scale(1.05);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 10fr;
    gap: 1rem;
    align-items: start;
}

.grid-icon {
    text-align: center;
    color: var(--accent-primary);
    font-size: 3rem;
}

.grid-text {
    text-align: left;
    padding-top: .8rem;
    color: var(--text-primary);
    font-size: 1.4rem;
}

/* EXAM */
.exams-section {
    background-color: var(--bg-primary);
    background-image: url('img/bg_flag.png');
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: contain;
}

.exam-container {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 2em;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.exam-grid {
    display: grid;
    grid-template-columns: 1fr 10fr;
    gap: 1rem;
    align-items: start;
}

.grid-icon-exam {
    color: var(--accent-primary);
    font-size: 3rem;
    text-align: center;
}

.grid-text span {
    color: var(--accent-primary);
    text-shadow: 1px 1px 2px var(--bg-primary);
    font-weight: bold;
}

.exam-button {
    background: var(--button-gradient);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 2em;
    text-decoration: none;
    display: inline-block;
    margin: 1rem 0;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.exam-button:hover {
    color: white;
    transform: scale(1.05);
}

.exam-image {
    position: absolute;
    bottom: 20px;
    right: 20px;
    max-width: 200px;
}

/* SLIDER */
.reviews-slider img {
    margin: 0 auto;
    max-height: 500px;
}

/* OLIMPIA */
.olympiads-section {
    background: var(--bg-primary);
    background-image: url('img/photoroom.png') left bottom no-repeat;
    background-size: contain;
}

.olimp-container {
    background: var(--bg-card);
    border: 2px solid var(--accent-secondary);
    border-radius: 2em;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.olimp-grid {
    display: grid;
    grid-template-columns: 1fr 10fr;
    gap: 1rem;
    align-items: start;
}

.grid-icon-olimp {
    color: var(--accent-secondary);
    font-size: 3rem;
    text-align: center;
}

.grid-text-olimp {
    text-align: left;
    padding-top: .8rem;
    color: var(--text-primary);
    font-size: 1.4rem;
}

.grid-text-olimp span {
    color: var(--accent-secondary);
    text-shadow: 1px 1px 2px var(--bg-primary);
    font-weight: bold;
}

.olimp-button {
    background: linear-gradient(90deg, #C53EE5 -50%, #0E012F 50%, #C53EE5 150%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 2em;
    text-decoration: none;
    display: inline-block;
    margin: 1rem 0;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.olimp-button:hover {
    color: white;
    transform: scale(1.05);
}

.olimp-image {
    position: absolute;
    bottom: 20px;
    right: 20px;
    max-width: 200px;
}

/* ADMISSION */
.admission-section {
    background-color: var(--bg-primary);
}

.admission-list {
    list-style: none;
    margin-left: 0;
}

.admission-list li {
    color: var(--text-primary);
    font-size: 1.5em;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.admission-list li:before {
    content: "•";
    color: var(--accent-primary);
    font-size: 2em;
    position: absolute;
    left: 0;
    top: -0.2rem;
}

.text-block span {
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.8em;
    display: block;
    margin-bottom: 1rem;
}

/* NO_PROBLEM */
.no-problem-list {
    list-style: none;
    margin-left: 0;
}

.no-problem-list li {
    color: var(--text-primary) !important;
    font-size: 1.5em;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 3rem;
}

.no-problem-list li:before {
    content: "!";
    color: var(--accent-primary) !important;
    font-size: 4rem;
    position: absolute;
    left: 0;
    top: -1rem;
}

.no-problem-section h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
}

/* STEP */
.step-section {
    background-color: var(--bg-primary)  !important;
    background: url('img/bigban.png') right bottom no-repeat;
    background-size: contain;
}

.step-container {
    background: var(--bg-card)  !important;
    border: 2px solid var(--accent-primary);
    border-radius: 2em;
    padding: 2rem;
    margin-bottom: 1em;
}

.step-container span {
    color: var(--accent-primary);
    font-size: 2em;
    font-weight: bold;
    display: block;
    margin-bottom: 1.5rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.step-icon {
    color: var(--accent-primary);
    margin-right: 1rem;
    margin-top: 0.2rem;
    min-width: 20px;
}

.step-text {
    flex: 1;
    line-height: 1.4;
    text-align: left;
}

.step-subitem {
    display: flex;
    align-items: flex-start;
    margin: 0.5rem 0;
    margin-left: 1.5rem;
}

.step-subicon {
    color: var(--accent-primary);
    margin-right: 0.8rem;
    margin-top: 0.1rem;
    font-size: 0.9em;
}

.step-subitem div {
    flex: 1;
    font-size: 0.95em;
    text-align: left;
}

.step-button {
    background: var(--button-gradient);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 2em;
    text-decoration: none;
    display: inline-block;
    margin: 2rem 0 1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.step-button:hover {
    color: white;
    transform: scale(1.05);
}

/* PRICING */
.pricing-section {
    background: var(--bg-primary);
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.pricing-left {
    position: relative;
    z-index: 3;
    max-width: 30%;
    padding-right: 2rem;
}

.pricing-card {
    border: 2px solid var(--accent-primary);
    border-radius: 1em 1em 0 0;
    overflow: hidden;
    margin-bottom: 2rem;
    float: left;
    width: 40em;
}

.pricing-header {
    background: var(--accent-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1em 1em 0 0;
}

.pricing-header h3 {
    margin: 0;
    font-weight: bold;
    text-align: center;
    color: white !important;
}

.pricing-body {
    background: var(--bg-card);
    padding: 1.5rem;
}

.pricing-body span {
    color: var(--text-primary);
}

.price-item {
    display: flex;
    align-items: flex-start;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.price-item i {
    color: var(--accent-primary);
    margin-right: 1rem;
    font-size: 1.5em;
    width: 20px;
    margin-top: 0.7rem;
}

.price-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    text-align: left;
    font-size: 2em;
}

.price-subtext {
    font-size: 0.9em;
    font-weight: normal;
    color: var(--text-primary);
    margin-top: 0.3rem;
    text-align: left;
    font-size: 0.8em;
}

.pricing-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
}

.leonardo-image {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    margin-bottom: 8rem;
}

.money-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    text-align: center;
}

.money-image {
    max-width: 100%;
    height: auto;
}

/* CONTACT */
.contact-section {
    background-color: var(--bg-primary);
}

.contact-container {
    border: 2px solid var(--accent-primary);
    border-radius: 2em;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contact-image img {
    max-width: 100%;
    height: auto;
}

.form-wrapper {
    padding: 2rem;
    background: var(--bg-card);
}

.form-wrapper h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--accent-primary);
    border-radius: 0.5em;
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
}

.form-group input:focus {
    color: var(--text-primary) !important;
}

.reset-btn {
    background: var(--button-gradient);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 2em;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 1rem;
    display: block;
    width: 100%;
}

.contact-method {
    margin-bottom: 2rem;
}

.contact-method label {
    color: var(--text-primary);
    display: block;
    margin-bottom: 1rem;
    font-weight: bold;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.contact-btn {
    background: linear-gradient(90deg, #C53EE5 -50%, #0E012F 50%, #C53EE5 150%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 2em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9em;
}

.contact-btn:hover,
.contact-btn.active {
    transform: scale(1.05);
}

.contact-input input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--accent-primary);
    border-radius: 0.5em;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.submit-btn {
    background: var(--button-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2em;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: scale(1.02);
}

.success-message {
    background: rgba(var(--accent-primary), 0.2);
    border: 1px solid var(--accent-primary);
    border-radius: 1em;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-weight: bold;
}

.close-message {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5em;
    cursor: pointer;
}

/* FOOTER */
.main-footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2rem 0;
}

.footer-column {
    margin-bottom: 1rem;
}

.footer-column h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-column a {
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent-primary) !important;
}

.doc-link:hover {
    color: var(--accent-primary) !important;
}

.footer-column .fa-solid,
.footer-column .fa-brands {
    color: var(--accent-primary);
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.dev-link:hover {
    color: var(--accent-secondary) !important;
}

.browser-stats {
    text-align: left;
    font-family: monospace;
}

.stat-row {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(var(--accent-primary), 0.3);
    font-size: 0.4em;
}

.stat-row strong {
    color: var(--accent-primary);
    display: inline-block;
    width: 180px;
}

.stats-link {
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.stats-link:hover {
    color: var(--accent-secondary) !important;
}

/* HAMBURGER */

.mobile-menu-button {
    position: fixed;
    top: 1rem;
    right: 1rem; /* ← ИЗМЕНИТЬ НА right */
    z-index: 100;
}

.hamburger-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hamburger-button span {
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: 0.3s;
}

/* MODAL */
.contact-modal {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 2em;
    padding: 3rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.modal-content {
    text-align: center;
    color: var(--text-primary);
    width: 100%;
}

.modal-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.contact-modal h3 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.contact-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 2rem;
    word-break: break-all;
}

.modal-copy-btn {
    background: var(--button-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2em;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-copy-btn:hover {
    transform: scale(1.05);
}

.modal-close {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 2rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
}

.reveal.contact-modal {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: 90%;
    max-width: 500px;
}

/* SLICK SLIDER */
.slick-prev,
.slick-next {
    width: 40px;
    height: 40px;
    z-index: 10;
}

.slick-prev {
    left: -50px !important;
}

.slick-next {
    right: -50px !important;
}

/* FONTS */
@font-face {
    font-family: 'Farabee';
    src: url('ofont.ru_Farabee.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Blogger Sans';
    src: url('ofont.ru_Blogger Sans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.page-section h1 {
    color: var(--text-primary);
    font-family: 'Farabee', sans-serif;
    margin-left: 0.9em;
    text-transform: uppercase;
}

.page-section h2 {
    color: var(--accent-primary);
    font-family: 'Blogger Sans', sans-serif;
    margin: 0 1em;
    width: 100%;
    text-align: center;
}

.page-section h3 {
    color: var(--accent-primary);
    font-family: 'Blogger Sans', sans-serif;
}

.text-block {
    color: var(--accent-primary);
}

/* THEME INDICATOR ON PHOTO */
.oval-photo::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] .oval-photo::after {
    background: #000;
    border: 2px solid #fff;
}

[data-theme="light"] .oval-photo::after {
    background: #fff;
    border: 2px solid #000;
}

/* MEDIA QUERIES */
@media screen and (max-width: 39.9375em) {
    .section-content {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
        clear: both;
    }

    .content-block {
        margin: 0 auto;
    }

    .mobile-header {
        display: block;
    }

    .page-section {
        padding: 2rem 0;
    }

    .exam-grid,
    .olimp-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .grid-icon-exam,
    .grid-icon-olimp {
        margin: 1rem 0;
    }

    .exam-image,
    .olimp-image {
        position: static;
        width: 60%;
        margin: 1rem auto;
        display: block;
    }

    .pricing-left {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .pricing-right {
        display: none;
    }

    .pricing-section::after {
        content: '';
        display: block;
        background: url('img/leonardo.png') center bottom no-repeat;
        background-size: contain;
        height: 300px;
        width: 100%;
        position: relative;
        z-index: 1;
        margin-top: 2rem;
    }

    .pricing-card {
        margin-bottom: 0.8rem;
        transform: scale(0.75);
        transform-origin: top center;
    }

    .pricing-header {
        padding: 0.6rem 0.8rem;
    }

    .pricing-header h3 {
        font-size: 1em;
    }

    .pricing-body {
        padding: 0.8rem;
    }

    .price-item {
        margin-bottom: 0.8rem;
        font-size: 0.85em;
        padding-left: 3em;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-image {
        order: 2;
        margin-top: 2rem;
    }

    .contact-form {
        order: 1;
    }

    .contact-buttons {
        justify-content: center;
    }

    .contact-btn {
        flex: 1;
        min-width: 120px;
    }

    .slick-prev {
        left: 10px !important;
    }

    .slick-next {
        right: 10px !important;
    }
}

@media screen and (max-width: 63.9375em) and (min-width: 40em) {
    .pricing-left {
        max-width: 66.666%;
        padding-right: 0;
    }

    .pricing-right {
        width: 33.333%;
    }

    .slick-prev {
        left: -20px !important;
    }

    .slick-next {
        right: -20px !important;
    }
}

/* Add this JavaScript to your existing script section */
/*
// Theme switching by clicking on oval-photo
document.querySelectorAll('.oval-photo').forEach(photo => {
    photo.addEventListener('click', function() {
        const currentTheme = document.documentElement.getAttribute('data-theme');
        const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
        document.documentElement.setAttribute('data-theme', newTheme);
        localStorage.setItem('theme', newTheme);
    });
});

// Load saved theme
const savedTheme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', savedTheme);
*/