/**
 * Hegau24 News
 *
 * Стили страницы и фильтра новостей.
 */

.hegau24-news-filter {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dce4ec;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 28px rgba(24, 48, 72, 0.08);
}

.hegau24-news-filter__form {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.hegau24-news-filter__row {
    display: grid;
    grid-template-columns: minmax(280px, 1.7fr) repeat(3, minmax(170px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.hegau24-news-filter__field {
    min-width: 0;
}

.hegau24-news-filter__field label {
    display: block;
    margin: 0 0 7px;
    padding-left: 14px;
    color: #33485c;
    font-size: 14px;
    font-weight: 600;
}

.hegau24-news-filter__field input,
.hegau24-news-filter__field select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid #d6e0e8;
    border-radius: 10px;
    background: #ffffff;
    color: #24384b;
    padding: 0 14px;
    font-size: 15px;
}

.hegau24-news-filter__field input:focus,
.hegau24-news-filter__field select:focus {
    border-color: #2f78c4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 120, 196, 0.12);
}

.hegau24-news-filter__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hegau24-news-filter__actions .hegau24-filter__submit,
.hegau24-news-filter__actions .hegau24-filter__reset {
    min-height: 46px;
    white-space: nowrap;
    box-sizing: border-box;
}

.hegau24-news-filter__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-top: 16px;
}

.hegau24-news-filter__category {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid #d7e1e9;
    border-radius: 999px;
    background: #ffffff;
    color: #3b5268;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.hegau24-news-filter__category:hover {
    border-color: #2f78c4;
    color: #2f78c4;
}

.hegau24-news-filter__category.is-active {
    border-color: #123a68;
    background: #123a68;
    color: #ffffff;
}

.hegau24-news-filter__category--more {
    cursor: default;
    background: #f4f7fa;
}

@media (max-width: 1200px) {

    .hegau24-news-filter__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hegau24-news-filter__field--search {
        grid-column: 1 / -1;
    }

    .hegau24-news-filter__actions {
        grid-column: 1 / -1;
    }

}

@media (max-width: 700px) {

    .hegau24-news-filter {
        width: min(100% - 24px, 1800px);
    }

    .hegau24-news-filter__form {
        padding: 16px;
        border-radius: 14px;
    }

    .hegau24-news-filter__row {
        grid-template-columns: 1fr;
    }

    .hegau24-news-filter__field--search,
    .hegau24-news-filter__actions {
        grid-column: auto;
    }

    .hegau24-news-filter__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hegau24-news-filter__categories {
        gap: 7px;
    }

    .hegau24-news-filter__category {
        min-height: 35px;
        padding: 0 12px;
        font-size: 13px;
    }

}

/* Hegau24 News — archive header and results */

.hegau-news-page {
    width: min(1800px, 94%);
    margin: 32px auto 70px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.hegau-news-page__main {
    min-width: 0;
}

.hegau-news-page__sidebar {
    width: 300px;
    min-width: 0;
}

.hegau24-news-archive {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.hegau24-news-archive__header {
    margin: 0 0 22px;
}

.hegau24-news-archive__title {
    margin: 0;
    color: #0a1e3a;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hegau24-news-archive__description {
    max-width: 900px;
    margin: 12px 0 0;
    color: #50627a;
    font-size: 16px;
    line-height: 1.5;
}

.hegau24-news-archive__results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    gap: 20px;
    margin-top: 20px;
    padding: 0 4px;
    box-sizing: border-box;
}

.hegau24-news-archive__count {
    display: block;
    visibility: visible;
    flex: 0 0 auto;
    color: #50627a;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.hegau24-news-archive__sort {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.hegau24-news-archive__sort label {
    display: none;
}

.hegau24-news-archive__sort select {
    min-height: 40px;
    min-width: 0;
    width: auto;
    padding: 0 22px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #33485c;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.hegau24-news-archive__sort select:focus {
    border-color: #2f78c4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 120, 196, 0.12);
}

@media (max-width: 700px) {

    .hegau24-news-archive {
        width: min(100% - 24px, 1800px);
        padding: 30px 0 50px;
    }

    .hegau24-news-archive__results-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hegau24-news-archive__sort {
        width: 100%;
        justify-content: space-between;
    }

    .hegau24-news-archive__sort select {
        min-width: 0;
        flex: 1;
    }

}

/* =========================================================
   Hegau24 News — archive content
   ========================================================= */

.hegau24-news-archive__content {
    margin-top: 28px;
}

.hegau24-news-archive__main {
    min-width: 0;
}

.hegau24-news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =========================================================
   News Card — горизонтальная карточка
   ========================================================= */

.hegau24-news-card {
    display: grid;
    grid-template-columns: 456px minmax(0, 1fr);
    min-height: 220px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(25, 55, 85, 0.07);
}

.hegau24-news-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    background: transparent;
}

.hegau24-news-card__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.25s ease;
}

.hegau24-news-card__media:hover .hegau24-news-card__image {
    transform: scale(1.02);
}

.hegau24-news-card__media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    color: #7890a5;
    font-size: 20px;
    font-weight: 700;
}

