/* ============================================================
   KOBRA — BIM page styles
   Modificar AQUÍ para actualizar el diseño de la página /bim/
   ============================================================ */

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

:root {
  --kobra-naranja:      #F23827;
  --kobra-naranja-dark: #c92d1e;
  --kobra-negro:        #3F3F3E;
  --kobra-blanco:       #D4D8DA;
  --ink:          #0e0e0e;
  --ink-soft:     #1a1a1a;
  --ink-mid:      #272726;
  --accent:       var(--kobra-naranja);
  --accent-hover: var(--kobra-naranja-dark);
  --paper:        #f0edea;
  --text-primary: var(--kobra-blanco);
  --text-muted:   #8a8886;
  --text-warm:    #b5b1ac;
  --border:       rgba(255,255,255,0.07);
  --font-display: 'Archivo', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;
  --space-xs: 0.5rem;  --space-sm: 1rem;  --space-md: 1.5rem;
  --space-lg: 3rem;    --space-xl: 5rem;  --space-2xl: 8rem;
  --max-width: 1200px;
  --radius: 6px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-weight: 400; font-size: 16px; line-height: 1.65; color: var(--text-primary); background: var(--ink); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

/* ── TIPOGRAFÍA DE SECCIÓN ─────────────────────────────────── */
.section-label { font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-sm); }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; color: var(--paper); margin-bottom: var(--space-md); }
.section-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 560px; line-height: 1.6; }

/* ── NAV ───────────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0.75rem 0; transition: background 0.3s; }
.nav.scrolled { background: rgba(14,14,14,0.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-cta { background: var(--accent) !important; color: #fff !important; padding: 0.5rem 1.2rem; border-radius: var(--radius); transition: background 0.2s; }
.nav-cta:hover { background: var(--accent-hover) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--paper); margin: 5px 0; transition: transform 0.3s, opacity 0.3s; }

/* ── BOTONES ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.9rem 1.8rem; border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.25s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--paper); border: 1.5px solid rgba(255,255,255,0.15); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb855; transform: translateY(-1px); }
.wa-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: var(--space-2xl) 0 var(--space-xl); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(242,56,39,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(242,56,39,0.04) 1px, transparent 1px); background-size: 60px 60px; pointer-events: none; }
.hero::after { content: ''; position: absolute; top: -20%; right: -10%; width: 50%; height: 70%; background: radial-gradient(ellipse, rgba(242,56,39,0.07) 0%, transparent 65%); pointer-events: none; }
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow { font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-md); display: flex; align-items: center; gap: 0.75rem; }
.hero-eyebrow::before { content: ''; width: 2rem; height: 2px; background: var(--accent); }
.hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; color: var(--paper); margin-bottom: var(--space-md); max-width: 720px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-warm); max-width: 540px; margin-bottom: var(--space-lg); line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── SECCIONES DE CONTENIDO ─────────────────────────────────── */
.problem { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); margin-top: var(--space-lg); }
.problem-card { background: var(--ink-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-md); transition: border-color 0.3s; }
.problem-card:hover { border-color: rgba(242,56,39,0.25); }
.problem-icon { font-size: 1.5rem; margin-bottom: var(--space-sm); width: 48px; height: 48px; background: rgba(242,56,39,0.08); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.problem-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--paper); margin-bottom: 0.5rem; }
.problem-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

.services { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.service-item { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: center; padding: var(--space-lg) 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.service-item:last-child { border-bottom: none; }
.service-item.reverse { direction: rtl; }
.service-item.reverse > * { direction: ltr; }
.service-number { font-family: var(--font-display); font-weight: 900; font-size: 4rem; color: rgba(242,56,39,0.12); line-height: 1; margin-bottom: var(--space-xs); }
.service-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 3vw, 1.75rem); color: var(--paper); margin-bottom: var(--space-sm); }
.service-desc { color: var(--text-muted); margin-bottom: var(--space-md); line-height: 1.7; }
.service-features { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.service-tag { font-family: var(--font-display); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.35rem 0.75rem; background: rgba(242,56,39,0.08); color: var(--accent); border-radius: 100px; border: 1px solid rgba(242,56,39,0.18); }
.service-image { width: 100%; aspect-ratio: 4/3; background: var(--ink-mid); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); position: relative; }
.service-image img { width: 100%; height: 100%; object-fit: cover; }
.service-image .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.5rem; color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-display); background: linear-gradient(135deg, var(--ink-mid) 0%, var(--ink-soft) 100%); }
.placeholder-icon { width: 48px; height: 48px; border: 2px dashed rgba(255,255,255,0.15); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-muted); }

/* ── CAROUSEL ──────────────────────────────────────────────── */
.carousel { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius); }
.carousel-track { display: flex; height: 100%; transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.carousel-slide { flex: 0 0 100%; width: 100%; height: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-slide .placeholder { position: absolute; inset: 0; }

.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(14,14,14,0.72); border: 1px solid rgba(255,255,255,0.13); color: var(--paper); border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s, border-color 0.2s; backdrop-filter: blur(6px); padding: 0; }
.carousel-btn:hover { background: var(--accent); border-color: var(--accent); }
.carousel-prev { left: 0.65rem; }
.carousel-next { right: 0.65rem; }

.carousel-dots { position: absolute; bottom: 0.75rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.45rem; z-index: 10; }
.carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.28); border: none; cursor: pointer; transition: background 0.22s, transform 0.22s; padding: 0; }
.carousel-dot.active { background: var(--accent); transform: scale(1.35); }

