/**
 * CSS Responsivo para todas as telas - Mobile até 4K
 */

/* Reset para evitar espaços em branco */
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--background, #262c35);
}

/* Garantir que todas as seções sejam visíveis */
section {
  position: relative;
  z-index: 1;
  background-color: transparent;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Container responsivo */
.container {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

/* === MOBILE FIRST (320px - 576px) === */
@media (max-width: 575.98px) {
  /* Navbar mobile */
  .navbar .container {
    width: 100% !important;
    padding: 0 10px;
  }
  
  .navbar-nav {
    gap: 0.5rem !important;
  }
  
  .nav-link {
    font-size: 0.9rem !important;
    padding: 0.5rem !important;
  }
  
  /* Hero section mobile */
  .hero {
    min-height: 100vh;
    padding: 120px 0 40px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .nome {
    font-size: 1.8rem !important;
    line-height: 1.2;
    display: block;
    margin: 10px 0;
  }
  
  .descricao {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .hero .d-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }
  
  .hero-img {
    max-width: 80% !important;
    margin-top: 20px;
  }
  
  /* Seções mobile */
  section {
    padding: 40px 0 !important;
  }
  
  .titulo {
    font-size: 1.4rem !important;
    text-align: center;
  }
  
  .titulo-binario {
    flex-direction: column !important;
    text-align: center !important;
  }
  
  .linha-binaria {
    display: none !important;
  }
  
  /* Foto mobile */
  .foto {
    width: 200px !important;
    height: 250px !important;
    margin: 0 auto 20px;
  }
  
  .texto {
    font-size: 0.9rem;
    text-align: left;
  }
  
  /* VS Code mobile */
  .vscode-container {
    flex-direction: column !important;
    min-height: 400px;
    margin: 0 -15px;
  }
  
  .vscode-title-bar span {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .activity-bar {
    width: 100% !important;
    height: 50px !important;
    flex-direction: row !important;
    justify-content: center;
    border-right: none !important;
    border-bottom: 1px solid var(--vscode-border);
  }
  
  .activity-bar-item {
    margin-bottom: 0 !important;
    margin-right: 10px;
  }
  
  .vscode-sidebar {
    width: 100% !important;
    max-height: 200px;
    overflow-y: auto;
  }
  
  .editor-content {
    padding: 15px;
    font-size: 12px;
  }
  
  .code-block {
    padding: 12px;
    font-size: 11px;
  }
  
  /* Cards mobile */
  .project-card .card-body {
    padding: 16px;
  }
  
  .project-card .card-img-top {
    height: 160px;
  }
  
  .project-card .card-title {
    font-size: 1rem;
  }
  
  .project-card .btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  /* Formulário mobile */
  .form-control {
    font-size: 16px; /* Evita zoom no iOS */
  }
  
  /* Certificados mobile */
  .iframe-certificado,
  iframe {
    height: 200px !important;
  }
}

/* === TABLET (576px - 768px) === */
@media (min-width: 576px) and (max-width: 767.98px) {
  .container {
    max-width: 540px;
  }
  
  .nome {
    font-size: 2.2rem !important;
  }
  
  .hero {
    padding: 100px 0 40px;
  }
  
  .hero-img {
    max-width: 70%;
  }
  
  .foto {
    width: 240px !important;
    height: 320px !important;
  }
  
  .vscode-container {
    margin: 0 -15px;
  }
  
  .project-card .card-img-top {
    height: 180px;
  }
}

/* === TABLET LARGE (768px - 992px) === */
@media (min-width: 768px) and (max-width: 991.98px) {
  .container {
    max-width: 720px;
  }
  
  .nome {
    font-size: 2.5rem !important;
  }
  
  .hero {
    padding: 100px 0 40px;
  }
  
  .vscode-container {
    flex-direction: row;
  }
  
  .activity-bar {
    width: 48px !important;
    height: auto !important;
    flex-direction: column !important;
  }
  
  .vscode-sidebar {
    width: 200px !important;
  }
}

/* === DESKTOP (992px - 1200px) === */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }
  
  .nome {
    font-size: 2.8rem !important;
  }
}

/* === DESKTOP LARGE (1200px - 1400px) === */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .container {
    max-width: 1140px;
  }
  
  .nome {
    font-size: 3rem !important;
  }
}

/* === DESKTOP XL (1400px - 1920px) === */
@media (min-width: 1400px) and (max-width: 1919.98px) {
  .container {
    max-width: 1320px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .nome {
    font-size: 3.5rem !important;
  }
  
  .descricao {
    font-size: 1.3rem;
  }
  
  .titulo {
    font-size: 2.5rem;
  }
  
  .texto {
    font-size: 1.1rem;
    line-height: 1.8;
  }
  
  .vscode-container {
    min-height: 600px;
  }
  
  .editor-content {
    padding: 30px;
    font-size: 16px;
  }
  
  .code-block {
    padding: 20px;
    font-size: 15px;
  }
}

/* === 4K e ULTRA WIDE (1920px+) === */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
    margin: 0 auto;
  }
  
  /* Hero 4K */
  .hero h1 {
    font-size: 3rem;
  }
  
  .nome {
    font-size: 4.5rem !important;
  }
  
  .descricao {
    font-size: 1.5rem;
  }
  
  .hero-img {
    max-width: 500px;
  }
  
  /* Títulos 4K */
  .titulo {
    font-size: 3rem;
  }
  
  .texto {
    font-size: 1.2rem;
    line-height: 2;
  }
  
  /* VS Code 4K */
  .vscode-container {
    min-height: 700px;
  }
  
  .vscode-sidebar {
    width: 300px;
  }
  
  .editor-content {
    padding: 40px;
    font-size: 18px;
  }
  
  .code-block {
    padding: 25px;
    font-size: 16px;
  }
  
  /* Cards 4K */
  .project-card .card-img-top {
    height: 280px;
  }
  
  .project-card .card-body {
    padding: 30px;
  }
  
  .project-card .card-title {
    font-size: 1.5rem;
  }
  
  .project-card .card-text {
    font-size: 16px;
  }
  
  .project-card .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  /* Formulário 4K */
  .form-control {
    padding: 15px;
    font-size: 16px;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 16px;
  }
  
  /* Certificados 4K */
  .iframe-certificado,
  iframe {
    height: 400px !important;
  }
}

