/* ============================================================
   PLANETT CONTT — Estilos responsivos (mobile / tablet)
   Este arquivo é carregado POR ÚLTIMO em todas as páginas,
   então ele sobrescreve o CSS que está dentro de cada HTML.
   ============================================================ */

/* ---------- Base: evita rolagem horizontal ---------- */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

/* O header é sticky: garante que as âncoras (#servicos, #contato)
   não fiquem escondidas atrás dele */
section[id] {
    scroll-margin-top: 100px;
}

/* ---------- Botão do menu hambúrguer ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    color: #213684;
    font-size: 26px;
    line-height: 1;
    padding: 8px 4px;
    cursor: pointer;
}

/* ============================================================
   TABLET E MOBILE (até 1024px) — menu vira hambúrguer
   ============================================================ */
@media (max-width: 1024px) {
    header {
        padding: 12px 20px;
    }

    header img {
        height: 50px;
    }

    .nav-toggle {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        padding: 8px 20px 20px 20px;
        border-top: 1px solid #eee;
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
    }

    header nav.open {
        display: flex;
    }

    header nav a {
        display: block;
        margin: 0;
        padding: 15px 0;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    header nav a.btn-gold {
        margin-top: 15px;
        padding: 15px 20px;
        text-align: center;
        border-bottom: 0;
        animation: none; /* sem slide lateral dentro do menu */
    }
}

/* ============================================================
   MOBILE (até 900px)
   ============================================================ */
@media (max-width: 900px) {

    /* ---------- Barra superior ---------- */
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
        font-size: 13px;
        text-align: center;
    }

    .top-bar .left {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 18px;
    }

    .top-bar .left span {
        margin-right: 0;
    }

    .top-bar .right {
        display: flex;
        justify-content: center;
        gap: 22px;
    }

    .top-bar .right a {
        margin-left: 0; /* remove o hack de -60px */
        font-size: 17px;
    }

    /* ---------- Hero ---------- */
    .hero {
        height: auto;
        min-height: 80vh;
        min-height: 80svh;
        background-position: 72% center;
        justify-content: flex-end;
        padding: 100px 20px 45px 20px;
    }

    /* Escurece a base da foto para o texto branco ficar legível */
    .hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            to top,
            rgba(12, 22, 60, 0.88) 0%,
            rgba(12, 22, 60, 0.6) 45%,
            rgba(12, 22, 60, 0) 80%
        );
    }

    .hero-content {
        z-index: 1;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero h1 br {
        display: none;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 25px;
    }

    .hero a {
        display: inline-block;
        padding: 14px 22px;
        font-size: 15px;
    }

    /* ---------- Títulos e espaçamento geral ---------- */
    section {
        margin: 40px auto;
    }

    section h2,
    .why-choose-us h2,
    .reviews-section h2,
    .our-team-section h2,
    .contact-section h2,
    .titulo {
        font-size: 26px;
    }

    .titulo h1 {
        font-size: 26px;
    }

    section p {
        font-size: 16px;
    }

    /* ---------- Diferenciais ---------- */
    .why-choose-us {
        padding: 40px 16px;
        margin: 40px 0;
    }

    .why-choose-us h2 {
        margin-bottom: 30px;
    }

    .features-grid,
    .why-choose-us .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .feature-card {
        padding: 25px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    /* ---------- Contato ---------- */
    .contact-section {
        padding: 50px 16px;
        margin: 40px 0;
    }

    .contact-section p.subtitle {
        font-size: 16px;
        margin-bottom: 35px;
    }

    .contact-container {
        flex-direction: column;
        gap: 25px;
    }

    .contact-form,
    .map-container {
        min-width: 0;
        width: 100%;
    }

    .map-container iframe {
        height: 280px;
    }

    .contact-form button {
        padding: 15px 20px;
        font-size: 16px;
    }
}

/* ---------- Números (+22 anos, +700 empresas...) ---------- */
@media (max-width: 700px) {
    .stats-container {
        flex-direction: column;
        align-items: center; /* sem isso os blocos encolhem e ficam à esquerda */
        gap: 30px;
        padding: 30px 20px;
        margin: 30px auto;
        max-width: calc(100% - 32px);
    }

    .stat-item {
        width: 100%;
        padding: 0;
    }

    .stat-number {
        font-size: 46px;
    }

    .stat-unit {
        font-size: 32px;
    }

    .stat-description {
        font-size: 16px;
    }
}

/* ---------- Abertura de empresa ---------- */
@media (max-width: 992px) {
    /* no mobile o texto branco caía em cima da parte clara do fundo.png
       e ficava ilegível — aqui usamos o azul sólido da marca */
    .open-company-section {
        background-image: none;
        background-color: #213684;
        padding: 50px 0;
    }

    .open-company-section .content-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        gap: 30px;
    }

    .open-company-section .content-container {
        max-width: 100%;
        text-align: center;
    }

    .open-company-section h1,
    .open-company-section p {
        text-align: center;
    }

    .open-company-section h1 {
        font-size: 28px;
    }

    .open-company-section p {
        font-size: 16px;
    }

    .image-container {
        justify-content: center;
    }

    .image-container img {
        max-width: 300px;
    }

    .whatsapp-btn {
        display: inline-block;
        font-size: 16px;
        padding: 15px 25px;
    }
}

/* ---------- Cards de serviços ---------- */
@media (max-width: 1100px) {
    .servicos {
        flex-wrap: wrap;
        gap: 20px;
        padding: 0 20px;
    }

    .card {
        width: calc(50% - 10px);
        max-width: 340px;
    }
}

@media (max-width: 700px) {
    .servicos {
        gap: 16px;
    }

    .card {
        width: 100%;
        max-width: 100%;
        padding: 25px 20px;
    }
}

/* ---------- Carrossel de avaliações ---------- */
@media (max-width: 600px) {
    .reviews-section {
        padding: 45px 0;
        margin: 40px 0;
    }

    .reviews-scroller {
        -webkit-mask: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
        mask: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
    }

    .review-card {
        width: 280px;
        padding: 20px;
    }

    /* a faixa e a animação precisam acompanhar a nova largura do card */
    .review-track {
        width: calc(280px * 10 + 20px * 9);
        animation-name: scrollMobile;
    }

    @keyframes scrollMobile {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(calc(-280px * 5 - 20px * 5));
        }
    }
}

/* ---------- Nosso time (sobre-nos) ---------- */
@media (max-width: 900px) {
    .our-team-section {
        padding: 50px 0;
        margin: 40px 0;
    }

    .our-team-section p.subtitle {
        font-size: 16px;
        padding: 0 20px;
        margin-bottom: 30px;
    }

    .team-members-scroller {
        -webkit-mask: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
        mask: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
    }

    .team-members-track {
        padding-left: 20px;
    }
}

/* ---------- Rodapé ---------- */
@media (max-width: 900px) {
    footer {
        padding: 35px 20px 15px 20px;
        margin-top: 0;
    }

    .footer-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-col {
        width: 100%;
        min-width: 0;
    }

    .footer-col p,
    .footer-col h3 {
        text-align: center;
    }

    .selos-container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-right: 0;
    }

    .selo-imagem {
        margin-bottom: 0;
    }

    .social-icons {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .social-icons a {
        margin-right: 0;
        padding: 6px;
    }
}
