/* Color Palette - Softer tones for female audience + яркие акценты */
:root {
    --navy: #1a2332;
    --navy-dark: #0f1419;
    --milk-white: #faf9f6;
    --graphite: #2d3748;
    --gold: #d4af37;
    --gold-light: #e8d5a3;
    --gold-bright: #f0d96a;
    --gold-dark: #b8941f;
    --accent-gold: #d4af37;
    --text-dark: #1a2332;
    --text-light: #6b7280;
    --border-color: rgba(212, 175, 55, 0.15);
    --line-color: rgba(212, 175, 55, 0.25);
    --soft-pink: rgba(255, 245, 238, 0.3);
    --soft-gold: rgba(232, 213, 163, 0.1);
    /* Яркие акценты для теста */
    --accent-coral: #e8a598;
    --accent-lavender: #b8a9c9;
    --accent-mint: #9dd5c8;
    --accent-peach: #f5d0b8;
    --glow-gold: rgba(212, 175, 55, 0.5);
    --glow-bright: rgba(240, 217, 106, 0.6);
}

/* WordPress Compatible - Обёртка для работы внутри темы */
.custom-psychology-template,
body .custom-psychology-template,
#main .custom-psychology-template,
.entry-content .custom-psychology-template {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 300;
    color: var(--text-dark);
    background: linear-gradient(180deg, var(--milk-white) 0%, #f8f7f4 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset для контента внутри обёртки */
.custom-psychology-template * {
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Header - WordPress compatible */
.custom-psychology-template .header,
body .custom-psychology-template .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: rgba(250, 249, 246, 0.98) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color) !important;
    z-index: 9999 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.02) !important;
    margin: 0 !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-no-logo {
    justify-content: space-between;
}

.nav-no-logo .nav-burger-trigger {
    display: none;
}
@media (max-width: 968px) {
    .nav-no-logo .nav-container {
        justify-content: space-between;
        width: 100%;
    }
    .nav-no-logo .nav-burger-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        padding: 12px 20px;
        background: none;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        cursor: pointer;
        font-family: inherit;
        font-size: 0.95rem;
        color: var(--text-dark);
    }
    .nav-no-logo .nav-burger-label {
        white-space: nowrap;
        flex: 1;
        text-align: left;
    }
    .nav-no-logo .nav-burger {
        display: flex;
        flex-shrink: 0;
    }
}

/* Синий блок с логотипом — на страницах без hero (блог, оферта и т.д.) */
.page-logo-banner {
    background: var(--navy);
    padding: 60px 20px 50px;
    text-align: center;
    margin-top: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-logo-link {
    display: inline-block;
}

.page-logo-img {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(72%) sepia(45%) saturate(800%) hue-rotate(10deg) brightness(95%) contrast(91%);
    transition: filter 0.3s ease;
}

.page-logo-link:hover .page-logo-img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(50%) saturate(900%) hue-rotate(10deg) brightness(100%) contrast(91%);
}

@media (max-width: 768px) {
    .page-logo-banner {
        padding: 40px 15px 35px;
        margin-top: 60px;
    }
    .page-logo-img {
        max-width: 180px;
    }
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
    display: block;
    flex-shrink: 0;
    max-width: 180px;
}

/* Логотип: вырезан, золотой, на самом ярком фоне */
.logo {
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
}
.logo-img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.logo:hover {
    color: var(--gold-dark);
}

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
}
.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}
.nav-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-burger.active span:nth-child(2) {
    opacity: 0;
}
.nav-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--gold-dark);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hero Section - WordPress compatible */
.custom-psychology-template .hero,
body .custom-psychology-template .hero {
    min-height: 100vh !important;
    background-color: var(--navy) !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 80px !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 0 !important;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(232, 213, 163, 0.05) 50%, transparent 100%);
    pointer-events: none;
    animation: gentleGlow 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255, 245, 238, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

@keyframes gentleGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 40px;
    width: 100%;
}

