/********** MOPED Official Rebrand CSS **********/
:root {
    --primary: #0B6E4F;
    --secondary: #083D2E;
    --light: #F7F8F6;
    --dark: #083D2E;
    --accent: #C9A227;
    --mpd-primary: #0B6E4F;
    --mpd-secondary: #083D2E;
    --mpd-accent: #C9A227;
    --mpd-light: #F7F8F6;
    --mpd-dark: #083D2E;
    --mpd-text: #1E2321;
    --bs-primary: #0B6E4F;
    --bs-secondary: #083D2E;
    --bs-dark: #083D2E;
    --bs-light: #F7F8F6;
    --bs-body-color: #1E2321;
    --bs-body-font-family: 'Open Sans', sans-serif;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    background-color: var(--primary);
    color: #FFFFFF;
    border: 2px solid var(--accent);
}

.back-to-top:hover {
    background-color: var(--accent);
    color: #FFFFFF;
    border-color: #FFFFFF;
}

/*** Typography & Headings ***/
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--mpd-text);
    background-color: #FFFFFF;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.fw-bold {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700 !important;
    color: var(--dark);
}

h4, h5, h6, .fw-medium {
    font-weight: 600 !important;
}

/*** Brand Color Overrides ***/
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-dark { color: var(--dark) !important; }
.text-light { color: var(--light) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-dark { background-color: var(--dark) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-accent { background-color: var(--accent) !important; }

/*** Buttons ***/
.btn {
    font-weight: 500;
    transition: .3s;
    font-family: 'Open Sans', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}

.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}
.btn-accent:hover, .btn-accent:focus, .btn-accent:active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}

.btn-outline-accent {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline-accent:hover, .btn-outline-accent:focus, .btn-outline-accent:active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: .3s;
}
a:hover {
    color: var(--accent);
}

/* Form Focus */
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(201, 162, 39, 0.25);
}

/*** Top Bar ***/
.top-bar {
    background-color: var(--secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}
.top-bar a:hover {
    color: var(--accent) !important;
}

/*** Navbar ***/
.sticky-top {
    top: -150px;
    transition: .5s;
    background-color: #FFFFFF !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.16) !important;
}

.navbar {
    padding: 10px 0 !important;
    min-height: 84px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 0;
    color: #1E2321;
    outline: none;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease-in-out;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 6px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        padding: 15px;
        background: #FFFFFF;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    }

    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
        color: #1E2321;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/*** Hero Header ***/
.hero-header {
    margin-top: -80px;
    background: linear-gradient(135deg, rgba(8, 61, 46, 0.55) 0%, rgba(11, 110, 79, 0.45) 100%);
    background-size: cover;
    padding-top: 100px;
}

.hero-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 4px;
    bottom: 0;
    left: 0;
    background: var(--accent);
}

.section-title::after {
    position: absolute;
    content: "";
    width: 4px;
    height: 4px;
    bottom: 0;
    left: 50px;
    background: var(--accent);
}

.section-title.text-center::before {
    left: 50%;
    margin-left: -25px;
}

.section-title.text-center::after {
    left: 50%;
    margin-left: 25px;
}

.section-title h6::before,
.section-title h6::after {
    position: absolute;
    content: "";
    width: 10px;
    height: 10px;
    top: 2px;
    left: 0;
    background: rgba(201, 162, 39, .8);
}

.section-title h6::after {
    top: 5px;
    left: 3px;
}

/*** About ***/
.about-img {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-img::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: none;
}

/*** Mandate / Service Cards ***/
.service-item {
    position: relative;
    padding: 45px 30px;
    background: #FFFFFF;
    transition: .5s;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.service-item:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(11, 110, 79, 0.2);
}

.service-item .service-icon {
    margin: 0 auto 20px auto;
    width: 80px;
    height: 80px;
    color: var(--primary);
    background: var(--light);
    transition: .5s;
    border-radius: 50px;
}

.service-item:hover .service-icon {
    background: var(--accent);
    color: #FFFFFF;
}

.service-item h5,
.service-item p {
    transition: .5s;
}

.service-item:hover h5,
.service-item:hover p {
    color: #FFFFFF;
}

.service-item a.btn {
    position: relative;
    display: flex;
    color: var(--primary);
    transition: .5s;
    z-index: 1;
}

.service-item:hover a.btn {
    color: #FFFFFF;
}

/*** Feature / Resources ***/
.feature {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/*** Newsletter ***/
.newsletter {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border-top: 4px solid var(--accent);
}

/*** Case Study / News Cards ***/
.case-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background: #FFFFFF;
}

.case-item img {
    transition: .5s;
}
  
.case-item:hover img {
    transform: scale(1.1);
}
  
.case-overlay {
    position: absolute;
    padding: 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(8, 61, 46, 0), var(--secondary));
    z-index: 1;
}

