/* News list and news item, under the shared page hero. Values as the Bachelor's Programmes pages
   (programme/css/programmes.css). Every rule starts with .news-page or .news-hero: base.html puts
   this file before styles.css, so single-class rules would lose there. */

.news-page {
    --news-primary: var(--bs-primary, #0096db);
    --news-primary-dark: #0987c2;
    --news-primary-deep: #075e87;
    --news-ink: #1e293b;
    --news-text: #334155;
    --news-muted: #64748b;
    --news-line: #e2e8f0;
    --news-bg: #f4f8fb;
    --news-tint: rgba(0, 150, 219, .08);
    --news-radius: 16px;
    --news-shadow: 0 10px 30px -12px rgba(2, 74, 110, .22);
    background: var(--news-bg);
    color: var(--news-ink);
    padding-block: clamp(32px, 5vw, 56px) clamp(48px, 7vw, 80px);
}

.news-page .container {
    max-width: 1200px;
}

.news-page a {
    text-decoration: none;
}

.news-page a:focus-visible,
.news-page button:focus-visible {
    outline: 3px solid var(--news-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

.news-page .news-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--news-line);
    border-radius: var(--news-radius);
    box-shadow: var(--news-shadow);
    overflow: hidden;
}

/* ---------- Date, views and goals ---------- */

.news-page .news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 0;
    font-size: 14px;
    color: var(--news-muted);
}

.news-page .news-meta__icon {
    margin-right: 6px;
    color: var(--news-primary);
}

.news-page .news-goals {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.news-page .news-goal {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 22px;
    padding: 0 5px;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.news-page .news-goal:hover {
    color: #fff;
    opacity: .85;
}

/* ---------- The list ---------- */

.news-page .news-search {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 28px;
}

.news-page .news-search__field {
    position: relative;
    width: min(340px, 100%);
    margin: 0;
}

.news-page .news-search__input {
    width: 100%;
    height: 46px;
    padding: 0 50px 0 20px;
    border: 1px solid var(--news-line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--news-ink);
}

.news-page .news-search__input:focus {
    outline: none;
    border-color: var(--news-primary);
    box-shadow: 0 0 0 4px var(--news-tint);
}

.news-page .news-search__button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--news-tint);
    color: var(--news-primary);
}

.news-page .news-search__button:hover {
    background: var(--news-primary);
    color: #fff;
}

.news-page .news-list {
    display: grid;
    gap: 22px;
}

.news-page .news-item {
    display: grid;
    grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
}

/* a post without a picture is text only */
.news-page .news-item--no-image {
    grid-template-columns: 1fr;
}

.news-page .news-item__image {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--news-tint);
}

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

.news-page .news-item__body {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 26px 30px;
}

.news-page .news-item__title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.news-page .news-item__title a {
    color: var(--news-ink);
}

.news-page .news-item__title a:hover {
    color: var(--news-primary-dark);
}

.news-page .news-item__excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--news-text);
    line-height: 1.65;
}

.news-page .news-item__more {
    justify-self: start;
    font-size: 15px;
    font-weight: 700;
    color: var(--news-primary);
}

.news-page .news-item__more:hover {
    color: var(--news-primary-deep);
}

.news-page .news-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--news-text);
    font-size: 18px;
}

.news-page .news-pages {
    margin-top: 36px;
}

.news-page .news-pages .pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.news-page .news-pages .page-link {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--news-line);
    border-radius: 999px;
    background: #fff;
    color: var(--news-ink);
    font-weight: 700;
}

.news-page .news-pages .page-link:hover {
    border-color: var(--news-primary);
    color: var(--news-primary-dark);
}

.news-page .news-pages .active > .page-link {
    border-color: var(--news-primary);
    background: var(--news-primary);
    color: #fff;
}

/* ---------- One news item ---------- */

/* a headline runs to two or three lines: the shared hero's title a size down */
.news-hero .page-hero__title {
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.2;
}

.news-page .news-article {
    max-width: 820px;
    margin: 0 auto;
}

/* the brand line on top, as on the programmes' school cards */
.news-page .news-article::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    height: 4px;
    background: linear-gradient(90deg, var(--news-primary), var(--news-primary-deep));
}

.news-page .news-article__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 22px 34px;
    border-bottom: 1px solid var(--news-line);
}

.news-page .news-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--news-primary);
    border-radius: 999px;
    color: var(--news-primary);
    font-size: 14px;
    font-weight: 700;
}

.news-page .news-share:hover {
    background: var(--news-primary);
    color: #fff;
}

.news-page .news-article__image {
    display: block;
    width: 100%;
    height: auto;
}

.news-page .news-article__body {
    padding: 30px 34px 10px;
    font-size: 18px;
    line-height: 1.75;
    color: var(--news-text);
}

/* editors' text comes justified from the editor; it reads unevenly in Uzbek's long words */
.news-page .news-article__body * {
    text-align: left !important;
}

.news-page .news-article__body p {
    max-width: 68ch;
    margin: 0 0 1em;
}

.news-page .news-article__body img {
    max-width: 100%;
    height: auto;
    margin: 8px 0 16px;
    border-radius: 12px;
}

.news-page .news-article__body iframe {
    max-width: 100%;
}

.news-page .news-article__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 18px 34px 26px;
    border-top: 1px solid var(--news-line);
    font-size: 14px;
    color: var(--news-muted);
}

.news-page .news-back {
    display: block;
    max-width: 820px;
    margin: 28px auto 0;
    font-weight: 700;
    color: var(--news-primary);
}

.news-page .news-back:hover {
    color: var(--news-primary-deep);
}

@media (max-width: 767.98px) {
    .news-page .news-item {
        grid-template-columns: 1fr;
    }

    .news-page .news-item__body {
        padding: 20px;
    }

    .news-page .news-article__head,
    .news-page .news-article__body,
    .news-page .news-article__foot {
        padding-inline: 20px;
    }

    .news-page .news-article__body {
        font-size: 17px;
    }
}
