/*--------------------------------------------------------------
# Media Queries
--------------------------------------------------------------*/
@media (max-width: 992px) {
    .contact-content {
        padding: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .header-cta {
        display: flex;
        gap: 8px;
    }
    
    .btn-volunteer,
    .btn-header-donate {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .btn-volunteer i,
    .btn-header-donate i {
        font-size: 0.9rem;
    }
    
    /* Gallery section mobile enhancements */
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-content {
        margin-top: 30px;
    }
    
    .gallery-fallback {
        margin: 0 15px;
        padding: 40px 20px;
    }
    
    /* Events section mobile fixes */
    .events-section {
        padding: 60px 0;
    }
    
    /* Additional mobile events header fixes */
    @media (max-width: 768px) {
        .events-content .ect-header-text,
        .events-content .ect-list-header,
        .events-content .tribe-events-header {
            margin-top: 100px !important;
            scroll-margin-top: 100px !important;
        }
        
        /* Ensure any event detail views also have proper spacing */
        .single-tribe_events .tribe-events-content,
        .events-archive .tribe-events-content {
            padding-top: 100px !important;
        }
    }
    
    .events-content {
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .events-content .ect-header-text,
    .events-content .ect-list-header,
    .events-content .tribe-events-header {
        margin: 0 -10px 15px !important;
        padding: 10px 15px !important;
        font-size: 1.2rem !important;
    }
    
    .events-content .ect-list-post {
        margin: 0 0 15px !important;
        padding: 15px !important;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-radius: 0 0 10px 10px;
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        display: block;
        padding: 15px 20px;
        border-radius: 0;
        background: none;
    }

    /* Mobile dropdown styles */
    .menu-item-has-children > a::after {
        float: right;
        content: '▾';
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        border-radius: 0;
        padding: 0;
        margin-left: 20px;
        border-left: 2px solid var(--primary-color);
    }

    .sub-menu a {
        padding: 10px 20px;
        font-size: 14px;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide mobile menu on non-home pages if body doesn't have home class */
    body:not(.home) .mobile-menu-toggle {
        display: none;
    }
    
    /* Alternative: Show simplified mobile menu on non-home pages */
    body:not(.home) .header-cta {
        display: flex;
    }
    
    /* For events pages, make navigation more accessible */
    body.single-tribe_events .main-navigation,
    body.tribe-events .main-navigation {
        display: block;
        position: static;
        background: transparent;
        box-shadow: none;
    }
    
    body.single-tribe_events .main-navigation ul,
    body.tribe-events .main-navigation ul {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }
    
    /* Show mobile menu toggle on events pages if needed */
    body.single-tribe_events .mobile-menu-toggle,
    body.tribe-events .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Video background mobile optimizations */
    .hero-video-background video {
        /* On mobile, prioritize performance and battery life */
        pointer-events: none;
    }
    
    .hero-section {
        height: 80vh; /* Slightly shorter on mobile */
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .contact-content {
        padding: 20px;
    }
    
    /* Footer Mobile Redesign */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-about {
        padding-right: 0;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links li {
        padding-left: 0;
    }
    
    .footer-links li::before {
        display: none;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .footer-bottom-content {
        gap: 20px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 15px;
    }

    /* Mobile social media icon improvements */
    .footer-social {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .social-link {
        width: 42px !important;
        height: 42px !important;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(16, 185, 129, 0.25) 100%) !important;
        color: #ffffff !important;
        border-radius: 12px !important;
        text-decoration: none !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
    }

    .fab-container {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .fab-item {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background-color: var(--primary-color) !important;
        color: #fff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        box-shadow: 0 4px 20px rgba(44, 82, 130, 0.3) !important;
        transition: all 0.3s ease !important;
        border: none !important;
        cursor: pointer !important;
        font-size: 16px !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 0 !important;
        position: relative !important;
        z-index: 99997 !important;
    }

    /* Keep all important FABs visible on mobile */
    .fab-container .fab-donate,
    .fab-container .fab-volunteer,
    .fab-container .fab-item[href*="whatsapp"],
    .fab-container .fab-item[href*="facebook"],
    .fab-container .fab-item[href*="instagram"],
    .fab-container #scroll-to-top {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        z-index: 99997 !important;
    }
    
    /* Mobile WP Accessibility toolbar positioning */
    #wp-accessibility-toolbar,
    .wp-accessibility-toolbar {
        bottom: 120px !important;
        left: 20px !important;
        z-index: 99999 !important;
    }
}

/* Additional mobile responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* Ensure grids don't cause overflow */
    .mvv-grid,
    .guidance-grid,
    .programs-grid,
    .involvement-options {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }
    
    /* Ensure all cards/items fit within container */
    .mvv-card,
    .guidance-item,
    .program-item,
    .involvement-card {
        width: 100%;
        max-width: 100%;
        flex: none;
    }
    
    /* Prevent text overflow */
    h1, h2, h3, h4, h5, h6, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Ensure hero content fits */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile responsive for WP Team plugin */
    .wpteam-members {
        justify-content: center !important;
        gap: 20px !important;
    }
    
    .wpteam-member {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    .wpteam-member img,
    .wpteam-member .wpteam-member-photo img,
    .wpteam-member .wpteam-member-image img {
        width: 150px !important;
        height: 150px !important;
    }
    
    /* Mobile responsive for new MVV and Guidance sections */
    .disha-onepage .mvv-grid,
    .mvv-grid {
        flex-direction: column !important;
        gap: 25px !important;
    }
    
    .guidance-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .disha-onepage .mvv-card,
    .mvv-card,
    .guidance-item {
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 35px 25px 25px !important;
    }
    
    .disha-onepage .mvv-card h3,
    .mvv-card h3,
    .guidance-item h3 {
        font-size: 1.4rem !important;
    }
    
    .disha-onepage .mvv-icon,
    .mvv-icon,
    .guidance-icon {
        font-size: 2.8rem !important;
    }
    
    .disha-onepage .values-grid,
    .values-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .disha-onepage .value-item,
    .value-item {
        padding: 20px 15px !important;
    }
    
    /* Blog page mobile styles */
    .blog-page-header {
        padding: 30px 0;
        margin-bottom: 30px;
    }

    .blog-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .blog-logo-section {
        order: -1;
    }

    .blog-home-link {
        justify-content: center;
    }

    .blog-header-title h1 {
        font-size: 2rem;
    }

    .blog-subtitle {
        font-size: 1rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-content-inner {
        padding: 20px;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /*--------------------------------------------------------------
    # Mobile fixes for Disha Connect / Supporters / Get Involved
    --------------------------------------------------------------*/

    /* Tighter section headers so they don't dominate mobile viewport */
    .blog-section .section-header,
    .supporters-section .section-header,
    .get-involved-section .section-header {
        margin-bottom: 30px;
    }

    .blog-section .section-header h2,
    .supporters-section .section-header h2,
    .get-involved-section .section-header h2 {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .blog-section .section-header p,
    .supporters-section .section-header p,
    .get-involved-section .section-header p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Disha Connect (blog) — single column, tighter card */
    .blog-section .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 0;
    }

    .blog-section .blog-card {
        max-width: 100%;
    }

    .blog-section .blog-image img {
        height: 180px;
    }

    .blog-section .blog-content-inner {
        padding: 20px;
    }

    .blog-section .blog-title {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }

    .blog-section .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 12px;
    }

    .blog-section .blog-excerpt {
        margin-bottom: 15px;
    }

    /* Supporters — keep FooGallery within viewport */
    .supporters-section .supporters-content {
        max-width: 100%;
        overflow: hidden;
    }

    .supporters-section .supporters-content img,
    .supporters-section .foogallery,
    .supporters-section .foogallery-container,
    .supporters-section .fg-image-viewer,
    .supporters-section .fg-item,
    .supporters-section .fg-image {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Get Involved — relax fixed heights/padding so cards aren't oversized */
    .get-involved-section .involvement-options {
        gap: 16px;
    }

    .get-involved-section .involvement-card {
        min-height: 0;
        padding: 28px 22px;
    }

    .get-involved-section .involvement-icon {
        font-size: 2.5rem;
        margin-bottom: 14px;
    }

    .get-involved-section .involvement-card h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .get-involved-section .involvement-card p {
        margin-bottom: 18px;
    }

    .get-involved-section .involvement-card .btn,
    .get-involved-section .involvement-card .btn-primary,
    .get-involved-section .involvement-card .btn-secondary,
    .get-involved-section .involvement-card button {
        margin-top: 8px;
        padding: 12px 18px;
        min-height: 44px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Mobile adjustments for new designs */
    .mvv-card,
    .guidance-item {
        padding: 25px 20px 20px;
        border-radius: 15px;
    }
    
    .mvv-card h3,
    .guidance-item h3 {
        font-size: 1.2rem;
    }
    
    .mvv-icon,
    .guidance-icon {
        font-size: 2.5rem;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .fab-item {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .footer-brand {
        font-size: 1.1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    /* Extra-small tightening for Disha Connect / Supporters / Get Involved */
    .blog-section .section-header h2,
    .supporters-section .section-header h2,
    .get-involved-section .section-header h2 {
        font-size: 1.6rem;
    }

    .blog-section .section-header p,
    .supporters-section .section-header p,
    .get-involved-section .section-header p {
        font-size: 0.95rem;
    }

    .blog-section .blog-content-inner {
        padding: 16px;
    }

    .blog-section .blog-image img {
        height: 160px;
    }

    .get-involved-section .involvement-card {
        padding: 24px 18px;
    }
}

