﻿/* ===========================================
   HighEndProtection Cards v3.1
   =========================================== */

/* ===========================================
   صفحة التطبيقات
   =========================================== */

.hep-apps-page {
    padding: 24px;
}

.hep-apps-header {
    margin-bottom: 28px;
}

.hep-apps-title {
    color: var(--hep-text);
    font-size: 32px;
    font-weight: 700;
}

.hep-apps-description {
    color: var(--hep-text-light);
    opacity: .85;
}

/* ===========================================
   شبكة التطبيقات
   =========================================== */

.hep-apps-grid {
    margin-top: 12px;
}

/* ===========================================
   رابط البطاقة
   =========================================== */

.hep-app-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

    .hep-app-card-link:hover {
        color: inherit;
    }

/* ===========================================
   بطاقة التطبيق
   =========================================== */

.hep-app-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background: var(--hep-surface);
    border: 1px solid var(--hep-border);
    border-radius: 22px;
    box-shadow: var(--hep-shadow-small);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .hep-app-card:hover {
        transform: translateY(-6px);
        border-color: var(--app-accent);
        box-shadow: var(--hep-shadow-large);
    }

    .hep-app-card:active {
        transform: translateY(-2px) scale(.99);
    }

/* ===========================================
   الشريط العلوي الملون
   =========================================== */

.hep-app-card-accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: var(--app-accent);
}

/* ===========================================
   محتوى البطاقة
   =========================================== */

.hep-app-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 28px;
    text-align: center;
}

/* ===========================================
   حاوية الأيقونة
   =========================================== */

.hep-app-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin-bottom: 22px;
    background: var(--app-accent-soft);
    border-radius: 28px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.hep-app-card:hover .hep-app-icon-wrapper {
    transform: scale(1.07);
    box-shadow: var(--hep-shadow-medium);
}

/* ===========================================
   الأيقونة
   =========================================== */

.hep-app-icon {
    color: var(--app-accent);
    font-size: 52px !important;
}

/* ===========================================
   عنوان التطبيق
   =========================================== */

.hep-app-title {
    margin: 0 0 12px;
    color: var(--hep-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

/* ===========================================
   وصف التطبيق
   =========================================== */

.hep-app-description {
    max-width: 230px;
    min-height: 54px;
    margin: 0 auto;
    color: var(--hep-text-light);
    font-size: 15px;
    line-height: 1.8;
}

/* Shared compact sizing for all module navigation cards (AppTile). */
/* Use compact columns instead of stretching cards across the available row. */
.hep-apps-grid > .mud-grid-item:has(.hep-subapp-card) {
    flex: 0 0 200px;
    width: 200px;
    max-width: 100%;
}

.hep-app-card.hep-subapp-card {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
}

.hep-subapp-card .hep-app-card-content {
    padding: 16px 12px;
}

.hep-subapp-card .hep-app-icon-wrapper {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    border-radius: 12px;
}

.hep-subapp-card .hep-app-icon {
    font-size: 26px !important;
}

.hep-subapp-card .hep-app-title {
    margin-bottom: 6px;
    font-size: 16px;
    line-height: 1.5;
}

.hep-subapp-card .hep-app-description {
    min-height: 0;
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 600px) {
    .hep-subapp-card .hep-app-card-content {
        padding: 14px 12px;
    }
}

/* ===========================================
   بطاقات الصفحات العامة
   =========================================== */

.hep-content-card {
    padding: 24px;
    background: var(--hep-surface);
    color: var(--hep-text);
    border: 1px solid var(--hep-border);
    border-radius: 16px;
    box-shadow: var(--hep-shadow-small);
}

/* ===========================================
   الشاشات الكبيرة
   =========================================== */

@media (min-width: 1400px) {
    .hep-app-card {
        min-height: 270px;
    }

    .hep-app-card-content {
        padding: 44px 30px;
    }
}

/* ===========================================
   اللابتوب
   =========================================== */

@media (max-width: 1200px) {
    .hep-app-card {
        min-height: 245px;
    }

    .hep-app-title {
        font-size: 21px;
    }
}

/* ===========================================
   التابلت
   =========================================== */

@media (max-width: 960px) {
    .hep-apps-page {
        padding: 18px;
    }

    .hep-app-card {
        min-height: 230px;
        border-radius: 18px;
    }

    .hep-app-card-content {
        padding: 32px 22px;
    }

    .hep-app-icon-wrapper {
        width: 86px;
        height: 86px;
        margin-bottom: 18px;
        border-radius: 24px;
    }

    .hep-app-icon {
        font-size: 46px !important;
    }

    .hep-app-title {
        font-size: 20px;
    }

    .hep-app-description {
        font-size: 14px;
    }
}

/* ===========================================
   الجوال
   =========================================== */

@media (max-width: 600px) {
    .hep-apps-page {
        padding: 12px;
    }

    .hep-apps-header {
        margin-bottom: 22px;
    }

    .hep-apps-title {
        font-size: 25px;
    }

    .hep-app-card {
        min-height: 210px;
        border-radius: 16px;
    }

    .hep-app-card-content {
        padding: 28px 18px;
    }

    .hep-app-icon-wrapper {
        width: 76px;
        height: 76px;
        margin-bottom: 16px;
        border-radius: 20px;
    }

    .hep-app-icon {
        font-size: 40px !important;
    }

    .hep-app-title {
        margin-bottom: 8px;
        font-size: 18px;
    }

    .hep-app-description {
        min-height: 48px;
        font-size: 13px;
        line-height: 1.7;
    }
}

/* ===========================================
   الجوال الصغير
   =========================================== */

@media (max-width: 420px) {
    .hep-app-card {
        min-height: 195px;
    }

    .hep-app-card-content {
        padding: 24px 14px;
    }

    .hep-app-icon-wrapper {
        width: 68px;
        height: 68px;
    }

    .hep-app-icon {
        font-size: 36px !important;
    }

    .hep-app-title {
        font-size: 17px;
    }
}
