﻿:root {
    /* Escambia County Brand Standards */
    --news-blue: #003da6;
    --news-blue-dark: #002b75;
    --news-green: #4c9c2e;
    --news-green-dark: #2f6f1d;
    --news-gold: #fbb040;
    --news-background: #f5f8fa;
    --news-border: #d5dee7;
    --news-text: #222;
    --news-muted: #5d6670;
    --news-white: #fff;
    --news-error: #f5333f;
    --news-error-dark: #a8001d;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */

.section_head {
    background-image: url("../../images/default-source/section-head-photos/header-news.jpg");
    background-position: right center;
    background-size: cover;
}

.sidenavigation > .col-lg-9 {
    padding-right: 15px;
}

/* =========================================================
   NEWS CENTER
   ========================================================= */

.news-center,
.news-center * {
    box-sizing: border-box;
}

.news-center {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 40px;
    color: var(--news-text);
    font-size: 16px;
    line-height: 1.6;
}

/* =========================================================
   COMBINED COUNTY NEWS AND SOCIAL BANNER
   ========================================================= */

.news-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    width: 100%;
    align-items: center;
    margin: 0 0 14px;
    padding: 18px 24px;
    border-radius: 10px;
    background: var(--news-blue);
    color: var(--news-white);
}

.news-banner__county {
    min-width: 0;
}

.news-banner__county-heading {
    margin: 0 0 3px;
    color: var(--news-white) !important;
    font-size: 1.5rem;
    line-height: 1.25;
}

.news-banner__county p {
    margin: 0;
    color: var(--news-white);
    font-size: 1rem;
}

.news-banner__social {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    text-align: right;
}

.news-banner__social-heading {
    margin: 0;
    color: var(--news-white) !important;
    font-size: 1.1rem;
    line-height: 1.3;
}

.news-social__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

    .news-social__links a {
        display: inline-flex;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        align-items: center;
        justify-content: center;
        border: 2px solid rgba(255, 255, 255, 0.85);
        border-radius: 50%;
        background: transparent;
        color: var(--news-white);
        font-size: 1.1rem;
        text-decoration: none;
        transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

        .news-social__links a:hover {
            border-color: var(--news-gold);
            background: var(--news-white);
            color: var(--news-blue);
            transform: translateY(-2px);
        }

/* =========================================================
   FILTER AND RESULTS LAYOUT
   ========================================================= */

.news-center__layout {
    display: grid !important;
    grid-template-columns: minmax(235px, 275px) minmax(0, 1fr) !important;
    gap: 20px !important;
    width: 100%;
    align-items: start;
}

.news-filter-column,
.news-results-column {
    width: 100%;
    min-width: 0;
}

    /* =========================================================
   FILTER PANEL
   ========================================================= */

    .news-filter-column .news-filters {
        position: sticky;
        top: 20px;
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 18px;
        border: 1px solid var(--news-border);
        border-top: 5px solid var(--news-blue);
        border-radius: 10px;
        background: var(--news-background);
        box-shadow: 0 3px 12px rgba(0, 61, 166, 0.08);
    }

.news-filters__heading {
    margin: 0 0 16px;
    color: var(--news-blue) !important;
    font-size: 1.3rem;
    line-height: 1.25;
}

.news-filter {
    display: block;
    width: 100%;
    margin: 0;
}

    .news-filter + .news-filter {
        margin-top: 18px;
    }

    .news-filter label,
    .news-districts legend {
        display: block;
        margin: 0 0 6px;
        color: var(--news-blue-dark);
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.4;
    }

    .news-filter input,
    .news-filter select {
        display: block;
        width: 100% !important;
        min-height: 46px;
        margin: 0;
        padding: 9px 11px;
        border: 1px solid #8c99a6;
        border-radius: 6px;
        background: var(--news-white);
        color: var(--news-text);
        font: inherit;
    }

        .news-filter input::placeholder {
            color: #687480;
            opacity: 1;
        }

/* =========================================================
   BUTTONS
   ========================================================= */

.news-button,
.news-district-button,
.news-pagination button,
.news-error button {
    min-height: 46px;
    border: 2px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.news-button {
    padding: 9px 15px;
}

    .news-button .fa {
        margin-right: 6px;
    }

.news-button--primary {
    border-color: var(--news-green);
    background: var(--news-green);
    color: var(--news-white);
}

    .news-button--primary:hover {
        border-color: var(--news-green-dark);
        background: var(--news-green-dark);
        color: var(--news-white);
    }

.news-button--secondary {
    border-color: var(--news-blue);
    background: var(--news-white);
    color: var(--news-blue);
}

    .news-button--secondary:hover {
        background: var(--news-blue);
        color: var(--news-white);
    }

.news-filter--keyword .news-button {
    display: block;
    width: 100% !important;
    margin-top: 8px;
}

.news-button--reset {
    display: block;
    width: 100% !important;
    min-height: 44px;
    margin-top: 10px;
}

/* =========================================================
   DISTRICT FILTERS
   ========================================================= */

.news-districts {
    display: block;
    min-width: 0;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
}

    .news-districts legend {
        display: block;
        margin: 0 0 6px;
        color: var(--news-blue-dark);
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.4;
    }

.news-districts__buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
    width: 100%;
}

.news-district-button {
    display: flex;
    width: 100% !important;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 8px;
    border: 2px solid var(--news-blue);
    border-radius: 6px;
    background: var(--news-white);
    color: var(--news-blue);
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
}

    .news-district-button:hover,
    .news-district-button.is-active {
        background: var(--news-blue);
        color: var(--news-white);
    }

/* =========================================================
   PAGINATION
   ========================================================= */

.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.news-pagination--top {
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid var(--news-border);
    border-radius: 8px;
    background: var(--news-background);
}

.news-pagination--bottom {
    margin: 24px 0 0;
}

.news-pagination[style*="display: none"] {
    display: none !important;
}

.news-pagination__pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.news-pagination button {
    min-width: 44px;
    padding: 8px 12px;
    border-color: var(--news-blue);
    background: var(--news-white);
    color: var(--news-blue);
}

    .news-pagination button:hover:not(:disabled),
    .news-pagination button.is-current {
        background: var(--news-blue);
        color: var(--news-white);
    }

    .news-pagination button:disabled {
        border-color: #aeb8c1;
        color: #6c747c;
        cursor: not-allowed;
        opacity: 0.7;
    }

/* =========================================================
   LOADING, ERROR AND EMPTY RESULTS
   ========================================================= */

.news-loader,
.news-error,
.news-empty {
    margin: 16px 0;
    padding: 22px;
    border-radius: 8px;
    background: var(--news-background);
    text-align: center;
    font-size: 1.0625rem;
}

.news-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

    .news-loader[style*="display: none"],
    .news-error[style*="display: none"],
    .news-empty[style*="display: none"] {
        display: none !important;
    }

.news-loader__spinner {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 4px solid #cad6df;
    border-top-color: var(--news-blue);
    border-radius: 50%;
    animation: news-spin 0.8s linear infinite;
}

@keyframes news-spin {
    to {
        transform: rotate(360deg);
    }
}

.news-error {
    border-left: 5px solid var(--news-error);
    color: var(--news-error-dark);
}

    .news-error button {
        min-height: 42px;
        margin-left: 8px;
        padding: 7px 14px;
        border-color: var(--news-error-dark);
        background: var(--news-white);
        color: var(--news-error-dark);
    }

.news-empty {
    border: 1px solid var(--news-border);
}

/* =========================================================
   NEWS LIST
   ========================================================= */

.news-list {
    display: grid;
    gap: 16px;
}

    .news-list[style*="display: none"] {
        display: none !important;
    }

/* =========================================================
   NEWS CARDS
   ========================================================= */

.news-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    overflow: hidden;
    min-height: 185px;
    border: 1px solid var(--news-border);
    border-radius: 10px;
    background: var(--news-white);
    box-shadow: 0 3px 12px rgba(0, 61, 166, 0.07);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    .news-card:hover {
        border-color: #8fa9d6;
        box-shadow: 0 7px 18px rgba(0, 61, 166, 0.13);
        transform: translateY(-2px);
    }

.news-card__image-link {
    display: block;
    min-height: 100%;
    overflow: hidden;
    background: #e7edf2;
}

    .news-card__image-link[style*="display: none"] {
        display: none !important;
    }

.news-card__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 185px;
    object-fit: cover;
}

