/*
Theme Name: قصة عشق
Theme URI: https://esheq.app/
Author: Eshq
Author URI: https://esheq.app/
Description: قالب تطبيق قصة عشق — موقع احترافي لتحميل تطبيق المسلسلات التركية المترجمة والمدبلجة مجاناً.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eshq
*/

/* ============================================
   قصة عشق — External Styles (Non-Critical)
   Loaded async via media="print" onload trick
   ============================================ */

/* ============ SECTION LAYOUT ============ */
.features,
.stats,
.screenshots,
.howto,
.faq,
.final-cta {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.highlight {
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ FEATURES ============ */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.4s var(--ease);
}

.feature-icon svg {
    width: 26px;
    height: 26px;
    fill: var(--brand-light);
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
    transform: scale(1.1);
}

.feature-card:hover .feature-icon svg {
    fill: #fff;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-desc {
    font-size: 0.88rem;
    color: var(--text-sec);
    line-height: 1.7;
}

/* ============ STATS ============ */
.stats {
    background: var(--bg-primary);
    overflow: hidden;
}

.stats-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(220, 38, 38, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: var(--r-lg);
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s var(--ease);
}

.stat-card:hover {
    border-color: rgba(220, 38, 38, 0.2);
    transform: translateY(-4px);
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-light), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-number-text {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-light), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-suffix {
    display: inline;
    font-size: 2rem;
    font-weight: 900;
    color: var(--brand-light);
}

.stat-label {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 8px;
    color: var(--text);
}

.stat-sub {
    font-size: 0.82rem;
    color: var(--text-tri);
    margin-top: 4px;
}

/* ============ SCREENSHOTS ============ */
.screenshots {
    background: var(--bg-secondary);
    overflow: hidden;
}

.screenshots-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0 40px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.screenshots-scroll::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    text-align: center;
}

.phone-frame {
    position: relative;
    width: 240px;
    border-radius: 32px;
    border: 3px solid #2a2a35;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.5s var(--ease);
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: #1a1a25;
    border-radius: 10px;
    z-index: 2;
}

.phone-frame img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 9/19.5;
    object-fit: cover;
}

.screenshot-item:hover .phone-frame {
    transform: translateY(-10px) scale(1.03);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow:
        0 0 0 1px rgba(220, 38, 38, 0.15),
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(220, 38, 38, 0.1);
}

.screenshot-label {
    display: block;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sec);
    transition: color 0.3s;
}

.screenshot-item:hover .screenshot-label {
    color: var(--brand-light);
}

/* ============ HOW TO USE ============ */
.howto {
    background: var(--bg-primary);
}

.steps-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-right: 60px;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    right: 26px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-dark), transparent);
    border-radius: 2px;
}

.step {
    position: relative;
    margin-bottom: 40px;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    right: -60px;
    top: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
    z-index: 2;
}

.step-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
    transition: all 0.4s var(--ease);
}

.step:hover .step-card {
    border-color: rgba(220, 38, 38, 0.15);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(-4px);
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.step-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--brand-light);
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 0.92rem;
    color: var(--text-sec);
    line-height: 1.8;
    margin-bottom: 16px;
}

.step-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: var(--brand-light);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s var(--ease);
}

.step-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.step-btn:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.howto-cta {
    text-align: center;
    margin-top: 64px;
}

.btn-lg {
    padding: 18px 44px;
    font-size: 1.1rem;
}

/* ============ FAQ ============ */
.faq {
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--glass);
    transition: all 0.3s var(--ease);
}

.faq-item:hover {
    border-color: rgba(220, 38, 38, 0.15);
}

.faq-item.active {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
    gap: 16px;
    transition: color 0.3s;
}

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

.faq-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    fill: var(--text-tri);
    transition: transform 0.4s var(--ease), fill 0.3s;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    fill: var(--brand-light);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease), padding 0.5s var(--ease);
}

.faq-item.active .faq-answer {
    max-height: 400px;
}

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 0.92rem;
    color: var(--text-sec);
    line-height: 1.9;
}

/* ============ FINAL CTA ============ */
.final-cta {
    background: var(--bg-primary);
    text-align: center;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.final-cta-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(220, 38, 38, 0.08), transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(220, 38, 38, 0.06), transparent 60%);
    pointer-events: none;
}

.final-cta-content {
    position: relative;
    z-index: 1;
}

.final-cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 16px;
}

.final-cta-desc {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-sec);
    max-width: 550px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.final-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* ============ FOOTER ============ */
.site-footer {
    background: #06060a;
    padding: 64px 0 0;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-tri);
    line-height: 1.8;
    margin-top: 16px;
    max-width: 350px;
}

.footer-links-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links ul,
.footer-download ul {
    list-style: none;
}

.footer-links li,
.footer-download li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-download a {
    font-size: 0.88rem;
    color: var(--text-tri);
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-download a:hover {
    color: var(--brand-light);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-tri);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .features,
    .stats,
    .screenshots,
    .howto,
    .faq,
    .final-cta {
        padding: 72px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 24px 20px;
        display: grid;
        grid-template-columns: 56px 1fr;
        grid-template-rows: auto auto;
        column-gap: 16px;
        text-align: right;
    }

    .feature-icon {
        margin: 0;
        grid-row: 1 / 3;
        align-self: center;
    }

    .feature-title {
        align-self: end;
        margin-bottom: 4px;
    }

    .feature-desc {
        align-self: start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .stat-card {
        padding: 28px 16px;
    }

    .phone-frame {
        width: 200px;
    }

    .steps-timeline {
        padding-right: 50px;
    }

    .steps-timeline::before {
        right: 20px;
    }

    .step-number {
        right: -50px;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .step-card {
        padding: 24px 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .final-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary.btn-lg,
    .final-cta-buttons .btn-secondary {
        width: 100%;
        max-width: 350px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .phone-frame {
        width: 180px;
    }

    .brand-name {
        font-size: 1.3rem;
    }

    .btn-download span {
        display: none;
    }
}

/* ============ CUSTOM DOWNLOAD BUTTONS (Android & iOS) ============ */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-ios {
    background: linear-gradient(135deg, #27272a, #09090b) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.btn-ios:hover {
    background: linear-gradient(135deg, #3f3f46, #18181b) !important;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px) scale(1.02);
}
.btn-ios-step {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e4e4e7 !important;
}
.btn-ios-step:hover {
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2) !important;
}

@media (max-width: 768px) {
    .hero-cta, .final-cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .hero-cta .btn-primary, .hero-cta .btn-secondary,
    .final-cta-buttons .btn-primary, .final-cta-buttons .btn-secondary {
        width: 100% !important;
        max-width: 350px !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .header-buttons .btn-download span {
        display: none;
    }
    .header-buttons .btn-download {
        padding: 10px !important;
        border-radius: 50% !important;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    .header-buttons .btn-download svg {
        margin: 0 !important;
    }
}

/* ============ SCROLLBAR (Desktop) ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============ SELECTION ============ */
::selection {
    background: rgba(220, 38, 38, 0.3);
    color: #fff;
}
