/* =========================================================================
   SinRegistro.ar · PWA - responsive.css
   Breakpoints:
     - sm:   600px   (tablets chicas, phablets)
     - md:   900px   (tablets)
     - lg:   1200px  (desktop)
     - xl:   1440px  (desktop wide)
   ========================================================================= */

/* ---------- TABLET EN ADELANTE (>= 600px) ---------- */
@media (min-width: 600px) {
  :root { --header-h: 60px; }
  .header-inner { padding: 0 18px; gap: 12px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-name { font-size: 1.3rem; }
  .brand-tag { font-size: .75rem; }
  .app-main { padding: 20px 18px 100px; }

  /* News grid: 2 columnas en tablet */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .news-card.large {
    grid-column: span 2;
    flex-direction: row;
  }
  .news-card.large .nc-img { width: 50%; flex: 0 0 50%; aspect-ratio: 4/3; }
  .news-card.large .nc-body { flex: 1; padding: 20px 22px; }
  .news-card.large h3 { font-size: 1.5rem; -webkit-line-clamp: 4; }
  .news-card.large .nc-extract { -webkit-line-clamp: 3; font-size: .95rem; }

  .sk-row { height: 140px; }
  .sk-card { height: 280px; }
}

/* ---------- DESKTOP (>= 900px) ---------- */
@media (min-width: 900px) {
  :root { --bottomnav-h: 0px; }
  .bottom-nav { display: none; }
  .app-main { padding: 24px 22px 40px; }
  .header-inner { padding: 0 22px; }

  /* Side menu pasa a ser un dropdown desde el header */
  .side-menu {
    width: 320px; max-width: 340px;
  }

  /* News grid: 3 columnas */
  .news-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .news-card.large { grid-column: span 3; }
  .news-card.large .nc-img { width: 45%; flex: 0 0 45%; aspect-ratio: 16/9; }
  .news-card.large h3 { font-size: 1.8rem; -webkit-line-clamp: 3; }

  /* FAB más arriba (sin bottom nav) */
  .fab-top { bottom: 24px; }
  .toast { bottom: 24px; }
  .install-banner { bottom: 24px; left: auto; right: 24px; max-width: 360px; }
  .conn-banner { top: var(--header-h); }

  /* Slider más grande */
  .hero-slider { aspect-ratio: 21/9; }

  /* Artículo más amplio */
  .article-page { padding: 0 8px; }
  .article-body { font-size: 1.1rem; }

  /* Categorías como grid */
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}

/* ---------- DESKTOP WIDE (>= 1200px) ---------- */
@media (min-width: 1200px) {
  .header-inner, .app-main { padding-left: 0; padding-right: 0; }
  .news-grid { gap: 26px; }
  .article-page { max-width: 820px; }
}

/* ---------- LANDSCAPE EN MÓVIL ---------- */
@media (max-width: 899px) and (orientation: landscape) {
  .hero-slider { aspect-ratio: 21/9; }
  .header-inner { height: 52px; }
  :root { --header-h: 52px; }
}

/* ---------- PRINT (opcional) ---------- */
@media print {
  .app-header, .bottom-nav, .fab-top, .side-menu, .overlay, .install-banner, .conn-banner, .article-actions { display: none !important; }
  .article-body { font-size: 12pt; line-height: 1.5; }
  body { background: white; color: black; }
}

/* ---------- ACCESIBILIDAD: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .urgent-banner { animation: none !important; }
  .skeleton { animation: none !important; }
}

/* ---------- HOVERS EN TOUCH (deshabilitar en coarse pointers) ---------- */
@media (hover: none) {
  .news-card:hover { transform: none; }
  .news-card:hover .nc-img img { transform: none; }
  .btn:hover { filter: none; }
}