.hegau24-news-card__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px 22px 18px;
}

.hegau24-news-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
}

.hegau24-news-card__labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.hegau24-news-card__category,
.hegau24-news-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.hegau24-news-card__category {
    background: #edf5fc;
    color: #2f78c4;
}

.hegau24-news-card__badge--new {
    background: #eef8f1;
    color: #2d7a48;
}

.hegau24-news-card__badge--featured {
    background: #fff5d9;
    color: #8a6400;
}

.hegau24-news-card__badge--important {
    background: #fff0e8;
    color: #a74f22;
}

.hegau24-news-card__badge--urgent {
    background: #fdecec;
    color: #b33131;
}

.hegau24-news-card__favorite {
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dce5ed;
    border-radius: 50%;
    background: #ffffff;
    color: #7890a5;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.hegau24-news-card__favorite:hover {
    border-color: #2f78c4;
    color: #2f78c4;
}

.hegau24-news-card__title {
    margin: 0 0 8px;
    font-size: clamp(21px, 1.7vw, 27px);
    line-height: 1.22;
    font-weight: 750;
}

.hegau24-news-card__title a {
    color: #1d2b3a;
    text-decoration: none;
}

.hegau24-news-card__title a:hover {
    color: #2f78c4;
}

.hegau24-news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #708296;
    font-size: 13px;
}

.hegau24-news-card__meta > span + span::before {
    content: '•';
    margin-right: 7px;
    color: #a8b6c3;
}

.hegau24-news-card__excerpt {
    margin: 0 0 14px;
    color: #53687b;
    font-size: 15px;
    line-height: 1.55;
}

.hegau24-news-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    color: #667789;
    font-size: 13px;
}

.hegau24-news-card__stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hegau24-news-card__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.hegau24-news-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    background: #2f78c4;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hegau24-news-card__button:hover {
    background: #2466aa;
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .hegau24-news-card {
        grid-template-columns: 220px minmax(0, 1fr);
        min-height: 200px;
    }

    .hegau24-news-card__media,
    .hegau24-news-card__media--empty {
        min-height: 200px;
    }

    .hegau24-news-card__content {
        padding: 18px;
    }
}

@media (max-width: 700px) {
    .hegau24-news-card {
        grid-template-columns: 1fr;
    }

    .hegau24-news-card__media,
    .hegau24-news-card__media--empty {
        min-height: 190px;
        max-height: 240px;
    }

    .hegau24-news-card__footer {
        justify-content: stretch;
    }

    .hegau24-news-card__button {
        width: 100%;
    }
}

/* =========================================================
   Empty results
   ========================================================= */

.hegau24-news-empty {
    padding: 40px 24px;
    border: 1px solid #e1e8ef;
    border-radius: 18px;
    background: #ffffff;
    color: #667789;
    text-align: center;
}

/* =========================================================
   Sidebar — пока только визуальный контейнер
   ========================================================= */

.hegau24-news-archive__sidebar {
    min-height: 180px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {

    .hegau24-news-archive__content {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 20px;
    }

}

@media (max-width: 800px) {

    .hegau24-news-archive__content {
        grid-template-columns: 1fr;
    }

    .hegau24-news-archive__sidebar {
        min-height: 0;
    }

    .hegau24-news-card__media {
        aspect-ratio: 16 / 8;
    }

}

@media (max-width: 600px) {

    .hegau24-news-card__content {
        padding: 18px;
    }

    .hegau24-news-card__title {
        font-size: 23px;
    }

    .hegau24-news-card__meta {
        gap: 7px 12px;
    }

    .hegau24-news-card__footer {
        justify-content: stretch;
    }

    .hegau24-news-card__button {
        width: 100%;
    }

}

/* =========================================================
   NEWS ARCHIVE — BREADCRUMB
   ========================================================= */

.hegau24-news-archive__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #7a8798;
}

.hegau24-news-archive__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.hegau24-news-archive__breadcrumb a:hover {
    color: #0a1e3a;
}

.hegau24-news-archive__breadcrumb span[aria-hidden="true"] {
    color: #9aa6b5;
}

@media (max-width: 767px) {

    .hegau24-news-archive__breadcrumb {
        gap: 7px;
        font-size: 12px;
        margin-bottom: 8px;
    }
}

 .hegau24-news-archive__sort { position: relative; display: flex; align-items: center; margin-left: auto; }
