.articles-page,
.articles-page * {
    box-sizing: border-box;
}

.articles-page {
    --ap-primary: var(--ahbab-red);
    --ap-dark: var(--ahbab-red-dark);
    --ap-gold: var(--ahbab-gold);
    --ap-yellow: var(--ahbab-yellow);
    --ap-bg: var(--ahbab-bg);
    --ap-panel: var(--ahbab-panel);
    --ap-text: var(--ahbab-text);
    --ap-muted: var(--ahbab-muted);
    --ap-line: color-mix(in srgb, var(--ap-gold) 26%, transparent);
    color: var(--ap-text);
    overflow-x: clip;
}

.articles-shell {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.articles-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--ap-line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 10% 15%, color-mix(in srgb, var(--ap-gold) 20%, transparent), transparent 32%),
        radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--ap-primary) 55%, transparent), transparent 36%),
        linear-gradient(135deg, var(--ap-bg), var(--ap-dark) 52%, var(--ap-bg));
    box-shadow: 0 26px 70px rgba(0, 0, 0, .34);
}

.articles-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
}

.articles-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.articles-logo {
    width: 82px;
    height: 82px;
    flex: 0 0 auto;
    padding: 8px;
    border: 1px solid var(--ap-line);
    border-radius: 24px;
    background: rgba(0, 0, 0, .22);
    object-fit: contain;
}

.articles-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--ap-gold);
    font-weight: 900;
}

.articles-hero h1 {
    margin: 0;
    color: var(--ap-text);
    font-size: clamp(2rem, 4.2vw, 4.15rem);
    font-weight: 950;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.articles-hero-meta,
.articles-type-strip,
.articles-statline,
.articles-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.articles-hero-meta {
    margin-top: 18px;
}

.articles-meta-pill,
.articles-type-chip,
.articles-page-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ap-line);
    background: rgba(255, 255, 255, .055);
    color: var(--ap-text);
    font-weight: 850;
    text-decoration: none;
}

.articles-meta-pill {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ap-muted);
    font-size: .9rem;
}

.articles-count {
    display: grid;
    place-items: center;
    min-width: 132px;
    min-height: 126px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--ap-gold) 36%, transparent);
    border-radius: 28px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ap-gold) 17%, transparent), rgba(0, 0, 0, .18));
    text-align: center;
}

.articles-count strong {
    display: block;
    color: var(--ap-gold);
    font-size: 2.7rem;
    font-weight: 950;
    line-height: 1;
}

.articles-count span {
    display: block;
    margin-top: 5px;
    color: var(--ap-muted);
    font-weight: 800;
}

.articles-toolbar {
    padding: 20px;
    border: 1px solid var(--ap-line);
    border-radius: 26px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ap-panel) 94%, transparent), color-mix(in srgb, var(--ap-bg) 95%, transparent));
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.articles-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--ap-muted);
    font-weight: 850;
}

.articles-input,
.articles-select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    outline: none;
    background: rgba(255, 255, 255, .07);
    color: var(--ap-text);
    font-size: 16px;
}

.articles-input:focus,
.articles-select:focus {
    border-color: var(--ap-gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-gold) 14%, transparent);
}

.articles-select option {
    background: var(--ap-bg);
    color: var(--ap-text);
}

.articles-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.articles-btn,
.articles-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 16px;
    font-weight: 950;
    text-decoration: none;
}

.articles-btn {
    border: 0;
    background: linear-gradient(135deg, var(--ap-yellow), var(--ap-gold));
    color: var(--ap-bg);
    cursor: pointer;
}

.articles-btn-outline {
    border: 1px solid var(--ap-line);
    background: rgba(255, 255, 255, .06);
    color: var(--ap-text);
}

.articles-type-strip {
    margin-top: 18px;
}

.articles-type-chip {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: .92rem;
}

.articles-type-chip.active,
.articles-type-chip:hover,
.articles-page-chip.active,
.articles-page-chip:hover {
    border-color: transparent;
    background: linear-gradient(135deg, var(--ap-yellow), var(--ap-gold));
    color: var(--ap-bg);
}

.articles-lead {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ap-line);
    border-radius: 30px;
    background: linear-gradient(180deg, var(--ap-panel), var(--ap-bg));
    box-shadow: 0 20px 58px rgba(0, 0, 0, .28);
}

.articles-lead-image {
    position: relative;
    min-height: 410px;
    overflow: hidden;
    background: var(--ap-bg);
}

