/* ===================================
   ROZEF FOUNDATION & ACADEMY - MAIN STYLESHEET
   =================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.cdnfonts.com/css/momo-trust-display');

/* CSS Variables - Only Midnight Blue and White */
:root {
    --primary-navy: #191970;
    --primary-blue: #191970;
    --accent-green: #191970;
    --text-dark: #191970;
    --text-gray: #191970;
    --bg-light: #ffffff;
    --white: #ffffff;
    --border-color: #191970;
    --heading-font: 'Momo Trust Display', 'Roboto', sans-serif;
    --body-font: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    font-weight: 400;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Header & Navigation */
header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-family: var(--heading-font);
    font-weight: 400;
    color: var(--primary-navy);
}

.logo svg {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    color: var(--primary-navy);
    stroke-width: 2.5;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo span {
    font-size: 1.25rem;
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--primary-navy);
    letter-spacing: 0.01em;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 600;
    color: var(--primary-navy);
    transition: color 0.3s;
    font-size: 0.9375rem;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

.btn-donate {
    background: var(--primary-navy) !important;
    color: var(--white) !important;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-navy);
    border-radius: 0;
}

.btn-donate:hover {
    background: var(--white) !important;
    color: var(--primary-navy) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 25, 112, 0.2);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-navy);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    background: var(--white);
    color: var(--primary-navy);
    padding: 6rem 0;
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-navy);
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 3.5rem; 
    line-height: 1.15;
    font-weight: 900;
}

h2 { 
    font-size: 2.5rem; 
    line-height: 1.2;
    font-weight: 700;
}

h3 { 
    font-size: 1.5rem;
    font-weight: 700;
}

h4 { 
    font-size: 1.125rem;
    font-weight: 700;
}

.hero h1 {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--primary-navy);
    font-weight: 400;
    line-height: 1.6;
    max-width: 750px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-cta, .btn-donate, .btn-learn-more {
    padding: 1rem 2.25rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid var(--primary-navy);
    border-radius: 0;
    letter-spacing: 0.01em;
}

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

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

.btn-secondary {
    background: var(--white);
    color: var(--primary-navy);
    border: 2px solid var(--primary-navy);
}

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


/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 0;
    border: 2px solid var(--primary-navy);
    transition: all 0.4s ease;
}

.about-card:hover {
    background: var(--primary-navy);
    color: var(--white);
}

.about-card:hover h3,
.about-card:hover p {
    color: var(--white);
}

.about-card h3 {
    font-size: 1.25rem;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.about-card .motto {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.125rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    background: var(--white);
    padding: 3rem 2rem;
}

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

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--primary-navy);
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Programs Section */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.program-card {
    background: var(--white);
    border-radius: 0;
    border: 2px solid var(--primary-navy);
    transition: all 0.4s ease;
    overflow: hidden;
}

.program-card:hover {
    background: var(--primary-navy);
    color: var(--white);
}

.program-card:hover .program-content h3,
.program-card:hover .program-content p,
.program-card:hover .program-content strong {
    color: var(--white);
}

.program-card:hover .btn-learn-more {
    background: var(--white);
    color: var(--primary-navy);
    border-color: var(--white);
}

.program-image {
    display: none;
}

.program-content {
    padding: 2rem;
}

.program-content h3 {
    font-size: 1.375rem;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.program-content p {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.program-content p:last-of-type {
    margin-bottom: 1.5rem;
}

.program-content strong {
    color: var(--primary-navy);
    transition: color 0.4s ease;
}

.btn-learn-more {
    background: var(--primary-navy);
    color: var(--white);
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid var(--primary-navy);
    border-radius: 0;
}


/* Gallery Section */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--primary-navy);
    border: 2px solid var(--primary-navy);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 700;
    font-size: 0.9375rem;
}

.filter-btn.active {
    background: var(--primary-navy);
    color: var(--white);
}

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

.gallery-grid {
    column-count: 3;
    column-gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    border: 2px solid var(--primary-navy);
    cursor: pointer;
    transition: all 0.4s ease;
    background: var(--white);
    margin-bottom: 2rem;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(25, 25, 112, 0.15);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.02);
}

/* Video specific styling */
.gallery-item video {
    background: var(--primary-navy);
}

.gallery-item.video-item {
    position: relative;
}

.gallery-item.video-item::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    background: rgba(25, 25, 112, 0.8);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.4s ease;
    padding-left: 8px;
}

