/* =========================================================
   Projects pages (/projects, /projects/category/{slug}, /projects/{slug})
   ألوان الموقع الأساسية نفسها (#564895)
   ========================================================= */
:root {
    --akp-primary: #564895;
    --akp-primary-dark: #3c326b;
    --akp-primary-deep: #231e43;
    --akp-primary-soft: #f1edf9;
    --akp-soft-bg: #f7f6fb;
    --akp-ink: #1f1c2b;
    --akp-muted: #6f6a7a;
    --akp-border: #e8e4f0;
    --akp-radius: 14px;
    --akp-radius-sm: 10px;
    --akp-shadow: 0 10px 30px rgba(35, 30, 67, .08);
    --akp-shadow-hover: 0 18px 40px rgba(35, 30, 67, .14);
}

.akp-page {
    color: var(--akp-ink);
    background: #fff;
    overflow-x: clip;
}

    .akp-page h1, .akp-page h2, .akp-page h3, .akp-page p {
        margin-top: 0;
    }

    .akp-page a {
        text-decoration: none;
    }

/*
 * styles.css يضع للعربي: html[lang="ar"] body * { unicode-bidi: plaintext; }
 * وهذا يجعل كل عنصر يأخذ اتجاهه من أول حرف فيه، فالنص الذي يبدأ بكلمة إنجليزية
 * أو رقم أو أيقونة يصبح LTR ويذهب لليسار. داخل صفحات المشاريع نرجع للاتجاه العادي
 * للصفحة (RTL بالعربي)، ونعزل فقط العناصر التي يجب أن تبقى LTR.
 */
html[lang="ar"] .akp-page,
html[lang="ar"] .akp-page *,
html[lang="ar"] .akp-lightbox,
html[lang="ar"] .akp-lightbox * {
    unicode-bidi: normal;
}

    html[lang="ar"] .akp-page [dir],
    html[lang="ar"] .akp-page .akp-color-text strong,
    html[lang="ar"] .akp-lightbox-counter {
        unicode-bidi: isolate;
    }

/* في RTL تنعكس الأسهم */
[dir="rtl"] .akp-flip {
    display: inline-block;
    transform: scaleX(-1);
}

/* ================= Sections ================= */
.akp-section {
    padding-block: clamp(40px, 5vw, 64px);
}

.akp-section-tight {
    padding-block: clamp(28px, 3.5vw, 44px);
}

.akp-section-thumbs {
    padding-block: 0 8px;
}

.akp-section-soft {
    background: var(--akp-soft-bg);
}

.akp-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 24px;
    margin-bottom: 22px;
}

    .akp-heading h2 {
        font-size: clamp(1.35rem, 2.2vw, 1.75rem);
        font-weight: 800;
        line-height: 1.3;
        margin: 0;
    }

.akp-heading-note {
    margin: 0;
    color: var(--akp-muted);
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.akp-eyebrow {
    display: inline-block;
    color: var(--akp-primary);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

/* ================= Buttons ================= */
.akp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .92rem;
    border: 1px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
    white-space: nowrap;
}

.akp-btn-primary {
    background: var(--akp-primary);
    color: #fff;
}

    .akp-btn-primary:hover {
        background: var(--akp-primary-dark);
        color: #fff;
    }

.akp-btn-light {
    background: #fff;
    color: var(--akp-primary-deep);
}

    .akp-btn-light:hover {
        background: var(--akp-primary-soft);
        color: var(--akp-primary-deep);
    }

.akp-btn-outline-light {
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
}

    .akp-btn-outline-light:hover {
        background: rgba(255, 255, 255, .12);
        color: #fff;
    }

.akp-btn-block {
    width: 100%;
}

/* ================= Hero ================= */
.akp-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(280px, 34vw, 400px);
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: linear-gradient(135deg, var(--akp-primary-deep), var(--akp-primary));
    overflow: hidden;
}

.akp-hero-project {
    min-height: clamp(320px, 40vw, 480px);
}

