/* ==========================================
   THE SOCIAL SERVICE OF NEPAL - MASTER CSS
   Version: 8.0 (Branding Protection & Layout Sync)
   ========================================== */

:root {
  --primary: #1e3c72;
  --primary-dark: #0f2042;
  --accent: #ff6b35;
  --accent-light: #ff8c61;
  --bg: #ffffff;
  --gray: #f8f9fa;
  --text: #262626;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --nav-height: 4.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* --- 1. GLOBAL BASE (Preserving your Typography) --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    color: var(--text); 
    line-height: 1.6; 
    background: var(--bg);
    padding-top: var(--nav-height); 
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
img { width: 100%; display: block; }
.section { padding: 6rem 0; }
.gray-bg { background: var(--gray); }

/* --- 2. THE PAGE HEADERS (Preserving Version 4 logic) --- */
.page-header { 
    background: linear-gradient(rgba(15, 32, 66, 0.95), rgba(15, 32, 66, 0.95)); 
    padding: 7rem 0; text-align: center; color: white; margin-bottom: 2rem; 
}
.page-header h1 { font-size: 3.5rem; font-weight: 900; text-transform: uppercase; }
.header-line { width: 60px; height: 4px; background: var(--accent); margin: 1rem auto 2rem; border-radius: 2px; }

.section-header { text-align: center; margin-bottom: 4.5rem; display: flex; flex-direction: column; align-items: center; }
.section-header h2 { font-size: 2.8rem; font-weight: 800; color: var(--primary); margin-bottom: 1.2rem; }
.section-header h2::after { content: ''; display: block; width: 60px; height: 4px; background: var(--accent); margin: 1rem auto 0; border-radius: 2px; }
.section-header p { font-size: 1.15rem; color: var(--muted); max-width: 750px; margin: 0 auto; }

/* --- 3. NAVIGATION (Version 4 Master Sync) --- */
.navbar { position: fixed; top: 0; width: 100%; height: var(--nav-height); background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); z-index: 2000; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
/* --- NAVIGATION CONTAINER FIX --- */
.nav-container {
    /* 1. This prevents the logo and buttons from touching the screen edges */
    max-width: 1200px; 
    width: 100%;
    
    /* 2. This centers the whole navigation bar on the screen */
    margin: 0 auto; 
    
    /* 3. Padding for mobile safety */
    padding: 0 1.5rem; 
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.navbar-logo-img { height: 3.2rem; width: auto; object-fit: contain; }
.nav-menu { display: flex; gap: 1.8rem; }
.nav-menu a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.95rem; transition: 0.3s; }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.donate-btn { background: var(--accent); color: white; padding: 0.6rem 1.3rem; border-radius: 15px; text-decoration: none; font-weight: 700; transition: 0.3s; }

/* --- 4. BUTTONS & CENTERING --- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 2.5rem; border-radius: 15px; font-weight: 700; text-decoration: none; transition: var(--transition); border: none; cursor: pointer; min-width: 220px; }
.btn-primary { background: var(--primary); color: white; }
.btn-accent { background: var(--accent); color: white; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.section-center, .form-center { width: 100%; display: flex; justify-content: center; margin-top: 4rem; clear: both; }

/* --- 5. THE HOME HERO SLIDER --- */
.hero-slider { position: relative; height: calc(100vh - var(--nav-height)); background: #000; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 100; width: 100%; max-width: 850px; text-align: center; color: white; padding: 0 2rem; display: flex; flex-direction: column; gap: 2rem; }
.hero-content h2 { font-size: 4rem; font-weight: 800; text-shadow: 0 4px 15px rgba(0,0,0,0.4); }
.slide-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 200; }
.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer; border: none; }
.dot.active { background: var(--accent); width: 25px; border-radius: 10px; }

/* --- HERO BUTTONS SPACING FIX --- */
.hero-buttons {
    display: flex;
    /* We increase the gap from 1.5rem to 2.5rem for more 'breathing room' */
    gap: 2.5rem; 
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
}

/* Mobile Fix: Ensure buttons don't overlap when they stack vertically */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem; /* Shorter vertical gap for mobile thumbs */
    }
}

