/* =========================================
   1. Global Variables & Base Styles
   ========================================= */
:root {
    --primary-green: #28a745;
    --dark-text: #333;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    overflow-x: hidden; /* Prevent horizontal scrollbar from animations */
}

a {
    text-decoration: none;
}

/* =========================================
   2. Navbar & Buttons
   ========================================= */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    margin-right: 10px;
    transition: color 0.3s;
}

/* Custom Donate Button in Navbar */
.donate-btn {
    border-radius: 50px !important;
    font-weight: 600;
    padding: 8px 25px !important;
    transition: all 0.3s ease;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* =========================================
   3. "Corporate" Left-Aligned Hero Styles
   ========================================= */

/* 1. Container Height */
.hero-item {
    height: 600px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-item { height: 500px; }
}

/* 2. Background Image */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Subtle Ken Burns Zoom */
    transform: scale(1);
    transition: transform 8s ease; 
    z-index: 1;
}

.carousel-item.active .hero-bg {
    transform: scale(1.1);
}

/* 3. The "Curtain" Gradient (Left to Right) */
.hero-overlay-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* This gradient makes the text on the left readable */
    background: linear-gradient(
        90deg, 
        rgba(0,0,0,0.85) 0%, 
        rgba(0,0,0,0.6) 40%, 
        rgba(0,0,0,0.1) 100%
    );
    z-index: 2;
}

/* 4. Content Styling */
.carousel-caption {
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: 0; /* Align using flexbox h-100 instead */
}

.ls-2 { letter-spacing: 2px; }

/* 5. Custom Buttons (Square & Sharp) */
.rounded-0 { border-radius: 0 !important; }

/* Icon Slide Effect on Hover */
.hover-slide-icon .transition-icon {
    transition: transform 0.3s ease;
}
.hover-slide-icon:hover .transition-icon {
    transform: translateX(5px);
}

/* 6. Custom Navigation Arrows (Bottom Right) */
.carousel-controls-custom {
    position: absolute;
    bottom: 30px;
    right: 50px;
    z-index: 4;
    gap: 10px;
}

.control-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

/* 7. Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.animated-fade-up {
    animation: fadeUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    opacity: 0;
}
.animated-slide-right {
    animation: slideRight 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.2s; }
.delay-200 { animation-delay: 0.4s; }

.carousel-item.active .animated-fade-up,
.carousel-item.active .animated-slide-right {
    animation-play-state: running;
}

/* =========================================
   4. Slider Animations
   ========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
}

.animated-fade-down {
    animation: fadeDown 0.8s ease-out forwards;
    opacity: 0;
}

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }

/* Trigger animation only when slide is active */
.carousel-item.active .animated-fade-up,
.carousel-item.active .animated-fade-down {
    animation-play-state: running;
}

/* =========================================
   5. General Sections (Thematic Areas, Projects)
   ========================================= */
.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background: var(--primary-green);
    margin: 10px auto 0;
}

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

/* Project Filtering Transitions */
.project-item {
    transition: all 0.3s ease-in-out;
}

/* Image Zoom inside Cards */
.zoom-img {
    transition: transform 0.3s ease;
}
.card:hover .zoom-img {
    transform: scale(1.05);
}

/* =========================================
   6. Footer
   ========================================= */
.hover-white:hover {
    color: #fff !important;
    padding-left: 5px;
    transition: all 0.3s ease;
}

/* =========================================
   7. Responsive Mobile Adjustments
   ========================================= */
@media (max-width: 768px) {
    /* Reduce Hero Height on Mobile */
    .hero-item {
        height: 400px;
    }
    
    /* Adjust Caption Size */
    .carousel-caption h1 {
        font-size: 1.8rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }

    /* Hide Navigation Arrows on small screens if desired */
    /* .carousel-control-prev, .carousel-control-next { display: none; } */
}

/* --- Partner Infinite Scroll --- */
.slider-area {
    overflow: hidden;
    background: white;
    padding: 60px 0;
    position: relative;
    width: 100%;
}

.slider-track {
    display: flex;
    /* 1. AUTO-WIDTH: This ensures the track fits ALL logos, no matter how many you add */
    width: max-content; 
    /* 2. GAP: Ensure there is no accidental wrapping */
    flex-wrap: nowrap;
    
    animation: scroll 40s linear infinite;
}

.slide-logo {
    width: 200px; 
    height: 100px; 
    flex-shrink: 0; /* Prevents logos from shrinking */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 30px; /* Space between logos */
    
    opacity: 1;
    transition: transform 0.3s ease;
}

.slide-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slide-logo:hover {
    transform: scale(1.1);
}

/* 3. THE FIX: Move exactly -50% (half the track) */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}