/* ============================================
   DESIGN TOKENS & VARIABLES (Cyberpunk Premium)
   ============================================ */
:root {
    /* Colors */
    --bg-dark: #050505;
    --bg-darker: #020202;
    --bg-card: rgba(15, 15, 20, 0.4);

    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --text-muted: #6b6b78;

    /* Accents (Cyberpunk / Neon theme) */
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.3);

    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.3);

    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.3);

    /* Borders */
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Shadows & Glassmorphism */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --shadow-neon-emerald: 0 0 20px var(--accent-emerald-glow);
    --shadow-neon-purple: 0 0 20px var(--accent-purple-glow);
    --shadow-neon-blue: 0 0 20px var(--accent-blue-glow);

    --blur: blur(16px);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* ============================================
   LIGHT THEME VARIABLES
   ============================================ */
body.light-theme {
    /* Меняем фон на чуть более холодный белый/серебристый, чтобы карточки выделялись */
    --bg-dark: #f1f5f9;
    --bg-darker: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Яркие, но мягкие цвета для свечений на светлом фоне */
    --accent-emerald: #10b981; 
    --accent-emerald-glow: rgba(16, 185, 129, 0.35);

    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.35);

    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.35);

    /* Границы для глассморфизма (делаем их белыми и более заметными) */
    --border-light: rgba(255, 255, 255, 0.8);
    --border-hover: rgba(16, 185, 129, 0.5);

    /* Тени для карточек с цветным отливом */
    --shadow-glass: 0 10px 40px -10px rgba(16, 185, 129, 0.15);
}

/* Specific Light Theme Overrides */

/* Усиливаем "неон" на светлом фоне - делаем круги более плотными и цветными */
body.light-theme .glow-emerald {
    background: #34d399; /* более яркий мятный */
    opacity: 0.45;
    filter: blur(80px); /* чуть меньше размытие, чтобы цвет концентрировался */
}

body.light-theme .glow-purple {
    background: #a78bfa; /* лавандовый */
    opacity: 0.45;
    filter: blur(80px);
}

/* Карточки глассморфизм */
body.light-theme .glass-panel {
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 15px 35px -5px rgba(15, 23, 42, 0.05), /* мягкая обычная тень */
        0 0 0 1px inset rgba(255, 255, 255, 0.5), /* внутренний блеск */
        0 10px 40px -10px var(--accent-emerald-glow); /* неоновое свечение под карточкой */
    backdrop-filter: blur(20px);
}

body.light-theme .glass-panel:hover {
    box-shadow: 
        0 20px 40px -5px rgba(15, 23, 42, 0.08),
        0 0 0 1px inset rgba(255, 255, 255, 0.8),
        0 15px 50px -10px var(--accent-emerald-glow); 
    border-color: rgba(255, 255, 255, 1);
}

body.light-theme .glass-panel::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 100%);
}

body.light-theme .bg-grid {
    background-image:
        linear-gradient(to right, rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(139, 92, 246, 0.05) 1px, transparent 1px); /* сетка слегка цветная */
}

/* Летающие прозрачные фигуры */
body.light-theme .shape {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

body.light-theme .header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Плашки около аватара */
body.light-theme .floating-badge {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 1);
    color: var(--text-primary);
}

/* ============================================
   CONVERSION BOOSTER STYLES
   ============================================ */

.header-phone-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition-fast);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.header-phone-link i {
    color: var(--accent-emerald);
    font-size: 1.2rem;
}

.header-phone-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-emerald);
}

@media (max-width: 992px) {
    .header-phone-link span {
        display: none; /* Прячем текст на планшетах, оставляем иконку */
    }
    .header-phone-link {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .header-phone-link {
        display: none; /* На мобилках прячем из шапки, т.к. там есть бургер и кнопка в Hero */
    }
    .header-actions .btn.nav-btn {
        display: none; /* Прячем кнопку в шапке на маленьких экранах */
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
/* Тени кнопок */
body.light-theme .btn-primary {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}
body.light-theme .btn-primary:hover {
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
}

/* Исправление контрастности для кнопок Outline и Glass в светлой теме */
body.light-theme .btn-outline {
    color: var(--text-primary);
    border-color: rgba(15, 23, 42, 0.2);
}
body.light-theme .btn-outline:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.4);
}

body.light-theme .btn-glass {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
body.light-theme .btn-glass:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.3);
}

body.light-theme .badge-1 { color: var(--accent-emerald); }
body.light-theme .badge-2 { color: var(--accent-purple); }
body.light-theme .badge-3 { color: var(--accent-blue); }

