/* ==========================================================================
   news.css — News listing page (filters + list)
   --------------------------------------------------------------------------
      Contents: Page layout • Search panel • Filters • List cards • Empty state
                • Responsive

      Notes:
        • Decorative monster is positioned relative to .search-frame and layered
          behind the card shell (.search-container).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

/* Global primitives (reset, sticky footer, overflow-x) are defined in site.css. */

/* --------------------------------------------------------------------------
   Page layout
   -------------------------------------------------------------------------- */

.news-section-parent-div {
    width: 100%;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: clamp(16px, 3vw, 40px);
    padding: clamp(18px, 3vw, 34px) 0 100px 0;
    padding-left: clamp(18px, 4vw, 90px);
    padding-right: clamp(18px, 4vw, 90px);
    box-sizing: border-box;
}

.news-section-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: min(800px, 92vw);
    flex: 1 1 620px;
    box-sizing: border-box;
}


/* --------------------------------------------------------------------------
   Search panel (card + decorative monster)
   -------------------------------------------------------------------------- */

.news-section-search {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    box-sizing: border-box;

    width: min(640px, 34vw);
    max-width: 640px;

    flex: 0 1 520px;
    padding-right: 110px;
    overflow: visible;
}

.search-frame {
    position: relative;
    width: min(460px, 100%);
    max-width: 100%;
}

.search-container,


/* Search input */

.search-bar-div,
.search-bar-div input,
.zl-select select,


/* Actions */

.news-filter-apply,
.news-next,
.news-item-button {
    box-sizing: border-box;
}

.search-container {
    position: relative;
    z-index: 2;
    width: min(460px, 100%);
    max-width: 100%;
    min-height: 312px;

    padding: 30px;

    border-radius: 25px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 13px;
}


/* Decorative monster: kept behind the card via z-index; never captures clicks. */

.search-frame .monster-image {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    width: clamp(140px, 14vw, 165px);
    height: auto;
    top: clamp(20px, 3vw, 35px);
    right: clamp(-200px, -4vw, 0px);
}

.search-frame .monster-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.search-bar-div {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e6;
    border-radius: 999px;
    background-color: #fff1e1;
}

.search-bar-div input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    padding: 12px 10px 12px 20px;
    font-size: 16px;
    border-radius: 999px;
    background-color: #fff1e1;
}

.search-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex: 0 0 auto;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.search-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}


/* Filters */

.sort-by-container {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    font-family: "Fredoka", sans-serif;
    font-weight: bold;
}

.label-div {
    white-space: nowrap;
}

.zl-select {
    width: 100%;
}

.zl-select select {
    width: 100%;
    background: #FFF1E1;
    border: 1px solid #E5E5E6;
    border-radius: 999px;
    padding: 12px 44px 12px 20px;
    cursor: pointer;
    font-size: 16px;
    font-family: "Inter", sans-serif;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image: url("/assets/img/icons/Down-Arrow.png");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px 8px;
}

.zl-select select:focus-visible {
    outline: 2px solid rgba(255, 45, 85, 0.35);
    outline-offset: 2px;
}

.news-filter-apply {
    width: 100%;
    margin-top: 4px;
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Fredoka", sans-serif;
    font-weight: bold;
}

.news-next {
    margin-top: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.12);
    padding: 10px 14px;
    border-radius: 999px;
    color: #404040;
    font-family: "Fredoka", sans-serif;
    font-weight: 700;
}


/* Empty state */

.news-empty {
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.12);
    padding: 28px;
    text-align: center;
}

.news-empty h3 {
    margin: 0 0 8px 0;
    font-family: "Fredoka", sans-serif;
    font-weight: bold;
    color: #ff2d55;
}

.news-empty p {
    margin: 0 0 18px 0;
    font-family: "Inter", sans-serif;
    color: #404040;
    line-height: 1.4;
}

