/*
 * =====================================================================
 * MUZAANA STREET CHILDREN - Website Stylesheet
 * Copyright (c) 2025 Levish~Coders. All Rights Reserved.
 * Designed & Developed by: Levish~Coders
 * Contact: info@levishcoders.com
 * =====================================================================
 */

/********** Custom Color Scheme for MUZAANA STREET CHILDREN **********/
:root {
    --primary: #E74C3C;        /* Warm Red - Hope & Energy */
    --secondary: #FFF3E0;       /* Warm Cream - Comfort */
    --accent: #3498DB;          /* Sky Blue - Trust & Growth */
    --success: #27AE60;         /* Green - Life & Growth */
    --warning: #F39C12;         /* Orange - Attention */
    --light: #F8F9FA;           /* Light Background */
    --dark: #2C3E50;            /* Dark Navy - Professional */
    --primary-rgb: 231, 76, 60; /* RGB for transparency */
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}


/*** 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;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure fixed navbar doesn't cover content on scroll */
@media (max-width: 991.98px) {
    /* Add padding to body on mobile to prevent navbar overlap */
    body {
        padding-top: 70px !important;
    }
    
    /* Adjust spinner position for mobile */
    #spinner {
        top: calc(50% + 35px);
    }
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.btn.btn-primary:hover {
    color: var(--primary);
    background: transparent;
}

.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;
}


/*** Navbar ***/
/* Fixed navbar - ensure it stays visible on all screen sizes */
.fixed-top {
    transition: .5s;
    position: fixed !important;
    top: 0 !important;
    right: 0;
    left: 0;
    z-index: 1030;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

/* Mobile navbar fix - ensure full visibility and proper spacing */
@media (max-width: 991.98px) {
    .top-bar {
        display: none !important; /* Hide top bar on mobile for cleaner look */
    }
    
    /* Navbar container styling for mobile */
    .container-fluid.fixed-top {
        background: var(--dark) !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }
    
    .navbar {
        padding: 8px 0 !important;
        min-height: 70px;
    }
    
    .navbar-brand {
        margin-left: 15px !important;
        margin-right: auto;
        padding: 8px 0;
    }
    
    .navbar-brand img {
        height: 50px !important; /* Slightly smaller logo on mobile */
        margin-right: 10px !important;
    }
    
    .navbar-brand h1 {
        font-size: 1rem !important; /* Smaller text on mobile */
        margin: 0 !important;
    }
    
    .navbar-toggler {
        margin-right: 15px !important;
        padding: 8px 12px;
        border: 2px solid rgba(255, 255, 255, 0.7) !important;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    }
    
    .navbar-toggler-icon {
        width: 24px;
        height: 24px;
    }
    
    .navbar-collapse {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        margin-top: 10px;
    }
    
    /* Hide donate button on mobile navbar to save space */
    .navbar .d-none.d-lg-flex {
        display: none !important;
    }
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        padding: 15px;
        border-top: 1px solid rgba(255, 255, 255, .2);
        background: var(--dark);
        border-radius: 8px;
    }

    .navbar .navbar-nav .nav-link {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }
    
    .navbar .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar .dropdown-menu {
        background: rgba(0, 0, 0, 0.5);
        border: none;
    }
    
    .navbar .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        padding: 10px 20px;
    }
    
    .navbar .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--primary);
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 29, 35, .8);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--dark);
    border: 12px solid var(--dark);
    border-radius: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Ensure content doesn't hide behind fixed navbar */
body {
    padding-top: 0;
}

/* Add padding for pages with page-header to account for navbar */
.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(rgba(0, 29, 35, .8), rgba(0, 29, 35, .8)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

/* Mobile adjustments for page header */
@media (max-width: 991.98px) {
    .page-header {
        padding-top: 10rem; /* Less padding on mobile since no top-bar */
    }
    
    /* Ensure carousel doesn't hide behind navbar */
    #header-carousel {
        margin-top: 70px; /* Height of mobile navbar */
    }
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}


/*** Causes ***/
.causes-item .progress {
    height: 5px;
    border-radius: 0;
    overflow: visible;
}

.causes-item .progress .progress-bar {
    position: relative;
    overflow: visible;
    width: 0px;
    border-radius: 0;
    transition: 5s;
}

.causes-item .progress .progress-bar span {
    position: absolute;
    top: -7px;
    right: 0;
    width: 40px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--primary);
    color: #FFFFFF;
}

.causes-item .causes-overlay {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.causes-item:hover .causes-overlay {
    height: 100%;
    opacity: 1;
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .06);
}


/*** Donate ***/
.donate {
    background: rgba(0, 29, 35, .8);
}

