:root {
    --primary: #0d6b57;
    --primary-dark: #08483c;
    --accent: #f2b84b;
    --ink: #1e2930;
    --muted: #66737d;
    --soft: #eef6f3;
    --line: #d9e4df;
}

body {
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
}

.messages-wrap {
    margin-top: 1rem;
}

.hero-section {
    background: linear-gradient(90deg, rgba(13, 70, 55, .92), rgba(13, 70, 55, .62)), url("../images/hero-placeholder.svg");
    background-position: center;
    background-size: cover;
    color: #fff;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.form-control,
.form-select {
    border-color: #cfdcd6;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(13, 107, 87, .16);
}

.hero-content {
    max-width: 760px;
    padding: 6rem 0;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1rem;
}

.eyebrow {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.impact-band {
    background: var(--primary-dark);
    color: #fff;
    padding: 1.6rem 0;
}

.impact-band strong {
    display: block;
    font-size: 2rem;
}

.impact-band span {
    color: rgba(255, 255, 255, .82);
}

.section-pad {
    padding: 4.5rem 0;
}

.bg-soft {
    background: var(--soft);
}

.section-copy {
    color: var(--muted);
    font-size: 1.1rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0;
}

.content-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(18, 45, 37, .06);
}

.content-card img {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: cover;
}

.content-card-body {
    padding: 1.25rem;
}

.content-card h3 {
    font-size: 1.18rem;
    margin-bottom: .6rem;
}

.content-card p {
    color: var(--muted);
}

.meta {
    color: var(--muted);
    display: inline-block;
    font-size: .9rem;
    margin-bottom: .4rem;
}

.list-panel {
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}

.list-panel p,
.list-panel span {
    color: var(--muted);
}

.list-panel h3 {
    font-size: 1.1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .75rem;
}

.gallery-grid img {
    aspect-ratio: 1;
    border-radius: 8px;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.gallery-page-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery-page-grid figure {
    margin: 0;
}

.gallery-page-grid figcaption {
    color: var(--muted);
    font-size: .92rem;
    margin-top: .35rem;
}

.page-hero {
    background: var(--primary);
    color: #fff;
    padding: 4.25rem 0;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
}

.page-hero p {
    max-width: 760px;
}

.narrow {
    max-width: 900px;
}

.rounded-img,
.detail-image {
    border-radius: 8px;
    width: 100%;
}

.detail-image {
    margin-bottom: 2rem;
    max-height: 520px;
    object-fit: cover;
}

.rich-text {
    font-size: 1.05rem;
}

.form-panel,
.info-panel,
.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 10px 24px rgba(18, 45, 37, .06);
}

.auth-section {
    background: var(--soft);
    min-height: 72vh;
    padding: 4rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 480px;
    width: 100%;
}

.auth-card h1 {
    font-weight: 800;
}

.auth-switch {
    margin: 1rem 0 0;
    text-align: center;
}

.portal-shell {
    background: #f7faf9;
    min-height: 100vh;
}

.portal-layout {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 8px 0 26px rgba(18, 45, 37, .06);
    display: flex;
    flex: 0 0 292px;
    flex-direction: column;
    height: 100vh;
    left: 0;
    padding: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.portal-brand {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    min-height: 70px;
    padding-bottom: 1rem;
}

.portal-brand img {
    display: block;
    max-height: 58px;
    max-width: 172px;
    object-fit: contain;
}

.portal-sidebar-close {
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-dark);
    display: none;
    font-size: 1.45rem;
    height: 38px;
    justify-content: center;
    line-height: 1;
    width: 38px;
}

.portal-menu {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .35rem;
    overflow-y: auto;
    padding-right: .15rem;
}

.portal-menu-link,
.portal-menu-group summary,
.portal-submenu a,
.logout-button {
    border-radius: 8px;
    color: #2d433d;
    font-weight: 800;
}

.portal-menu-link,
.portal-menu-group summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: .82rem .9rem;
    transition: background-color .2s ease, color .2s ease;
}

.portal-menu-link:hover,
.portal-menu-group summary:hover,
.portal-submenu a:hover {
    background: var(--soft);
    color: var(--primary-dark);
}

.portal-menu-link.is-active,
.portal-menu-group summary.is-active,
.portal-submenu a.is-active {
    background: var(--primary);
    color: #fff;
}

.portal-menu-group {
    margin: 0;
}

.portal-menu-group summary {
    list-style: none;
}

.portal-menu-group summary::-webkit-details-marker {
    display: none;
}

.portal-menu-group summary::after {
    content: "+";
    font-size: 1.05rem;
}

.portal-menu-group[open] summary::after {
    content: "-";
}

.portal-submenu {
    display: grid;
    gap: .25rem;
    padding: .25rem 0 .45rem .75rem;
}

.portal-submenu a {
    display: block;
    font-size: .92rem;
    padding: .62rem .8rem;
}

.logout-form {
    border-top: 1px solid var(--line);
    margin: 1rem 0 0;
    padding-top: 1rem;
}

