/* ============================================
   MOBILE RESPONSIVENESS FIX
   Fundación María Auxiliadora
   Load this LAST — after all other stylesheets
   ============================================ */

/* ── GLOBAL MOBILE RESETS ── */
@media (max-width: 968px) {

    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    body {
        padding-top: 70px !important;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    img, video, iframe {
        max-width: 100% !important;
    }

    /* ── KILL HEAVY ANIMATIONS ON MOBILE ── */
    .glow-orb,
    .glow-orb-1,
    .glow-orb-2,
    .glow-orb-3 {
        display: none !important;
    }

    .hero::before,
    .hero::after,
    .maria-ai-section::before,
    .maria-ai-section::after,
    .impact::before,
    .divisions::before,
    .fma-video-bg-effects,
    .fma-video-glow-left,
    .fma-video-glow-right,
    .founder-highlight::before,
    .founder-highlight::after,
    .donate::before,
    .footer::before,
    .about-hero::before,
    .about-hero::after,
    .timeline-section::before,
    .cta-section::before {
        display: none !important;
        animation: none !important;
    }

    .division-card:hover,
    .leader-card:hover,
    .donate-card:hover {
        animation: none !important;
    }

    /* ── NAVIGATION ──
       Unifies the conflicting approaches in
       styles.css (display:none at 968px) and
       enhanced (right:-100% at 768px) */

    .nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        padding: 0 !important;
    }

    .nav-container {
        padding: 0.75rem 1rem !important;
    }

    .logo-image {
        height: 38px !important;
        width: auto !important;
    }

    .logo-text {
        font-size: 0.9rem !important;
        display: inline !important;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        cursor: pointer !important;
        padding: 8px !important;
        z-index: 10002 !important;
        position: relative !important;
    }

    .nav-toggle span {
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        background: #fff !important;
        border-radius: 3px !important;
        transition: all 0.3s !important;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px) !important;
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px) !important;
    }

    /* Mobile menu — override BOTH conflicting styles */
    .nav-menu {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: linear-gradient(135deg, #002b5b 0%, #001a3a 100%) !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        padding: 5rem 2rem 2rem !important;
        z-index: 10001 !important;
        overflow-y: auto !important;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        list-style: none !important;
        width: 100% !important;
        max-width: 300px !important;
        text-align: center !important;
    }

    .nav-menu .nav-link {
        display: block !important;
        padding: 0.9rem 1rem !important;
        font-size: 1.05rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
        text-decoration: none !important;
        border-radius: 12px !important;
        transition: background 0.3s !important;
        width: 100% !important;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link:active {
        background: rgba(0, 198, 255, 0.15) !important;
    }

    .nav-menu .nav-link::after {
        display: none !important;
    }

    .nav-menu .nav-link-special {
        background: linear-gradient(135deg, rgba(0, 198, 255, 0.2), rgba(255, 215, 0, 0.2)) !important;
        border: 1px solid rgba(0, 198, 255, 0.4) !important;
    }

    .nav-menu .nav-donate {
        background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
        color: #002b5b !important;
        border-radius: 50px !important;
        margin-top: 0.5rem !important;
        font-weight: 700 !important;
    }

    /* Language selector positioning */
    .language-selector {
        position: fixed !important;
        top: 0.6rem !important;
        right: 4rem !important;
        z-index: 10003 !important;
    }

    .lang-toggle {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }

    /* ── HERO ── */
    .hero {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding: 80px 1rem 2rem !important;
    }

    .hero-content {
        padding: 0 0.5rem !important;
        transform: none !important;
    }

    .hero-title {
        font-size: clamp(1.8rem, 7vw, 3rem) !important;
        line-height: 1.2 !important;
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 3.5vw, 1.2rem) !important;
    }

    .hero-verse {
        font-size: 0.95rem !important;
    }

    .hero-icon {
        font-size: 2.5rem !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: center !important;
    }

    .hero-buttons .btn {
        width: 100% !important;
        max-width: 300px !important;
        text-align: center !important;
        padding: 0.85rem 1.5rem !important;
    }

    .hero-scroll {
        display: none !important;
    }

    /* ── SECTIONS GENERAL ── */
    section {
        padding: 3rem 0 !important;
    }

    .section-header {
        margin-bottom: 2rem !important;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }

    .section-subtitle {
        font-size: 0.95rem !important;
    }

    .section-label {
        font-size: 0.8rem !important;
        padding: 0.4rem 1rem !important;
    }

    /* ── VIDEO ── */
    .fma-video-section {
        padding: 3rem 0 !important;
    }

    /* ── MISSION ── */
    .mission-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .mission-lead {
        font-size: 1rem !important;
    }

    .mission-quote {
        font-size: 1.1rem !important;
        padding-left: 1.5rem !important;
    }

    .mission-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .stat-card {
        padding: 1.25rem !important;
    }

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

    /* ── MARIA AI ── */
    .maria-ai-container,
    .ai-layout {
        flex-direction: column !important;
        display: flex !important;
    }

    .ai-chat-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ai-features {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .ai-feature {
        padding: 1rem !important;
    }

    .ai-feature h4 {
        font-size: 0.8rem !important;
    }

    .ai-chat-messages {
        max-height: 250px !important;
    }

    .quick-prayers {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
    }

    .quick-prayer-btn {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.7rem !important;
    }

    /* ── DIVISIONS ── */
    .divisions-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .division-card {
        padding: 1.5rem !important;
    }

    .division-card:hover {
        transform: translateY(-5px) !important;
    }

    .division-icon {
        font-size: 2.5rem !important;
    }

    .division-title {
        font-size: 1.4rem !important;
    }

    /* ── IMPACT ── */
    .impact-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .impact-item {
        padding: 1rem !important;
    }

    .impact-circle {
        width: 70px !important;
        height: 70px !important;
        font-size: 1.8rem !important;
    }

    .impact-item h3 {
        font-size: 1.1rem !important;
    }

    /* ── LEADERSHIP ── */
    .founder-highlight {
        padding: 1.5rem !important;
        text-align: center !important;
    }

    .founder-info h3 {
        font-size: 1.8rem !important;
    }

    .leadership-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .leader-card {
        padding: 1.5rem !important;
    }

    .leader-card:hover {
        transform: translateY(-5px) !important;
    }

    .leader-card img,
    .founder-highlight img {
        width: 120px !important;
        height: 120px !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }

    /* ── CONTACT ── */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .contact-form-container {
        padding: 1.5rem !important;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px !important;
    }

    /* ── DONATE ── */
    .donate-options {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .donate-card {
        padding: 1.25rem !important;
    }

    .donate-card:hover {
        transform: translateY(-5px) !important;
    }

    .donate-card h3 {
        font-size: 1.5rem !important;
    }

    .donate-card .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        width: 100% !important;
    }

    #donationAmount {
        font-size: 16px !important;
    }

    /* ── FOOTER ── */
    .footer {
        padding: 2rem 0 1rem !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }

    .footer-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .fma-social-icons {
        align-items: center !important;
    }

    .footer-bottom {
        font-size: 0.8rem !important;
    }

    /* ── FAB ── */
    .maria-ai-fab {
        right: 14px !important;
        bottom: 14px !important;
        padding: 12px !important;
        z-index: 9997 !important;
    }

    .maria-ai-fab .fab-text {
        display: none !important;
    }

    /* ── ABOUT PAGE ── */
    .about-hero {
        min-height: 50vh !important;
        padding-top: 80px !important;
    }

    .story-section,
    .values-section,
    .timeline-section,
    .beliefs-section,
    .cta-section {
        padding: 3rem 0 !important;
    }

    .story-image-wrapper {
        transform: none !important;
    }

    .story-badge {
        width: 100px !important;
        height: 100px !important;
        bottom: -15px !important;
        right: -15px !important;
    }

    .timeline::before {
        left: 20px !important;
    }

    .timeline-dot {
        left: 20px !important;
    }

    .big-quote {
        font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
        padding: 1rem !important;
    }

    /* ── GALLERY PAGE ── */
    .gallery-hero {
        min-height: 40vh !important;
        padding-top: 80px !important;
    }

    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .gallery-filters {
        gap: 0.5rem !important;
    }

    .filter-btn {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.8rem !important;
    }

    .gallery-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

/* ── EXTRA SMALL (< 480px) ── */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem !important;
    }

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

    .mission-stats {
        grid-template-columns: 1fr !important;
    }

    .impact-grid {
        grid-template-columns: 1fr !important;
    }

    .donate-options {
        grid-template-columns: 1fr !important;
    }

    .ai-features {
        grid-template-columns: 1fr !important;
    }

    .logo-text {
        display: none !important;
    }

    .language-selector {
        right: 3.5rem !important;
    }

    .gallery-stats {
        grid-template-columns: 1fr !important;
    }
}

/* ── TABLET (769-1024px) ── */
@media (min-width: 769px) and (max-width: 1024px) {
    .divisions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .leadership-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}