/* --- Global & Variables --- */
:root {
    --bg-deep: #0d0221;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --text-main: #e0e0e0;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --glow: 0 0 15px rgba(255, 0, 255, 0.6);
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, .logo__text {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* --- Synthwave Grid Background --- */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 0%, rgba(255, 0, 255, 0.1) 50%, transparent 100%);
    background-size: 100% 4px;
    z-index: -2;
}

.grid-background::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--neon-pink) 1px, transparent 1px),
        linear-gradient(90deg, var(--neon-pink) 1px, transparent 1px);
    background-size: 60px 60px;
    perspective: 500px;
    transform: rotateX(60deg) translateY(-20%);
    opacity: 0.15;
    z-index: -1;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(13, 2, 33, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 0, 255, 0.3);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
}

.logo__text {
    font-size: 1.2rem;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--glow);
}

.nav__list {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav__link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* --- Buttons --- */
.btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn--neon {
    color: var(--neon-pink);
    border-color: var(--neon-pink);
    box-shadow: inset 0 0 5px var(--neon-pink), 0 0 5px var(--neon-pink);
}

.btn--neon:hover {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 20px var(--neon-pink);
    transform: scale(1.05);
}

/* --- Footer --- */
.footer {
    padding: 100px 0 40px;
    background: #05010a;
    border-top: 1px solid var(--neon-blue);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer__title {
    margin-bottom: 25px;
    color: var(--neon-blue);
    font-size: 1.1rem;
}

.footer__links {
    list-style: none;
}

.footer__links li { margin-bottom: 12px; }
.footer__links a { 
    text-decoration: none; 
    color: var(--text-main); 
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer__links a:hover { color: var(--neon-pink); }

.footer__contact {
    list-style: none;
    font-size: 0.9rem;
}

.footer__contact li { margin-bottom: 15px; }
.footer__contact a { color: var(--text-main); text-decoration: none; }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* --- Mobile --- */
.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 30px;
    height: 2px;
    background: var(--neon-pink);
    box-shadow: var(--glow);
}

@media (max-width: 1024px) {
    .header__nav { display: none; }
    .burger { display: flex; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .footer__grid { grid-template-columns: 1fr; }
}
/* --- Typography & Elements --- */
.section-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 3rem;
    line-height: 1;
    color: white;
}

.text-glow {
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink);
}

.text-cyan {
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--neon-blue);
}

.text-highlight {
    background: var(--neon-pink);
    color: white;
    padding: 2px 8px;
    font-weight: 700;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero__badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 0, 255, 0.2);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    margin-bottom: 2rem;
}

.hero__title {
    font-size: clamp(3rem, 12vw, 7rem);
    line-height: 0.9;
    margin-bottom: 2rem;
}

.hero__lead {
    max-width: 600px;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-main);
}

.hero__cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn--lg {
    padding: 18px 45px;
    font-size: 1rem;
}

.btn--outline {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.hero__decor {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 5vw;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.hero__decor--1 { top: 20%; right: 10%; color: var(--neon-blue); transform: rotate(15deg); }
.hero__decor--2 { bottom: 20%; left: 5%; color: var(--neon-pink); transform: rotate(-10deg); }

/* --- Courses Section --- */
.courses {
    padding: 100px 0;
}

.courses__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.course-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
}

.course-card--pink::before { background: var(--neon-pink); box-shadow: 0 0 15px var(--neon-pink); }
.course-card--cyan::before { background: var(--neon-blue); box-shadow: 0 0 15px var(--neon-blue); }
.course-card--purple::before { background: #bc13fe; box-shadow: 0 0 15px #bc13fe; }

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.07);
}

.course-card__icon { margin-bottom: 2rem; color: white; }
.course-card__title { margin-bottom: 1.5rem; font-size: 1.5rem; }
.course-card__footer {
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-card__price { font-weight: 700; font-size: 0.8rem; opacity: 0.6; text-transform: uppercase; }
.course-card__link { color: white; font-size: 1.5rem; text-decoration: none; }

/* --- Methodology Section --- */
.method {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-deep) 0%, #1a0633 100%);
}

.method__wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.method__desc { font-size: 1.3rem; margin-bottom: 2.5rem; }
.method__list {
    list-style: none;
    margin-bottom: 3rem;
}