.logout-button {
    background: #fff;
    border: 1px solid #cfdcd6;
    color: var(--primary-dark);
    font: inherit;
    padding: .78rem .9rem;
    text-align: left;
    width: 100%;
}

.logout-button:hover {
    background: #fff5f3;
    border-color: #f0c4ba;
    color: #9a2f1f;
}

.portal-sidebar-backdrop {
    background: rgba(23, 37, 47, .38);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 1030;
}

.portal-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem;
}

.portal-topbar {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(18, 45, 37, .05);
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
     min-height: 72px;
    padding: .9rem 1rem;
}

.portal-menu-toggle {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.portal-menu-toggle span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 18px;
}

.portal-user {
    margin-left: auto;
    min-width: 0;
    text-align: right;
}

.portal-topbar-title {
    min-width: 0;
}

.portal-topbar-title span,
.portal-topbar-title strong {
    display: block;
    overflow-wrap: anywhere;
}

.portal-topbar-title span {
    color: #17252f;
    font-size: 1.12rem;
    font-weight: 800;
}

.portal-topbar-title strong {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.portal-user span,
.portal-user strong {
    display: block;
    overflow-wrap: anywhere;
}

.portal-user span {
    color: #17252f;
    font-weight: 800;
}

.portal-user strong {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.portal-head {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.portal-head h1 {
    color: #17252f;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin: 0;
}

.overview-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(18, 45, 37, .05);
    padding: 1rem;
}

.detail-tile span {
    color: var(--muted);
    display: block;
    font-size: .86rem;
    font-weight: 800;
    margin-bottom: .25rem;
}

.detail-tile strong {
    color: #17252f;
    display: block;
    font-size: 1.02rem;
    overflow-wrap: anywhere;
}

.portal-form-panel {
    max-width: 900px;
}

.portal-footer {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
}

.portal-footer strong {
    color: var(--primary-dark);
    font-weight: 800;
    overflow-wrap: anywhere;
    text-align: right;
}

.advisory-modal .modal-dialog {
    max-width: min(960px, calc(100% - 1.5rem));
}

.advisory-modal-content {
    background: #fff9e9;
    border: 0;
    border-radius: 0;
    box-shadow: 0 24px 70px rgba(32, 37, 52, .28);
    overflow: hidden;
}

.advisory-modal-header {
    align-items: center;
    background: linear-gradient(90deg, #fff3d7 0%, #ff784c 100%);
    color: #2c2448;
    display: flex;
    justify-content: space-between;
    min-height: 74px;
    padding: 1rem 1.5rem;
}

.advisory-title-wrap {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.advisory-title-wrap h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.advisory-alert-icon {
    align-items: center;
    border: 3px solid currentColor;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    line-height: 1;
    width: 28px;
}

.advisory-close {
    flex: 0 0 auto;
    opacity: 1;
}

.advisory-modal-body {
    min-height: 360px;
    overflow: hidden;
    padding: 1.4rem 1.5rem 1.7rem;
    position: relative;
}

.advisory-popup-image {
    border-radius: 8px;
    display: block;
    margin-bottom: 1rem;
    max-height: 220px;
    object-fit: cover;
    position: relative;
    width: 100%;
    z-index: 1;
}

.advisory-copy {
    color: #47515e;
    font-size: clamp(1rem, 1.9vw, 1.32rem);
    font-weight: 500;
    line-height: 1.45;
    position: relative;
    z-index: 1;
}

.advisory-copy br {
    content: "";
    display: block;
    margin-bottom: 1.05rem;
}

.advisory-watermark {
    align-items: center;
    background: rgba(242, 184, 75, .18);
    border: 2px solid rgba(242, 184, 75, .18);
    border-radius: 50%;
    bottom: 2.3rem;
    color: rgba(255, 132, 88, .22);
    display: flex;
    font-size: 6rem;
    font-weight: 900;
    height: 150px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 2rem;
    width: 150px;
}

.site-footer {
    background: #12352e;
    color: #dcebe6;
}

.footer-links a,
.site-footer a {
    color: #dcebe6;
}

.footer-bottom {
    background: rgba(0, 0, 0, .18);
}

@media (max-width: 991px) {
    .hero-section {
        min-height: 560px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .portal-layout {
        display: block;
    }

    .portal-sidebar {
        height: 100vh;
        max-width: calc(100vw - 2rem);
        position: fixed;
        transform: translateX(-105%);
        transition: transform .25s ease;
        width: 292px;
    }

    body.portal-sidebar-open .portal-sidebar {
        transform: translateX(0);
    }

    body.portal-sidebar-open .portal-sidebar-backdrop {
        display: block;
    }

    .portal-sidebar-close,
    .portal-menu-toggle {
        display: inline-flex;
    }

    .portal-main {
        padding: 1rem;
    }

}

@media (max-width: 575px) {
    .section-pad {
        padding: 3rem 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portal-head {
        align-items: flex-start;
    }

    .portal-topbar {
        gap: .75rem;
        padding: .75rem;
    }

    .portal-topbar-title span {
        font-size: 1rem;
    }

    .portal-user {
        font-size: .95rem;
    }

    .portal-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-footer strong {
        text-align: left;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }

}
