/**
 * Huqouk Premium UI v2
 * ألوان الهوية فقط — بدون ألوان جديدة
 */

/* ── إصلاح حرج: المحتوى لا يختفي أبداً ── */
.page.active-page .fade-in-up,
.page.active-page .hq-reveal,
.footer .fade-in-up {
    animation: hqSafeReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.page.active-page .fade-in-up.appear,
.page.active-page .hq-reveal.appear,
.footer .fade-in-up.appear {
    animation: none;
    opacity: 1;
    transform: none;
}

@keyframes hqSafeReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page.active-page .fade-in-up,
    .page.active-page .hq-reveal,
    .footer .fade-in-up {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Container — لا نكسر التنسيق الأصلي ── */
.container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 28px);
}

/* ══════════════════════════════════════
   HERO — رئيسية احترافية
   ══════════════════════════════════════ */
.chat-hero {
    padding: clamp(100px, 12vw, 140px) 0 clamp(56px, 8vw, 80px);
    min-height: auto;
    position: relative;
    overflow: hidden;
}

.chat-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 85% 15%, rgba(245, 158, 11, 0.14), transparent 55%),
        radial-gradient(ellipse 40% 35% at 5% 90%, rgba(255, 255, 255, 0.06), transparent 50%);
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(245, 158, 11, 0.95);
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.1);
}

.hero-title {
    font-size: clamp(2rem, 4.8vw, 3.15rem) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.03em;
    margin-bottom: 18px !important;
    text-align: right;
}

.hero-title em {
    font-style: normal;
    color: var(--secondary);
}

.hero-desc--lead {
    font-size: clamp(16px, 2.2vw, 19px) !important;
    line-height: 1.8 !important;
    max-width: 34rem;
    margin-bottom: 28px !important;
    color: rgba(241, 245, 249, 0.95) !important;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-cta-row .btn {
    min-height: 50px;
    padding-inline: 22px;
    border-radius: 12px;
    font-size: 15px;
}

.hero-btn-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
}

.hero-btn-outline:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: #fff !important;
}

.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.hero-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-split {
    gap: clamp(28px, 5vw, 52px);
    align-items: stretch;
}

.chat-app-container {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
    .hero-eyebrow,
    .hero-title,
    .hero-desc--lead {
        text-align: center !important;
        margin-inline: auto;
    }

    .hero-cta-row {
        justify-content: center;
    }

    .hero-trust-row {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .hero-content-left .chat-app-container {
        height: auto;
        min-height: 0;
        max-height: none;
    }
}

/* ══════════════════════════════════════
   أقسام الرئيسية
   ══════════════════════════════════════ */
.hq-home-band {
    padding-block: clamp(56px, 8vw, 88px);
}

.hq-home-band--alt {
    background: var(--bg-main);
}

.hq-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(18px, 3vw, 28px);
}

.hq-feature-card {
    padding: clamp(22px, 3vw, 30px);
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.hq-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
}

.hq-feature-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 14px 0 8px;
}

.hq-feature-card p {
    color: var(--text-sec);
    line-height: 1.7;
    font-size: 15px;
    margin: 0;
}

/* ══════════════════════════════════════
   أسفل الصفحات — CTA + تنبيه
   ══════════════════════════════════════ */
.hq-page-bottom {
    margin-top: clamp(32px, 5vw, 56px);
}

.hq-legal-strip {
    padding: 18px 22px;
    border-radius: 14px;
    background: rgba(26, 95, 122, 0.06);
    border: 1px solid rgba(26, 95, 122, 0.14);
    color: var(--text-sec);
    font-size: 14px;
    line-height: 1.75;
    text-align: center;
    margin-bottom: 20px;
}

.hq-bottom-cta {
    padding: clamp(36px, 5vw, 52px) clamp(24px, 4vw, 40px);
    border-radius: 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 20px 48px rgba(26, 95, 122, 0.22);
}

.hq-bottom-cta h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.hq-bottom-cta p {
    color: rgba(241, 245, 249, 0.9);
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.7;
    max-width: 36rem;
    margin-inline: auto;
}

.hq-bottom-cta .btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ══════════════════════════════════════
   صفحة العقود
   ══════════════════════════════════════ */
.page[data-page="contracts"] .hq-contracts-search {
    padding: clamp(20px, 3vw, 28px);
    border-radius: 18px;
    margin-bottom: 20px;
}

.page[data-page="contracts"] .hq-contracts-request {
    padding: clamp(22px, 3vw, 28px);
    border-radius: 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(26, 95, 122, 0.15);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.page[data-page="contracts"] .hq-contracts-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.page[data-page="contracts"] .hq-contract-cat {
    padding: 14px 12px;
    border-radius: 12px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}

.page[data-page="contracts"] .hq-contract-cat i {
    display: block;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.page[data-page="contracts"] #contracts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* تسجيل الدخول — huqouk-auth-v3.css */

/* ══════════════════════════════════════
   Footer احترافي — يظهر دائماً
   ══════════════════════════════════════ */
.footer {
    background: var(--primary-dark) !important;
    color: #94a3b8;
    padding-block: clamp(48px, 7vw, 72px);
    margin-top: 0;
}

.footer-brand__name {
    color: #fff !important;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.footer-brand__name i {
    color: var(--secondary);
    margin-left: 8px;
}

.footer-brand__desc {
    color: #94a3b8 !important;
    line-height: 1.75;
}

.footer-nav-link {
    color: #94a3b8 !important;
    font-size: 14px;
    font-weight: 600;
}

.footer-nav-link:hover {
    color: #fff !important;
}

.footer-legal-disclaimer {
    color: #64748b !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px !important;
    margin-top: 28px !important;
}

.footer-copyright {
    color: #64748b !important;
}

/* Final CTA على الرئيسية */
.final-cta {
    background: var(--bg-main);
    padding-block: clamp(64px, 9vw, 96px);
}

.final-cta .container {
    padding: clamp(36px, 5vw, 52px);
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 24px 56px rgba(26, 95, 122, 0.2);
}

.final-cta .cta-title {
    color: #fff !important;
}

.final-cta .cta-desc {
    color: rgba(241, 245, 249, 0.9) !important;
}

.final-cta .cta-action-btn {
    background: var(--secondary) !important;
    color: var(--primary-dark) !important;
    font-weight: 800;
    border-radius: 12px;
    min-height: 52px;
    padding-inline: 28px;
}
