/* ============================================================
   KOBRA — Design system Barlow (subpáginas)
   Cargado por: arquitectura, estructuras, cgi, dro, fotogrametría
   Modificar AQUÍ para actualizar estilos de todas las subpáginas
   a la vez, sin tocar ningún index.php individualmente.
   ============================================================ */

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

:root {
  --n:    #F23827;                    /* acento rojo KOBRA */
  --nd:   #d42f20;                    /* acento hover */
  --ng:   rgba(242,56,39,.15);        /* acento fondo translúcido */
  --ne:   #3F3F3E;                    /* neutro oscuro */
  --bl:   #D4D8DA;                    /* texto claro */
  --bg:   #1a1a19;                    /* fondo principal */
  --bgc:  #262625;                    /* fondo tarjeta */
  --bgch: #2e2e2d;                    /* fondo tarjeta hover */
  --tp:   #e8e6e2;                    /* texto primario */
  --tm:   #9a9895;                    /* texto muted */
  --tw:   #c4c0ba;                    /* texto warm */
  --b1:   rgba(212,216,218,.08);      /* borde sutil */
  --fd:   'Barlow Condensed', sans-serif;
  --fb:   'Barlow', sans-serif;
  --r:    4px;
  --mw:   1200px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.65;
  color: var(--tp);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── CONTENEDOR ────────────────────────────────────────────── */
/* .c = clases Barlow, .container = usado por footer.php */
.c,
.container { max-width: var(--mw); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

/* ── TIPOGRAFÍA DE SECCIÓN ─────────────────────────────────── */
.sl {
  font-family: var(--fd);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--n);
  margin-bottom: 1rem;
}
.st {
  font-family: var(--fd);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  color: var(--bl);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.ss { font-size: 1.05rem; color: var(--tm); max-width: 560px; line-height: 1.6; }

/* ── BOTONES ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--fd);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .9rem 1.8rem;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: all .25s;
}
.bp { background: var(--n); color: #fff; }
.bp:hover { background: var(--nd); transform: translateY(-1px); }

.bo { background: transparent; color: var(--bl); border: 1.5px solid rgba(212,216,218,.25); }
.bo:hover { border-color: var(--n); color: var(--n); }

.bw { background: #25d366; color: #fff; }
.bw:hover { background: #1fb855; transform: translateY(-1px); }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 0 5rem;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242,56,39,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,56,39,.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -30%; right: -15%;
  width: 50%; height: 80%;
  background: radial-gradient(ellipse, rgba(242,56,39,.07) 0%, transparent 65%);
  pointer-events: none;
}
.hc { position: relative; z-index: 2; }

.he {
  font-family: var(--fd);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--n);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.he::before { content: ''; width: 2.5rem; height: 2px; background: var(--n); }

.hero h1 {
  font-family: var(--fd);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  color: var(--bl);
  margin-bottom: 1.5rem;
  max-width: 720px;
  text-transform: uppercase;
}
.hero h1 em { font-style: normal; color: var(--n); }

.hsb {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--tw);
  max-width: 540px;
  margin-bottom: 3rem;
  line-height: 1.7;
}
.ha { display: flex; gap: 1rem; flex-wrap: wrap; }


/* ── SECCIÓN BASE ──────────────────────────────────────────── */
.sec { padding: 5rem 0; border-top: 1px solid var(--b1); }

/* ── TARJETAS (problema / equipo / características) ─────────── */
.prg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.prc {
  background: var(--bgc);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: border-color .3s;
}
.prc:hover { border-color: rgba(242,56,39,.2); }
.pri {
  width: 48px; height: 48px;
  background: var(--ng);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.prc h3 {
  font-family: var(--fd);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bl);
  margin-bottom: .5rem;
  text-transform: uppercase;
}
.prc p { font-size: .9rem; color: var(--tm); line-height: 1.6; }

/* ── SERVICIOS (layout imagen + texto alterno) ──────────────── */
.si {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--b1);
}
.si:last-child { border-bottom: none; }
.si.rev { direction: rtl; }
.si.rev > * { direction: ltr; }

.snum {
  font-family: var(--fd);
  font-weight: 900;
  font-size: 4rem;
  color: rgba(242,56,39,.1);
  line-height: 1;
  margin-bottom: .5rem;
}
.sn {
  font-family: var(--fd);
  font-weight: 800;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  color: var(--bl);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.sd { color: var(--tm); margin-bottom: 1.5rem; line-height: 1.7; }
.sf { display: flex; flex-wrap: wrap; gap: .5rem; }
.stag {
  font-family: var(--fd);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem .75rem;
  background: var(--ng);
  color: var(--n);
  border-radius: 100px;
  border: 1px solid rgba(242,56,39,.15);
}
.sim {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bgc);
  border-radius: var(--r);
  border: 1px solid var(--b1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tm);
  font-size: .85rem;
  font-family: var(--fd);
  text-align: center;
  padding: 1rem;
}

.sim-video {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--ink-mid);
}

