/* ==========================================================================
   EasyRiyada — the public catalogue pages (/specialties, /sports)
   Built 2026-11-10 on the "printed annual" composition: a vertical axis the
   page hangs from, colour used in solid blocks the way a two-colour print job
   uses it, and content carried at full density rather than in icon cards.
   Palette and type are the site's own (landing.css), not a new look.
   ========================================================================== */

:root {
    --cat-ink: #132c27;
    --cat-ink-soft: #4a5d58;
    --cat-paper: #ffffff;
    --cat-paper-2: #f4f8f6;
    --cat-green: #00845a;
    --cat-green-deep: #0a4b3a;
    --cat-line: #dfe9e5;
    /* The axis the whole page hangs from. 42% on a desktop, collapsed on a phone. */
    --cat-axis: 42%;
}

/*
 * The axis was composed for Arabic. Nothing here is direction-specific -- the whole sheet uses
 * logical properties, so the page mirrors correctly on its own -- but mirroring a 42% offset into
 * English puts the headline past the middle of the page and leaves the void exactly where an
 * English reader's eye starts. The composition is kept; only the size of its offset changes.
 *
 * Confined to the desktop range on purpose: below 860px the axis collapses and the grids are
 * given an explicit single column, and an override out here would outrank that reset.
 */
@media (min-width: 861px) {
    :root[dir="ltr"] {
        --cat-axis: 26%;
    }
}

body.catalog-page {
    background: var(--cat-paper);
    color: var(--cat-ink);
    font-family: Tajawal, Arial, sans-serif;
    overflow-x: hidden;
}

.cat-wrap {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

/* --- the first screen: a composed void, then the statement on the axis ---- */

.cat-head {
    /* The site header is fixed at 78px; the void is what remains above the statement. */
    padding: clamp(132px, 17vh, 212px) 0 clamp(56px, 8vh, 92px);
}

.cat-head__grid {
    display: grid;
    grid-template-columns: var(--cat-axis) 1fr;
    align-items: end;
    gap: clamp(24px, 4vw, 56px);
}

/* Left of the axis: the figure that makes the claim concrete. */
.cat-head__figure {
    align-self: end;
}

.cat-head__figure b {
    display: block;
    font-size: clamp(56px, 7vw, 104px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--cat-green);
}

.cat-head__figure span {
    display: block;
    margin-top: 10px;
    max-width: 30ch;
    font-size: 17px;
    line-height: 1.7;
    color: var(--cat-ink-soft);
}

.cat-head h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5.4vw, 74px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.cat-head__lead {
    margin: 0 0 28px;
    max-width: 46ch;
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.75;
    color: var(--cat-ink-soft);
}

/* /sports: a minimal title band instead of /specialties' full stat hero. */
.cat-head--sports {
    padding: clamp(96px, 13vh, 132px) 0 clamp(28px, 4vh, 40px);
}

.cat-head--sports h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 3.6vw, 40px);
    letter-spacing: -0.02em;
}

.cat-head--sports .cat-head__lead {
    margin: 0;
    max-width: 62ch;
    font-size: clamp(15px, 1.2vw, 17px);
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border: 0;
    border-radius: 0;
    background: var(--cat-green);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s ease;
}

.cat-btn:hover {
    background: var(--cat-green-deep);
}

.cat-btn--ghost {
    background: transparent;
    color: var(--cat-ink);
    box-shadow: inset 0 0 0 2px var(--cat-ink);
}

.cat-btn--ghost:hover {
    background: var(--cat-ink);
    color: #fff;
}

/* --- a section ------------------------------------------------------------ */

.cat-section {
    padding: clamp(72px, 11vh, 132px) 0;
}

.cat-section--paper {
    background: var(--cat-paper-2);
}

/* A whole section in one flat colour: the two-colour print job's second plate. */
.cat-section--ink {
    background: var(--cat-green-deep);
    color: #fff;
}

.cat-section__head {
    display: grid;
    grid-template-columns: var(--cat-axis) 1fr;
    gap: clamp(24px, 4vw, 56px);
    margin-bottom: clamp(36px, 5vw, 64px);
}