.akp-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.akp-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(20, 16, 40, .25) 0%, rgba(20, 16, 40, .55) 45%, rgba(20, 16, 40, .88) 100%);
}

.akp-hero-inner {
    padding-block: 36px 34px;
}

.akp-hero h1 {
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
    color: #fff;
    max-width: 900px;
}

.akp-hero p {
    color: rgba(255, 255, 255, .86);
    max-width: 680px;
    line-height: 1.8;
    margin-bottom: 0;
}

/* block بعرض المحتوى حتى يلتزم ببداية السطر (يمين في RTL، يسار في LTR) */
.akp-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(6px);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.akp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    font-size: .85rem;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, .75);
}

    .akp-breadcrumb a {
        color: rgba(255, 255, 255, .85);
    }

        .akp-breadcrumb a:hover {
            color: #fff;
            text-decoration: underline;
        }

    .akp-breadcrumb [aria-current] {
        color: #fff;
        font-weight: 600;
    }

.akp-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

    .akp-hero-stats span {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        padding: 8px 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .14);
        backdrop-filter: blur(6px);
        font-size: .88rem;
    }

    .akp-hero-stats strong {
        font-size: 1.1rem;
    }

.akp-hero-meta {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: rgba(255, 255, 255, .9);
    font-size: .92rem;
}

    .akp-hero-meta li {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

/* ================= Badges ================= */
.akp-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--akp-primary);
    font-size: .76rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* عنصر block بعرض المحتوى حتى يلتزم ببداية السطر (يمين في RTL) */
.akp-badge-hero {
    position: static;
    display: flex;
    width: fit-content;
    margin-bottom: 12px;
}

/* ================= Category cards =================
   بطاقة صورة واحدة: الصورة تغطي البطاقة والنص والزر فوقها.
   اللون حسب ترتيب القسم (tone-1 دافئ، tone-2 أزرق، tone-3 بنفسجي).
   ================================================== */
.akp-categories-section {
    padding-top: clamp(28px, 4vw, 44px);
}

.akp-categories {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .akp-categories-2, .akp-categories-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .akp-categories-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.akp-category-card {
    --akp-tone: 247, 240, 228;
    --akp-tone-btn: #6b3a32;
    --akp-tone-btn-hover: #552b25;
    --akp-tone-icon: var(--akp-primary);
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 320px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--akp-primary-deep), var(--akp-primary));
    box-shadow: 0 8px 24px rgba(35, 30, 67, .10);
    transition: box-shadow .3s, transform .3s;
}

    .akp-category-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 36px rgba(35, 30, 67, .16);
    }

.akp-category-tone-2 {
    --akp-tone: 232, 242, 252;
    --akp-tone-btn: #1f3b8f;
    --akp-tone-btn-hover: #172d6e;
    --akp-tone-icon: #1f3b8f;
}

.akp-category-tone-3 {
    --akp-tone: 241, 237, 249;
    --akp-tone-btn: var(--akp-primary);
    --akp-tone-btn-hover: var(--akp-primary-dark);
}

.akp-category-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
    transition: transform .6s ease;
}

.akp-category-card:hover .akp-category-bg {
    transform: scale(1.03);
}

/* طبقة فاتحة من جهة النص فقط؛ باقي الصورة يبقى واضحاً */
.akp-category-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to left, rgba(var(--akp-tone), .96) 0%, rgba(var(--akp-tone), .88) 34%, rgba(var(--akp-tone), .35) 60%, rgba(var(--akp-tone), 0) 78%),
        linear-gradient(to top, rgba(var(--akp-tone), .55) 0%, rgba(var(--akp-tone), 0) 45%);
}

[dir="ltr"] .akp-category-overlay {
    background:
        linear-gradient(to right, rgba(var(--akp-tone), .96) 0%, rgba(var(--akp-tone), .88) 34%, rgba(var(--akp-tone), .35) 60%, rgba(var(--akp-tone), 0) 78%),
        linear-gradient(to top, rgba(var(--akp-tone), .55) 0%, rgba(var(--akp-tone), 0) 45%);
}

