/* ═══════════════════════════════════════
   REBHNI HOME PAGE — Section-specific styles
   Depends on: public/css/saas/design-system.css
   ═══════════════════════════════════════ */

/* ─── 1. HERO ──────────────────────────────────────────────────── */
.hero {
    min-height: calc(100vh - 68px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 68px; /* offset for fixed navbar */
    /* Subtle gradient: charcoal-deep base with a faint teal bloom */
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(13,148,136,0.07) 0%, transparent 60%),
        var(--charcoal-deep);
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: var(--z-content);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    color: var(--gray-400);
    font-size: 0.88rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Middot separator — inserted via ::before on items after the first */
.hero-stats .stat-item + .stat-item::before {
    content: "·";
    color: var(--gray-500);
    margin-right: 0;
}

.hero-stats .stat-value {
    color: var(--white);
    font-weight: 700;
    font-family: var(--font-heading);
}

/* ─── 2. LOGO STRIP ────────────────────────────────────────────── */
.logo-strip {
    padding: 40px 0;
    overflow: hidden;
    /* No full section background; inherits parent */
}

.logo-strip-track {
    display: flex;
    align-items: center;
    gap: 48px;
    width: max-content;
    animation: logoScroll 30s linear infinite;
}

.logo-strip:hover .logo-strip-track {
    animation-play-state: paused;
}

.logo-strip-track img,
.logo-strip-track .logo-item {
    height: 28px;
    width: auto;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.logo-strip-track img:hover,
.logo-strip-track .logo-item:hover {
    opacity: 0.8;
}

@keyframes logoScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── 3. COMPARISON ────────────────────────────────────────────── */
.comparison .grid-2 {
    gap: 32px;
    align-items: start;
}

.comparison-without,
.comparison-with {
    border-radius: 16px;
    padding: 32px;
}

.comparison-without {
    background: rgba(239,68,68,0.06);
    border-top: 2px solid var(--red);
}

.comparison-with {
    background: rgba(13,148,136,0.06);
    border-top: 2px solid var(--teal);
}

.comparison-without h3,
.comparison-with h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
}

.comparison-without h3 { color: var(--red); }
.comparison-with h3    { color: var(--teal-light); }

.comparison-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparison-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
}

.comparison-list .marker {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 1px;
}

/* ─── 4. STEPS ─────────────────────────────────────────────────── */
.steps-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

.step-item {
    flex: 1;
    text-align: center;
    padding: 0 16px;
    position: relative;
}

/* Horizontal connector between steps */
.step-line {
    flex: 0 0 40px;
    align-self: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 56px; /* align with number area */
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--teal);
    line-height: 1;
    margin-bottom: 12px;
    display: block;
}

/* Teal glow on the final step number */
.step-item:last-of-type .step-number,
.step-item.step-last .step-number {
    text-shadow: 0 0 20px rgba(13,148,136,0.5);
}

.step-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--white);
}

.step-desc {
    color: var(--gray-400);
    font-size: 0.88rem;
    line-height: 1.65;
}

/* ─── 5A. FEATURE SHOWCASE ─────────────────────────────────────── */
.feature-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
}

.feature-showcase:last-child {
    margin-bottom: 0;
}

/* Reversed layout — image first (left), text second (right) */
.feature-showcase.reverse .feature-screenshot {
    order: -1;
}

/* RTL: when reversed, restore natural RTL reading order */
[dir="rtl"] .feature-showcase.reverse .feature-screenshot {
    order: 1;
}
[dir="rtl"] .feature-showcase.reverse .feature-text {
    order: -1;
}

.feature-tag {
    /* Inherits .tag from design system; page-specific placement */
    margin-bottom: 16px;
    display: inline-flex;
}

.feature-text h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.feature-text p {
    color: var(--gray-400);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.feature-text ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.feature-text ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--gray-400);
    font-size: 0.95rem;
}

