/* =========================================================
   JASIC Argentina — estilos comunes
   Cortes de pantalla: 900 px (tablet) y 600 px (celular).
   ========================================================= */

:root {
  --rojo: #d40000;          /* fondos de botones (texto blanco 5,4:1) */
  --rojo-hover: #b30000;
  --rojo-texto: #ff4d4d;    /* rojo para texto sobre negro (5,9:1) */
  --negro: #000;
  --gris-0: #0a0a0a;
  --gris-1: #111;
  --gris-2: #161616;
  --gris-3: #222;
  --texto: #fff;
  --texto-2: rgba(255,255,255,0.82);
  --texto-3: rgba(255,255,255,0.68);
  --borde: rgba(255,255,255,0.12);
  --borde-campo: rgba(255,255,255,0.45);
  --radio: 16px;
  --radio-chico: 10px;
  --ancho: 1200px;
  --sombra: 0 6px 20px rgba(0,0,0,0.45);
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-padding-top: 90px; }

body {
  font-family: var(--fuente);
  background: var(--negro);
  color: var(--texto);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

.container { max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Foco visible (ACC-01) */
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Saltar al contenido (ACC-05) */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: #fff; color: #000; font-weight: 700;
  padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* Bloqueo de scroll sin perder la posición (FUN-02) */
body.lightbox-open { overflow: hidden; }

/* ---------- Header y menú ---------- */
.header {
  background: var(--negro);
  border-bottom: 1px solid var(--borde);
  position: sticky; top: 0; z-index: 1000;
}

.header-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; gap: 20px;
}

.logo { height: 45px; width: auto; }

.nav { display: flex; align-items: center; gap: 26px; }

.nav a {
  font-size: 0.95rem; font-weight: 500;
  color: var(--texto-2);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--rojo); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: transparent; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn-primary,
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 30px;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.btn-primary { background: var(--rojo); color: #fff; border: 2px solid var(--rojo); }
.btn-primary:hover { background: var(--rojo-hover); border-color: var(--rojo-hover); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.06); transform: translateY(-2px); }

/* ---------- Inicio: hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center;
  background: #111 url("../img/fondo-1920.webp") center / cover no-repeat;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.3) 100%); }
.hero-content { position: relative; max-width: 640px; margin-left: 10%; padding: 60px 0; }
.hero-content h1 { font-size: 3.2rem; line-height: 1.12; margin-bottom: 20px; }
.hero-content p { font-size: 1.15rem; color: var(--texto-2); margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Inicio: categorías ---------- */
.product-categories { padding: 70px 0 40px; text-align: center; }
.product-categories h2 { font-size: 1.9rem; margin-bottom: 30px; }

.categorias-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  min-height: 170px;
  background: var(--gris-1);
  border: 1px solid transparent;
  border-radius: var(--radio);
  padding: 26px 16px;
  font-weight: 600;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.product-item:hover { background: var(--gris-2); border-color: var(--borde); transform: translateY(-4px); }
.product-item img { width: auto; height: 60px; }

/* ---------- Inicio: banners ---------- */
.home-carousel { padding: 40px 0 70px; }

.banners { position: relative; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }

.banners-pista {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: var(--radio);
  scrollbar-width: none;
}
.banners-pista::-webkit-scrollbar { display: none; }

.banner { flex: 0 0 100%; scroll-snap-align: start; }
.banner img { width: 100%; height: auto; aspect-ratio: 1920 / 989; object-fit: cover; }

.banners-controles {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px;
}
.banners-controles button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 10px;
  background: transparent; color: #fff; border: 1px solid var(--borde); border-radius: 999px; cursor: pointer;
}
.banners-controles button:hover { border-color: #fff; }
.banners-puntos { display: flex; gap: 4px; }
.banners-puntos button { min-width: 28px; width: 28px; height: 28px; border: none; padding: 0; }
.banners-puntos button::before {
  content: ""; display: block; width: 12px; height: 12px; margin: auto; border-radius: 50%;
  background: transparent; border: 2px solid rgba(255,255,255,0.75);
}
.banners-puntos button[aria-current="true"]::before { background: var(--rojo-texto); border-color: var(--rojo-texto); }

/* ---------- Inicio: catálogos y videos ---------- */
.home-extra { background: var(--gris-0); padding: 80px 0; }

.extra-container {
  max-width: var(--ancho); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}

.extra-box { background: var(--gris-1); padding: 40px; border-radius: 18px; }
.extra-box h2 { font-size: 1.8rem; margin-bottom: 10px; }
.extra-box > p { color: var(--texto-3); margin-bottom: 25px; }

.catalog-list { list-style: none; display: grid; gap: 12px; }
.catalog-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 12px 18px;
  border: 1px solid var(--borde); border-radius: var(--radio-chico);
  color: var(--rojo-texto); font-weight: 600;
}
.catalog-list a:hover { border-color: var(--rojo-texto); background: rgba(255,77,77,0.06); }
.catalog-list small { color: var(--texto-3); font-weight: 400; white-space: nowrap; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* Video que se carga recién al hacer clic (REN-11, PRI-04) */
.video-facade {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: none; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: #000 center / cover no-repeat;
}
.video-facade::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 68px; height: 48px;
  border-radius: 12px; background: rgba(212,0,0,0.92)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
}
.video-facade:hover::after { background-color: var(--rojo); }
.video-facade span { position: absolute; left: 12px; right: 12px; bottom: 10px; text-align: left; font-size: 0.9rem; font-weight: 600; text-shadow: 0 1px 4px #000; }
.video-item iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }

/* ---------- Páginas internas: Tecnología ---------- */
.tech-processes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.tech-processes-text h2 { margin-bottom: 20px; }
.tech-processes-text .tech-list { padding-left: 20px; }
.tech-processes-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.tech-processes-images img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ---------- Páginas internas: Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: stretch; }
.contact-map { width: 100%; min-height: 320px; border-radius: 18px; overflow: hidden; background: var(--gris-1); }
.contact-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.mapa-facade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  width: 100%; height: 100%; min-height: 320px; padding: 24px; text-align: center;
  background: var(--gris-1); color: #fff; border: 1px dashed var(--borde); border-radius: 18px; cursor: pointer;
}
.mapa-facade small { color: var(--texto-3); }

/* ---------- Páginas de texto (privacidad, 404, gracias) ---------- */
.texto-page { padding: 70px 0 40px; }
.texto-page .container { max-width: 820px; }
.texto-page h1 { font-size: 2.3rem; margin-bottom: 12px; }
.texto-page h2 { font-size: 1.35rem; margin: 34px 0 10px; }
.texto-page h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.texto-page p, .texto-page li { color: var(--texto-2); margin-bottom: 10px; }
.texto-page ul ul { margin-top: 8px; }
.texto-page ul { padding-left: 22px; }
.texto-page a { color: var(--rojo-texto); text-decoration: underline; }
.texto-page .nota { font-size: 0.9rem; color: var(--texto-3); }

/* ---------- Footer ---------- */
.footer { background: var(--gris-0); border-top: 1px solid var(--borde); margin-top: 60px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 50px 20px 30px; }
.footer-logo { height: 40px; width: auto; margin-bottom: 15px; }
.footer-brand p { color: var(--texto-3); font-size: 0.9rem; max-width: 340px; }
.footer-col h2 { font-size: 1rem; margin-bottom: 15px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 4px; color: var(--texto-3); font-size: 0.9rem; }
.footer-links a { display: inline-block; padding: 4px 0; color: var(--texto-3); transition: color 0.2s ease; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--borde); padding: 18px 20px; text-align: center; }
.footer-bottom p { color: var(--texto-3); font-size: 0.85rem; }

/* ---------- Botón de WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: #128c7e; color: #fff;           /* 4,2:1 con el ícono (ACC-04) */
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  transition: transform 0.2s ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); }

/* ---------- Aviso de cookies ---------- */
.aviso-cookies {
  position: fixed; left: 16px; bottom: 16px; z-index: 1300; max-width: 460px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 16px 18px; background: var(--gris-1); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra); font-size: 0.9rem; color: var(--texto-2);
}
.aviso-cookies p { flex: 1 1 260px; }
.aviso-cookies a { color: #fff; text-decoration: underline; }
.aviso-cookies div { display: flex; gap: 8px; }
.aviso-cookies button {
  min-height: 40px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600;
  background: transparent; color: #fff; border: 1px solid var(--borde-campo);
}
.aviso-cookies button[data-v="si"] { background: var(--rojo); border-color: var(--rojo); }
@media (max-width: 600px) { .aviso-cookies { left: 10px; right: 84px; bottom: 10px; } }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .categorias-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .extra-container, .tech-processes-grid, .contact-grid { grid-template-columns: 1fr; }
  .tech-processes-images { margin-top: 30px; }
  .hero-content { margin-left: 5%; margin-right: 5%; }
  .hero-content h1 { font-size: 2.5rem; }
  .contact-map, .contact-map iframe { min-height: 280px; }

  .header-container { height: 70px; }
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--negro); border-bottom: 1px solid var(--borde); padding: 8px 0 18px;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; text-align: center; padding: 14px 20px; font-size: 1.05rem; border-bottom: none; }
  .nav a[aria-current="page"] { color: var(--rojo-texto); }
}

/* ---------- Celular ---------- */
@media (max-width: 600px) {
  .hero { min-height: 70vh; background-image: url("../img/fondo-movil.webp"); text-align: center; }
  .hero-content { margin: 0 auto; padding: 40px 20px; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p { font-size: 1rem; }
  .hero-actions { justify-content: center; }
  .categorias-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .product-item { min-height: 140px; padding: 20px 10px; }
  .extra-box { padding: 28px 20px; }
  .logo { height: 38px; }
  .footer-container { grid-template-columns: 1fr; gap: 30px; padding: 40px 20px 25px; }
  .texto-page h1 { font-size: 1.8rem; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 320px; }
}

/* ---------- Movimiento reducido (ACC-13) ---------- */
@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;
  }
}
