/* ══════════════════════════════════════════════════════
    CERRAJERÍA SBJ — style.css
   ══════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────── */
:root {
  /* Azules (fondos) */
  --bg:        #050d1f;
  --bg-2:      #0a1530;
  --bg-card:   #0e1d40;
  --border:    rgba(255,255,255,0.10);

  /* Paleta principal */
  --yellow:    #ffd600;
  --yellow-dim:#c9a800;
  --red:       #e8132a;
  --red-dim:   #b50e20;
  --blue:      #1a3a8f;
  --blue-light:#2a5cd4;
  --white:     #ffffff;
  --text:      #dce8ff;
  --muted:     #6b84b8;
  --green:     #22c55e;

  /* Aliases (mantiene compatibilidad con el resto del CSS) */
  --gold:      var(--yellow);
  --gold-dim:  var(--yellow-dim);

  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);

  --header-h:  70px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ── Utility ────────────────────────────────────────── */
.container {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1.05;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--yellow);
  color: #050d1f;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(255,214,0,0);
}
.btn-primary:hover {
  background: #ffe033;
  box-shadow: 0 8px 28px rgba(255,214,0,0.40);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}

/* ══ HEADER ════════════════════════════════════════════ */
#header {
  position: fixed;
  inset-block-start: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 1000;
  transition: background 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}
#header.scrolled {
  background: rgba(5, 13, 31, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--white);
}
.logo strong { font-weight: 700; color: var(--gold); }
.logo-icon { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══ HERO ══════════════════════════════════════════════ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--header-h) + 2rem) 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, #1a3a8f 0%, #050d1f 68%),
    linear-gradient(180deg, #050d1f 0%, #0a1530 100%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,214,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,214,0,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease) 0.1s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8.5rem);
  letter-spacing: 0.03em;
  line-height: 0.92;
  color: var(--white);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.25s forwards;
}
.hero-title em {
  font-style: normal;
  color: var(--red);
  display: block;
  text-shadow: 0 0 40px rgba(232,19,42,0.45);
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.4s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.55s forwards;
}

.hero-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.7s forwards;
}
.badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--yellow);
  background: rgba(255,214,0,0.10);
  border: 1px solid rgba(255,214,0,0.25);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  letter-spacing: 0.02em;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 1.1s forwards;
}
.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollDrop 1.6s ease-in-out infinite;
}

/* ══ SERVICES ══════════════════════════════════════════ */
.services {
  padding-block: 7rem;
  background: var(--bg-2);
  position: relative;
}
.services::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.service-card::before {
  content: attr(data-index);
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.02em;
  line-height: 1;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,214,0,0.30);
  box-shadow: 0 20px 48px rgba(0,0,0,0.45);
}
.service-card.featured {
  border-color: rgba(232,19,42,0.40);
  background: linear-gradient(160deg, #130a1c 0%, var(--bg-card) 100%);
}
.service-card.featured:hover {
  border-color: rgba(232,19,42,0.65);
  box-shadow: 0 20px 48px rgba(232,19,42,0.15);
}

.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: var(--red);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,214,0,0.08);
  border: 1px solid rgba(255,214,0,0.18);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  margin-bottom: 1.5rem;
  transition: background 0.3s, border-color 0.3s;
}
.service-card:hover .card-icon {
  background: rgba(255,214,0,0.14);
  border-color: rgba(255,214,0,0.35);
}
.service-card.featured .card-icon {
  background: rgba(232,19,42,0.10);
  border-color: rgba(232,19,42,0.25);
  color: var(--red);
}
.service-card.featured:hover .card-icon {
  background: rgba(232,19,42,0.16);
  border-color: rgba(232,19,42,0.45);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.card-features {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card-features li {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
}
.card-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.7rem;
}

/* ══ Llaves Pegables ═══════════════════════════════════════════ */
.service-card .img-zone {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: -2.5rem -2rem 1.5rem;   /* sangra hasta los bordes del padding */
  aspect-ratio: 16 / 9;
  min-height: 180px;
  width: calc(100% + 4rem);
}
.service-card .img-zone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
  min-height: 180px;
  width: calc(100%);
}
.service-card:hover .img-zone img {
  transform: scale(1.05);
}
/* Badge encima de la imagen */
.service-card .img-zone .badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
}

/* ══ Galería de Cerraduras de 3 imágenes ═══════════════════════════════════════ */
.service-card--gallery .img-zone--gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: -2.5rem -2rem 1.5rem;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  width: calc(100% + 4rem);
  background: #0a1530;
}

.gallery-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transform: scale(1.03);
}

.gallery-img.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.gallery-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 2;
}

.gallery-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.gallery-dots .dot.active {
  background: var(--yellow);
  transform: scale(1.25);
}

.gallery-dots .dot:hover {
  background: rgba(255,214,0,0.7);
}

.service-card--gallery:hover .gallery-img.active {
  transform: scale(1.05);
}

/* ══ CONTACT ═══════════════════════════════════════════ */
.contact {
  padding-block: 7rem;
  background: var(--bg);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-info .section-title { 
  margin-bottom: 0.75rem;
}

.contact-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}
a.contact-item:hover {
  border-color: rgba(255,214,0,0.30);
  background: rgba(255,214,0,0.04);
}

.ci-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ci-icon.whatsapp { background: rgba(34,197,94,0.12);  color: var(--green); }
.ci-icon.phone    { background: rgba(42,92,212,0.15);  color: #6fa0ff; }
.ci-icon.clock    { background: rgba(255,214,0,0.12);  color: var(--yellow); }
.ci-icon.location { background: rgba(232,19,42,0.12);  color: var(--red); }

.contact-item div:last-child {
  display: flex;
  flex-direction: column;
}
.contact-item strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}
.contact-item span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Social panel */
.social-panel { padding-top: 0.5rem; }
.social-panel .section-label { margin-bottom: 1.5rem; }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.social-link:hover {
  transform: translateX(4px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}
.social-link .arrow {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.2s, color 0.2s;
}
.social-link:hover .arrow {
  transform: translate(3px, -3px);
  color: var(--yellow);
}

/* ══ FOOTER ════════════════════════════════════════════ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  
}
.footer p {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ══ WHATSAPP FLOAT ═════════════════════════════════════ */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 58px;
  height: 58px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(34,197,94,0.45);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(34,197,94,0.60);
}

.wa-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: pulse 2.4s ease-out infinite;
  pointer-events: none;
}

/* ══ ANIMATIONS ════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollDrop {
  0%, 100% { transform: scaleY(1); transform-origin: top; }
  50%       { transform: scaleY(0.4); transform-origin: top; }
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══ RESPONSIVE ════════════════════════════════════════ */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(5, 13, 31, 0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .nav-toggle { display: flex; }

  .hero-cta { flex-direction: column; align-items: center; }
  .btn { justify-content: center; }

  .footer-inner { flex-direction: column; text-align: center; }

  .wa-float { bottom: 1.2rem; right: 1.2rem; width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
