/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #92400e;
    /* Earthy Brown */
    --secondary-color: #3e8057f5;
    /* Deep Green */
    --text-color: #333;
    --light-bg: #fffbeb;
    /* Cream */
    --dark-bg: #1a1a1a;
}

body,
html {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    /* Apply Cream background globally */
    overflow-x: hidden;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Navbar */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: #2C3E50 !important;
    /* Dark text for logo */
    display: flex;
    align-items: center;
}

.navbar-brand i {
    color: #6C63FF;
    /* Purple heart outline from mockup */
    margin-right: 10px;
    font-size: 1.4rem;
}

.nav-link {
    font-weight: 600;
    color: #555 !important;
    margin: 0 10px;
    padding-bottom: 5px !important;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #333 !important;
}

/* Orange underline for active/hover */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.btn-nav-donate {
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 50px;
    padding: 8px 30px;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(255, 165, 0, 0.3);
    transition: transform 0.2s;
}

.btn-nav-donate:hover {
    transform: translateY(-2px);
    background-color: #e69500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 40px;
}

.btn-hero {
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 700;
    margin: 0 10px;
    transition: all 0.3s;
}

.btn-hero-primary {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-hero-primary:hover {
    background-color: #e69500;
    border-color: #e69500;
    color: white;
}

.btn-hero-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn-hero-outline:hover {
    background-color: white;
    color: var(--secondary-color);
}

/* Image Cards Section */
.image-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.image-card:hover img {
    transform: scale(1.1);
}

.image-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.image-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.image-card-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-card-link:hover {
    color: white;
}

/* Footer & Other overrides */
.footer {
    background-color: var(--secondary-color);
    color: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 165, 0, 0.25);
}

/* Global Pop Animation */
.hover-pop {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy pop effect */
}

.hover-pop:hover {
    transform: scale(1.05);
    /* Scales up the element */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    z-index: 10;
}

/* Apply to existing cards automatically if desired, or just use the class */
/* Apply to specific interactive cards */
.image-card,
.gallery-item {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Default Gallery Item Height */
.gallery-item:hover {
    height: 250px;
    /* Note: This height might be specific to gallery items, checking context */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1.03);
    /* Slight pop for interactive cards */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.social-icon-btn {
    width: 40px;
    height: 40px;
    border-color: #e2e8f0;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.social-icon-btn:hover {
    background-color: #78350f !important;
    /* Requested Hover Color */
    border-color: #78350f !important;
    color: white !important;
    transform: translateY(-3px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {

    /* Navbar */
    .navbar-brand {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }

    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 15px;
        /* More rounded */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
        margin-top: 15px;
        border: none;
        /* Remove top border for cleaner look */
        text-align: center;
        /* Center all items */
    }

    .navbar-nav {
        margin-bottom: 20px !important;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 1.1rem;
        /* Slightly larger readable text */
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .btn-nav-donate {
        display: block;
        width: 100%;
        /* Full width button on mobile */
        margin-top: 10px;
    }

    /* Hero Slider */
    .hero-title {
        font-size: 2rem !important;
        /* Smaller title on mobile */
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    .carousel-caption {
        width: 90% !important;
        padding-bottom: 30px;
    }

    .carousel-item,
    .mobile-banner-container {
        height: auto !important;
        aspect-ratio: 600 / 338;
        min-height: unset !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .carousel-item img {
        height: 100% !important;
        width: 100% !important;
        object-fit: contain !important;
    }

    .mobile-banner-container {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .btn-hero {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-bottom: 10px;
        display: inline-block;
    }

    /* Cards & Grids */
    .image-card {
        height: 180px;
        /* Smaller height for mobile */
        margin-bottom: 10px;
    }

    .image-card-title {
        font-size: 1.1rem;
        /* Smaller title */
    }

    .image-card-link {
        font-size: 0.8rem;
    }

    .service-card-home {
        margin-bottom: 15px;
        padding: 15px !important;
        /* Reduce padding significantly */
        text-align: center !important;
        /* Force center alignment */
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center items horizontally */
        justify-content: flex-start;
    }

    .service-card-home h4 {
        font-size: 1rem !important;
        margin-top: 10px;
        margin-bottom: 5px;
        line-height: 1.3;
    }

    .service-card-home .icon-circle {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 5px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .service-card-home .icon-circle i {
        font-size: 1.2rem !important;
    }

    /* Stats Section */
    .display-4 {
        font-size: 2rem !important;
        /* Smaller stats numbers */
    }

    /* General Typography */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    p,
    .lead {
        font-size: 0.95rem !important;
    }

    /* Sections Padding */
    section {
        padding: 30px 0 !important;
    }

    /* Footer */
    /* Footer Compression & Centering */
    .footer {
        padding-top: 30px !important;
        padding-bottom: 25px !important;
        /* Reduced to remove extra shaded area */
    }

    .footer .row>div {
        margin-bottom: 15px;
        text-align: center !important;
    }

    /* Center Contact Info Flex Items */
    .footer ul li.d-flex {
        justify-content: center !important;
    }

    /* Center Social Icons Flex Container */
    .footer .d-flex {
        justify-content: center !important;
    }

    .footer img {
        margin-left: auto;
        margin-right: auto;
    }

    /* Gap adjustments for small 2x2 grids */
    .row.g-4 {
        --bs-gutter-y: 1rem;
        --bs-gutter-x: 1rem;
    }

    .gallery-item {
        height: 150px;
        /* Smaller height for mobile gallery */
    }

    /* Ensure content doesn't get hidden behind bottom nav */
    body {
        padding-bottom: 80px;
    }
}

/* Bottom Navigation for Tablets and Mobile (up to LG breakpoint) */
@media (max-width: 991.98px) {
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1030;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #777;
        font-size: 0.75rem;
        flex: 1;
    }

    .bottom-nav .nav-item i {
        font-size: 1.5rem;
        margin-bottom: 2px;
        transition: transform 0.2s;
    }

    .bottom-nav .nav-item.active {
        color: var(--primary-color);
        font-weight: 600;
    }

    .bottom-nav .nav-item.active i {
        transform: translateY(-5px);
    }
}