.akp-category-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: min(100%, 400px);
    padding: 22px 24px;
}

.akp-category-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #fff;
    color: var(--akp-tone-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 16px rgba(20, 16, 40, .12);
}

.akp-category-title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 2.3vw, 1.95rem);
    font-weight: 900;
    line-height: 1.2;
}

    .akp-category-title a {
        color: #15142a;
    }

    .akp-category-title small {
        display: block;
        font-size: .72em;
        font-weight: 800;
    }

.akp-category-desc {
    max-width: 360px;
    margin: 0 0 16px;
    color: #4a4656;
    font-size: .9rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.akp-category-btn {
    min-height: 42px;
    padding: 9px 20px;
    border-radius: 10px;
    background: var(--akp-tone-btn);
    color: #fff;
}

    .akp-category-btn:hover {
        background: var(--akp-tone-btn-hover);
        color: #fff;
    }

@media (max-width: 575.98px) {
    .akp-category-card {
        min-height: 280px;
    }

    .akp-category-content {
        padding: 18px;
    }

    .akp-category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .akp-category-title {
        font-size: 1.4rem;
    }

    .akp-category-desc {
        font-size: .84rem;
        margin-bottom: 12px;
    }

}

/* البطاقة ضيقة على التابلت والموبايل: الطبقة من الأسفل حتى يبقى النص مقروءاً */
@media (max-width: 991.98px) {
    .akp-category-overlay,
    [dir="ltr"] .akp-category-overlay {
        background: linear-gradient(to top, rgba(var(--akp-tone), .96) 0%, rgba(var(--akp-tone), .85) 45%, rgba(var(--akp-tone), .15) 80%, rgba(var(--akp-tone), 0) 100%);
    }
}

/* ================= Latest projects (صفحة /projects) ================= */
.akp-latest-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 28px;
}

    .akp-latest-heading h2 {
        font-size: clamp(1.6rem, 3vw, 2.2rem);
        font-weight: 900;
        line-height: 1.25;
        color: #1c1a4a;
        margin-bottom: 8px;
    }

    .akp-latest-heading p {
        color: var(--akp-muted);
        font-size: .95rem;
        line-height: 1.8;
        margin-bottom: 20px;
    }

/* فلتر بشكل شريط واحد (الكل / الفئات) */
.akp-segmented {
    display: inline-flex;
    gap: 4px;
    max-width: 100%;
    padding: 5px;
    border-radius: 14px;
    background: #f1f0f6;
    border: 1px solid var(--akp-border);
    overflow-x: auto;
    scrollbar-width: none;
}

    .akp-segmented::-webkit-scrollbar {
        display: none;
    }

.akp-segmented-item {
    flex: 0 0 auto;
    min-width: 110px;
    padding: 9px 22px;
    border-radius: 10px;
    color: var(--akp-ink);
    font-size: .92rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}

    .akp-segmented-item:hover {
        color: var(--akp-primary);
        background: rgba(255, 255, 255, .7);
    }

    .akp-segmented-item.is-active {
        background: var(--akp-primary);
        color: #fff;
        box-shadow: 0 6px 14px rgba(86, 72, 149, .28);
    }

/* أيقونة وعدد داخل عنصر الفلتر (صفحة الفئة) */
.akp-segmented-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .akp-segmented-item small {
        min-width: 22px;
        padding: 1px 6px;
        border-radius: 999px;
        background: var(--akp-primary-soft);
        color: var(--akp-primary);
        font-size: .72rem;
        line-height: 1.5;
    }

    .akp-segmented-item.is-active small {
        background: rgba(255, 255, 255, .22);
        color: #fff;
    }

.akp-latest-heading .akp-eyebrow {
    display: block;
    font-size: .9rem;
}

/* المساحة الإضافية أسفل آخر عنوان قبل البطاقات */
.akp-mini-categories {
    margin-top: 4px;
}