/* ── PORTAFOLIO / PROYECTOS ─────────────────────────────────── */
.pg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.pc {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bgc);
  border: 1px solid var(--b1);
  transition: transform .3s;
}
.pc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc:hover { transform: translateY(-4px); }
.po {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14,14,14,0.92) 0%,
    rgba(14,14,14,0.5) 50%,
    rgba(14,14,14,0.35) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.pt { font-family: var(--fd); font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--n); }
.pn { font-family: var(--fd); font-weight: 800; font-size: 1.2rem; color: var(--bl); text-transform: uppercase; }
.plc { font-size: .85rem; color: var(--tm); }

/* ── NORMATIVAS / ETIQUETAS TÉCNICAS ────────────────────────── */
.norms { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.norm {
  font-family: var(--fd);
  font-size: .85rem;
  font-weight: 700;
  padding: .6rem 1.2rem;
  background: var(--bgc);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  color: var(--bl);
  letter-spacing: .04em;
}

/* ── OFERTA / BANNER DESTACADO ───────────────────────────────── */
.offer {
  background: var(--n);
  color: #fff;
  padding: 2.5rem;
  border-radius: var(--r);
  margin-top: 3rem;
  text-align: center;
}
.offer h3 { font-family: var(--fd); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; margin-bottom: .5rem; }
.offer p { font-size: 1rem; opacity: .9; }

/* ── CTA FINAL ─────────────────────────────────────────────── */
.cta { padding: 8rem 0; text-align: center; position: relative; }
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(242,56,39,.05) 0%, transparent 65%);
  pointer-events: none;
}
.ci { position: relative; z-index: 2; }
.cta h2 {
  font-family: var(--fd);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--bl);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.cp { color: var(--tm); margin-bottom: 3rem; max-width: 480px; margin-left: auto; margin-right: auto; font-size: 1.05rem; }
.ca { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── NAV (generado por includes/nav.php) ────────────────────── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1rem 0; transition: background .3s; }
nav.scrolled { background: rgba(26,26,25,.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--b1); }

.nav-inner {
  max-width: var(--mw);
  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(--fd);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tm);
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--bl); }

.nav-cta { background: var(--n) !important; color: #fff !important; padding: .5rem 1.2rem; border-radius: var(--r); }
.nav-cta:hover { opacity: .88; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--bl); margin: 5px 0; transition: transform .3s, opacity .3s; }

/* ── FOOTER (generado por includes/footer.php) ──────────────── */
.footer { padding: 3rem 0; border-top: 1px solid var(--b1); }
.footer-inner { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 3rem; }
.footer-brand { max-width: 300px; }
.footer-brand img { height: 22px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: .85rem; color: var(--tm); line-height: 1.6; }

.footer-col h4 {
  font-family: var(--fd);
  font-weight: 700;
  font-size: .9rem;
  color: var(--bl);
  margin-bottom: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.footer-col p,
.footer-col a { font-size: .85rem; color: var(--tm); line-height: 1.8; display: block; }
.footer-col a:hover { color: var(--n); }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--b1);
  font-size: .75rem;
  color: var(--tm);
}

/* ── 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,.35);
  transition: transform .3s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ── SERVICIOS RELACIONADOS ─────────────────────────────────── */
.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(--bgc); border: 1px solid var(--b1);
  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(--n); 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,.5); border-color: rgba(242,56,39,.25); }
.rel-svc:hover::after { transform: scaleX(1); }
.rel-svc-icon {
  width: 56px; height: 56px; background: var(--ng);
  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,.22); }
.rel-svc-name { font-family: var(--fd); font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--tp); line-height: 1.15; margin-bottom: .75rem; }
.rel-svc-desc { font-size: .95rem; color: var(--tw); 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(--fb); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--n);
  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(--n); color: #fff; border-color: var(--n); }

/* ── COMPLETA TU PROYECTO (cross-sell grid) ──────────────────── */
.ctp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--b1); border-radius: var(--r); overflow: hidden; margin-top: 2rem; }
.sc { background: var(--bgc); 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(--bgch); }
.si2 { width: 48px; height: 48px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; background: var(--ng); color: var(--n); flex-shrink: 0; }
.sc h3 { font-family: var(--fd); font-weight: 800; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--tp); margin-bottom: .5rem; line-height: 1.15; }
.sc p { font-size: .9rem; color: var(--tm); line-height: 1.65; margin-bottom: 1.5rem; flex: 1; }
.scl { font-family: var(--fb); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--n); display: inline-flex; align-items: center; gap: .4rem; transition: gap .2s; }
.sc:hover .scl { gap: .7rem; }
.scl svg { width: 14px; height: 14px; stroke: var(--n); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .si { grid-template-columns: 1fr; }
  .si.rev { direction: ltr; }
  .pg { grid-template-columns: 1fr; }
  .rel-svcs { grid-template-columns: 1fr 1fr; }
  .ctp-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  /* Nav móvil */
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,26,25,.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; }

  /* Layouts */
  .fi2 { flex-direction: column; }
  .footer-inner { flex-direction: column; }
  .rel-svcs { grid-template-columns: 1fr; }
  .ctp-grid { grid-template-columns: 1fr; }
}
