/********** Template CSS **********/
:root {
    --bs-tertiary: #797E88;
}

.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;
}


/*** 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;
}


/*** Button ***/
.btn {
    transition: .5s;
}

.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;
}

.top-bar h6 {
    letter-spacing: 1px;
}


/*** Nav Bar ***/
.nav-bar {
    padding: 0 90px;
    transition: .5s;
}

.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: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.header-carousel .carousel-img {
    position: relative;
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 45px;
    height: 45px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--bs-dark);
    background: var(--bs-primary);
}

.page-header {
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.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 styles removed since modal is not used */

/* Hide work items and neutralize play controls when site owner requests no public work */
.work-hidden .video-work-carousel,
.work-hidden .btn-group,
.work-hidden .portfolio-card,
.work-hidden .portfolio-thumb {
    display: none !important;
}

/* Disable top-page play buttons and overlay links when work is hidden
   (keep them functional when the Work section is visible) */
.work-hidden .btn-play,
.work-hidden .play-overlay,
.work-hidden .btn-play-ghost {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 0.0 !important; /* visually hide */
}

/* Admin reveal note (non-intrusive) */
.work-admin-note { display: block; text-align:center; margin-bottom:1rem; }

/* Fallback: if Owl Carousel JS doesn't initialize, reveal the carousel container
    and display items in a simple responsive grid so thumbnails remain visible. */
.owl-fallback-visible { display: block !important; }
.owl-fallback { display: flex; flex-wrap: wrap; gap: 1rem; }
.owl-fallback .item { flex: 1 1 calc(33.333% - 1rem); box-sizing: border-box; display: block; }
@media (max-width: 991px){ .owl-fallback .item { flex: 1 1 calc(50% - 1rem); } }
@media (max-width: 575px){ .owl-fallback .item { flex: 1 1 100%; } }

/* Tasks page styles */
#tasks-grid .card { min-height: 150px; }
#tasks-grid .badge { font-size: 0.8rem; }
.btn-group [data-filter].active { box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15); }


/*** 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;
}

.service-item .btn-square {
    width: 65px;
    height: 65px;
}

.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);
}


/*** Work (formerly Donation) ***/
.work-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
}

.work-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

/* Portfolio card (homepage Work section) */
.portfolio-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(13, 38, 59, 0.06);
    transition: transform .28s ease, box-shadow .28s ease;
}
.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(13, 38, 59, 0.12);
}
.portfolio-thumb {
    position: relative;
    overflow: hidden;
}
.portfolio-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.portfolio-card:hover .portfolio-thumb img {
    transform: scale(1.05);
}
.play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    font-size: 20px;
    transition: background .2s ease, transform .15s ease;
}
.play-overlay:hover {
    background: rgba(0,0,0,0.7);
    transform: translate(-50%, -50%) scale(1.05);
}
.portfolio-body h5 { font-size: 1rem; }
.portfolio-body p { margin-bottom: .75rem; }


.work-item .work-progress {
    width: 80px;
}

.work-item .progress .progress-bar {
    height: 20px;
    overflow: visible;
    transition: 3s;
}

/* Portfolio / Work improvements */
.portfolio-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(8,15,25,0.06);
    transition: transform .35s ease, box-shadow .35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(8,15,25,0.09);
}
.portfolio-thumb {
    position: relative;
    overflow: hidden;
}
.portfolio-thumb img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .5s ease;
}
.portfolio-card:hover .portfolio-thumb img {
    transform: scale(1.05);
}
.play-overlay {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(5,12,24,0.18);
}
.portfolio-body {
    flex: 1 1 auto;
}
.portfolio-body h5 {
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}
.portfolio-body p {
    color: #6b7280;
    font-size: 0.95rem;
}

@media (max-width: 767.98px) {
    .portfolio-thumb img {
        height: 180px;
    }
}

/* Video Work Carousel Enhancements */
.video-work-carousel {
    padding: 20px 0;
}

.video-work-carousel .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
}

.video-work-carousel .owl-nav button {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bs-primary) !important;
    color: var(--bs-white) !important;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: all .3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .15);
}

.video-work-carousel .owl-nav button:hover {
    background: var(--bs-secondary) !important;
    transform: scale(1.1);
}

.video-work-carousel .owl-nav .owl-prev {
    left: -25px;
}

.video-work-carousel .owl-nav .owl-next {
    right: -25px;
}

.video-work-carousel .owl-dots {
    text-align: center;
    margin-top: 30px;
}

.video-work-carousel .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    display: inline-block;
    margin: 0 5px;
    transition: all .3s ease;
}