/* أزرار "شاهد جميع مشاريع ..." */
.akp-view-all {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.akp-btn-outline {
    border-color: var(--akp-primary);
    color: var(--akp-primary);
    background: #fff;
}

    .akp-btn-outline:hover {
        background: var(--akp-primary);
        color: #fff;
    }

@media (max-width: 575.98px) {
    .akp-segmented-item {
        min-width: 0;
        padding: 8px 16px;
        font-size: .86rem;
    }

    .akp-view-all .akp-btn {
        width: 100%;
        white-space: normal;
    }
}

/* ================= Filters ================= */
.akp-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
    padding-bottom: 2px;
}

    .akp-filters::-webkit-scrollbar {
        display: none;
    }

.akp-filter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--akp-border);
    background: #fff;
    color: var(--akp-ink);
    font-size: .88rem;
    font-weight: 600;
    transition: all .2s;
}

    .akp-filter small {
        min-width: 22px;
        padding: 1px 6px;
        border-radius: 999px;
        background: var(--akp-primary-soft);
        color: var(--akp-primary);
        font-size: .72rem;
        text-align: center;
    }

    .akp-filter:hover {
        border-color: var(--akp-primary);
        color: var(--akp-primary);
    }

    .akp-filter.is-active {
        background: var(--akp-primary);
        border-color: var(--akp-primary);
        color: #fff;
    }

        .akp-filter.is-active small {
            background: rgba(255, 255, 255, .22);
            color: #fff;
        }

/* ================= Project grid & cards ================= */
.akp-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .akp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 992px) {
    .akp-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

.akp-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--akp-border);
    border-radius: var(--akp-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(35, 30, 67, .05);
    transition: box-shadow .25s, transform .25s;
    min-width: 0;
}

    .akp-card:hover {
        box-shadow: var(--akp-shadow-hover);
        transform: translateY(-3px);
    }

.akp-card-media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    background: var(--akp-primary-soft);
    overflow: hidden;
}

    .akp-card-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .5s;
    }

.akp-card:hover .akp-card-media img {
    transform: scale(1.05);
}

.akp-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
    flex: 1;
}

.akp-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
}

    .akp-card-title a {
        color: var(--akp-ink);
    }

        .akp-card-title a:hover {
            color: var(--akp-primary);
        }

.akp-card-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--akp-muted);
    font-size: .84rem;
}

    .akp-card-meta li {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .akp-card-meta i {
        color: var(--akp-primary);
    }

.akp-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    color: var(--akp-primary);
    font-weight: 700;
    font-size: .88rem;
}

    .akp-card-link:hover {
        color: var(--akp-primary-dark);
        gap: 9px;
    }

.akp-empty {
    text-align: center;
    padding: 48px 16px;
    border: 1px dashed var(--akp-border);
    border-radius: var(--akp-radius);
    color: var(--akp-muted);
    background: #fff;
}

    .akp-empty i {
        font-size: 2.4rem;
        color: var(--akp-primary);
        display: block;
        margin-bottom: 8px;
    }

    .akp-empty p {
        margin: 0;
    }

/* ================= Pagination ================= */
.akp-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
}

.akp-page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--akp-border);
    background: #fff;
    color: var(--akp-ink);
    font-weight: 600;
}

    .akp-page-link:hover {
        border-color: var(--akp-primary);
        color: var(--akp-primary);
    }

    .akp-page-link.is-active {
        background: var(--akp-primary);
        border-color: var(--akp-primary);
        color: #fff;
    }

/* ================= Mini categories (category page) ================= */
/* بطاقات بعرض ثابت في المنتصف (تحت عنوان موسّط) */
.akp-mini-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

    .akp-mini-categories .akp-mini-category {
        flex: 0 1 320px;
    }

.akp-mini-category {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--akp-radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--akp-primary-deep), var(--akp-primary));
    color: #fff;
}

    .akp-mini-category img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .5s;
    }

    .akp-mini-category:hover img {
        transform: scale(1.05);
    }

