/* ===== TABLET STYLES (1024px) ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .about-grid {
        gap: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .slide-content h1 {
        font-size: 2.8rem;
    }
    
    .chart-container {
        height: 400px;
        padding: 30px;
    }
}

/* ===== TABLET STYLES (768px) ===== */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .cta-buttons {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .logo-main {
        font-size: 1.3rem;
    }
    
    .logo-tagline {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    
    .hero-slider {
        height: 70vh;
    }
    
    .slide-content h1 {
        font-size: 2.2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image img {
        max-height: 400px;
        object-fit: cover;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .chart-container {
        height: 350px;
        padding: 20px;
    }
    
    .stat-card {
        padding: 30px 15px;
    }
    
    .stat-card h3 {
        font-size: 1.7rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links-bottom {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ===== MOBILE STYLES (480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-tagline {
        font-size: 0.6rem;
    }
    
    .hero-slider {
        height: 60vh;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .btn-hero {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 35px;
        height: 35px;
    }
    
    .slider-prev {
        left: 15px;
    }
    
    .slider-next {
        right: 15px;
    }
    
    .about-section,
    .growth-section,
    .stats-section {
        padding: 60px 0;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-card {
        padding: 25px 15px;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: var(--radius-sm);
    }
    
    .newsletter-form input {
        margin-bottom: 10px;
    }
}

/* ===== RESPONSIVE LOGO FIXES ===== */
@media (max-width: 1024px) {
    .logo-main {
        font-size: 1.3rem;
    }
    
    .logo-tagline {
        font-size: 0.65rem;
    }
    
    .footer-logo-main {
        font-size: 1.1rem;
    }
    
    .footer-logo-tagline {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .logo-link {
        gap: 10px;
    }
    
    .logo-image img {
        height: 35px;
    }
    
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-tagline {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
    
    .footer-logo-link {
        gap: 12px;
    }
    
    .footer-logo-image img {
        height: 35px;
    }
    
    .footer-logo-main {
        font-size: 1.2rem;
    }
    
    .footer-logo-tagline {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .logo-link {
        gap: 8px;
    }
    
    .logo-image img {
        height: 30px;
    }
    
    .logo-main {
        font-size: 1rem;
    }
    
    .logo-tagline {
        font-size: 0.5rem;
        letter-spacing: 0.8px;
    }
    
    .footer-logo-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .footer-logo-image img {
        height: 30px;
    }
    
    .footer-logo-text {
        align-items: flex-start;
    }
    
    .footer-logo-main {
        font-size: 1.1rem;
    }
    
    .footer-logo-tagline {
        font-size: 0.55rem;
    }
}

/* ===== UNIVERSAL SUBPAGE GRID POLYFILL ===== */
@media (max-width: 768px) {
    /* Comprehensively collapse all custom CSS grid structures found on subpages */
    .impact-grid, 
    .donation-container, 
    .amount-options, 
    .form-grid, 
    .method-options, 
    .photo-grid, 
    .team-grid, 
    .pledge-steps, 
    .donation-types,
    .about-grid,
    .stats,
    .growth-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 20px !important;
    }

    /* Stack flex containers explicitly */
    .flex-row, .contact-flex, .horizontal-group {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .amount-option, .impact-card, .method-option, .donation-type {
        width: 100% !important;
        margin-bottom: 5px !important;
    }
    
    .donation-container {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
    
    .section-title { font-size: 1.8rem !important; }
    .page-header h1 { font-size: 2rem !important; }
}