.video-work-carousel .owl-dot.active {
    background: var(--bs-primary);
    width: 30px;
    border-radius: 6px;
}

.video-work-carousel .portfolio-card {
    margin: 0 10px;
}

@media (max-width: 991.98px) {
    .video-work-carousel .owl-nav .owl-prev {
        left: -15px;
    }

    .video-work-carousel .owl-nav .owl-next {
        right: -15px;
    }
}

@media (max-width: 575.98px) {
    .video-work-carousel .owl-nav button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .video-work-carousel .owl-nav .owl-prev {
        left: -10px;
    }

    .video-work-carousel .owl-nav .owl-next {
        right: -10px;
    }
}


/*** 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);
}


/*** Project Inquiry (replaces old Donate styles) ***/
.project-inquiry .donate-text, /* keep legacy class reference for safety */
.project-inquiry .project-text {
    position: relative;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.project-inquiry .donate-text::before,
.project-inquiry .donate-text::after,
.project-inquiry .project-text::before,
.project-inquiry .project-text::after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
}

.project-inquiry .donate-text::before,
.project-inquiry .project-text::before {
    top: 0;
    left: 0;
    border-top: 150px solid var(--bs-primary);
    border-right: 150px solid transparent;
}

.project-inquiry .donate-text::after,
.project-inquiry .project-text::after {
    right: 0;
    bottom: 0;
    border-bottom: 150px solid var(--bs-secondary);
    border-left: 150px solid transparent;
}

.project-inquiry .donate-form .form-control,
.project-inquiry .project-form .form-control {
    border: none;
    background: rgba(255, 255, 255, .5);
}

.project-inquiry .donate-form .btn-group,
.project-inquiry .project-form .btn-group {
    display: flex;
}

.project-inquiry .donate-form .btn-group .btn,
.project-inquiry .project-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);
}

.project-inquiry .donate-form .btn-group .btn-check:checked+.btn,
.project-inquiry .project-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;
}

.team-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.team-item .team-detail span {
    letter-spacing: 2px;
}



/*** Testimonial ***/
.testimonial-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;
}

.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 ***/
.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);
}


/*** Blog ***/
.blog-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
    transition: all .3s ease;
    border: 1px solid rgba(0, 0, 0, .05);
}

.blog-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .15);
}

.blog-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.blog-item:hover .blog-img img {
    transform: scale(1.1);
}

.blog-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity .3s ease;
}

.blog-item:hover .blog-img::after {
    opacity: 1;
}

.blog-content {
    padding: 25px;
}

.blog-content h5 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #222;
    transition: color .3s ease;
}

.blog-item:hover .blog-content h5 {
    color: var(--bs-primary);
}

.blog-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-content .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: all .3s ease;
}


/*** Blog Detail ***/
.blog-detail-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    padding: 20px 0;
    margin-bottom: 30px;
    border-top: 2px solid var(--bs-primary);
    border-bottom: 2px solid #eee;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.blog-meta-item i {
    color: var(--bs-primary);
    font-size: 1.1rem;
}

.blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #222;
}

.blog-content p {
    margin-bottom: 20px;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.blog-content li {
    margin-bottom: 10px;
}

.blog-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: 20px 25px;
    margin: 25px 0;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
    border-radius: 5px;
}


/*** Share Buttons ***/
.share-buttons {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.share-buttons strong {
    color: #333;
    font-size: 1.05rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all .3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn.facebook:hover {
    background: #145dbf;
    color: #fff;
}

.share-btn.twitter {
    background: #1da1f2;
    color: #fff;
}

.share-btn.twitter:hover {
    background: #0c85d0;
    color: #fff;
}

.share-btn.linkedin {
    background: #0077b5;
    color: #fff;
}

.share-btn.linkedin:hover {
    background: #005885;
    color: #fff;
}


/*** Related Posts ***/
.related-post-item {
    border-radius: 10px;
    overflow: hidden;
    transition: all .3s ease;
    border: 1px solid rgba(0, 0, 0, .05);
}

.related-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15) !important;
}

.related-post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform .5s ease;
}

.related-post-item:hover .related-post-img {
    transform: scale(1.1);
}

.related-post-item h5 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    transition: color .3s ease;
}

.related-post-item:hover h5 {
    color: var(--bs-primary);
}

.related-post-item .btn {
    padding: 6px 16px;
    font-size: 0.85rem;
}


@media (max-width: 767.98px) {
    .blog-img {
        height: 200px;
    }

    .blog-detail-img {
        max-height: 300px;
    }

    .blog-meta {
        gap: 15px;
    }

    .share-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-post-img {
        height: 180px;
    }
}