.gallery-item.video-item:hover::after {
    background: rgba(25, 25, 112, 0.95);
    transform: translate(-50%, -50%) scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(25, 25, 112, 0.95);
    color: white;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transform: translateY(100%);
    transition: all 0.4s ease;
}

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

.gallery-item img,
.gallery-item video {
    position: relative;
    z-index: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 0;
    border: 2px solid var(--primary-navy);
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    background: var(--primary-navy);
    color: var(--white);
}

.testimonial-card:hover .testimonial-text,
.testimonial-card:hover .testimonial-author,
.testimonial-card:hover .testimonial-role {
    color: var(--white);
}

.testimonial-text {
    font-style: italic;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-navy);
}

.testimonial-role {
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* News & Events Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--white);
    border-radius: 0;
    border: 2px solid var(--primary-navy);
    transition: all 0.4s ease;
    overflow: hidden;
}

.news-card:hover {
    background: var(--primary-navy);
    color: var(--white);
}

.news-card:hover .news-content h3,
.news-card:hover .news-content p,
.news-card:hover .news-date {
    color: var(--white);
}

.news-card:hover .btn-learn-more {
    background: var(--white);
    color: var(--primary-navy);
    border-color: var(--white);
}

.news-image {
    display: none;
}

.news-content {
    padding: 2rem;
}

.news-date {
    color: var(--primary-navy);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
    transition: color 0.4s ease;
}

.news-content h3 {
    font-size: 1.25rem;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.news-content p {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

/* CTA Section */
.cta-section {
    background: var(--primary-navy);
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--white);
    line-height: 1.1;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    background: var(--white);
    color: var(--primary-navy);
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--white);
    border-radius: 0;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-cta:hover {
    background: var(--primary-navy);
    color: var(--white);
    transform: none;
}

/* Footer */
footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p, .footer-section a {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: var(--white);
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--white);
    color: var(--primary-navy);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 2px solid var(--white);
    border-radius: 0;
    flex: 1;
    background: var(--primary-navy);
    color: var(--white);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--primary-navy);
    border: 2px solid var(--white);
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--primary-navy);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--primary-navy);
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-navy);
    background: var(--white);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 50px;
    height: 50px;
    background: var(--primary-navy);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 998;
}

.scroll-top.active {
    display: flex;
}

.scroll-top:hover {
    background: var(--white);
    color: var(--primary-navy);
}

/* FAQ Accordion */
.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    background: var(--white);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    border: 2px solid var(--primary-navy);
    border-radius: 0;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--primary-navy);
    color: var(--white);
}

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

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-gray);
}

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

/* Responsive Design */

/* Large Tablets and Small Desktops (992px and down) */
@media (max-width: 992px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn-cta {
        width: 100%;
        text-align: center;
    }
}

/* Tablets (768px and down) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    /* Logo improvements for tablets */
    .logo {
        gap: 10px;
    }
    
    .logo img {
        width: 45px;
        height: 45px;
    }
    
    .logo span {
        font-size: 1.375rem;
        font-weight: 700;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 75px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .hero {
        padding: 3rem 0 !important;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    .hero p {
        font-size: 1.125rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1rem;
        line-height: 1.5;
    }

    .section-title {
        text-align: center !important;
        margin-bottom: 2rem !important;
    }

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

    .section-title p {
        font-size: 1rem !important;
        padding: 0 1rem;
        line-height: 1.5;
    }

    .stat-number {
        font-size: 2rem;
    }

    .programs-grid,
    .gallery-grid,
    .testimonials-grid,
    .news-grid,
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .scroll-top {
        right: 80px;
        width: 40px;
        height: 40px;
    }
    
    /* Social Media Buttons - Mobile Adjustments */
    .social-float-container {
        right: 10px !important;
        bottom: 60px !important;
    }
    
    .social-float-container a {
        width: 40px !important;
        height: 40px !important;
    }
    
    .social-float-container svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Footer Responsive */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        padding: 2rem 1rem !important;
    }
    
    .footer-section {
        text-align: center !important;
    }
    
    .footer-section h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    /* Form Elements */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem;
        width: 100%;
    }
    
    /* Button Adjustments */
    .btn-primary,
    .btn-secondary,
    .btn-cta,
    .btn-learn-more {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        width: auto !important;
        max-width: 280px !important;
        text-align: center !important;
        margin: 0 auto 0.75rem auto !important;
        display: block;
        border-radius: 0;
    }
    
    /* Card Layouts */
    .program-card,
    .about-card {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 0 !important;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center;
    }
}

