/* ============================================================
   JOFAROD — estilos complementarios a Tailwind
   Paleta: azul marino (#0b1f3a) + acero + ámbar "chispa de soldadura"
   ============================================================ */

:root {
  --navy-950: #060f1e;
  --navy-900: #0b1f3a;
  --navy-800: #12305a;
  --navy-700: #1a4178;
  --steel-100: #eef2f7;
  --steel-200: #d9e1ec;
  --steel-500: #64748b;
  --spark-400: #fbbf24;
  --spark-500: #f59e0b;
}

html { scroll-padding-top: 90px; }
body { background: #fff; }
[x-cloak], .cloak { visibility: hidden; }

/* Patrón de rejilla tipo plano técnico */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- Navegación ---------- */
#navbar.scrolled { box-shadow: 0 6px 24px -12px rgba(11,31,58,.35); }
.nav-link { position: relative; padding: .25rem 0; transition: color .2s; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--spark-500); transition: width .25s;
}
.nav-link:hover, .nav-link.active { color: var(--navy-700); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ---------- Títulos ---------- */
.section-kicker {
  font-size: .85rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--spark-500);
}
.section-title {
  margin-top: .5rem; font-family: "Barlow Condensed", sans-serif; font-weight: 800;
  font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1; text-transform: uppercase;
  color: var(--navy-900);
}

/* ---------- Hero con carrusel ---------- */
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease, transform 7s ease; transform: scale(1.06); }
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-slide img { height: 100%; width: 100%; object-fit: cover; }
.hero-dot { height: .5rem; width: 1.5rem; border-radius: 999px; background: rgba(255,255,255,.35); transition: all .3s; }
.hero-dot.active { width: 2.75rem; background: var(--spark-500); }

/* Encabezado de páginas internas */
.page-hero { position: relative; overflow: hidden; background: var(--navy-900); color: #fff; }
.page-hero > img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; opacity: .35; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy-950) 10%, rgba(11,31,58,.75) 60%, rgba(11,31,58,.35)); z-index: 1; }
.page-hero > div { position: relative; z-index: 2; }
.breadcrumb a { color: var(--steel-200); }
.breadcrumb a:hover { color: var(--spark-400); }

