/**
 * Karpaga Jothi Charitable Trust - Premium NGO Styling System
 * Salem, Tamil Nadu
 */

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

:root {
    --primary: #d97706;         /* Warm Saffron Trust */
    --primary-dark: #b45309;
    --primary-light: #fef3c7;
    --primary-glow: rgba(217, 119, 6, 0.25);
    
    --secondary: #0f172a;       /* Deep Slate Foundation */
    --secondary-light: #1e293b;
    --secondary-card: #1e293b;
    
    --accent: #e11d48;          /* Radiant Heart Rose */
    --accent-light: #ffe4e6;
    
    --emerald: #059669;         /* Growth & Impact Green */
    --emerald-light: #d1fae5;
    
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --border-dark: #334155;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.12), 0 6px 14px -3px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 25px var(--primary-glow);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.font-serif {
    font-family: 'Merriweather', serif;
}

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

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

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

/* Utility Containers */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-py {
    padding: 80px 0;
}

.section-py-sm {
    padding: 48px 0;
}

.bg-pattern {
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 1.2px, transparent 1.2px);
    background-size: 24px 24px;
}

/* Section Header Component */
.section-title-wrap {
    margin-bottom: 50px;
}

.section-title-wrap.text-center,
.text-center .section-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.825rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 14px;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.section-title-wrap.text-center .badge-tag,
.text-center .section-title-wrap .badge-tag,
.text-center .badge-tag {
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--secondary);
    margin-bottom: 14px;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.75rem;
    }
}

.section-title-wrap.text-center .section-title,
.text-center .section-title-wrap .section-title,
.text-center .section-title {
    text-align: center;
    width: 100%;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.6;
}

.section-title-wrap.text-center .section-subtitle,
.text-center .section-title-wrap .section-subtitle,
.text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Page Banner / Hero Header standardization */
.container.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.container.text-center .badge-tag {
    margin-left: auto;
    margin-right: auto;
}

.container.text-center h1,
.container.text-center h2 {
    text-align: center;
    width: 100%;
}

.container.text-center p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.975rem;
    padding: 12px 26px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b45309, #92400e);
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff !important;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #be123c, #9f1239);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: #ffffff !important;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
}