/* Mobile Phones (576px and down) */
@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem !important;
    }
    
    .hero {
        padding: 2rem 0 !important;
    }
    
    .hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        padding: 0 0.5rem;
    }
    
    .hero p {
        font-size: 1rem !important;
        padding: 0 0.5rem;
        line-height: 1.5;
    }
    
    .section-title h2 {
        font-size: 1.5rem !important;
        padding: 0 0.5rem;
    }
    
    .section-title p {
        font-size: 0.9375rem !important;
        padding: 0 0.5rem;
        line-height: 1.5;
    }
    
    /* Navigation */
    .logo {
        gap: 8px;
    }
    
    .logo span {
        font-size: 1.25rem;
        font-weight: 700;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        padding: 1.5rem 0.5rem !important;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    /* Social Media - Extra Small Screens */
    .social-float-container {
        right: 5px !important;
        bottom: 40px !important;
    }
    
    .social-float-container a {
        width: 35px !important;
        height: 35px !important;
    }
    
    .social-float-container svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Cards and Program Grids */
    .program-card,
    .about-card {
        padding: 1.25rem !important;
        margin: 0 0.5rem 1rem 0.5rem;
    }
    
    .program-card h3,
    .about-card h3 {
        font-size: 1.125rem !important;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 2rem 0 !important;
    }
    
    .cta-section h2 {
        font-size: 1.5rem !important;
        padding: 0 0.5rem;
    }
    
    /* All inline grid overrides for small mobile */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 0.5rem;
    }
    
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 0.5rem;
    }
    
    div[style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 0.5rem;
    }
}

/* Extra Small Mobile (480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem !important;
    }
    
    /* Logo for very small screens */
    .logo img {
        width: 35px;
        height: 35px;
    }
    
    .logo span {
        font-size: 1.125rem;
        font-weight: 700;
    }
    
    .hero {
        padding: 1.5rem 0 !important;
    }
    
    .hero h1 {
        font-size: 1.25rem !important;
        padding: 0 0.25rem;
    }
    
    .hero p {
        font-size: 0.875rem !important;
        padding: 0 0.25rem;
    }
    
    .section-title h2 {
        font-size: 1.25rem !important;
        padding: 0 0.25rem;
    }
    
    .section-title p {
        font-size: 0.8125rem !important;
        padding: 0 0.25rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-cta,
    .btn-learn-more {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        margin: 0 auto 0.5rem auto !important;
        max-width: 220px !important;
        width: auto !important;
        display: block;
        text-align: center;
    }
    
    /* Founder Page Images */
    div[style*="width: 250px; height: 250px"],
    div[style*="width: 200px; height: 200px"],
    div[style*="width: 180px; height: 180px"] {
        width: 150px !important;
        height: 150px !important;
    }
    
    /* Impact Statistics */
    div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        padding: 0 0.25rem;
    }
    
    /* Cards extra small */
    .program-card,
    .about-card {
        padding: 1rem !important;
        margin: 0 0.25rem 0.75rem 0.25rem;
    }
    
    /* Footer extra small */
    .footer-content {
        padding: 1rem 0.25rem !important;
    }
    
    /* Social buttons extra small */
    .social-float-container {
        right: 2px !important;
        bottom: 30px !important;
    }
    
    .social-float-container a {
        width: 32px !important;
        height: 32px !important;
    }
    
    .social-float-container svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* Ultra Small Screens (360px and down) */
