/* ===== Colores y medidas base ===== */
:root {
  --grafito: #17191E;
  --grafito-2: #22252C;
  --grafito-3: #0F1114;
  --azul: #1E56A0;
  --azul-hover: #17457F;
  --amarillo: #F2B705;
  --texto: #17191E;
  --texto-suave: #454B55;
  --gris: #5A606B;
  --fondo: #F3F4F6;
  --borde: #DDE1E6;
  --placeholder: #E4E7EB;
  --ancho: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Barlow, system-ui, sans-serif; font-size: 17px; line-height: 1.55; color: var(--texto); background: #fff; }
h1, h2, h3 { font-family: "Barlow Condensed", Barlow, sans-serif; margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }
.seccion { padding: 72px 0; }
.titulo { font-size: clamp(34px, 4.5vw, 48px); font-weight: 800; }
.bajada { font-size: 18px; color: var(--texto-suave); margin-top: 10px; max-width: 640px; }

/* ===== Botones ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 4px; border: 2px solid transparent; font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none; }
.btn--amarillo { background: var(--amarillo); color: var(--grafito); }
.btn--amarillo:hover { background: #D9A300; }
.btn--azul { background: var(--azul); color: #fff; }
.btn--azul:hover { background: var(--azul-hover); }
.btn--contorno { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn--contorno:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* ===== Espacios para imágenes ===== */
.foto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--placeholder); border: 2px dashed #A9B0BA; color: var(--gris); text-align: center; padding: 16px; }
.foto strong { font-size: 15px; }
.foto span { font-size: 13px; }

