﻿/* ============================================
   HOME PAGE - Main Styles
   Design Tokens + Layout
   ============================================ */

:root {
    /* Brand Colors */
    --brand-primary: #4F46E5;
    --brand-primary-dark: #4338CA;
    --brand-primary-light: #818CF8;
    --brand-secondary: #10B981;
    --brand-secondary-dark: #059669;
    --accent-premium: #8B5CF6;
    --accent-warm: #F59E0B;
    --accent-pink: #EC4899;
    --accent-danger: #EF4444;
    /* Neutral Colors */
    --bg-soft: #F9FAFB;
    --bg-card: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border-light: #E5E7EB;
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(79, 70, 229, 0.08);
    --shadow-lg: 0 12px 32px rgba(79, 70, 229, 0.12);
    --shadow-xl: 0 20px 48px rgba(79, 70, 229, 0.18);
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 40px;
    /* Spacing */
    --section-padding-y: 80px;
    --section-padding-y-mobile: 50px;
    /* Transitions */
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--bg-soft);
    color: var(--text-primary);
    line-height: 1.7;
}

.main-header {
    background: #4b0871;
}

/* Skip to content for a11y */
.skip-to-content {
    position: absolute;
    top: -100px;
    right: 20px;
    background: var(--brand-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    z-index: 99999;
    transition: top 0.3s;
}

    .skip-to-content:focus {
        top: 20px;
        color: white;
    }

/* Focus visible global */
:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================
   HERO MODERN
   ============================================ */
.hero-modern {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 50%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

    .hero-bg-shapes .shape {
        position: absolute;
        border-radius: 50%;
        filter: blur(60px);
        opacity: 0.5;
    }

    .hero-bg-shapes .shape-1 {
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(79, 70, 229, 0.25), transparent 70%);
        top: -100px;
        right: -100px;
    }

    .hero-bg-shapes .shape-2 {
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
        bottom: -50px;
        left: -50px;
    }

    .hero-bg-shapes .shape-3 {
        width: 350px;
        height: 350px;
        background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
        top: 30%;
        left: 40%;
    }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 24px;
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.hero-title {
    font-size: clamp(1.75rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-primary), var(--accent-premium));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 32px;
    max-width: 540px;
}

/* Search */
.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    margin-bottom: 24px;
    border: 2px solid transparent;
    transition: border-color var(--transition-base);
}

    .hero-search:focus-within {
        border-color: var(--brand-primary);
    }

    .hero-search > i {
        color: var(--text-secondary);
        padding-right: 16px;
        font-size: 16px;
    }

    .hero-search input {
        flex: 1;
        border: none;
        outline: none;
        padding: 14px 0;
        font-size: 15px;
        font-family: inherit;
        background: transparent;
        color: var(--text-primary);
    }

        .hero-search input::placeholder {
            color: var(--text-muted);
        }

    .hero-search .btn-search {
        background: var(--brand-primary);
        color: white;
        border: none;
        padding: 12px 28px;
        border-radius: var(--radius-md);
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        transition: all var(--transition-base);
        font-family: inherit;
    }

        .hero-search .btn-search:hover {
            background: var(--brand-primary-dark);
            transform: translateY(-2px);
        }

/* Quick Actions */
.hero-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-light);
}

    .quick-chip:hover {
        background: var(--brand-primary);
        color: white;
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: transparent;
    }

/* ============================================
   HERO VISUAL - IMAGE
   ============================================ */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    z-index: 1;
}

    /* هاله نورانی پشت تصویر */
    .hero-image-wrapper::before {
        content: '';
        position: absolute;
        inset: -25px;
        background: radial-gradient(circle at 30% 30%, rgba(79, 70, 229, 0.3), transparent 60%), radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.2), transparent 60%);
        border-radius: 50%;
        filter: blur(45px);
        z-index: -1;
    }

.hero-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-2xl);
    box-shadow: 0 0 0 8px #ffffff, 0 0 0 10px rgba(79, 70, 229, 0.08), 0 25px 60px -10px rgba(79, 70, 229, 0.35), 0 45px 100px -20px rgba(139, 92, 246, 0.25);
    background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

    .hero-image:hover {
        transform: translateY(-6px) scale(1.01);
    }