.case-overlay small {
    display: inline-block;
    padding: 4px 16px;
    color: #FFFFFF;
    background: var(--accent);
    border-radius: 25px;
    margin-bottom: 12px;
    font-weight: 500;
}

.case-overlay span.btn:hover {
    color: #FFFFFF;
    background: var(--primary);
    border-color: var(--primary);
}

/*** FAQs / Accordion ***/
.accordion .accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 6px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.accordion .accordion-button {
    background: var(--light);
    border-radius: 6px;
    color: var(--dark);
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
}

.accordion .accordion-button:not(.collapsed) {
    color: #FFFFFF;
    background: var(--primary);
    box-shadow: none;
}

.accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion .accordion-body {
    padding: 20px;
    line-height: 1.7;
}

/*** Testimonial / Carousel ***/
.testimonial-carousel {
    position: relative;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 40px;
    height: 100%;
    top: calc(50% - 50px);
    left: -21px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 5px 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    border: 1px solid var(--primary);
    border-radius: 40px;
    font-size: 18px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.testimonial-carousel .owl-dots {
    margin-top: 35px;
    margin-left: 3rem;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    width: 15px;
    height: 15px;
    background: #FFFFFF;
    border: 1px solid var(--primary);
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--accent);
    border-color: var(--accent);
}

/*** Team / Leadership ***/
.team-item {
    transition: .5s;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.team-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/*** Footer ***/
.footer {
    background-color: var(--secondary);
    border-top: 3px solid var(--accent);
    color: #f8f9fa !important;
}

.footer p, .footer span, .footer div, .footer a.btn.btn-link, .footer .text-white-50 {
    color: #f8f9fa !important;
}

.footer .btn.btn-social {
    margin-right: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 40px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: #FFFFFF;
    background-color: var(--accent);
    border-color: var(--accent);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 12px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,.7);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link:hover {
    color: var(--accent);
    letter-spacing: 0.5px;
    box-shadow: none;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--accent);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer .copyright a {
    color: var(--accent);
}

.footer .copyright a:hover {
    color: #FFFFFF;
}

/*** Phase 2 Custom Components ***/
.hero-carousel {
    margin-top: -80px;
    position: relative;
    overflow: hidden;
}

.hero-carousel .carousel-item {
    min-height: 85vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 90px;
}

.hero-carousel .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    display: none;
    z-index: 1;
}

.hero-carousel .carousel-content {
    position: relative;
    z-index: 2;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 5%;
    z-index: 3;
}

.hero-carousel .carousel-indicators {
    z-index: 3;
    margin-bottom: 30px;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
    opacity: 0.5;
    margin: 0 6px;
}

.hero-carousel .carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

.fact-tile {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 8px;
    padding: 20px;
    transition: 0.3s;
    height: 100%;
}

.fact-tile:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.pull-quote {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    font-size: 1.15rem;
    font-style: italic;
    color: #FFFFFF;
    margin: 25px 0;
}

/*** Accessibility Focus States & WCAG AA Contrast Helpers ***/
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 3px !important;
}

.bg-primary .text-accent, .bg-dark .text-accent {
    color: #FFD700 !important; /* Lighter gold against dark green/dark background to guarantee > 4.5:1 WCAG AA contrast */
}