/* الصفحة الرئيسية — متناسقة مع الرأس والتذييل */
.home-page {
    /* نفس عائلة ألوان الرأس (#faf7f2 → #e8dfd0) والتذييل (#f7f2ea → #ede4d4) */
    --hp-cream-1: #faf7f2;
    --hp-cream-2: #f0e8da;
    --hp-cream-3: #e8dfd0;
    --hp-cream-4: #ebe1d0;
    --hp-cream-5: #f7f2ea;
    --hp-cream-6: #f2eadc;
    --hp-cream-7: #ede4d4;
    --hp-gold: #c4a574;
    --hp-brown: #4a3a32;
    --hp-brown-mid: #5e4a3f;
    padding: 1.5rem 0 2rem;
}

html:has(.home-page) {
    background: linear-gradient(
        180deg,
        var(--hp-cream-1) 0%,
        var(--hp-cream-2) 28%,
        var(--hp-cream-5) 62%,
        var(--hp-cream-6) 82%,
        var(--hp-cream-7) 100%
    );
    background-attachment: fixed;
    min-height: 100%;
}

body:has(.home-page) {
    background: transparent !important;
    min-height: 100vh;
}

.home-page .main-container {
    background: linear-gradient(145deg, rgba(255, 253, 251, 0.92) 0%, rgba(250, 247, 242, 0.88) 100%);
    margin-top: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border-radius: 14px;
    border: 1px solid rgba(196, 165, 116, 0.45);
    box-shadow: 0 6px 24px rgba(92, 70, 45, 0.08);
    max-width: 920px;
}

.home-page .home-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.home-page .home-panel-welcome {
    background: linear-gradient(160deg, var(--hp-cream-1) 0%, var(--hp-cream-2) 100%);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 12px;
    border: 1px solid rgba(196, 165, 116, 0.35);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-page .home-panel-login {
    background: linear-gradient(160deg, var(--hp-cream-2) 0%, var(--hp-cream-4) 100%);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 12px;
    border: 1px solid rgba(196, 165, 116, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-page .main-container h1 {
    font-size: clamp(1.4rem, 3.5vw, 1.85rem);
    color: var(--hp-brown);
    margin-bottom: 0.65rem;
    font-weight: 700;
}

.home-page .home-tagline {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    color: var(--hp-brown-mid);
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.home-page .btn-custom {
    background: linear-gradient(180deg, #e8dfd0 0%, #d8cbb8 50%, #c4a574 100%) !important;
    color: var(--hp-brown) !important;
    border: 1px solid rgba(196, 165, 116, 0.65);
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(196, 165, 116, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.home-page .btn-custom:hover {
    background: linear-gradient(180deg, #f0e8da 0%, #e0d0b8 50%, #d4b896 100%) !important;
    color: var(--hp-brown) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(196, 165, 116, 0.35);
    border-color: var(--hp-gold);
}

.home-page .login-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
}

.home-page .icon-card {
    flex: 1 1 130px;
    max-width: 200px;
    background: #fffdfb;
    border: 1px solid rgba(196, 165, 116, 0.4);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    margin: 0;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.home-page .icon-card:hover {
    transform: translateY(-5px);
    border-color: var(--hp-gold);
    box-shadow: 0 8px 22px rgba(92, 70, 45, 0.12);
}

.home-page .icon-card img {
    width: 68px;
    margin-bottom: 0.65rem;
}

.home-page .icon-card p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hp-brown);
    margin: 0;
}

.home-page .icon-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.home-page .home-stats-wrap {
    max-width: min(960px, 100%);
    margin: 1.5rem auto 0;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.home-page .home-stats-wrap .right-section {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(160deg, rgba(255, 253, 251, 0.92) 0%, rgba(242, 234, 220, 0.9) 100%) !important;
    padding: clamp(1.25rem, 3vw, 2rem) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(196, 165, 116, 0.4) !important;
    box-shadow: 0 4px 18px rgba(92, 70, 45, 0.06) !important;
}

.home-page .home-stats-wrap h2 {
    color: var(--hp-brown) !important;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.home-page .stat-title {
    color: var(--hp-brown-mid);
    font-weight: 600;
}

.home-page .stat-box {
    background: linear-gradient(145deg, var(--hp-brown-mid) 0%, var(--hp-brown) 100%) !important;
    color: #fff !important;
}

.home-page .stat-box:hover {
    background: linear-gradient(145deg, var(--hp-gold) 0%, #b8956a 100%) !important;
    color: var(--hp-brown) !important;
}

#CreatAcountModal .modal-dialog {
    max-width: 440px;
}

#CreatAcountModal .login-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
}

#CreatAcountModal .icon-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    background: #fffdfb;
    border: 1px solid rgba(196, 165, 116, 0.4);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    margin: 0;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

#CreatAcountModal .icon-card:hover {
    transform: translateY(-4px);
    border-color: var(--hp-gold, #c4a574);
    box-shadow: 0 6px 18px rgba(92, 70, 45, 0.12);
}

#CreatAcountModal .icon-card img {
    width: 56px;
    height: auto;
    margin-bottom: 0.5rem;
}

#CreatAcountModal .icon-card p {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a3a32;
    margin: 0;
}

#CreatAcountModal .icon-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.home-page .whatsapp-icon img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* حاوية الإحصائيات */
.stat-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0.75rem;
    width: 100%;
    max-width: 100%;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.stat-box {
    width: clamp(72px, 22vw, 95px);
    height: clamp(72px, 22vw, 95px);
    margin: 6px auto 0;
    background: linear-gradient(145deg, #5e4a3f 0%, #4a3a32 100%);
    color: #fff;
    clip-path: polygon(50% 0%, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0% 50%, 15% 15%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 0.9rem;
    transition: all 0.3s ease-in-out;
}

.stat-number {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    font-weight: 700;
    line-height: 1.2;
}

.stat-icon {
    font-size: 0.7rem;
    opacity: 0.85;
}

.stat-box:hover {
    background: linear-gradient(145deg, #c4a574 0%, #b8956a 100%);
    color: #4a3a32;
}

.stat-title {
    display: block;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    margin-bottom: 2px;
    color: #5e4a3f;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .stat-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem 1.5rem;
        max-width: 480px;
        margin: 0 auto;
    }

    .stat-box {
        width: 88px;
        height: 88px;
    }
}

@media (min-width: 992px) {
    .stat-container {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: clamp(0.5rem, 1.5vw, 1.25rem);
        max-width: 100%;
    }

    .stat-item {
        flex: 1 1 0;
        min-width: 0;
        max-width: 25%;
    }

    .stat-box {
        width: clamp(80px, 7.5vw, 100px);
        height: clamp(80px, 7.5vw, 100px);
        margin-top: 8px;
    }

    .stat-title {
        white-space: normal;
    }
}

@media (max-width: 575.98px) {
    .stat-container {
        gap: 0.75rem 0.5rem;
    }

    .stat-box {
        width: 76px;
        height: 76px;
        font-size: 0.85rem;
    }

    .stat-title {
        white-space: normal;
        font-size: 0.78rem;
    }
}