/* === ULTRA WIDE (2560px+) === */
@media (min-width: 2560px) {
  .container {
    max-width: 2000px;
  }
  
  .nome {
    font-size: 5rem !important;
  }
  
  .titulo {
    font-size: 3.5rem;
  }
  
  .vscode-container {
    min-height: 800px;
  }
  
  .project-card .card-img-top {
    height: 320px;
  }
}

/* Correções específicas para evitar espaços em branco */
.row {
  margin-left: 0;
  margin-right: 0;
}

.col, .col-* {
  padding-left: 15px;
  padding-right: 15px;
}

/* Particles.js responsivo */
#particles-js {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

/* Garantir que o conteúdo fique acima das partículas */
body {
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
}

header {
  position: relative;
  z-index: 1000;
}

/* Navbar responsiva */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: rgba(33, 37, 41, 0.95);
    border-radius: 8px;
    margin-top: 10px;
    padding: 15px;
  }
}

/* Botões responsivos */
@media (max-width: 575.98px) {
  .btn {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .btn-sm {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}

/* Filtros de projeto responsivos */
@media (max-width: 575.98px) {
  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 3px;
  }
}

/* Alertas responsivos */
@media (max-width: 575.98px) {
  .alert {
    max-width: calc(100vw - 20px) !important;
    right: 10px !important;
    top: 10px !important;
    font-size: 0.85rem;
  }
}