/*
 * Article page (Figma "Hakini Landing Page" > Final Design > Blog Detail Page 1
 * and its phone frame). Builds on standard-page.css (tokens, article cards,
 * carousel arrows) and blog-home.css (the reading-time and date line).
 */

.aPage {
    position: relative;
}
.aPage::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 560px;
    background: var(--sp-hero);
}
.aPage::after {
    content: "";
    position: absolute;
    top: -180px;
    inset-inline-end: 2%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #fde3d6;
    opacity: 0.6;
}
.aPage > * {
    position: relative;
    z-index: 1;
}

/* ---- Title ----------------------------------------------------------------- */

.aHead {
    padding-top: 36px;
}
.aCrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    font-size: 16px;
}
.aCrumbs a {
    color: var(--sp-slate);
}
.aCrumbs a:hover {
    color: var(--sp-navy);
}
.aHead__subtitle {
    margin-top: 20px !important;
    color: var(--sp-coral-text);
    font-family: var(--sp-font-600);
    font-size: 18px;
}
.aHead__title {
    max-width: 820px;
    margin-top: 20px !important;
    color: var(--sp-navy);
    font-family: var(--sp-font-700);
    font-size: 48px;
    line-height: 56px;
}
.aHead__meta {
    gap: 24px;
    margin-top: 24px !important;
}
.aHead__author::before {
    display: none;
}
.aHead__author a {
    color: var(--sp-slate);
    text-decoration: underline;
}

/* ---- Layout ---------------------------------------------------------------- */

.aLayout {
    display: grid;
    grid-template-areas:
        "main top"
        "main bottom";
    grid-template-columns: minmax(0, 816fr) minmax(0, 364fr);
    grid-template-rows: auto 1fr;
    gap: 24px 26px;
    margin-top: -36px;
}
.aAside--top {
    grid-area: top;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: -44px;
}
.aAside--bottom {
    grid-area: bottom;
}
.aMain {
    grid-area: main;
    padding-top: 80px;
}

/* ---- Share ----------------------------------------------------------------- */

.aShare {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}
.aShare__label {
    font-size: 16px;
}
.aShare__links {
    display: flex;
    align-items: center;
    gap: 16px;
}
.aShare__links img {
    display: block;
    width: 24px;
    height: 24px;
}
.aShare__copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
}
.aShare__copy img {
    width: 29px;
    height: 29px;
}
.aShare__copy.is-copied {
    background: #e6f6ee;
}

/* ---- Contents -------------------------------------------------------------- */

.aToc {
    padding: 28px 20px 24px;
    border: 1px solid #f1f1f1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}
.aToc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1f2a44;
    font-family: var(--sp-font-600);
    font-size: 24px;
    list-style: none;
    cursor: pointer;
}
.aToc summary::-webkit-details-marker {
    display: none;
}
.aToc summary::after {
    content: "";
    width: 16px;
    height: 16px;
    background: var(--sp-slate);
    -webkit-mask: url("../images/booking/chevron.svg") center / 16px no-repeat;
    mask: url("../images/booking/chevron.svg") center / 16px no-repeat;
    transition: transform 0.2s;
}
.aToc[open] summary::after {
    transform: rotate(180deg);
}
.aToc__list {
    margin: 24px 0 0 !important;
    padding: 0 !important;
    list-style: none;
    counter-reset: toc;
}
.aToc__list li {
    display: flex;
    gap: 6px;
    padding: 8px 0;
    padding-inline-start: 24px;
    border-inline-start: 2px solid transparent;
    color: var(--sp-slate);
    counter-increment: toc;
    font-size: 16px;
    line-height: 20px;
}
.aToc__list li::before {
    content: counter(toc) ".";
    flex: none;
}
.aToc__list li:has(.is-current) {
    border-inline-start-color: var(--sp-navy);
    color: var(--sp-navy);
}
.aToc__list a {
    color: inherit;
}
.aToc__list a:hover,
.aToc__list a.is-current {
    color: var(--sp-navy);
}

/* ---- Article ---------------------------------------------------------------- */