@media (max-width: 360px) {
    /* Logo for ultra small screens */
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    .logo span {
        font-size: 1rem;
        font-weight: 700;
    }
    
    .hero h1 {
        font-size: 1.125rem !important;
    }
    
    .section-title h2 {
        font-size: 1.125rem !important;
    }
    
    .container {
        padding: 0 0.25rem !important;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-cta,
    .btn-learn-more {
        font-size: 0.8125rem !important;
        padding: 0.625rem 0.875rem !important;
    }
}

/* Specific Page Responsive Fixes */

/* Founder Page Responsive */
@media (max-width: 768px) {
    /* Founder profile sections */
    div[style*="grid-template-columns: 1fr 2fr"],
    div[style*="grid-template-columns: 2fr 1fr"] {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    div[style*="grid-template-columns: 1fr 2fr"] > div,
    div[style*="grid-template-columns: 2fr 1fr"] > div {
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    /* Founder images */
    div[style*="width: 250px; height: 250px"] {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto 1.5rem !important;
    }
    
    /* Impact statistics grid */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* Founder page specific text alignment */
    div[style*="text-align: center"] h3,
    div[style*="text-align: center"] p {
        text-align: center !important;
    }
}

@media (max-width: 576px) {
    /* Smaller founder images on mobile */
    div[style*="width: 250px; height: 250px"],
    div[style*="width: 200px; height: 200px"] {
        width: 180px !important;
        height: 180px !important;
    }
}

/* Donation Page Responsive */
@media (max-width: 768px) {
    .donation-container {
        padding: 1.5rem !important;
        margin: 1rem;
    }
    
    .donation-container img {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto;
    }
    
    /* Donation method cards */
    div[style*="display: grid"][style*="gap: 2rem"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .donation-container {
        padding: 1rem !important;
    }
    
    .donation-container img {
        width: 180px !important;
        height: 180px !important;
    }
}

/* Gallery Page Responsive */
@media (max-width: 992px) {
    .gallery-grid {
        column-count: 2 !important;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        column-count: 1 !important;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
}

/* Join/Volunteer Page Responsive */
@media (max-width: 768px) {
    .programs-grid {
        grid-template-columns: 1fr !important;
    }
    
    .program-card {
        margin-bottom: 1.5rem;
    }
}

/* Contact Page Responsive */
@media (max-width: 768px) {
    /* Contact form grid */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* General Inline Style Overrides for Mobile */
@media (max-width: 768px) {
    /* Grid layouts with auto-fit */
    div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Flex layouts */
    div[style*="display: flex"][style*="gap: 1.5rem"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Padding adjustments */
    section[style*="padding: 6rem 0"],
    div[style*="padding: 4rem"],
    div[style*="padding: 3rem"] {
        padding: 2rem 1rem !important;
    }
    
    /* Font size adjustments */
    h1[style*="font-size: 3rem"] {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2[style*="font-size: 2.5rem"] {
        font-size: 1.75rem !important;
    }
    
    h3[style*="font-size: 3rem"] {
        font-size: 2.25rem !important;
    }
    
    /* Button adjustments */
    a[style*="padding: 1rem 2.5rem"] {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        width: auto !important;
        max-width: 280px !important;
        text-align: center !important;
        display: block !important;
        margin: 0 auto 0.75rem auto !important;
        border-radius: 0 !important;
    }
    
    /* Text size adjustments */
    p[style*="font-size: 1.25rem"] {
        font-size: 1.125rem !important;
        line-height: 1.5 !important;
    }
    
    /* Max width adjustments */
    p[style*="max-width: 900px"] {
        max-width: 100% !important;
    }
}

@media (max-width: 576px) {
    /* Extra small adjustments */
    div[style*="padding: 2rem"] {
        padding: 1.5rem 1rem !important;
    }
    
    section[style*="padding: 2rem 1rem"] {
        padding: 1.5rem 0.5rem !important;
    }
    
    h1[style*="font-size: 2rem"],
    h1[style*="font-size: 1.75rem"] {
        font-size: 1.5rem !important;
    }
    
    h2[style*="font-size: 1.875rem"],
    h2[style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
    }
    
    /* Smaller buttons on mobile */
    a[style*="padding: 0.875rem 1.5rem"] {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9375rem !important;
        max-width: 250px !important;
        margin: 0 auto 0.5rem auto !important;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Very small screens */
    h1[style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
    }
    
    h2[style*="font-size: 1.25rem"] {
        font-size: 1.125rem !important;
    }
    
    .container {
        padding: 0 0.5rem !important;
    }
    
    /* Hero section extra small */
    section[style*="padding: 6rem 0"] {
        padding: 1.5rem 0 !important;
    }
    
    /* Footer adjustments */
    .footer-content {
        padding: 1rem !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn-primary,
    .btn-secondary,
    .btn-cta,
    .btn-learn-more {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
    }
    
    .social-float-container a {
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape Phone Orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0 !important;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .social-float-container {
        bottom: 20px !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Currently maintaining light theme only */
    /* Can be expanded later if dark mode is needed */
}

/* Print Styles */
@media print {
    .social-float-container,
    .scroll-top,
    .mobile-toggle,
    header nav {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        padding: 1rem 0 !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Donation Page Styles */
.donation-container {
    max-width: 500px;
    margin: 0 auto;
}

.donation-container img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .donation-container {
        padding: 1.5rem !important;
    }
    
    .donation-container img {
        width: 200px !important;
        height: 200px !important;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .donation-container {
        padding: 1rem !important;
    }
    
    .donation-container img {
        width: 180px !important;
        height: 180px !important;
    }
}
