/* ==========================================================================
   News & Articles (media-room/news-and-article.php)
   Newsroom timeline: sticky search toolbar, articles grouped by year with a
   sticky outlined year on the left and a red rail.
   ========================================================================== */

/* Header ----------------------------------------------------------------- */

.news-header { padding: 3rem 0 2.5rem; }

.news-header__title {
    margin: 0;
    font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

/* Toolbar (sticky under the site header) --------------------------------- */

.news-toolbar {
    position: sticky;
    top: var(--ph-header-h);
    z-index: 1020;
    padding: .9rem 0;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--ph-border);
    border-bottom: 1px solid var(--ph-border);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.news-toolbar__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: .75rem;
    margin: 0;
}

.news-toolbar__search { position: relative; }

.news-toolbar__search i {
    position: absolute;
    top: 50%;
    inset-inline-start: 1rem;
    transform: translateY(-50%);
    color: var(--ph-muted);
    pointer-events: none;
}

.news-toolbar .form-control,
.news-toolbar .form-select {
    min-height: 48px;
    border-color: #d5d9df;
    border-radius: 999px;
    font-size: 1rem;
}

.news-toolbar .form-control { padding-inline-start: 2.75rem; }
.news-toolbar .form-select { padding-inline-start: 1.25rem; font-family: var(--ph-font-heading); font-weight: 600; }

.news-toolbar .form-control:focus,
.news-toolbar .form-select:focus {
    border-color: var(--ph-red);
    box-shadow: 0 0 0 .2rem rgba(236, 31, 39, .15);
}

/* Timeline ---------------------------------------------------------------- */

.news-timeline {
    scroll-margin-top: calc(var(--ph-header-h) + 80px);
    padding: 4rem 0 6rem;
    background: #fafafa;
}

.news-year {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 2rem;
}

.news-year + .news-year { margin-top: 3.5rem; }

.news-year__label {
    position: sticky;
    top: calc(var(--ph-header-h) + 100px);
    align-self: start;
    margin: 0;
    font-size: clamp(2.75rem, 2rem + 2.5vw, 4.25rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ph-red);
}

.news-list {
    position: relative;
    margin: 0;
    padding-block: 0 0; padding-inline: 2rem 0;
    list-style: none;
    border-inline-start: 2px solid rgba(236, 31, 39, .25);
}

.news-item { position: relative; }
.news-item + .news-item { margin-top: 1.25rem; }

/* Rail dot */
.news-item::before {
    content: "";
    position: absolute;
    top: 1.75rem;
    inset-inline-start: calc(-2rem - 7px);
    width: 12px;
    height: 12px;
    border: 2px solid var(--ph-red);
    border-radius: 50%;
    background: #fafafa;
}

.news-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.1rem;
    background: var(--ph-white);
    border: 1px solid var(--ph-border);
    border-radius: 6px;
    box-shadow: var(--ph-shadow-sm);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.news-card:hover {
    border-color: rgba(236, 31, 39, .3);
    box-shadow: var(--ph-shadow-md);
    transform: translateY(-2px);
}

.news-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: var(--ph-surface);
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-block: .25rem .25rem; padding-inline: 0 .5rem;
}

/* Publication date (from the item's data-date) */
.news-card__date {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .45rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ph-red-strong);
}

.news-card__date::before {
    content: "";
    width: 16px;
    height: 2px;
    background: var(--ph-red);
}

.news-card__title {
    margin: 0 0 .6rem;
    font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.news-card__text {
    margin: 0;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--ph-body);
    overflow-wrap: anywhere;
}

.news-more {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-inline-start: .35rem;
    padding: .15rem .65rem;
    border: 0;
    border-radius: 999px;
    background: var(--ph-red-soft);
    color: var(--ph-red-strong);
    font-family: var(--ph-font-heading);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none;
    vertical-align: baseline;
    transition: background-color .2s ease, color .2s ease;
}

.news-more i { font-size: .7rem; }

.news-more:hover,
.news-more:focus-visible { background: var(--ph-red-strong); color: var(--ph-white); }

.news-link { color: var(--ph-red-strong); font-weight: 600; }

/* Hidden by the filter / "Show More" (news.js) */
.news-item.is-hidden,
.news-year.is-hidden { display: none; }

/* Show more ------------------------------------------------------------- */

.news-more-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3.5rem;
    text-align: center;
}

.load-more-info {
    margin: 0;
    font-size: .95rem;
    color: var(--ph-muted);
}

.load-more-info span { font-weight: 700; color: var(--ph-ink); }

/* Pop-ups --------------------------------------------------------------- */

.news-modal .modal-content {
    position: relative;
    border: 0;
    border-top: 4px solid var(--ph-red);
    border-radius: 6px;
}

.news-modal .modal-body { padding: 2.5rem 2rem 2rem; }

.news-modal .modal-body p { line-height: 1.8; color: var(--ph-body); }
.news-modal .modal-body p:first-child { font-weight: 600; color: var(--ph-ink); }

.news-modal .modal-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
}

.news-modal__close {
    position: absolute;
    top: .6rem;
    inset-inline-end: .6rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f1f2f4;
    color: var(--ph-ink);
}

.news-modal__close:hover { background: var(--ph-red-strong); color: var(--ph-white); }

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

@media (max-width: 991.98px) {
    .news-year { grid-template-columns: 1fr; gap: 1rem; }
    .news-year__label { position: static; }
    .news-card { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 575.98px) {
    .news-header { padding: 2rem 0 1.75rem; }
    .news-toolbar__form { grid-template-columns: 1fr 120px; gap: .5rem; }
    .news-toolbar .form-select { padding-inline-start: .9rem; font-size: .9rem; }
    .news-timeline { padding: 2.5rem 0 4rem; }
    .news-list { padding-inline-start: 1.1rem; }
    .news-item::before { inset-inline-start: calc(-1.1rem - 7px); }
    .news-card { grid-template-columns: 92px minmax(0, 1fr); gap: .9rem; padding: .8rem; }
    .news-card__media { aspect-ratio: 1; }
    .news-card__body { justify-content: flex-start; padding: 0; }
    .news-card__title { font-size: 1rem; margin-bottom: .4rem; }
    .news-card__text { font-size: .875rem; line-height: 1.6; }
    .news-modal .modal-body { padding: 2.5rem 1.25rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .news-card { transition: none; }
}

/* Read More button row + pop-up heading (approved items, Oct 2026) ------- */
.news-card__actions { margin: .75rem 0 0; }
.news-card__actions .news-more { margin-inline-start: 0; }
.news-modal [data-news-modal-media] { margin-bottom: 1.25rem; }
.news-modal .modal-body .news-card__date { margin-bottom: .35rem; }
.news-modal__title {
    margin: 0 0 .75rem;
    font-family: var(--ph-font-heading);
    font-size: clamp(1.35rem, 1.2rem + .6vw, 1.75rem);
    font-weight: 600;
    color: var(--ph-ink);
}