.aMain__image {
    display: block;
    width: 100%;
    aspect-ratio: 816 / 410;
    border-radius: 20px;
    background: #f6e9e2;
    object-fit: cover;
}
.aMain__summary {
    margin-top: 32px !important;
    padding-inline-start: 20px;
    border-inline-start: 3px solid var(--sp-peach);
    color: var(--sp-slate);
    font-family: var(--sp-font-600);
    font-size: 20px;
    line-height: 32px;
}
.aBody {
    margin-top: 32px;
    color: var(--sp-slate);
    font-size: 20px;
    line-height: 32px;
    overflow-wrap: break-word;
}
.aBody > :first-child {
    margin-top: 0 !important;
}
.aBody p,
.aBody ul,
.aBody ol,
.aBody blockquote,
.aBody table,
.aBody figure {
    margin: 0 0 20px !important;
}
.aBody ul,
.aBody ol {
    padding-inline-start: 28px !important;
}
.aBody ul {
    list-style: disc;
}
.aBody li {
    margin-bottom: 8px;
}
.aBody h1,
.aBody h2,
.aBody h3,
.aBody h4,
.aBody h5,
.aBody h6 {
    margin: 48px 0 16px !important;
    color: var(--sp-navy);
    font-family: var(--sp-font-700);
    scroll-margin-top: 120px;
}
.aBody h1,
.aBody h2 {
    font-size: 32px;
    line-height: 40px;
}
.aBody h3 {
    font-size: 26px;
    line-height: 34px;
}
.aBody h4,
.aBody h5,
.aBody h6 {
    font-size: 21px;
    line-height: 30px;
}
.aBody a {
    color: var(--sp-navy);
    text-decoration: underline;
}
.aBody strong,
.aBody b {
    font-family: var(--sp-font-700);
}
.aBody img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}
.aBody blockquote {
    padding: 16px 20px;
    border-inline-start: 4px solid var(--sp-peach);
    border-radius: 8px;
    background: #fdf6f2;
}
.aBody table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 16px;
}
.aBody th,
.aBody td {
    padding: 10px 12px;
    border: 1px solid var(--sp-line);
}
.aBody iframe {
    max-width: 100%;
}

/* ---- Assessment box --------------------------------------------------------- */

/* The box is moved inside .aBody by blog-article.js, so its rules are scoped
   to win over the article's own heading, list and link styles. */

.aCta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 48px 0 !important;
    padding: 36px 32px 32px 40px;
    border-radius: 30px;
    background: #f7ede8;
}
html:lang(ar) .aCta {
    padding: 36px 40px 32px 32px;
}
.aCta__text {
    flex: 1;
}
.aCta .aCta__title {
    margin: 0 !important;
    color: #0f172a;
    font-family: var(--sp-font-700);
    font-size: 32px;
    line-height: 40px;
}
.aCta .aCta__lead {
    margin: 20px 0 0 !important;
    color: #0f172a;
    font-size: 16px;
    line-height: 24px;
}
.aCta .aCta__points {
    margin: 16px 0 0 !important;
    padding-inline-start: 16px !important;
    list-style: disc !important;
}
.aCta .aCta__points li {
    margin: 6px 0 0;
    color: var(--sp-slate);
    font-family: var(--sp-font-600);
    font-size: 16px;
    line-height: 24px;
}
.aCta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 24px;
}
.aCta .aCta__test,
.aCta .aCta__browse {
    display: inline-flex;
    text-decoration: none;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 100px;
    font-family: var(--sp-font-700);
    font-size: 18px;
}
.aCta .aCta__test,
.aCta .aCta__test:hover,
.aCta .aCta__test:focus {
    background: var(--sp-navy);
    color: #fff;
}
.aCta .aCta__browse,
.aCta .aCta__browse:hover,
.aCta .aCta__browse:focus {
    background: #eaf2fd;
    color: var(--sp-navy);
}
.aCta .aCta__art {
    flex: none;
    border-radius: 0;
    width: 310px;
    max-width: 40%;
    height: auto;
}

.aTags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px !important;
}

/* ---- Most read -------------------------------------------------------------- */

