/* --- ESTILOS PADRÃO (DESKTOP PRIMEIRO) --- */

/* telas grandes: os botões de menu mobile ficam escondidos. */
.hamburger-menu-btn,
.close-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

.mobile-menu-header {
  display: none;
}

/* --- MEDIA QUERY PARA TELAS MENORES (TABLETS E CELULARES) --- */
/* -- BREAK POINT 992px -- */

@media (max-width: 992px) {
  /* --- INÍCIO BACKGROUND MOBILE --- */

  .hero-quemsomos-wrapper {
    background-image: url(../images/background/modulosBackground.jpg);
  }

  /* Override: remova o background complexo da wrapper de módulos no mobile
     para evitar uma divisão/linha visível entre seções. Mantemos um fundo
     escuro sólido para preservar contraste e legibilidade. */
  .modulos-destaque-wrapper {
    background-image: none !important;
    background-color: #07080a; /* escuro sólido, ajustável */
    background-repeat: no-repeat;
    background-size: auto;
    background-position: center top;
  }

  /* --- INÍCIO BACKGROUND MOBILE --- */

  /* --- INICIO DA NAVBAR --- */

  .navbar .nav-logo.desktop-only {
    display: none; /* logo branca */
  }

  .navbar .nav-logo.mobile-only {
    display: block; /* logo azul claro */
  }

  .navbar {
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    background-color: transparent;
  }

  /* esconde a navegação de desktop e mostra o botão hambúrguer */
  .nav-links,
  .nav-buttons {
    display: none;
  }
  .hamburger-menu-btn {
    display: block;
  }

  /* painel do menu mobile (escondido por padrão) */
  .main-nav {
    position: fixed;
    top: 12px; /* inset a little from top so it doesn't feel boxy */
    right: -100%;
    width: 90%;
    max-width: 560px;
    height: calc(100vh - 24px); /* slightly shorter to show rounded corners */
    background-color: rgba(4, 4, 4, 0.96);
    backdrop-filter: blur(6px);
    border-radius: 14px;

    display: flex;
    flex-direction: column;

    justify-content: flex-start;
    align-items: flex-start;
    padding: 28px;

    z-index: 1000;

    transition: right 0.45s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 220ms ease;
    box-shadow: 0 30px 60px rgba(2, 8, 23, 0.6);
  }

  /* estilo para quando o menu estiver aberto */
  .main-nav.is-open {
    right: 0;
  }

  /* mostra e esteliza o novo cabeçalho do menu */
  .main-nav.is-open .mobile-menu-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
  }
  .main-nav.is-open .close-menu-btn {
    display: block;
  }

  /* mostra os links e botões dentro do menu aberto */
  .main-nav.is-open .nav-links,
  .main-nav.is-open .nav-buttons {
    display: flex;
    /* no mobile panel prefer column so controls stack vertically */
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  /* estilos específicos para os itens dentro do menu aberto. */
  .main-nav.is-open .nav-links ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .main-nav.is-open .nav-links a {
    font-size: 24px;
  }
  .main-nav.is-open .nav-buttons {
    margin-top: 40px;
  }

  /* ensure ordering inside the opened mobile panel: contact first, client-area after */
  .main-nav.is-open .nav-buttons .mobile-only {
    order: 1;
  }
  .main-nav.is-open .nav-buttons .client-area {
    order: 2;
  }

  .main-nav.is-open .default-secondary {
    display: block;
  }

  .main-nav.is-open .nav-buttons .desktop-only {
    display: none;
  }
  .main-nav.is-open .nav-buttons .mobile-only {
    display: block;
    white-space: nowrap;
  }

  /* ensure client-area menu items appear directly below the button inside the opened sidebar */
  .main-nav.is-open .client-area {
    width: 100%;
  }
  .main-nav.is-open .client-area .client-area-btn {
    width: 100%;
    text-align: left;
  }
  /* client-area menu should be hidden by default inside the mobile sidebar;
     it becomes visible only when the menu element receives the .open class */
  .main-nav.is-open .client-area .client-area-menu {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    padding: 8px 0 0 0;
    /* soften the client-area block on mobile: rounded, subtle translucent background and light shadow */
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(2, 8, 23, 0.35);
    background-color: rgba(
      255,
      255,
      255,
      0.02
    ); /* very subtle contrast against dark panel */
    display: none; /* hidden unless .open */
    pointer-events: none;
    flex-direction: column;
    gap: 0;
    overflow: hidden; /* keeps the rounded corners clean */
  }
  .main-nav.is-open .client-area .client-area-menu.open {
    display: flex;
    pointer-events: auto;
  }
  .main-nav.is-open .client-area .client-area-item {
    padding: 12px 16px;
    border-radius: 0;
    transition: background-color 160ms ease, color 160ms ease;
  }
  .main-nav.is-open .client-area .client-area-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
  }

  /* Slight divider between items without harsh borders */
  .main-nav.is-open .client-area .client-area-item + .client-area-item {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
  }

  /* --- FIM DA NAVBAR --- */

  /* --- INICIO DO HERO --- */

  .hero {
    min-height: auto;
    padding: 40px 24px;
  }

  .hero-content {
    margin-top: 40px;
  }

  .hero-hat {
    font-size: 14px;
    white-space: nowrap;
  }

  .hero-title {
    font-size: 32px;
    max-width: 100%;
  }

  .hero-description {
    font-size: 16px;
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;

    width: 100%;
    max-width: 100%;

    gap: 16px;
  }

  .illustration {
    /* reduz o espaçamento acima da ilustração no mobile */
    margin-top: 48px;
  }

  /* --- FIM DO HERO --- */

  /* --- INICIO DO QUEM SOMOS --- */

  .quemsomos {
    padding: 40px 24px;
  }

  .quemsomos-content {
    flex-direction: column;
    gap: 40px;
  }

  .quemsomos-text {
    align-items: center;
    text-align: center;
  }

  .quemsomos-title {
    text-align: center;
    font-size: 24px;
    max-width: 100%;
  }

  .quemsomos-description {
    text-align: center;
    font-size: 16px;
    max-width: 100%;
  }

  .quemsomos-image {
    width: 100%;
    max-width: 450px;
  }

  .quemsomos-image > img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .feature-pill {
    display: flex;

    padding: 6px 10px;
    font-size: 11px;
    gap: 6px;
    border-radius: 20px;
  }

  .feature-pill svg {
    width: 14px;
    height: 14px;
  }

  .pill-1 {
    top: 5%;
    left: -35px;
  }

  /* --- FIM DO QUEM SOMOS --- */

  /* --- INICIO DE MÓDULOS --- */

  .modulos {
    padding: 40px 24px;
  }

  .modulos-hat {
    display: none; /* Esconde a versão desktop em telas pequenas */
  }
  .modulos-hat.mobile-only {
    display: block; /* Mostra a versão mobile em telas pequenas */
    white-space: nowrap;
    font-size: 14px;
  }

  .modulos-title {
    font-size: 22px;
    max-width: 100%;
  }

  .modulos-header {
    margin-bottom: 24px;
  }

  .modulos-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modulo-card,
  .card-large {
    grid-column: auto;

    width: 100%;
    height: auto;

    padding: 24px;
  }

  /* --- FIM DE MÓDULOS --- */

  /* --- INICIO DE DESTAQUE 01 --- */

  .destaque {
    padding: 40px 24px;
  }

  .destaque-content {
    flex-direction: column-reverse;
    gap: 40px;
  }

  .destaque-text {
    align-items: center;
    text-align: center;
  }

  .destaque-hat {
    font-size: 16px;
    white-space: nowrap;
  }

  .destaque-title {
    text-align: center;
    font-size: 24px;
    max-width: 100%;
  }

  .destaque-description {
    text-align: center;
    font-size: 16px;
    max-width: 100%;
  }

  .destaque-image {
    width: 100%;
    max-width: 450px;
  }
  .destaque-image > img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .destaque .pill-1 {
    top: 3%;
    left: -5%;
    right: auto;
  }

  .destaque .pill-2 {
    top: 55%;
    left: auto;
    right: -5%;
  }

  .destaque .pill-3 {
    top: 85%;
    left: -5%;
    right: auto;
    bottom: auto;
  }

  /* --- FIM DE DESTAQUE 01 --- */

  /* --- INICIO DE DESTAQUE 02 --- */

  .destaque--reverse .destaque-content {
    flex-direction: column-reverse;
  }

  .destaque--reverse .pill-1 {
    top: 5%;
    left: -20px;
  }

  .destaque--reverse .pill-2 {
    top: 65%;
    right: -40px;
  }

  .destaque--reverse .pill-3 {
    top: 90%;
    left: -20px;
  }

  /* --- FIM DE DESTAQUE 02 --- */

  /* --- INICIO DE PROVA SOCIAL --- */

  .provasocial {
    padding: 40px 24px;
  }

  .provasocial-title {
    font-size: 32px;
    max-width: 100%;
  }

  .testimonials-grid {
    flex-direction: column;
    align-items: center; /* Centraliza os cards na coluna */
    gap: 24px; /* Ajusta o espaço vertical */
  }

  /* --- FIM DE PROVA SOCIAL --- */

  /* --- INICIO DO FAQ --- */

  .faq {
    padding: 40px 24px;
  }

  .faq-title {
    font-size: 24px;
    margin-bottom: 48px;
  }

  .faq-question-wrapper {
    gap: 20px; /* Adiciona o espaçamento entre a pergunta e o ícone */
  }

  .faq-question {
    font-size: 20px; /* Ajuste do tamanho da pergunta */
  }

  .faq-answer {
    font-size: 16px;
  }

  /* --- FIM DO FAQ --- */

  /* --- INICIO DO CTA --- */

  .cta {
    padding: 40px 24px;
  }

  .cta-content {
    flex-direction: column;
    gap: 48px;
  }

  .cta-text {
    align-items: center;
    /* text-align: center; */
  }

  .cta-hat {
    font-size: 14px;
    white-space: nowrap;
  }

  .cta-title {
    font-size: 24px;
    align-items: center;
    text-align: center;
  }

  .cta-description {
    font-size: 16px;
    align-items: center;
    text-align: center;
  }

  .cta-benefits {
    /* O alinhamento do .cta-text já centraliza a lista. */
    /* Apenas garantimos que o texto interno fique alinhado à esquerda. */
    text-align: left;
  }

  .cta-image {
    width: 100%;
    max-width: 450px;
  }

  .cta-image > img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  /* --- FIM DO CTA --- */

  /* --- INICIO DO FOOTER --- */

  .footer-main {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: left;
  }

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

  .footer-links,
  .footer-contact {
    align-items: flex-start;
    text-align: left;
  }
  .footer-contact {
    max-width: 280px;
  }

  .social-icons {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  /* --- FIM DO FOOTER --- */

  /* --- INÍCIO MODAL FORMULÁRIO --- */

  .modal-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-buttons .hovered-secondary {
    width: auto;
  }

  .success-message .modal-buttons {
    align-items: center;
  }

  .success-message .modal-buttons .btn {
    width: 100%;
  }

  /* Resize the large background logo SVG in the footer on mobile */
  .footer-bg-logo {
    width: 361px;
    height: 150.08px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.03;
  }

  .footer-bg-logo svg {
    width: 100%;
    height: 100%;
    display: block;
  }
}