/* --- 6. WORK & PROJECTS (Surgical Alignment) --- */
/* --- OUR WORK: ADVANCED CARD INTERACTION --- */

.work-horizontal-item {
    display: flex;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2.5rem;
    cursor: pointer;
    
    /* THE ENGINE: cubic-bezier timing makes the lift feel natural and smooth */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s ease, 
                border-color 0.3s ease;
}

/* 1. THE LIFT EFFECT */
.work-horizontal-item:hover {
    transform: translateY(-12px); /* Lifts the card up by 12 pixels */
    
    /* Creates a deep, blue-tinted shadow to simulate height */
    box-shadow: 0 25px 50px rgba(30, 60, 114, 0.15); 
    
    /* Highlights the border with your accent color */
    border-color: var(--accent-light);
}

.work-image-box {
    width: 35%;
    min-width: 300px;
    height: 300px;
    overflow: hidden; /* Acts as a window for the zoom effect */
}

.work-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease; /* Smooth timing for the zoom */
}

/* 2. THE INTERNAL IMAGE ZOOM */
.work-horizontal-item:hover .work-image-box img {
    transform: scale(1.08); /* Image grows slightly inside the frame */
}

/* 3. LINK COLOR FEEDBACK */
.work-horizontal-item:hover .link-report {
    color: var(--accent); /* Link turns orange when the card is hovered */
    padding-left: 5px;    /* Subtle arrow nudge */
}

.link-report {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.work-content-box { width: 65%; padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }

/* --- WORK DETAIL PAGE (Unified Design) --- */

.mission-detail-top { text-align: center; padding: 4rem 0 2rem; }
.mission-detail-top h1 { font-size: 3rem; color: var(--primary); font-weight: 800; margin-bottom: 1.5rem; }

.mission-meta-split {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 1.2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
}

.mission-meta-split i { color: var(--accent); margin-right: 8px; }

.mission-description-full { margin-bottom: 4rem; }
.mission-description-full h3 { font-size: 1.6rem; color: var(--primary); margin-bottom: 1.5rem; }
.mission-description-full p { font-size: 1.1rem; line-height: 1.8; color: var(--text); }

/* Main Grid Layout */
.work-detail-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.gallery-column h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 2rem; }

.image-gallery-collage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-item { height: 200px; border-radius: 8px; overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.gallery-item:hover img { transform: scale(1.1); }

/* SIDEBAR CARDS */
.sidebar-column { display: flex; flex-direction: column; gap: 2rem; }

.impact-card-blue {
    background: var(--primary) !important;
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.2);
}

.sidebar-title-white { color: white; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 15px; margin-bottom: 2rem; }

.impact-stats { display: flex; flex-direction: column; gap: 5px; }
.impact-number { font-size: 3.5rem; font-weight: 900; color: var(--accent-light); line-height: 1; }
.impact-label { text-transform: uppercase; letter-spacing: 2px; font-weight: 700; font-size: 0.8rem; opacity: 0.9; }

.sidebar-card-plain {
    background: var(--gray);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.sidebar-card-plain h4 { color: var(--primary); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }

.items-list-modern { list-style: none; }
.items-list-modern li { padding: 0.8rem 0; border-bottom: 1px solid #e2e8f0; color: var(--text); }
.items-list-modern li:last-child { border-bottom: none; }

.team-mini-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.mini-staff-item { display: flex; align-items: center; gap: 1rem; }
.mini-staff-item img { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; border: 3px solid white; box-shadow: var(--shadow); }
.staff-name { font-weight: 700; color: var(--primary); margin: 0; }
.staff-role { font-size: 0.8rem; color: var(--muted); margin: 0; }

@media (max-width: 992px) {
    .work-detail-main-grid { grid-template-columns: 1fr; }
    .mission-meta-split { flex-direction: column; gap: 10px; text-align: left; }
}


/* --- MISSION or PROJECTS BRIEF PAGE STYLES --- */
.mission-page-header {
    background: linear-gradient(rgba(30, 60, 114, 0.9), rgba(30, 60, 114, 0.9)), 
                url('../images/pattern.png');
    padding: 6rem 0;
    text-align: center;
    color: white;
}

.mission-page-header h1 { font-size: 3.5rem; font-weight: 900; margin-bottom: 1rem; }
.header-line { width: 80px; height: 5px; background: var(--accent); margin: 0 auto 1.5rem; border-radius: 5px; }

/* The Large Wide Card */
.mission-brief-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 5rem;
    border: 1px solid var(--border);
}

.mission-hero {
    height: 450px;
    position: relative;
}

.mission-hero img { width: 100%; height: 100%; object-fit: cover; }

.mission-category {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.mission-body { padding: 4rem; display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; }

.mission-main-info h2 { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }
.mission-meta-row { display: flex; gap: 2rem; margin-bottom: 2rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.mission-meta-row i { color: var(--accent); }
.mission-desc { font-size: 1.1rem; line-height: 1.8; color: var(--text); }

/* Assigned Personnel Section */
.mission-team-section h4 { 
    font-size: 1.1rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--primary); 
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gray);
    padding-bottom: 1rem;
}

.mission-team-grid { display: grid; gap: 1.5rem; }

.member-chip { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--gray); border-radius: 12px; }
.member-chip img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.chip-text strong { display: block; color: var(--primary); font-size: 1rem; }
.chip-text span { font-size: 0.8rem; color: var(--muted); }

