/* =========================================
   Global Variables & Reset - LIGHT OPTIMIZATION THEME
   ========================================= */
:root {
    /* Color Palette - Luxury Nonprofit Brand Identity */
    --primary: #9A1B2E; /* Exquisite Deep Crimson Burgundy */
    --primary-light: #B22237; /* Warm Crimson Red */
    --primary-dark: #70111F; /* Rich Heritage Burgundy */
    --secondary: #FFFFFF;
    --secondary-hover: #F9F8F6; /* Warm White Hover */
    --accent: #B22237; /* Crimson Accent */
    
    --bg-color: #FAF9F6; /* Exquisite Warm Alabaster/Ivory Background */
    --bg-light: rgba(250, 249, 246, 0.65); /* Warm Glassmorphism Base */
    --bg-card: rgba(255, 255, 255, 0.85); /* Premium Opaque Glass Cards */
    --border-color: rgba(17, 24, 39, 0.06); /* Ultra-Thin Clean Borders */
    --glass-border: 1px solid rgba(255, 255, 255, 0.7);
    
    --text-main: #1C1917; /* Warm charcoal dark text (softer than cold pitch black) */
    --text-muted: #57534E; /* Warm neutral medium gray text */
    --white: #FFFFFF;
    
    /* Typography Pairing - Editorial Luxury */
    --font-heading: 'Outfit', 'Inter', sans-serif; /* Clean, expensive geometric headings */
    --font-body: 'Inter', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Effects - Organic Soft Lighting */
    --shadow-sm: 0 2px 8px rgba(28, 25, 22, 0.03);
    --shadow-md: 0 4px 20px rgba(28, 25, 22, 0.05);
    --shadow-lg: 0 12px 30px rgba(28, 25, 22, 0.06);
    --glow: 0 0 30px rgba(154, 27, 46, 0.05); /* Extremely soft Crimson glow */
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 12px; /* Softened slightly for a premium feel */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Soft Warm Editorial Aura */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(154, 27, 46, 0.035), transparent 30vw),
        radial-gradient(circle at 90% 70%, rgba(154, 27, 46, 0.035), transparent 35vw);
    background-attachment: fixed;
}

/* Fixed Background Logo Watermark */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vh;
    height: 60vh;
    background-image: url('images/FOUNDATION LOGO.PNG');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08; /* More subtle luxury watermark */
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.section-header {
    max-width: 600px;
    margin: 0 auto 50px;
}

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

.subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.bg-light {
    background-color: var(--bg-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: var(--glass-border);
    border-bottom: var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(154, 27, 46, 0.12);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(154, 27, 46, 0.18);
    background: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(154, 27, 46, 0.04);
}

.btn-outline.white {
    border-color: rgba(255,255,255,0.3);
    color: var(--white);
}

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

.btn-large {
    padding: 16px 36px;
    font-size: 1rem;
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom: 1px solid var(--border-color);
    padding: 5px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

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

.logo {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
}

.logo-highlight {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -1px;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-main);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 140px 0 100px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Light tech gradient fade */
    background: linear-gradient(135deg, rgba(250,250,250,0.95) 0%, rgba(250,250,250,0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-main);
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.hero-text-col {
    flex: 1;
    max-width: 650px;
}

.hero .badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(154, 27, 46, 0.06);
    border: 1px solid rgba(154, 27, 46, 0.15);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(to right, #111827, #4B5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 600px;
    color: var(--text-muted);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Donate Widget (SaaS Style) */
.hero-donate-widget {
    background: var(--white);
    color: var(--text-main);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-width: 420px;
    width: 100%;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-donate-widget h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.hero-donate-widget p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.donate-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.amount-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px;
    border-radius: var(--radius);
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.amount-btn:hover {
    background: #F3F4F6;
}

.amount-btn.active {
    background: rgba(154, 27, 46, 0.04);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

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

/* =========================================
   About Section
   ========================================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text-main);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    text-align: center;
    padding: 25px 15px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(154, 27, 46, 0.2);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.stat-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 0;
    margin-top: 10px;
    text-transform: uppercase;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.placeholder-img {
    width: 100%;
    background-color: var(--bg-light);
    background-size: cover;
    background-position: center;
}

.impact-img-1 {
    height: 500px;
    background-image: url('images/food_drive.png?v=24');
    filter: grayscale(10%) contrast(1.05);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--white);
    color: var(--primary);
    padding: 30px;
    border-radius: var(--radius);
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    z-index: 2;
    border: 1px solid var(--border-color);
}

.experience-badge .years {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 5px;
}

/* =========================================
   Programs Section
   ========================================= */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.program-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-10px);
    border-color: rgba(154, 27, 46, 0.15);
    box-shadow: var(--shadow-lg);
}

.program-img-wrapper {
    height: 240px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.prog-img-1 {
    height: 100%;
    background-image: url('images/winter_drive.png?v=18');
    filter: grayscale(2%);
}

.prog-img-2 {
    height: 100%;
    background-image: url('images/food_drive.png?v=24');
    filter: grayscale(2%);
}

.prog-img-3 {
    height: 100%;
    background-image: url('images/backpack_drive.png?v=18');
    filter: grayscale(2%);
}

.program-img-wrapper .placeholder-img {
    transition: transform 0.5s ease;
}

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

.program-content {
    padding: 35px 30px 30px;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.program-icon {
    position: absolute;
    top: -25px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.program-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.program-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

.program-content .btn {
    align-self: flex-start;
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern inside the CTA */
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--white);
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--white);
    color: var(--text-muted);
    padding-top: 80px;
    border-top: 1px solid var(--border-color);
}

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

.footer-brand p {
    margin-top: 20px;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--text-main);
    font-family: var(--font-heading);
}

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

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

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

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Media Queries
   ========================================= */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.3rem; }
    .hero-content { flex-direction: column; text-align: center; gap: 40px; }
    .hero-actions { justify-content: center; }
    .hero-donate-widget { max-width: 500px; text-align: left; }
    .about-container { grid-template-columns: 1fr; }
    .about-image { margin-top: 40px; }
    .experience-badge { bottom: -20px; right: 20px; }
    .programs-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* =========================================
   Regional Deep-Dive Pages
   ========================================= */
.regional-hero {
    padding: 160px 0 100px;
    position: relative;
    text-align: center;
    background: transparent !important;
}

.regional-hero .hero-overlay {
    display: none;
}

.regional-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    color: var(--text-main);
}

.regional-hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

/* Ensure regional cards display absolute-positioned icons without clipping */
.regional-card {
    overflow: visible !important;
}

/* Position icons relatively inside regional cards to guarantee full visibility and zero clipping */
.regional-card .program-icon {
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    margin-bottom: 20px !important;
}

.regional-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}

.regional-stat-item {
    background: var(--bg-card);
    padding: 40px 20px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Soft shadows, no heavy borders */
    border: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.regional-stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.regional-stat-item p {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
}

.regional-highlights-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.regional-highlights-list li {
    background: var(--bg-card);
    margin-bottom: 15px;
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.regional-highlights-list li .material-icons-outlined {
    color: var(--primary);
}

/* =========================================
   Regional Reach - State Cards
   ========================================= */
.regional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-card); /* Using glassmorphism for consistency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid transparent;
    transition: all 0.35s ease-in-out;
}

.state-card .stat-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: transform 0.35s ease-in-out;
}

.state-card .state-abbr {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 5px;
}

.state-card .state-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.state-card .state-badge {
    background: rgba(154, 27, 46, 0.08);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    transition: background 0.35s ease-in-out;
}

.state-card .state-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.state-card .btn-outline {
    width: 100%;
}

/* Hover Behavior */
.state-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.state-card:hover .stat-icon {
    transform: scale(1.1);
}

.state-card:hover .state-badge {
    background: rgba(154, 27, 46, 0.15);
}

/* Entrance Animation */
@keyframes fadeRise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.state-card {
    opacity: 0;
    animation: fadeRise 0.5s ease-out forwards;
}

.state-card:nth-child(1) { animation-delay: 0.1s; }
.state-card:nth-child(2) { animation-delay: 0.2s; }
.state-card:nth-child(3) { animation-delay: 0.3s; }
.state-card:nth-child(4) { animation-delay: 0.4s; }

/* =========================================
   Emergency Form Styles
   ========================================= */
.emergency-form input:focus,
.emergency-form textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(154, 27, 46, 0.08);
}

@media (max-width: 768px) {
    .nav-links, .navbar .btn { display: none; }
    .mobile-menu-btn { display: block; }
    .hero h1 { font-size: 1.8rem; }
    .hero-actions { flex-direction: column; }
    .programs-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .navbar { background-color: rgba(255, 255, 255, 0.98); }
}

/* =========================================
   Interactive Inquiry Modal Styles
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 25, 22, 0.55); /* Luxury deep warm overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2500; /* Ensure it stays completely on top */
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: rgba(255, 255, 255, 0.96); /* Semi-opaque white luxury glass */
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(28, 25, 22, 0.15);
    width: 100%;
    max-width: 650px;
    padding: 40px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(154, 27, 46, 0.2) transparent;
}

