:root {
    --apof-news-accent: #c4420f;
    --apof-news-accent-strong: #e8551c;
    --apof-news-heading: #3c3c3c;
    --apof-news-text: #f5efe9;
    --apof-news-muted: rgba(255, 255, 255, 0.82);
    --apof-news-grid-text: #504f4f;
    --apof-news-radius: 18px;
    --apof-news-gap: 18px;
    --apof-news-card-h: 520px;
    --apof-news-font-primary: "Open Sans", sans-serif;
    --apof-news-font-condensed: "Open Sans Condensed", sans-serif;
    --apof-news-font-decorative: "Jost", sans-serif;
    --apof-news-size-h1-hero: clamp(38px, 7vw, 84px);
    --apof-news-size-h1: clamp(34px, 5vw, 60px);
    --apof-news-size-h2: clamp(26px, 3.5vw, 40px);
    --apof-news-size-h3: clamp(22px, 2.6vw, 30px);
    --apof-news-size-body: clamp(15px, 1.2vw, 16px);
    --apof-news-size-body-sm: clamp(13px, 1vw, 14px);
    --apof-news-label-size: clamp(11px, 0.9vw, 12px);
    --apof-news-label-weight: 700;
    --apof-news-label-spacing: 0.1em;
}

.apof-news {
    width: 100%;
}

.apof-news__inner,
.apof-news__grid-inner {
    width: 100%;
    min-width: 0;
}

.apof-news__header,
.apof-news__grid-header {
    margin: 0 0 28px;
}

.apof-news__title,
.apof-news__grid-title {
    margin: 0;
    color: var(--apof-news-heading);
    font-size: clamp(2rem, 2.5vw, 2.8rem);
    font-weight: 300;
    line-height: 1.06;
}

.apof-news__slider {
    overflow: hidden;
}

.apof-news__track {
    display: flex;
    min-width: 0;
}

.apof-news__slide {
    min-width: 0;
    height: auto;
}

.apof-news__pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 32px;
}

.apof-news--has-pagination .apof-news__pagination {
    display: flex;
}

.apof-news__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    border-radius: 50%;
    background: rgba(60, 60, 60, 0.3);
    opacity: 1;
    transition: 0.2s ease;
}

.apof-news__pagination .swiper-pagination-bullet-active {
    width: 22px;
    border-radius: 999px;
    background: var(--apof-news-accent);
}

.apof-news__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--apof-news-gap);
}

.apof-news__grid-item {
    min-width: 0;
}

.apof-news__pagination-nav {
    margin-top: 30px;
}

.apof-news__pagination-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.apof-news__pagination-item .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(60, 60, 60, 0.16);
    border-radius: 999px;
    background: #fff;
    color: var(--apof-news-heading);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.apof-news__pagination-item .page-numbers.current {
    border-color: var(--apof-news-accent);
    background: var(--apof-news-accent);
    color: #fff;
}

.apof-news__pagination-item .page-numbers:hover,
.apof-news__pagination-item .page-numbers:focus-visible {
    border-color: var(--apof-news-accent);
    color: var(--apof-news-accent);
    transform: translateY(-1px);
    outline: none;
}

.apof-news__pagination-item .page-numbers.current:hover,
.apof-news__pagination-item .page-numbers.current:focus-visible {
    color: #fff;
}

.apof-news-card {
    position: relative;
    display: flex;
    min-height: var(--apof-news-card-h);
    height: 100%;
    overflow: hidden;
    border-radius: var(--apof-news-radius);
    background: #201b18;
    color: var(--apof-news-text);
    text-decoration: none;
    isolation: isolate;
}

.apof-news-card::before,
.apof-news-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.apof-news-card::before {
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(6, 6, 6, 0.42) 0%, rgba(6, 6, 6, 0.34) 26%, rgba(6, 6, 6, 0.52) 58%, rgba(6, 6, 6, 0.84) 100%);
}