/* The Countdown Footer Bar */
.mission-footer {
    background: var(--primary);
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.footer-countdown { display: flex; align-items: center; gap: 2.5rem; }
.footer-countdown p { font-weight: 800; letter-spacing: 1px; font-size: 0.9rem; opacity: 0.8; }

.big-timer { 
    display: flex; 
    align-items: baseline; 
    gap: 12px; /* Slightly reduced gap to fit 4 units comfortably */
    position: static !important; 
    background: transparent !important; 
}

/* --- PROJECT PAGE: FOOTER TIMER ALIGNMENT --- */

.mission-footer {
    background: var(--primary);
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.footer-countdown { 
    display: flex; 
    align-items: center; /* THE FIX: Vertically centers text and numbers */
    gap: 2rem;           /* Space between 'MISSION STARTS IN' and the clock */
}

.footer-countdown p { 
    margin: 0; 
    font-weight: 800; 
    letter-spacing: 1px; 
    font-size: 0.9rem; 
    opacity: 0.8;
    white-space: nowrap; 
}

/* THE MASTER OVERRIDE: Forces the timer into the layout flow */
.footer-countdown .countdown-timer { 
    position: static !important; /* Removes the 'floating' behavior */
    display: flex !important; 
    background: transparent !important; 
    color: white !important;
    padding: 0 !important;
    gap: 12px !important;
    width: auto !important;
    inset: auto !important; /* Resets any top/left/bottom/right rules */
}

.big-timer .unit { text-align: center; line-height: 1; }

.big-timer span { 
    font-size: 2rem; 
    font-weight: 900; 
    display: block;
}

.big-timer small { 
    display: block; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    opacity: 0.7; 
    margin-top: 4px;
}

.big-timer .sep { 
    font-size: 1.5rem; 
    font-weight: 300; 
    opacity: 0.5; 
    align-self: flex-start;
    margin-top: 5px;
}


/* Add a subtle animation to the seconds so they "pulse" */
.seconds {
    transition: all 0.2s ease;
}

.big-timer .unit { text-align: center; }
.big-timer span { font-size: 2rem; font-weight: 900; }
.big-timer small { display: block; font-size: 0.7rem; text-transform: uppercase; opacity: 0.7; }
.big-timer .sep { font-size: 1.5rem; font-weight: 300; opacity: 0.5; }

.mission-btn {
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    transition: 0.3s;
}

.mission-btn:hover { background: var(--accent); color: white; transform: scale(1.05); }

/* Responsive */
@media (max-width: 992px) {
    .mission-body { grid-template-columns: 1fr; padding: 2.5rem; }
    .mission-footer { flex-direction: column; gap: 2rem; text-align: center; padding: 3rem 2rem; }
    .footer-countdown { flex-direction: column; gap: 1rem; }
}



/* --- PROJECT DETAIL PAGE --- */
.project-detail-hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 4rem;
}

.detail-badge {
    background: var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.project-detail-hero h1 { font-size: 3.5rem; margin-bottom: 1rem; }

/* --- FIXED PROJECT DETAIL TIMER --- */

.hero-timer {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    
    /* THE FIX: Force contents to stack vertically and center them */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem; /* Precise gap between text and clock */
}

.hero-timer p { 
    margin: 0 !important; /* Removes competing margins */
    font-weight: 800; 
    letter-spacing: 2px; 
    font-size: 0.8rem; 
}

/* THE MASTER OVERRIDE: Resets the 'floating' behavior specifically inside this box */
.hero-timer .countdown-timer {
    position: static !important; /* Stops the timer from floating over the text */
    background: transparent !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    width: auto !important;
    color: white !important;
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.story-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.story-card h3 { 
    color: var(--primary); 
    font-size: 1.8rem; 
    margin-bottom: 2rem;
    border-left: 5px solid var(--accent);
    padding-left: 20px;
}

.action-card {
    background: var(--primary);
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.team-assignment-card {
    background: var(--gray);
    padding: 2rem;
    border-radius: var(--radius);
}

.mini-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mini-member img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.mini-member span { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 992px) {
    .project-detail-grid { grid-template-columns: 1fr; }
}

/* --- OUR PROJECTS (Homepage Grid & Countdown Fix) --- */

.projects-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 3rem; 
    width: 100%;
}

.project-card { 
    background: white; 
    border-radius: var(--radius); 
    border: 1px solid var(--border); 
    overflow: hidden; 
    /* THE FIX: Forces image to stay on top and text to stay below */
    display: flex !important; 
    flex-direction: column !important; 
    height: 100%; 
    transition: var(--transition);
    position: relative;
}

.project-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
}

/* 1. Image Container */
.project-image-box { 
    position: relative !important; 
    height: 260px; 
    width: 100%;
    overflow: hidden; 
}

.project-image-box img { 
    width: 100%;
    height: 100%; 
    object-fit: cover; 
}

/* 2. Timer (Pinned to bottom of photo) */
.countdown-timer { 
    position: absolute !important; 
    bottom: 0 !important; 
    left: 0;
    width: 100%; 
    background: rgba(30, 60, 114, 0.92); /* Dark primary blue */
    color: white; 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    padding: 12px 0; 
    backdrop-filter: blur(5px);
    z-index: 10;
}

/* 3. Text Content (Centered & Padded) */
.project-content { 
    /* THE FIX: Added 2.5rem padding so text doesn't touch borders */
    padding: 2.5rem !important; 
    text-align: center !important; 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; 
    justify-content: center !important;
    flex-grow: 1; 
    background: white;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-weight: 800;
}

/* Icons and Text logic */
.mission-meta { 
    font-size: 0.95rem; 
    color: var(--muted); 
    margin-bottom: 0.8rem !important; 
    display: flex !important; 
    align-items: center; 
    gap: 8px; 
    justify-content: center;
    width: 100%;
}

.mission-meta i { color: var(--accent); width: 18px; text-align: center; }

/* The 'Join Mission' Button inside the card */
.project-content .btn {
    margin-top: 1.5rem;
    width: auto !important;
    min-width: 180px;
}



/* ==========================================
   8. TEAM SLIDER SECTION (Fixed Padding & Height)
   ========================================== */

.team-slider-section {
    /* 1. THE VERTICAL FIX: Explicitly set a large vertical gap */
    padding: 100px 0 !important; 
    background-color: var(--bg);
    width: 100%;
    position: relative;
    overflow: hidden; /* Keeps the horizontal track contained */
    display: block;
    clear: both;
}

.team-slider-container {
    position: relative;
    width: 100%;
    /* 2. THE INTERNAL GAP: Space between the 'Meet Our Team' header and the photos */
    margin-top: 50px; 
    /* 3. Ensures the container is tall enough for the circles + hover lift */
    min-height: 350px; 
    display: flex;
    align-items: center;
}

.team-slider-track {
    display: flex !important;
    gap: 4rem;
    width: max-content !important;
    /* 4. THE ENGINE: Smooth infinite loop */
    animation: scrollTeam 40s linear infinite;
    padding: 20px 0; /* Extra room so circles don't get cut off when they lift */
}

/* Pause on hover */
.team-slider-track:hover {
    animation-play-state: paused;
}

.team-member-slide {
    width: 220px;
    flex-shrink: 0;
    text-align: center;
}

/* THE CIRCULAR FRAME */
.team-circle-frame {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--gray);
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

/* HOVER INTERACTION */
.team-member-slide:hover .team-circle-frame {
    border-color: var(--accent);
    transform: translateY(-10px) scale(1.05); /* Lifts up without touching upper section */
}

/* SOCIAL OVERLAY */
.member-social-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 60, 114, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50%;
}

.team-member-slide:hover .member-social-overlay {
    opacity: 1;
}

/* THE ANIMATION (Seamless Loop) */
@keyframes scrollTeam {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Mobile Fixes */
@media (max-width: 768px) {
    .team-slider-section { padding: 60px 0 !important; }
    .team-slider-track { gap: 2.5rem; }
    .team-circle-frame { width: 150px; height: 150px; }
}

/* --- 9. CONTACT SECTION (Unified Master Fix) --- */

.contact-section {
    background: #fafafa;
    /* THE FOOTER GAP FIX: Generous 10rem bottom padding ensures it never touches the footer */
    padding: 8rem 0 10rem 0; 
    border-top: 1px solid var(--border);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem; /* Space between info cards and the form */
}

.contact-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

/* THE FORM CENTERING ENGINE */
.contact-form-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100%;
}

.contact-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4rem; /* Breathability inside the form */
    width: 100%;
    max-width: 800px; /* Professional width for readability */
    box-shadow: var(--shadow);
}