.feature-text ul li .check {
    color: var(--teal-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-screenshot {
    position: relative;
    min-height: 300px;
    background: linear-gradient(135deg, rgba(13,148,136,0.06) 0%, rgba(26,26,46,1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feature-screenshot::after {
    content: 'قريبًا';
    position: absolute;
    color: rgba(255,255,255,0.12);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.feature-screenshot img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: block;
}

/* ─── 5B. FEATURE GRID ─────────────────────────────────────────── */
.feature-grid {
    /* Uses .grid-5 from design system */
    gap: 32px;
}

.feature-grid-item {
    /* Intentionally open — no card background/border */
}

.feature-grid-number {
    color: var(--teal-light);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.feature-grid-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--white);
    font-family: var(--font-heading);
}

.feature-grid-desc {
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ─── 6. MARKETPLACE (inside .section-light) ───────────────────── */
.marketplace-form {
    display: flex;
    flex-direction: row;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.marketplace-form .form-input {
    flex: 1;
}

/* .form-success hidden by default; revealed by JS */
.form-success {
    display: none;
    text-align: center;
    margin-top: 16px;
}

/* ─── 7. PRICING ───────────────────────────────────────────────── */
.pricing-grid {
    /* Uses .grid-4 from design system */
    align-items: start;
    gap: 24px;
}

.pricing-card {
    /* Inherits .card from design system */
    position: relative;
    text-align: center;
}

.pricing-card--featured {
    border-color: var(--teal) !important;
    transform: scale(1.02);
}

.pricing-card--featured:hover {
    transform: scale(1.02) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 100px;
    white-space: nowrap;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

.pricing-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-400);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
    font-family: var(--font-heading);
    line-height: 1;
}

.pricing-period {
    color: var(--gray-400);
    font-size: 0.82rem;
    margin-top: 4px;
    margin-bottom: 24px;
    display: block;
}

.pricing-features {
    list-style: none;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.pricing-features .check {
    color: var(--teal-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-features .cross {
    color: var(--gray-600);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ─── 8. FAQ ────────────────────────────────────────────────────── */
.faq-section .container-narrow {
    max-width: 700px;
}

.faq-list {
    margin-top: 48px;
}

.faq-item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    background: none;
    border: none;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
    text-align: start;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--teal-light);
}

.faq-chevron {
    flex-shrink: 0;
    color: var(--gray-400);
    transition: transform 0.3s ease, color 0.2s ease;
    font-size: 1rem;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--teal-light);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

.faq-answer-inner {
    padding-bottom: 20px;
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.8;
}

.faq-cta {
    text-align: center;
    padding-top: 80px;
}

.faq-cta p {
    color: var(--gray-400);
    margin-bottom: 24px;
    font-size: 1rem;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card--featured {
        transform: none;
    }

    .pricing-card--featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    /* Hero */
    .hero {
        padding-top: 88px;
        padding-bottom: 60px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats {
        gap: 12px;
    }

    /* Logo strip */
    .logo-strip-track img,
    .logo-strip-track .logo-item {
        height: 22px;
    }

    /* Comparison */
    .comparison .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Steps: vertical */
    .steps-row {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .step-item {
        width: 100%;
        max-width: 320px;
        padding: 0 0 8px;
    }

    /* Vertical connector between step items */
    .step-line {
        width: 1px;
        height: 32px;
        flex: 0 0 32px;
        border-top: none;
        border-left: 1px solid rgba(255,255,255,0.06);
        margin-bottom: 0;
        align-self: auto;
    }

    /* Feature showcase: stack */
    .feature-showcase {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 56px;
    }

    .feature-showcase.reverse .feature-screenshot,
    [dir="rtl"] .feature-showcase.reverse .feature-screenshot {
        order: 0;
    }

    .feature-screenshot {
        order: 1; /* image below text on mobile */
    }

    /* Marketplace form */
    .marketplace-form {
        flex-direction: column;
    }

    .marketplace-form .btn {
        width: 100%;
    }

    /* Pricing: horizontal scroll */
    .pricing-grid {
        grid-template-columns: repeat(4, 280px);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding-bottom: 16px;
    }

    .pricing-card {
        scroll-snap-align: start;
    }

    .pricing-card--featured {
        transform: none;
    }
}

@media (max-width: 480px) {
    .pricing-grid {
        grid-template-columns: repeat(4, 260px);
    }

    .feature-text h3 {
        font-size: 1.4rem;
    }
}