.akp-mini-category-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    padding: 16px;
    background: linear-gradient(180deg, transparent 30%, rgba(20, 16, 40, .85));
}

    .akp-mini-category-body i {
        font-size: 1.4rem;
    }

    .akp-mini-category-body strong {
        font-size: 1.05rem;
    }

    .akp-mini-category-body small {
        opacity: .8;
    }

/* ================= Before / After ================= */
.akp-compare {
    position: relative;
    aspect-ratio: 16 / 8;
    border-radius: var(--akp-radius);
    overflow: hidden;
    background: #ddd;
    user-select: none;
    box-shadow: var(--akp-shadow);
    touch-action: pan-y;
    cursor: ew-resize;
}

.akp-compare-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.akp-compare-before-wrap {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.akp-compare::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .35);
    pointer-events: none;
}

.akp-compare-handle {
    position: absolute;
    top: 50%;
    left: var(--pos);
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: #fff;
    color: var(--akp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    pointer-events: none;
    z-index: 2;
}

.akp-compare-label {
    position: absolute;
    top: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(20, 16, 40, .7);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 2;
}

.akp-compare-label-before {
    left: 14px;
}

.akp-compare-label-after {
    right: 14px;
    background: var(--akp-primary);
}

/* الـ range يغطي المكوّن كاملاً: سحب بالماوس واللمس ولوحة المفاتيح */
.akp-compare-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    z-index: 3;
    -webkit-appearance: none;
    appearance: none;
    /* السحب بالماوس/اللمس يُعالج في projects.js، والـ range للوحة المفاتيح فقط */
    pointer-events: none;
}

    .akp-compare-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 46px;
        height: 100vh;
    }

    .akp-compare-range::-moz-range-thumb {
        width: 46px;
        height: 100vh;
        border: 0;
    }

.akp-compare:has(.akp-compare-range:focus-visible) {
    outline: 3px solid var(--akp-primary);
    outline-offset: 3px;
}

/* ================= Thumbs ================= */
.akp-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding-top: 12px;
}

.akp-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--akp-radius-sm);
    overflow: hidden;
    background: var(--akp-primary-soft);
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}

    .akp-thumb:hover, .akp-thumb:focus-visible {
        border-color: var(--akp-primary);
        transform: translateY(-2px);
    }

    .akp-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.akp-thumb-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(35, 30, 67, .65);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}

/* ================= Details grid & panels ================= */
.akp-details-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 992px) {
    .akp-details-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }

    .akp-details-grid-single {
        grid-template-columns: 1fr;
    }
}

.akp-panel {
    background: #fff;
    border: 1px solid var(--akp-border);
    border-radius: var(--akp-radius);
    padding: clamp(18px, 2.4vw, 26px);
    box-shadow: 0 4px 16px rgba(35, 30, 67, .04);
    min-width: 0;
}

.akp-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 16px;
}

    .akp-panel-title i {
        color: var(--akp-primary);
        font-size: 1.3rem;
    }

.akp-lead {
    font-size: 1.02rem;
    line-height: 1.9;
    color: var(--akp-ink);
}

.akp-rich-text {
    color: var(--akp-muted);
    line-height: 1.9;
    overflow-wrap: anywhere;
}

    .akp-rich-text img, .akp-rich-text iframe {
        max-width: 100%;
        height: auto;
    }

    .akp-rich-text ul, .akp-rich-text ol {
        padding-inline-start: 1.3rem;
    }

@media (min-width: 992px) {
    .akp-info {
        position: sticky;
        top: 100px;
    }
}

.akp-info-list {
    margin: 0 0 18px;
}

.akp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--akp-border);
}

    .akp-info-row:last-child {
        border-bottom: 0;
    }

    .akp-info-row dt {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: var(--akp-muted);
        font-weight: 500;
        font-size: .9rem;
        white-space: nowrap;
    }

        .akp-info-row dt i {
            color: var(--akp-primary);
        }

    .akp-info-row dd {
        margin: 0;
        font-weight: 700;
        font-size: .92rem;
        text-align: end;
        overflow-wrap: anywhere;
    }