.contact-form h3 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 800;
}

/* --- THE INPUT STYLING (Fixes "Default Shape" issue) --- */
.contact-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.contact-form label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

/* Forces all inputs to look professional and modern */
.contact-form input, 
.contact-form textarea {
    width: 100% !important;
    padding: 1rem 1.2rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    background: #fdfdfd !important;
    transition: all 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.05) !important;
}

/* THE BUTTON CENTERING */
.form-center {
    display: flex !important;
    justify-content: center !important;
    margin-top: 2.5rem;
}

/* --- HIGH-VISIBILITY FEEDBACK ALERTS --- */
.alert {
    padding: 1.2rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 700; /* Extra bold text */
    text-align: center;
    font-size: 1.1rem;
    display: block;
    animation: slideInUp 0.5s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Vibrant Green for Success */
.alert-success {
    background-color: #2ecc71 !important; /* Bright Emerald Green */
    color: #ffffff !important;           /* Crisp White Text */
    border: 2px solid #27ae60;
}

/* Vibrant Red for Errors */
.alert-error {
    background-color: #e74c3c !important; 
    color: #ffffff !important;
    border: 2px solid #c0392b;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}



/* --- ABOUT PAGE MASTER LAYOUT --- */

/* 1. Our Story Section (Flex Row) */
.about-story-wrapper {
    display: flex;
    align-items: center;
    gap: 5rem;
    padding: 2rem 0;
}

.about-image-column {
    flex: 1;
}

.about-image-relative {
    position: relative;
    display: inline-block;
}

.main-about-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}

/* THE FLOATING BADGE: Positioned at the right edge */
.experience-floating-card {
    position: absolute;
    bottom: 30px;
    right: -25px; /* Pushes it over the right edge */
    background: var(--accent);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
    z-index: 10;
}

.experience-floating-card strong { font-size: 2.2rem; display: block; line-height: 1; }
.experience-floating-card span { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }

.about-text-column {
    flex: 1.2;
}

.about-text-column h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 1rem 0 1.5rem;
    font-weight: 800;
}

