/* ==========================================================================
   ENFINI OS RESPONSIVE STYLES
   Adaptaciones para Smartphones, Tablets y Pantallas Táctiles
   ========================================================================== */

@media (max-width: 860px) {
  #top-panel {
    padding: 0 8px;
  }
  
  .panel-center {
    display: none; /* Oculta Uptime en pantallas intermedias para dar espacio */
  }

  .os-window {
    left: 8px !important;
    top: 8px !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 54px) !important;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-row {
    grid-template-columns: 1fr;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }

  .mock-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .window-nav-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  
  .desktop-icon span {
    font-size: 0.72rem;
  }
  
  #desktop-icons-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 320px;
  }
  
  #ad-widget-container {
    bottom: 8px;
    right: 8px;
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 640px) {
  html, body {
    font-size: 14px;
  }

  /* Bootloader en Móvil */
  .boot-container {
    padding: 18px 16px;
  }

  .boot-title {
    font-size: 1.05rem;
  }

  .boot-item {
    padding: 12px 10px;
    font-size: 0.88rem;
  }

  .boot-instructions {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Panel Superior en Móvil */
  #top-panel {
    height: 44px;
  }

  .panel-badge-freelance span:last-child {
    display: none; /* Solo muestra el punto y "Lid Chile" */
  }

  #taskbar-windows {
    display: none; /* Las ventanas en móvil se gestionan por foco */
  }

  /* Ventanas en Móvil (Modo App / Pantalla Completa Adaptativa) */
  .os-window {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 44px) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    border: none;
    transform: none !important;
  }

  .os-window.minimized {
    display: none !important;
  }

  .btn-win-ctrl:not(.btn-win-close) {
    display: none; /* En móvil solo mostramos el botón de cerrar/volver */
  }

  .btn-win-close {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }

  .window-content {
    padding: 14px;
  }

  /* Grilla de Iconos */
  #desktop-canvas {
    padding: 16px;
  }

  #desktop-icons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 100%;
  }

  /* Menú de Inicio */
  #start-menu {
    width: calc(100vw - 24px);
    left: 12px;
    top: 48px;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  /* Espacio de Anuncios */
  #ad-widget-container {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
    bottom: 12px;
  }
}

/* ==========================================================================
   SOPORTE DE IMPRESIÓN Y EXPORTACIÓN A PDF PARA RECLUTADORES
   Permite a los recruiters imprimir o guardar como PDF en 1 página limpia
   ========================================================================== */
@media print {
  #bootloader-screen,
  #top-panel,
  #start-menu,
  #desktop-icons-grid,
  #ad-widget-container,
  #computing-bg-canvas,
  .window-controls,
  .btn-panel-action,
  .btn-win-ctrl {
    display: none !important;
  }

  body, html {
    background: #ffffff !important;
    color: #111111 !important;
  }

  #win-executive-summary {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    color: #111111 !important;
  }

  .exec-hero {
    background: #f4f6fa !important;
    border: 1px solid #cccccc !important;
    color: #111111 !important;
  }

  .bento-card {
    background: #f9fafb !important;
    border: 1px solid #cccccc !important;
    color: #111111 !important;
  }

  .bento-value, .exec-hero h2, h3, h4 {
    color: #111111 !important;
  }
}
