/* Responsive adjustments (mobile-first enhancements) */

/* Prevent accidental horizontal scrolling on small devices */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* estilo do ícone do menu mobile */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
    color: #f0b948; /* cor dourada igual sua identidade */
}

    /* barras do hambúrguer */
    .nav-toggle .bar {
        width: 26px;
        height: 4px;
        background: #f5c542;
        border-radius: 4px;
        transition: 0.2s ease-in-out;
    }


/* Hide the normal nav and show toggle on small screens */
@media (max-width: 768px) {
    .header-inner {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav {
        display: none;
    }

    /* ESSENCIAL: empilha as barras verticalmente */
    .nav-toggle {
        display: inline-flex;
        flex-direction: column; /* <- problema: estava faltando */
        justify-content: center;
        align-items: center;
        gap: 4px; /* espaçamento consistente */
        background: transparent;
        border: none;
    }
}


  /* When nav has .nav-open it becomes visible as a column */
  .nav.nav-open {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    background: rgba(10,10,10,0.98);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    z-index: 1200;
  }

  .nav.nav-open a {
    display: block;
    width: 100%;
    padding: 10px 12px;
  }

  /* Grid: stack server cards vertically on small screens */
  .server-grid {
    grid-template-columns: 1fr !important;
  }

  /* Make sure other common grids also stack */
  .grid, .cards-grid, .hero-embed {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }

  /* Ensure images and embeds are responsive */
  img, iframe, embed, video {
    max-width: 100%;
    height: auto;
  }

  /* Reduce paddings on very small devices */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Tablets: two-column layout */
@media (min-width: 769px) and (max-width: 1024px) {
  .server-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility: force no horizontal overflow for elements that cause it */
.x-overflow-fix {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* Correção para colunas empilhadas aparecerem corretamente no mobile */
@media (max-width: 768px) {

  /* garante que o grid vire 1 coluna */
  .server-grid,
  .three-cols,
  .features-grid,
  .cards-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: stretch !important;
  }

  /* Make each card/container full width and allow conteúdo natural */
  .server-card,
  .card,
  .col-item,
  .feature {
    display: block !important;
    width: 100% !important;
    min-height: 90px !important;        /* evita colapso extremo; ajuste se quiser */
    height: auto !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* Força conteúdo interno a usar 100% do espaço (ex.: imagens, iframes) */
  .server-card img,
  .server-card iframe,
  .server-card embed,
  .card img,
  .card iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* se houver elementos flex com direção row que encolhem, forçar coluna */
  .server-card > .row,
  .server-card .row,
  .card .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* corrige barras/dividers que estejam com height muito pequeno */
  .divider, hr {
    height: auto !important;
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
  }

  /* evita overflow horizontal de elementos com largura fixa */
  .x-overflow-fix, .no-overflow-mobile {
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-break: break-word !important;
  }
}