/* 2. Mission & Vision Grid */
.mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.mv-card-premium {
    background: white;
    padding: 4rem 3rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.mv-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.mv-icon-circle {
    width: 70px;
    height: 70px;
    background: var(--gray);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 2rem;
}

/* 3. Record Statistics Grid */
.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item-box h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.stat-item-box p {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 992px) {
    .about-story-wrapper, .mv-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .experience-floating-card {
        right: 20px; /* Moves badge inside on smaller screens */
    }
    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}



/* --- PRO LIGHTBOX & GALLERY (Final Alignment) --- */

.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Dark cinematic backdrop */
    justify-content: center;
    align-items: center;
    cursor: default;
}

.lightbox-content {
    width: 85%;
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    /* THE FIX FOR UGLY STRETCHING: Always maintains resolution */
    object-fit: contain !important; 
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

/* NAVIGATION ARROWS */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    font-size: 2.5rem;
    transition: all 0.3s ease;
    z-index: 3100;
}

.gallery-nav:hover {
    background: var(--accent); /* Your brand orange */
    color: white;
}

.gallery-nav.prev { left: 0; border-radius: 0 15px 15px 0; }
.gallery-nav.next { right: 0; border-radius: 15px 0 0 15px; }

/* THE CROSS BUTTON (Top Right) */
.close-lightbox {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 3.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3200;
    transition: 0.3s;
    opacity: 0.7;
}

