/* =========================================
   СТРАНИЦА "КЛИЕНТАМ" (БОНУСНАЯ ПРОГРАММА)
========================================= */
.clients-page {
    font-family: var(--font-base);
    background-color: #ffffff;
    padding-bottom: 80px;
}

.section-title {
    font-family: var(--font-title);
    font-size: 32px;
    color: #333333;
    text-align: center;
    margin-bottom: 40px;
}

/* =========================================
   HERO БЛОК С ПАТТЕРНОМ
========================================= */
.clients-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3e2444 100%); 
    color: #ffffff;
    padding: 80px 20px;
    margin-bottom: 60px;
    overflow: hidden;
}

/* Наш фирменный паттерн (Один большой в правом краю) */
.clients-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/logo_watermark.svg');
    background-repeat: no-repeat;
    background-position: right -50px center;
    background-size: 600px;
    filter: brightness(0) invert(1);
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}

.clients-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    position: relative;
    z-index: 2;
}

.clients-hero-text {
    max-width: 650px;
}

.clients-hero-text h1 {
    font-family: var(--font-title);
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.clients-hero-text p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.clients-btn-primary {
    display: inline-block;
    background-color: #f7d547; 
    color: #333333;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.clients-btn-primary:hover {
    background-color: #e5c33a;
    transform: translateY(-2px);
}

/* =========================================
   КАК ЭТО РАБОТАЕТ
========================================= */
.how-it-works-section {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card {
    background: #ffffff;
    border: 1px solid #eeeeee; 
    border-radius: 12px; 
    padding: 35px 25px 40px 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(147, 96, 152, 0.08);
    border-color: #ebdbe9;
}

/* КОНТЕЙНЕРЫ ДЛЯ АНИМИРОВАННЫХ ИКОНОК ШАГОВ 1, 2, 3 */
.step-icon-wrapper {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto 15px auto !important;
}

.step-one-icon-svg,
.step-two-icon-svg,
.step-three-icon-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.step-card h3 {
    font-family: var(--font-title);
    font-size: 22px;
    color: #4a3c5a;
    margin-bottom: 12px;
}

.step-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

.clients-btn-wrapper-center {
    text-align: center;
    margin-bottom: 80px;
}

.clients-btn-secondary {
    display: inline-block;
    background-color: #f7d547;
    color: #333333;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.clients-btn-secondary:hover {
    background-color: #e5c33a;
}

/* =========================================
   ТАБЛИЦА УРОВНЕЙ
========================================= */
.levels-section {
    background-color: #4a3c5a; 
    padding: 60px 20px;
    margin-bottom: 80px;
}

.levels-header {
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.levels-header h2 {
    font-family: var(--font-title);
    font-size: 32px;
    margin-bottom: 15px;
}

.levels-header p {
    font-size: 15px;
    opacity: 0.9;
}

.levels-table-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    background: #ffffff; 
    border-radius: 8px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.levels-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.levels-table th, .levels-table td {
    padding: 20px;
    text-align: center;
    border: 1px solid #eeeeee; 
    color: #333333;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.levels-table th {
    background-color: #fcfcfc;
    font-weight: normal;
    border-bottom: 2px solid #e5e5e5;
}

.levels-table th .level-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.levels-table th .level-req {
    font-size: 12px;
    color: #888888;
}

.levels-table .col-feature {
    text-align: left;
    font-weight: 600;
    background-color: #fcfcfc;
    width: 25%;
    color: #444444;
}

.levels-table tbody tr:hover td {
    background-color: #fff2f4; 
}

/* =========================================
   КАК ЗАРАБОТАТЬ БАЛЛЫ (СТИЛИЗОВАННЫЕ HTML-ИКОНКИ)
========================================= */
.earn-points-section {
    max-width: 1200px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
}

.earn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.earn-card {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.25s ease;
}

.earn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(147, 96, 152, 0.08);
    border-color: #ebdbe9;
}

/* ОБЩИЕ КОНТЕЙНЕРЫ ДЛЯ ВСЕХ ВЕКТОРНЫХ АНИМИРОВАННЫХ ИКОНОК */
.icon-svg-wrapper {
    width: 120px;
    height: 120px;
    position: relative;
    cursor: pointer;
    margin-bottom: 15px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-svg-wrapper svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* НЕПРЕРЫВНАЯ НИТЬ */
.thread-path {
    stroke: #955A94;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round; 
    stroke-linejoin: round; 
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawThreadContinuousClients 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transition: filter 0.3s ease, stroke 0.3s ease;
}

/* ПАРЯЩИЕ ИСКРЫ */
.accent-sparkle {
    fill: #bca0ba;
    animation: floatSparkleClients 4s ease-in-out infinite; 
    transition: all 0.3s ease;
}

/* ТЕКСТ "+ 500" */
.accent-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    fill: #bca0ba;
    letter-spacing: 1px;
    pointer-events: none;
    transition: fill 0.3s ease, transform 0.3s ease;
    transform-origin: 55px 25px;
}

.sparkle-top-left { transform-origin: 25px 15px; }
.sparkle-right { transform-origin: 95px 35px; animation-delay: 1.5s; }
.sparkle-bottom-right { transform-origin: 92px 80px; animation-delay: 1.5s; }
.sparkle-bottom-left { transform-origin: 22px 85px; animation-delay: 1.5s; }
.sparkle-top-right { transform-origin: 88px 22px; }
.sparkle-top-center { transform-origin: 55px 15px; }

/* HOVER-ЭФФЕКТЫ */
.step-card:hover .icon-svg-wrapper,
.step-card .icon-svg-wrapper:hover,
.earn-card:hover .icon-svg-wrapper,
.earn-card .icon-svg-wrapper:hover {
    transform: scale(1.1) translateY(-3px);
}

.step-card:hover .thread-path,
.step-card .icon-svg-wrapper:hover .thread-path,
.earn-card:hover .thread-path,
.earn-card .icon-svg-wrapper:hover .thread-path {
    stroke: #df1b53;
    filter: drop-shadow(0 0 6px rgba(223, 27, 83, 0.5));
}

.step-card:hover .accent-sparkle,
.step-card .icon-svg-wrapper:hover .accent-sparkle,
.earn-card:hover .accent-sparkle,
.earn-card .icon-svg-wrapper:hover .accent-sparkle {
    fill: #df1b53;
    animation: spinSparkleClients 1s linear infinite;
}

.earn-card:hover .accent-text,
.earn-card .icon-svg-wrapper:hover .accent-text {
    fill: #df1b53;
    transform: scale(1.1);
}

/* КЛЮЧЕВЫЕ КАДРЫ АНИМАЦИЙ */
@keyframes drawThreadContinuousClients {
    0% { stroke-dashoffset: 800; opacity: 0; }
    5% { opacity: 1; }
    40% { stroke-dashoffset: 0; opacity: 1; }
    60% { stroke-dashoffset: 0; opacity: 1; }
    95% { opacity: 1; }
    100% { stroke-dashoffset: -800; opacity: 0; }
}

@keyframes floatSparkleClients {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-4px) scale(1.1); }
}

