/* ================================
   Layout Topo: WhatsApp | Logo | Redes
================================ */
@media (max-width: 1024px) {
    .main-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    /* Ordem dos elementos */
    .redes-sociais {
        order: 1;
        display: flex;
        justify-content: center;
        gap: 12px;
        list-style: none;
        margin-top: 60px;
    }

    .redes-sociais a {
        text-decoration: none;
    }

    .logo-footer {
        order: 2;
    }

    .whatsapp-link {
        order: 3;
    }

    /* Ajustes finos */
    .logo img {
        width: 200px;
        height: 200px;
    }

    .whatsapp-link a {
        display: inline-block;
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {

    .top-header,
    .main-header>.whatsapp-link,
    .main-header>.logo,
    .main-header>.redes-sociais {
        display: block;
        text-align: center;
        margin-bottom: 10px;
    }

    .redes-sociais {
        justify-content: center;
        gap: 12px;
    }

    .logo img {
        height: 60px;
    }

    .whatsapp-link a {
        display: inline-block;
    }
}

/* ================================
   Nav Menu
================================ */
@media (max-width: 1024px) {
    .nav ul {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nav ul li {
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .nav ul {
        flex-direction: column;
        align-items: center;
    }

    .nav ul li {
        margin: 8px 0;
    }
}

/* ================================
   Swiper Carrossel
================================ */
@media (max-width: 1024px) {
    .swiper {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .swiper {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .swiper {
        height: 200px;
    }
}

/* Esconde o menu hamburger em telas grandes */
.hamburger-menu {
    display: none;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 16px;
}

/* Ícone do hamburger */
.hamburger-icon {
    font-size: 20px;
}

/* Menu vertical escondido */
.nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

/* =======================
   Responsividade Hamburger
======================= */
@media (max-width: 768px) {

    .nav ul {
        flex-direction: column;
        max-height: 0;
    }

    /* Mostra hamburger */
    .hamburger-menu {
        display: flex;
        justify-content: center;
        /* centraliza horizontalmente */
        align-items: center;
        /* centraliza verticalmente se precisar */
        gap: 8px;
        /* espaço entre o ícone e o texto */
        font-weight: bold;
        font-size: 16px;
        margin: 10px 0;
    }

    /* Quando o menu estiver ativo */
    .nav.active ul {
        max-height: 500px;
        /* ajusta conforme quantidade de itens */
    }

    .nav ul li {
        margin: 10px 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .esquerda {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 40px);
        max-width: 350px;
        background: bisque;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .esquerda h2 {
        font-size: 20px;
        /* menor pra não ficar gigante */
        padding: 10px 0;
    }

    .esquerda h4 {
        font-size: 14px;
    }

    .direita {
        padding: 20px;
    }

    /* FOOTER — responsivo: empilha em telas pequenas */
    @media (max-width: 768px) {
        .footer-container {
            grid-template-columns: 1fr;
            grid-template-areas:
                "logo"
                "redes"
                "topo"
                "responsavel"
                "endereco"
                "horario"
                "contatos"
                "politica"
                "dev";
            text-align: center;
        }

        /* centraliza os elementos empilhados */
        .logo-footer,
        .redes-sociais-footer,
        .footer-topo,
        .footer-responsavel,
        .footer-endereco,
        .footer-horario,
        .footer-contatos,
        .footer-politica,
        .dev-partner {
            justify-self: center;
            text-align: center;
        }

        .logo-footer img {
            width: 200px;
            height: 200px;
        }

        .footer .footer-container .footer-horario p {
            font-size: 14px;
            font-weight: bold;
            display: inline-block;
        }

        .footer .footer-container .footer-contatos .zap {
            font-size: 14px;
            font-weight: bold;
            display: inline-block;
        }

        .footer .footer-container .footer-contatos .mail {
            font-size: 16px;
            margin-top: 10px;
            font-weight: bold;
            display: inline-block;
        }

        .footer .footer-container .footer-politica {
            font-size: 14px;
            font-weight: bold;
            display: flex;
            flex-wrap: nowrap;
        }
    }

}

@media (max-width: 768px) {

    .corpo,
    .especialidades {
        padding: 20px;
        /* Menos espaçamento em telas menores */
    }

    .corpo h2,
    .especialidades h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .politica-privacidade {
        padding: 20px;
        /* Menos espaçamento em telas menores */
    }

    .politica-privacidade h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .proposito {
        padding: 20px;
        /* Menos espaçamento em telas menores */
    }

    .proposito h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .swiper-clinica {
        max-width: 100%;
        height: auto;
        aspect-ratio: unset;
        padding: 0 16px;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .swiper-clinica .swiper-wrapper {
        display: flex;
        align-items: center;
    }

    .swiper-clinica .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .swiper-clinica .swiper-slide img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .proposito .whatsapp-link a {
        margin-bottom: 40px !important;
        display: flex;
        justify-content: center;
    }

    .especialidades .whatsapp-link a {
        margin-bottom: 40px !important;
        display: flex;
        justify-content: center;
    }

}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-width: 500px;
        margin: 10% auto;
        padding: 24px;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .modal-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .modal-body p {
        font-size: 1rem;
        line-height: 1.5;
        text-align: left;
    }

    .modal-button {
        display: inline-block;
        padding: 10px 20px;
        font-size: 1rem;
        margin: 30px auto 0 auto;
        background-color: #e0e0e0;
        color: #444;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        transition: background-color 0.3s ease;
    }

    .modal-button:hover {
        background-color: #d5d5d5;
    }
}

@media (max-width: 768px) {
    .main-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 40px;
    }

    .main-header .redes-sociais {
        order: 1;
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 0 20px;
        margin-top: 60px;
    }

    .main-header .logo-footer {
        order: 2;
        margin-bottom: 10px;
    }

    .main-header .logo-footer img {
        width: 140px;
        height: auto;
    }

    .main-header .whatsapp-link {
        order: 3;
        margin-bottom: 20px;
    }

    .main-header .whatsapp-link a {
        display: inline-block;
        padding: 10px 20px;
        font-size: 16px;
        font-weight: bold;
        background-color: #4CAF50;
        color: #fff;
        border-radius: 6px;
        text-decoration: none;
    }

    .main-header .whatsapp-link a i {
        margin-left: 8px;
    }
}