/* ================= Products used ================= */
.akp-products {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.akp-product {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--akp-border);
    border-radius: var(--akp-radius-sm);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    min-width: 0;
}

    .akp-product:hover {
        border-color: var(--akp-primary);
        box-shadow: var(--akp-shadow);
    }

.akp-product-media {
    flex: 0 0 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--akp-soft-bg);
}

    .akp-product-media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.akp-product-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .akp-product-body h3 {
        font-size: .95rem;
        font-weight: 700;
        line-height: 1.45;
        margin: 0;
    }

        .akp-product-body h3 a {
            color: var(--akp-ink);
        }

    .akp-product-body p {
        font-size: .8rem;
        color: var(--akp-muted);
        line-height: 1.6;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.akp-product-note {
    color: var(--akp-primary) !important;
}

/* ================= Color used ================= */
.akp-color {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--akp-border);
    border-radius: var(--akp-radius-sm);
}

    .akp-color + .akp-color {
        margin-top: 10px;
    }

.akp-color-swatch {
    flex: 0 0 76px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

    .akp-color-swatch img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.akp-color-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .akp-color-text strong {
        font-size: 1.05rem;
        letter-spacing: .02em;
        direction: ltr;
        unicode-bidi: isolate;
    }

    .akp-color-text small {
        color: var(--akp-muted);
    }

/* ================= Gallery ================= */
.akp-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 992px) {
    .akp-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

.akp-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--akp-radius-sm);
    overflow: hidden;
    background: var(--akp-primary-soft);
}

    .akp-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .5s;
    }

    .akp-gallery-item:hover img {
        transform: scale(1.06);
    }

.akp-gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(35, 30, 67, .45);
    color: #fff;
    font-size: 1.8rem;
    opacity: 0;
    transition: opacity .25s;
}

.akp-gallery-item:hover .akp-gallery-zoom,
.akp-gallery-item:focus-visible .akp-gallery-zoom {
    opacity: 1;
}

/* ================= Details: نبذة + قبل/بعد ================= */
.akp-intro {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
    align-items: stretch;
}

@media (min-width: 992px) {
    .akp-intro {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .akp-intro-single {
        grid-template-columns: 1fr;
    }

    /* المقارنة بطول لوحة النبذة */
    .akp-intro .akp-compare-wrap {
        display: flex;
    }

        .akp-intro .akp-compare-wrap .akp-compare {
            flex: 1;
            aspect-ratio: auto;
            min-height: 420px;
        }
}

.akp-intro .akp-overview .akp-info-list {
    margin: 18px 0 0;
    padding-top: 6px;
    border-top: 1px solid var(--akp-border);
}

.akp-info-row-colors dd {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.akp-color-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px 4px 6px;
    border: 1px solid var(--akp-border);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    font-size: .86rem;
}

[dir="rtl"] .akp-color-chip {
    padding: 4px 6px 4px 10px;
}

.akp-color-dot {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

    .akp-color-dot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.akp-color-code {
    font-weight: 800;
    letter-spacing: .02em;
}

/* ================= Details: عناوين الأقسام ================= */
.akp-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

    .akp-row-heading .akp-panel-title {
        margin: 0;
        font-size: clamp(1.15rem, 2vw, 1.4rem);
    }

.akp-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--akp-primary);
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    white-space: nowrap;
}

    .akp-link-btn:hover {
        color: var(--akp-primary-dark);
        gap: 9px;
    }

/* ================= Details: معرض الصور (شريط أفقي) ================= */
.akp-carousel {
    position: relative;
}

.akp-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 14px) / 4);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 2px;
}

    .akp-carousel-track::-webkit-scrollbar {
        display: none;
    }

    .akp-carousel-track .akp-gallery-item {
        scroll-snap-align: start;
    }

