@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&family=Open+Sans:wght@400;600&display=swap');

/* --- Root Variables (Master Color Palette) --- */
:root {
    --primary: #0f5132; /* Deep Forest Green */
    --secondary: #198754; /* Medium Green - Success/Action Color */
    --accent: #ffc107;  /* Golden Yellow - Highlight/Support Button */
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #fff;
    --text-grey: #555;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* --- Base & Typography --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Open Sans', sans-serif; 
    color: var(--dark); 
    background-color: #fff; 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}
h1, h2, h3, .logo { font-family: 'Montserrat', sans-serif; }

/* --- Navigation --- */
header { 
    background: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 5%; 
    max-width: 1400px; 
    margin: auto; 
}
.logo { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--primary); 
    letter-spacing: -1px; 
}
.nav-links a { 
    margin-left: 25px; 
    text-decoration: none; 
    color: var(--dark); 
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: 0.3s; 
}
.nav-links a:hover { color: var(--secondary); }
.nav-admin { color: var(--accent) !important; }

/* --- Hero --- */
.hero-modern {
    height: 85vh;
    background: url('https://images.unsplash.com/photo-1593113598332-cd288d649433?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    background-attachment: fixed;
}
.hero-overlay {
    background: linear-gradient(to right, rgba(15, 81, 50, 0.9), rgba(15, 81, 50, 0.4));
    width: 100%; height: 100%; display: flex; align-items: center; padding: 0 5%;
}
.hero-content { max-width: 700px; color: white; animation: fadeInUp 1s ease-out; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; font-weight: 800; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.tagline { color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; display: block; margin-bottom: 10px; }

/* --- Layout --- */
.container { padding: 4rem 5%; max-width: 1200px; margin: auto; flex: 1; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }

/* --- Components --- */
.btn { 
    padding: 12px 30px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 600; 
    transition: 0.3s; 
    display: inline-block; 
    border: none; 
    cursor: pointer; 
}
.btn-primary { background: var(--accent); color: var(--dark); }
.btn-primary:hover { background: #e0a800; transform: translateY(-3px); }
.btn-outline { border: 2px solid white; color: white; background: transparent; }
.btn-outline:hover { background: white; color: var(--primary); }

.hover-card { 
    border: none; 
    box-shadow: var(--shadow); 
    border-radius: 15px; 
    overflow: hidden; 
    background: white; 
    transition: 0.4s; 
}
.hover-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.hover-card img { width: 100%; height: 220px; object-fit: cover; transition: 0.5s; }
.hover-card:hover img { transform: scale(1.1); }
.card-content { padding: 25px; }
.card-content h3 { margin-bottom: 10px; color: var(--primary); }

.status-badge { 
    display: inline-block; 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    color: #fff; 
    font-weight: bold; 
    margin-bottom: 10px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.status-upcoming { background: #3498db; }
.status-in_progress { background: #e67e22; }
.status-completed { background: var(--secondary); }

/* --- Impact Strip --- */
.impact-strip { 
    background: var(--dark); 
    color: white; 
    padding: 40px 0; 
    margin-top: -50px; 
    position: relative; 
    z-index: 10; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}
.stat-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    text-align: center; 
    max-width: 1200px; 
    margin: auto; 
}
.stat-box h2 { font-size: 2.5rem; color: var(--accent); margin-bottom: 5px; }

/* --- Masonry --- */
.masonry-container { column-count: 3; column-gap: 20px; padding: 20px 0; }
.masonry-item { background-color: #fff; break-inside: avoid; margin-bottom: 20px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s ease; }
.masonry-item:hover { transform: scale(1.02); }
.masonry-item img { width: 100%; height: auto; display: block; }

/* --- Services Page Specific --- */
.service-section { padding: 4rem 0; border-bottom: 1px solid #eee; }
.service-section:last-child { border-bottom: none; }
.service-row { display: flex; align-items: center; gap: 4rem; margin-bottom: 2rem; }
.service-row:nth-child(even) { flex-direction: row-reverse; }
.service-img { flex: 1; height: 400px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.service-row:hover .service-img img { transform: scale(1.05); }
.service-text { flex: 1; }
.service-text h2 { font-size: 2.2rem; color: var(--primary); margin-bottom: 1.5rem; position: relative; display: inline-block; }
.service-text h2::after { content: ''; display: block; width: 50%; height: 4px; background: var(--accent); margin-top: 5px; border-radius: 2px; }

.check-list { list-style: none; margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-list li { position: relative; padding-left: 25px; font-size: 0.95rem; color: #555; }
.check-list li::before { content: '✔'; position: absolute; left: 0; top: 0; color: var(--secondary); font-weight: bold; }
.link-btn { display: inline-block; padding: 8px 15px; background: #f0f2f5; color: var(--dark); text-decoration: none; border-radius: 5px; font-size: 0.9rem; margin: 5px 5px 5px 0; transition: 0.3s; }
.link-btn:hover { background: var(--primary); color: white; }

/* --- Forms & Footer --- */
.form-box { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); width: 100%; }
input, textarea, select { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; }
footer { background: var(--dark); color: var(--white); text-align: center; padding: 30px; margin-top: auto; font-size: 0.9rem; }

/* --- Lightbox Modal Styles --- */
/* --------------------------- */
/* LIGHTBOX MAIN MODAL STYLES  */
/* --------------------------- */

.lightbox-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-modal:target {
    opacity: 1;
    pointer-events: auto;
}

/* --------------------------- */
/* MODAL CONTENT WRAPPER       */
/* --------------------------- */

.modal-content-wrap {
    max-width: 95vw;
    max-height: 95vh;
    background: #fff;
    padding: 0;
    border-radius: 5px;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* required for arrows */
}

/* --------------------------- */
/* IMAGE INSIDE MODAL          */
/* --------------------------- */

.modal-content-wrap img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* --------------------------- */
/* CLOSE BUTTON (X)            */
/* --------------------------- */

.modal-close-btn {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50%;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10000;
}

/* --------------------------- */
/* LEFT/RIGHT ARROWS           */
/* --------------------------- */
.modal-prev, 
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2.3rem;
    font-weight: bold;
    text-decoration: none;
    background: rgba(0,0,0,0.45);
    padding: 14px 18px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    z-index: 10001;
    transition: background 0.25s ease;
}

.modal-prev:hover, 
.modal-next:hover {
    background: rgba(0,0,0,0.75);
}

/* SAFE offset so arrows stay visible */
.modal-prev {
    left: -35px;
}

.modal-next {
    right: -35px;
}


/* --------------------------- */
/* Masonry container links     */
/* --------------------------- */

.masonry-container a {
    text-decoration: none;
    display: block;
}


/* ---------------------------------------------------------------------- */
/* 🚀 Vertical Timeline Styles (Dates Removed) 
/* ---------------------------------------------------------------------- */

.timeline-container {
    max-width: 1000px;
    margin: 40px auto;
    position: relative;
    padding: 0;
}

/* The vertical line in the middle */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: #e0e0e0;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

/* Adjusted padding for items, reclaiming space where the date was */
.timeline-item {
    padding: 10px 20px; 
    position: relative;
    background-color: inherit;
    width: 50%;
}

/* Content box style */
.timeline-content {
    padding: 20px 30px;
    background-color: var(--white);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.timeline-content h4 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.2;
}

.activity-tag {
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

/* Dots on the timeline */
.timeline-dot {
    width: 20px;
    height: 20px;
    position: absolute;
    border-radius: 50%;
    z-index: 1;
    border: 3px solid #fff;
}

/* Timeline Left Side (Even Activities) */
.timeline-item:nth-child(even) {
    left: 0;
    padding-right: 40px; 
}

/* Left Item Dot Position */
.timeline-item:nth-child(even) .timeline-dot {
    right: -10px;
    top: 30px;
}

/* Left Item Arrow (CSS Triangle) */
.timeline-item:nth-child(even) .timeline-content::after {
    content: " ";
    position: absolute;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-left-color: var(--white);
    right: -14px;
    top: 30px;
}

/* Timeline Right Side (Odd Activities) */
.timeline-item:nth-child(odd) {
    left: 50%;
    padding-left: 40px; 
}

/* Right Item Dot Position */
.timeline-item:nth-child(odd) .timeline-dot {
    left: -10px;
    top: 30px;
}

/* Right Item Arrow (CSS Triangle) */
.timeline-item:nth-child(odd) .timeline-content::after {
    content: " ";
    position: absolute;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-right-color: var(--white);
    left: -14px;
    top: 30px;
}

/* Responsive for Mobile */
@media (max-width: 700px) {
    .timeline-container::after {
        left: 31px; 
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px; 
        padding-right: 20px; 
    }

    .timeline-item:nth-child(even) { 
        padding-right: 20px; 
    }

    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { 
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot {
        left: 21px; 
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-content::after, .timeline-item:nth-child(odd) .timeline-content::after {
        border-color: transparent transparent transparent var(--white);
        left: 56px; 
        right: auto;
    }
}

/* ---------------------------------------------------------------------- */
/* 📞 Contact Page Specific Styles 
/* ---------------------------------------------------------------------- */

.grid-2-contact { 
    display: grid; 
    grid-template-columns: 1fr 1.2fr; 
    gap: 4rem;
    padding: 30px 0;
}

.info-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    line-height: 1.4;
    font-size: 1rem;
    color: var(--dark);
}
.info-group strong {
    font-weight: 600;
    color: var(--dark);
    display: block;
}
.info-group i {
    font-size: 1.2rem;
    margin-top: 2px;
}

.map-embed {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.map-embed iframe {
    display: block;
}

/* Responsive adjustment for mobile */
@media (max-width: 900px) {
    .grid-2-contact {
        grid-template-columns: 1fr; 
        gap: 3rem;
    }
}

/* ---------------------------------------------------------------------- */
/* 🎯 NEW BEST UI: Ongoing Projects Page Styles 
/* ---------------------------------------------------------------------- */

.ongoing-projects-page {
    padding-top: 50px; 
    padding-bottom: 50px;
}

.page-title {
    text-align: center;
    color: var(--primary); 
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-description {
    text-align: center;
    color: var(--text-grey);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Header (Image and Badge) */
.card-header {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.project-card:hover .project-image {
    transform: scale(1.05);
}

/* Status Badge - Reuses .status-badge styles, just positioning */
.status-badge { 
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Card Body */
.card-body {
    padding: 20px;
}
.category-tag {
    display: inline-block;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.card-body h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-top: 5px;
    margin-bottom: 15px;
    line-height: 1.2;
}
.description-text {
    color: var(--text-grey);
    line-height: 1.4;
    margin-bottom: 20px;
    white-space: pre-wrap;       /* preserve line breaks */
    display: block !important;   /* ensure normal block display */
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    max-height: none !important;
}


/* Call to Action Bar */
.cta-bar {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}
.need-text {
    font-weight: 600;
    color: #d9534f; 
    font-size: 0.95rem;
    flex-shrink: 0;
}

.btn-support {
    background: var(--accent);
    color: var(--dark);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}
.btn-support:hover {
    background: #e0a800;
}

/* No Activities Message */
.no-activities-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    background: var(--light); 
    border-radius: 10px;
    margin-top: 30px;
    color: #495057;
    border: 1px solid #ddd;
}
.no-activities-message i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

/* ---------------------------------------------------------------------- */
/* 📱 Responsive Media Queries 
/* ---------------------------------------------------------------------- */

@media (max-width: 900px) {
    .service-row, .service-row:nth-child(even) { flex-direction: column; gap: 2rem; }
    .service-img { width: 100%; height: 250px; }
    .check-list { grid-template-columns: 1fr; }
    .nav-links { display: none; } 
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .masonry-container { column-count: 1; }
    .grid-2-contact { grid-template-columns: 1fr; gap: 3rem; } /* Contact specific */
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------ */
/* MOBILE MENU FIX */
/* ------------------------ */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    z-index: 1000;
}

/* Hide hamburger on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #333;
    margin: 4px 0;
    border-radius: 5px;
}

@media (max-width: 900px) {

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 65px;
        right: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        display: none;
        padding: 20px 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 12px 0;
        font-size: 18px;
        color: #333;
    }
}