/* Custom Styles for Eastern Kids Foundation */

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    transition: all 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.btn-primary { 
    background-color: var(--primary-color) !important; 
    border-color: var(--primary-color) !important;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #d1450c !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232, 78, 14, 0.3);
}

/* Edge to edge sections for large screens */
.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 100%;
        padding-left: 5%;
        padding-right: 5%;
    }
}

/* Full width sections with background images */
.section-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    padding: 100px 0;
}

.section-overlay {
    background: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.relative-z {
    position: relative;
    z-index: 5;
}

/* Floating FAB Containers */
.fab-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.fab-container-right {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Accessibility Menu */
.accessibility-menu {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 250px;
    z-index: 1001;
}

/* High Contrast Mode */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}
body.high-contrast .bg-white, 
body.high-contrast .navbar,
body.high-contrast footer {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}
body.high-contrast a,
body.high-contrast .text-primary,
body.high-contrast .nav-link {
    color: #ffff00 !important;
}

/* Cascading Rounded Images (Home Page) */
.cascading-images {
    position: relative;
    height: 500px;
}

.cascading-images img {
    border-radius: 50px;
    position: absolute;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.5s ease;
}

.img-main { width: 60%; top: 0; left: 0; z-index: 3; }
.img-sub-1 { width: 50%; bottom: 0; right: 0; z-index: 2; }
.img-sub-2 { width: 40%; top: 100px; right: 150px; z-index: 1; }

.cascading-images img:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Gallery Hover Effects */
.gallery-item {
    overflow: hidden;
    border-radius: 15px;
    position: relative;
}

.gallery-item img {
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(232, 78, 14, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Navbar Enhancements */
.main-nav {
    transition: all 0.3s ease;
}

.nav-link-custom {
    color: #333 !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2.5px;
    background-color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(-50%);
}

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

.nav-link-custom:hover::after, .nav-link-custom.active::after {
    width: 60%;
}

.donate-btn-menu {
    border-width: 2px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.donate-btn-menu:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

.contact-btn-menu {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-btn-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232, 78, 14, 0.4) !important;
}

.shadow-text {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.transition-hover {
    transition: transform 0.5s ease;
}

.transition-hover:hover {
    transform: scale(1.05);
}

.top-bar a {
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: var(--primary-color) !important;
}

/* Google Map Container */
#map-container {
    width: 100%;
    height: 450px;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1.5rem;
        border-radius: 15px;
        margin-top: 1rem;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        border: 1px solid #eee;
    }
    .navbar-nav {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-link-custom::after {
        display: none;
    }
    .nav-item {
        width: 50%; /* 2 Columns on Mobile */
        text-align: center;
        margin-bottom: 1rem;
    }
    .nav-item.ms-lg-4, .nav-item.ms-lg-2 {
        width: 50% !important; /* Keep buttons in 2 columns too */
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding: 0 5px;
    }
    .donate-btn-menu, .contact-btn-menu {
        width: 100%;
        padding: 10px 5px !important;
        font-size: 0.8rem !important;
    }
}

/* Mobile Specific Fixes */
@media (max-width: 768px) {
    section {
        padding: 40px 0 !important;
    }
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .gap-5 { gap: 1rem !important; }
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    
    .cascading-images {
        height: 280px !important;
        margin-bottom: 40px;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        position: relative;
    }
    .img-main { width: 75% !important; top: 0 !important; left: 0 !important; }
    .img-sub-1 { width: 65% !important; bottom: 0 !important; right: 0 !important; }
    .img-sub-2 { 
        width: 55% !important;
        right: 15% !important;
        top: 15% !important;
    }
    .img-sub-3 {
        width: 40% !important;
        top: -10px !important;
        right: -10px !important;
    }
    
    .fab-container {
        left: 10px !important;
        bottom: 15px !important;
    }
    .fab-container-right {
        right: 10px !important;
        bottom: 75px !important;
    }
    #back-to-top {
        right: 10px !important;
        bottom: 15px !important;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .accessibility-menu {
        width: 220px;
        left: 5px;
        bottom: 50px;
    }
    
    .display-2 { font-size: 2.5rem !important; }
    .display-3 { font-size: 2.2rem !important; }
    .display-4 { font-size: 2rem !important; }
    .display-5 { font-size: 1.8rem !important; }
    
    footer .text-break {
        word-break: break-all !important;
    }
}