/* Логотип в hero — цвет как у «Системная терапия души» и кнопки теста */
.hero-logo-link {
    display: block;
    text-align: center;
    margin-bottom: 40px;
}

.hero-logo-img,
.page-logo-img,
.cta-logo {
    background: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.hero-logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(72%) sepia(45%) saturate(800%) hue-rotate(10deg) brightness(95%) contrast(91%);
    transition: filter 0.3s ease;
}

.hero-logo-link:hover .hero-logo-img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(50%) saturate(900%) hue-rotate(10deg) brightness(100%) contrast(91%);
}

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

.hero-text {
    color: var(--milk-white);
}

.hero-name {
    font-size: 4rem;
    font-weight: 600;
    color: var(--milk-white);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    animation: fadeInLeft 1s ease-out 0.2s both;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gold-light);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
    animation: fadeInLeft 1s ease-out 0.4s both;
}

.hero-description {
    font-size: 1.15rem;
    font-weight: 300;
    color: rgba(250, 249, 246, 0.92);
    margin-bottom: 20px;
    line-height: 1.75;
    max-width: 520px;
}

.hero-cta-text {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gold-light);
    margin-bottom: 28px;
    line-height: 1.6;
    max-width: 500px;
}

.hero-diagnostic-btn {
    margin-top: 0;
    padding: 18px 36px;
    font-size: 1.05rem;
    box-shadow: 0 4px 24px rgba(212, 175, 55, 0.25);
    animation: fadeInLeft 1s ease-out 0.6s both;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.portrait-image {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.2);
    animation: fadeInUp 1s ease-out;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portrait-image:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 80px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
}

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

.btn-primary-large {
    padding: 18px 44px;
    font-size: 1.08rem;
    animation: btnPulse 2.5s ease-in-out infinite;
    box-shadow: 0 4px 20px var(--glow-gold);
}

.btn-primary-large:hover {
    animation: none;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 4px 20px var(--glow-gold);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 30px var(--glow-bright), 0 0 40px rgba(212, 175, 55, 0.2);
        transform: scale(1.02);
    }
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background-color: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    animation: fadeInLeft 1s ease-out 0.8s both;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gold);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background-color: var(--gold);
    color: var(--navy);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
}

/* Test Section */
.test-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--milk-white) 0%, #f8f7f4 50%, rgba(232, 213, 163, 0.08) 100%);
    position: relative;
    overflow: hidden;
}

.test-section::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(184, 169, 201, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: softPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.test-section .test-wrapper::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(157, 213, 200, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: softPulse 10s ease-in-out infinite 1s;
    pointer-events: none;
    z-index: -1;
}

@keyframes softPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.test-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.test-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.test-section-lead {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 560px;
    margin: -30px auto 50px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    border-radius: 2px;
    animation: titleLinePulse 2s ease-in-out infinite;
}

@keyframes titleLinePulse {
    0%, 100% { opacity: 0.9; box-shadow: 0 0 8px rgba(212, 175, 55, 0.3); }
    50% { opacity: 1; box-shadow: 0 0 15px rgba(212, 175, 55, 0.5); }
}

.test-container {
    min-height: 400px;
}

.test-intro {
    text-align: center;
    padding: 60px 40px;
    animation: fadeInUp 0.8s ease-out;
    background: linear-gradient(180deg, transparent 0%, rgba(232, 213, 163, 0.06) 100%);
    border-radius: 20px;
    border: 1px solid transparent;
}

.test-intro-text {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.test-questions {
    animation: fadeIn 0.5s ease;
}

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

.question-card {
    background: linear-gradient(135deg, var(--milk-white) 0%, rgba(255, 250, 245, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 60px 50px;
    margin-bottom: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 0 60px rgba(212, 175, 55, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out, cardGlow 4s ease-in-out infinite 0.6s;
}

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 0 60px rgba(212, 175, 55, 0.06); }
    50% { box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04), 0 0 80px rgba(212, 175, 55, 0.12); }
}

.question-card:hover {
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2), 0 0 50px rgba(212, 175, 55, 0.15);
    transform: translateY(-5px);
}

.question-title {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    margin-bottom: 40px;
    line-height: 1.4;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option {
    padding: 20px 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.option:nth-child(4n+1)::before { background: linear-gradient(90deg, rgba(232, 165, 152, 0.25), transparent); }
.option:nth-child(4n+2)::before { background: linear-gradient(90deg, rgba(184, 169, 201, 0.25), transparent); }
.option:nth-child(4n+3)::before { background: linear-gradient(90deg, rgba(157, 213, 200, 0.25), transparent); }
.option:nth-child(4n+4)::before { background: linear-gradient(90deg, rgba(245, 208, 184, 0.25), transparent); }

.option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    transition: width 0.4s ease;
    z-index: 0;
}

.option:hover::before,
.option.selected::before {
    width: 100%;
}

.option:hover {
    border-color: var(--gold);
    background-color: rgba(212, 175, 55, 0.06);
    transform: translateX(10px) scale(1.01);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
}

.option.selected {
    border-color: var(--gold);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(240, 217, 106, 0.08) 100%);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
    animation: optionSelectedPulse 2s ease-in-out infinite;
}

@keyframes optionSelectedPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
    }
    50% {
        box-shadow: 0 6px 28px rgba(212, 175, 55, 0.35), 0 0 30px rgba(212, 175, 55, 0.15);
    }
}

