/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Mobile Menu Button (Oculto em Desktop) */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    /* Alterado para branco (contraste com fundo escuro) */
    transition: all 0.3s ease;
}

/* ========================================
   TABLET LANDSCAPE / PORTÁTEIS PEQUENOS (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {

    /* Ajuste de tipografia base */
    html {
        font-size: 95%;
    }

    /* Navbar - Ajuste de padding */
    .navbar-container {
        padding: 0 2rem;
    }

    /* História - Ajuste de grid */
    .historia-cards {
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* Galeria - Ajuste de altura */
    .galeria-grande {
        height: 400px;
    }

    .galeria-item {
        height: 180px;
    }
}

/* ========================================
   TABLET PORTRAIT / MOBILE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {

    /* --- NAVBAR MOBILE --- */
    .mobile-menu-btn {
        display: flex;
        z-index: 101;
    }

    /* Animação do Botão Hambúrguer */
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Menu Lateral Slide-in */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        /* Mais largo para melhor toque */
        height: 100vh;
        background: #0f172a;
        /* Fundo escuro consistente com navbar/footer */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 100;
        gap: 2rem;
    }

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

    .nav-link {
        font-size: 1.2rem;
        font-weight: 600;
    }

    /* --- HERO --- */
    .hero-title {
        font-size: 2.8rem;
        line-height: 1.2;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 3rem;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        /* Botões largura total no mobile */
    }

    /* --- HISTÓRIA --- */
    /* Passa para 1 coluna */
    .historia-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .historia-texto {
        order: 1;
        /* Texto primeiro */
    }

    .historia-gallery {
        order: 2;
        /* Imagens depois */
    }

    /* Cards de História - 1 coluna */
    .historia-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* --- GALERIA --- */
    .galeria-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .galeria-grande {
        height: 350px;
    }

    .galeria-pequenas {
        grid-template-columns: 1fr 1fr;
        /* Mantém 2 colunas para as pequenas */
    }

    /* --- CONTACTO --- */
    .contato-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contato-mapa {
        height: 350px;
    }

    /* --- FOOTER --- */
    .footer-container {
        grid-template-columns: 1fr;
        /* 1 coluna */
        text-align: center;
        gap: 2.5rem;
    }

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

    .section-title {
        font-size: 2.2rem;
    }
}

/* ========================================
   MOBILE PEQUENO (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {

    /* Títulos e Espaçamentos */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Galeria - Tudo 1 coluna */
    .galeria-pequenas {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .galeria-grande {
        height: 250px;
    }

    .galeria-item {
        height: 200px;
    }

    /* Galeria Expandida - Ajustes para mobile */
    .galeria-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .galeria-expandida {
        padding: 1rem 0;
    }

    .btn-outline {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Contacto - Layout mais compacto */
    .contato-info-card {
        padding: 1.5rem;
    }

    .contato-item-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .contato-icon {
        margin-bottom: 0.5rem;
    }

    /* Ajuste Botão WhatsApp */
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 20px;
    }

    .whatsapp-btn svg {
        width: 28px;
        height: 28px;
    }

    /* Ajuste Botão Voltar ao Topo */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 25px;
        right: 25px;
        font-size: 1.2rem;
    }
}