.apof-news-card::after {
    z-index: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.04) 62%);
}

.apof-news-card__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.apof-news-card__media .apof-news-card__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    min-width: 100%;
    min-height: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    transform: scale(1);
    transition: transform 0.7s ease;
}

.apof-news-card__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 34px 28px 28px;
}

.apof-news-card__eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    margin-bottom: 20px;
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(21, 21, 21, 0.52);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.apof-news-card__title {
    max-width: 16ch;
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(1.45rem, 1.65vw, 1.95rem);
    font-weight: 300;
    line-height: 1.18;
    text-wrap: pretty;
}

.apof-news-card__excerpt {
    display: -webkit-box;
    max-width: 34ch;
    margin: 0 0 20px;
    color: var(--apof-news-muted);
    overflow: hidden;
    font-size: 0.94rem;
    line-height: 1.7;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.apof-news-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.apof-news-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.apof-news-card__date {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apof-news-card:hover .apof-news-card__image,
.apof-news-card:focus-visible .apof-news-card__image {
    transform: scale(1.08);
}

.apof-news-card:hover .apof-news-card__button,
.apof-news-card:focus-visible .apof-news-card__button {
    border-color: var(--apof-news-accent);
    background: var(--apof-news-accent);
    transform: translateX(6px);
}

.apof-news-card:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

.apof-news-single {
    width: 100%;
    color: #241f1b;
}

.apof-news-page {
    padding: clamp(28px, 4vw, 64px) 0 clamp(56px, 7vw, 110px);
    background:
        radial-gradient(circle at top right, rgba(196, 66, 15, 0.08), transparent 20%),
        linear-gradient(180deg, #fbf8f3 0%, #fff 22%, #fff 100%);
}

.apof-news-page__shell {
    width: min(1400px, calc(100% - 2em));
    margin: 0 auto;
}

.apof-news-page__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    color: #867a72;
    font-size: 0.94rem;
    line-height: 1.5;
}

.apof-news-page__breadcrumb a {
    color: #867a72;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apof-news-page__breadcrumb a:hover,
.apof-news-page__breadcrumb a:focus-visible {
    color: var(--apof-news-accent);
    outline: none;
}

.apof-news-single__hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(420px, 1.02fr) minmax(0, 0.98fr);
    min-height: 560px;
    border-radius: 28px;
    background: #f3ede5;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(36, 26, 20, 0.09);
}

.apof-news-single__hero-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 4vw, 52px);
    background:
        radial-gradient(circle at top left, rgba(196, 66, 15, 0.09), transparent 28%),
        linear-gradient(160deg, #fff 0%, #f8f3ee 100%);
}

.apof-news-single__hero-panel::after {
    content: "";
    position: absolute;
    inset: 18px 0 18px auto;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(196, 66, 15, 0.28), transparent);
}

.apof-news-single__hero-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 28px;
}

.apof-news-single__hero-visual {
    position: relative;
    min-height: 100%;
    background: #161311;
}

.apof-news-single__hero-visual::before,
.apof-news-single__hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.apof-news-single__hero-visual::before {
    background:
        linear-gradient(90deg, rgba(17, 12, 10, 0.34) 0%, rgba(17, 12, 10, 0.1) 22%, rgba(17, 12, 10, 0.18) 100%),
        linear-gradient(180deg, rgba(17, 12, 10, 0.08) 0%, rgba(17, 12, 10, 0.42) 100%);
}

.apof-news-single__hero-visual::after {
    background:
        radial-gradient(circle at 78% 18%, rgba(232, 85, 28, 0.42), transparent 22%),
        radial-gradient(circle at 18% 82%, rgba(196, 66, 15, 0.16), transparent 18%);
    mix-blend-mode: screen;
}

.apof-news-single__hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.apof-news-single__hero-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
}