.method__list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.method__list i { color: var(--neon-blue); }

.method__visual {
    display: flex;
    justify-content: center;
}

.method__box {
    width: 300px;
    height: 300px;
    border: 2px solid var(--neon-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-shadow: 0 0 30px var(--neon-pink);
    transform: rotate(5deg);
}

.method__box-text { font-family: 'Orbitron', sans-serif; font-weight: 800; }

/* --- Mobile Responsive Fixes --- */
@media (max-width: 1024px) {
    .courses__grid { grid-template-columns: 1fr 1fr; }
    .method__wrapper { grid-template-columns: 1fr; gap: 50px; text-align: center; }
    .method__list li { justify-content: center; }
}

@media (max-width: 768px) {
    .hero { text-align: center; }
    .hero__cta { justify-content: center; }
    .courses__grid { grid-template-columns: 1fr; }
    .hero__decor { display: none; }
    .section-title { font-size: 2.5rem; }
    .method__box { width: 100%; height: 200px; transform: rotate(0); }
}

/* --- Blog & Reviews --- */
.text-right { text-align: right; }

.blog { padding: 100px 0; }
.blog__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.blog__card {
    padding: 40px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid var(--neon-blue);
    position: relative;
}
.blog__card--accent {
    background: rgba(255, 0, 255, 0.05);
    border-color: var(--neon-pink);
}
.blog__meta { font-family: 'Orbitron', sans-serif; font-size: 0.7rem; color: var(--neon-blue); margin-bottom: 1rem; }
.blog__card-title { margin-bottom: 1.5rem; font-size: 1.6rem; }
.blog__link { color: white; text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

.reviews { padding: 100px 0; background: rgba(0,0,0,0.3); }
.reviews__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 50px; }
.review-box {
    padding: 30px;
    border-left: 4px solid var(--neon-pink);
    background: rgba(255, 255, 255, 0.02);
}
.review-box__text { font-style: italic; font-size: 1.1rem; margin-bottom: 1.5rem; }
.review-box__author { font-family: 'Orbitron', sans-serif; color: var(--neon-blue); font-size: 0.8rem; }

/* --- Contact Form (Neo-Vapor) --- */
.contact { padding: 120px 0; position: relative; }
.contact__container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

.contact__lead { font-size: 1.4rem; margin: 2rem 0; }
.contact__status { display: flex; align-items: center; gap: 10px; font-family: 'Orbitron', sans-serif; font-size: 0.8rem; color: var(--neon-blue); }
.status-pulse { width: 10px; height: 10px; background: var(--neon-blue); border-radius: 50%; animation: pulse 2s infinite; }

.contact__form-wrapper {
    background: rgba(13, 2, 33, 0.9);
    border: 1px solid var(--neon-pink);
    padding: 50px;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
}

.form { display: flex; flex-direction: column; gap: 20px; }
.form__label { font-family: 'Orbitron', sans-serif; font-size: 0.7rem; color: var(--neon-pink); }
.form__input {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}
.form__input:focus { outline: none; border-color: var(--neon-blue); }

/* Custom Checkbox */
.custom-check { display: flex; align-items: center; gap: 15px; cursor: pointer; }
.custom-check input { display: none; }
.custom-check__box { width: 22px; height: 22px; border: 2px solid var(--neon-blue); position: relative; }
.custom-check input:checked + .custom-check__box::after {
    content: ''; position: absolute; top: 4px; left: 4px; width: 10px; height: 10px; background: var(--neon-pink); box-shadow: 0 0 10px var(--neon-pink);
}
.custom-check__text { font-size: 0.85rem; }
.custom-check--small { opacity: 0.7; }

.btn--full { width: 100%; margin-top: 10px; }
.form__error { color: #ff4b4b; font-size: 0.7rem; display: none; margin-top: 5px; }
.form__message { 
    display: none; padding: 20px; background: rgba(0, 255, 255, 0.1); border: 1px solid var(--neon-blue); 
    color: var(--neon-blue); font-family: 'Orbitron', sans-serif; font-size: 0.8rem; margin-top: 20px;
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    .contact__container, .blog__grid, .reviews__grid { grid-template-columns: 1fr; gap: 40px; }
    .contact__form-wrapper { padding: 30px; }
}

@media (max-width: 480px) {
    .section-title { font-size: 2rem; }
    .contact__lead { font-size: 1.1rem; }
}

/* --- Cookie Pop-up (Vaporwave Style) --- */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(13, 2, 33, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: none; /* Управляется через JS */
    border: 1px solid var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.cookie-popup--active {
    display: block;
    animation: neonFadeIn 0.5s ease;
}

.cookie-popup__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-popup__text {
    font-size: 0.85rem;
    color: var(--text-main);
}

.cookie-popup__link {
    color: var(--neon-blue);
    text-decoration: underline;
}

.btn--sm {
    padding: 8px 20px;
    font-size: 0.7rem;
}

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

/* --- Стили для текстовых страниц (privacy.php и др.) --- */
.pages {
    padding: 150px 0 80px;
    background: linear-gradient(180deg, #0d0221 0%, #1a0633 100%);
}

.pages h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--neon-pink);
    text-shadow: 0 0 15px var(--neon-pink);
    margin-bottom: 40px;
}

.pages h2 {
    font-size: 1.5rem;
    color: var(--neon-blue);
    margin: 30px 0 15px;
    text-transform: uppercase;
}

.pages p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-main);
    opacity: 0.9;
    line-height: 1.8;
}

