/* ================================
   WG-HEN Design System v2.0
   Modern, Empowering, Accessible
   ================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Playfair+Display:wght@600;700&display=swap');

/* CSS Variables - Design Tokens */
:root {
    /* New Color Palette */
    --bon-jour: #f3eff2;
    --vivid-violet: #7d2e8a;
    --bossanova: #4a3467;
    --trendy-pink: #9659a4;
    --lavender-purple: #ab83b2;
    --east-side: #b692c4;
    --lilac: #c492c0;
    --amethyst-smoke: #a49cb5;
    /* Semantic Colors */
    --color-primary: var(--vivid-violet);
    --color-secondary: var(--trendy-pink);
    --color-accent: var(--lavender-purple);
    --color-dark: var(--bossanova);
    --color-light-gray: var(--bon-jour);
    --color-off-white: #fff;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-smooth: all 0.3s ease-in-out;

    /* Navbar height */
    --navbar-height: 70px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-off-white);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2563eb;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-dark);
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: #555;
}

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }

/* Sections */
.section-padding {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: #f8fafc;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--color-primary) 80%, black);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: color-mix(in srgb, var(--color-secondary) 80%, black);
}

.btn-accent {
    background: #e11d48;
    color: white;
    border-color: #e11d48;
}

.btn-accent:hover {
    background: #be185d;
    border-color: #be185d;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.btn-donate {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.btn-donate:hover {
    background: #d97706;
    border-color: #d97706;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1e293b;
}

.logo-img {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e11d48;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: #e11d48;
}

.nav-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 200px;
    list-style: none;
    padding: 0.5rem 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: #f1f5f9;
    color: #e11d48;
    padding-left: 1.5rem;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: #1e293b;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8fafc;
        margin-top: 0.5rem;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: var(--navbar-height);
}
.hero-background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, rgba(37,99,235,0.5) 0%, rgba(225,29,72,0.4) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    color: #fff;
    text-align: center;
    padding: 4rem 1rem 2rem 1rem;
}
.hero-title {
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}
.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #f3f4f6;
}
.hero-buttons .btn {
    margin: 0 0.5rem 1rem 0.5rem;
}
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    z-index: 4;
}
.scroll-indicator {
    color: #fff;
    font-size: 2rem;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ================================
   ABOUT & PROGRAMS GRIDS
   ================================ */
.about-grid, .programs-grid, .stats-grid, .stories-grid {
    display: grid;
    gap: 2rem;
}
.about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}
.about-content {
    padding-right: 2rem;
}
.about-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(37,99,235,0.08);
}
.programs-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.program-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(30,41,59,0.07);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.program-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(225,29,72,0.10);
}
.program-icon {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    text-align: center;
    gap: 2rem;
}
.stat-item {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2rem 1rem;
    box-shadow: 0 2px 8px rgba(30,41,59,0.04);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e11d48;
    margin-bottom: 0.5rem;
}
.stat-label {
    color: #64748b;
    font-size: 1.1rem;
}
.stories-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.story-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 4px 16px rgba(15,113,115,0.09);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: box-shadow 0.2s, transform 0.2s;
}
.story-card:hover {
    box-shadow: 0 8px 32px rgba(15,113,115,0.13);
    transform: translateY(-4px) scale(1.01);
}
.story-card img.img-fluid {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1.2rem 1.2rem 0 0;
    box-shadow: none;
    margin-bottom: 0;
}
.story-content {
    padding: 1.5rem 1.2rem 1.2rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.story-content h3 {
    margin-bottom: 0.7rem;
    color: var(--color-primary);
}
.story-content p {
    margin-bottom: 1.2rem;
    color: var(--color-dark);
}
.story-impact {
    margin-top: 1rem;
    gap: 1rem;
}
.impact-stat.card {
    background: var(--color-light-gray);
    border-radius: 0.8rem;
    box-shadow: 0 1px 4px rgba(15,113,115,0.06);
    padding: 1rem 0.7rem;
    text-align: center;
    margin-bottom: 0;
}
.impact-stat h4.counter {
    color: var(--color-secondary);
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}
.impact-stat p {
    color: var(--color-dark);
    font-size: 0.98rem;
    margin-bottom: 0;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: #1e293b;
    color: #fff;
    padding-top: 3rem;
    margin-top: 4rem;
}
.footer-content {
    padding-bottom: 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-section h4, .footer-section h5, .footer-section h3 {
    color: #f59e0b;
    margin-bottom: 1rem;
}
.footer-logo img {
    width: 48px;
    margin-bottom: 0.5rem;
}
.footer-logo h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}
.social-links a {
    color: #fff;
    margin-right: 0.5rem;
    font-size: 1.2rem;
    transition: color 0.2s;
}
.social-links a:hover {
    color: #e11d48;
}
.newsletter-signup {
    margin-top: 1rem;
}
.newsletter-form .input-group {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0.5rem;
}
.newsletter-form input[type="email"] {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    flex: 1;
    outline: none;
}
.newsletter-form button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}
.newsletter-form button:hover {
    background: #e11d48;
}
.footer-bottom {
    background: #111827;
    padding: 1rem 0;
}
.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: #fff;
    font-size: 0.95rem;
}
.footer-links a {
    color: #f59e0b;
    margin-left: 1.5rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #e11d48;
}
.footer ul, .footer-section ul {
    list-style: none;
    padding-left: 0;
}
.footer li, .footer-section li, .footer a, .footer p, .footer-section a, .footer-section p {
    color: #fff !important;
}