.option span {
    position: relative;
    z-index: 1;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: linear-gradient(90deg, var(--border-color), rgba(184, 169, 201, 0.2));
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold-light));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 10%;
    box-shadow: 0 0 12px var(--glow-gold);
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { box-shadow: 0 0 12px var(--glow-gold); opacity: 1; }
    50% { box-shadow: 0 0 20px var(--glow-bright); opacity: 0.95; }
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.05em;
    min-width: 60px;
}

.test-result {
    padding: 60px 40px;
    animation: fadeIn 0.5s ease;
}

.result-title {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    margin-bottom: 36px;
    text-align: center;
}

/* Экран обработки результатов */
.result-loading {
    max-width: 500px;
    margin: 0 auto 40px;
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, rgba(255, 250, 245, 0.9) 0%, rgba(232, 213, 163, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 40px rgba(212, 175, 55, 0.1);
    animation: resultLoadingGlow 3s ease-in-out infinite;
}

@keyframes resultLoadingGlow {
    0%, 100% { box-shadow: 0 8px 40px rgba(212, 175, 55, 0.1); }
    50% { box-shadow: 0 12px 50px rgba(212, 175, 55, 0.2), 0 0 60px rgba(212, 175, 55, 0.08); }
}

.result-step {
    font-size: 1.25rem;
    color: var(--graphite);
    line-height: 1.6;
    min-height: 2.5em;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: stepTextPulse 2s ease-in-out infinite;
}

@keyframes stepTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.result-progress-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.4s ease;
}

.progress-dot.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    box-shadow: 0 0 12px var(--glow-gold);
    animation: dotPulse 1s ease-in-out infinite;
}

.progress-dot:nth-child(1).active { animation-delay: 0s; }
.progress-dot:nth-child(2).active { animation-delay: 0.15s; }
.progress-dot:nth-child(3).active { animation-delay: 0.3s; }
.progress-dot:nth-child(4).active { animation-delay: 0.45s; }
.progress-dot:nth-child(5).active { animation-delay: 0.6s; }

@keyframes dotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 12px var(--glow-gold); }
    50% { transform: scale(1.2); box-shadow: 0 0 20px var(--glow-bright); }
}

.result-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 20px;
}