.cat-section__head h2 {
    grid-column: 2;
    margin: 0;
    font-size: clamp(27px, 3.2vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.cat-section__head p {
    grid-column: 2;
    margin: 12px 0 0;
    max-width: 52ch;
    font-size: 17px;
    line-height: 1.8;
    color: var(--cat-ink-soft);
}

.cat-section--ink .cat-section__head p {
    color: rgba(255, 255, 255, .82);
}

/* --- the specialties: editorial entries, not cards ------------------------ */

.cat-entry {
    display: grid;
    grid-template-columns: var(--cat-axis) 1fr;
    gap: clamp(20px, 4vw, 56px);
    padding: clamp(32px, 4vw, 52px) 0;
    border-top: 1px solid var(--cat-line);
}

.cat-entry:last-child {
    border-bottom: 1px solid var(--cat-line);
}

.cat-entry__name {
    margin: 0;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cat-entry__name a {
    color: inherit;
    text-decoration: none;
}

.cat-entry__name a:hover {
    color: var(--cat-green);
}

.cat-entry__meta {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--cat-ink-soft);
}

.cat-entry__summary {
    margin: 0 0 20px;
    max-width: 54ch;
    font-size: 17px;
    line-height: 1.8;
    color: var(--cat-ink);
}

/* The services under a specialty: a real list, set as a list. */
.cat-services {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 2px;
}

.cat-services li {
    padding: 11px 0;
    border-bottom: 1px solid var(--cat-line);
    font-size: 16px;
    line-height: 1.6;
}

.cat-services li:first-child {
    border-top: 1px solid var(--cat-line);
}

.cat-services b {
    font-weight: 700;
}

.cat-services small {
    display: block;
    margin-top: 3px;
    color: var(--cat-ink-soft);
    line-height: 1.65;
}

.cat-entry__go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--cat-green);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.cat-entry__go:hover {
    text-decoration: underline;
}

/* --- the sports controls: search, filter, count --------------------------- */

.cat-controls {
    margin-bottom: clamp(28px, 3.5vw, 40px);
}

.cat-search {
    margin-bottom: 14px;
}

.cat-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.cat-search input {
    width: 100%;
    max-width: 420px;
    display: block;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    box-shadow: inset 0 0 0 2px var(--cat-line);
    background: #fff;
    color: var(--cat-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    transition: box-shadow .15s ease;
}

.cat-search input::placeholder {
    color: var(--cat-ink-soft);
}

.cat-search input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--cat-green);
}

.cat-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cat-filter__btn {
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    box-shadow: inset 0 0 0 2px var(--cat-line);
    background: #fff;
    color: var(--cat-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.cat-filter__btn:hover {
    box-shadow: inset 0 0 0 2px var(--cat-green);
    color: var(--cat-green);
}

.cat-filter__btn[aria-pressed="true"] {
    background: var(--cat-ink);
    color: #fff;
    box-shadow: inset 0 0 0 2px var(--cat-ink);
}

/* Shown only once a search term or a non-"all" filter is active, so there is always an easy way
   back to the full list -- never a dead end a visitor has to reconstruct by hand. */
.cat-clear {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    background: transparent;
    color: var(--cat-ink-soft);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.cat-clear:hover {
    color: var(--cat-ink);
}

.cat-clear[hidden] {
    display: none !important;
}

.cat-count {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--cat-ink-soft);
}

/* --- the sports grid: cards ------------------------------------------------ */

.cat-grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 20px;
}

.cat-grid li {
    display: flex;
}

.cat-card {
    width: 100%;
    display: flex;
}

.cat-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 22px;
    box-shadow: inset 0 0 0 1px var(--cat-line);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease;
}

.cat-card__link:hover,
.cat-card__link:focus-visible {
    box-shadow: inset 0 0 0 2px var(--cat-green);
    transform: translateY(-3px);
}

.cat-card__link:focus-visible {
    outline: none;
}

.cat-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.cat-card__icon {
    font-size: 28px;
    line-height: 1;
}

.cat-card__badge {
    flex: none;
    padding: 4px 10px;
    background: var(--cat-paper-2);
    color: var(--cat-ink-soft);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.6;
    white-space: nowrap;
}

.cat-card__badge--adaptive {
    background: var(--cat-green);
    color: #fff;
}

