/********** Template CSS **********/
:root {
    --bs-tertiary: #797E88;
    --bs-soft: #f4fbf7;
    --bs-ink: #10342f;
    --bs-glow: rgba(24, 129, 80, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #f9fcfa 0%, #edf7f0 48%, #f7faf8 100%);
    color: var(--bs-dark);
}

img {
    max-width: 100%;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

/*** Modern page reveals ***/
.wow.animated {
    animation-name: modern-flip-in !important;
    animation-duration: .9s !important;
    animation-timing-function: cubic-bezier(.2, .8, .2, 1) !important;
    animation-fill-mode: both !important;
    backface-visibility: hidden;
    transform-origin: center bottom;
}

.impact-card,
.donate-form,
.donate-text,
.banner-inner,
.testimonial-carousel .testimonial-item {
    animation: modern-flip-in .85s cubic-bezier(.2, .8, .2, 1) both;
    backface-visibility: hidden;
    transform-origin: center bottom;
}

.impact-card,
.service-item,
.event-item,
.donation-item,
.team-item,
.banner-inner {
    transition: transform .22s ease, box-shadow .22s ease;
    will-change: transform;
}

.impact-card:nth-child(2),
.testimonial-carousel .testimonial-item:nth-child(2) { animation-delay: .1s; }
.impact-card:nth-child(3),
.testimonial-carousel .testimonial-item:nth-child(3) { animation-delay: .2s; }
.impact-card:nth-child(4),
.testimonial-carousel .testimonial-item:nth-child(4) { animation-delay: .3s; }

@keyframes modern-flip-in {
    from {
        opacity: 0;
        transform: perspective(900px) rotateX(-16deg) translateY(28px) scale(.97);
    }
    65% {
        opacity: 1;
        transform: perspective(900px) rotateX(3deg) translateY(-3px) scale(1.005);
    }
    to {
        opacity: 1;
        transform: perspective(900px) rotateX(0) translateY(0) scale(1);
    }
}


/*** Spinner ***/
body.loading-page {
    overflow: hidden;
}

.page-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}

body.loaded-page .page-content {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0s linear 0s;
}

#spinner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(7, 26, 21, 0.92), rgba(16, 76, 55, 0.86));
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease-out, visibility 0s linear .55s;
    z-index: 99999;
}

#spinner::before,
#spinner::after {
    position: absolute;
    content: "";
    width: min(420px, 78vw);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    animation: loader-orbit 5s linear infinite;
}

#spinner::after {
    width: min(300px, 58vw);
    border-color: rgba(243, 197, 87, .35);
    animation-direction: reverse;
    animation-duration: 3.4s;
}

#spinner.show {
    transition: opacity .55s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

#spinner.is-closing {
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease-out, visibility 0s linear .55s;
}

#spinner .loader-logo {
    position: relative;
    z-index: 1;
    width: 260px;
    max-width: 90%;
    height: auto;
    padding: 1.2rem 1.3rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(18, 90, 62, 0.18);
    box-shadow: 0 20px 55px rgba(12, 43, 33, 0.28), inset 0 1px 0 rgba(255,255,255,0.7);
    animation: loader-pulse 1.8s ease-in-out infinite;
}

@keyframes loader-pulse {
    0% {
        transform: scale(0.92) rotate(0deg);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, .12));
    }
    50% {
        transform: scale(1.05) rotate(2deg);
        filter: drop-shadow(0 25px 45px rgba(0, 0, 0, .16));
    }
    100% {
        transform: scale(0.95) rotate(-2deg);
        filter: drop-shadow(0 18px 38px rgba(0, 0, 0, .14));
    }
}

@keyframes loader-orbit {
    from { transform: rotate(0deg) scale(.85); opacity: .35; }
    50% { transform: rotate(180deg) scale(1); opacity: .8; }
    to { transform: rotate(360deg) scale(.85); opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
    #spinner::before, #spinner::after, #spinner .loader-logo,
    .wow.animated, .impact-card, .donate-form, .donate-text,
    .banner-inner, .testimonial-carousel .testimonial-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
}


/*** Button ***/
.btn {
    transition: .5s;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(21, 79, 61, 0.12);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(16, 52, 47, 0.18);
}

.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;
}