.btn-group .btn-light:hover,
.btn-group input[type="radio"]:checked+label {
    color: var(--primary);
    border-color: var(--primary);
}


/*** Team ***/
.team-item img {
    position: relative;
    top: 0;
    transition: .5s;
}

.team-item:hover img {
    top: -30px;
}

.team-item .team-text {
    position: relative;
    height: 100px;
    transition: .5s;
}

.team-item:hover .team-text {
    margin-top: -60px;
    height: 160px;
}

.team-item .team-text .team-social {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text .team-social {
    opacity: 1;
}

.team-item .team-social .btn {
    display: inline-flex;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-item .testimonial-text {
    background: var(--light);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary);
    transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: var(--light) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
    background: var(--primary) !important;
} 

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}


/*** Footer ***/

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,0.5);
    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;
    color: rgba(255,255,255,0.5);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--light);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-square {
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}

.footer .btn.btn-square:hover {
    color: var(--secondary);
    border-color: var(--light);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--secondary);
}

.footer .copyright a:hover {
    color: var(--primary);
}


/*** Additional Responsive Styles for Mobile ***/
/* Ensure donate button shows properly on mobile */
@media (max-width: 991.98px) {
    /* Mobile menu donate link */
    .navbar-nav .nav-link {
        padding: 10px 0;
        font-size: 16px;
    }
    
    /* Ensure no content overflow */
    body {
        overflow-x: hidden;
    }
    
    .container-fluid {
        padding-right: 15px;
        padding-left: 15px;
    }
}

/* Tablet adjustments */
@media (max-width: 767.98px) {
    /* Reduce logo size on mobile */
    .navbar-brand img {
        height: 45px !important;
    }
    
    /* Adjust heading sizes */
    h1.display-4 {
        font-size: 2rem !important;
    }
    
    h1.display-6 {
        font-size: 1.5rem !important;
    }
    
    /* Gallery adjustments */
    .gallery-item {
        margin-bottom: 20px;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .filter-btn {
        font-size: 14px;
        padding: 8px 20px;
    }
}

/* Small phones */
@media (max-width: 575.98px) {
    /* Further reduce headings */
    h1.display-4 {
        font-size: 1.75rem !important;
    }
    
    .page-header h1 {
        font-size: 1.75rem !important;
    }
    
    /* Adjust buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Gallery mobile view */
    .gallery-item img {
        height: 220px;
    }
    
    .filter-btn {
        font-size: 13px;
        padding: 7px 15px;
        margin: 3px;
    }
}

/* Ensure donate button is always visible on desktop */
@media (min-width: 992px) {
    .btn-primary {
        white-space: nowrap;
    }
    
    /* Ensure button doesn't hide */
    .navbar .d-none.d-lg-flex {
        flex-shrink: 0;
    }
}

/* Prevent horizontal scroll on all devices */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix any container that might cause overflow */
.container-fluid,
.container {
    max-width: 100%;
    overflow: hidden;
}

/* Gallery responsive improvements */
.gallery-overlay {
    padding: 15px;
}

@media (max-width: 767.98px) {
    .gallery-title {
        font-size: 1.25rem;
    }
    
    .gallery-description {
        font-size: 0.85rem;
    }
}

/* Donation form responsive */
@media (max-width: 991.98px) {
    .donation-amount-btn {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 575.98px) {
    .donation-amount-btn {
        flex: 1 1 100%;
    }
}

/* Ensure navbar brand text wraps nicely on small screens */
@media (max-width: 1199.98px) {
    .navbar-brand h1 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-brand h1 {
        font-size: 1.1rem !important;
    }
}

/* Mobile navbar improvements */
.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.3);
    padding: 8px 12px;
}

.navbar-toggler:focus {
    box-shadow: none;
    border-color: var(--primary);
}

/* Smooth transitions for all interactive elements */
.nav-link,
.btn,
.dropdown-item,
.gallery-item {
    transition: all 0.3s ease;
}

/* Dropdown menu improvements */
.navbar .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 25px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: var(--primary);
    color: #fff;
}

.navbar .dropdown-item.active {
    background-color: var(--primary);
    color: #fff;
}

/* Desktop dropdown */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .navbar .dropdown-menu {
        margin-top: 0;
    }
}

/* Improve dropdown menu on mobile */
@media (max-width: 991.98px) {
    .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.95) !important;
        border: none !important;
        margin-top: 5px !important;
        position: relative !important;
        float: none !important;
        width: 100%;
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 12px 30px !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item.active {
        background-color: var(--primary) !important;
        color: #fff !important;
    }
}