/* Página /servicios/puertas-cabma con los 7 modelos (ronda 1 «recuperar textos», 2026-10-21).
   Se apoya en .service-brief (app.css) y en service-gallery.css; aquí solo lo propio de esta página. */
.cabma-page [id]{scroll-margin-top:6rem}
.cabma-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Botón de contorno para fondo claro (el .btn-ghost del sitio es blanco sobre blanco en la cabecera). */
.cabma-btn-line{display:inline-flex;align-items:center;justify-content:center;padding:.55rem 1.1rem;border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#0f172a;font-weight:700;font-size:.78rem;letter-spacing:.06em;transition:border-color .15s ease,color .15s ease}
.cabma-btn-line:hover{border-color:#0d6efd;color:#0d6efd}
@media (max-width:767px){.cabma-btn-line{min-height:2.75rem}}

/* Índice de modelos */
.cabma-index{list-style:none;margin:1rem 0 0;padding:0;display:grid;gap:.5rem;grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr))}
.service-brief__body .cabma-index li{margin:0}
.service-brief__body .cabma-index a{display:flex;flex-direction:column;gap:.1rem;min-height:2.75rem;padding:.65rem .85rem;border:1px solid #e2e8f0;border-radius:12px;background:#fff;color:#0f172a;transition:border-color .15s ease,background-color .15s ease}
.service-brief__body .cabma-index a:hover{border-color:#0d6efd;background:#f8fafc}
.cabma-index__name{font-weight:700;line-height:1.25}
.cabma-index__grade{font-size:.85rem;font-weight:600;color:#0d6efd;font-variant-numeric:tabular-nums}

/* Cada modelo */
.cabma-model{margin-top:2.5rem;padding-top:2rem;border-top:1px solid #e2e8f0}
.cabma-model__media{margin:0}
.cabma-model__media img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;background:#fff;border:1px solid #e2e8f0;border-radius:12px}
.cabma-model__media figcaption{margin-top:.35rem;font-size:.78rem;color:#64748b}
.service-brief__body .cabma-model h2{margin-top:1.1rem;font-size:1.35rem;line-height:1.25}
.cabma-model__data{margin:1rem 0 0;padding:.35rem 1rem;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}
.cabma-model__data div{padding:.55rem 0;border-top:1px solid #e2e8f0}
.cabma-model__data div:first-child{border-top:0}
.cabma-model__data dt{font-size:.82rem;font-weight:700;color:#475569}
.cabma-model__data dd{margin:.1rem 0 0;color:#0f172a;line-height:1.5}
.cabma-model__actions{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem 1.1rem;margin-top:1.1rem}
.service-brief__body .cabma-model__actions a.btn-primary{color:#fff;margin-top:0;width:auto}
.service-brief__body a.cabma-model__pdf{display:inline-flex;align-items:center;min-height:2.75rem;font-size:.92rem}
@media (min-width:520px){
  .cabma-model__data div{display:grid;grid-template-columns:10.5rem minmax(0,1fr);gap:1rem;align-items:baseline}
  .cabma-model__data dd{margin:0}
}
@media (min-width:860px){
  .cabma-model{display:grid;grid-template-columns:minmax(0,21rem) minmax(0,1fr);gap:0 2rem;align-items:start}
  .cabma-model__media{position:sticky;top:6rem}
  .cabma-model__media img{aspect-ratio:1/1}
  .service-brief__body .cabma-model h2{margin-top:0}
}
@media (max-width:767px){
  .cabma-model__actions{flex-direction:column;align-items:stretch}
  .cabma-model__actions a.btn-primary{justify-content:center}
}

/* Comparativa */
.cabma-table{position:relative;margin-top:1rem;overflow-x:auto;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.cabma-table:focus-visible{outline:3px solid #0d6efd;outline-offset:2px}
.cabma-table table{width:100%;min-width:60rem;border-collapse:separate;border-spacing:0;font-size:.9rem;line-height:1.4}
.cabma-table th,.cabma-table td{padding:.6rem .7rem;text-align:left;vertical-align:top;border-bottom:1px solid #e2e8f0}
.cabma-table tbody tr:last-child th,.cabma-table tbody tr:last-child td{border-bottom:0}
.cabma-table thead th{background:#f8fafc;font-size:.88rem;white-space:nowrap}
.cabma-table thead th a{color:#0d6efd}
.cabma-table tbody th{font-weight:700;color:#334155;min-width:10rem}
.cabma-table th[scope=row],.cabma-table thead th:first-child{position:sticky;left:0;z-index:1;background:#fff;box-shadow:1px 0 0 #e2e8f0}
.cabma-table thead th:first-child{background:#f8fafc}
.cabma-table td{color:#0f172a;min-width:8rem}
@media (min-width:1200px){.cabma-table{margin-inline:calc(50% - 34rem)}}
.cabma-compare__more{max-width:44rem}

/* Galería de instalaciones: fotos verticales 4:5 */
.cabma-gallery .svc-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
@media (min-width:640px){.cabma-gallery .svc-gallery__grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1200px){.cabma-gallery .svc-gallery__grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
.cabma-gallery .svc-gallery__link picture,.cabma-gallery .svc-gallery__link img{aspect-ratio:4/5}
.cabma-gallery .svc-lightbox__figure{width:min(36rem,100%,calc((100dvh - 8.5rem) * .8))}
.cabma-gallery .svc-lightbox__stage{aspect-ratio:4/5}
@media (max-width:640px){.cabma-gallery .svc-lightbox__figure{width:min(100%,calc((100dvh - 10rem) * .8))}}

/* Presupuesto: botones legibles sobre el azul */
.service-brief__body a.cabma-cta__btn{display:inline-flex;align-items:center;justify-content:center;min-height:2.75rem;padding:.6rem 1.2rem;border:1px solid rgba(255,255,255,.75);border-radius:999px;color:#fff;font-weight:700;font-size:.92rem;transition:background-color .15s ease}
.service-brief__body a.cabma-cta__btn:hover{background:rgba(255,255,255,.14)}
.service-brief__body a.cabma-cta__btn--solid{background:#fff;color:#0b5ed7;border-color:#fff}
.service-brief__body a.cabma-cta__btn--solid:hover{background:#e7f0ff}
.cabma-cta a:focus-visible{outline:3px solid #fff;outline-offset:2px}

@media (prefers-reduced-motion:reduce){.cabma-btn-line,.cabma-index a,.cabma-cta__btn{transition:none}}
.cabma-gallery .svc-gallery__item{position:relative}

/* Ancho único (2026-10-21): todo el contenido de la página al ancho real de «Ejemplos de instalaciones»
   (68rem de contenido en escritorio; en pantallas estrechas, el ancho disponible). La galería y la
   comparativa ya no sobresalen: quedan alineadas con el texto. */
.cabma-page .service-brief__wrap,.cabma-page .service-brief__body{max-width:calc(68rem + 2.5rem)}
.cabma-page .svc-gallery,.cabma-page .cabma-table{margin-inline:0}
.cabma-page .service-brief__lead,.cabma-page .svc-gallery__lead,.cabma-page .cabma-compare__more{max-width:none}