.hegau24-news-archive__sort select { min-height: 40px; min-width: 0; width: auto; padding: 0 22px 0 8px; border: 0; border-radius: 0; background: transparent; color: #23364d; font-size: 18px; font-weight: 700; line-height: 1.4; cursor: pointer; box-shadow: none; appearance: none; -webkit-appearance: none; }
.hegau24-news-archive__sort select:focus { border: 0; outline: none; box-shadow: none; }
.hegau24-news-archive__sort::after { content: ""; position: absolute; right: 5px; top: 50%; width: 10px; height: 10px; border-right: 3px solid #23364d; border-bottom: 3px solid #23364d; transform: translateY(-65%) rotate(45deg); pointer-events: none; }

/* =========================================================
   Hegau24 — Custom News Sort Dropdown
   ========================================================= */

.hegau24-news-archive__sort {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.hegau24-sort-dropdown {
    position: relative;
}

.hegau24-sort-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 4px 0 8px;
    border: 0;
    background: transparent;
    color: #23364d;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.hegau24-sort-dropdown__trigger::-webkit-details-marker {
    display: none;
}

.hegau24-sort-dropdown__trigger::marker {
    display: none;
}

.hegau24-sort-dropdown__chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid #23364d;
    border-bottom: 2px solid #23364d;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}

.hegau24-sort-dropdown[open] .hegau24-sort-dropdown__chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.hegau24-sort-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    min-width: 190px;
    padding: 7px;
    background: #fff;
    border: 1px solid #dce4ec;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(24, 48, 72, .14);
}

.hegau24-sort-dropdown__option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 9px;
    color: #33485c;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.hegau24-sort-dropdown__option:hover {
    background: #f1f7fc;
    color: #23364d;
}

.hegau24-sort-dropdown__option.is-selected {
    background: #eef6fd;
    color: #23364d;
    font-weight: 700;
}

.hegau24-sort-dropdown__check {
    width: 16px;
    color: #2f78c4;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

@media (max-width: 700px) {
    .hegau24-sort-dropdown__menu {
        right: auto;
        left: 0;
    }

    .hegau24-sort-dropdown__trigger {
        font-size: 16px;
    }
}

/* Final News Card — ограничение высоты описания */
.hegau24-news-card__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}




/* =========================================================
   News Card — финальная desktop-компоновка, тест 300 px
   ========================================================= */

@media (min-width: 701px) {

    .hegau24-news-card {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        box-sizing: border-box;
    }

    .hegau24-news-card__media {
        height: 100%;
        box-sizing: border-box;
    }

    .hegau24-news-card__image {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
    }

    .hegau24-news-card__content {
        height: 100%;
        min-height: 0;
        box-sizing: border-box;
    }

    .hegau24-news-card__title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .hegau24-news-card__excerpt {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    .hegau24-news-card__stats {
        flex-shrink: 0;
    }

    .hegau24-news-card__footer {
        flex-shrink: 0;
    }
}


/* =========================================================
   News Card — фиксируем нижнюю зону
   ========================================================= */

@media (min-width: 701px) {

    .hegau24-news-card__content {
        position: relative;
        padding-bottom: 62px;
    }

    .hegau24-news-card__excerpt {
        -webkit-line-clamp: 5;
        margin-bottom: 0;
    }

    .hegau24-news-card__stats {
        position: absolute;
        left: 22px;
        bottom: 18px;
        margin: 0;
    }

    .hegau24-news-card__footer {
        position: absolute;
        right: 22px;
        bottom: 18px;
        margin: 0;
    }

}


/* =========================================================
   News Card — hover без кнопки «Читать далее»
   ========================================================= */

@media (min-width: 701px) {

    .hegau24-news-card {
        transition: transform 0.22s ease, box-shadow 0.22s ease;
    }

    .hegau24-news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(25, 55, 85, 0.12);
    }

    .hegau24-news-card__content {
        padding-bottom: 18px;
    }

    .hegau24-news-card__footer {
        display: none;
    }

}


/* Unified icons for news card statistics */
.hegau24-news-card__stat-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    display: inline-block;
    vertical-align: -2px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hegau24-news-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* Hide native details/summary marker — Hegau24 uses its own chevron */
.hegau24-sort-dropdown__trigger::-webkit-details-marker {
    display: none;
}

.hegau24-sort-dropdown__trigger::marker {
    content: '';
}

/* Disable legacy sort chevron — custom dropdown has its own chevron */
.hegau24-news-archive__sort::after {
    content: none !important;
    display: none !important;
}

/* News page — mobile outer layout */
@media (max-width: 800px) {
    .hegau-news-page {
        grid-template-columns: 1fr;
    }

    .hegau-news-page__sidebar {
        width: 100%;
    }
}

/* News Card — mobile natural height */
@media (max-width: 700px) {
    .hegau24-news-card {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .hegau24-news-card__media {
        height: auto;
    }

    .hegau24-news-card__image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
}
