/* ==========================================================================
   BRANDING & VARIABLES
   ========================================================================== */
:root {
    --swlp-blue: #24408E;
    --light-blue: #009FDD;
    --swlp-yellow: #FEBC11;
    --text-main: #000000;
    --text-light: #ffffff;
    --fw-normal: 400;
    --fw-bold: 700;
}

/* Bootstrap Utility Overrides - Light Blue Fix */
.border-primary {
    border-color: var(--light-blue) !important;
}

.bg-primary {
    background-color: var(--light-blue) !important;
}

/* Custom Two-Tone Checkbox */
.custom-check-list {
    list-style: none;
    padding-left: 0;
}

    .custom-check-list li {
        position: relative;
        padding-left: 45px;
        margin-bottom: 25px;
        line-height: 1.5;
        display: flex;
        align-items: flex-start;
    }

        /* The Hollow Box Border (SWLP Yellow) */
        .custom-check-list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0px;
            width: 26px;
            height: 26px;
            border: 3px solid var(--swlp-yellow);
            background-color: transparent;
            border-radius: 4px;
            box-sizing: border-box;
        }

        /* The Overshot Thick Checkmark (Light Blue) */
        .custom-check-list li::after {
            content: "";
            position: absolute;
            left: 0px;
            top: -4px;
            width: 30px;
            height: 32px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23009FDD' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3l7-7'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-size: contain;
            z-index: 2;
        }

/* ==========================================================================
   BASE STYLES (HTML/BODY)
   ========================================================================== */