.pages ul {
    margin-bottom: 30px;
    list-style: none;
}

.pages li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    color: var(--text-main);
}

.pages li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--neon-pink);
    font-weight: bold;
}

.pages strong {
    color: var(--neon-blue);
}

.pages a {
    color: var(--neon-pink);
    text-decoration: none;
}

.pages a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}
/* --- КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ШИРИНЫ --- */

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Запрет горизонтального скролла */
    -webkit-text-size-adjust: 100%; /* Исправление масштабирования шрифта на iOS */
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem; /* Уменьшенные отступы для мобилок */
    box-sizing: border-box;
}

/* --- Hero: Адаптация заголовка --- */
.hero__title {
    /* Минимум 2rem, чтобы не вылетало за края */
    font-size: clamp(1.8rem, 8vw, 7rem); 
    word-wrap: break-word;
    hyphens: auto;
}

.hero__cta {
    flex-direction: column; /* Кнопки друг под другом на узких экранах */
    width: 100%;
}

@media (min-width: 480px) {
    .hero__cta {
        flex-direction: row;
        justify-content: center;
    }
}

/* --- Сетка курсов (Cards) --- */
.courses__grid {
    display: grid;
    grid-template-columns: 1fr; /* По умолчанию в одну колонку */
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .courses__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .courses__grid { grid-template-columns: repeat(3, 1fr); }
}

.course-card {
    min-width: 0; /* Важно: позволяет флекс/грид элементам сжиматься ниже контента */
    width: 100%;
    padding: 2rem 1.5rem;
}

/* --- CONTACT SECTION: ПЕРЕНОС ФОРМЫ НА НОВУЮ СТРОКУ --- */
.contact__container {
    display: flex;
    flex-direction: column; /* Текст сверху, форма снизу */
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .contact__container {
        flex-direction: row; /* Возврат в 2 колонки на десктопе */
        align-items: start;
    }
    
    .contact__info, .contact__form-wrapper {
        flex: 1;
    }
}

.contact__form-wrapper {
    width: 100%;
    padding: 1.5rem; /* Уменьшили отступы внутри формы для мобилок */
    box-sizing: border-box;
}

.form__input {
    width: 100%;
    max-width: 100%;
}

/* --- Чекбоксы и Капча (фикс ширины) --- */
.custom-check {
    display: flex;
    align-items: flex-start; /* Чтобы длинный текст не ломал выравнивание */
    gap: 12px;
}

.custom-check__text {
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word; /* Текст соглашения не вылетает */
}

/* --- Фоновая сетка: Фикс для Safari/iOS --- */
.grid-background::after {
    transform: rotateX(60deg) translateY(-10%); /* Чуть меньше смещение */
}

/* --- Footer --- */
@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer__col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* --- Cookie Popup: Адаптация --- */
@media (max-width: 600px) {
    .cookie-popup {
        padding: 1rem;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .cookie-popup__content {
        flex-direction: column;
        gap: 1rem;
    }
}