/* Projects carousel */
.projects { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.projects-carousel-wrapper { margin-top: var(--space-lg); }
.projects-carousel { aspect-ratio: 16/9; max-height: 480px; border-radius: var(--radius); border: 1px solid var(--border); }
.project-card { position: relative; width: 100%; height: 100%; background: var(--ink-mid); cursor: pointer; transition: none; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.projects-carousel .carousel-slide:hover .project-card img { transform: scale(1.03); }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,14,14,0.9) 0%, transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-md); }
.project-type { font-family: var(--font-display); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.25rem; }
.project-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--paper); }
.project-location { font-size: 0.85rem; color: var(--text-muted); }

.process { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); margin-top: var(--space-lg); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--ink-soft); padding: var(--space-md); }
.step-num { font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; color: rgba(242,56,39,0.15); line-height: 1; margin-bottom: var(--space-sm); }
.step h3 { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--paper); margin-bottom: 0.5rem; }
.step p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }

.why { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.why-content { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: start; margin-top: var(--space-lg); }
.why-text p { color: var(--text-warm); margin-bottom: var(--space-md); line-height: 1.75; }
.why-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.stat { padding: var(--space-md); background: var(--ink-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-number { font-family: var(--font-display); font-weight: 900; font-size: 2rem; color: var(--accent); line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* ── CTA ───────────────────────────────────────────────────── */
.cta { padding: var(--space-2xl) 0; text-align: center; position: relative; }
.cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(242,56,39,0.05) 0%, transparent 70%); pointer-events: none; }
.cta-inner { position: relative; z-index: 2; }
.cta h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.75rem, 4vw, 2.75rem); color: var(--paper); margin-bottom: var(--space-sm); }
.cta p { color: var(--text-muted); margin-bottom: var(--space-lg); max-width: 480px; margin-left: auto; margin-right: auto; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer { padding: var(--space-lg) 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: var(--space-lg); }
.footer-brand { max-width: 300px; }
.footer-brand img { height: 22px; width: auto; margin-bottom: var(--space-sm); opacity: 0.7; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.footer-col h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--paper); margin-bottom: var(--space-sm); letter-spacing: 0.04em; text-transform: uppercase; }
.footer-col p, .footer-col a { font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; display: block; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.04); font-size: 0.75rem; color: var(--text-muted); }

/* ── WHATSAPP FLOTANTE ─────────────────────────────────────── */
.wa-float { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,0.35); transition: transform 0.3s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ── SERVICIOS RELACIONADOS ─────────────────────────────────── */
.related-svcs { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.rel-svcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.rel-svc {
  display: flex; flex-direction: column;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--ink-soft); border: 1px solid var(--border);
  border-radius: 8px; position: relative; overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s;
  text-decoration: none;
}
.rel-svc::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.rel-svc:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,.55); border-color: rgba(242,56,39,.3); }
.rel-svc:hover::after { transform: scaleX(1); }
.rel-svc-icon {
  width: 56px; height: 56px; background: rgba(242,56,39,.08);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; flex-shrink: 0; transition: background .25s;
}
.rel-svc:hover .rel-svc-icon { background: rgba(242,56,39,.2); }
.rel-svc-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--paper); line-height: 1.15; margin-bottom: .75rem; }
.rel-svc-desc { font-size: .95rem; color: var(--text-muted); line-height: 1.7; flex: 1; margin-bottom: 1.5rem; }
.rel-svc-link {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  padding: .55rem 1.15rem; border: 1.5px solid rgba(242,56,39,.5);
  border-radius: 100px; transition: background .22s, color .22s, border-color .22s;
}
.rel-svc:hover .rel-svc-link { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── COMPLETA TU PROYECTO (cross-sell grid) ──────────────────── */
.ctp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; margin-top: var(--space-lg); }
.sc { background: var(--ink-soft); padding: clamp(1.5rem, 3vw, 2.5rem); transition: background .3s; display: flex; flex-direction: column; min-height: 260px; text-decoration: none; }
.sc:hover { background: var(--ink-mid); }
.si2 { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; background: rgba(242,56,39,.1); color: var(--accent); flex-shrink: 0; }
.sc h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--paper); margin-bottom: .5rem; line-height: 1.15; }
.sc p { font-size: .9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; flex: 1; }
.scl { font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; transition: gap .2s; }
.sc:hover .scl { gap: .7rem; }
.scl svg { width: 14px; height: 14px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── ANIMACIONES ───────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .fade-in.visible { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .service-item { grid-template-columns: 1fr; gap: var(--space-md); }
  .service-item.reverse { direction: ltr; }
  .why-content { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .projects-carousel { aspect-ratio: 4/3; max-height: 360px; }
  .rel-svcs { grid-template-columns: 1fr 1fr; }
  .ctp-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(14,14,14,0.97); backdrop-filter: blur(16px); flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; z-index: 200; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: block; z-index: 201; }
  .process-steps { grid-template-columns: 1fr; }
  .why-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; }
  .rel-svcs { grid-template-columns: 1fr; }
  .ctp-grid { grid-template-columns: 1fr; }
}