/* ---------- Tarjetas destacadas del hero ---------- */
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-left: 3px solid var(--spark-500); border-radius: .5rem; padding: 1.25rem 1.5rem;
  backdrop-filter: blur(6px); transition: background .3s;
}
.hero-card:hover { background: rgba(255,255,255,.1); }
.hero-card h3 { margin-top: .5rem; font-family: "Barlow Condensed", sans-serif; font-size: 1.4rem; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.hero-card p { margin-top: .3rem; font-size: .9rem; color: var(--steel-200); }
.hero-num { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 1rem; color: var(--spark-400); }

/* ---------- Por qué elegirnos ---------- */
.why-card { background: #fff; padding: 2rem; border-bottom: 3px solid transparent; transition: border-color .3s, transform .3s; }
.why-card:hover { border-color: var(--spark-500); transform: translateY(-4px); }
.why-icon { height: 2.75rem; width: 2.75rem; color: var(--navy-700); }
.why-card h3 { margin-top: 1rem; font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem; font-weight: 700; text-transform: uppercase; color: var(--navy-900); }
.why-card p { margin-top: .25rem; color: var(--steel-500); }

/* ---------- Tarjetas de servicio / producto ---------- */
.service-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: .5rem; background: #fff;
  border: 1px solid var(--steel-200); transition: transform .3s, box-shadow .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(11,31,58,.35); }
.service-img {
  aspect-ratio: 7 / 5; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--steel-100), #fff);
}
.service-img img { height: 100%; width: 100%; object-fit: cover; transition: transform .6s; }
.service-img img.contain { object-fit: contain; padding: 1.5rem; }
.service-card:hover .service-img img { transform: scale(1.06); }
.service-body { padding: 1.5rem; position: relative; flex: 1; display: flex; flex-direction: column; }
.service-tag {
  position: absolute; top: -1.4rem; right: 1.5rem; display: grid; place-items: center;
  height: 2.8rem; min-width: 2.8rem; padding: 0 .5rem; border-radius: .375rem; background: var(--spark-500);
  font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--navy-950);
}
.service-body h3 { font-family: "Barlow Condensed", sans-serif; font-size: 1.55rem; font-weight: 700; line-height: 1.1; text-transform: uppercase; color: var(--navy-900); }
.service-body p { margin-top: .5rem; color: var(--steel-500); }
.item-cat { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--spark-600, #d97706); }
.feature-list { margin-top: .75rem; display: grid; gap: .35rem; font-size: .92rem; color: #334155; }
.feature-list li { display: flex; gap: .55rem; align-items: flex-start; }
.feature-list li::before { content: ""; flex: none; margin-top: .45rem; height: .45rem; width: .45rem; background: var(--spark-500); transform: rotate(45deg); }
.card-actions { margin-top: auto; padding-top: 1.25rem; display: flex; gap: .5rem; }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: .375rem; padding: .6rem 1rem; font-size: .88rem; font-weight: 600; transition: all .2s; }
.btn-wa { background: #22c55e; color: #fff; }
.btn-wa:hover { background: #16a34a; }
.btn-ghost { border: 1px solid var(--steel-200); color: var(--navy-900); }
.btn-ghost:hover { border-color: var(--navy-700); }

/* Tarjetas de categoría */
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: 1rem; overflow: hidden; border-radius: .6rem;
  background: #fff; border: 1px solid var(--steel-200); padding: 1.75rem; transition: all .3s;
}
.cat-card:hover { border-color: var(--navy-700); transform: translateY(-4px); box-shadow: 0 20px 36px -22px rgba(11,31,58,.45); }
.cat-card .cat-icon { height: 4.5rem; width: 4.5rem; object-fit: contain; }
.cat-card h3 { font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem; font-weight: 700; line-height: 1.05; text-transform: uppercase; color: var(--navy-900); }
.cat-card .cat-count { font-size: .85rem; color: var(--steel-500); }
.cat-card .cat-arrow { position: absolute; right: 1.5rem; top: 1.75rem; color: var(--steel-200); font-size: 1.5rem; transition: all .3s; }
.cat-card:hover .cat-arrow { color: var(--spark-500); transform: translateX(4px); }

/* Pestañas de categoría */
.tab-btn {
  border-radius: 999px; border: 1px solid var(--steel-200); padding: .55rem 1.15rem; background: #fff;
  font-size: .9rem; font-weight: 600; color: var(--navy-900); transition: all .2s; white-space: nowrap;
}
.tab-btn:hover { border-color: var(--navy-700); }
.tab-btn.active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.tab-btn .count { margin-left: .35rem; font-size: .75rem; opacity: .6; }

/* ---------- Galería ---------- */
.gallery-item {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: .5rem; cursor: zoom-in;
  background: linear-gradient(135deg, var(--steel-100), #fff);
}
.gallery-item img { height: 100%; width: 100%; object-fit: cover; transition: transform .6s; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.25rem; padding-top: 3rem;
  background: linear-gradient(to top, rgba(6,15,30,.92), transparent);
}
.gallery-item figcaption span { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--spark-400); }
.gallery-item figcaption h3 { font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; font-weight: 700; line-height: 1.1; color: #fff; }

/* ---------- Nosotros ---------- */
.philo-card {
  overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-top: 3px solid var(--spark-500);
  border-radius: .5rem; background: rgba(255,255,255,.04); color: #c3cedd;
}
.philo-card img { aspect-ratio: 16/9; width: 100%; object-fit: cover; opacity: .85; }
.philo-card .philo-body { padding: 1.75rem; }
.philo-card h3 { margin-bottom: .75rem; font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; font-weight: 700; text-transform: uppercase; color: #fff; }
.bar { height: .5rem; border-radius: 999px; background: var(--steel-200); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--navy-700), var(--spark-500)); transition: width 1.6s ease; }

/* ---------- Clientes (carrusel continuo) ---------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 1.5rem; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client-logo {
  display: grid; place-items: center; height: 6rem; width: 11rem; flex: none; border-radius: .5rem;
  background: #fff; border: 1px solid var(--steel-200); padding: .9rem;
}
.client-logo img { max-height: 100%; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: all .3s; }
.client-logo:hover img { filter: none; opacity: 1; }

/* ---------- Contacto ---------- */
.contact-card {
  display: flex; align-items: flex-start; gap: 1rem; border-radius: .5rem; border: 1px solid var(--steel-200);
  padding: 1.25rem; color: var(--navy-900); transition: border-color .2s, box-shadow .2s; background: #fff;
}
a.contact-card:hover { border-color: var(--navy-700); box-shadow: 0 10px 24px -16px rgba(11,31,58,.5); }
.contact-icon { display: grid; flex: none; place-items: center; height: 3rem; width: 3rem; border-radius: .5rem; }

.form-field { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; font-weight: 600; color: var(--navy-900); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border-radius: .375rem; border: 1px solid var(--steel-200); background: #f8fafc;
  padding: .8rem 1rem; font-weight: 400; color: #1e293b; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--navy-700); background: #fff; box-shadow: 0 0 0 3px rgba(26,65,120,.15);
}
.form-field .invalid { border-color: #dc2626; }

.footer-title { margin-bottom: 1rem; font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; color: #fff; }

/* ---------- Modal (detalle de producto y visor de fotos) ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(6,15,30,.88); backdrop-filter: blur(4px); }
.modal.open { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-panel { position: relative; max-height: 92vh; width: 100%; max-width: 60rem; overflow: auto; border-radius: .75rem; background: #fff; }
.modal-close { position: absolute; right: .75rem; top: .75rem; z-index: 2; display: grid; place-items: center; height: 2.5rem; width: 2.5rem; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 1.6rem; line-height: 1; color: var(--navy-900); }
.modal-close:hover { background: var(--spark-500); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 55; display: grid; place-items: center;
  height: 3.75rem; width: 3.75rem; border-radius: 999px; background: #22c55e; color: #fff;
  box-shadow: 0 10px 25px -5px rgba(34,197,94,.55); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px; border: 2px solid #22c55e;
  animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* Animación de aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-slide { transform: none; }
}
