﻿/* HERO (Option A) */
.hero-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    min-height: 340px;
}

.hero-img {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    left: 6.5%;
    top: 50%;
    transform: translateY(-50%);
    width: min(560px, 88%);
    background: rgba(18,78,67,.88);
    border-radius: 22px;
    padding: 30px 30px 24px 30px;
    color: #fff;
}

.hero-title {
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.05;
    font-size: clamp(26px, 2.1vw, 44px);
    margin: 0;
}

.hero-sub {
    color: rgba(255,255,255,.9);
    font-size: 14px;
    line-height: 1.6;
    max-width: 48ch;
}

.hero-btn {
    border-radius: 14px;
    padding: 10px 16px;
    font-weight: 700;
    border: 0;
    color: #fff;
    background: #52b7b0;
}

    .hero-btn:hover {
        background: #3aa59e;
        color: #fff;
    }

/* INTRO BLOCK */
.statement-card {
    overflow: hidden;
    background: #e9dfda;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: var(--shadow);
}

.statement-inner {
    padding: 26px;
    max-width: 1100px;
    margin: 0 auto;
}

.statement-title {
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    font-size: 22px;
    color: #111827;
}

.statement-p {
    color: rgba(17,24,39,.78);
    font-size: 14px;
    line-height: 1.8;
}

/* Cards */
.card.shadow-sm {
    box-shadow: var(--shadow) !important;
}

/* Geographic Area: Region select nested visually under Province */
#fCounty option {
    padding: 6px 8px;
}

.geo-county-wrap {
    padding-left: 12px;
    border-left: 2px solid var(--chip-border, #a7f3d0);
    transition: opacity .15s ease;
}

    .geo-county-wrap.is-disabled {
        opacity: .6;
    }

/* Brand-colored select2 single-select box for Region, to match the rest of the filter panel */
#fCounty + .select2-container--default .select2-selection--single {
    border-radius: 14px;
    height: 38px;
    display: flex;
    align-items: center;
}

    #fCounty + .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-left: 12px;
        line-height: normal;
    }

    #fCounty + .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px;
    }

#fCounty + .select2-container--default.select2-container--open .select2-selection--single,
#fCounty + .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--accent, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .12);
}

#fCounty:disabled + .select2-container--default .select2-selection--single {
    background-color: #f1f3f5;
    cursor: not-allowed;
}

#fCounty:disabled + .select2-container--default .select2-selection--single {
    background-color: #f1f3f5;
    cursor: not-allowed;
}

/* Results list cards match your structure */
.program-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: auto;
    background: #fff;
}

    .program-card .card-body {
        padding: 14px;
    }

    .program-card img {
        border-radius: 12px;
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        height: auto;
    }

.program-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.program-tag {
    background: var(--chip-bg);
    color: #065f46;
    border-radius: var(--radius-pill);
    border: 1px solid var(--chip-border);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
}

@@media (max-width: 991px) {
    .container-fluid.px-5 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .hero-overlay {
        left: 16px;
        right: 16px;
        width: auto;
        padding: 20px;
        border-radius: 20px;
    }
}

.incentives {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.incentive {
    background: #f1f5f9;
    border-radius: var(--radius-pill);
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    font-size: 12px;
    color: #334155;
}

.img-wrap {
    position: relative;
}

.badge {
    border-radius: var(--radius-pill);
    border: 1px solid #e2e8f0;
    color: black;
    font-weight: normal;
}

.min-img-height {
   height: 10rem;
}

.drawer {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 40;
}

    .drawer.open {
        display: block;
    }

.drawer-panel {
    position: fixed;
    top: 0;
    left: 50%;
    right: auto;
    width: 30rem;
    max-width: 100%;
    height: 100%;
    background: var(--canza-green);
    border-left: 1px solid #ddd;
    transform: translateX(100vw);
    transition: transform .3s ease;
    z-index: 9999;
    overflow: auto;
}

.drawer-meta {
    font-size: 12px;
    color: var(--muted);
}

.drawer-title {
    font-size: 18px;
    font-weight: 700;
}

.drawer-body {
    padding: 1rem;
    overflow-y: auto;
    overflow: auto;
}

    .drawer-body img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        height: auto;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .drawer-body .info {
        margin-bottom: 10px;
        font-size: 14px;
    }

.drawer-summary {
    color: #475569;
    font-size: 14px;
}

#drawer-region .drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    transition: opacity .25s;
    z-index: 998;
}

#drawer-region.open .drawer-backdrop {
    opacity: 1;
}

#drawer-region.open .drawer-panel {
    transform: translateX(-50%);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

/* Funding Opportunity detail modal */
/* The compare dock is sticky with a higher z-index than the Bootstrap modal, so it can sit on
   top of the modal's footer buttons on tall modals / small screens. Force it out of the way
   whenever this modal is open, regardless of how many times updateCompareUI() toggles it. */
body:has(.fo-modal.show) #compareDock {
    display: none !important;
}

.fo-modal .modal-content {
    background: var(--canza-green);
    border: none;
}

.fo-modal .modal-header,
.fo-modal .modal-footer {
    border-color: rgba(255,255,255,.15);
}

.fo-modal .modal-header {
    align-items: center;
    gap: .75rem;
}

.fo-modal-img {
    width: 10rem;
    height: 10rem;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.fo-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}

    .fo-fact-grid .card {
        margin-bottom: .5rem;
    }

@media (max-width: 576px) {
    .fo-fact-grid {
        grid-template-columns: 1fr;
    }
}