html {
    font-size: 16px;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

a {
    color: var(--light-blue);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

    a:hover, a:focus {
        color: var(--swlp-yellow);
        text-decoration: underline;
    }

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

main {
    flex: 1 0 auto;
    width: 100%;
    padding-bottom: 40px;
}

section:last-of-type {
    margin-bottom: -3rem;
}

footer, .main-footer {
    flex-shrink: 0;
}

/* Custom Utilities to Fix Bootstrap 5.1 Missing Classes */
.object-fit-cover {
    object-fit: cover !important;
}

.object-fit-contain {
    object-fit: contain !important;
}

.border-opacity-25 {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.z-1 {
    z-index: 1 !important;
}

.z-2 {
    z-index: 2 !important;
}

.z-3 {
    z-index: 3 !important;
}

/* ==========================================================================
   ACCORDION STYLES
   ========================================================================== */

.accordion-button {
    font-size: 1.5rem !important;
    font-weight: 600;
    line-height: 1.2;
    padding-top: 1rem;
    padding-bottom: 1rem;
    color: #003366;
}

    .accordion-button::after {
        width: 1.25rem;
        height: 1.25rem;
        background-size: 1.25rem;
    }

    .accordion-button:not(.collapsed) {
        background-color: #f8f9fa;
        color: #003366;
    }

.scroll-viewport {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.img-contain-fit {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.img-square-fit {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    display: block;
}

/* ==========================================================================
   RESPONSIVE TYPOGRAPHY
   ========================================================================== */
.display-hero {
    font-size: clamp(2.5rem, 5vw, 3.3rem);
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.1;
    margin-bottom: 25px;
}

/* Midtown Badge Styling */
.midtown-badge {
    display: inline-flex;
    align-items: stretch;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-year {
    background-color: #009CDE; /* Matches your light blue */
    color: white;
    padding: 10px 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    border-left: 2px solid #FFC220;
}

.badge-text {
    background-color: #FFC220; /* Matches swlp-yellow */
    color: #1D428A; /* Dark blue text color from image */
    padding: 10px 30px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    border-left: 2px solid rgba(0,0,0,0.1); /* Subtle separation */
}

/* Mobile adjustments for the badge */
@media (max-width: 576px) {
    .badge-year, .badge-text {
        font-size: 1.4rem;
        padding: 8px 15px;
    }
}

h1, h2, h3, .h1, .h2, .h3 {
    font-weight: var(--fw-bold);
    color: var(--text-main);
}

h2 {
    font-size: 2rem;
}

p, li {
    font-size: 1rem;
    font-weight: var(--fw-normal);
}

/* ==========================================================================
   LAYOUT COMPONENTS (Header, Footer, Nav)
   ========================================================================== */
.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand-border {
    border-bottom: 18px solid #00a0de !important;
    padding-bottom: 0;
}

    .navbar-brand-border .container {
        padding-bottom: 15px;
        padding-top: 15px;
    }

.navbar-nav .nav-link {
    font-weight: 400;
    color: var(--text-main) !important;
    transition: color 0.2s ease-in-out;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    padding-left: clamp(0.5rem, 1vw, 1rem) !important;
    padding-right: clamp(0.5rem, 1vw, 1rem) !important;
}

    .navbar-nav .nav-link:hover {
        color: var(--light-blue) !important;
    }

@media (max-width: 991px) {
    .navbar-collapse {
        border-top: 1px solid #eee;
        margin-top: 10px;
        padding: 0.5rem 0;
    }

    .navbar-nav .nav-link {
        text-align: center;
        padding: 15px 0 !important;
        border-bottom: 1px solid #f8f8f8;
    }
}

/* ==========================================================================
   FLOATING ACTION BUTTONS
   ========================================================================== */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1050;
}

.fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.share-btn {
    background-color: var(--swlp-yellow);
    color: var(--swlp-blue);
}

@media (min-width: 992px) {
    .share-btn {
        display: none !important;
    }
}

.top-btn {
    background-color: var(--light-blue);
    color: white;
}

.fab-btn:hover {
    transform: scale(1.1);
}

.fab-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ==========================================================================
   DYNAMIC LOGO SCALING
   ========================================================================== */
.navbar-logo-group {
    gap: clamp(0.75rem, 2.5vw, 4rem);
    display: flex;
    align-items: center;
}

.logo-img {
    height: clamp(30px, 4vw, 60px) !important;
    width: auto;
    object-fit: contain;
    transition: all 0.2s ease-in-out;
}

.navbar-logo-group a {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
}

    .navbar-logo-group a:hover {
        opacity: 0.8;
        transform: translateY(-1px);
    }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    background-image: url('../images/Header_main.png');
    background-size: cover;
    background-position: 55% center;
    min-height: 420px;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding: 60px 0;
}

    .hero-section::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 18px;
        background: linear-gradient(105deg, var(--swlp-yellow) 0%, var(--swlp-yellow) 25%, var(--light-blue) 25.1%,
        var(--light-blue) 100% );
        z-index: 3;
    }

@media (max-width: 992px) {
    .hero-section {
        background-position: 45% center;
    }
}

/* ==========================================================================
   PROJECT AREA - MAP TRIGGER CARD
   ========================================================================== */
.map-trigger-wrapper {
    cursor: pointer;
    border-radius: 8px;
    background-color: #000; /* Backdrop for the dimming effect */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
}

    .map-trigger-wrapper:hover {
        transform: scale(1.02);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

    /* Dim the image on hover */
    .map-trigger-wrapper img {
        transition: opacity 0.3s ease, filter 0.3s ease;
    }

    .map-trigger-wrapper:hover img {
        opacity: 0.6;
        filter: blur(1px);
    }

/* The Overlay Icon/Text */
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-trigger-wrapper:hover .map-overlay {
    opacity: 1;
}

.overlay-content {
    background-color: var(--swlp-blue);
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-bottom: 3px solid var(--swlp-yellow);
}

#project-area .bi-geo-alt-fill {
    color: var(--light-blue) !important;
    font-size: 1.1rem;
    vertical-align: middle;
}

@media (max-width: 576px) {
    .overlay-content span {
        font-size: 0.9rem;
    }

    .overlay-content i {
        font-size: 1.5rem !important;
    }
}

/* ==========================================================================
   SERVICE LINE INVENTORY MAP
   ========================================================================== */

.btn-map-pop {
    background-color: #1d3d7c;
    border: none;
    padding: 0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

    .btn-map-pop:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 15px rgba(0,0,0,0.2);
        background-color: #1d3d7c;
    }

    .btn-map-pop img {
        height: 30px;
        flex-shrink: 0;
    }

    .btn-map-pop span {
        padding: 10px 30px;
        font-weight: 600;
        font-size: 1.15rem;
        white-space: nowrap;
        color: var(--text-light);
    }

    .btn-map-pop:hover span {
        text-decoration: none;
    }

.map-btn-logo {
    height: 45px !important;
    padding: 5px 0 5px 15px;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .btn-map-pop span {
        padding: 8px 15px;
        font-size: 0.95rem;
        letter-spacing: -0.2px;
    }

    .map-btn-logo {
        height: 35px !important;
        padding-left: 10px;
    }

    #mapContainer {
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        width: calc(100% + 2.5rem);
    }

        #mapContainer iframe {
            border-radius: 0 !important;
            border-left: none;
            border-right: none;
            height: 500px;
        }

        #mapContainer p {
            padding: 0 1.25rem;
        }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    position: relative;
    background-image: url('../images/Footer_main.png');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 4rem 0 2rem;
    overflow: hidden;
}

    .main-footer::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 18px;
        background: linear-gradient(105deg, var(--light-blue) 0%, var(--light-blue) 75%, var(--swlp-yellow) 75.1%, var(--swlp-yellow) 100% );
        z-index: 3;
    }

    .main-footer a {
        color: var(--text-light);
        text-decoration: underline;
    }

        .main-footer a:hover {
            color: var(--swlp-yellow);
            opacity: 1;
        }

.footer-logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

    .footer-logo-row a {
        display: inline-flex;
        align-items: center;
        transition: all 0.2s ease-in-out;
    }

        .footer-logo-row a:hover {
            opacity: 0.8;
            transform: translateY(-2px);
        }

.footer-logo {
    height: clamp(80px, 12vw, 120px);
    width: auto;
    object-fit: contain;
}

.footer-copyright {
    font-size: 0.85rem;
    margin-top: 2rem;
    opacity: 0.8;
}

    .footer-copyright a {
        opacity: 1 !important;
        font-weight: var(--fw-bold);
    }

@media (max-width: 768px) {
    .footer-logo-row {
        gap: 1.5rem;
    }

    .footer-headline {
        padding: 0 10px;
    }
}