/* ================================
   BACK TO TOP BUTTON
   ================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(30,41,59,0.12);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background 0.2s;
    z-index: 1200;
}
.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    background: #e11d48;
}

/* ================================
   ANIMATIONS & UTILITIES
   ================================ */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards;
}
.animate-fade-up.delay-1 { animation-delay: 0.3s; }
.animate-fade-up.delay-2 { animation-delay: 0.6s; }
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1.2s forwards;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ================================
   RESPONSIVE GRIDS
   ================================ */
@media (max-width: 1024px) {
    .about-grid, .stories-grid {
        grid-template-columns: 1fr;
    }
    .about-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
}
@media (max-width: 768px) {
    .section-padding {
        padding: 2rem 0;
    }
    .programs-grid, .stats-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    .story-card img.img-fluid {
        height: 180px;
    }
}
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .footer-bottom-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Accessibility & Animations */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* --- Stepper/Infographic --- */
.stepper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.step {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(15,113,115,0.07);
    padding: 1.5rem 1rem 1rem 1rem;
    text-align: center;
    transition: box-shadow 0.2s;
}
.step img {
    margin-bottom: 1rem;
    border: 3px solid var(--color-primary);
}
.step h4 {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* --- Membership/Volunteer Form --- */
.form-wrapper {
    margin-top: 2rem;
}
form.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(15,113,115,0.07);
    padding: 2rem 1.5rem;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-primary);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: #fafafa;
    transition: border 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border: 1.5px solid var(--color-primary);
    outline: none;
}
.form-group button {
    min-width: 160px;
}

/* --- Volunteer/Partnership Cards with Images --- */
.card img.img-fluid {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: 0.7rem;
}

/* --- Testimonials with Images --- */
.card.testimonial {
    text-align: center;
    padding: 2rem 1.2rem 1.2rem 1.2rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 2px 12px rgba(15,113,115,0.07);
    margin-bottom: 1.5rem;
}
.card.testimonial img {
    margin-bottom: 1rem;
    border: 3px solid var(--color-accent);
}
.card.testimonial blockquote {
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.testimonial-author p {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 1rem;
}

/* --- FAQ Section --- */
.faq-section {
    margin-top: 2rem;
}
.faq-item.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(15,113,115,0.07);
    padding: 1.5rem 1.2rem;
    margin-bottom: 1rem;
}
.faq-item h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* --- General Grid and Card Improvements --- */
.grid.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.grid.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}
.grid.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}
.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(15,113,115,0.07);
    padding: 1.5rem 1.2rem;
    margin-bottom: 1.5rem;
}

/* --- Responsive Tweaks --- */
@media (max-width: 900px) {
    .grid.grid-2, .grid.grid-3, .grid.grid-4 {
        grid-template-columns: 1fr;
    }
    .form-wrapper form.card {
        padding: 1.2rem 0.7rem;
    }
}

@media (max-width: 600px) {
    .stepper {
        gap: 1rem;
    }
    .card, .faq-item.card, .card.testimonial {
        padding: 1rem 0.5rem;
    }
    .form-group input, .form-group select, .form-group textarea {
        font-size: 0.95rem;
    }
    .story-card img.img-fluid {
        height: 140px;
    }
    .story-content {
        padding: 1rem 0.5rem 0.7rem 0.5rem;
    }
}
