/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    --primary-blue: #468FC2;      
    --primary-hover: #357ABD;
    --text-dark: #333333;
    --text-grey: #555555;
    --bg-grey: #F8F9FA;
    --footer-bg: #101828;
    --font-serif: 'DM Serif Display', serif;
    --font-sans: 'Inter', sans-serif;
    --header-height: 80px;
    --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-sans); 
    color: var(--text-dark); 
    overflow-x: hidden; 
}

a { text-decoration: none; color: inherit; transition: color var(--transition-speed); }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; transition: all var(--transition-speed); }
img { display: block; max-width: 100%; }

/* --- 2. UTILITY CLASSES --- */
.section-pad { padding: 80px 5%; }
.bg-grey { background-color: var(--bg-grey); }

.section-title-center {
    font-family: var(--font-serif);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    color: #000;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background-color: var(--primary-blue); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: white; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); border-color: white; }
.btn-white { background-color: white; color: var(--primary-blue); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-white:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.btn-secondary-dark { background-color: transparent; color: var(--primary-blue); border: 1px solid var(--primary-blue); }
.btn-secondary-dark:hover { background-color: #ebf5ff; }

.full-width { width: 100%; }
.center-btn-wrapper { text-align: center; margin-top: 50px; }

/* --- 3. HEADER --- */
header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%;
}
.nav-logo { height: 60px; width: auto; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-size: 15px; font-weight: 600; color: #2c3e50; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-blue); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--primary-blue); }
.menu-toggle, .mobile-cta { display: none; }

/* --- 4. HERO SECTION --- */
.hero { position: relative; height: 100vh; display: flex; align-items: center; padding: 0 10%; color: white; }
.slider-container, .overlay, .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.slider-container { z-index: -1; }
.slide { opacity: 0; transition: opacity 1s ease-in-out; background-size: cover; background-position: center; }
.slide.active { opacity: 1; }
.overlay { background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%); z-index: 0; }
.hero-content { position: relative; z-index: 10; max-width: 650px; margin-top: var(--header-height); }
.hero-tag { display: inline-flex; align-items: center; background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); padding: 6px 16px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.3); font-size: 13px; font-weight: 500; margin-bottom: 24px; }
.hero-tag #hero-tag-dot { width: 6px; height: 6px; background: #5D9CEC; border-radius: 50%; margin-right: 8px; display: inline-block; }
.hero h1 { font-family: var(--font-serif); font-size: 4rem; font-weight: 400; line-height: 1.1; margin-bottom: 24px; }
.hero-subtext { margin-bottom: 40px; color: rgba(255,255,255,0.9); font-size: 1.1rem; line-height: 1.6; max-width: 550px; }
.cta-group { display: flex; gap: 16px; }
.dots-container { position: absolute; bottom: 40px; right: 5%; display: flex; gap: 12px; z-index: 10; }
.dot { width: 30px; height: 3px; background: rgba(255,255,255,0.3); cursor: pointer; transition: background var(--transition-speed); }
.dot.active { background: white; }

