/* =======================================
   GLOBAL & BODY RESET
   ======================================= */
* {
    box-sizing: border-box; /* Essential for responsive sizing */
}

body {
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden; /* Prevents horizontal scrollbar caused by animations */
    margin: 0;
    padding: 0;
background-color: #fff9f3;
}

/* =======================================
   NAVBAR & LOGO
   ======================================= */
.navbar {
    transition: all 0.3s ease;
    padding-top: 1rem !important; /* py-3 equivalent */
    padding-bottom: 1rem !important;
}

.logo-image {
    height: 100px; /* Standardized height from index redesign */
    width: auto;
}

.nav-link {
    font-weight: 600;
    color: #555 !important;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #c86b42 !important;
}

.rounded-pill {
    border-radius: var(--bs-border-radius-pill) !important;
	color: #fff !important;
	background-color: #c86b42;
	border-color: #c86b42;
	--bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #e08862;
    --bs-btn-hover-border-color: #e08862;
}

/* Underline effect on hover for desktop */
@media (min-width: 992px) {
    .nav-link::after {
        content: '';
        display: block;
        width: 0;
        height: 2px;
        background: #c86b42;
        transition: width 0.3s;
        margin-top: 2px;
    }
    .nav-link:hover::after {
        width: 100%;
    }
}

/* Mobile Menu tweaks */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        margin-top: 10px;
    }
    .nav-item {
        margin-bottom: 10px;
    }
    .btn-warning {
        width: 100%;
    }
}

/* User Profile Outline Button */
.btn-custom-outline {
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 5px 15px;
    color: #333;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-custom-outline:hover {
    background-color: #f8f9fa;
    border-color: #c86b42;
    color: #c86b42;
}

.account-btn:hover {
    background-color: #e68a00;
}

/* =======================================
   WHY FOOD WASTE MATTERS SECTION
   ======================================= */

.food-waste-matters {
    background-color: #fff9f3; /* Matches your theme background */
    padding: 80px 0;
    font-family: 'Segoe UI', sans-serif;
    color: #4a4a4a;
}

/* 1. LIMIT WIDTH (The "Auto Size" Fix) 
   This keeps text readable on big screens but full width on mobile */
.content-limit {
    width: 100%;
    max-width: 900px;
    margin: 0 auto; /* Centers the block */
}

/* 2. TYPOGRAPHY */
.section-heading {
    color: #3e2b25; /* Brand Dark Orange/Brown */
    font-size: clamp(2rem, 5vw, 2.5rem); /* Auto-resizes text */
}

.subheading {
    color: #3e2b25b0 !important; /* Brand Orange */
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.brand-green {
    color: #c86b42; /* Keeping standard Bootstrap green or use #2E8B57 */
    margin-bottom: 15px;
}

p {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.lead {
    font-size: 1.2rem;
    font-weight: 400;
}

/* 3. IMAGES */
.custom-img {
    width: 100%;
    height: 250px; /* Forces all images to be the same height */
    object-fit: cover; /* Crops the image nicely if aspect ratio differs */
    transition: transform 0.3s ease;
}

.custom-img:hover {
    transform: translateY(-5px); /* Subtle lift effect */
}

/* 4. MOBILE SPECIFIC ADJUSTMENTS */
@media (max-width: 768px) {
    .food-waste-matters {
        padding: 40px 0;
    }

    .custom-img {
        height: auto; /* Let images be natural height on mobile */
        max-height: 300px;
    }
    
    .text-justify-mobile {
        text-align: left; /* Easier to read on phone than center */
    }
}

/* =======================================
   FOOTER (RESPONSIVE)
   ======================================= */
.footer-custom {
    background-color: #2c2c2c;
    color: #fff;
    font-size: 0.95rem;
    padding-top: 3rem;
    padding-bottom: 1rem;
}

.footer-logo {
    height: 90px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: #c86b42;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-link:hover {
    background: #c86b42;
    color: white;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
}
/* Mobile Footer Tweaks */
@media (max-width: 767px) {
    .footer-custom {
        text-align: center;
    }
    .social-icons {
        justify-content: center;
    }
    .footer-custom .col-lg-4, 
    .footer-custom .col-lg-2 {
        margin-bottom: 30px;
    }
}

/* =======================================
   MEDIA QUERIES (THE IMPORTANT PART)
   ======================================= */

/* Tablet and Mobile */
@media (max-width: 991px) {
    .hero {
        padding-top: 120px; /* Account for navbar */
        text-align: center; /* Center text on mobile */
        display: block; /* Stack content vertically */
    }
    
    .hero .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons {
        justify-content: center; /* Center buttons on mobile */
        width: 100%;
        margin-top: 20px;
    }

    .hero-logo {
        /* Reset positioning for mobile so it flows naturally */
        position: relative;
        left: auto; 
        right: auto;
        margin-top: 30px;
        max-width: 300px; 
    }
}

/* Mobile Specific */
@media (max-width: 768px) {
    /* Navbar Adjustments */
    .logo-image {
        width: 100px; /* Smaller logo on mobile */
        margin-left: 0;
    }
    
    /* Donor Card Stacking */
    .top-donor-of-the-month .card-content-left {
        flex-direction: column;
        text-align: center;
    }

    /* Footer Center Align */
    .new-footer {
        text-align: center;
    }

    .new-footer .col-md-4 {
        margin-bottom: 30px; /* Add space between stacked footer columns */
    }

    .new-footer .footer-left, 
    .new-footer .footer-right {
        align-items: center !important;
        text-align: center !important;
    }

    .new-footer .social-icons-new {
        justify-content: center;
    }
    
    .new-footer .footer-logo-new {
        margin-right: 0;
    }
}

/* Animation Keyframes */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}