/* Mobile First & Responsive Adjustments */

/* Mobile & iPhone specifics */
@media screen and (max-width: 768px) {
    /* Prevent iPhone horizontal scrolling */
    html, body {
        width: 100vw;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Mobile Sidebar Menu (Drawer) */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(2px);
        z-index: 90;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .desktop-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Hidden initially */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #111; /* Offcanvas dark background matching prototype */
        z-index: 100;
        padding: 2rem 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.05); /* Smooth slide */
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
        overflow-y: auto;
    }

    .desktop-nav.sidebar-open {
        left: 0; /* Open */
    }

    .sidebar-logo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 1.5rem;
        width: 100%;
    }
    
    .btn-icon {
        background: transparent;
        color: #fff;
    }

    /* Links in mobile sidebar */
    .desktop-nav .nav-link {
        font-size: 1rem;
        font-weight: 600;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        width: 100%;
        gap: 1rem;
        color: #d1d5db; /* Slate 300 */
        background: transparent;
        transition: background 0.3s;
    }

    .desktop-nav .nav-link.active {
        background: rgba(255, 138, 0, 0.1);
        color: var(--primary);
    }
    
    .desktop-nav .nav-link .nav-icon {
        color: #94a3b8; /* Faded icons initially */
    }
    .desktop-nav .nav-link.active .nav-icon {
        color: var(--primary);
    }

    .sidebar-btn {
        width: 100%;
        padding: 1rem;
        border-radius: 0.5rem;
        font-size: 1rem;
        font-weight: 700;
        gap: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    
    .hidden-mobile {
        display: none !important;
    }
    
    .mobile-only {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-content {
        padding: 0 0.5rem;
    }

    .logo-text { font-size: 1.125rem; }

    /* Banner responsive aspect */
    .banner-slider {
        height: auto !important;
        aspect-ratio: 16 / 9; /* Garantir que a imagem inteira apareça no celular sem cortes laterais */
        min-height: unset;
        margin-top: 60px; /* Spacer under fixed header if needed */
        border-radius: 0;
    }

    .btn-large {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }

    /* Content Grid - Collapse layout for mobile */
    .content-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .grid-left {
        gap: 1.5rem;
    }

    .grid-right {
        gap: 1.5rem;
    }

    /* Cards */
    .card {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    .verse-card {
        padding: 1.5rem;
    }

    .verse-text {
        font-size: 1.25rem;
    }

    .verse-icon-bg span {
        font-size: 4rem;
    }

    .events-grid {
        grid-template-columns: 1fr; /* Stack events vertically */
    }

    /* Audio Player */
    .audio-player {
        gap: 0.75rem;
    }
    
    .album-art {
        width: 3rem;
        height: 3rem;
    }
    
    .play-btn {
        width: 2rem;
        height: 2rem;
    }

    .quick-access-grid {
        gap: 0.5rem;
    }
    
    .quick-link {
        padding: 0.75rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr; /* Stack footer sections */
        gap: 2rem;
        text-align: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }
    
    .footer-menu {
        align-items: center;
    }
    
    .footer-bottom {
        margin-top: 2rem;
    }
}

/* Small tablets / Larger phones */
@media screen and (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* Desktop styles to refine max grid behavior */
@media screen and (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
    
    /* Reveal hover states fully for Desktop */
    .hero-section {
        min-height: 450px;
    }
}