/* Подсветка за аватаром */
body.light-theme .avatar-container {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.1) 100%);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

body.light-theme .portfolio-image {
    mix-blend-mode: multiply;
    filter: drop-shadow(0 20px 30px rgba(16, 185, 129, 0.15));
}

body.light-theme .hero-avatar {
    mix-blend-mode: multiply;
    filter: drop-shadow(0 10px 20px rgba(139, 92, 246, 0.1));
}

body.light-theme .icon-wrap,
body.light-theme .social-link,
body.light-theme .tag {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light-theme .badge {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
    color: var(--text-primary);
}

body.light-theme .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1);
}

body.light-theme .step-icon {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .step:nth-child(2) .step-icon {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

body.light-theme .step:nth-child(4) .step-icon {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

/* Изменяем цвет подложки под карточками с ценами */
body.light-theme .pricing-card.popular {
    box-shadow: 
        0 15px 40px -5px rgba(139, 92, 246, 0.2), 
        inset 0 0 20px rgba(255, 255, 255, 0.8);
}

body.light-theme .pricing-card:not(.popular):hover {
    box-shadow: 
        0 15px 40px -5px rgba(16, 185, 129, 0.2), 
        inset 0 0 20px rgba(255, 255, 255, 0.8);
}


/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Selection */
::selection {
    background: var(--accent-emerald);
    color: var(--bg-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-emerald);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-text.emerald {
    background-image: linear-gradient(135deg, #34d399, #059669);
}

.gradient-text.purple {
    background-image: linear-gradient(135deg, #a78bfa, #6d28d9);
}

/* ============================================
   BACKGROUND EFFECTS (Cyberpunk Glows)
   ============================================ */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.15;
    pointer-events: none;
}

.glow-emerald {
    top: -100px;
    left: -200px;
    background: var(--accent-emerald);
    animation: drift 20s infinite alternate ease-in-out;
}

.glow-purple {
    top: 40%;
    right: -200px;
    background: var(--accent-purple);
    animation: drift 25s infinite alternate-reverse ease-in-out;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    /* Фейд сетки чтобы она исчезала к низу */
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: 20%;
    left: -100px;
    animation: drift 25s infinite alternate ease-in-out;
}

.shape-2 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    right: 5%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: drift 15s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(100px, 50px);
    }
}

/* ============================================
   LAYOUT & UTILITIES
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section-padding {
    padding: 8rem 0;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    transition: var(--transition-smooth);
}

.glass-panel::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    z-index: -1;
    pointer-events: none;
}

.full-width {
    width: 100%;
    text-align: center;
}

.mt-sm {
    margin-top: 1rem;
}

/* Reveal Animations Classes (Triggered by JS) */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.active.reveal-up,
.active.reveal-left,
.active.reveal-right {
    opacity: 1;
    transform: translate(0);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    color: var(--bg-darker);
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-icon {
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 50%;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(2, 2, 2, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1.25rem;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: var(--transition-smooth);
}

.dark-theme .theme-toggle .sun-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.dark-theme .theme-toggle .moon-icon {
    opacity: 0;
    transform: translateY(-20px) rotate(90deg);
}

.light-theme .theme-toggle .sun-icon {
    opacity: 0;
    transform: translateY(20px) rotate(-90deg);
}

.light-theme .theme-toggle .moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 250px;
    height: auto;
    object-fit: contain;
}

.logo-accent {
    color: var(--accent-emerald);
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--accent-emerald);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 3rem;
    /* Компенсация fixed header */
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.4rem, 4.2vw, 3.8rem);
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 95%;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-tech {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-tech>span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.tech-icons {
    display: flex;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.tech-icons i {
    transition: var(--transition-fast);
}

.tech-icons i:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Hero Avatar Visuals */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    padding: 1rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.hero-avatar {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    display: block;
    mix-blend-mode: lighten;
}

/* Floating Badges near avatar */
.floating-badge {
    position: absolute;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-glass);
    animation: float 6s ease-in-out infinite;
}

.badge-1 {
    top: 10%;
    left: -10%;
    color: var(--accent-emerald);
}

.badge-2 {
    bottom: 15%;
    right: -5%;
    color: var(--accent-purple);
    animation-delay: -3s;
}

.badge-3 {
    top: 50%;
    right: -10%;
    color: var(--accent-blue);
    animation-delay: -1.5s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    display: inline-block;
    color: var(--accent-emerald);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.emerald-bg {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.purple-bg {
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.blue-bg {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.service-features i {
    color: var(--accent-emerald);
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.portfolio-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

/* На нечетных карточках меняем порядок (изображение справа) */
.portfolio-card:nth-child(even) {
    grid-template-columns: 0.8fr 1.2fr;
}

.portfolio-card:nth-child(even) .portfolio-image-container {
    order: 2;
}

.portfolio-card:nth-child(even) .portfolio-info {
    order: 1;
}

.portfolio-image-container {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    /* Убираем рамку для 3d мокапов так как у них прозрачный фон */
    display: flex;
    justify-content: center;
    align-items: center;
}

.portfolio-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.6s ease;
    mix-blend-mode: lighten;
    /* Важно для черного фона картинок */
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
}

.portfolio-image-container:hover .portfolio-image {
    transform: scale(1.03);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.portfolio-image-container:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    padding: 3rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.portfolio-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.portfolio-desc {
    color: var(--text-secondary);
}

/* ============================================
   WORKFLOW SECTION
   ============================================ */
.process-steps {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-emerald) 0%, var(--accent-purple) 100%);
    opacity: 0.3;
}

.step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.step-icon {
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.step:nth-child(2) .step-icon {
    color: var(--accent-emerald);
    border-color: var(--accent-emerald-glow);
}

.step:nth-child(3) .step-icon {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.step:nth-child(4) .step-icon {
    color: var(--accent-purple);
    border-color: var(--accent-purple-glow);
}

.step-content {
    padding-top: 0.5rem;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
}

/* ============================================
   PRICING SECTION
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 850px;
    margin: 0 auto;
}

.pricing-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
}

.pricing-card {
    padding: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 30px;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.pricing-card.popular {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--shadow-neon-purple), inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.pricing-card:not(.popular):hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: var(--shadow-neon-emerald);
}

.pricing-header {
    margin-bottom: 2rem;
    text-align: center;
}

.icon-wrap {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.emerald-shadow {
    color: var(--accent-emerald);
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.1);
}

.purple-shadow {
    color: var(--accent-purple);
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.blue-shadow {
    color: var(--accent-blue);
    box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.pricing-header h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.price-amount {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.price-from {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.price-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-features {
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-features i {
    color: var(--accent-emerald);
    margin-top: 3px;
}

/* ============================================
   CTA SECTION & WIDGET
   ============================================ */
.cta-box {
    text-align: center;
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.cta-box h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 1.5rem;
}

.cta-box p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.125rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 4rem 0 2rem;
    background: var(--bg-darker);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.social-link:hover {
    background: var(--accent-emerald);
    color: var(--bg-dark);
    border-color: transparent;
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-tech-note {
    font-family: monospace;
}

/* ============================================
   TERMINAL MOCKUP (About Me Section)
   ============================================ */
.terminal-mockup {
    width: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
    background: rgba(10, 10, 15, 0.75);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: var(--transition-smooth);
}

.terminal-mockup:hover {
    border-color: var(--accent-emerald-glow);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

body.light-theme .terminal-mockup {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .terminal-mockup:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.1);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-light);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.light-theme .terminal-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.terminal-buttons {
    display: flex;
    gap: 6px;
}

.terminal-buttons span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.btn-red { background-color: #ff5f56; }
.btn-yellow { background-color: #ffbd2e; }
.btn-green { background-color: #27c93f; }

.terminal-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.terminal-body {
    padding: 1.5rem;
    color: #e2e8f0;
    overflow-x: auto;
}

body.light-theme .terminal-body {
    color: #334155;
}

.terminal-line {
    margin-bottom: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cmd-prompt {
    color: var(--accent-emerald);
    font-weight: 600;
}

.cmd-input {
    color: var(--text-primary);
}

.terminal-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: inherit;
}

.terminal-output {
    margin: 0.6rem 0;
}

.terminal-output .key {
    color: var(--accent-purple);
    font-weight: 500;
}

.terminal-output .val {
    color: var(--accent-emerald);
}

.terminal-output .str {
    color: var(--accent-emerald);
}

.terminal-output .punct {
    color: var(--text-muted);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--accent-emerald);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {
    from, to { background-color: transparent }
    50% { background-color: var(--accent-emerald) }
}

/* ============================================
   TELEGRAM-STYLE TESTIMONIALS
   ============================================ */
.tg-review-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
}

.tg-review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tg-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
    user-select: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gradient-avatar-1 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.gradient-avatar-2 {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.gradient-avatar-3 {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.tg-user-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tg-user-name {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.95rem;
}

.tg-verified-badge {
    color: #3897f0;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
}

.tg-user-handle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tg-platform-icon {
    color: #24A1DE;
    font-size: 1.25rem;
    opacity: 0.8;
}

.tg-message-bubble {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px 16px 16px 16px;
    padding: 1rem;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.light-theme .tg-message-bubble {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tg-message-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.tg-message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.tg-message-status {
    color: var(--accent-emerald);
    display: inline-flex;
    align-items: center;
}

/* ============================================
   FOOTER LEGAL LINKS
   ============================================ */
.footer-legal {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.legal-link:hover {
    color: var(--accent-emerald);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }
    .footer-legal {
        justify-content: center;
    }
}

/* ============================================
   PORTFOLIO CASE STUDY REFINEMENTS
   ============================================ */
.case-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.case-features h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.case-features ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.case-features li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
    text-align: left;
}

.case-features li i {
    color: var(--accent-emerald);
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.case-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.stack-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 0.25rem;
}

.stack-tech {
    font-size: 0.8rem;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.12);
    font-weight: 500;
}

body.light-theme .stack-tech {
    background: rgba(16, 185, 129, 0.08);
}

.case-action-btn {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    width: 100%;
}

/* ============================================
   RESPONSIVE (MEDIA QUERIES)
   ============================================ */
@media (max-width: 1024px) {
    .pricing-grid {
        gap: 1.5rem;
    }

    .pricing-grid.three-cols {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        padding: 0 1rem;
    }

    .portfolio-card,
    .portfolio-card:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-card:nth-child(even) .portfolio-image-container {
        order: 0;
    }

    .portfolio-card:nth-child(even) .portfolio-info {
        order: 1;
    }
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-tech {
        justify-content: center;
    }

    .avatar-container {
        max-width: 350px;
        margin: 0 auto;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 768px) {

    .nav-btn {
        display: none;
    }

    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 15, 0.9);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 3rem 2rem 2rem;
        gap: 1.5rem;
        align-items: center;
        border-bottom: 1px solid var(--border-light);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
        z-index: 99;
    }

    body.light-theme .nav-list {
        background: rgba(255, 255, 255, 0.98) !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    }

    .nav-list.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .header-container {
        position: relative;
        justify-content: center;
        width: 100%;
        display: flex;
        align-items: center;
    }

    .header-actions {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        padding: 0 1.5rem;
        width: 100%;
        transform: translateY(-50%);
        justify-content: space-between;
        pointer-events: none; /* Пропускаем клики сквозь контейнер */
        z-index: 11;
    }

    .theme-toggle, .mobile-menu-toggle {
        pointer-events: auto; /* Включаем клики обратно для самих кнопок */
    }

    .logo {
        position: relative;
        left: auto;
        transform: none;
        gap: 0.5rem;
        z-index: 10;
        margin: 0 auto;
    }

    .header-logo {
        width: 230px;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 100;
    }

    .section-padding {
        padding: 5rem 0;
    }

    .hero {
        padding-top: 8rem; /* Отступ чтобы шапка не перекрывала контент */
    }

    .process-line {
        left: 1.5rem;
    }

    .step-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1rem;
    }

    .cta-box {
        padding: 3rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .portfolio-grid {
        gap: 2.5rem;
    }

    .portfolio-info {
        padding: 1.5rem;
    }

    .portfolio-title {
        font-size: 1.5rem;
    }

    .about-keypoints {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .case-actions-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .btn-large {
        width: 100%;
    }

    .header-logo {
        width: 160px;
    }

    .floating-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .badge-1 {
        left: -5%;
        top: 5%;
    }

    .badge-2 {
        right: 0;
        bottom: 5%;
    }

    .badge-3 {
        right: 0;
        top: 40%;
    }
}

/* ============================================
   MODAL & FORMS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 3rem 2.5rem;
    z-index: 1001;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition-smooth);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent-emerald);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 2px var(--accent-emerald-glow);
    background: rgba(0, 0, 0, 0.4);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Light theme overrides for Form */
body.light-theme .form-input {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

body.light-theme .form-input:focus {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--accent-emerald);
}

body.light-theme .modal-overlay {
    background: rgba(255, 255, 255, 0.4);
}

/* Success Message State */
.form-success-message {
    text-align: center;
    padding: 2rem 0;
}

.form-success-message i {
    font-size: 4rem;
    color: var(--accent-emerald);
    margin-bottom: 1rem;
    display: inline-block;
}

.form-success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-success-message p {
    color: var(--text-secondary);
}

/* Modal Mobile Fixes */
@media (max-width: 768px) {
    .modal {
        padding: 1rem;
        align-items: center; 
    }
    
    .modal-content {
        padding: 2rem 1.5rem !important;
        max-height: 85vh;
        overflow-y: auto;
        margin: 0 auto;
    }
    
    .modal-title {
        font-size: 1.4rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-input {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
}

/* Interactive Quiz styles */
.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

body.light-theme .quiz-progress-bar {
    background: rgba(0, 0, 0, 0.05);
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-emerald), var(--accent-purple));
    transition: width 0.3s ease;
}

.quiz-step-indicator {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    text-align: left;
}

.quiz-option-card {
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
    background: rgba(255, 255, 255, 0.01);
}

.quiz-option-card label {
    font-weight: 500;
    color: var(--text-secondary);
}

.quiz-option-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.quiz-option-card.selected {
    border-color: var(--accent-emerald) !important;
    background: rgba(16, 185, 129, 0.05) !important;
    box-shadow: var(--shadow-neon-emerald);
}

.quiz-option-card.selected label {
    color: var(--text-primary);
}

/* Light theme overrides for Quiz */
body.light-theme .quiz-option-card {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .quiz-option-card:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .quiz-option-card.selected {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: var(--accent-emerald) !important;
}

/* Custom Toast Notifications */
.custom-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.custom-toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.custom-toast-error {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05) !important;
}
.custom-toast-error i {
    color: #ef4444;
    font-size: 1.25rem;
}

.custom-toast-success {
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05) !important;
}
.custom-toast-success i {
    color: var(--accent-emerald);
    font-size: 1.25rem;
}

body.light-theme .custom-toast {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ABOUT ME SECTION (Обо мне)
   ============================================ */
.about {
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: center;
}

.about-image-container {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-glass);
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.95) contrast(1.05);
}

body.light-theme .about-image-container::after {
    background: linear-gradient(to bottom, transparent 60%, rgba(255, 255, 255, 0.6) 100%);
}

.about-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(5, 5, 5, 0.6) 100%);
    pointer-events: none;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.about-accent-text {
    font-size: 1.1rem;
    color: var(--accent-emerald);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-keypoints {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.keypoint {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.keypoint-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.keypoint-text h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.keypoint-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0 !important;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image-container {
        max-width: 450px;
        margin: 0 auto;
    }
}

/* ============================================
   FAQ SECTION (Вопрос-Ответ)
   ============================================ */
.faq-grid {
    max-width: 800px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent-emerald);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.faq-item.active {
    border-color: var(--accent-emerald-glow);
    background: rgba(255, 255, 255, 0.01);
}

.faq-item.active .faq-question {
    color: var(--accent-emerald);
}

.faq-item.active .faq-answer {
    padding: 0 2rem 1.5rem;
}

.faq-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent-emerald);
}

/* ============================================
   DETAILED CASE STUDY PAGES
   ============================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.breadcrumbs a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-emerald);
}

.breadcrumbs i {
    font-size: 1rem;
    color: var(--text-muted);
}

.case-hero {
    padding-top: 8rem;
    padding-bottom: 3rem;
    position: relative;
}

.case-container {
    max-width: 1000px;
    margin: 0 auto;
}

.case-header {
    margin-bottom: 3rem;
}

.case-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.case-main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .case-main-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.case-block {
    padding: 2.5rem;
    border-radius: 1.5rem;
    height: 100%;
}

.case-block-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
}

.case-block-title i {
    color: var(--accent-emerald);
}

.case-text-block p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.025rem;
}

.case-text-block p:last-child {
    margin-bottom: 0;
}

.case-features-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.case-feature-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.case-feature-item i {
    color: var(--accent-emerald);
    font-size: 1.3rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.case-feature-text h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.case-feature-text p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.case-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.case-stack-item {
    padding: 1rem;
    text-align: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.case-stack-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-emerald);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

body.light-theme .case-stack-item:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.05);
}

.case-results-card {
    padding: 2.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 1px solid rgba(16, 185, 129, 0.15);
    margin-bottom: 4rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.result-stat {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-emerald);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.result-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 100px);
    z-index: 9998;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-light);
    width: calc(100% - 3rem);
    max-width: 750px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.cookie-banner.active {
    transform: translate(-50%, 0);
    opacity: 1;
}

.cookie-banner.fade-out {
    transform: translate(-50%, 100px);
    opacity: 0;
}

.cookie-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.5;
}

.cookie-icon {
    font-size: 1.5rem;
    color: var(--accent-emerald);
    flex-shrink: 0;
}

.cookie-link {
    color: var(--accent-emerald);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-link:hover {
    color: var(--accent-emerald-glow);
}

.cookie-btn {
    flex-shrink: 0;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

body.light-theme .cookie-banner {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 1rem;
        padding: 1.25rem 1.5rem;
        width: calc(100% - 2rem);
    }
    
    .cookie-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}