.news-card__content {
    min-width: 0;
    padding: 18px 20px;
}

.news-card__date {
    margin: 0 0 4px;
    color: var(--news-muted);
    font-size: 0.9375rem;
    font-weight: 700;
}

.news-card__title {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
    color: var(--news-blue);
    font-size: 1.25rem;
    line-height: 1.3;
}

    .news-card__title a {
        color: var(--news-blue);
        text-decoration: none;
    }

        .news-card__title a:hover {
            text-decoration: underline;
            text-underline-offset: 3px;
        }

.news-card__summary {
    overflow-wrap: anywhere;
}

    .news-card__summary,
    .news-card__summary p {
        margin: 0 0 10px;
    }

        .news-card__summary > :last-child {
            margin-bottom: 0;
        }

.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: var(--news-green-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

    .news-card__link:hover {
        color: var(--news-blue);
    }

/* =========================================================
   KEYBOARD FOCUS
   ========================================================= */

.news-center a:focus-visible,
.news-center button:focus-visible,
.news-center input:focus-visible,
.news-center select:focus-visible {
    outline: 3px solid var(--news-gold);
    outline-offset: 3px;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .news-loader__spinner {
        animation-duration: 1.8s;
    }

    .news-card,
    .news-button,
    .news-district-button,
    .news-pagination button,
    .news-social__links a {
        transition: none;
    }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
    .news-banner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-banner__social {
        align-items: flex-start;
        text-align: left;
    }

    .news-social__links {
        justify-content: flex-start;
    }

    .news-center__layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .news-filter-column .news-filters {
        position: static;
    }

    .news-filter--keyword .news-button {
        width: auto !important;
        min-width: 140px;
    }

    .news-button--reset {
        width: auto !important;
        min-width: 180px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {
    .news-center {
        font-size: 16px;
    }

    .news-banner {
        gap: 15px;
        padding: 18px;
    }

    .news-banner__county-heading {
        font-size: 1.35rem;
    }

    .news-banner__social {
        align-items: flex-start;
    }

    .news-social__links {
        width: 100%;
        justify-content: flex-start;
    }

    .news-filter-column .news-filters {
        padding: 17px;
    }

    .news-filter--keyword .news-button,
    .news-button--reset {
        width: 100% !important;
    }

    .news-pagination {
        align-items: stretch;
    }

    .news-pagination--top {
        margin-bottom: 16px;
        padding: 11px;
    }

    .news-pagination__pages {
        order: -1;
        width: 100%;
    }

    .news-pagination__direction {
        flex: 1 1 0;
    }

    .news-card {
        grid-template-columns: 1fr;
    }

    .news-card__image-link,
    .news-card__image {
        height: 210px;
        min-height: 0;
    }

    .news-card__content {
        padding: 17px;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {
    .news-social__links a {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .news-pagination button {
        min-width: 42px;
        padding-right: 10px;
        padding-left: 10px;
    }
}
