/* Sitio público de Coresa (a partir de la maqueta aprobada) */
:root {
  --rojo: #E2231A;
  --rojo-hondo: #B50900;
  --carbon: #232121;
  --papel: #F0F3F7;
  --texto: #2B2828;
  --gris: #5E5858;
  --linea: #DCE0E6;
  --blanco: #FFFFFF;
  --ancho: 1180px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --cuerpo: "Barlow", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--cuerpo); font-size: 17px; line-height: 1.6; color: var(--texto); background: var(--blanco); }
img { max-width: 100%; display: block; }
a { color: var(--rojo-hondo); }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
.contenedor { width: min(var(--ancho), 100% - 48px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; color: var(--carbon); margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h3 { font-size: 1.6rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* ---------- Encabezado ---------- */
.encabezado { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--linea); }
.encabezado .contenedor { display: flex; align-items: center; gap: 2rem; height: 76px; }
.encabezado .logo img { height: 34px; width: auto; }
.encabezado nav { margin-left: auto; }
.menu { display: flex; gap: 1.6rem; list-style: none; padding: 0; margin-block: 0; }
.menu a { color: var(--carbon); text-decoration: none; font-weight: 500; font-size: 16px; }
.menu a:hover { color: var(--rojo); }
.menu a[aria-current="page"] { color: var(--rojo-hondo); box-shadow: inset 0 -3px 0 var(--rojo); padding-bottom: .35rem; }
.menu .solo-movil { display: none; }
.acciones-encabezado { display: flex; align-items: center; gap: 1rem; }
.enlace-sistema { font-size: 14px; color: var(--gris); text-decoration: none; white-space: nowrap; }
.enlace-sistema:hover { color: var(--carbon); text-decoration: underline; }
.boton { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--cuerpo); font-weight: 500; font-size: 16px; text-decoration: none; border-radius: 6px; padding: .8rem 1.4rem; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s; }
.boton-rojo { background: var(--rojo); color: #fff; }
.boton-rojo:hover { background: var(--rojo-hondo); }
.boton-linea { border-color: var(--carbon); color: var(--carbon); background: transparent; }
.boton-linea:hover { background: var(--carbon); color: #fff; }
.boton-chico { padding: .55rem 1rem; font-size: 15px; }
.abrir-menu { display: none; margin-left: auto; background: none; border: 2px solid var(--carbon); border-radius: 6px; font: 500 15px var(--cuerpo); padding: .45rem .8rem; }

/* ---------- Portada ---------- */
.portada { position: relative; background: var(--papel); overflow: hidden; }
.portada .contenedor { display: grid; grid-template-columns: 1fr 1.15fr; min-height: 600px; align-items: center; gap: 0; }
.portada-texto { position: relative; z-index: 2; padding: 4.5rem 2.5rem 4.5rem 0; }
.portada h1 { font-size: clamp(2.7rem, 4.5vw, 4.3rem); font-weight: 700; }
.portada h1 .linea-titulo { display: block; white-space: nowrap; }
.portada-bajada { font-size: 1.2rem; color: var(--gris); max-width: 34ch; margin: 1.4rem 0 2rem; }
.portada-botones { display: flex; flex-wrap: wrap; gap: .8rem; }
.portada-foto { position: absolute; inset: 0 0 0 44%; }
.portada-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
/* La hoja: franja roja que "sale" de la impresora y cruza la portada */
.hoja { position: absolute; left: 44%; top: 0; bottom: 0; width: 14px; background: var(--rojo); z-index: 1; transform-origin: top; }
@media (prefers-reduced-motion: no-preference) {
  .hoja { animation: imprimir 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .portada h1 .linea-titulo { animation: entrar .7s cubic-bezier(.2,.7,.2,1) both; }
  .portada h1 .linea-titulo:nth-child(2) { animation-delay: .12s; }
  .portada h1 .linea-titulo:nth-child(3) { animation-delay: .24s; }
}
@keyframes imprimir { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes entrar { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.marcas-franja { border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); background: #fff; }
.marcas-franja .contenedor { display: flex; flex-wrap: wrap; gap: .6rem 2.4rem; padding: 1.1rem 0; font-size: 15px; color: var(--gris); }
.marcas-franja strong { color: var(--carbon); font-weight: 500; }

/* ---------- Secciones ---------- */
.seccion { padding: 6rem 0; }
.cabecera-seccion { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.cabecera-seccion p { color: var(--gris); font-size: 1.1rem; margin: 0; max-width: 46ch; }

/* Sectores: tabla de lectura rápida, no tarjetas */
.sectores { border-top: 3px solid var(--carbon); }
.sector { display: grid; grid-template-columns: 240px 1fr auto; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--linea); align-items: start; }
.sector h2, .sector h3 { font-size: 2rem; }
.sector { scroll-margin-top: 96px; }
.sector p { margin: 0; color: var(--gris); max-width: 60ch; }
.sector ul { margin: .7rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.sector li { font-size: 14px; background: var(--papel); border-radius: 4px; padding: .15rem .6rem; color: var(--carbon); }
.sector a { justify-self: end; align-self: center; white-space: nowrap; font-weight: 500; text-decoration: none; color: var(--rojo-hondo); }
.sector a:hover { text-decoration: underline; }

/* Alquiler: el único bloque oscuro */
.alquiler { background: var(--carbon); color: #E9E6E6; position: relative; overflow: hidden; }
.alquiler::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: var(--rojo); }
.alquiler h2 { color: #fff; }
.alquiler .cabecera-seccion p { color: #C9C4C4; }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: paso; border-top: 1px solid #4A4646; }
.pasos li { counter-increment: paso; padding: 2rem 1.6rem 2rem 0; border-right: 1px solid #4A4646; }
.pasos li + li { padding-left: 1.6rem; }
.pasos li:last-child { border-right: 0; }
.pasos li::before { content: counter(paso); display: block; font-family: var(--display); font-size: 3.4rem; font-weight: 700; line-height: 1; color: var(--rojo); margin-bottom: .9rem; }
.pasos h3 { color: #fff; font-size: 1.5rem; margin-bottom: .5rem; }
.pasos p { font-size: 15.5px; color: #C9C4C4; margin: 0; }
.alquiler-pie { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #4A4646; }
.alquiler-pie p { margin: 0; font-size: 1.15rem; color: #fff; max-width: 52ch; }
.alquiler .boton-linea { border-color: #fff; color: #fff; }
.alquiler .boton-linea:hover { background: #fff; color: var(--carbon); }

/* Productos: mosaico con una pieza dominante */
.mosaico { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; grid-auto-flow: dense; gap: 14px; }
.pieza { position: relative; overflow: hidden; border-radius: 6px; background: var(--papel); color: #fff; text-decoration: none; display: block; }
.pieza img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pieza:hover img { transform: scale(1.03); }
.pieza span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1.1rem .9rem; background: linear-gradient(transparent, rgba(35,33,33,.85)); font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.1; }
.pieza small { display: block; font-family: var(--cuerpo); font-weight: 400; font-size: 14px; opacity: .85; margin-top: .2rem; }
.pieza.grande { grid-column: span 2; grid-row: span 2; }
.pieza.grande span { font-size: 2.2rem; padding: 3rem 1.6rem 1.4rem; }
.pieza.ancha { grid-column: span 2; }
.otras-lineas { margin-top: 2rem; color: var(--gris); font-size: 16px; }
.otras-lineas strong { color: var(--carbon); font-weight: 500; }

/* Soporte */
.soporte { background: var(--papel); }
.soporte-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.preguntas details { border-bottom: 1px solid var(--linea); padding: 1.1rem 0; }
.preguntas details:first-of-type { border-top: 3px solid var(--carbon); }
.preguntas summary { cursor: pointer; font-weight: 500; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--carbon); }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--rojo); }
.preguntas details[open] summary::after { content: "–"; }
.preguntas details p { margin: .7rem 0 0; color: var(--gris); }
.formulario { background: #fff; border-radius: 8px; padding: 2rem; border: 1px solid var(--linea); }
.formulario h3, .titulo-form { font-size: 1.6rem; font-weight: 600; margin-bottom: 1.2rem; }
.formulario { scroll-margin-top: 96px; }
.campo { margin-bottom: 1rem; }
.campo label { display: block; font-size: 14px; font-weight: 500; margin-bottom: .3rem; color: var(--carbon); }
.campo input, .campo select, .campo textarea { width: 100%; font: 16px var(--cuerpo); padding: .7rem .8rem; border: 1px solid #C7CCD3; border-radius: 6px; background: #fff; color: var(--texto); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(226,35,26,.15); }
.dos-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nota-form { font-size: 14px; color: var(--gris); margin: .8rem 0 0; }
.soporte-intro { color: var(--gris); font-size: 1.1rem; margin: 1.2rem 0 2rem; max-width: 46ch; }
.campo-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.campo .error { display: block; color: var(--rojo-hondo); font-size: 14px; margin-top: .25rem; }
.campo [aria-invalid="true"] { border-color: var(--rojo-hondo); }
.aviso-form { border-radius: 6px; padding: .8rem 1rem; margin-bottom: 1.2rem; font-size: 15.5px; }
.aviso-ok { background: #E7F5EC; color: #1C5E36; border: 1px solid #B9DFC7; }
.aviso-error { background: #FDECEB; color: var(--rojo-hondo); border: 1px solid #F6C3C0; }
.pie-redes { display: flex; gap: .8rem; margin-top: 1rem; }
.pie-redes a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid #4A4646; border-radius: 50%; }
.pie-redes a:hover { border-color: #fff; text-decoration: none; }
.pie-redes svg { width: 18px; height: 18px; }
.pie address { font-style: normal; }

/* Pie */
.pie { background: var(--carbon); color: #C9C4C4; padding: 4rem 0 2rem; font-size: 15.5px; border-top: 6px solid var(--rojo); }
.pie-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.pie img { height: 38px; width: auto; margin-bottom: 1rem; }
.pie h4 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: #fff; margin: 0 0 .8rem; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: .45rem; }
.pie a { color: #E9E6E6; text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie-final { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #4A4646; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 14px; }

/* WhatsApp */
.whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 30; background: #1FA855; color: #fff; border-radius: 999px; padding: .8rem 1.2rem .8rem 1rem; display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.whatsapp svg { width: 24px; height: 24px; }


/* ---------- Páginas internas ---------- */
.cabecera-pagina { position: relative; background: var(--papel); padding: 3.2rem 0 3.4rem; overflow: hidden; }
.cabecera-pagina::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: var(--rojo); }
.cabecera-pagina h1 { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 22ch; }
.cabecera-pagina p { font-size: 1.2rem; color: var(--gris); max-width: 52ch; margin: 1.1rem 0 0; }
.migas { font-size: 14px; color: var(--gris); margin-bottom: 1rem; }
.migas a { color: var(--gris); }
.migas a:hover { color: var(--carbon); }
.seccion-pegada { padding-top: 3.5rem; }
.titulo-bloque { color: #fff; font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 2rem; }
.subtitulo-preguntas { font-size: 1.9rem; margin: 0 0 1.2rem; scroll-margin-top: 96px; }
.soporte-intro + .subtitulo-preguntas { margin-top: 2.5rem; }
.enlace-mas { font-weight: 500; color: var(--rojo-hondo); text-decoration: none; white-space: nowrap; }
.enlace-mas::after { content: " →"; }
.enlace-mas:hover { text-decoration: underline; }
.botones-fila { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 2rem; }
.soporte-banda .soporte-grid { align-items: center; }
.soporte-banda .botones-fila { margin-top: 0; justify-content: flex-end; }
.soporte-banda .soporte-intro { margin-bottom: 0; }

/* Resumen de sectores en Inicio */
.sectores-resumen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 3px solid var(--carbon); }
.sector-tarjeta { display: flex; flex-direction: column; gap: .7rem; padding: 1.8rem 1.6rem 1.8rem 0; color: var(--texto); text-decoration: none; border-bottom: 1px solid var(--linea); }
.sector-tarjeta + .sector-tarjeta { padding-left: 1.6rem; border-left: 1px solid var(--linea); }
.sector-tarjeta h3 { font-size: 1.8rem; }
.sector-tarjeta p { color: var(--gris); font-size: 15.5px; margin: 0; flex-grow: 1; }
.sector-tarjeta:hover h3 { color: var(--rojo-hondo); }
.sector-tarjeta:hover .enlace-mas { text-decoration: underline; }

/* Invitación final */
.banda-cta { background: var(--rojo); color: #fff; }
.banda-cta .contenedor { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; padding: 3.2rem 0; }
.banda-cta h2 { color: #fff; font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
.banda-cta p { margin: .6rem 0 0; font-size: 1.1rem; max-width: 56ch; color: #FFE9E7; }
.banda-cta .boton-rojo { background: #fff; color: var(--rojo-hondo); }
.banda-cta .boton-rojo:hover { background: var(--carbon); color: #fff; }

/* Contacto */
.datos-contacto { display: grid; grid-template-columns: 110px 1fr; gap: 1rem 1.2rem; margin: 0; border-top: 3px solid var(--carbon); padding-top: 1.4rem; }
.datos-contacto dt { font-weight: 500; color: var(--carbon); }
.datos-contacto dd { margin: 0; color: var(--gris); }
.datos-contacto a { color: var(--rojo-hondo); }
.datos-contacto address { font-style: normal; }
.nota-clientes { margin-top: 2rem; color: var(--gris); font-size: 15.5px; }
.pie-final .enlace-admin { color: #9A9494; }

/* Barra visible solo con la sesión del panel abierta */
.barra-admin { background: #FFF4D6; color: var(--carbon); font-size: 14px; border-bottom: 1px solid #E8D59A; }
.barra-admin .contenedor { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between; align-items: center; padding: .5rem 0; }
.barra-admin-acciones { display: flex; gap: 1.2rem; }
.barra-admin a { color: var(--carbon); font-weight: 500; }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .menu, .enlace-sistema { display: none; }
  .abrir-menu { display: inline-block; }
  .encabezado.abierto .menu { display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; background: #fff; padding: 1rem 24px 1.5rem; border-bottom: 1px solid var(--linea); gap: 1rem; }
  .portada .contenedor { grid-template-columns: 1fr; min-height: 0; }
  .portada-foto { position: relative; inset: auto; height: 320px; margin: 0 -24px; order: -1; }
  .hoja { left: 0; right: 0; top: 320px; bottom: auto; width: auto; height: 10px; transform-origin: left; }
  .portada-texto { padding: 3rem 0; }
  .portada h1 .linea-titulo { white-space: normal; }
  .cabecera-seccion, .soporte-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .sector { grid-template-columns: 1fr; gap: .6rem; }
  .sector a { justify-self: start; }
  .menu .solo-movil { display: list-item; }
  .menu a[aria-current="page"] { box-shadow: none; padding-bottom: 0; }
  .sectores-resumen { grid-template-columns: 1fr 1fr; }
  .sector-tarjeta:nth-child(odd) { padding-left: 0; border-left: 0; }
  .sector-tarjeta:nth-child(even) { padding-left: 1.4rem; }
  .soporte-banda .botones-fila { justify-content: flex-start; }
  .pasos { grid-template-columns: 1fr 1fr; }
  .pasos li, .pasos li + li { padding: 1.6rem 1rem 1.6rem 0; border-right: 0; border-bottom: 1px solid #4A4646; }
  .mosaico { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; }
  .pie-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .seccion { padding: 4rem 0; }
  .acciones-encabezado .boton { display: none; }
  .pasos { grid-template-columns: 1fr; }
  .mosaico { grid-template-columns: 1fr; }
  .pieza.grande, .pieza.ancha { grid-column: auto; grid-row: span 1; }
  .dos-campos, .pie-grid { grid-template-columns: 1fr; }
  .sectores-resumen { grid-template-columns: 1fr; }
  .sector-tarjeta, .sector-tarjeta + .sector-tarjeta, .sector-tarjeta:nth-child(even) { padding: 1.5rem 0; border-left: 0; }
  .datos-contacto { grid-template-columns: 1fr; gap: .2rem; }
  .datos-contacto dd { margin-bottom: .8rem; }
  .cabecera-pagina { padding: 2.4rem 0 2.6rem; }
  .whatsapp span { display: none; }
  .whatsapp { padding: .9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
