/* Color Palette - Indian-inspired (Senior-Friendly High Contrast) */
:root {
    /* Primary Colors - Warm Indian Palette */
    --saffron: #FF9933; /* Updated to spec: bright saffron orange */
    --deep-saffron: #E67E22; /* Darker shade for contrast */
    --deep-green: #006400; /* Updated to spec: deep green */
    --green: #228B22; /* Lighter green for accents */
    --cream: #FFF8DC; /* Updated to spec: warm cream */
    --off-white: #FFFAF0; /* Floral white for backgrounds */
    
    /* Accent Colors */
    --gold: #DAA520; /* Goldenrod for highlights */
    --marigold: #FF8C00; /* Dark orange for CTAs */
    --terracotta: #CD5C5C; /* Indian red for alerts */
    
    /* Dark Theme Colors (for future dark mode) */
    --dark-bg: #1A1A1A;
    --darker-bg: #0F0F0F;
    --navy: #1E293B;
    
    /* Text Colors - High Contrast */
    --text-dark: #1A1A1A; /* Near black for light backgrounds */
    --text-light: #FFFFFF; /* White for dark backgrounds */
    --text-muted: #4A5568; /* Muted gray for secondary text */
}

/* Dark Theme */
[data-theme="dark"] {
    --off-white: #1A1A1A;
    --cream: #2D2D2D;
    --text-dark: #F5F5F5;
    --text-light: #F5F5F5;
    --text-muted: #B0B0B0;
    --deep-green: #00A86B; /* Lighter green for better contrast on dark */
    --green: #2ECC71;
}

/* High Contrast Theme */
[data-theme="high-contrast"] {
    --saffron: #FFA500;
    --deep-saffron: #FF8C00;
    --deep-green: #00FF00;
    --green: #00CC00;
    --cream: #000000;
    --off-white: #000000;
    --gold: #FFFF00;
    --text-dark: #FFFFFF;
    --text-light: #FFFFFF;
    --text-muted: #FFFFFF; /* Changed to white for better contrast */
    --dark-bg: #000000;
    --darker-bg: #000000;
}

/* High contrast theme - ensure all text is visible */
[data-theme="high-contrast"] .hero,
[data-theme="high-contrast"] header {
    background: #000000;
}

[data-theme="high-contrast"] .resource-card,
[data-theme="high-contrast"] .event-card,
[data-theme="high-contrast"] .faq-item {
    border: 3px solid #FFFF00;
}

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

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--saffron);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    z-index: 1000;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--deep-green);
    outline-offset: 2px;
}

/* Enhanced focus visible styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--saffron);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--saffron);
    outline-offset: 2px;
}

.resource-card:focus-visible,
.event-card:focus-visible {
    outline: 3px solid var(--saffron);
    outline-offset: 4px;
    transform: translateY(-4px);
}

body {
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 20px; /* Increased from 18px for better readability */
    background: var(--off-white); /* Light background for better contrast */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--deep-green) 0%, var(--green) 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--saffron);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    color: var(--cream);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 1rem; /* Reduced gap to fit better on one line */
    align-items: center;
    flex-wrap: nowrap; /* Prevent wrapping on desktop */
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 1rem; /* Slightly reduced to fit better */
    font-weight: 400;
    transition: all 0.3s;
    position: relative;
    padding: 0.75rem 0.4rem; /* Reduced horizontal padding */
    min-height: 48px; /* Minimum touch target height */
    display: inline-flex;
    align-items: center;
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--saffron);
    transition: width 0.3s ease;
}

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

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

.lang-btn {
    background: var(--saffron);
    color: var(--text-dark);
    border: 2px solid var(--deep-saffron);
    padding: 0.75rem 1.5rem; /* Increased padding for larger touch target */
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 48px; /* Minimum touch target height */
    min-width: 100px; /* Minimum touch target width */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    background: var(--deep-saffron);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.4);
}

.theme-btn {
    background: var(--cream);
    color: var(--text-dark);
    border: 2px solid var(--saffron);
    padding: 0.75rem;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--saffron);
    transform: translateY(-2px) rotate(20deg);
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.4);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--deep-green) 0%, var(--green) 100%);
    color: var(--text-light);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 153, 51, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(218, 165, 32, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.5rem; /* Increased from 1.4rem */
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7; /* Adjusted for better readability */
    font-weight: 300;
    opacity: 0.95;
}

/* Resources Section */
.resources {
    padding: 5rem 0;
    background: var(--cream);
}

