/* ==========================================================================
   Component: package card  (partials/site/package-card)
   --------------------------------------------------------------------------
   The number of sessions sits in the accent's concentric rings (the و
   window), beside the name and the service it belongs to. Below: summary,
   a tinted price panel (full price · per session · saving chip), package
   length · session length, what it includes, the actions. A featured card
   («الأكثر طلباً») gets the accent border, a badge and a soft lift.
   Inside .pkg-grid each card spans the grid's rows through subgrid, so
   names, prices, facts and buttons line up across the row.
   ========================================================================== */

.pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: var(--space-6) var(--space-5);
    align-items: stretch;
}

.pkg {
    position: relative;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 6;
    row-gap: var(--space-4);
    padding: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.pkg--compact { grid-row: span 5; }
.pkg::before {                          /* the accent strip along the top */
    content: "";
    position: absolute;
    inset: 0 var(--space-6) auto;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: var(--accent);
}
.pkg:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-4px); }

.pkg--featured {
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-md);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--card)) 0, var(--card) 40%);
}
.pkg__badge {
    position: absolute;
    top: 0;
    inset-inline-start: 50%;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.35em 1em;
    border-radius: var(--r-pill);
    background: var(--ink);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}
[dir="rtl"] .pkg__badge { transform: translate(50%, -50%); }
.pkg__badge .icon { color: var(--rating); }

/* Head — sessions ring + name */
.pkg__head { display: flex; align-items: center; gap: var(--space-4); }
.pkg__count {
    position: relative;
    display: grid;
    flex-shrink: 0;
    place-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 22%, #fff);
    box-shadow: 0 0 0 5px var(--card), 0 0 0 6.5px color-mix(in srgb, var(--accent) 70%, transparent),
                0 0 0 11px var(--card), 0 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);
    text-align: center;
    line-height: 1;
}
.pkg--featured .pkg__count { box-shadow: 0 0 0 5px transparent, 0 0 0 6.5px color-mix(in srgb, var(--accent) 70%, transparent),
                                         0 0 0 11px transparent, 0 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.pkg__count b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 400; }
.pkg__count small { margin-top: 0.2em; color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 600; }
.pkg__count .icon { width: 30px; height: 30px; color: var(--ink); }
.pkg__title { min-width: 0; }
.pkg__name { font-size: var(--fs-lg); line-height: var(--lh-tight); }
.pkg__for { margin-top: 0.35em; color: var(--ink-faint); font-size: var(--fs-xs); }
.pkg__for a { color: var(--ink-soft); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent); text-underline-offset: 3px; }
.pkg__for a:hover { color: var(--ink); }

.pkg__summary { color: var(--ink-soft); line-height: 1.8; }

/* Price panel */
.pkg__price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
    padding: var(--space-4);
    border-radius: var(--r-lg, 16px);
    background: var(--panel);
}
.pkg__price-label { color: var(--ink-faint); font-size: var(--fs-xs); }
.pkg__amount { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 400; line-height: 1.1; }
.pkg__amount--text { font-size: var(--fs-lg); font-family: var(--font-body); font-weight: 700; }
.pkg__per { color: var(--ink-soft); font-size: var(--fs-sm); }
.pkg__saving {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin-top: 0.3em;
    padding: 0.3em 0.8em;
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--sage) 35%, #fff);
    color: color-mix(in srgb, var(--sage) 35%, var(--ink-deep));
    font-size: var(--fs-xs);
    font-weight: 600;
}

/* Package length · session length */
.pkg__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--space-3); align-content: start; }
.pkg__facts div { padding-inline-start: var(--space-3); border-inline-start: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); }
.pkg__facts dt { display: flex; align-items: center; gap: 0.35em; color: var(--ink-faint); font-size: var(--fs-xs); }
.pkg__facts dt .icon { width: 14px; height: 14px; }
.pkg__facts dd { margin: 0.2em 0 0; font-size: var(--fs-sm); font-weight: 600; }

/* What it includes */
.pkg__label { margin-bottom: var(--space-2); color: var(--ink-faint); font-size: var(--fs-xs); }
.pkg__includes { display: grid; gap: var(--space-2); }
.pkg__includes li { display: flex; align-items: flex-start; gap: var(--space-2); line-height: 1.7; }
.pkg__includes .icon { flex-shrink: 0; margin-top: 0.3em; color: var(--second-text); }

/* Actions */
.pkg__actions { display: grid; gap: var(--space-3); align-self: end; }
.pkg__wa { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); color: var(--ink); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.pkg__wa .icon { color: var(--whatsapp); }
.pkg__wa:hover { color: var(--second-text); }

@media (prefers-reduced-motion: reduce) {
    .pkg:hover { transform: none; }
}