.articles-lead-image::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--ap-bg) 88%, transparent));
    content: "";
    pointer-events: none;
}

.articles-lead-image img,
.articles-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.articles-lead-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(22px, 4vw, 36px);
}

.articles-badge {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 7px 13px;
    border: 1px solid color-mix(in srgb, var(--ap-gold) 32%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--ap-gold) 15%, transparent);
    color: var(--ap-gold);
    font-size: .85rem;
    font-weight: 900;
}

.articles-lead h2,
.articles-card h3 {
    overflow-wrap: anywhere;
    font-weight: 950;
}

.articles-lead h2 {
    margin: 16px 0 12px;
    font-size: clamp(1.55rem, 2.5vw, 2.45rem);
    line-height: 1.45;
}

.articles-lead h2 a,
.articles-card h3 a {
    color: var(--ap-text);
    text-decoration: none;
}

.articles-excerpt,
.articles-card p {
    color: var(--ap-muted);
    line-height: 1.9;
}

.articles-excerpt {
    margin: 0 0 18px;
}

.articles-statline {
    color: var(--ap-muted);
    font-size: .9rem;
}

.articles-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.articles-section-head h2 {
    margin: 0;
    color: var(--ap-text);
    font-weight: 950;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    min-width: 0;
}

.articles-card {
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ap-line);
    border-radius: 26px;
    background: linear-gradient(180deg, var(--ap-panel), var(--ap-bg));
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
    transition: transform .18s ease, border-color .18s ease;
}

.articles-card:hover {
    border-color: color-mix(in srgb, var(--ap-gold) 55%, transparent);
    transform: translateY(-4px);
}

.articles-card-image {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ap-bg);
}

.articles-card-image img {
    transition: transform .28s ease;
}

.articles-card:hover .articles-card-image img {
    transform: scale(1.04);
}

.articles-card-body {
    padding: 18px;
}

.articles-card h3 {
    margin: 9px 0;
    font-size: 1.1rem;
    line-height: 1.65;
}

.articles-card p {
    min-height: 56px;
    margin: 0;
}

.articles-empty {
    padding: 34px;
    border: 1px dashed color-mix(in srgb, var(--ap-gold) 38%, transparent);
    border-radius: 26px;
    background: rgba(255, 255, 255, .045);
    color: var(--ap-muted);
    text-align: center;
}

.articles-empty .articles-btn-outline {
    margin-top: 16px;
}

.articles-pagination {
    justify-content: center;
}

.articles-page-chip {
    min-width: 44px;
    min-height: 42px;
    padding: 7px 12px;
    border-radius: 14px;
}

.articles-page-chip[aria-disabled="true"] {
    opacity: .58;
}

.articles-page-chip.wide {
    padding-inline: 16px;
}

.articles-page :where(a, button, input, select):focus-visible {
    outline: 3px solid var(--ap-gold);
    outline-offset: 3px;
}

.articles-protected :where(.articles-hero, .articles-lead, .articles-grid, .articles-section-head) {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.articles-protected img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

@media print {
    .articles-protected {
        display: none !important;
    }
}

@media (max-width: 1199px) {
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .articles-lead {
        grid-template-columns: 1fr;
    }

    .articles-lead-image {
        min-height: 300px;
    }
}

@media (max-width: 767px) {
    .articles-hero {
        padding: 22px 16px;
        border-radius: 24px;
    }

    .articles-hero-grid {
        grid-template-columns: 1fr;
    }

    .articles-logo {
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }

    .articles-count {
        min-width: 100%;
        min-height: 92px;
        border-radius: 22px;
    }

    .articles-toolbar {
        padding: 16px;
        border-radius: 22px;
    }

    .articles-toolbar .row > [class*="col-"] {
        min-width: 0;
    }

    .articles-type-strip {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    .articles-type-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .articles-lead {
        border-radius: 24px;
    }

    .articles-lead-image {
        min-height: 230px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .articles-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .articles-card {
        border-radius: 22px;
    }

    .articles-card p {
        min-height: 0;
    }
}

@media (max-width: 575px) {
    .articles-brand {
        display: grid;
        grid-template-columns: 62px minmax(0, 1fr);
        align-items: center;
    }

    .articles-statline {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .articles-card-body {
        padding: 15px;
    }

    .articles-page-chip.wide {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .articles-card,
    .articles-card-image img {
        transition: none;
    }
}