.result-recommendation {
    background: linear-gradient(135deg, rgba(255, 250, 245, 0.98) 0%, rgba(232, 213, 163, 0.06) 50%, rgba(250, 248, 245, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 24px;
    padding: 48px 56px;
    margin: 0 auto 40px;
    max-width: 560px;
    text-align: left;
    box-shadow: 0 4px 0 rgba(212, 175, 55, 0.06), 0 20px 50px rgba(0, 0, 0, 0.06);
    animation: resultRecGlow 4s ease-in-out infinite;
}

@keyframes resultRecGlow {
    0%, 100% { box-shadow: 0 8px 40px rgba(212, 175, 55, 0.12); }
    50% { box-shadow: 0 10px 50px rgba(212, 175, 55, 0.18); }
}

.result-rec-title {
    font-size: 1.4rem;
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.result-rec-text {
    font-size: 1.05rem;
    color: var(--graphite);
    line-height: 1.8;
    margin-bottom: 28px;
}

.btn-learn-more,
.btn-subscribe {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.result-invite {
    font-size: 1rem;
    color: var(--graphite);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 24px;
    text-align: center;
}

/* CTA Section */
.cta-section {
    padding: 120px 0;
    background-color: var(--navy-dark);
    color: var(--milk-white);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

/* Logo in CTA — тот же логотип, что в первом блоке (hero) */
.cta-logo-link {
    display: block;
    text-align: center;
    margin-bottom: 50px;
}

.cta-logo-link .cta-logo {
    max-width: 280px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

.cta-logo-link:hover .cta-logo {
    filter: brightness(0) saturate(100%) invert(78%) sepia(50%) saturate(900%) hue-rotate(10deg) brightness(100%) contrast(91%);
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.8));
    }
}

/* Golden logo filter - makes any logo golden */
.cta-logo.golden {
    filter: 
        brightness(0) saturate(100%) 
        invert(77%) sepia(60%) saturate(2000%) hue-rotate(15deg) 
        drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

/* Golden SVG logo - apply gold color to SVG elements */
.cta-logo.golden svg circle,
.cta-logo.golden svg line,
.cta-logo.golden svg path,
.cta-logo.golden svg polygon {
    stroke: #d4af37 !important;
    fill: #d4af37 !important;
}

.cta-logo.golden svg text {
    fill: #d4af37 !important;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.cta-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 40px;
    animation: expandLine 1.5s ease-out;
}

@keyframes expandLine {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

.cta-title {
    font-size: 2.5rem;
    color: var(--milk-white);
    margin-bottom: 30px;
}

.cta-description {
    font-size: 1.1rem;
    color: rgba(250, 249, 246, 0.8);
    line-height: 1.8;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 24px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--milk-white);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(250, 249, 246, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background-color: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-buttons-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 32px;
}

/* В результатах теста — только dropdown (премиум) */
.social-dropdown-result {
    display: block !important;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.contact-buttons-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.social-dropdown {
    display: none;
}

/* Mobile dropdown — скрыт по умолчанию на desktop (кроме result) */
@media (min-width: 769px) {
    .social-dropdown:not(.social-dropdown-result) {
        display: none !important;
    }
}

/* Premium dropdown в результатах — на всех экранах */
.social-dropdown-result .social-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 28px;
    background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    border-radius: 16px;
    color: var(--navy-dark);
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 0 var(--gold-dark), 0 12px 30px rgba(212, 175, 55, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-dropdown-result .social-dropdown-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--gold-dark), 0 16px 40px rgba(212, 175, 55, 0.3);
}

.social-dropdown-result .social-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 20px;
    background: linear-gradient(180deg, var(--milk-white) 0%, #f8f6f2 100%);
    border-radius: 16px;
    box-shadow: 0 4px 0 rgba(212, 175, 55, 0.08), 0 24px 48px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-dropdown-result .social-dropdown-menu.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
}

.social-dropdown-result .social-dropdown-menu .contact-btn {
    min-width: auto;
    width: 100%;
    justify-content: flex-start;
    padding: 14px 20px;
    border-radius: 12px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background-color: rgba(212, 175, 55, 0.15);
    border: 2px solid var(--gold);
    border-radius: 12px;
    color: var(--navy-dark);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    min-width: 160px;
    justify-content: center;
}

.contact-btn:hover {
    background-color: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
    border-color: var(--gold-light);
}

.contact-btn .btn-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.contact-btn .btn-text {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Specific button styles */
/* В CTA (тёмный фон) — светлый текст */
.cta-section .contact-btn {
    color: var(--milk-white);
}

.contact-btn-chat:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: white;
}

.contact-btn-telegram:hover {
    background-color: #0088cc;
    border-color: #0088cc;
    color: white;
}

.contact-btn-facebook:hover,
.contact-btn-facebook-group:hover {
    background-color: #1877F2;
    border-color: #1877F2;
    color: white;
}

.contact-btn-vk:hover {
    background-color: #0077FF;
    border-color: #0077FF;
    color: white;
}

/* Mobile: dropdown соцсетей в результатах теста */
@media (max-width: 768px) {
    .contact-buttons-desktop {
        display: none !important;
    }

    .social-dropdown {
        display: block !important;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        perspective: 800px;
    }

    .social-dropdown-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 18px 24px;
        background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%);
        border: none;
        border-radius: 16px;
        color: var(--navy-dark);
        font-family: 'Inter', sans-serif;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow:
            0 8px 0 var(--gold-dark),
            0 12px 24px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: translateY(0);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .social-dropdown-trigger:active {
        transform: translateY(4px);
        box-shadow:
            0 4px 0 var(--gold-dark),
            0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .dropdown-arrow {
        transition: transform 0.3s ease;
        font-size: 0.75rem;
    }

    .dropdown-arrow.rotated {
        transform: rotate(180deg);
    }

    .social-dropdown-menu {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
        padding: 16px;
        background: linear-gradient(180deg, var(--milk-white) 0%, #f5f3ef 100%);
        border-radius: 16px;
        box-shadow:
            0 -4px 0 rgba(212, 175, 55, 0.2),
            0 20px 40px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(212, 175, 55, 0.2);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: rotateX(-15deg) translateY(-10px);
        transform-origin: top center;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .social-dropdown-menu.open {
        max-height: 400px;
        opacity: 1;
        transform: rotateX(0) translateY(0);
    }

    .social-dropdown-menu .contact-btn {
        min-width: auto;
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transform: translateZ(0);
    }

    .social-dropdown-menu .contact-btn:hover {
        transform: translateX(6px) translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* 3D карточка результата на мобильном */
    .test-result {
        perspective: 1000px;
    }

    .result-recommendation {
        padding: 36px 24px;
        margin-left: 16px;
        margin-right: 16px;
        max-width: 100%;
    }

    .btn-learn-more,
    .btn-subscribe {
        box-shadow: 0 3px 0 var(--gold-dark), 0 6px 16px rgba(212, 175, 55, 0.25);
        transition: all 0.2s ease;
    }

    .btn-learn-more:active,
    .btn-subscribe:active {
        transform: translateY(2px);
        box-shadow: 0 1px 0 var(--gold-dark), 0 4px 12px rgba(212, 175, 55, 0.2);
    }

    /* 3D варианты ответов на мобильном */
    .question-card {
        perspective: 600px;
    }

    .option {
        box-shadow: 0 3px 0 rgba(0, 0, 0, 0.04), 0 6px 12px rgba(0, 0, 0, 0.06);
        transform: translateY(0);
    }

    .option:active {
        transform: translateY(2px);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    }

    .option.selected {
        box-shadow: 0 4px 0 rgba(212, 175, 55, 0.2), 0 8px 20px rgba(212, 175, 55, 0.2);
    }
}

/* Floating Mobile Buttons — цвета сайта (золото, navy) */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gold);
    color: var(--navy-dark);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
    background-color: var(--gold-light);
}

.floating-btn svg {
    width: 28px;
    height: 28px;
}

.floating-btn-max-icon {
    width: 36px;
    height: auto;
    object-fit: contain;
    filter: brightness(0);
}

/* Mobile: overlay-меню в отдельном окне */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 35, 50, 0.95);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}
.nav-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--milk-white);
    border-radius: 20px;
    padding: 50px 40px 40px;
    width: calc(100% - 40px);
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.nav-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 28px;
    line-height: 1;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
.nav-close:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-dark);
}
@media (max-width: 968px) {
    .nav-no-logo .nav-container {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .nav-no-logo .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 8px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .nav-overlay .nav-menu a {
        display: block;
        font-size: 1.15rem;
        padding: 16px 20px;
        color: var(--text-dark);
        text-decoration: none;
        border-radius: 12px;
        transition: background 0.2s, color 0.2s;
    }
    .nav-overlay .nav-menu a:hover {
        background: rgba(212, 175, 55, 0.12);
        color: var(--gold-dark);
    }
}
@media (min-width: 969px) {
    .nav-overlay {
        display: none !important;
    }
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-logo-img {
        max-width: 200px;
        height: auto;
        object-fit: contain;
    }
    .hero-logo-link {
        margin-bottom: 24px;
    }
    .page-logo-img {
        max-width: 160px;
    }
    .logo {
        max-width: 160px;
    }
    .logo-img {
        height: 38px;
    }
    .nav-container:not(.nav-no-logo) {
        flex-wrap: wrap;
        padding: 15px 20px;
        gap: 12px;
    }
    .nav-container:not(.nav-no-logo) .nav-burger {
        display: none;
    }
    .nav-container:not(.nav-no-logo) .nav-menu {
        display: flex;
        flex-basis: 100%;
        order: 3;
        justify-content: center;
        gap: 20px;
        padding: 12px 0 0;
        margin: 0;
        border-top: 1px solid var(--border-color);
        list-style: none;
        position: static;
        width: 100%;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
        transform: none;
    }
    .nav-menu li {
        list-style: none;
    }
    .nav-menu a {
        font-size: 0.95rem;
        padding: 10px 14px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body.menu-open .nav-menu {
        transform: none;
    }
    body.menu-open::before {
        display: none;
    }
}

/* Show floating buttons only on mobile */
@media (max-width: 768px) {
    .floating-buttons {
        display: flex;
    }
}

/* Animation for floating buttons */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.floating-btn {
    animation: float 3s ease-in-out infinite;
}

.floating-btn:nth-child(1) {
    animation-delay: 0s;
}

.floating-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.floating-btn:nth-child(3) {
    animation-delay: 0.4s;
}

.floating-btn:nth-child(4) {
    animation-delay: 0.6s;
}

/* Footer */
.footer {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, #f8f7f4 0%, var(--milk-white) 100%);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.footer-links a:hover {
    color: var(--gold-dark);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.social-link {
    font-size: 0.95rem;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    transition: color 0.3s ease;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.social-link:hover {
    color: var(--gold-dark);
}

.social-link:hover::after {
    width: 100%;
}

.footer-copyright {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-copyright p {
    font-size: 0.85rem;
    color: var(--text-light);
    letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-name {
        font-size: 3rem;
    }

    .hero-image {
        order: -1;
    }

    .portrait-image {
        width: 300px;
        height: 400px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 30px;
    }

    .nav-container {
        padding: 20px 30px;
    }

    .nav-menu {
        gap: 25px;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        gap: 20px;
        font-size: 0.9rem;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .question-card {
        padding: 40px 30px;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }

    .footer-social {
        flex-direction: column;
        gap: 20px;
    }

    .hero-logo-img {
        max-width: 180px;
    }

    .page-logo-img {
        max-width: 140px;
    }

    .container {
        padding: 0 20px;
    }
}

/* Мелкие экраны (iPhone SE, Galaxy Fold) */
@media (max-width: 380px) {
    .hero-logo-img {
        max-width: 160px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .nav-no-logo .nav-menu a {
        font-size: 1.1rem;
    }

    .floating-buttons {
        bottom: 16px;
        right: 16px;
        gap: 10px;
    }

    .floating-btn {
        width: 44px;
        height: 44px;
    }
}