/*** Top Bar ***/
.top-bar {
    height: 90px;
    padding: 0 90px;
    background: linear-gradient(90deg, #0d2d27 0%, #143a33 30%, #1a4b3e 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar h6 {
    letter-spacing: 1px;
}


/*** Nav Bar ***/
.nav-bar {
    padding: 0 90px;
    transition: .5s;
}

.nav-bar .navbar {
    border-radius: 0 0 22px 22px;
    box-shadow: 0 18px 32px rgba(16, 52, 47, 0.18);
    overflow: hidden;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: var(--bs-dark);
    font-size: 18px;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-white);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 20px;
        border-top: 1px solid var(--bs-white);
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header Carousel ***/
.header-carousel {
    position: relative;
    background: linear-gradient(135deg, rgba(7, 37, 31, 0.82) 0%, rgba(14, 116, 76, 0.72) 45%, rgba(26, 134, 186, 0.56) 100%), url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
    overflow: hidden;
}

.header-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 210, 84, 0.35), transparent 22%),
                radial-gradient(circle at 80% 10%, rgba(91, 201, 255, 0.28), transparent 20%),
                radial-gradient(circle at 60% 70%, rgba(116, 245, 164, 0.22), transparent 25%);
    pointer-events: none;
}

.header-carousel .container {
    position: relative;
    z-index: 1;
}

.header-carousel .carousel-img {
    position: relative;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.header-carousel .carousel-img img {
    border-radius: 0;
    border: none;
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.18);
}

.header-carousel .carousel-text {
    position: relative;
    z-index: 1;
    padding: 1.5rem 0;
}

.header-carousel .carousel-text h1 {
    background: linear-gradient(90deg, #ffffff 0%, #dffaf0 24%, #ffe08a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 8px 22px rgba(8, 47, 39, 0.24);
}

.header-carousel .carousel-text p {
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 3;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 52px;
    height: 52px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #1ab36b, #0f7b59);
    border-radius: 50%;
    box-shadow: 0 12px 26px rgba(11, 50, 38, 0.24);
    transition: .3s ease;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    transform: translateX(2px) scale(1.04);
    background: linear-gradient(135deg, #e4b93a, #ec8d2f);
    color: #123e31;
}

.page-header {
    position: relative;
    background: linear-gradient(135deg, rgba(9, 35, 31, 0.78), rgba(31, 104, 74, 0.7)), url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 38%);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--bs-tertiary);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--bs-primary);
}

.page-header .breadcrumb-item.active {
    color: var(--bs-dark);
}


/*** Video ***/
.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--bs-dark);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--bs-dark);
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--bs-dark);
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--bs-white);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

#videoModal .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

#videoModal .modal-body {
    position: relative;
    padding: 0px;
}

#videoModal .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: var(--bs-white);
    background: #000000;
    opacity: 1;
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 0px;
    top: 5px;
    left: -40px;
    border-top: 2px solid var(--bs-primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 0px;
    bottom: 6px;
    left: -60px;
    border-bottom: 2px solid var(--bs-primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}


/*** About ***/
.about-img {
    position: relative;
}

.about-img::before,
.about-img::after {
    position: absolute;
    content: "";
    width: 33%;
    height: 90px;
    background: var(--bs-white);
}

.about-img::before {
    top: 0px;
    left: 0px;
}

.about-img::after {
    right: 0px;
    bottom: 0px;
}


/*** Service ***/
.service-title {
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.service-item {
    overflow: hidden;
    border-radius: 22px;
    padding: 28px 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f3faf5 100%);
    border: 1px solid rgba(27, 143, 90, 0.08);
    box-shadow: 0 12px 28px rgba(18, 52, 46, 0.06);
    transition: .4s ease;
}

.service-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(18, 52, 46, 0.14);
}

.service-item .btn-square {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(30, 168, 108, 0.12), rgba(17, 89, 69, 0.08));
}

.service-item a {
    position: relative;
    padding: 0;
    font-size: 14px;
    line-height: 14px;
    text-transform: uppercase;
    transition: .5s;
}

.service-item a::after {
    position: absolute;
    content: "";
    width: 500%;
    height: 0;
    left: 100%;
    bottom: 3px;
    margin-left: 10px;
    border-bottom: 2px solid var(--bs-primary);
}


/*** Donation ***/
.donation-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f1f8f4 100%);
    border: 1px solid rgba(15, 61, 46, 0.05);
}

.donation-item:hover {
    box-shadow: 0 18px 32px rgba(21, 76, 61, 0.12);
    transform: translateY(-4px);
}

