/* 
 * Nenu Saitam Foundation - Main Stylesheet
 * Responsive, Modern & Trustworthy NGO / Community Platform Design
 */

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

:root {
    --ns-primary: #0d7a5f;
    --ns-primary-dark: #095c47;
    --ns-primary-light: #e6f4f0;
    --ns-secondary: #d97706;
    --ns-secondary-light: #fffbe6;
    --ns-dark: #0f172a;
    --ns-body-color: #334155;
    --ns-muted: #64748b;
    --ns-light-bg: #f8fafc;
    --ns-border: #e2e8f0;
    --ns-white: #ffffff;
    --ns-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --ns-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --ns-shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.12);
    --ns-radius: 12px;
    --ns-radius-lg: 16px;
    --ns-radius-sm: 8px;
    --ns-transition: all 0.25s ease-in-out;
    --ns-light-creame: #fff7d28a;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ns-body-color);
    background-color: var(--ns-light-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

/* Custom Buttons */
.btn-ns-primary {
    background-color: var(--ns-primary);
    color: var(--ns-white);
    border: 1px solid var(--ns-primary);
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border-radius: var(--ns-radius-sm);
    transition: var(--ns-transition);
}

.btn-ns-primary:hover, .btn-ns-primary:focus {
    background-color: var(--ns-primary-dark);
    color: var(--ns-white);
    border-color: var(--ns-primary-dark);
    box-shadow: 0 4px 12px rgba(13, 122, 95, 0.25);
}

.btn-ns-outline {
    background-color: transparent;
    color: var(--ns-primary);
    border: 1.5px solid var(--ns-primary);
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border-radius: var(--ns-radius-sm);
    transition: var(--ns-transition);
}

.btn-ns-outline:hover {
    background-color: var(--ns-primary-light);
    color: var(--ns-primary-dark);
    border-color: var(--ns-primary-dark);
}

.btn-ns-secondary {
    background-color: var(--ns-secondary);
    color: var(--ns-white);
    border: 1px solid var(--ns-secondary);
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border-radius: var(--ns-radius-sm);
    transition: var(--ns-transition);
}

.btn-ns-secondary:hover {
    background-color: #b45309;
    color: var(--ns-white);
}

/* Navbar */
.ns-navbar {
    background-color: var(--ns-white);
    box-shadow: var(--ns-shadow-sm);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ns-border);
    transition: var(--ns-transition);
}

.ns-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--ns-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ns-navbar .navbar-brand i {
    font-size: 1.6rem;
    color: var(--ns-secondary);
}

.ns-navbar .nav-link {
    font-weight: 600;
    color: var(--ns-dark);
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--ns-radius-sm);
    transition: var(--ns-transition);
}

.ns-navbar .nav-link:hover, .ns-navbar .nav-link.active {
    color: var(--ns-primary);
    background-color: var(--ns-primary-light);
}

/* Top Notification / Info Bar */
.ns-topbar {
    background-color: var(--ns-dark);
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 0.4rem 0;
}

.ns-topbar a {
    color: #cbd5e1;
}

.ns-topbar a:hover {
    color: var(--ns-white);
}

/* Hero Section */
.ns-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(13, 122, 95, 0.85) 50%, rgba(15, 23, 42, 0.92) 100%), url('../images/hero_bg.png') center/cover no-repeat;
    padding: 5rem 0 4.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ns-white);
    overflow: hidden;
}

.ns-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.ns-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--ns-white);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ns-hero-subtitle {
    font-size: 1.15rem;
    color: #e2e8f0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ns-hero .text-muted {
    color: #cbd5e1 !important;
}

.ns-hero .border-top {
    border-color: rgba(255, 255, 255, 0.18) !important;
}

/* Hero Image & Feature Grid Component */
.ns-hero-card {
    position: relative;
    border-radius: var(--ns-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

.ns-hero-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ns-hero-card:hover .ns-hero-img {
    transform: scale(1.04);
}

.ns-hero-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 70%, transparent 100%);
    color: #ffffff;
}

.ns-hero-floating-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 122, 95, 0.95);
    color: #ffffff;
    padding: 0.4rem 0.9rem;
    border-radius: 50rem;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.ns-hero-card .carousel-caption {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    left: 1rem !important;
    right: 1rem !important;
    bottom: 1rem !important;
    border-radius: var(--ns-radius) !important;
}

.ns-hero-card .carousel-control-prev,
.ns-hero-card .carousel-control-next {
    width: 36px;
    height: 36px;
    top: 40%;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0 0.5rem;
    opacity: 0.8;
}

.ns-hero-card .carousel-control-prev:hover,
.ns-hero-card .carousel-control-next:hover {
    opacity: 1;
    background: var(--ns-primary);
}

.ns-hero-subcard {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--ns-radius);
    padding: 0.85rem 1rem;
    color: var(--ns-white);
    transition: var(--ns-transition);
}

.ns-hero-subcard:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.text-slate {
    color: #cbd5e1 !important;
}

