/* ==========================================================================
   DTI Barcelona · Componentes de sección compartidos entre páginas
   (index.php, dti.php…). Se cargan con $extra_css = array('assets/css/componentes.css').
   ========================================================================== */

/* Rótulos, cabeceras de sección y etiquetas */
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--yellow); margin-bottom: 16px; }
.eyebrow--olive { color: var(--olive); }
.eyebrow--dot { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.eyebrow--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.rule { width: 56px; height: 4px; background: var(--yellow); border-radius: 2px; margin: 28px 0; }
.light { background: var(--sand); color: var(--ink); }
.light p { color: #3E3830; }

.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.sec-head__title { font-size: clamp(44px, 6vw, 84px); }
.sec-head p { max-width: 420px; margin: 0; color: var(--muted); }
.light .sec-head p { max-width: 400px; color: #3E3830; }

.tagged { position: relative; }
.tag { position: absolute; left: 14px; bottom: 14px; background: var(--bg); color: var(--cream); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; }
.tag--glass { background: rgba(14, 14, 14, .85); }

/* Lista de ventajas con check */
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; font-size: 15px; font-weight: 500; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Proceso por pasos */
.process { margin-top: clamp(64px, 8vw, 104px); }
.process__title { font-size: clamp(32px, 3.6vw, 48px); margin-bottom: 32px; }
.process__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.process__list li { background: var(--sand-2); border-radius: 16px; padding: 24px; }
.process__n { font-size: 44px; color: var(--gold); }
.process__step { font-weight: 700; margin: 12px 0 6px; }
.process__desc { font-size: 15px; color: #4A433A; }
.process__list li.is-last { background: var(--bg); color: var(--cream); }
.process__list li.is-last .process__n { color: var(--yellow); }
.process__list li.is-last .process__desc { color: var(--muted); }
.process__list li { transition: transform .35s ease, box-shadow .35s ease; }
.process__list li:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }

/* Productos (foto + nombre) */
.product__media { aspect-ratio: 4 / 5; }
.product__media--wide { aspect-ratio: 16 / 10; }
.product figcaption { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product__name { font-family: var(--serif); font-size: 26px; }
.product__type { font-size: 12px; letter-spacing: .14em; color: #5E5548; text-transform: uppercase; }
.product .ph { transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease; }
.product:hover .ph { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(20, 20, 20, .18); }

/* Qué personalizamos */
.items { background: var(--bg-2); padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.items__title { font-size: clamp(36px, 4.4vw, 60px); margin-bottom: 36px; text-align: center; }
.items__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.item { background: var(--bg); border: 1px solid var(--line-2); border-radius: 16px; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.item svg { width: 44px; height: 44px; fill: none; stroke: var(--yellow); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.item span { font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
/* Qué personalizamos */
.item { transition: border-color .3s ease, transform .3s ease, background .3s ease; }
.item:hover { border-color: var(--yellow); background: #141414; transform: translateY(-4px); }
.item svg { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.item:hover svg { transform: scale(1.12) rotate(-4deg); }

/* Llamada final (CTA amarilla) */
.cta { background: var(--yellow); color: var(--bg); padding: clamp(72px, 9vw, 120px) 0; }
.cta__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between; }
.cta__text { flex: 1 1 560px; min-width: 0; }
.cta__title { font-size: clamp(52px, 7.6vw, 112px); }
.cta__text p { max-width: 520px; margin: 24px 0 0; font-size: 19px; font-weight: 500; }
.cta__actions { flex: 0 1 380px; display: flex; flex-direction: column; gap: 14px; }
.cta__btn { justify-content: space-between; min-height: 64px; font-size: 17px; }
.cta__btn svg { width: 20px; height: 20px; }

/* Preguntas frecuentes (acordeón en componentes.js) */
.faq { padding: clamp(72px, 9vw, 128px) 0; }
.faq__grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: flex-start; }
.faq__head { flex: 1 1 320px; min-width: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.faq__head p { margin: 24px 0 0; max-width: 360px; }
.faq__head a { color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }
.faq__list { flex: 1.4 1 520px; min-width: 0; border-top: 1px solid rgba(20, 20, 20, .14); }
.faq__item { border-bottom: 1px solid rgba(20, 20, 20, .14); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; font-weight: 700; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink); transition: color .25s ease; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC200' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .4s cubic-bezier(.2, .7, .2, 1), background-color .25s ease; }
.faq__item[open] summary::after { transform: rotate(135deg); }
.faq__item summary:hover { color: #6B5A1F; }
.faq__item summary:hover::after { background-color: #262626; }
.faq__answer { overflow: hidden; }
.faq__answer p { margin: 0 0 24px; max-width: 640px; color: #3E3830; }
.faq__answer a { color: var(--olive); text-decoration: underline; }
@media (max-width: 860px) { .faq__head { position: static; } }

/* Visor de fotos (componentes.js) · añade data-lightbox al contenedor de la galería */
.zoomable { cursor: zoom-in; }
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: transparent; color: var(--cream); }
.lightbox::backdrop { background: rgba(8, 8, 8, .92); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; animation: lbIn .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__figure { margin: 0; display: grid; gap: 14px; justify-items: center; max-width: min(1100px, 92vw); }
.lightbox__img { max-width: 100%; max-height: 78vh; border-radius: 14px; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: lbImg .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes lbImg { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lightbox__cap { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; }
.lightbox__count { color: var(--yellow); margin-right: 10px; }
.lightbox__btn { position: fixed; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(14, 14, 14, .7); color: var(--cream); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .2s ease, color .2s ease, transform .2s ease; }
.lightbox__btn:hover { background: var(--yellow); color: var(--bg); transform: scale(1.06); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 20px; top: 50%; translate: 0 -50%; }
@media (max-width: 600px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; translate: none; }
}


/* Móvil */
@media (max-width: 480px) {
  .checks { grid-template-columns: 1fr; }
}

/* Migas de pan (páginas interiores) */
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 28px; color: #6B6255; }
.crumbs a { color: #6B6255; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.crumbs--dark, .crumbs--dark a { color: var(--muted-2); }
.crumbs--dark a:hover, .crumbs--dark [aria-current] { color: var(--cream); }

/* Botón de contorno oscuro sobre la llamada amarilla */
.cta__btn--line { border: 2px solid var(--bg); color: var(--bg); }
.cta__btn--line:hover { background: var(--bg); color: var(--yellow); }

/* Botón de contorno oscuro sobre fondo claro */
.btn--line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--yellow); }

/* Subrayado amarillo de una palabra del titular (el titular necesita isolation: isolate) */
.mark { position: relative; white-space: nowrap; }
.mark::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .2em; background: var(--yellow); z-index: -1; transform-origin: left; }