/* ===== 01 Barra superior ===== */
.barra { background: var(--grafito-3); color: #C9CED6; font-size: 14px; }
.barra .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 8px; padding-bottom: 8px; }
.barra-servicios { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.barra-servicios span + span::before { content: "|"; margin-right: 14px; color: #5A606B; }
.barra-servicios .resalta { color: #fff; font-weight: 600; }
.barra-redes { display: flex; gap: 6px; }
.barra-redes button { width: 34px; height: 34px; border: 0; border-radius: 4px; background: transparent; color: #C9CED6; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.barra-redes button:hover { background: var(--grafito-2); color: #fff; }

/* ===== 02 Encabezado ===== */
.encabezado { background: var(--grafito); color: #fff; position: sticky; top: 0; z-index: 40; border-bottom: 3px solid var(--amarillo); }
.encabezado .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { width: 52px; height: 52px; border: 1.5px dashed #7C838E; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #B4BAC3; }
.marca-texto { display: flex; flex-direction: column; }
.marca-nombre { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: 0.5px; }
.marca-sub { font-size: 13px; color: #B4BAC3; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 22px; }
.menu a { color: #E2E5EA; text-decoration: none; padding: 10px 0; font-weight: 500; }
.menu a:hover { color: var(--amarillo); }
.menu .btn { min-height: 44px; }

/* ===== 03 Portada con carrusel ===== */
.carrusel { position: relative; background: var(--grafito-2); color: #fff; overflow: hidden; }
.slide { display: none; min-height: 520px; position: relative; }
.slide.activo { display: grid; }
.slide-fondo { grid-area: 1 / 1; border: 0; background: repeating-linear-gradient(135deg, #2A2E36 0 22px, #262A31 22px 44px); color: #8F96A1; align-items: flex-end; justify-content: flex-end; padding: 20px 24px; text-align: right; }
.slide-contenido { grid-area: 1 / 1; align-self: center; z-index: 1; }
.slide-contenido .contenedor { display: flex; flex-direction: column; gap: 18px; padding-top: 64px; padding-bottom: 150px; }
.slide-etiqueta { display: inline-block; align-self: flex-start; background: var(--amarillo); color: var(--grafito); font-weight: 700; font-size: 15px; padding: 4px 12px; border-radius: 3px; }
.slide h1, .slide h2 { font-size: clamp(46px, 7vw, 84px); font-weight: 800; max-width: 760px; }
.slide p { font-size: 20px; color: #D7DBE1; max-width: 560px; }
.slide .botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.carrusel-controles { position: absolute; left: 0; right: 0; bottom: 72px; z-index: 2; }
.carrusel-controles .contenedor { display: flex; align-items: center; gap: 12px; }
.flecha { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.6); background: rgba(15,17,20,0.4); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.flecha:hover { border-color: #fff; }
.puntos { display: flex; gap: 4px; }
.punto { width: 32px; height: 44px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; }
.punto span { display: block; width: 100%; height: 4px; background: rgba(255,255,255,0.4); border-radius: 2px; }
.punto[aria-current="true"] span { background: var(--amarillo); }

/* ===== 04 Accesos rápidos ===== */
.accesos { margin-top: -48px; position: relative; z-index: 3; }
.accesos .contenedor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.acceso { background: #fff; border: 1px solid var(--borde); border-top: 4px solid var(--azul); border-radius: 4px; padding: 24px; display: flex; align-items: center; gap: 16px; text-decoration: none; box-shadow: 0 10px 24px rgba(23, 25, 30, 0.08); }
.acceso:hover { border-top-color: var(--amarillo); }
.acceso-icono { width: 52px; height: 52px; flex: none; border-radius: 4px; background: var(--fondo); display: flex; align-items: center; justify-content: center; }
.acceso h3 { font-size: 26px; font-weight: 700; }
.acceso p { font-size: 15px; color: var(--gris); }

/* ===== 05 Nosotros ===== */
.nosotros .contenedor { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.nosotros-texto { flex: 1 1 460px; display: flex; flex-direction: column; gap: 18px; }
.nosotros-texto p { color: var(--texto-suave); font-size: 18px; }
.cifras { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 6px; }
.cifra strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 44px; font-weight: 800; color: var(--azul); line-height: 1; }
.cifra span { font-size: 15px; color: var(--gris); }
.nosotros .foto { flex: 1 1 420px; height: 360px; }

/* ===== 06 Servicios ===== */
.servicios { background: var(--fondo); }
.rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.servicio { background: #fff; border: 1px solid var(--borde); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.servicio .foto { height: 190px; border-width: 0 0 2px 0; }
.servicio-cuerpo { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.servicio h3 { font-size: 28px; font-weight: 700; }
.servicio p { font-size: 16px; color: var(--texto-suave); flex: 1; }
.ver-mas { align-self: flex-start; background: none; border: 0; padding: 8px 0; color: var(--azul); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ===== 07 Productos ===== */
.productos-rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.producto { border: 1px solid var(--borde); border-radius: 4px; overflow: hidden; background: #fff; text-align: left; padding: 0; cursor: pointer; display: flex; flex-direction: column; }
.producto:hover { border-color: var(--azul); }
.producto .foto { height: 170px; border-width: 0 0 2px 0; width: 100%; }
.producto span.nombre { display: block; padding: 16px 18px; font-family: "Barlow Condensed", sans-serif; font-size: 24px; font-weight: 700; color: var(--texto); }

/* ===== 08 Franja de dudas ===== */
.dudas { background: var(--azul); color: #fff; }
.dudas .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 44px; padding-bottom: 44px; }
.dudas h2 { font-size: clamp(34px, 4vw, 46px); font-weight: 800; }
.dudas p { color: #DCE6F5; margin-top: 6px; }
.telefonos { display: flex; flex-wrap: wrap; gap: 12px; }
.telefono { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.35); color: #fff; border-radius: 4px; padding: 10px 18px; cursor: pointer; text-align: left; min-height: 48px; }
.telefono:hover { background: rgba(255,255,255,0.18); }
.telefono small { display: block; font-size: 13px; color: #DCE6F5; }
.telefono strong { font-size: 18px; }

/* ===== 09 Ubicación ===== */
.ubicacion-caja { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.ubicacion-caja .foto { flex: 2 1 520px; height: 380px; }
.datos { flex: 1 1 300px; border: 1px solid var(--borde); border-radius: 4px; padding: 26px; display: flex; flex-direction: column; gap: 22px; }
.datos h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.datos p { color: var(--texto-suave); }
.fila { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #ECEEF1; font-size: 16px; }
.fila:last-child { border-bottom: 0; }
.fila span:last-child { font-weight: 600; }
.datos .btn { width: 100%; }

/* ===== 10 Boletín ===== */
.boletin { background: var(--grafito-2); color: #fff; }
.boletin .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.boletin h2 { font-size: clamp(32px, 4vw, 42px); font-weight: 800; }
.boletin p { color: #C9CED6; margin-top: 6px; }
.boletin-form { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 380px; max-width: 520px; }
.boletin-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boletin-form input { flex: 1 1 240px; min-height: 48px; padding: 0 16px; border-radius: 4px; border: 1px solid #5A606B; background: var(--grafito); color: #fff; font: inherit; }
.boletin-form input::placeholder { color: #9AA1AC; }

/* ===== 11 Pie de página ===== */
.pie { background: var(--grafito-3); color: #B4BAC3; font-size: 15px; }
.pie-columnas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.pie h3 { color: #fff; font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.pie ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pie a, .pie .enlace { color: #B4BAC3; text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left; }
.pie a:hover, .pie .enlace:hover { color: #fff; text-decoration: underline; }
.pie-redes { display: flex; flex-wrap: wrap; gap: 8px; }
.pie-redes button { width: 44px; height: 44px; border: 1px solid #3A3F48; border-radius: 4px; background: transparent; color: #C9CED6; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pie-redes button:hover { border-color: #fff; color: #fff; }
.pie-final { border-top: 1px solid #2A2E35; }
.pie-final .contenedor { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 24px; font-size: 14px; }

/* ===== Botón flotante ===== */
.flotante { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 16px; border-radius: 30px; border: 0; background: var(--amarillo); color: var(--grafito); font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 8px 22px rgba(15, 17, 20, 0.3); }
.flotante:hover { background: #D9A300; }

/* ===== Pop up de prueba ===== */
.aviso { border: 0; border-radius: 6px; border-top: 5px solid var(--amarillo); padding: 28px; max-width: 400px; width: calc(100% - 48px); box-shadow: 0 24px 60px rgba(15, 17, 20, 0.35); }
.aviso::backdrop { background: rgba(15, 17, 20, 0.6); }
.aviso h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.aviso p { color: var(--texto-suave); margin-bottom: 22px; }
.aviso .btn { width: 100%; }

/* ===== Responsivo ===== */
@media (max-width: 980px) {
  .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .productos-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pie-columnas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .accesos .contenedor { grid-template-columns: 1fr; }
  .accesos { margin-top: -32px; }
  .carrusel-controles { bottom: 52px; }
  .rejilla, .productos-rejilla, .pie-columnas { grid-template-columns: 1fr; }
  .slide { min-height: 480px; }
  .seccion { padding: 56px 0; }
  .flotante span { display: none; }
  .flotante { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ===== Pestaña activa del menú ===== */
.menu a[aria-current="page"] { color: var(--amarillo); box-shadow: inset 0 -3px 0 var(--amarillo); }

/* ===== Encabezado de páginas internas ===== */
.cabecera-pagina { background: var(--grafito-2); color: #fff; border-bottom: 1px solid #2E323A; }
.cabecera-pagina .contenedor { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 12px; }
.migas { font-size: 15px; color: #B4BAC3; }
.migas a { color: #E2E5EA; }
.cabecera-pagina h1 { font-size: clamp(44px, 6vw, 68px); font-weight: 800; }
.cabecera-pagina p { font-size: 19px; color: #D7DBE1; max-width: 620px; }

/* ===== Bloques de texto en páginas internas ===== */
.bloques { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.bloque { border: 1px solid var(--borde); border-top: 4px solid var(--azul); border-radius: 4px; padding: 24px; background: #fff; }
.bloque h3 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.bloque p { color: var(--texto-suave); font-size: 16px; }
.centrado { display: flex; justify-content: center; margin-top: 36px; }
.ver-mas { text-decoration: underline; }
@media (max-width: 980px) { .bloques { grid-template-columns: 1fr; } }