.btn-outline:hover {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.btn-outline-white {
    background: rgba(255,255,255,0.1);
    border: 2px solid #ffffff;
    color: #ffffff !important;
    backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
    background: #ffffff;
    color: var(--secondary) !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 34px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

/* Top Information Bar */
.topbar {
    background: #090e17;
    color: #cbd5e1;
    font-size: 0.825rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 0;
}

.topbar a {
    color: #cbd5e1;
}

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

.topbar-badge {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.775rem;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

/* Main Navbar */
.navbar-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    transition: var(--transition);
}

.navbar-wrap .container {
    max-width: 1420px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo-img {
    height: 58px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.brand-logo:hover .brand-logo-img {
    transform: scale(1.04);
}

.brand-symbol {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #d97706, #e11d48);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-text h1 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.brand-text small {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 1080px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 6px 0;
    position: relative;
    white-space: nowrap;
}

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

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

.nav-links a.active {
    color: var(--primary);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    list-style: none;
    z-index: 100;
}

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

.nav-dropdown-menu a {
    display: block;
    padding: 8px 18px;
    color: var(--secondary);
    font-size: 0.885rem;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    padding: 4px;
}

@media (min-width: 1080px) {
    .mobile-menu-toggle {
        display: none;
    }
}

@media (max-width: 640px) {
    .brand-logo {
        gap: 10px;
    }
    .brand-logo-img {
        height: 44px;
    }
    .brand-text h1 {
        font-size: 0.98rem;
    }
    .brand-text small {
        font-size: 0.65rem;
    }
    .navbar {
        padding: 8px 0;
    }
}

/* Mobile Offcanvas Navigation */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 310px;
    background: #ffffff;
    z-index: 1060;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: var(--transition);
    padding: 24px;
    overflow-y: auto;
}

.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-open .mobile-nav-drawer {
    transform: translateX(0);
}

/* Hero Section */
.hero-slider-wrap {
    position: relative;
    background: var(--secondary);
    color: #ffffff;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    padding: 120px 0 100px;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.75) 60%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-desc {
    font-size: 1.15rem;
    color: #e2e8f0;
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Trust Bar / Statistics Counters */
.counter-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.counter-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.counter-box:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.counter-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.counter-number {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.counter-label {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Feature Cards & Program Grids */
.program-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(217, 119, 6, 0.4);
}

.program-img-wrap {
    position: relative;
    height: 220px;
    background: #cbd5e1;
    overflow: hidden;
}

.program-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.program-icon-badge {
    position: absolute;
    bottom: -20px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: #ffffff;
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--bg-light);
}

.program-body {
    padding: 30px 24px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.program-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.program-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Campaign Card & Progress */
.campaign-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.campaign-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.campaign-img-wrap {
    position: relative;
    height: 230px;
    background: #cbd5e1;
    overflow: hidden;
}

.campaign-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.campaign-card:hover .campaign-img {
    transform: scale(1.05);
}

.campaign-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-urgent {
    background: #e11d48;
    color: #ffffff;
}

.badge-featured {
    background: #d97706;
    color: #ffffff;
}

.campaign-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.campaign-meta-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.campaign-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.35;
}

.campaign-desc {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Progress Bar Component */
.progress-wrap {
    margin-bottom: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.progress-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d97706, #e11d48);
    border-radius: var(--radius-full);
    transition: width 1s ease-in-out;
}

.campaign-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.campaign-stat-item {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.campaign-stat-item strong {
    display: block;
    color: var(--secondary);
    font-size: 1rem;
}

/* Donation Form System */
.donation-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 36px;
}

.amount-pills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .amount-pills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.amount-pill {
    padding: 14px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--secondary);
    transition: var(--transition);
    background: #ffffff;
}

.amount-pill:hover,
.amount-pill.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.donation-type-toggle {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
}

.donation-toggle-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.donation-toggle-btn.active {
    background: #ffffff;
    color: var(--secondary);
    box-shadow: var(--shadow-sm);
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: var(--secondary);
}

.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.security-badge-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 18px;
}

/* Event & News Cards */
.event-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.event-date-strip {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

/* Testimonial Cards */
.testimonial-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
}

.quote-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.testimonial-text {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Official Documents & Transparency Badges */
.transparency-doc-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: var(--transition);
}

.transparency-doc-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.doc-icon-wrap {
    width: 50px;
    height: 50px;
    background: #fef3c7;
    color: #b45309;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Footer Section */
.footer-wrap {
    background: #090e17;
    color: #94a3b8;
    padding-top: 80px;
    font-size: 0.925rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.footer-desc {
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.7;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-bottom {
    background: #04070c;
    padding: 24px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem;
}

/* Floating WhatsApp Quick Action */
.floating-whatsapp {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: scale(1.1) translateY(-4px);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

/* Official Printable Receipt Styles */
.receipt-paper {
    background: #ffffff;
    max-width: 820px;
    margin: 40px auto;
    padding: 48px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.receipt-header-row {
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.receipt-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.04);
    pointer-events: none;
    text-transform: uppercase;
    white-space: nowrap;
}

@media print {
    body * {
        visibility: hidden;
    }
    .receipt-paper, .receipt-paper * {
        visibility: visible;
    }
    .receipt-paper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        border: none;
        box-shadow: none;
    }
    .no-print {
        display: none !important;
    }
}

/* ==========================================================================
   Comprehensive iPhone 16 & Mobile Responsive Polish System
   ========================================================================== */

/* 1. Universal Responsive Utilities & Safe Areas */
:root {
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    padding-bottom: var(--sab);
}

.brand-title-compact {
    display: none;
}

.d-mobile-only {
    display: none;
}

@media (max-width: 991px) {
    .d-none-mobile {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .d-none-desktop {
        display: none !important;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Lock background scroll when mobile drawer is open */
body.mobile-nav-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Topbar Flex System */
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    font-size: 0.825rem;
    white-space: nowrap;
}

.topbar-link:hover {
    color: var(--primary);
}

.topbar-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 2. Tablet & Mobile Layout Adaptations (<= 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .topbar {
        padding: 6px 0;
        font-size: 0.775rem;
    }

    .topbar-left {
        gap: 8px;
    }

    .topbar-badge {
        font-size: 0.72rem;
        padding: 2px 8px;
    }

    .topbar-link {
        font-size: 0.775rem;
    }

    .section-py {
        padding: 50px 0;
    }

    .section-py-sm {
        padding: 34px 0;
    }

    .section-title {
        font-size: 1.85rem !important;
        letter-spacing: -0.3px;
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 0.95rem !important;
    }

    /* Subpage headers and large inline headings on mobile */
    .page-header {
        padding: 40px 0 32px !important;
    }

    .page-header-title,
    [style*="font-size: 2.8rem"],
    [style*="font-size: 2.6rem"],
    [style*="font-size: 2.5rem"],
    [style*="font-size: 2.4rem"] {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }

    /* Hero section mobile scaling */
    .hero-slide {
        padding: 65px 0 55px !important;
    }

    .hero-title {
        font-size: 2.1rem !important;
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .hero-desc {
        font-size: 0.98rem !important;
        line-height: 1.6;
        margin-bottom: 24px !important;
    }

    .hero-btn-group {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-btn-group .btn {
        width: 100%;
        padding: 12px 18px;
    }

    /* Grids: prevent horizontal overflow */
    [style*="grid-template-columns: repeat(auto-fit, minmax(3"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(280px"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Donation form card padding on mobile */
    .donation-box {
        padding: 22px 16px !important;
    }

    /* Floating WhatsApp on mobile */
    .floating-whatsapp {
        width: 48px;
        height: 48px;
        font-size: 1.45rem;
        bottom: calc(18px + var(--sab));
        right: calc(16px + var(--sar));
    }

    /* Prevent iOS Safari 16px Auto-Zoom */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* 3. iPhone 16 & Small Smartphones (<= 640px) */
@media (max-width: 640px) {
    /* Brand title and donate button swap */
    .brand-title-full {
        display: none !important;
    }
    .brand-title-compact {
        display: inline !important;
    }
    .d-mobile-only {
        display: inline !important;
    }

    /* Navbar row layout */
    .navbar {
        padding: 8px 0;
        gap: 6px;
    }

    .brand-logo {
        gap: 8px;
        max-width: calc(100% - 130px);
    }

    .brand-logo-img {
        height: 42px;
        width: 42px;
    }

    .brand-text h1 {
        font-size: 0.95rem;
        line-height: 1.15;
        white-space: nowrap;
    }

    .brand-text small {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .nav-actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .nav-donate-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        border-radius: var(--radius-sm);
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        padding: 0;
    }

    /* Mobile Drawer with iPhone 16 Safe Areas */
    .mobile-nav-drawer {
        width: 86vw;
        max-width: 320px;
        height: 100dvh;
        padding: calc(18px + var(--sat)) 18px calc(24px + var(--sab));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Auto stack 2-col and 3-col form grids */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(3, 1fr)"],
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .section-title {
        font-size: 1.65rem !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }

    /* Donation type pills */
    .donation-type-toggle {
        flex-direction: column;
        border-radius: var(--radius-md);
        padding: 4px;
        gap: 4px;
    }

    .donation-toggle-btn {
        border-radius: var(--radius-sm);
        padding: 8px 10px;
        font-size: 0.825rem;
    }

    /* Compact impact counters on mobile */
    .counter-box {
        padding: 18px 12px;
    }

    .counter-number {
        font-size: 1.65rem;
    }

    .counter-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    /* Footer alignment */
    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ========================================================
   Transparency & Compliance Page Styles
   ======================================================== */
.transparency-doc-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.transparency-doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0.8;
    transition: var(--transition);
}

.transparency-doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(217, 119, 6, 0.3);
}

.transparency-doc-card:hover::before {
    width: 6px;
    opacity: 1;
}

.doc-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #fef3c7;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.transparency-doc-card:hover .doc-icon-wrap {
    transform: scale(1.08);
}

.transparency-metric-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-top: -35px;
    position: relative;
    z-index: 10;
}

.transparency-metric-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
}

.transparency-metric-item:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .transparency-metric-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 14px;
    }
}

.pillar-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(217, 119, 6, 0.3);
}

.pillar-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: var(--transition);
}

.pillar-card:hover .pillar-num {
    color: #fef3c7;
}

/* ========================================================
   GLOBAL MOBILE & TABLET RESPONSIVENESS OVERRIDES
   ======================================================== */
@media (max-width: 991px) {
    /* 2-column sidebar & content layouts collapse to single column */
    .content-sidebar-wrap,
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 3fr 1.8fr"],
    [style*="grid-template-columns: 1.8fr 1.2fr"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Program and Campaign Cards Tablet Grid */
    .programs-grid,
    .campaigns-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    /* Global Container Padding */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Section Spacings */
    .section-py {
        padding: 44px 0 !important;
    }

    .section-py-sm {
        padding: 30px 0 !important;
    }

    /* Page Banner Headers */
    .page-banner,
    [style*="padding: 70px 0"],
    [style*="padding: 60px 0 50px"],
    [style*="padding: 50px 0 40px"] {
        padding: 40px 0 32px !important;
    }

    /* Heading Resizing across all pages */
    h1,
    .page-header-title,
    [style*="font-size: 2.85rem"],
    [style*="font-size: 2.8rem"],
    [style*="font-size: 2.6rem"],
    [style*="font-size: 2.5rem"],
    [style*="font-size: 2.4rem"],
    [style*="font-size: 2.3rem"] {
        font-size: 1.7rem !important;
        line-height: 1.25 !important;
        letter-spacing: -0.3px !important;
    }

    h2,
    .section-title,
    [style*="font-size: 2.25rem"],
    [style*="font-size: 2.2rem"] {
        font-size: 1.45rem !important;
        line-height: 1.3 !important;
    }

    .section-subtitle,
    [style*="font-size: 1.125rem"],
    [style*="font-size: 1.1rem"] {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* Auto-collapse ANY multi-column grids down to 1 column */
    [style*="grid-template-columns: repeat(auto-fit, minmax(320px"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(300px"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(280px"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(260px"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(240px"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(220px"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Homepage Impact Numbers: 2x2 grid on mobile */
    .counter-grid,
    [style*="grid-template-columns: repeat(auto-fit, minmax(180px"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    /* Form Multi-Column Inputs collapse cleanly */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"],
    .form-row-2,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Button Groups & Action Rows */
    .btn-group,
    [style*="display: flex; gap: 14px; flex-wrap: wrap;"],
    [style*="display: flex; gap: 12px; flex-wrap: wrap;"] {
        flex-direction: column !important;
        width: 100% !important;
    }

    .btn-group .btn,
    [style*="display: flex; gap: 14px; flex-wrap: wrap;"] .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Transparency Metric Bar */
    .transparency-metric-bar {
        margin-top: 15px !important;
        padding: 16px !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .transparency-metric-item {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
    }

    .transparency-metric-item:last-child {
        border-bottom: none;
    }

    .transparency-doc-card {
        padding: 20px !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    /* Responsive Heights for Content Images */
    [style*="height: 340px"],
    [style*="height: 320px"],
    [style*="height: 260px"],
    [style*="height: 220px"] {
        height: 210px !important;
    }

    /* Responsive Tables */
    table,
    .admin-table,
    .receipt-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Embedded Video IFrames */
    iframe {
        max-width: 100% !important;
    }

    /* Donation Amount Pills on Mobile */
    .amount-btn-group,
    .amount-pill-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Modals & Dialogs */
    .modal-box {
        width: calc(100vw - 32px) !important;
        max-width: 100% !important;
        margin: 16px auto !important;
        padding: 20px 16px !important;
    }
}

@media (max-width: 480px) {
    /* Ultra-compact for small phones (320px - 480px) */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Header & Badge Sizing */
    h1,
    .page-header-title {
        font-size: 1.5rem !important;
    }

    .badge-tag {
        font-size: 0.72rem !important;
        padding: 4px 10px !important;
    }

    /* Counter boxes */
    .counter-box {
        padding: 12px 8px !important;
    }

    .counter-number {
        font-size: 1.4rem !important;
    }

    .counter-label {
        font-size: 0.75rem !important;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px !important;
        font-size: 0.88rem !important;
    }

    /* Topbar compact */
    .topbar {
        padding: 6px 0 !important;
        font-size: 0.75rem !important;
    }

    /* Brand in Top Navbar */
    .brand-logo-img {
        width: 36px !important;
        height: 36px !important;
    }

    .brand-text h1 {
        font-size: 0.88rem !important;
    }

    .brand-text small {
        font-size: 0.6rem !important;
    }

    /* Pillar cards watermark */
    .pillar-num {
        font-size: 1.75rem !important;
        top: 14px !important;
        right: 16px !important;
    }
}