.resources h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3.5rem;
    color: var(--deep-green);
    font-weight: 400;
    letter-spacing: 1px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--off-white);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    border: 2px solid var(--saffron);
    position: relative;
    overflow: hidden;
    cursor: pointer; /* Indicate interactivity */
    min-height: 280px; /* Ensure adequate touch target size */
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--saffron), var(--gold));
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(255, 153, 51, 0.3);
    border-color: var(--deep-saffron);
}

.resource-card .icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    filter: grayscale(0.2) brightness(1.1);
}

.resource-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--deep-green);
    font-weight: 400;
}

.resource-card p {
    color: var(--text-dark);
    font-size: 1.15rem; /* Increased from 1.1rem */
    line-height: 1.6;
}

/* Events Section */
.events {
    padding: 5rem 0;
    background: var(--off-white);
}

.events h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3.5rem;
    color: var(--deep-green);
    font-weight: 400;
    letter-spacing: 1px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.event-card {
    display: flex;
    gap: 2rem;
    background: var(--cream);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid var(--saffron);
    transition: all 0.3s ease;
    cursor: pointer; /* Indicate interactivity */
    min-height: 140px; /* Ensure adequate touch target size */
}

.event-card:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 16px rgba(255, 153, 51, 0.3);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--saffron), var(--deep-saffron));
    color: var(--text-dark);
    padding: 1.2rem;
    border-radius: 10px;
    min-width: 90px;
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.3);
}

.event-date .day {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
}

.event-date .month {
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 0.3rem;
}

.event-details h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--deep-green);
    font-weight: 400;
}

.event-details p {
    color: var(--text-dark);
    font-size: 1.15rem; /* Increased from 1.1rem */
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--cream);
}

.contact h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--deep-green);
    font-weight: 400;
    letter-spacing: 1px;
}

.contact-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--deep-green);
    font-size: 1.1rem;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem; /* Increased padding for easier interaction */
    background: var(--off-white);
    border: 2px solid var(--saffron);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 1rem;
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
    transition: all 0.3s;
    min-height: 48px; /* Minimum touch target height */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--deep-saffron);
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem 2rem; /* Increased padding for larger touch target */
    background: linear-gradient(135deg, var(--saffron), var(--deep-saffron));
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
    min-height: 56px; /* Larger touch target for primary action */
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 153, 51, 0.4);
    background: linear-gradient(135deg, var(--deep-saffron), var(--marigold));
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(6, 95, 70, 0.2);
    color: #10B981;
    border: 1px solid #10B981;
}

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

/* FAQ Section */
.faq {
    padding: 5rem 0;
    background: var(--off-white);
}

.faq h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3.5rem;
    color: var(--deep-green);
    font-weight: 400;
    letter-spacing: 1px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--cream);
    margin-bottom: 1.2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid var(--saffron);
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--deep-saffron);
    box-shadow: 0 6px 16px rgba(255, 153, 51, 0.2);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.8rem;
    text-align: left;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
    min-height: 60px; /* Larger touch target for FAQ buttons */
}

.faq-question:hover {
    background: rgba(255, 153, 51, 0.1);
    padding-left: 2rem;
}

.faq-icon {
    font-size: 1.8rem;
    color: var(--deep-green);
    transition: transform 0.3s;
    font-weight: 300;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.8rem 1.8rem;
    color: var(--text-dark);
    font-size: 1.15rem; /* Increased from 1.1rem */
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--deep-green);
    color: var(--cream);
    padding: 3rem 0;
    text-align: center;
    border-top: 3px solid var(--saffron);
}

footer p {
    font-size: 1.05rem;
    font-weight: 300;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap; /* Allow wrapping on mobile */
    }
    
    .nav-links a {
        padding: 0.75rem 1rem; /* Maintain touch target on mobile */
        font-size: 1.05rem;
    }
    
    .lang-btn {
        margin-top: 0.5rem;
        min-width: 120px; /* Slightly larger on mobile */
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .event-card {
        flex-direction: column;
        min-height: auto; /* Allow natural height on mobile */
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* Adequate spacing between cards */
    }
    
    .resource-card {
        min-height: 240px; /* Slightly smaller on mobile but still adequate */
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 52px; /* Slightly larger on mobile */
    }
    
    .submit-btn {
        min-height: 60px; /* Larger primary button on mobile */
        font-size: 1.3rem;
    }
    
    .faq-question {
        font-size: 1.15rem;
        padding: 1.5rem;
        min-height: 56px; /* Maintain touch target on mobile */
    }
}