.close-lightbox:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--accent);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gallery-nav { padding: 1.5rem 1rem; font-size: 1.5rem; }
    .close-lightbox { top: 15px; right: 20px; font-size: 2.5rem; }
}



/* --- 11. BRANDED FOOTER (Full Name & Logo) --- */
.footer {
    background: var(--primary-dark);
    color: #ffffff;
    padding: 6rem 0 2rem;
    width: 100%;
}

.footer-grid {
    display: grid;
    /* Adjusted grid to give more space to the description and contact info */
    grid-template-columns: 1.5fr 0.8fr 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.4rem; /* Larger font for the full NGO name */
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.footer-section h4 { 
    color: #fff; 
    margin-bottom: 1.5rem; 
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-tagline {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.7;
    max-width: 300px;
}

/* Contact and links stay as established in previous fixes */
.footer-contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 1.2rem; }
.footer-contact-item i { color: var(--accent); width: 20px; text-align: center; margin-top: 5px; flex-shrink: 0; }
.contact-text { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); line-height: 1.4; word-break: break-all; }

.footer-links-list { list-style: none; }
.footer-links-list li { margin-bottom: 0.8rem; }
.footer-links-list a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: 0.3s; font-size: 0.95rem; }
.footer-links-list a:hover { color: var(--accent); padding-left: 5px; }

/* Social Tray */
.footer-social-tray { display: flex; gap: 15px; }
.footer-social-tray a {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; text-decoration: none; transition: 0.3s;
    font-size: 1.1rem;
}
.footer-social-tray a:hover { background: var(--accent); transform: translateY(-5px); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2rem; text-align: center; color: rgba(255, 255, 255, 0.4); font-size: 0.85rem; }

/* Mobile Adjustments */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* --- FULL TEAM PAGE GRID (Slanted Design with Strict 3-Column Layout) --- */


.team-page-grid {
    display: grid;
    /* THE FIX: This forces exactly 3 columns regardless of screen width */
    grid-template-columns: repeat(3, 1fr); 
    gap: 3.5rem; /* Increased gap slightly for a more balanced 3-column look */
    margin-bottom: 4rem;
}

/* RESPONSIVE STEPS: Ensuring it doesn't break on smaller screens */

/* Tablet View: Switch to 2 Columns */
@media (max-width: 1024px) {
    .team-page-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Mobile View: Switch to 1 Column */
@media (max-width: 650px) {
    .team-page-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


.full-member-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    /* Smooth physical movement and shadow change */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.full-member-card:hover {
    transform: translateY(-15px); /* Professional high-lift */
    box-shadow: 0 30px 60px rgba(30, 60, 114, 0.15); /* Tinted shadow */
    border-color: var(--accent-light);
}

/* THE SLANTED IMAGE */
.member-image-slant {
    position: relative;
    height: 350px;
    background: var(--primary);
    /* Magic Cut: Top-left, Top-right, Bottom-right (angled), Bottom-left */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    overflow: hidden;
}

.member-image-slant img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.full-member-card:hover .member-image-slant img {
    transform: scale(1.15); /* Dramatic zoom on hover */
}

/* CONTENT BOX */
.member-content {
    padding: 2.5rem;
    text-align: center;
    position: relative;
    flex-grow: 1;
    padding-bottom: 4.5rem; /* Room for the social bar */
}

.role-label {
    display: inline-block;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding: 0.3rem 1rem;
    background: var(--gray);
    border-radius: 50px;
}

.member-content h3 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 800;
}

.member-content p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* THE SMOOTH SOCIAL BAR */
.member-social-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    
    /* Initially hidden below the card */
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.full-member-card:hover .member-social-bar {
    transform: translateY(0);
    opacity: 1;
}

.member-social-bar a {
    color: white;
    font-size: 1.2rem;
    transition: 0.3s;
}

.member-social-bar a:hover {
    color: var(--accent);
    transform: scale(1.3);
}


/* --- BLOG LISTING GRID MODULE --- */

.blog-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 3.5rem; /* Spacious gap for readability */
}

