/* ==========================================================================
   IP Informática — estilos generales (escritorio).
   Tablet y móvil (<= 800 px): style_800.css.
   ========================================================================== */

/* Raleway (variable, pesos 300-700, juego latino), servida desde el propio dominio:
   sin peticiones a Google Fonts. */
@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/raleway-latin.woff2") format("woff2");
}

:root {
    /* Colores corporativos (img/LOGOTIPOS IP.PDF): oscuro PANTONE 3165C, claro PANTONE 324C */
    --teal: #004c5b;         /* color principal: títulos, botones, iconos (PANTONE 3165C) */
    --teal-oscuro: #003a42;  /* hover de botones */
    --logo: #004c5b;         /* círculo del logo (PANTONE 3165C) */
    --celeste: #c4e4e3;      /* "iP" del logo (PANTONE 324C) */
    --topbar: #26282c;       /* barra superior */
    --gris-fondo: #f6f6f6;   /* pie y sección de ubicación */
    --gris-linea: #e3e3e3;
    --gris-icono: #8d9095;   /* iconos de "La solución que busca" */
    --gris-barra: #8a8d93;   /* barras de "Nuestros servicios" */
    --texto: #333;
    --texto-suave: #777;
    --raleway: "Raleway", "Segoe UI", Helvetica, Arial, sans-serif;
    --arial: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; font-family: var(--arial); font-size: 15px; line-height: 1.6; color: var(--texto); background: #fff; font-variant-numeric: lining-nums; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.wide { max-width: 1640px; }
.container.narrow { max-width: 860px; }
[hidden] { display: none !important; } /* que el atributo hidden gane a reglas como .btn { display: … } */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1em; height: 1em; flex: none; }
.sep { opacity: .7; }