.apof-news-single__eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 34px;
    padding: 7px 15px;
    border: 1px solid rgba(196, 66, 15, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--apof-news-accent);
    font-family: var(--apof-news-font-primary);
    font-size: var(--apof-news-label-size);
    font-weight: var(--apof-news-label-weight);
    letter-spacing: var(--apof-news-label-spacing);
    line-height: 1;
    text-transform: uppercase;
}

.apof-news-single__title {
    max-width: none;
    margin: 0 0 20px;
    color: #221d1a;
    font-family: var(--apof-news-font-primary);
    font-size: var(--apof-news-size-h1);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: manual;
    text-wrap: balance;
}

.apof-news-single__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apof-news-single__date {
    color: #8a7568;
    font-family: var(--apof-news-font-primary);
    font-size: var(--apof-news-label-size);
    font-weight: var(--apof-news-label-weight);
    letter-spacing: var(--apof-news-label-spacing);
    text-transform: uppercase;
}

.apof-news-single__article {
    width: min(980px, calc(100% - 2em));
    margin: -58px auto 0;
    padding: clamp(24px, 3vw, 38px);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 64px rgba(33, 25, 20, 0.08);
    position: relative;
    z-index: 3;
}

.apof-news-single__body {
    width: min(760px, 100%);
    margin: 0 auto;
    color: var(--apof-news-grid-text);
    font-family: var(--apof-news-font-primary);
    font-size: var(--apof-news-size-body);
    line-height: 1.5;
}

.apof-news-single__body > *:first-child {
    margin-top: 0;
}

.apof-news-single__body > *:last-child {
    margin-bottom: 0;
}

.apof-news-single__body h1,
.apof-news-single__body h2,
.apof-news-single__body h3,
.apof-news-single__body h4,
.apof-news-single__body h5,
.apof-news-single__body h6 {
    margin: 2.3em 0 0.7em;
    color: #231f1b;
    font-family: var(--apof-news-font-primary);
    text-wrap: pretty;
}

.apof-news-single__body h1 {
    font-weight: 300;
    font-size: var(--apof-news-size-h1);
    line-height: 1.1;
}

.apof-news-single__body h2 {
    font-weight: 400;
    font-size: var(--apof-news-size-h2);
    line-height: 1.15;
}

.apof-news-single__body h3 {
    font-weight: 400;
    font-size: var(--apof-news-size-h3);
    line-height: 1.3;
}

.apof-news-single__body p,
.apof-news-single__body ul,
.apof-news-single__body ol,
.apof-news-single__body blockquote,
.apof-news-single__body pre,
.apof-news-single__body table,
.apof-news-single__body figure,
.apof-news-single__body .wp-block-embed,
.apof-news-single__body .wp-block-buttons {
    margin: 0 0 1.5em;
}

.apof-news-single__body ul,
.apof-news-single__body ol {
    padding-left: 1.35em;
}

.apof-news-single__body li + li {
    margin-top: 0.5em;
}

