/* 
 * Sparsh NGO Stylesheet
 * Custom CSS Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- CUSTOM VARIABLES --- */
:root {
    /* Color Palette */
    --primary-color: #e75b29;
    --primary-hover: #cf4d1c;
    --primary-light: #fef0eb;
    --primary-rgb: 231, 91, 41;
    --secondary-color: #0d9488;
    --secondary-hover: #0f766e;
    --secondary-light: #f0fdfa;
    --accent-color: #f59e0b;
    --accent-light: #fef3c7;
    
    /* Neutrals */
    --dark-color: #0f172a;
    --dark-muted: #1e293b;
    --light-color: #f8fafc;
    --light-hover: #f1f5f9;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    
    /* Typography */
    --font-headings: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Outfit', sans-serif;
    
    /* Box Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-orange: 0 10px 15px -3px rgba(231, 91, 41, 0.15);
    
    /* Borders & Transitions */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Structural */
    --header-height: 80px;
}

/* --- BASE STYLES --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style-position: inside;
    margin-bottom: 1rem;
}

/* --- LAYOUT & UTILITIES --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section {
    padding: 80px 0;
}

.section-bg {
    background-color: var(--light-color);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-muted { color: var(--text-muted); }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spacer utilities */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* Grid Layouts */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Card Component */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before {
    opacity: 1;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-family: var(--font-accent);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(231, 91, 41, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* --- HEADER / NAVIGATION --- */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo img {
    height: 42px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    height: 100%;
    margin: 0;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-color);
    padding: 10px 16px;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--primary-color);
}

/* Dropdown Menu System */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    border: 1px solid var(--border-light);
    border-top: 3px solid var(--primary-color);
    padding: 10px 0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding-left: 24px;
}

/* Burger Menu for Mobile */
.burger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    padding: 5px;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark-color);
    color: #94a3b8;
    padding: 80px 0 20px 0;
    font-size: 0.95rem;
    border-top: 5px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 48px;
    margin-bottom: 20px;
}

.footer-about p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-title {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 6px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.footer-contact li i {
    color: var(--primary-color);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-links a {
    color: #94a3b8;
    margin-left: 20px;
    font-size: 0.85rem;
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 90vh;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), url('../images/social_work_hero.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
}

.hero-content {
    max-width: 750px;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(231, 91, 41, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-accent);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- SUBPAGE HEADER --- */
.subpage-header {
    padding: 120px 0 60px 0;
    background: linear-gradient(135deg, var(--dark-color), var(--dark-muted));
    color: var(--white);
    text-align: center;
    position: relative;
    border-bottom: 4px solid var(--primary-color);
}

.subpage-header h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.breadcrumb a {
    color: #94a3b8;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--primary-color);
}

/* --- STATS SECTION --- */
.stats-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 5px;
    font-family: var(--font-accent);
}

.stat-item p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 0;
}

/* --- FORM STYLING --- */
.form-container {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.form-title {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--light-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(231, 91, 41, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-checkbox input {
    margin-top: 4px;
}

/* --- MODAL DIALOGS --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.modal-title {
    margin-bottom: 10px;
}

.modal-text {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* --- PAGE SPECIFIC --- */

/* About Section list styles */
.about-list {
    list-style: none;
    margin-top: 20px;
}

.about-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-weight: 500;
}

.about-list li::before {
    content: '\f00c';
    font-family: 'FontAwesome';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Thrust Areas Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.tag {
    background-color: var(--light-color);
    border: 1px solid var(--border-light);
    color: var(--dark-muted);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Operational Areas Map Card */
.map-card {
    background: linear-gradient(135deg, var(--light-color), #eff6ff);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 40px;
    margin-top: 40px;
}

/* Contact Info list */
.contact-info-list {
    list-style: none;
}

.contact-info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-info-text h4 {
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.contact-info-text p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media screen and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media screen and (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    
    .section {
        padding: 50px 0;
    }
    
    /* Navigation Toggle */
    .burger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        align-items: stretch;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        padding: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-link {
        padding: 15px 0;
        height: auto;
        border-bottom: 1px solid var(--border-light);
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: none;
        border-left: 2px solid var(--primary-color);
        margin: 10px 0;
        border-radius: 0;
    }
    
    .nav-item.dropdown-open .dropdown-menu {
        display: block;
    }
    
    /* Stats Grid responsive */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2.4rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-btns .btn {
        width: 100%;
    }
}