.news-empty-clear {
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Fredoka", sans-serif;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* --------------------------------------------------------------------------
   News item cards
   -------------------------------------------------------------------------- */

.news-item-parent-div {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.news-item-image {
    width: 100%;
    border-radius: 25px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    max-height: 420px;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-item-statistics {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 10px;
    flex-direction: row;
    flex-wrap: wrap;
}

.news-item-date,
.news-item-views {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    flex-direction: row;
}

.news-item-date p,
.news-item-views p {
    margin: 0;
    color: #999999;
}

.news-item-parent-div h2 {
    font-size: clamp(28px, 3.2vw, 47px);
    line-height: 1.2;
    margin: 10px 0 0 0;
    color: #FF2D55;
    font-family: "Fredoka", sans-serif;
    font-weight: bold;
    word-break: break-word;
}

.news-decorative-bar {
    width: 100%;
    margin: 10px 0;
    border: 1px solid #E5E5E6;
}

.news-item-parent-div p {
    font-size: 16px;
    line-height: 1.5;
    color: #404040;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.news-item-button {
    background-color: #FFCC00;
    color: black;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: "Fredoka", sans-serif;
    font-weight: bold;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 1440px) {

    .news-section-search {
        width: min(720px, 36vw);
        max-width: 720px;
        flex: 0 0 560px;
        padding-right: 140px;
    }

    .search-frame {
        width: min(520px, 100%);
    }

    .search-container {
        width: min(520px, 100%);
        padding: 34px;
    }

    html:lang(de) .search-frame,
    html:lang(de) .search-container {
        width: min(560px, 100%);
    }

    .sort-by-container {
        grid-template-columns: clamp(140px, 34%, 190px) minmax(0, 1fr);
    }

    .zl-select select {
        min-width: 0;
    }
}


@media (min-width: 1800px) {
    .news-item-image {
        max-height: 1000px;
        min-height: 260px;
    }
}

@media (min-width: 1201px) {
    .sort-by-container {
        grid-template-columns: clamp(120px, 34%, 160px) minmax(0, 1fr);
    }
}

@media (max-width: 1440px) {
    .search-frame .monster-image {
        right: clamp(-200px, -7vw, 0px);
    }
}

@media (max-width: 1024px) {
    .search-container {
        min-height: unset;
        padding: 26px;
        gap: 12px;
    }

    .news-filter-apply {
        margin-top: 2px;
        padding: 12px 18px;
    }

    .search-frame .monster-image {
        right: clamp(-200px, -9vw, 0px);
    }
}

@media (max-width: 1200px) {
    .news-section-content {
        order: 2;
        flex: 1 1 100%;
        width: 100%;
        max-width: 920px;
        margin-left: auto;
        margin-right: auto;
    }

    .news-section-search {
        order: 1;
        flex: 1 1 100%;
        width: 100%;
        max-width: 920px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        padding-right: 0;
    }
}

@media (max-width: 768px) {

    .news-section-parent-div {
        padding-left: 18px;
        padding-right: 18px;
    }

    .news-section-search {
        width: 100%;
        max-width: 520px;
        padding-right: 0;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .search-frame {
        width: 100%;
        max-width: 520px;
    }

    .search-container {
        width: 100%;
        max-width: 520px;
        min-height: unset;
        padding: 20px;
        gap: 12px;
    }

    .sort-by-container {
        grid-template-columns: clamp(90px, 22vw, 120px) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
    }

    .label-div {
        white-space: nowrap;
        font-size: 14px;
        line-height: 1.1;
    }

    .zl-select select {
        width: 100%;
        min-width: 0;
    }

    .news-filter-apply {
        margin-top: 6px;
    }

    .search-frame .monster-image {
        right: clamp(-200px, -12vw, 0px);
    }
}

@media (max-width: 600px) {
    .news-section-search {
        margin-top: 70px;
    }

    .search-frame .monster-image {
        top: -105px;
        left: 5%;
        right: auto;
        width: 150px;
        transform: translateX(100px) rotate(-28deg);
    }

    .news-section-content {
        width: 100%;
        gap: 28px;
    }

    .search-container {
        padding: 18px;
        border-radius: 22px;
    }

    .search-bar-div input {
        padding: 12px 10px 12px 16px;
    }

    .zl-select select {
        padding: 12px 42px 12px 16px;
        background-position: right 14px center;
    }

    .news-item-image {
        border-radius: 20px;
        min-height: 180px;
        max-height: 300px;
        aspect-ratio: 16 / 10;
    }

    .news-item-statistics {
        gap: 14px;
        margin-top: 8px;
    }

    .news-item-date,
    .news-item-views {
        font-size: 13px;
    }

    .news-item-parent-div h2 {
        font-size: clamp(22px, 7vw, 30px);
    }

    .news-item-parent-div p {
        font-size: 15px;
        line-height: 1.45;
    }

    .news-item-button {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 999px;
        margin-top: 12px;
    }
}

@media (max-width: 425px) {
    .news-section-search {
        margin-top: 75px;
    }

    .search-frame .monster-image {
        top: -102px;
        left: 0%;
        right: auto;
        width: 150px;
        transform: translateX(100px) rotate(-28deg);
    }

    .news-section-parent-div {
        padding-left: 14px;
        padding-right: 14px;
    }

    .search-container {
        padding: 16px;
    }

    .news-item-image {
        min-height: 165px;
        border-radius: 18px;
    }

    .sort-by-container {
        grid-template-columns: clamp(86px, 26vw, 110px) minmax(0, 1fr);
        gap: 8px;
    }

    .news-item-button,
    .news-filter-apply {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 360px) {
    .sort-by-container {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: stretch;
    }

    .label-div {
        white-space: normal;
    }
}