.apof-news-single__body a {
    color: var(--apof-news-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.apof-news-single__body strong {
    color: #1f1a17;
}

.apof-news-single__body blockquote {
    padding: 28px 30px;
    border-left: 4px solid var(--apof-news-accent);
    border-radius: 0 18px 18px 0;
    background: linear-gradient(135deg, rgba(196, 66, 15, 0.08), rgba(196, 66, 15, 0.02));
    color: #2f2925;
    font-size: 1.15rem;
    line-height: 1.8;
}

.apof-news-single__body blockquote p:last-child {
    margin-bottom: 0;
}

.apof-news-single__body img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.apof-news-single__body figure {
    overflow: hidden;
    border-radius: 18px;
}

.apof-news-single__body .alignwide,
.apof-news-single__body .wp-block-cover,
.apof-news-single__body .wp-block-group.has-background,
.apof-news-single__body .wp-block-media-text {
    width: 100%;
}

.apof-news-single__body figcaption,
.apof-news-single__body .blocks-gallery-caption,
.apof-news-single__body .wp-caption-text {
    padding: 14px 16px 0;
    color: #7a7068;
    font-family: var(--apof-news-font-primary);
    font-size: var(--apof-news-size-body-sm);
    line-height: 1.6;
    text-align: center;
}

.apof-news-single__body .wp-block-image img,
.apof-news-single__body .wp-block-media-text__media img,
.apof-news-single__body .gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.apof-news-single__body .wp-block-gallery,
.apof-news-single__body .gallery {
    display: grid;
    gap: 16px;
}

.apof-news-single__body .gallery {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.apof-news-single__body .gallery-item,
.apof-news-single__body .blocks-gallery-item,
.apof-news-single__body .wp-block-gallery .wp-block-image {
    width: 100%;
    margin: 0;
}

.apof-news-single__body .wp-block-gallery.has-nested-images {
    gap: 14px;
}

.apof-news-single__body .wp-block-gallery.has-nested-images figure.wp-block-image {
    width: 100%;
}

.apof-news-single__body .wp-block-embed iframe,
.apof-news-single__body iframe {
    display: block;
    width: 100%;
    min-height: 440px;
    border: 0;
    border-radius: 18px;
}

.apof-news-single__body .wp-block-button__link {
    border-radius: 999px;
    padding: 0.95rem 1.5rem;
    background: var(--apof-news-accent);
    color: #fff;
    font-family: var(--apof-news-font-primary);
    font-size: var(--apof-news-label-size);
    font-weight: var(--apof-news-label-weight);
    letter-spacing: var(--apof-news-label-spacing);
    text-transform: uppercase;
}

.apof-news-single__body .wp-block-separator {
    margin: 2.4rem 0;
    border-color: rgba(60, 60, 60, 0.14);
}

.apof-news-single__body table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
}

.apof-news-single__body th,
.apof-news-single__body td {
    padding: 14px 16px;
    border: 1px solid rgba(60, 60, 60, 0.1);
    text-align: left;
}

.apof-news-single__body th {
    color: #231f1b;
    background: rgba(196, 66, 15, 0.06);
}

@media (max-width: 1239px) and (min-width: 768px) {
    .apof-news__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    :root {
        --apof-news-card-h: 480px;
    }

    .apof-news-page__shell {
        width: min(100%, calc(100% - 2em));
    }

    .apof-news-page__breadcrumb {
        margin-bottom: 16px;
        font-size: 0.88rem;
    }

    .apof-news__header,
    .apof-news__grid-header {
        margin-bottom: 18px;
    }

    .apof-news__pagination {
        margin-top: 18px;
    }

    .apof-news__grid {
        grid-template-columns: 1fr;
    }

    .apof-news-card__content {
        padding: 24px 22px 24px;
    }

    .apof-news-card__title {
        max-width: 100%;
        font-size: 1.7rem;
    }

    .apof-news-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .apof-news-single__hero {
        grid-template-columns: 1fr;
        min-height: unset;
        border-radius: 22px;
    }

    .apof-news-single__hero-panel {
        order: 2;
        padding: 22px 20px 24px;
    }

    .apof-news-single__hero-panel::after {
        display: none;
    }

    .apof-news-single__hero-topline {
        margin-bottom: 16px;
    }

    .apof-news-single__hero-visual {
        order: 1;
        min-height: 280px;
    }

    .apof-news-single__title {
        max-width: 100%;
    }

    .apof-news-single__article {
        width: min(100%, calc(100% - 2em));
        margin-top: -20px;
        padding: 22px 16px;
        border-radius: 22px;
    }

    .apof-news-single__body {
        line-height: 1.5;
    }

    .apof-news-single__body blockquote {
        padding: 22px 20px;
    }

    .apof-news-single__body .wp-block-embed iframe,
    .apof-news-single__body iframe {
        min-height: 240px;
    }
}
