/********** SACOCSO Template CSS **********/
:root {
    --bs-primary: #1B4E8B; /* SACOCSO Institutional Blue */
    --bs-secondary: #2C3E50; /* Charcoal */
    --bs-tertiary: #797E88;
    --bs-dark: #1a1a1a;
    --bs-light: #f8f9fa;
    --bs-white: #ffffff;
}

.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;
}

.logo {
    width: 50%;
}

.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-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.top-bar h6 {
    letter-spacing: 1px;
    color: var(--bs-primary);
}

.top-bar .text-dark {
    color: #333333 !important;
}

.top-bar .logo {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.top-bar .logo:hover {
    transform: scale(1.05);
}


/*** Nav Bar ***/
.nav-bar {
    padding: 0 90px;
    transition: .5s;
    background: var(--bs-primary);
}

.navbar {
    background: var(--bs-primary) !important;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar .btn-square.btn-light {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.navbar .btn-square.btn-light:hover {
    background: #ffffff;
}

.navbar .btn-square.btn-light:hover i {
    color: var(--bs-primary) !important;
}

.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 .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;
}

.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);
}


/*** Donation ***/
.donation-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
    transition: .5s;
}

.donation-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.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;
}

.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);
}

/* additionl */

.gallery-thumb {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

#modalCarousel .carousel-inner img {
    max-height: 80vh;
    object-fit: cover;
}

#modalCarousel .carousel-control-prev-icon,
#modalCarousel .carousel-control-next-icon {
    background-color: var(--bs-primary);
    border-radius: 50%;
    padding: 10px;
}

/* SACOCSO Custom Styles */

.hero-section {
    background: linear-gradient(rgba(27, 78, 139, 0.9), rgba(27, 78, 139, 0.9)), url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    color: var(--bs-white);
    font-weight: 700;
    line-height: 1.2;
}

.hero-section p {
    color: var(--bs-white);
}

.strategic-logic h3 {
    font-weight: 600;
    color: var(--bs-primary);
}

.service-item {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 5px;
    height: 100%;
}

.service-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(27, 78, 139, 0.2);
}

.team-item {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(27, 78, 139, 0.15);
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    transition: all 0.4s ease;
}

.btn-primary:hover {
    background-color: #153c6d;
    border-color: #153c6d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 78, 139, 0.3);
}

.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-secondary {
    background-color: var(--bs-secondary) !important;
}

/* Institutional and Professional Look */
.section-title {
    font-weight: 600;
    color: var(--bs-primary);
}

/* Ultra Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed navbar */
}

/* Custom spacing */
.gap-3 {
    gap: 1rem;
}

/* Fixed Navbar Styles */
.navbar-container,
.container-fluid.bg-primary {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--bs-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container-fluid.bg-primary.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    background: rgba(27, 78, 139, 0.98);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Advanced Scroll Effects and Animations */

/* Parallax scroll effect for hero section */
.hero-section {
    background-attachment: fixed;
    background-position: center;
    transition: all 0.3s ease;
}

/* Ultra-smooth WOW.js animations */
.wow {
    visibility: hidden;
    animation-duration: 1.8s !important; /* Much longer for smoothness */
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; /* Smooth easing */
    animation-fill-mode: both !important;
}

/* Custom smooth easing for different animation types */
.wow.fadeInDown,
.wow.fadeInUp,
.wow.fadeInLeft,
.wow.fadeInRight {
    animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1) !important; /* Ultra smooth */
}

.wow.fadeIn {
    animation-timing-function: ease-out !important;
}

.wow.zoomIn {
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* Smooth bounce */
}

/* Smooth fade-in for sections on scroll */
/*section {*/
/*    opacity: 0;*/
/*    transform: translateY(30px);*/
/*    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), */
/*                transform 1s cubic-bezier(0.4, 0, 0.2, 1);*/
/*}*/

/*section.visible {*/
/*    opacity: 1;*/
/*    transform: translateY(0);*/
/*}*/

/* Enhanced hover effects */
.service-item {
    position: relative;
   
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(27, 78, 139, 0.1), transparent);
    transition: left 0.8s ease;
}

.service-item:hover::before {
    left: 100%;
}

/* Icon pulse animation - slower and smoother */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.btn-square i {
    animation: pulse 3s ease-in-out infinite; /* Slower pulse */
}

.service-item:hover .btn-square i {
    animation: pulse 1s ease-in-out infinite;
}

/* Ultra-smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Progress indicator on scroll */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    z-index: 99999;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(27, 78, 139, 0.5);
}

/* Card lift effect on hover - ultra smooth */
.team-item,
.service-item {
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

.team-item:hover,
.service-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(27, 78, 139, 0.2);
}

/* Text reveal animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Strategic logic animations - smooth */
.strategic-logic h3 {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.strategic-logic h3:hover {
    transform: scale(1.05);
    color: var(--bs-secondary);
}

/* Button effects - ultra smooth */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

/* Navbar scroll effect - ultra smooth */
.nav-bar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-bar.scrolled {
    background: rgba(27, 78, 139, 0.98);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
}

/* Loading animation for elements */
.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image hover zoom effect - smooth */
img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

img:hover {
    transform: scale(1.05);
}

/* Gradient text effect for important headers */
.gradient-text {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stagger animation for list items - slower */
.stagger-animation > * {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.15s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.45s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.6s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.75s; }

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .team-item:hover,
    .service-item:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .wow {
        animation-duration: 1.2s !important; /* Faster on mobile */
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Ensure proper text contrast on dark backgrounds */
.bg-primary,
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-primary h5,
.bg-primary h6,
.bg-primary p,
.bg-primary span,
.bg-primary a:not(.btn) {
    color: #ffffff !important;
}

.bg-secondary,
.bg-secondary h1,
.bg-secondary h2,
.bg-secondary h3,
.bg-secondary h4,
.bg-secondary h5,
.bg-secondary h6,
.bg-secondary p,
.bg-secondary span,
.bg-secondary a:not(.btn) {
    color: #ffffff !important;
}

.bg-dark,
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6,
.bg-dark p,
.bg-dark span,
.bg-dark a:not(.btn) {
    color: #ffffff !important;
}

/* Ensure icons on primary background are white */
.bg-primary i,
.bg-primary .fa,
.bg-primary .fab,
.bg-primary .fas,
.bg-primary .far {
    color: #ffffff !important;
}

.bg-secondary i,
.bg-secondary .fa,
.bg-secondary .fab,
.bg-secondary .fas,
.bg-secondary .far {
    color: #ffffff !important;
}

.bg-dark i,
.bg-dark .fa,
.bg-dark .fab,
.bg-dark .fas,
.bg-dark .far {
    color: #ffffff !important;
}

/* Ensure buttons inside dark backgrounds have proper contrast */
.bg-primary .btn-square,
.bg-secondary .btn-square,
.bg-dark .btn-square {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bg-primary .btn-square:hover,
.bg-secondary .btn-square:hover,
.bg-dark .btn-square:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Light backgrounds should have dark text */
.bg-light,
.bg-light h1,
.bg-light h2,
.bg-light h3,
.bg-light h4,
.bg-light h5,
.bg-light h6 {
    color: var(--bs-dark) !important;
}

.bg-light p,
.bg-light span,
.bg-light a:not(.btn) {
    color: #333333 !important;
}

.bg-white,
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6 {
    color: var(--bs-dark) !important;
}

.bg-white p,
.bg-white span {
    color: #333333 !important;
}