/* Section Header */
.section-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--ns-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--ns-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Custom Cards */
.ns-card {
    background: var(--ns-light-creame);
    border-radius: var(--ns-radius);
    border: 1px solid var(--ns-border);
    box-shadow: var(--ns-shadow-sm);
    transition: var(--ns-transition);
    overflow: hidden;
    height: 100%;
}

.ns-card:hover {
    box-shadow: var(--ns-shadow-md);
    transform: translateY(-3px);
}

.ns-card-body {
    padding: 1.5rem;
}

/* Service Card Icon */
.ns-service-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.icon-teal {
    background-color: var(--ns-primary-light);
    color: var(--ns-primary);
}

.icon-amber {
    background-color: var(--ns-secondary-light);
    color: var(--ns-secondary);
}

.icon-blue {
    background-color: #e0f2fe;
    color: #0284c7;
}

/* Job Cards */
.job-card {
    position: relative;
    border-left: 4px solid var(--ns-primary);
}

.job-card .company-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--ns-primary);
    font-size: 1.2rem;
}

.badge-ns {
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-ns-primary {
    background-color: var(--ns-primary-light);
    color: var(--ns-primary-dark);
}

.badge-ns-amber {
    background-color: var(--ns-secondary-light);
    color: #b45309;
}

.badge-ns-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* Process Step Cards */
.process-step {
    text-align: center;
    position: relative;
}

.process-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--ns-primary);
    color: var(--ns-white);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Chat & Support Ticket Threads */
.chat-box {
    background: #f8fafc;
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    position: relative;
}

.chat-bubble-user {
    background-color: var(--ns-primary-light);
    color: var(--ns-dark);
    margin-left: auto;
    border-bottom-right-radius: 2px;
    border: 1px solid rgba(13, 122, 95, 0.2);
}

.chat-bubble-advocate {
    background-color: var(--ns-white);
    color: var(--ns-dark);
    margin-right: auto;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--ns-border);
    box-shadow: var(--ns-shadow-sm);
}

/* Dashboard Cards */
.dash-card {
    background: var(--ns-white);
    border-radius: var(--ns-radius);
    border: 1px solid var(--ns-border);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* OTP Form styling */
.otp-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.otp-input-group input {
    width: 48px;
    height: 52px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: var(--ns-radius-sm);
}

/* Footer Styling */
.ns-footer {
    background-color: var(--ns-dark);
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 4px solid var(--ns-primary);
}

.ns-footer h5 {
    color: var(--ns-white);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.ns-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ns-footer ul li {
    margin-bottom: 0.6rem;
}

.ns-footer ul li a {
    color: #cbd5e1;
}

.ns-footer ul li a:hover {
    color: var(--ns-white);
    padding-left: 4px;
}

.ns-social-icons a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ns-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    transition: var(--ns-transition);
}

.ns-social-icons a:hover {
    background: var(--ns-primary);
    color: var(--ns-white);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding-top: 1.5rem;
    font-size: 0.9rem;
}

/* Custom Responsive Table styling */
@media (max-width: 767.98px) {
    .responsive-card-table thead {
        display: none;
    }
    .responsive-card-table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid var(--ns-border);
        border-radius: var(--ns-radius);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--ns-shadow-sm);
    }
    .responsive-card-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed var(--ns-border);
        padding: 0.5rem 0;
    }
    .responsive-card-table tbody td:last-child {
        border-bottom: none;
    }
    .responsive-card-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--ns-dark);
    }
}
/* ==========================================
   Mobile Sub-Menu Overlay & Close Button
   ========================================== */
@media (max-width: 991.98px) {
    /* Convert dropdown menu into a fixed slide-in/overlay drawer */
    .ns-navbar .dropdown-menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: 85% !important;
        max-width: 360px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        background-color: #f8fbc6 !important;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25) !important;
        z-index: 1055 !important;
        border-radius: 0 !important;
        padding: 1.25rem 1rem 2rem 1rem !important;
        overflow-y: auto !important;
        margin: 0 !important;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        display: block !important;
        visibility: hidden;
    }

    /* Active state when Bootstrap opens dropdown */
    .ns-navbar .dropdown-menu.show {
        transform: translateX(0);
        visibility: visible;
    }

    /* Header styling for Mobile Overlay Sub-Menu */
    .ns-navbar .mobile-overlay-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--ns-border);
    }

    .ns-navbar .mobile-overlay-header h6 {
        margin: 0;
        font-weight: 700;
        color: var(--ns-dark);
        font-size: 1rem;
    }

    .ns-navbar .mobile-overlay-close-btn {
        background: var(--ns-light-bg);
        border: 1px solid var(--ns-border);
        color: var(--ns-dark);
        border-radius: 50%;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1rem;
        transition: var(--ns-transition);
    }

    .ns-navbar .mobile-overlay-close-btn:hover {
        background: #fee2e2;
        color: #dc2626;
        border-color: #fca5a5;
    }

    /* Backdrop dimming effect */
    body.mobile-submenu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(2px);
        z-index: 1050;
    }
}

@media (min-width: 992px) {
    .ns-navbar .mobile-overlay-header {
        display: none !important;
    }
}