/* Ensure navbar background from utility classes (e.g. bg-success) is removed */
.nav-bar .navbar,
.nav-bar .navbar.bg-success,
.nav-bar .navbar.bg-primary,
.nav-bar .navbar.bg-secondary {
    background: transparent !important;
    box-shadow: none !important;
}

/* Make navbar links neutral (no green color) and readable over backgrounds */
.nav-bar .navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,0.95) !important;
}
.nav-bar .navbar .navbar-nav .nav-link:hover,
.nav-bar .navbar .navbar-nav .nav-link.active {
    color: #ffffff !important;
}

/* Toggler and brand color adjustments */
.nav-bar .navbar-toggler {
    border-color: rgba(255,255,255,0.2) !important;
}
.nav-bar .navbar-brand,
.nav-bar .navbar-brand img {
    color: #ffffff !important;
}

.donation-item .donation-progress {
    width: 80px;
}

.donation-item .progress .progress-bar {
    height: 20px;
    overflow: visible;
    transition: 3s;
}


/*** Banner ***/
.banner .banner-inner {
    position: relative;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.banner .banner-inner::before,
.banner .banner-inner::after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
}

.banner .banner-inner::before {
    top: 0;
    left: 0;
    border-top: 150px solid var(--bs-primary);
    border-right: 150px solid transparent;
}

.banner .banner-inner::after {
    right: 0;
    bottom: 0;
    border-bottom: 150px solid var(--bs-secondary);
    border-left: 150px solid transparent;
}


/*** Event ***/
.event-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
}

.event-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}


/*** Donate ***/
.donate .donate-text {
    position: relative;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.donate .donate-text::before,
.donate .donate-text::after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
}

.donate .donate-text::before {
    top: 0;
    left: 0;
    border-top: 150px solid var(--bs-primary);
    border-right: 150px solid transparent;
}

.donate .donate-text::after {
    right: 0;
    bottom: 0;
    border-bottom: 150px solid var(--bs-secondary);
    border-left: 150px solid transparent;
}

.donate .donate-form .form-control {
    border: none;
    background: rgba(255, 255, 255, .5);
}

.donate .donate-form .btn-group {
    display: flex;
}

.donate .donate-form .btn-group .btn {
    margin: 0;
    padding: 0;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--bs-tertiary);
    background: rgba(255, 255, 255, .5);
}

.donate .donate-form .btn-group .btn-check:checked+.btn {
    border: none;
    background: var(--bs-white);
}



/*** Team ***/
.team-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf6 100%);
}

.team-item:hover {
    box-shadow: 0 18px 32px rgba(8, 53, 42, 0.12);
    transform: translateY(-4px);
}

.team-item .team-detail span {
    letter-spacing: 2px;
}



/*** Testimonial ***/
.testimonial-title {
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(9, 35, 31, 0.78), rgba(34, 111, 79, 0.68)), url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
    border-radius: 24px;
    color: #fff;
}

.testimonial-img {
    position: relative;
    padding: 45px 0 45px 90px;
}

.testimonial-img::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--bs-primary);
    z-index: -1;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.testimonial-carousel .owl-prev,
.testimonial-carousel .owl-next {
    width: 45px;
    height: 45px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--bs-white);
    background: var(--bs-secondary);
    transition: .5s;
}

.testimonial-carousel .owl-prev:hover,
.testimonial-carousel .owl-next:hover {
    color: var(--bs-secondary);
    background: var(--bs-white);
}

@media (max-width: 768px) {
    .testimonial-carousel .owl-nav {
        top: 6.3rem;
    }
}



/*** Footer ***/
.impact-card {
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f2faf4 100%);
    border: 1px solid rgba(18, 87, 67, 0.08);
    box-shadow: 0 14px 28px rgba(18, 52, 46, 0.08);
    transition: .4s ease;
}

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 38px rgba(18, 52, 46, 0.12);
}

.impact-card .icon-wrap {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(33, 180, 111, 0.18), rgba(7, 60, 48, 0.08));
    color: var(--bs-success);
}

.footer {
    color: var(--bs-tertiary);
    background: linear-gradient(rgba(5, 19, 17, .95), rgba(5, 19, 17, .95)), url(../img/bg-footer.jpg) center center no-repeat;
    background-size: cover;
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--bs-tertiary);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--bs-light);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    border-top: 1px solid rgba(255, 255, 255, .1);
}