/* ==========================================================================
   Nabil Foundation CSS - Custom Styles & Design System
   ========================================================================== */

/* Color Tokens & CSS Variables */
:root {
    --primary: #032e61;         /* Deep Logo Navy Blue */
    --primary-light: #0e4484;
    --primary-dark: #021a37;
    --primary-rgb: 3, 46, 97;

    --accent: #2e7d32;          /* Vibrant Logo Green */
    --accent-light: #4caf50;
    --accent-dark: #1b5e20;
    --accent-rgb: 46, 125, 50;

    --secondary: #d97706;       /* Warm Amber/Gold */
    --secondary-light: #f59e0b;
    --secondary-dark: #b45309;

    --text-main: #1e293b;       /* Dark grey for readability */
    --text-muted: #64748b;     /* Lighter grey for descriptions */
    --text-light: #f8fafc;      /* Off-white */
    
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #0f172a;         /* Deep slate for footer/dark elements */
    --bg-darker: #020617;       /* Very deep slate */

    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-glow-primary: 0 8px 30px rgba(3, 46, 97, 0.15);
    --shadow-glow-accent: 0 8px 30px rgba(46, 125, 50, 0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

/* Base Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

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

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* Typography Utilities */
.text-center { text-align: center; }
.text-white { color: var(--bg-white) !important; }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(3, 46, 97, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(3, 46, 97, 0.4);
}

.btn-secondary {
    background-color: var(--accent);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
}

.btn-secondary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

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

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

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--accent);
    margin-bottom: 20px;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.badge-accent {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Top Bar Styling */
.top-bar {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info-left {
    display: flex;
    gap: 24px;
}

.top-info-left a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-info-left a:hover {
    color: var(--accent-light);
}

/* Main Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

/* Logo styling */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 54px;
    width: 54px;
    object-fit: contain;
    border-radius: var(--radius-full);
}

.brand-logo.bg-white {
    background-color: white;
    padding: 2px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.logo-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 2px;
    line-height: 1;
}

/* Nav links styling */
.desktop-nav ul {
    display: flex;
    gap: 32px;
}

.desktop-nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 8px 0;
    position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--accent);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Nav Hamburguer Icon */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 105;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background-color: var(--bg-white);
    z-index: 200;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.mobile-nav-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.drawer-close {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.mobile-nav-links ul {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.mobile-nav-links a:hover {
    color: var(--accent);
}

.drawer-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.drawer-contact {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.drawer-contact strong {
    color: var(--primary);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(135deg, #021a37 0%, #032e61 50%, #0c3e7b 100%);
    color: var(--bg-white);
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 80% 20%, rgba(46, 125, 50, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--bg-white);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-buttons .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--bg-white);
}

.hero-buttons .btn-outline:hover {
    background-color: var(--bg-white);
    color: var(--primary);
    border-color: var(--bg-white);
}

.hero-showcase {
    position: relative;
    display: flex;
    justify-content: center;
}

.showcase-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid rgba(255, 255, 255, 0.1);
    transform: rotate(2deg);
    transition: var(--transition);
}

.showcase-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.showcase-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: var(--transition);
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 60%, transparent 100%);
    color: var(--bg-white);
}

.showcase-overlay h3 {
    color: var(--bg-white);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.showcase-overlay p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Sections Common Header */
.section-title-wrapper {
    max-width: 700px;
    margin: 0 auto 60px;
}

.sub-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
}

.text-left .section-title::after {
    left: 0;
    transform: none;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Card Glow Effect */
.card-glow {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card-glow:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow-primary);
    border-color: rgba(3, 46, 97, 0.2);
}

/* About Section */
.about-section {
    background-color: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 60px;
}

.about-card {
    padding: 40px;
    border-radius: var(--radius-lg);
    background-color: var(--bg-main);
    transition: var(--transition);
}

.about-card.mission-card:hover {
    box-shadow: var(--shadow-glow-accent);
    border-color: rgba(46, 125, 50, 0.2);
}

.card-icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(3,46,97,0.1) 0%, rgba(46,125,50,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
}

.mission-card .card-icon-box {
    color: var(--accent);
}

.about-card h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.about-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Core Values styling */
.values-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.values-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.value-item {
    background: var(--bg-main);
    padding: 30px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.value-item:hover {
    background-color: var(--bg-white);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.value-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.value-item:hover .value-icon {
    background-color: var(--accent);
    color: var(--bg-white);
}

.value-item h4 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.value-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--bg-white);
}

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

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--bg-white);
    line-height: 1;
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-light);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    font-weight: 500;
}

