/* Statistics page: compact, evidence-led dataset browsing. */

.agristat-statistics-page .page-header-banner {
    margin-bottom: 0;
    padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
    border-bottom: 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(214, 168, 75, .2), transparent 24rem),
        linear-gradient(125deg, #0b3322 0%, #124734 58%, #1c5e42 100%);
}

.agristat-statistics-page .page-header-banner::before {
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 54px 54px;
}

.agristat-statistics-page .page-header-banner h1 {
    max-width: 900px;
    color: #fff;
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    letter-spacing: -.035em;
    line-height: 1.03;
}

.agristat-statistics-page .page-header-banner p {
    max-width: 720px;
    color: #d5e7dc;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.7;
}

.agristat-statistics-page .breadcrumb,
.agristat-statistics-page .breadcrumb a {
    color: #d6a84b;
}

.agristat-statistics-page #main-content > .container {
    max-width: 1440px;
}

.agristat-statistics-page .content-area {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.statistics-listing {
    display: flex;
    flex-direction: column;
}

.statistics-overview {
    order: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: clamp(2.75rem, 5vw, 4.5rem);
    overflow: hidden;
    border: 1px solid #dbe7df;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 81, 50, .08);
}

.statistics-overview > div {
    padding: 1.4rem 1.25rem;
    text-align: center;
}

.statistics-overview > div + div {
    border-left: 1px solid #dbe7df;
}

.statistics-overview strong,
.statistics-overview span {
    display: block;
}

.statistics-overview strong {
    color: #124734;
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    line-height: 1;
}

.statistics-overview span {
    margin-top: .45rem;
    color: #5b6d63;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.dataset-browser-heading {
    order: 2;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.dataset-browser-heading h2 {
    margin: .3rem 0 0;
    color: #10261b;
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    letter-spacing: -.025em;
}

.dataset-browser-heading p {
    max-width: 520px;
    margin: 0;
    color: #5b6d63;
    line-height: 1.6;
}

.dataset-browser-eyebrow {
    color: #986008;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.agristat-statistics-page .filter-bar {
    order: 3;
    display: grid;
    grid-template-columns: minmax(230px, 1.7fr) repeat(4, minmax(130px, 1fr)) auto auto;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-color: #dbe7df;
    border-radius: 16px;
    background: #f6faf7;
}

.agristat-statistics-page .filter-search,
.agristat-statistics-page .filter-select {
    width: 100%;
    min-width: 0;
}

.agristat-statistics-page .filter-bar .form-control,
.agristat-statistics-page .filter-bar .btn {
    min-height: 46px;
}

.agristat-statistics-page .filter-bar .form-control {
    border-color: #cfddd4;
    background: #fff;
}

.dataset-card-featured {
    order: 4;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
    border-color: rgba(214, 168, 75, .42);
    background: linear-gradient(110deg, #fffaf0, #fff 70%);
}

.statistics-listing #dataset-results {
    order: 5;
}

.agristat-statistics-page .results-bar {
    margin: .35rem 0 1rem;
    color: #4b6255;
    font-weight: 650;
}

.agristat-statistics-page .dataset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.agristat-statistics-page .dataset-card {
    gap: .9rem;
    border-color: #dbe7df;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 81, 50, .055);
}

.agristat-statistics-page .dataset-card-title {
    color: #10261b;
    font-size: 1.02rem;
    line-height: 1.42;
}

.dataset-card-excerpt {
    margin: 0;
    color: #5b6d63;
    font-size: .84rem;
    line-height: 1.6;
}

.agristat-statistics-page .research-dataset {
    order: 6;
    margin: clamp(3.5rem, 7vw, 6rem) 0 0;
    border-color: #dbe7df;
    background:
        radial-gradient(circle at 90% 10%, rgba(214, 168, 75, .14), transparent 18rem),
        linear-gradient(145deg, #f3f8f4, #fff);
    box-shadow: 0 18px 50px rgba(15, 81, 50, .07);
}

@media (max-width: 1180px) {
    .agristat-statistics-page .filter-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .agristat-statistics-page .filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .agristat-statistics-page .page-header-banner {
        padding-block: 3rem;
    }

    .statistics-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .statistics-overview > div + div {
        border-left: 0;
    }

    .statistics-overview > div:nth-child(even) {
        border-left: 1px solid #dbe7df;
    }

    .statistics-overview > div:nth-child(n+3) {
        border-top: 1px solid #dbe7df;
    }

    .dataset-browser-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .65rem;
    }

    .agristat-statistics-page .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agristat-statistics-page .filter-search {
        grid-column: 1 / -1;
    }

    .agristat-statistics-page .dataset-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dataset-card-featured {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .agristat-statistics-page .filter-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .agristat-statistics-page .filter-search {
        grid-column: auto;
    }

    .agristat-statistics-page .filter-bar .btn {
        width: 100%;
    }
}