/* Custom premium scrollbar for modal card */
.modal-card::-webkit-scrollbar {
    width: 6px;
}
.modal-card::-webkit-scrollbar-thumb {
    background-color: rgba(154, 27, 46, 0.25);
    border-radius: 10px;
}

.modal-overlay.open .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(28, 25, 22, 0.03);
}

.modal-close:hover {
    color: var(--primary);
    background-color: rgba(154, 27, 46, 0.08);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 25px;
}

.modal-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    background: rgba(154, 27, 46, 0.06);
    padding: 6px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    border: 1px solid rgba(154, 27, 46, 0.08);
}

.modal-header h3 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-card .form-group {
    display: flex;
    flex-direction: column;
}

.modal-card .form-group.full-width {
    grid-column: span 2;
}

.modal-card label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.modal-card input,
.modal-card textarea {
    padding: 12px 16px;
    border: 1px solid rgba(28, 25, 22, 0.12);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: var(--white);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.modal-card input:focus,
.modal-card textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(154, 27, 46, 0.08);
}

.modal-card textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    margin-top: 25px;
}

.modal-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Success Screen Styles */
#modal-success-container {
    text-align: center;
    padding: 30px 10px;
    animation: modalFadeIn 0.4s ease-out forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.success-icon-wrap {
    color: #10B981; /* Premium green success icon */
    margin-bottom: 20px;
}

.success-icon-wrap span {
    font-size: 4.5rem !important;
}

#modal-success-container h3 {
    font-size: 2rem;
    margin-bottom: 12px;
}

#modal-success-container p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 450px;
    margin: 0 auto 25px;
}

.hidden {
    display: none !important;
}

/* Prevent body scrolling when modal is active */
body.modal-open {
    overflow: hidden !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-card {
        padding: 30px 20px;
    }
    .modal-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .modal-card .form-group.full-width {
        grid-column: span 1;
    }
    .modal-header h3 {
        font-size: 1.75rem;
    }
}



/* =========================================
   Program Application Form Styles (apply.html)
   ========================================= */
.charity-form-section {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.glass-form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px;
    margin-top: 30px;
}

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

.form-span-2 {
    grid-column: span 2;
}

.charity-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0; /* managed by grid gap */
}

.charity-form label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.charity-form .form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--white);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.charity-form .form-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(154, 27, 46, 0.08);
}

.charity-form select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357534E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    padding: 4px 0;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(17, 24, 39, 0.15);
    accent-color: var(--primary);
    cursor: pointer;
    margin-top: 2px;
}

.checkbox-item:hover {
    color: var(--text-main);
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.form-note.error {
    color: var(--primary);
}

@media (max-width: 768px) {
    .charity-form-section {
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .glass-form-card {
        padding: 35px 20px;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-span-2 {
        grid-column: span 1;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