.hero-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 480px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    min-width: 0; /* مهم برای اینکه متن سرریز نشود */
}

    .info-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
        border-color: rgba(79, 70, 229, 0.2);
    }

.info-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.info-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

    .info-card-text strong {
        font-size: 15px;
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.2;
    }

    .info-card-text small {
        font-size: 11px;
        color: var(--text-secondary);
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
/* Hero Primary Actions (Logged-in) */
.hero-primary-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-width: 480px;
}

.btn-hero-primary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--brand-primary), var(--accent-premium));
    color: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.35);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

    .btn-hero-primary:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 48px rgba(79, 70, 229, 0.5);
        color: white;
    }

.btn-hero-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.btn-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 2px;
}

    .btn-hero-text strong {
        font-size: 15px;
        font-weight: 800;
    }

    .btn-hero-text small {
        opacity: 0.85;
        font-size: 12px;
    }

.btn-hero-arrow {
    font-size: 18px;
    transition: transform var(--transition-base);
}

.btn-hero-primary:hover .btn-hero-arrow {
    transform: translateX(-8px);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: white;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition-base);
    max-width: 480px;
}

    .btn-hero-secondary:hover {
        background: var(--brand-primary);
        color: white;
        transform: translateY(-2px);
    }

.hero-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

    .stat-chip strong {
        font-weight: 800;
        color: var(--brand-primary);
    }

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
}

.trust-icon {
    width: 48px;
    height: 48px;
    background: #EEF2FF;
    color: var(--brand-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.trust-item strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.trust-item span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   SECTIONS
   ============================================ */
.section-online-therapists {
    padding: var(--section-padding-y) 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.section-featured-therapists {
    padding: var(--section-padding-y) 0;
    background: var(--bg-soft);
}

.section-quizzes {
    padding: var(--section-padding-y) 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.section-courses {
    padding: var(--section-padding-y) 0;
    background: var(--bg-soft);
}

.section-dual-cta {
    padding: 60px 0;
    background: #FFFFFF;
}

.section-final-cta {
    padding: 60px 0 80px;
    background: var(--bg-soft);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.live-label {
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-header h2,
.section-header-center h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.section-header p,
.section-header-center p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: gap var(--transition-base);
}

    .btn-link:hover {
        gap: 14px;
        color: var(--brand-primary-dark);
    }

.section-footer-cta {
    text-align: center;
    margin-top: 40px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .hero-modern {
        padding: 40px 0 60px;
        min-height: auto;
    }

    .hero-visual {
        margin-top: 30px;
    }

    .hero-image-wrapper {
        /*max-width: 360px;*/
    }

    .hero-info-cards {
        max-width: 420px;
    }

        .hero-image-wrapper::before {
            inset: -20px;
        }

    .hero-primary-actions,
    .btn-hero-primary,
    .btn-hero-secondary {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding-y: var(--section-padding-y-mobile);
    }

    .hero-modern {
        padding: 24px 0 40px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 30px;
    }

    .trust-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

        .trust-item strong {
            font-size: 16px;
        }

    .hero-search {
        flex-wrap: wrap;
    }

        .hero-search input {
            min-width: 100%;
            order: 1;
            padding: 12px 16px;
        }

        .hero-search > i {
            display: none;
        }

        .hero-search .btn-search {
            order: 2;
            width: 100%;
        }

    .hero-visual {
        margin-top: 30px;
    }

    .hero-image-wrapper {
        /*max-width: 360px;*/
    }

    .hero-info-cards {
        max-width: 420px;
    }
}

@media (max-width: 576px) {
    .hero-badge {
        font-size: 11px;
        padding: 6px 14px;
    }

    .hero-quick-actions {
        gap: 8px;
    }

    .quick-chip {
        font-size: 12px;
        padding: 8px 14px;
    }

    .stat-chip {
        font-size: 12px;
        padding: 8px 14px;
    }

    .btn-hero-text strong {
        font-size: 13px;
    }

    .btn-hero-text small {
        font-size: 11px;
    }

    .btn-hero-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .hero-image-wrapper {
        /*max-width: 300px;*/
    }

    .hero-image {
        border-radius: var(--radius-lg);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image:hover {
        transform: none;
    }
}