.akp-carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--akp-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(35, 30, 67, .18);
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}

    .akp-carousel-btn:hover {
        transform: scale(1.06);
    }

    .akp-carousel-btn[disabled] {
        opacity: 0;
        pointer-events: none;
    }

.akp-carousel-start {
    inset-inline-start: -14px;
}

.akp-carousel-end {
    inset-inline-end: -14px;
}

@media (max-width: 991.98px) {
    .akp-carousel-track {
        grid-auto-columns: calc((100% - 2 * 12px) / 3);
        gap: 12px;
    }
}

@media (max-width: 575.98px) {
    .akp-carousel-track {
        grid-auto-columns: 72%;
        gap: 10px;
    }

    .akp-carousel-btn {
        display: none;
    }
}

/* ================= Details: المنتجات المستخدمة ================= */
/* 4 أعمدة على الديسكتوب، 2 على التابلت، 1 على الموبايل */
.akp-products-row {
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .akp-products-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .akp-products-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

    .akp-products-row .akp-product {
        padding: 14px;
        border-radius: var(--akp-radius);
        background: #fff;
        box-shadow: 0 4px 16px rgba(35, 30, 67, .05);
    }

    .akp-products-row .akp-product-media {
        flex: 0 0 96px;
        height: 96px;
    }

/* ================= Lightbox ================= */
.akp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 10, 24, .94);
    padding: 56px 64px;
    touch-action: pan-y;
}

    .akp-lightbox[hidden] {
        display: none;
    }

.akp-lightbox-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .akp-lightbox-figure img {
        max-width: 100%;
        max-height: calc(100vh - 150px);
        object-fit: contain;
        border-radius: 8px;
    }

    .akp-lightbox-figure figcaption {
        color: rgba(255, 255, 255, .85);
        font-size: .92rem;
        text-align: center;
    }

.akp-lightbox-btn {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s;
}

    .akp-lightbox-btn:hover, .akp-lightbox-btn:focus-visible {
        background: rgba(255, 255, 255, .25);
    }

.akp-lightbox-close {
    top: 14px;
    inset-inline-end: 14px;
}

.akp-lightbox-prev, .akp-lightbox-next {
    top: 50%;
    margin-top: -23px;
}

/* الأزرار ثابتة يسار/يمين بصرياً (الصورة السابقة يسار) */
.akp-lightbox-prev {
    left: 12px;
}

.akp-lightbox-next {
    right: 12px;
}

.akp-lightbox-counter {
    position: absolute;
    top: 22px;
    inset-inline-start: 20px;
    color: rgba(255, 255, 255, .8);
    font-size: .9rem;
    direction: ltr;
}

/* ================= CTA =================
   نفس تصميم CTA صفحة المنتجات (Views/Product/Index.cshtml -> .product-page-cta)
   ========================================= */
.akp-cta {
    padding: 45px 0 70px;
}

.akp-cta-card {
    --akp-cta-dark: #40366f;
    --akp-cta-light: #6f61a8;
    position: relative;
    min-height: 260px;
    padding: 48px 55px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    align-items: center;
    gap: 45px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(120deg, var(--akp-cta-dark) 0%, var(--akp-primary) 55%, var(--akp-cta-light) 100%);
    box-shadow: 0 22px 55px rgba(86, 72, 149, .2);
}

.akp-cta-content,
.akp-cta-actions {
    position: relative;
    z-index: 2;
}

.akp-cta-label {
    width: max-content;
    max-width: 100%;
    margin-bottom: 17px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

    .akp-cta-label .icon {
        font-size: 16px;
    }

.akp-cta-content h2 {
    max-width: 620px;
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 700;
    line-height: 1.25;
}

.akp-cta-content p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 15px;
    line-height: 1.9;
}

.akp-cta-actions {
    display: grid;
    gap: 12px;
}

.akp-cta-btn {
    min-height: 70px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 15px;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}

    .akp-cta-btn:hover {
        transform: translateY(-3px);
    }