/* Programs Section */
.programs-section {
    background-color: var(--bg-main);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.program-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(3, 46, 97, 0.15);
}

.program-img-box {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.program-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.program-card:hover .program-img {
    transform: scale(1.08);
}

.program-icon-badge {
    position: absolute;
    bottom: -24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: var(--accent);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--bg-white);
}

.program-body {
    padding: 32px;
    padding-top: 40px;
}

.program-body h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.program-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    min-height: 72px;
}

.program-link {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.program-card:hover .program-link {
    color: var(--accent);
}

/* Recent Activities / Gallery Section */
.activities-section {
    background-color: var(--bg-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(3, 46, 97, 0.85) 0%, rgba(46, 125, 50, 0.3) 100%);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 5;
    color: var(--bg-white);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-caption h4 {
    color: var(--bg-white);
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.gallery-caption p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

/* Gallery Hover states */
.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Symmetrical grid layout for gallery items */

/* CTA Banner Section */
.cta-banner {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--bg-white);
}

.cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.cta-text h2 {
    color: var(--bg-white);
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.cta-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 750px;
}

.cta-action {
    flex-shrink: 0;
}

.cta-action .btn-secondary {
    background-color: var(--bg-white);
    color: var(--accent-dark);
}

.cta-action .btn-secondary:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
}

/* Contact Section & Form */
.contact-section {
    background-color: var(--bg-main);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: start;
}

.contact-info-panel h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-info-panel p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background-color: rgba(3, 46, 97, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-text {
    display: flex;
    flex-direction: column;
}

.contact-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-text a, 
.contact-text span.badge {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.contact-text a:hover {
    color: var(--accent);
}

.contact-form-card {
    padding: 40px;
}

.contact-form-card h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(3, 46, 97, 0.1);
}

.form-feedback {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.form-feedback.success {
    display: block;
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--accent);
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.form-feedback.error {
    display: block;
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Footer Section */
.main-footer {
    background-color: var(--bg-darker);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
    font-size: 0.95rem;
}

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

.footer-brand-info p {
    margin-top: 20px;
    line-height: 1.7;
}

.footer-links-col h4,
.footer-programs-col h4 {
    color: var(--bg-white);
    font-size: 1.15rem;
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

.footer-links-col ul,
.footer-programs-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-col a,
.footer-programs-col a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links-col a:hover,
.footer-programs-col a:hover {
    color: var(--accent-light);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
    font-size: 0.85rem;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */

/* Donation Modal */
.donation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.donation-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.donation-modal {
    background-color: var(--bg-white);
    width: 100%;
    max-width: 640px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    max-height: 90vh;
    padding: 40px;
    position: relative;
    transform: scale(0.95);
    transition: var(--transition);
}

.donation-modal-overlay.open .donation-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 2.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-dark);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Donation presets grid */
.donation-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.preset-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
}

.preset-card:hover {
    border-color: var(--primary-light);
    background-color: rgba(3, 46, 97, 0.02);
}

.preset-card.active {
    border-color: var(--accent);
    background-color: rgba(46, 125, 50, 0.05);
}

.preset-amount {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.preset-card.active .preset-amount {
    color: var(--accent-dark);
}

.preset-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* Custom amount input */
.custom-amount-box {
    margin-bottom: 30px;
}

.custom-amount-box label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-prefix {
    position: absolute;
    left: 20px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.custom-amount-box input {
    width: 100%;
    padding: 14px 20px 14px 60px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.custom-amount-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Payment Panel (M-Pesa Theme) */
.payment-details-panel {
    background-color: #f3fcf3;
    border: 1px solid rgba(46, 125, 50, 0.15);
    border-radius: var(--radius-md);
    padding: 24px;
}

.mpesa-logo-placeholder {
    font-family: var(--font-heading);
    color: #4caf50;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.till-callout {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    color: var(--bg-white);
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.till-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    opacity: 0.85;
}

.till-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    display: block;
    line-height: 1.1;
    margin-top: 6px;
}

.instructions-steps h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #1b5e20;
}

.instructions-steps ol {
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instructions-steps li strong {
    font-weight: 700;
}

.select-all {
    user-select: all;
    background-color: rgba(46,125,50,0.1);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    font-size: 3rem;
    color: var(--bg-white);
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    object-fit: contain;
}

.lightbox-title {
    color: var(--bg-white);
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

/* Sticky Mobile Bottom Bar */
.mobile-bottom-donate {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 12px 24px;
    z-index: 90;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */

/* Large screens and tablets */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-showcase {
        order: -1;
    }

    .showcase-card {
        transform: none;
        max-width: 540px;
    }

    .showcase-img {
        height: 380px;
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .programs-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-item:nth-child(1),
    .gallery-item:nth-child(6) {
        grid-column: span 1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

/* Mid-range tablets and mobile landscape */
@media (max-width: 768px) {
    .section-padding {
        padding: 70px 0;
    }

    .top-bar {
        display: none; /* Hide top bar on smaller viewports */
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .values-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cta-container {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .donation-presets {
        grid-template-columns: 1fr;
    }
    
    .donation-modal {
        padding: 24px;
    }

    .mobile-bottom-donate {
        display: block;
    }

    /* Padding adjustment for sticky mobile CTA bottom bar */
    body {
        padding-bottom: 70px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 24px;
    }
}

/* ==========================================================================
   Leadership & Team Styles
   ========================================================================== */
.leadership-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.team-grid {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.team-card {
    display: flex;
    gap: 32px;
    padding: 32px;
    max-width: 750px;
    align-items: center;
    background-color: var(--bg-main);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow-primary);
    border-color: rgba(3, 46, 97, 0.2);
}

.team-avatar-box {
    flex-shrink: 0;
}

.team-avatar-placeholder {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.team-info {
    text-align: left;
}

.team-info h4 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.team-role {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 12px;
}

.team-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .team-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }
    
    .team-info {
        text-align: center;
    }
}

/* ==========================================================================
   Upcoming Events Section Styles
   ========================================================================== */
.events-section {
    background-color: var(--bg-white);
}

.event-card-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
    align-items: start;
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: visible;
    padding: 32px;
}

.event-flyer-column {
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    box-shadow: var(--shadow-md);
}

.event-flyer-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-md);
}

.event-details-column {
    padding: 20px 10px;
}

.event-details-column h3 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.event-moto {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 28px;
}

.event-meta-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.05rem;
    color: var(--text-main);
}

.meta-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.donations-needed-box {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-bottom: 32px;
}

.donations-needed-box h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.donations-needed-box ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.donations-needed-box li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.donations-needed-box li svg {
    color: var(--accent);
    flex-shrink: 0;
}

.event-cta-buttons {
    display: flex;
    gap: 16px;
}

@media (max-width: 900px) {
    .event-card-container {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 20px;
    }
    
    .event-details-column {
        padding: 10px 0;
    }
    
    .event-details-column h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .event-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .event-cta-buttons .btn {
        width: 100%;
    }
    
    .donations-needed-box ul {
        grid-template-columns: 1fr;
    }
}
