/**
 * Responsive Utilities
 * Media queries e ajustes responsivos globais
 */

/* ==========================================================================
   BREAKPOINT UTILITIES
   ========================================================================== */

/* Tablet e abaixo */
@media (max-width: 1023px) {
  :root {
    --container-xl: 100%;
  }
  
  .hide-tablet {
    display: none !important;
  }
  
  .show-tablet {
    display: block !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --space-8: 1.5rem;
    --space-10: 2rem;
    --space-12: 2.5rem;
    --space-16: 3rem;
  }
  
  .hide-mobile {
    display: none !important;
  }
  
  .show-mobile {
    display: block !important;
  }
  
  /* Tipografia mobile */
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  h3 {
    font-size: var(--text-xl);
  }
  
  /* Container mobile */
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Desktop grande */
@media (min-width: 1536px) {
  .container {
    max-width: var(--container-2xl);
  }
}

/* ==========================================================================
   TOUCH OPTIMIZATIONS
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
  /* Aumenta áreas de toque em dispositivos touch */
  .btn,
  .menu-toggle,
  .search-toggle,
  .user-toggle,
  .share-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .primary-menu a {
    padding: var(--space-4) var(--space-5);
  }
  
  /* Remove hover states em touch devices */
  .post-card:hover {
    transform: none;
  }
  
  .post-card:hover .card-thumbnail img {
    transform: none;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  /* Oculta elementos desnecessários */
  .site-header,
  .primary-navigation,
  .header-secondary,
  .site-footer,
  .article-share,
  .related-posts,
  .back-to-top,
  .menu-toggle,
  .search-toggle,
  .user-menu,
  .sidebar,
  .comments-area {
    display: none !important;
  }
  
  /* Otimiza para impressão */
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .article-content {
    max-width: 100%;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  /* Evita quebras de página indesejadas */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  blockquote,
  pre {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   DARK MODE SUPPORT (Preparado para futuro)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  /* 
   * Estilos de dark mode podem ser adicionados aqui
   * quando o tema suportar modo escuro
   */
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #000;
    --color-bg-primary: #fff;
    --color-border-medium: #000;
  }
  
  .btn,
  .post-card,
  .widget {
    border: 2px solid currentColor;
  }
}

/* ==========================================================================
   LANDSCAPE ORIENTATION
   ========================================================================== */

@media (max-width: 767px) and (orientation: landscape) {
  .swiper-container {
    height: 250px;
  }
  
  .hero-section {
    margin-bottom: var(--space-6);
  }
}

/* ==========================================================================
   UTILITY CLASSES RESPONSIVE
   ========================================================================== */

/* Espaçamento responsivo */
@media (max-width: 767px) {
  .mb-mobile-0 { margin-bottom: 0 !important; }
  .mb-mobile-4 { margin-bottom: var(--space-4) !important; }
  .mb-mobile-6 { margin-bottom: var(--space-6) !important; }
  .mb-mobile-8 { margin-bottom: var(--space-8) !important; }
  
  .mt-mobile-0 { margin-top: 0 !important; }
  .mt-mobile-4 { margin-top: var(--space-4) !important; }
  .mt-mobile-6 { margin-top: var(--space-6) !important; }
  .mt-mobile-8 { margin-top: var(--space-8) !important; }
  
  .p-mobile-0 { padding: 0 !important; }
  .p-mobile-4 { padding: var(--space-4) !important; }
  .p-mobile-6 { padding: var(--space-6) !important; }
}

/* Texto responsivo */
@media (max-width: 767px) {
  .text-mobile-center { text-align: center !important; }
  .text-mobile-left { text-align: left !important; }
  .text-mobile-right { text-align: right !important; }
}

/* Flex responsivo */
@media (max-width: 767px) {
  .flex-mobile-col {
    flex-direction: column !important;
  }
  
  .flex-mobile-row {
    flex-direction: row !important;
  }
}