/* Botón (estilo de la web antigua: rectangular, verde azulado) */
.btn { display: inline-block; padding: 12px 18px; border: 0; border-radius: 3px; background: var(--teal); color: #fff; font-family: var(--raleway); font-size: 1rem; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background .2s; }
.btn:hover, .btn:focus-visible { background: var(--teal-oscuro); color: #fff; }

/* ---------- Barra superior (datos de contacto) ---------- */
.topbar { background: var(--topbar); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.4; }
.topbar .container { padding-top: 10px; padding-bottom: 10px; }
.topbar-datos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; }
.topbar-datos li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.topbar a:hover { color: var(--celeste); }
.topbar .icon { width: 12px; height: 12px; }
.topbar-lema { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 34px; margin-top: 14px; }
.topbar .social { gap: 16px; }
.topbar .social a { width: auto; height: auto; border: 0; background: none; color: #fff; }
.topbar .social a:hover { color: var(--celeste); background: none; }
.topbar .social svg { width: 13px; height: 13px; }

/* ---------- Cabecera (logo + menú), fija al hacer scroll ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #b9b9b9; box-shadow: 0 2px 6px rgba(0, 0, 0, .05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; }
.brand { display: block; }
.brand img { height: 64px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 44px; }
.main-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; color: #3a3a3a; font-family: var(--raleway); font-size: 20px; font-weight: 500; text-decoration: none; transition: color .2s; }
.main-nav a .icon { width: 15px; height: 15px; }
.main-nav a span { border-bottom: 2px solid transparent; padding-bottom: 3px; }
.main-nav a:hover, .main-nav a.activo { color: var(--teal); }
.main-nav a.activo span { border-bottom-color: var(--teal); }
.menu-toggle, .burger { display: none; }

/* ---------- Slider de productos (slider.php + js/web.js) ---------- */
.slider { position: relative; }
.slides { display: grid; }
/* Todas las diapositivas ocupan la misma celda: el alto lo marca la más alta, sin saltos. */
.slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.slide.activo { opacity: 1; visibility: visible; }
.slide.texto-imagen .slide-img { order: 2; }
.slide-img img { margin: 0 auto; object-fit: contain; }
.slide-text { text-align: center; }
.slide-title { margin: 0 0 14px; font-family: var(--raleway); font-weight: 500; color: #222; line-height: 1.15; }
.slide-sub { margin: 0; font-size: 1.4rem; color: #111; line-height: 1.35; }
.kyocera { width: 100%; max-width: 380px; margin: 22px auto; }
.slider-btn { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(51, 51, 51, .9); color: #fff; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.slider-btn:hover, .slider-btn:focus-visible { background: var(--teal); }
.slider-btn .icon { width: 24px; height: 24px; stroke-width: 3; }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }
.slider-dots { display: none; justify-content: center; gap: 10px; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c9c9c9; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--teal); }
.slider.js .slider-btn, .slider.js .slider-dots { display: flex; }

/* Versión grande (portada) */
.hero { border-bottom: 1px solid #555; }
.slider-hero .slides { max-width: 1240px; margin: 0 auto; padding: 30px 90px 50px; min-height: 525px; }
.slider-hero .slide.texto-imagen { grid-template-columns: 1.6fr 1fr; }
.slider-hero .slide-img img { max-height: 400px; width: auto; }
.slider-hero .slide-title { font-size: clamp(1.8rem, 3.2vw, 3rem); }
.slider-hero .texto-imagen .slide-title { font-size: clamp(1.4rem, 2.1vw, 1.95rem); margin-bottom: 40px; }
.slider-hero .texto-imagen .slide-sub { font-family: var(--raleway); font-size: clamp(1.3rem, 2vw, 1.85rem); font-weight: 500; color: #222; }
.slider-hero .slider-dots { position: absolute; left: 0; right: 0; bottom: 18px; }

/* Versión reducida (servicios, «Especialistas en impresoras»): sin flechas, solo puntos */
.slider-mini .slide { grid-template-columns: 1.4fr 1fr; gap: 20px; }
.slider-mini .slide-img img { max-height: 190px; width: auto; }
.slider-mini .slide-title { font-size: 1.05rem; margin-bottom: 8px; }
.slider-mini .slide-sub { font-size: .85rem; }
.slider-mini .kyocera { max-width: 190px; margin: 12px auto; }
.slider-mini.js .slider-btn { display: none; }
.slider-mini .slider-dots { margin-top: 16px; }

/* ---------- Secciones y títulos ---------- */
.section { padding: 60px 0 70px; 
    max-width: 1024px;
    margin: 0 auto; }
.section.gris { background: var(--gris-fondo); border-top: 1px solid var(--gris-linea); }
.page-title { margin: 0 0 46px; font-family: var(--raleway); font-size: clamp(1.9rem, 3.2vw, 2.85rem); font-weight: 400; line-height: 1.2; color: var(--teal); text-align: center; }
.page-title.oscuro { color: var(--texto); font-weight: 300; }

/* ---------- Portada ---------- */
.intro { padding-top: 26px; }
.intro .page-title { margin-bottom: 52px; }
.intro-text { max-width: 1580px; margin: 0 auto 60px; font-size: 14px; color: var(--texto-suave); }
.intro-text strong { color: #666; }

/* Título con líneas a los lados («La solución que busca») */
.title-lines { display: flex; align-items: center; gap: 34px; max-width: 1560px; margin: 0 auto 36px; font-family: var(--raleway); font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 400; line-height: 1.2; color: var(--teal); text-align: center; }
.title-lines::before, .title-lines::after { content: ""; flex: 1; border-top: 1px solid #333; }

.soluciones { list-style: none; margin: 0 auto 56px; padding: 0; max-width: 1640px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.soluciones li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--raleway); font-size: 24px; font-weight: 500; color: var(--gris-icono); }
.soluciones .icon { width: auto; height: 46px; stroke-width: 1.6; }

/* Llamada a la acción (cta.php) */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border: 1px solid #333; border-left: 6px solid var(--teal); background: #fff; }
.cta p { margin: 0; font-family: var(--raleway); font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 500; line-height: 1.3; color: var(--teal); }
.cta .btn { flex: none; padding: 14px 16px; font-size: 1.1rem; }

/* ---------- Servicios ---------- */
.ventajas { list-style: none; margin: 0 auto 70px; padding: 0; max-width: 1200px; display: grid; grid-template-columns: 1fr 1fr; }
.ventajas li { padding: 6px 20px 22px; font-family: var(--raleway); text-align: center; }
.ventajas li:nth-child(odd) { border-right: 1px solid #eee; }
.ventajas li:nth-child(-n+2) { border-bottom: 1px solid #eee; margin-bottom: 22px; }
.ventaja-icono { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 16px; background: var(--teal); color: #fff; }
.ventaja-icono .icon { width: 30px; height: 30px; }
.ventajas h2 { margin: 0 0 8px; font-size: 24px; font-weight: 500; line-height: 1.2; color: #222; }
.ventajas p { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--texto); }

.servicios-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.col-title { margin: 0 0 40px; font-family: var(--raleway); font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 400; line-height: 1.2; color: var(--texto); }
.barras { list-style: none; margin: 60px 0 0; padding: 0; display: grid; gap: 12px; }
.barras li { padding: 2px 14px; border-radius: 3px; background: var(--gris-barra); color: #fff; font-size: 14px; }

/* ---------- Contacto ---------- */
.contacto { padding-top: 90px; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contacto-info { font-family: var(--raleway); font-size: 16px; font-weight: 500; color: var(--texto); }
.contacto-intro { margin: 0 0 30px; font-size: 21px; line-height: 1.2; }
.contacto-info dl { margin: 0; }
.contacto-info dt { margin: 0 0 8px; }
.contacto-info dd { margin: 0 0 26px; line-height: 1.4; }
.contacto-info dd a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.contacto-info dd a:hover { color: var(--teal); }
.contacto-info dd.telefonos { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.contacto-info .social { justify-content: flex-start; gap: 4px; }
.contacto-info .social a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1.5px solid var(--teal); border-radius: 50%; color: var(--teal); }
.contacto-info .social a:hover { background: var(--teal); color: #fff; }
.contacto-info .social svg { width: 13px; height: 13px; }

.contact-form { display: grid; gap: 10px; }
.contact-form label { display: block; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=tel], .contact-form textarea { width: 100%; padding: 10px; border: 1px solid #d3d3d3; border-radius: 2px; background: #fff; color: var(--texto); font: 14px var(--arial); }
.contact-form input:not([type=checkbox]) { min-height: 41px; }
.contact-form textarea { height: 240px; resize: vertical; }
.contact-form ::placeholder { color: var(--texto-suave); opacity: 1; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0, 76, 91, .2); }
.contact-form .check { display: flex; gap: 6px; align-items: flex-start; padding-left: 14px; font-size: 14px; color: var(--texto-suave); }
.contact-form .check input { margin: 3px 0 0; }
.contact-form .check a { color: var(--teal-oscuro); }
.contact-form .btn { justify-self: start; padding: 7px 12px; }
.hp { position: absolute; left: -9999px; }
.alert { margin-bottom: 16px; padding: 12px 16px; border-radius: 3px; font-weight: 600; }
.alert.ok { background: #e6f4f1; border: 1px solid var(--teal); color: var(--teal-oscuro); }
.alert.error { background: #fde8e8; border: 1px solid #c0392b; color: #8e2a1f; }

.ubicacion { padding-top: 60px; background: var(--gris-fondo); border-top: 1px solid var(--gris-linea); text-align: center; }
.ubicacion h2 { margin: 0 0 50px; font-family: var(--raleway); font-size: 26px; font-weight: 500; color: var(--texto); }
/* Mapa: js/web.js crea el iframe solo si se aceptan las cookies; hasta entonces, .mapa-aviso */
.mapa { position: relative; height: 400px; background-color: #e9f0f0; background-image: linear-gradient(rgba(0, 76, 91, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 76, 91, .07) 1px, transparent 1px); background-size: 40px 40px; }
.mapa iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.mapa-aviso { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; max-width: 620px; height: 100%; margin: 0 auto; padding: 20px; font-size: 15px; }
.mapa-aviso > .icon { width: 42px; height: 42px; color: var(--teal); }
.mapa-aviso p { margin: 0; }
.mapa-botones { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; }
.mapa-botones a:not(.btn) { font-weight: 600; }

/* ---------- Pie ---------- */
.site-footer { background: var(--gris-fondo); border-top: 1px solid var(--gris-linea); font-size: 12px; color: var(--texto); }
.footer-inner { max-width: 1080px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 40px; padding-top: 26px; padding-bottom: 26px; }
.site-footer p { margin: 0; }
.footer-links, .footer-links nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.footer-links a { color: var(--logo); text-decoration: none; }
.footer-links a:hover { color: var(--teal); text-decoration: underline; }
.site-footer .social { gap: 8px; padding-left: 10px; border-left: 1px solid #999; }
.site-footer .social a { display: inline-flex; color: var(--logo); }
.site-footer .social a:hover { color: var(--teal); }
.site-footer .social svg { width: 12px; height: 12px; }
.social { display: flex; flex-wrap: wrap; align-items: center; }

/* Botón flotante "volver arriba" (lo muestra js/web.js) */
.to-top { position: fixed; right: 30px; bottom: 30px; z-index: 40; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .25); color: #fff; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background .2s; }
.to-top.visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--teal); }
.to-top .icon { width: 20px; height: 20px; stroke-width: 3; }

/* ---------- Aviso de cookies (footer.php; lo muestra js/web.js) ---------- */
/* «Aceptar» y «Rechazar» con el mismo estilo: la AEPD pide que rechazar sea igual de fácil. */
.aviso-cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 4px solid var(--teal); box-shadow: 0 -4px 18px rgba(0, 0, 0, .15); font-size: 14px; line-height: 1.5; }
.aviso-cookies-inner { display: flex; align-items: center; gap: 14px 36px; padding-top: 18px; padding-bottom: 18px; }
.aviso-cookies p { flex: 1; margin: 0; }
.aviso-cookies strong { font-family: var(--raleway); color: var(--teal); }
.aviso-cookies-botones { display: flex; flex: none; gap: 10px; }
.aviso-cookies .btn { min-width: 120px; }

/* ---------- Páginas legales (aviso legal, privacidad, cookies) ---------- */
.legal h1 { margin: 0 0 8px; font-family: var(--raleway); font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 400; line-height: 1.2; color: var(--teal); }
.legal .updated { margin: 0 0 40px; color: #666; font-size: .9rem; }
.legal h2 { margin: 36px 0 12px; font-family: var(--raleway); font-size: 1.3rem; font-weight: 600; color: #222; }
.legal h2:first-of-type { margin-top: 0; }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .back { margin-top: 40px; }
.tabla-scroll { margin: 0 0 16px; overflow-x: auto; }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { padding: 8px 10px; border: 1px solid var(--gris-linea); text-align: left; vertical-align: top; }
.legal th { background: var(--gris-fondo); font-family: var(--raleway); font-weight: 600; }
.legal .estado-cookies { font-weight: 600; color: var(--teal); }
