/* ═══════════════════════════════════════════════════════════════════════════════
   Homepage — News, Announcements, Newspaper, Media (desktop & tablet only)
   min-width: 769px — does not override mobile.css / home-redesign max-width:768 rules
   Editorial, wide-format, compact density, restrained motion
   ═══════════════════════════════════════════════════════════════════════════════ */

@media screen and (min-width: 769px) {
    .au-home .au-media-block .au-container {
        max-width: min(1580px, 93vw) !important;
        padding-left: clamp(0.85rem, 1.6vw, 1.75rem) !important;
        padding-right: clamp(0.85rem, 1.6vw, 1.75rem) !important;
    }

    .au-home .au-media-block {
        padding: clamp(1.65rem, 2.6vw, 2.65rem) 0;
    }

    /* ─── Section surfaces (flat, institutional) ─── */
    .au-home .au-media-block--news {
        background: linear-gradient(180deg, #f4f7f5 0%, #fbfcfb 45%, #ffffff 100%);
        border-top: 1px solid rgba(24, 125, 53, 0.12);
    }

    .au-home .au-media-block--announcements {
        background: linear-gradient(180deg, #faf8f3 0%, #ffffff 55%);
        border-top: 1px solid rgba(201, 162, 39, 0.18);
    }

    .au-home .au-media-block--newspaper {
        background: linear-gradient(180deg, #f7f6f4 0%, #fdfcfa 100%);
        border-top: 1px solid rgba(26, 26, 26, 0.08);
    }

    .au-home .au-media-block--newspaper::before {
        height: 3px;
        background: linear-gradient(90deg, #1a1a1a 0%, #3d3d3d 40%, #1a1a1a 100%);
        opacity: 0.85;
    }

    .au-home .au-media-block--press {
        background: linear-gradient(180deg, #f5f6fb 0%, #ffffff 50%);
        border-top: 1px solid rgba(68, 123, 173, 0.15);
    }

    /* ─── Section header: horizontal, document-style ─── */
    .au-home .au-media-block__header {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: clamp(1.25rem, 2.5vw, 2.5rem);
        text-align: left;
        margin-bottom: clamp(1.1rem, 1.8vw, 1.65rem);
        padding-bottom: 0.85rem;
        border-bottom: 1px solid rgba(13, 16, 21, 0.08);
        position: relative;
    }

    .au-home .au-media-block__header::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: min(120px, 18%);
        height: 2px;
        background: linear-gradient(90deg, var(--au-primary), var(--au-secondary));
        border-radius: 1px;
        transform-origin: left center;
        animation: au-desk-header-accent 4.5s ease-in-out infinite;
    }

    .au-home .au-media-block--announcements .au-media-block__header::after {
        background: linear-gradient(90deg, #b89220, var(--au-gold));
    }

    .au-home .au-media-block--press .au-media-block__header::after {
        background: linear-gradient(90deg, #3d4a8f, #6366f1);
    }

    .au-home .au-media-block__header-main {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.95rem;
        flex: 1;
        min-width: 0;
    }

    .au-home .au-media-block__headlines {
        flex: 1;
        min-width: 0;
    }

    .au-home .au-media-block__icon {
        width: 44px;
        height: 44px;
        margin: 0;
        flex-shrink: 0;
        border-radius: 10px;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset, 0 4px 14px rgba(0, 0, 0, 0.08);
        animation: none;
        border: 1px solid rgba(255, 255, 255, 0.35);
    }

    .au-home .au-media-block__icon svg {
        width: 22px;
        height: 22px;
    }

    .au-home .au-media-block__title {
        font-weight: 700;
        letter-spacing: -0.025em;
        line-height: 1.15;
        margin-bottom: 0.35rem;
        font-size: clamp(1.35rem, 0.95rem + 0.75vw, 1.85rem);
    }

    .au-home .au-media-block__subtitle {
        margin-bottom: 0;
        max-width: 56ch;
        font-size: clamp(0.82rem, 0.76rem + 0.22vw, 0.92rem);
        color: var(--au-gray-600);
        line-height: 1.5;
    }

    .au-home .au-media-block__link {
        border-radius: 8px;
        border-width: 1px;
        padding: 0.55rem 1.1rem;
        font-size: 0.875rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        transform: none;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    .au-home .au-media-block__link:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(24, 125, 53, 0.18);
    }

    .au-home .au-media-block--announcements .au-media-block__link:hover {
        box-shadow: 0 6px 18px rgba(201, 162, 39, 0.22);
    }

    /* ─── News: таблица 4×2 (на 769–991 — 2×4), все карточки квадратные; свежая — чуть крупнее ─── */
    .au-home .au-news-grid.au-news-grid--8 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        /* одинаковый зазор по горизонтали и вертикали вокруг каждой ячейки */
        gap: clamp(0.65rem, 1.1vw, 1rem);
        column-gap: clamp(0.65rem, 1.1vw, 1rem);
        row-gap: clamp(0.65rem, 1.1vw, 1rem);
        align-items: stretch;
        overflow: visible;
    }

    /* Сброс legacy grid-row/grid-column с первой карточкой (раньше цеплялось глобальное правило) */
    .au-home .au-news-grid--8 > .au-news-card {
        grid-column: auto;
        grid-row: auto;
    }

    .au-home .au-news-grid--8 .au-news-card--featured.au-news-card--grid-lead,
    .au-home .au-news-grid--8 .au-news-card--small.au-news-card--grid-tile {
        display: flex;
        flex-direction: column;
        width: 100%;
        aspect-ratio: 1 / 1;
        min-height: 0;
        border-radius: 10px;
        overflow: hidden;
        transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    }

    .au-home .au-news-grid--8 .au-news-card--featured.au-news-card--grid-lead {
        border: 1px solid rgba(24, 125, 53, 0.22);
        box-shadow: 0 6px 22px rgba(13, 16, 21, 0.1);
        z-index: 1;
        /* заметнее крупнее соседей */
        transform: scale(1.048);
        transform-origin: center center;
    }

    .au-home .au-news-grid--8 .au-news-card--featured.au-news-card--grid-lead:hover {
        transform: scale(1.048) translateY(-2px);
        box-shadow: 0 12px 32px rgba(13, 16, 21, 0.14);
    }

    .au-home .au-news-grid--8 .au-news-card--small.au-news-card--grid-tile {
        padding: 0;
        gap: 0;
        border: 1px solid var(--au-gray-100);
        box-shadow: 0 3px 14px rgba(13, 16, 21, 0.06);
        transform: scale(0.94);
        transform-origin: center center;
    }

    .au-home .au-news-grid--8 .au-news-card--small.au-news-card--grid-tile:hover {
        transform: scale(0.94) translateY(-2px);
        box-shadow: 0 8px 22px rgba(13, 16, 21, 0.1);
        border-color: rgba(24, 125, 53, 0.18);
    }

    /* Лента разделов (ознакомительный блок, автопрокрутка) */
    .au-home-spotlight-intro {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem 1.25rem;
        flex-wrap: wrap;
        margin-bottom: 0.85rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(13, 16, 21, 0.08);
    }

    .au-home-spotlight-intro__title {
        font-size: clamp(1.15rem, 0.92rem + 0.55vw, 1.45rem);
        font-weight: 700;
        margin: 0;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

    .au-home-spotlight__viewport {
        position: relative;
        overflow: hidden;
        border-radius: 11px;
        margin-top: 0.25rem;
        border: 1px solid rgba(24, 125, 53, 0.12);
        background: rgba(255, 255, 255, 0.55);
        mask-image: linear-gradient(90deg, transparent 0%, #000 1.5%, #000 98.5%, transparent 100%);
    }

    .au-home-spotlight__track {
        display: flex;
        gap: 0.75rem;
        width: max-content;
        padding: 0.65rem 0.45rem;
        animation: au-home-spotlight-marquee 96s linear infinite;
        will-change: transform;
    }

    .au-home-spotlight__slide.au-home-spotlight__slide--tile {
        flex: 0 0 auto;
        width: min(300px, 40vw);
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 12px;
        text-decoration: none;
        color: inherit;
        background: #fff;
        border: 1px solid rgba(13, 16, 21, 0.08);
        box-shadow: 0 2px 10px rgba(13, 16, 21, 0.05);
        transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    }

    .au-home-spotlight__slide.au-home-spotlight__slide--tile:hover {
        border-color: rgba(24, 125, 53, 0.32);
        box-shadow: 0 6px 16px rgba(24, 125, 53, 0.1);
        transform: translateY(-2px);
    }

    .au-home-spotlight__cover {
        aspect-ratio: 16 / 10;
        min-height: 120px;
        background: linear-gradient(135deg, #e7f3eb, #d2e8dc);
        display: grid;
        place-items: center;
        overflow: hidden;
        border-bottom: 1px solid rgba(13, 16, 21, 0.06);
    }

    .au-home-spotlight__cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .au-home-spotlight__cover-letter {
        font-weight: 700;
        font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
        color: #0d5a25;
        text-transform: uppercase;
    }

    .au-home-spotlight__slide--tile .au-home-spotlight__body {
        padding: 0.55rem 0.65rem 0.65rem;
    }

    .au-home-spotlight__name {
        margin: 0 0 0.25rem 0;
        font-size: clamp(0.85rem, 0.78rem + 0.2vw, 0.98rem);
        line-height: 1.25;
    }

    .au-home-spotlight__blurb {
        margin: 0 0 0.35rem 0;
        font-size: clamp(0.72rem, 0.66rem + 0.14vw, 0.82rem);
        color: var(--au-gray-600);
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .au-home-spotlight__cta {
        font-size: 0.72rem;
        font-weight: 600;
        color: #0d5a25;
    }

    @keyframes au-home-spotlight-marquee {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__image,
    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__image {
        flex: 1 1 0;
        min-height: 0;
        width: 100%;
        position: relative;
        border-radius: 0;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__image img,
    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__image img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__overlay {
        background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__badge {
        top: 0.45rem;
        left: 0.45rem;
        padding: 0.2rem 0.45rem;
        font-size: 0.6rem;
    }

    /* В квадрате не тянем блок по вертикали: анонс и «оқу» только вне сетки / скрыты */
    .au-home .au-news-grid--8 .au-news-card--grid-lead .au-news-card__excerpt,
    .au-home .au-news-grid--8 .au-news-card--grid-lead .au-news-card__read-more {
        display: none;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__content,
    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__content {
        flex: 0 0 auto;
        max-height: 38%;
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        min-height: 0;
        background: #fff;
    }

    /* У свежей новости одинаковые внутренние отступы справа и снизу */
    .au-home .au-news-grid--8 .au-news-card--grid-lead .au-news-card__content {
        padding: 0.5rem 0.6rem 0.6rem 0.6rem;
    }

    .au-home .au-news-grid--8 .au-news-card--grid-tile .au-news-card__content {
        padding: 0.45rem 0.55rem 0.55rem 0.55rem;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__meta {
        margin-bottom: 0;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__date,
    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__date {
        font-size: 0.65rem;
        gap: 0.25rem;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__date svg,
    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__date svg {
        width: 11px;
        height: 11px;
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__title {
        font-size: clamp(0.72rem, 0.65rem + 0.35vw, 0.88rem);
        line-height: 1.25;
        margin-bottom: 0;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__title {
        font-size: clamp(0.68rem, 0.62rem + 0.28vw, 0.8rem);
        line-height: 1.25;
        margin-bottom: 0;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__arrow {
        display: none;
    }

    /* ─── Announcements carousel ─── */
    .au-home .au-media-block--announcements .au-carousel-wrapper {
        padding: 0;
        gap: 0.75rem;
    }

    .au-home .au-announcements-carousel {
        border-radius: 12px;
        border: 1px solid rgba(201, 162, 39, 0.12);
        background: rgba(255, 255, 255, 0.55);
    }

    .au-home .au-announcements-track {
        padding-top: clamp(0.75rem, 1.2vw, 1.1rem);
        padding-bottom: clamp(0.75rem, 1.2vw, 1.1rem);
        padding-left: 0;
        padding-right: 0;
        gap: clamp(0.75rem, 1.2vw, 1.25rem);
    }

    .au-home .au-announcements-track .au-announcement-card {
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(13, 16, 21, 0.06);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .au-home .au-announcement-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(13, 16, 21, 0.1);
    }

    .au-home .au-announcement-card__image {
        height: 156px;
    }

    .au-home .au-announcement-card__content {
        padding: 1rem 1.1rem 1.15rem;
    }

    .au-home .au-announcement-card__date {
        top: -36px;
        min-width: 52px;
        padding: 0.5rem 0.45rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .au-home .au-announcement-card__day {
        font-size: 1.35rem;
    }

    .au-home .au-announcement-card__title {
        font-size: 0.9375rem;
        margin-bottom: 0;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .au-home .au-carousel-arrow {
        width: 46px;
        height: 46px;
        border-radius: 10px;
        border: 1px solid rgba(13, 16, 21, 0.06);
    }

    .au-home .au-carousel-arrow:hover {
        transform: translateY(-1px) scale(1.02);
    }

    .au-home .au-carousel-indicators {
        margin-top: 1.25rem;
    }

    /* ─── Newspaper masthead & carousel ─── */
    .au-home .au-newspaper__masthead {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: clamp(1.25rem, 2vw, 2rem);
        padding: 1.1rem 1.5rem;
        background: #fafafa;
        border: 1px solid #e2e2e0;
        border-radius: 6px;
    }

    .au-home .au-newspaper__masthead::before,
    .au-home .au-newspaper__masthead::after {
        content: none;
        display: none;
    }

    .au-home .au-newspaper__logo {
        width: 48px;
        height: 48px;
        border-radius: 8px;
    }

    .au-home .au-newspaper__logo svg {
        width: 24px;
        height: 24px;
    }

    .au-home .au-newspaper__title-wrap {
        flex: 1;
        text-align: left;
        min-width: 0;
    }

    .au-home .au-newspaper__title {
        font-size: clamp(1.35rem, 1rem + 0.9vw, 1.85rem);
        letter-spacing: -0.02em;
    }

    .au-home .au-newspaper__divider {
        margin: 0.35rem 0;
        max-width: 160px;
    }

    .au-home .au-newspaper__tagline {
        font-size: 0.8125rem;
        color: var(--au-gray-600);
    }

    .au-home .au-newspaper__archive-link {
        flex-shrink: 0;
        border-radius: 8px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        border: 1px solid #1a1a1a;
        background: #fff;
        color: #1a1a1a;
    }

    /* Иначе общий :hover задаёт светлый текст, а фон остаётся #fff от правила выше — текст пропадает */
    .au-home .au-newspaper__archive-link:hover {
        background: #1a1a1a;
        color: #fefefe;
        border-color: #1a1a1a;
    }

    .au-home .au-newspaper__archive-link:hover svg {
        stroke: currentColor;
    }

    .au-home .au-newspaper-carousel {
        border-radius: 12px;
        border: 1px solid rgba(26, 26, 26, 0.08);
        background: rgba(255, 255, 255, 0.6);
    }

    .au-home .au-newspaper-track {
        padding-top: clamp(0.75rem, 1.2vw, 1.1rem);
        padding-bottom: clamp(0.75rem, 1.2vw, 1.1rem);
        padding-left: 0;
        padding-right: 0;
        gap: clamp(0.75rem, 1.2vw, 1.25rem);
    }

    .au-home .au-newspaper-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .au-home .au-newspaper-card:hover {
        transform: translateY(-3px);
    }

    .au-home .au-newspaper-card__paper {
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }

    .au-home .au-newspaper-card__fold {
        opacity: 0.35;
    }

    /* ─── Press / media about us ─── */
    .au-home .au-press-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(1rem, 1.6vw, 1.5rem);
    }

    .au-home .au-press-card {
        border-radius: 12px;
        box-shadow: 0 4px 18px rgba(13, 16, 21, 0.07);
        transition: transform 0.32s ease, box-shadow 0.32s ease;
    }

    .au-home .au-press-card::before {
        height: 2px;
        background: linear-gradient(90deg, #4a5694, #6366f1);
    }

    .au-home .au-press-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 36px rgba(61, 74, 143, 0.12);
    }

    .au-home .au-press-card__media {
        height: 200px;
    }

    .au-home .au-press-card__content {
        padding: 1rem 1.15rem 1.2rem;
    }

    .au-home .au-press-card__source {
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        color: #4b51a8;
        margin-bottom: 0.35rem;
    }

    .au-home .au-press-card__title {
        font-size: clamp(0.95rem, 0.88rem + 0.25vw, 1.1rem);
        margin-bottom: 0.4rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .au-home .au-press-card__date {
        font-size: 0.75rem;
        color: var(--au-gray-500);
    }

    .au-home .au-media-block__empty {
        padding: 2.5rem 1rem;
        font-size: 0.95rem;
        border: 1px dashed rgba(13, 16, 21, 0.12);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.5);
    }
}

/* ≥992px: ровно 4 колонки × 2 ряда квадратов */
@media screen and (min-width: 992px) {
    .au-home .au-news-grid.au-news-grid--8 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: clamp(0.6rem, 1vw, 0.95rem);
        column-gap: clamp(0.6rem, 1vw, 0.95rem);
        row-gap: clamp(0.6rem, 1vw, 0.95rem);
    }

    .au-home .au-news-grid--8 .au-news-card--featured.au-news-card--grid-lead {
        transform: scale(1.062);
    }

    .au-home .au-news-grid--8 .au-news-card--featured.au-news-card--grid-lead:hover {
        transform: scale(1.062) translateY(-2px);
    }

    .au-home .au-news-grid--8 .au-news-card--small.au-news-card--grid-tile {
        transform: scale(0.925);
    }

    .au-home .au-news-grid--8 .au-news-card--small.au-news-card--grid-tile:hover {
        transform: scale(0.925) translateY(-2px);
    }

    .au-home .au-news-grid--8 .au-news-card--featured .au-news-card__title {
        font-size: clamp(0.78rem, 0.7rem + 0.35vw, 0.95rem);
    }

    .au-home .au-news-grid--8 .au-news-card--small .au-news-card__title {
        font-size: clamp(0.7rem, 0.64rem + 0.25vw, 0.82rem);
    }
}

@keyframes au-desk-header-accent {
    0%,
    100% {
        transform: scaleX(1);
        opacity: 1;
    }
    50% {
        transform: scaleX(0.72);
        opacity: 0.75;
    }
}

@media screen and (min-width: 769px) and (prefers-reduced-motion: reduce) {
    .au-home .au-media-block__header::after {
        animation: none;
    }

    .au-home-spotlight__track {
        animation: none;
    }

    .au-home .au-news-grid--8 .au-news-card--featured.au-news-card--grid-lead,
    .au-home .au-news-grid--8 .au-news-card--small.au-news-card--grid-tile,
    .au-home .au-news-grid--8 .au-news-card--featured:hover,
    .au-home .au-news-grid--8 .au-news-card--small:hover,
    .au-home .au-news-card--featured:hover,
    .au-home .au-news-card--small:hover,
    .au-home .au-announcement-card:hover,
    .au-home .au-newspaper-card:hover,
    .au-home .au-press-card:hover {
        transform: none;
    }
}