@keyframes spinSparkleClients {
    0% { transform: rotate(0deg) scale(1.2); }
    100% { transform: rotate(180deg) scale(1.2); }
}

.earn-card h3 {
    font-family: var(--font-title);
    font-size: 19px;
    color: #4a3c5a;
    margin-bottom: 10px;
    line-height: 1.3;
}

.earn-card p {
    font-size: 13.5px;
    line-height: 1.55;
    color: #666666;
    margin: 0;
}

/* =========================================
   FAQ (АККОРДЕОН) С ПАТТЕРНОМ
========================================= */
.faq-section {
    background-color: #fcfcfc;
    padding: 60px 20px;
    border-top: 1px solid #eeeeee;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.faq-left {
    flex: 1;
    max-width: 400px;
}

.faq-left h2 {
    font-family: var(--font-title);
    font-size: 32px;
    color: #333333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.faq-left p {
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
}

.faq-left a {
    color: var(--accent-color);
    text-decoration: underline;
}

.faq-right {
    flex: 2;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    overflow: hidden; 
}

/* ФИРМЕННЫЙ ПАТТЕРН ВНУТРИ FAQ */
.faq-question::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/logo_watermark.svg');
    background-repeat: repeat;
    background-size: 65px;
    background-position: center;
    opacity: 0;
    mix-blend-mode: multiply; 
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.faq-item.active .faq-question::after,
.faq-item:hover .faq-question::after {
    opacity: 1; 
}

.faq-question span,
.faq-chevron {
    position: relative;
    z-index: 1;
}

.faq-item.active .faq-question,
.faq-item:hover .faq-question {
    background-color: #fff2f4; 
    color: #df1b53; 
}

.faq-chevron {
    color: #999999;
    transition: transform 0.3s ease, color 0.2s ease;
    display: flex;
}

.faq-item.active .faq-chevron,
.faq-item:hover .faq-chevron {
    color: #df1b53;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.faq-answer-inner {
    padding: 0 20px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
    background-color: #ffffff;
}

/* =========================================
   АДАПТИВНОСТЬ
========================================= */
@media screen and (max-width: 992px) {
    .clients-hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .faq-container {
        flex-direction: column;
    }
    
    .faq-left {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .earn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .clients-hero-pattern {
        background-position: center;
        background-size: 400px;
        opacity: 0.1;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .clients-hero-text h1 {
        font-size: 36px;
    }
}

@media screen and (max-width: 580px) {
    .earn-grid {
        grid-template-columns: 1fr;
    }
}