.akp-cta-btn-icon {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 21px;
}

.akp-cta-btn-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .akp-cta-btn-text small {
        font-size: 10px;
        font-weight: 500;
        opacity: .72;
    }

    .akp-cta-btn-text strong {
        font-size: 14px;
        font-weight: 700;
    }

.akp-cta-btn-primary {
    border: 1px solid #fff;
    background: #fff;
    color: var(--akp-primary);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .13);
}

    .akp-cta-btn-primary .akp-cta-btn-icon {
        background: var(--akp-primary-soft);
        color: var(--akp-primary);
    }

    .akp-cta-btn-primary:hover {
        background: #f8f6ff;
        color: var(--akp-primary);
        box-shadow: 0 16px 35px rgba(0, 0, 0, .18);
    }

.akp-cta-btn-light {
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .09);
    color: #fff;
    backdrop-filter: blur(10px);
}

    .akp-cta-btn-light .akp-cta-btn-icon {
        background: rgba(255, 255, 255, .13);
        color: #fff;
    }

    .akp-cta-btn-light:hover {
        border-color: rgba(255, 255, 255, .55);
        background: rgba(255, 255, 255, .16);
        color: #fff;
    }

.akp-cta-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.akp-cta-shape-1 {
    width: 330px;
    height: 330px;
    top: -190px;
    right: -90px;
    border: 55px solid rgba(255, 255, 255, .055);
}

.akp-cta-shape-2 {
    width: 240px;
    height: 240px;
    bottom: -150px;
    left: 35%;
    background: rgba(255, 255, 255, .045);
}

@media (max-width: 991.98px) {
    .akp-cta-card {
        padding: 42px 35px;
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .akp-cta-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .akp-cta {
        padding: 30px 0 50px;
    }

    .akp-cta-card {
        padding: 30px 20px;
        gap: 25px;
        border-radius: 20px;
    }

    .akp-cta-content {
        text-align: center;
    }

    .akp-cta-label {
        margin-inline: auto;
    }

    .akp-cta-content h2 {
        font-size: 25px;
    }

    .akp-cta-content p {
        font-size: 13px;
        line-height: 1.8;
    }

    .akp-cta-actions {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .akp-cta-btn {
        min-height: 62px;
        padding: 9px 12px;
        border-radius: 12px;
    }

    .akp-cta-btn-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 10px;
        font-size: 19px;
    }

    .akp-cta-btn-text strong {
        font-size: 13px;
    }

    .akp-cta-shape-1 {
        right: -190px;
    }
}

/* ================= Responsive ================= */
@media (max-width: 991.98px) {
    /* على الشاشات الصغيرة تصبح الصور المصغّرة شريطاً أفقياً قابلاً للتمرير */
    .akp-thumbs {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 30px) / 4);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

        .akp-thumbs::-webkit-scrollbar {
            display: none;
        }

    .akp-thumb {
        scroll-snap-align: start;
    }

    .akp-compare {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 767.98px) {
    .akp-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .akp-lightbox {
        padding: 56px 8px 70px;
    }

    .akp-lightbox-prev, .akp-lightbox-next {
        top: auto;
        bottom: 14px;
        margin-top: 0;
    }

    .akp-lightbox-prev {
        left: calc(50% - 56px);
    }

    .akp-lightbox-next {
        right: calc(50% - 56px);
    }
}

@media (max-width: 575.98px) {
    .akp-hero-inner {
        padding-block: 28px 24px;
    }

    .akp-thumbs {
        grid-auto-columns: calc((100% - 16px) / 3);
        gap: 8px;
    }

    .akp-gallery {
        gap: 8px;
    }

    .akp-info-row {
        flex-direction: column;
        gap: 2px;
    }

        .akp-info-row dd {
            text-align: start;
        }
}

@media (prefers-reduced-motion: reduce) {
    .akp-page *, .akp-lightbox * {
        transition: none !important;
    }
}
