/**
 * carlosvaccaro.com.ar — Sección Judicial
 * Diseño: azul marino oscuro, profesional, responsive
 * Basado en estilo_mod.css
 */

/* ════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #e8ecf1;
  background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0f1d35 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* ════════════════════════════════════════════
   PATRÓN DE FONDO
════════════════════════════════════════════ */
.bg-pattern {
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ════════════════════════════════════════════
   HEADER / HERO
════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(100, 149, 237, 0.12);
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0.5rem 0 0.3rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #e8ecf1 0%, #87CEEB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: #87CEEB;
  margin: 0 0 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-desc {
  font-size: clamp(0.88rem, 1.8vw, 1.02rem);
  color: #a0b4cc;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Link "volver" */
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: #7a9ab8;
  margin-bottom: 0.8rem;
  transition: color 0.2s;
}
.back-link:hover {
  color: #87CEEB;
}

/* ════════════════════════════════════════════
   GRILLA DE ARTÍCULOS (INDEX)
════════════════════════════════════════════ */
.categories {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.grid-articulos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* ════════════════════════════════════════════
   TARJETA DE ARTÍCULO
════════════════════════════════════════════ */
.card-articulo {
  background: linear-gradient(145deg, rgba(20,40,70,0.8) 0%, rgba(15,30,55,0.9) 100%);
  border: 1px solid rgba(100,149,237,0.12);
  border-radius: 14px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card-articulo:hover {
  border-color: rgba(100,149,237,0.45);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.card-link {
  display: block;
  padding: 1.4rem 1.5rem;
  height: 100%;
}

.card-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4a6a8a;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-family: "Courier New", monospace;
}

.card-articulo h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #dce6f0;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-articulo .card-desc {
  font-size: 0.83rem;
  color: #7a9ab8;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}

.card-leer {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5aa0d0;
  transition: color 0.2s;
}

.card-articulo:hover .card-leer {
  color: #87CEEB;
}

/* ════════════════════════════════════════════
   VISOR PDF (articulo.html)
════════════════════════════════════════════ */
.hero-articulo {
  padding: 1.8rem 1.5rem 1.2rem;
}

.viewer-container {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.pdf-wrapper {
  background: #111;
  border: 1px solid rgba(100,149,237,0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.pdf-wrapper iframe {
  width: 100%;
  height: 78vh;
  min-height: 500px;
  border: none;
  display: block;
}

/* Botones debajo del visor */
.viewer-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #1e5aa8 0%, #2a7cc7 100%);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 15px rgba(42,124,199,0.3);
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42,124,199,0.45);
}

/* Error de carga */
.pdf-error {
  padding: 4rem 2rem;
  text-align: center;
  color: #a0b4cc;
  font-size: 1.1rem;
}
.pdf-error .btn-action {
  margin-top: 1rem;
}

/* ════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(100,149,237,0.1);
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(10,22,40,0.5);
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.license {
  margin-bottom: 0.8rem;
}

.license-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #7a9ab8;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.license-link:hover {
  color: #87CEEB;
}

.update-date {
  font-size: 0.75rem;
  color: #4a5a70;
  margin: 0;
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 600px) {
  .grid-articulos {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 1.5rem 1rem 1.2rem;
  }
  .pdf-wrapper iframe {
    height: 70vh;
    min-height: 400px;
  }
  .viewer-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .grid-articulos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ════════════════════════════════════════════
   ACCESIBILIDAD
════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

a:focus-visible {
  outline: 2px solid #87CEEB;
  outline-offset: 2px;
  border-radius: 4px;
}