.aRead {
    padding: 28px 20px;
    border: 1px solid #f1f1f1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}
.aRead__title {
    color: #1f2a44;
    font-family: var(--sp-font-600);
    font-size: 24px;
}
.aRead li {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.aRead__image {
    flex: none;
}
.aRead__image img {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
}
.aRead__link {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    font-family: var(--sp-font-700);
    font-size: 17px;
    line-height: 24px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.aRead__link:hover {
    color: var(--sp-navy);
}

/* ---- App banner ------------------------------------------------------------- */

.aApp {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-top: 110px;
    padding: 56px;
    border-radius: 30px;
    background: #fff4e3;
}
.aApp__text {
    max-width: 520px;
}
.aApp__text p {
    color: var(--sp-navy);
    font-family: var(--sp-font-600);
    font-size: 18px;
    line-height: 26px;
}
.aApp__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}
.aApp__stores img {
    height: 58px;
}
.aApp__art {
    width: 315px;
    max-width: 40%;
    height: auto;
    margin: -110px 60px -40px 0;
}
html:lang(ar) .aApp__art {
    margin: -110px 0 -40px 60px;
}

.aRelated {
    margin-top: 90px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .aToc summary {
        pointer-events: none;
    }
    .aToc summary::after {
        display: none;
    }
}

/* ---- Tablet ----------------------------------------------------------------- */

@media (max-width: 1199px) {
    .aHead__title {
        font-size: 40px;
        line-height: 48px;
    }
    .aLayout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
    .aCta {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
    .aCta .aCta__art {
        max-width: 60%;
    }
}

/* ---- Phone ------------------------------------------------------------------ */

@media (max-width: 767px) {
    .aPage::before {
        height: 820px;
    }
    .aPage::after {
        display: none;
    }
    .aHead {
        padding-top: 24px;
    }
    .aCrumbs {
        font-size: 14px;
    }
    .aHead__title {
        margin-top: 16px !important;
        font-size: 26px;
        line-height: 32px;
    }
    .aHead__meta {
        gap: 12px 20px;
        font-size: 12px;
    }
    .aLayout {
        grid-template-areas:
            "top"
            "main"
            "bottom";
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-top: 20px;
    }
    .aAside--top {
        gap: 12px;
        margin-top: 0;
    }
    .aMain {
        padding-top: 0;
    }
    .aShare {
        padding: 12px;
    }
    .aShare__label {
        font-size: 14px;
    }
    .aShare__links {
        gap: 12px;
    }
    .aShare__links img {
        width: 20px;
        height: 20px;
    }
    .aToc {
        padding: 14px 16px;
        border-radius: 12px;
    }
    .aToc summary {
        font-size: 20px;
    }
    .aToc__list {
        margin-top: 12px !important;
    }
    .aToc__list li {
        padding-inline-start: 12px;
    }
    .aMain__image {
        aspect-ratio: 327 / 400;
    }
    .aMain__summary {
        font-size: 17px;
        line-height: 28px;
    }
    .aBody {
        margin-top: 24px;
        font-size: 17px;
        line-height: 28px;
    }
    .aBody h1,
    .aBody h2 {
        margin-top: 36px !important;
        font-size: 24px;
        line-height: 32px;
    }
    .aBody h3 {
        font-size: 21px;
        line-height: 28px;
    }
    .aCta {
        padding: 24px 20px !important;
        border-radius: 20px;
    }
    .aCta .aCta__title {
        font-size: 22px;
        line-height: 30px;
    }
    .aCta__actions {
        gap: 12px;
    }
    .aCta .aCta__test,
    .aCta .aCta__browse {
        font-size: 16px;
    }
    .aCta .aCta__art {
        max-width: 80%;
        align-self: center;
    }
    .aApp {
        flex-direction: column-reverse;
        align-items: stretch;
        width: auto;
        max-width: none;
        margin-top: 64px;
        padding: 0 20px 36px;
        border-radius: 0;
    }
    .aApp__art,
    html:lang(ar) .aApp__art {
        align-self: center;
        width: 260px;
        max-width: 80%;
        margin: -24px 0 0;
    }
    .aApp__text p {
        font-size: 15px;
        line-height: 22px;
    }
    .aApp__stores img {
        height: 48px;
    }
    .aRelated {
        margin-top: 56px;
    }
}

/* ---- Phone contents sheet (Figma "Employee Dashboard" frames, option 1) ----- */

.aSheet[hidden] {
    display: none;
}
.aSheet {
    position: fixed;
    inset: 0;
    z-index: 10000; /* above the floating WhatsApp button (9999) */
    display: flex;
    align-items: flex-end;
    background: rgba(15, 23, 42, 0);
    transition: background 0.25s ease;
}
.aSheet.is-open {
    background: rgba(15, 23, 42, 0.12);
}
.aSheet__panel {
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 20px 28px;
    border-radius: 20px 20px 0 0;
    background: #fff;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
    transform: translateY(100%);
    transition: transform 0.25s ease;
}
.aSheet.is-open .aSheet__panel {
    transform: none;
}
.aSheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.aSheet__title {
    color: #1f2a44;
    font-family: var(--sp-font-600);
    font-size: 20px;
    line-height: 28px;
}
.aSheet__close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-inline-end: -10px;
    padding: 0;
    border: 0;
    background: none;
}
.aSheet .aSheet__list {
    margin-top: 12px !important;
}
.aSheet .aSheet__list li {
    padding: 8px 0;
    border: 0;
    color: #1f2a44;
    font-size: 17px;
    line-height: 22px;
}
.aSheet .aSheet__list li:has(.is-current) {
    color: var(--sp-navy);
}
html.aSheet-lock,
html.aSheet-lock body {
    overflow: hidden;
}
@media (max-width: 767px) {
    .aToc.is-sheet-open {
        border-color: var(--sp-coral);
    }
    .aToc.is-sheet-open summary {
        color: var(--sp-navy);
    }
    .aToc.is-sheet-open summary::after {
        background: var(--sp-coral);
        transform: rotate(180deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .aSheet,
    .aSheet__panel {
        transition: none;
    }
}