.cat-card__name {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.cat-card__link:hover .cat-card__name {
    color: var(--cat-green);
}

.cat-card__summary {
    display: block;
    margin-bottom: 18px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--cat-ink-soft);
    /* Three lines everywhere, so every card in a row ends at the same height whatever its
       sport's description happens to run to. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card__cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cat-green);
    font-size: 14px;
    font-weight: 800;
}

.cat-card__arrow {
    display: inline-block;
    transition: transform .18s ease;
}

/* The glyph itself is chosen server-side per direction; this only animates it "forward" on hover,
   which is leftward on an RTL page and rightward on an LTR one. */
.cat-card__link:hover .cat-card__arrow {
    transform: translateX(-4px);
}

:root[dir="ltr"] .cat-card__link:hover .cat-card__arrow {
    transform: translateX(4px);
}

/* The "no sports catalogued at all" fallback, styled plainly since it never sits beside a card. */
.cat-sports__name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.cat-empty {
    margin: 24px 0 0;
    font-size: 17px;
    color: var(--cat-ink-soft);
}

.cat-empty[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .cat-card__link,
    .cat-card__arrow {
        transition: none;
    }
}

/* --- the colour block: the adaptive statement, carried by real pictures ---- */

.cat-plate__grid {
    display: grid;
    grid-template-columns: var(--cat-axis) 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

.cat-plate h2 {
    margin: 0 0 16px;
    font-size: clamp(27px, 3.4vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.cat-plate p {
    margin: 0 0 14px;
    max-width: 50ch;
    font-size: 17px;
    line-height: 1.85;
    color: rgba(255, 255, 255, .86);
}

.cat-plate__figure b {
    display: block;
    font-size: clamp(64px, 8vw, 128px);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: #6fe3b4;
}

.cat-plate__figure span {
    display: block;
    margin-top: 10px;
    max-width: 24ch;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .8);
}

/* Gutterless mosaic: photographs butted together, one treatment, square corners. */
.cat-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: clamp(36px, 5vw, 64px);
}

.cat-mosaic figure {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0a3a2d;
}

.cat-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.06);
}

.cat-mosaic figcaption {
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    padding: 10px 14px;
    background: rgba(10, 58, 45, .86);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.5;
}

/* --- close ---------------------------------------------------------------- */

.cat-close__grid {
    display: grid;
    grid-template-columns: var(--cat-axis) 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: end;
}

.cat-close h2 {
    margin: 0 0 16px;
    font-size: clamp(27px, 3.4vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.cat-close p {
    margin: 0 0 24px;
    max-width: 50ch;
    font-size: 17px;
    line-height: 1.8;
    color: var(--cat-ink-soft);
}

/*
 * The closing section was the only one whose axis column held literally nothing, so it read as a
 * blank half-page rather than a composition. It now carries the same figure-and-caption pair the
 * opening section uses, at a smaller size so it supports the call to action instead of competing
 * with it. The number is counted from the catalogue, never written by hand.
 */
.cat-close__figure {
    align-self: end;
}

.cat-close__figure b {
    display: block;
    font-size: clamp(40px, 4.4vw, 64px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--cat-green);
}

.cat-close__figure span {
    display: block;
    margin-top: 8px;
    max-width: 24ch;
    font-size: 15px;
    line-height: 1.6;
    color: var(--cat-ink-soft);
}

.cat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cat-credits {
    padding: 28px 0 40px;
    color: #76867f;
    font-size: 13.5px;
    line-height: 1.8;
}

.cat-credits a {
    color: #5b6e68;
}

/* --- motion: entrances, reduced-motion safe ------------------------------- */

/* --- phone ---------------------------------------------------------------- */

@media (max-width: 860px) {
    :root {
        --cat-axis: 1fr;
    }

    .cat-wrap {
        width: min(100% - 32px, 1180px);
    }

    .cat-head {
        padding: clamp(104px, 15vh, 150px) 0 56px;
    }

    .cat-head__grid,
    .cat-section__head,
    .cat-entry,
    .cat-plate__grid,
    .cat-close__grid {
        grid-template-columns: 1fr;
    }

    .cat-section__head h2,
    .cat-section__head p {
        grid-column: 1;
    }

    /* On a phone the figure reads better after the claim it belongs to. */
    .cat-head__figure,
    .cat-close__figure {
        order: 2;
        margin-top: 32px;
    }

    .cat-mosaic {
        grid-template-columns: 1fr 1fr;
    }

    .cat-mosaic figure:last-child {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 9;
    }

    .cat-grid {
        grid-template-columns: 1fr;
    }

    .cat-search input {
        max-width: none;
    }

    .cat-head--sports {
        padding: clamp(88px, 14vh, 120px) 0 28px;
    }
}

@media (max-width: 520px) {
    .cat-btn,
    .cat-actions .cat-btn {
        width: 100%;
    }
}
