/* ==========================================================================
   Raineri Rodamientos — estilos
   Mobile-first. Breakpoints: 768px (tablet), 1200px (desktop)
   ========================================================================== */

:root {
  --blue-900: #0f3a5c;
  --blue-700: #1b5a85;
  --blue-600: #256a99;
  --blue-500: #3e7cad;
  --blue-300: #8fc1e3;
  --blue-100: #cfe6f5;
  --blue-50:  #eaf4fb;
  --white:    #ffffff;
  --gray-900: #1a2530;
  --gray-600: #55636e;
  --gray-300: #c7d0d6;
  --gray-200: #e3e8ec;
  --gray-100: #f4f7f9;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(15, 58, 92, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 58, 92, 0.12);
  --container-max: 1140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--blue-900);
  margin: 0 0 var(--space-2);
  line-height: 1.2;
  font-weight: 700;
}
p { margin: 0 0 var(--space-2); color: var(--gray-600); }
button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-900);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn .icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--blue-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--blue-900); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--blue-300);
}
.btn-outline:hover { background: var(--blue-50); border-color: var(--blue-700); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}
.btn-whatsapp:hover { background: #1fb857; box-shadow: var(--shadow-md); }

.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--space-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark { width: 34px; height: 34px; color: var(--blue-700); flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--blue-900);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}
.logo-text em {
  font-style: normal;
  font-weight: 500;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
}
.logo-text-light { color: var(--white); }
.logo-text-light em { color: var(--blue-300); }

.main-nav {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--white);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  overflow-y: auto;
}
.main-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.main-nav ul {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-3);
}
.main-nav a {
  display: block;
  padding: 16px 4px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--blue-900);
  border-bottom: 1px solid var(--gray-200);
  min-height: 44px;
}

.header-cta { display: none; }

.hamburger {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--blue-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--blue-50) 0%, var(--white) 60%);
  padding: var(--space-6) 0 var(--space-5);
  overflow: hidden;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-500);
  margin-bottom: var(--space-2);
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}
.hero-lead {
  font-size: 1.05rem;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.hero-visual { display: flex; justify-content: center; }
.hero-visual picture { display: block; width: 100%; }
.hero-visual img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- Secciones genéricas ---------- */
.section { padding: var(--space-6) 0; }
.section-tint { background: var(--blue-50); }
.section-dark {
  background: var(--blue-900);
  background: linear-gradient(160deg, var(--blue-900), var(--blue-700));
}
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-500);
  margin-bottom: var(--space-1);
}
.section-eyebrow-light { color: var(--blue-300); }
.section h2 { font-size: 1.65rem; max-width: 34ch; }
.section-lead { max-width: 60ch; font-size: 1.02rem; }
.section-lead-light, .section-dark p, .section-dark h2 { color: var(--white); }
.section-dark .section-lead-light { color: var(--blue-100); }

/* ---------- Productos ---------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-media {
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: var(--space-3); }
.product-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.product-card p { font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Nosotros ---------- */
.nosotros-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-4);
  align-items: center;
}
.nosotros-copy { max-width: 60ch; }
.checklist { margin-top: var(--space-2); display: flex; flex-direction: column; gap: 10px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--gray-900);
  font-weight: 500;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-700);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.nosotros-visual { display: flex; justify-content: center; width: 100%; }
.nosotros-visual picture { display: block; width: 100%; }
.nosotros-visual img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- Ubicación ---------- */
.ubicacion-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.mapa-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.mapa-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}
.info-cards { display: flex; flex-direction: column; gap: var(--space-3); }
.info-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.info-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.info-card p { margin-bottom: 8px; }
.link-arrow { color: var(--blue-700); font-weight: 600; }
.link-arrow:hover { text-decoration: underline; }

.horarios-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.horarios-table th, .horarios-table td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 500;
}
.horarios-table th { color: var(--blue-900); width: 45%; }
.horarios-table td { color: var(--gray-600); }
.horarios-table tr:last-child th, .horarios-table tr:last-child td { border-bottom: none; }

/* ---------- Contacto ---------- */
.contacto-inner { text-align: left; }
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
  max-width: 380px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: var(--blue-100); }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-2);
}
.footer-brand p { color: var(--blue-100); max-width: 40ch; margin-top: var(--space-2); }
.footer-col h4 { color: var(--white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-2); }
.footer-col p { color: var(--blue-100); margin-bottom: 6px; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: var(--space-2);
}
.footer-bottom p { color: var(--blue-300); font-size: 0.85rem; margin: 0; text-align: center; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 90;
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: var(--white); }

/* ==========================================================================
   Tablet (>=768px)
   ========================================================================== */
@media (min-width: 768px) {
  .container { padding: 0 var(--space-4); }

  .hero h1 { font-size: 2.6rem; }
  .hero-inner { flex-direction: row; align-items: center; }
  .hero-copy { flex: 1.1; }
  .hero-visual { flex: 0.9; }
  .hero-visual img { max-height: 460px; }

  .section h2 { font-size: 2rem; }

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

  .nosotros-grid { flex-direction: row; align-items: center; }
  .nosotros-copy { flex: 1.2; }
  .nosotros-visual { flex: 0.8; }

  .ubicacion-grid { flex-direction: row; align-items: stretch; }
  .mapa-wrap { flex: 1.2; }
  .mapa-wrap iframe { height: 100%; min-height: 360px; }
  .info-cards { flex: 0.9; }

  .contact-buttons { flex-direction: row; flex-wrap: wrap; max-width: none; }
  .contact-buttons .btn { flex: 1 1 220px; }
}

/* ==========================================================================
   Desktop (>=1200px)
   ========================================================================== */
@media (min-width: 1200px) {
  .header-inner { gap: var(--space-4); }
  .main-nav {
    position: static;
    inset: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    overflow: visible;
  }
  .main-nav ul { flex-direction: row; padding: 0; gap: var(--space-4); }
  .main-nav a {
    padding: 8px 2px;
    border-bottom: none;
    font-size: 0.98rem;
    min-height: auto;
  }
  .main-nav a:hover { color: var(--blue-500); }
  .header-cta { display: inline-flex; }
  .hamburger { display: none; }

  .hero { padding: var(--space-7) 0; }
  .hero h1 { font-size: 3.1rem; }
  .hero-visual img { max-height: 520px; }

  .product-grid { grid-template-columns: repeat(4, 1fr); }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--space-6) var(--space-4);
  }
  .footer-brand { flex: 1.4; }
}

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