.blog-main-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.blog-main-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: var(--accent-light);
}

/* 1. Card Media */
.blog-card-media {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-main-card:hover .blog-card-media img {
    transform: scale(1.1);
}

.blog-category-badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    background: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 2. Card Body */
.blog-card-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta-data {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.blog-meta-data i { color: var(--accent); }

.blog-card-body h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 800;
}

.blog-card-body p {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    opacity: 0.85;
}

/* 3. Link Interaction */
.blog-read-link {
    margin-top: auto; /* Pushes link to the bottom */
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.blog-read-link:hover {
    color: var(--accent);
}

.blog-read-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.blog-read-link:hover i {
    transform: translateX(5px);
}


/* --- BLOG POST DETAIL MODULE --- */

.blog-category-label {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.blog-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 5rem;
}

.article-featured-img {
    width: 100%;
    height: 450px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.article-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* THE STORY TEXT: Large font and high line-height for readability */
.article-text-body {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 4rem;
}

.article-share-box {
    padding: 2.5rem;
    background: var(--gray);
    border-radius: var(--radius);
    text-align: center;
}

.share-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.share-links a {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

.share-fb { background: #3b5998; }
.share-wa { background: #25d366; }

/* Sidebar Widgets */
.sidebar-widget-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.mini-blog-list { list-style: none; }
.mini-blog-list li { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.mini-blog-list li:last-child { border-bottom: none; }
.mini-blog-list a { text-decoration: none; color: var(--primary); font-weight: 700; transition: 0.3s; }
.mini-blog-list a:hover { color: var(--accent); }

@media (max-width: 992px) {
    .blog-detail-layout { grid-template-columns: 1fr; }
    .article-featured-img { height: 300px; }
}

/* --- FULL CONTACT PAGE STYLES --- */

.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr; /* Sidebar 30%, Form 70% */
    gap: 5rem;
}

/* Sidebar Details */
.contact-method-card {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: 0.3s;
}

.contact-method-card:hover .method-icon {
    background: var(--primary);
    color: white;
    transform: rotate(-10deg);
}

.method-text h4 { color: var(--primary); font-size: 1.1rem; margin-bottom: 5px; }
.method-text p, .method-text span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.method-text a { text-decoration: none; color: inherit; transition: 0.3s; }
.method-text a:hover { color: var(--accent); }

.contact-social-box {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.contact-social-box h4 { margin-bottom: 1.5rem; color: var(--primary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* Main Form Area */
.contact-form-main {
    background: white;
    padding: 4rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-intro { margin-bottom: 3rem; }
.form-intro h3 { font-size: 2rem; color: var(--primary); margin-bottom: 0.5rem; }
.form-intro p { color: var(--muted); }

.full-contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.full-contact-form .form-group { margin-bottom: 2rem; }
.full-contact-form label { display: block; font-weight: 700; color: var(--primary); margin-bottom: 0.8rem; font-size: 0.85rem; text-transform: uppercase; }
.full-contact-form input, .full-contact-form textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 10px;
    font-family: inherit;
    background: #f8fafc;
    transition: 0.3s;
}

.full-contact-form input:focus, .full-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 5px rgba(30, 60, 114, 0.05);
}

/* Map Styling */
.map-section {
    line-height: 0;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .contact-page-grid { grid-template-columns: 1fr; }
    .contact-form-main { padding: 2.5rem; }
}

@media (max-width: 600px) {
    .full-contact-form .form-row { grid-template-columns: 1fr; gap: 0; }
}


