/* =============================================
   WebinLab → SDi  |  Estilos globales
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --azul-sdi:        #003A8C;
  --azul-medio:      #0057CC;
  --azul-claro:      #E8F0FE;
  --acento:          #F5A623;
  --texto:           #1C1C2E;
  --texto-suave:     #555566;
  --bg:              #F8F9FC;
  --blanco:          #FFFFFF;
  --borde:           #DDE2EF;
  --radio:           8px;
  --sombra:          0 2px 12px rgba(0,58,140,.1);
  --fuente:          'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  color: var(--texto);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--azul-medio); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---- Tipografía ---- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section--dark {
  background: var(--azul-sdi);
  color: var(--blanco);
}

.section--light {
  background: var(--azul-claro);
}

/* ---- HEADER / NAV ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blanco);
  border-bottom: 2px solid var(--azul-sdi);
  box-shadow: var(--sombra);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--azul-sdi);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.5px;
  line-height: 1;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
  /* Evitar que la imagen quede pixelada en pantallas HiDPI */
  image-rendering: -webkit-optimize-contrast;
}

.logo span { color: var(--azul-medio); }

/* Separador visual entre logo WebinLab y logo SDi en header */
.logo img + img {
  border-left: 1px solid var(--borde);
  padding-left: .6rem;
  margin-left: .1rem;
}

/* Nav */
.site-nav { display: flex; align-items: center; gap: .25rem; }

.site-nav a {
  color: var(--texto);
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--radio);
  transition: background .15s;
}

.site-nav a:hover,
.site-nav a.activo {
  background: var(--azul-claro);
  color: var(--azul-sdi);
  text-decoration: none;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--azul-sdi);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.menu-toggle.abierto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.abierto span:nth-child(2) { opacity: 0; }
.menu-toggle.abierto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--blanco);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.25rem;
    gap: .5rem;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    z-index: 99;
    border-top: 1px solid var(--borde);
  }

  .site-nav.abierto { transform: translateX(0); }
  .site-nav a { font-size: 1.05rem; width: 100%; padding: .75rem 1rem; }
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--azul-sdi) 0%, var(--azul-medio) 100%);
  color: var(--blanco);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero-pretitulo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: .35rem .9rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 { margin-bottom: 1rem; }

.hero-bajada {
  font-size: 1.15rem;
  opacity: .9;
  max-width: 620px;
  margin-bottom: 2rem;
}

/* ---- BOTONES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radio);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all .2s;
}

.btn-primario {
  background: var(--acento);
  color: #1C1C2E;
  border-color: var(--acento);
}

.btn-primario:hover {
  background: #e09010;
  border-color: #e09010;
  text-decoration: none;
}

.btn-secundario {
  background: transparent;
  color: var(--blanco);
  border-color: rgba(255,255,255,.6);
}

.btn-secundario:hover {
  background: rgba(255,255,255,.15);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--azul-medio);
  border-color: var(--azul-medio);
}

.btn-outline:hover {
  background: var(--azul-medio);
  color: var(--blanco);
  text-decoration: none;
}

.btn-group { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---- CARDS ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.75rem;
  box-shadow: var(--sombra);
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,58,140,.14);
}

/* Fuerza 2 columnas exactas (para bloques de 4 cards) */
.cards--2col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 600px) {
  .cards--2col {
    grid-template-columns: 1fr;
  }
}

.card-icono {
  width: 48px;
  height: 48px;
  background: var(--azul-claro);
  border-radius: var(--radio);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card h3 { margin-bottom: .5rem; }
.card p { color: var(--texto-suave); font-size: .95rem; margin-bottom: 1rem; }

/* ---- NOTICIAS ---- */
.noticia-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
}

.noticia-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.noticia-fuente {
  font-size: .75rem;
  font-weight: 600;
  color: var(--azul-medio);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .5rem;
}

.noticia-card h3 { margin-bottom: .75rem; font-size: 1.05rem; }
.noticia-card p { color: var(--texto-suave); font-size: .9rem; flex: 1; }
.noticia-card .btn { margin-top: 1rem; font-size: .85rem; }

/* ---- GRID PROYECTOS ---- */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.proyecto-item {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem 1.25rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--texto-suave);
  transition: all .2s;
}

.proyecto-item:hover {
  background: var(--azul-claro);
  color: var(--azul-sdi);
  border-color: var(--azul-medio);
}

/* ---- SECTION HEADER ---- */
.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 { margin-bottom: .5rem; }

.section-header p {
  color: var(--texto-suave);
  font-size: 1.05rem;
  max-width: 600px;
}

.section--dark .section-header p { color: rgba(255,255,255,.75); }

/* ---- STATS ---- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 0;
}

.stat {
  text-align: center;
  min-width: 120px;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--azul-sdi);
  line-height: 1;
}

.stat-label {
  font-size: .85rem;
  color: var(--texto-suave);
  margin-top: .25rem;
}

.section--dark .stat-num { color: var(--acento); }
.section--dark .stat-label { color: rgba(255,255,255,.7); }

/* ---- LISTA SERVICIOS ---- */
.servicios-lista {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}

.servicios-lista li {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: .9rem 1.1rem;
  font-size: .9rem;
  font-weight: 500;
}

.servicios-lista li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: var(--azul-sdi);
  color: white;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 800;
}

/* ---- CONTACTO INFO ---- */
.contacto-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.contacto-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1.25rem;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
}

.contacto-icono {
  font-size: 1.4rem;
  min-width: 2rem;
  text-align: center;
}

.contacto-item strong { display: block; font-size: .8rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .2rem; }
.contacto-item a { color: var(--texto); font-weight: 500; }
.contacto-item a:hover { color: var(--azul-medio); }

/* ---- ALERTA / BANNER KIT DIGITAL ---- */
.kit-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: var(--blanco);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.kit-banner-inner { max-width: 680px; }

.kit-icono {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.kit-banner h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.kit-banner p {
  font-size: 1.15rem;
  opacity: .85;
  margin-bottom: .75rem;
}

.kit-vuelve {
  display: inline-block;
  background: var(--acento);
  color: #1C1C2E;
  font-weight: 700;
  font-size: 1.1rem;
  padding: .75rem 2rem;
  border-radius: var(--radio);
  margin: 1.5rem 0;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--azul-sdi);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--blanco);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  margin-bottom: .4rem;
  transition: color .15s;
}

.footer-col a:hover {
  color: var(--blanco);
  text-decoration: none;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blanco);
  margin-bottom: .75rem;
  display: block;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
}

.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--blanco); text-decoration: none; }

/* ---- LEGAL ---- */
.legal-content {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 2.5rem;
  box-shadow: var(--sombra);
}

.legal-content h2 { margin: 2rem 0 .75rem; color: var(--azul-sdi); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-content li { margin-bottom: .4rem; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  padding: .75rem 0;
  font-size: .85rem;
  color: var(--texto-suave);
  border-bottom: 1px solid var(--borde);
  margin-bottom: 2rem;
}

.breadcrumb a { color: var(--azul-medio); }

/* ---- IMAGEN NOTICIA SDi ---- */
.hero-img {
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  margin-top: 2.5rem;
}

.hero-img img {
  width: 100%;
  object-fit: cover;
  max-height: 420px;
}

/* ---- UTILIDADES ---- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.tag {
  display: inline-block;
  background: var(--azul-claro);
  color: var(--azul-sdi);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: .75rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--borde);
  margin: 2.5rem 0;
}