/* --- 5. ABOUT SECTION --- */
.section-about { text-align: center; background: white; padding: 100px 15%; }
.about-text { font-size: 1.25rem; font-weight: 300; color: #4a4a4a; margin-bottom: 30px; line-height: 1.8; }
.read-more { color: var(--primary-blue); font-weight: 600; }

/* --- 6. PROGRAMS SECTION --- */
.section-programs { background: var(--bg-grey); position: relative; }
.section-header { 
    margin-bottom: 50px; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}
.section-header h2 { font-family: var(--font-serif); font-size: 3rem; margin-bottom: 15px; color: black; font-weight: 400; }
.section-header p { max-width: 600px; color: #666; font-size: 1.1rem; text-align: center; line-height: 1.5; }
.carousel-viewport { width: 100%; overflow-x: auto; padding-bottom: 20px; scrollbar-width: none; scroll-behavior: smooth; }
.carousel-viewport::-webkit-scrollbar { display: none; }

.carousel-track { 
    display: flex; 
    gap: 25px; 
    width: max-content; 
    margin: 0 auto; 
    padding: 10px 5px; 
}

.program-card { background: white; border-radius: 8px; padding: 15px; width: 280px; flex-shrink: 0; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform var(--transition-speed); }
.program-card:hover { transform: translateY(-5px); }
.card-image { width: 100%; height: 320px; border-radius: 6px; overflow: hidden; margin-bottom: 20px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.program-card:hover img { transform: scale(1.05); }
.program-card h3 { font-family: var(--font-serif); font-size: 1.2rem; color: #222; font-weight: 500; }
.program-dots-container { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.p-dot { background: #ccc; width: 8px; height: 8px; border-radius: 50%; cursor: pointer; transition: 0.3s; }
.p-dot.active { background: #888; }

/* --- 7. PARTNERS & GALLERY SEAMLESS LOOP --- */
.section-partners, .section-gallery { 
    background: white; 
    text-align: center; 
    overflow: hidden; 
    padding: 80px 0; 
    width: 100%;
    display: flex; flex-direction: column; align-items: center;
}
.partners-title { font-size: 0.9rem; letter-spacing: 1px; color: #888; text-transform: uppercase; margin-bottom: 40px; display: block; }
.marquee-wrapper { display: flex; flex-direction: column; gap: 30px; width: 100%; overflow: hidden; position: relative; }

.marquee-track { 
    display: flex; 
    flex-wrap: nowrap; 
    width: max-content; 
    align-items: center; 
}

.partner-logo { 
    flex-shrink: 0; 
    height: 60px; 
    width: auto; 
    transition: transform 0.3s; 
    margin-right: 60px; 
}
.partner-logo:hover { transform: scale(1.1); }

.gallery-item { flex-shrink: 0; width: 300px; height: 200px; border-radius: 8px; overflow: hidden; margin-right: 15px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* The JS clones the items to create 4 total sets. Moving it 25% perfectly loops 1 set. */
.scroll-left { animation: scrollLeft 25s linear infinite; }
.scroll-right { animation: scrollRight 25s linear infinite; }

@keyframes scrollLeft { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-25%); } 
}
@keyframes scrollRight { 
    0% { transform: translateX(-25%); } 
    100% { transform: translateX(0); } 
}

/* --- 8. IMPACT SECTION --- */
.section-impact { background-color: #3880B0; color: white; text-align: center; }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1200px; margin: 0 auto 60px; gap: 20px; }
.impact-item h3 { font-size: 3.5rem; font-weight: 700; margin-bottom: 10px; }
.impact-item p { font-size: 1.1rem; opacity: 0.9; }

/* --- 9. STORIES SECTION --- */
.section-stories { background: white; }
.stories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.story-card { background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); overflow: hidden; transition: transform 0.3s; position: relative; border: 1px solid #eee; }
.story-card:hover { transform: translateY(-5px); }
.story-img { height: 220px; overflow: hidden; }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
.story-content { padding: 30px; position: relative; }
.quote-icon { font-size: 3rem; color: var(--primary-blue); line-height: 1; display: block; margin-bottom: 15px; font-family: serif; }
.story-text { font-style: italic; color: #555; margin-bottom: 25px; line-height: 1.6; font-size: 0.95rem; }
.story-popup { position: absolute; top: 50px; left: 20px; right: 20px; background: white; padding: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); border-radius: 8px; font-size: 0.95rem; color: #333; line-height: 1.6; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 10; border: 1px solid #eee; font-style: italic; }
.story-card:hover .story-popup { opacity: 1; visibility: visible; transform: translateY(0); }
.story-meta { border-top: 1px solid #eee; padding-top: 15px; }
.story-name { display: block; font-weight: 700; color: #222; font-size: 0.9rem; margin-bottom: 4px; }
.story-location { display: block; font-size: 0.8rem; color: #888; }

/* --- 10. BE PART OF CHANGE --- */
.section-change { background: white; }
.change-card { background: #F4F7FA; border-radius: 12px; padding: 40px 30px; text-align: left; transition: 0.3s; display: flex; flex-direction: column; align-items: flex-start; }
.change-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.change-icon { width: 60px; height: 60px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary-blue); margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.change-icon svg { width: 30px; height: 30px; }
.change-card h3 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 10px; color: #222; }
.change-card p { color: #666; font-size: 0.95rem; line-height: 1.6; margin-bottom: 30px; min-height: 50px; }

/* --- 11. LATEST UPDATES --- */
.update-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #eee; transition: 0.3s; }
.update-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.update-img { height: 200px; overflow: hidden; }
.update-img img { width: 100%; height: 100%; object-fit: cover; }
.update-content { padding: 25px; }
.update-date { font-size: 0.8rem; color: #888; margin-bottom: 10px; }
.update-card h3 { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 700; color: #222; margin-bottom: 12px; line-height: 1.4; }
.update-card p { font-size: 0.9rem; color: #666; line-height: 1.6; margin-bottom: 20px; }
.read-more-link { color: var(--primary-blue); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 5px; }
.read-more-link:hover { text-decoration: underline; }

/* --- 12. FOOTER --- */
footer { background-color: var(--footer-bg); color: #EAECF0; padding: 60px 5% 30px; }
.footer-container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-logo { height: 50px; margin-bottom: 20px; }
.footer-col p { font-size: 0.9rem; line-height: 1.6; color: #D0D5DD; }
.footer-col h4 { color: white; margin-bottom: 20px; font-weight: 600; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #D0D5DD; font-size: 0.9rem; transition: 0.3s; }
.footer-col ul li a:hover { color: white; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: #D0D5DD; }
.footer-bottom { max-width: 1200px; margin: 30px auto 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: #98A2B3; }
.footer-links { display: flex; gap: 20px; }

/* --- 13. RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 3rem; }
    .impact-grid { grid-template-columns: repeat(2, 1fr); gap: 50px; }
}

@media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    
    .nav-links, .header-cta { display: none; }
    .menu-toggle { display: block; font-size: 24px; cursor: pointer; }
    .nav-links.mobile-active { display: flex; flex-direction: column; position: absolute; top: var(--header-height); left: 0; width: 100%; background: white; padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .mobile-cta { display: block; margin-top: 15px; width: 100%; }
    .mobile-cta button { width: 100%; justify-content: center; }

    .hero h1 { font-size: 2.5rem; }
    .cta-group { flex-direction: column; }
    .impact-grid { grid-template-columns: 1fr; gap: 40px; }
}