/* Gerhardt Galería del taller */
.ghg { --ghg-pri: #1274e7; --ghg-ink: #111827; --ghg-mut: #6b7280; --ghg-gap: 14px; --ghg-row: 210px; color: var(--ghg-ink); }

/* Navegación por secciones */
.ghg-nav { position: sticky; top: calc(var(--ghg-top, 90px) + 10px); transition: top .2s; z-index: 20; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 40px; padding: 10px; width: max-content; max-width: 100%; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; box-shadow: 0 8px 30px rgba(17,24,39,.08); }
.ghg-nav a { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ghg-ink) !important; text-decoration: none !important; white-space: nowrap; transition: background .2s, color .2s; }
.ghg-nav a:hover, .ghg-nav a.is-on { background: var(--ghg-pri); color: #fff !important; }

/* Secciones */
.ghg-sec { scroll-margin-top: calc(var(--ghg-top, 90px) + 80px); margin-bottom: 72px; }
.ghg-sec__head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.ghg-sec__count { display: inline-block; padding: 4px 12px; margin-bottom: 10px; border-radius: 999px; background: rgba(18,116,231,.1); color: var(--ghg-pri); font-size: 13px; font-weight: 700; }
.ghg-sec__title { margin: 0 0 10px; font-size: clamp(26px, 3vw, 40px) !important; line-height: 1.15; }
.ghg-sec__intro { margin: 0; color: var(--ghg-mut); font-size: 17px; line-height: 1.6; }

/* Mosaico */
.ghg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--ghg-row); grid-auto-flow: dense; gap: var(--ghg-gap); }
.ghg-item { position: relative; display: block; overflow: hidden; border-radius: 16px; background: #e9edf2; box-shadow: 0 6px 20px rgba(17,24,39,.08); cursor: zoom-in; transform: translateZ(0); transition: box-shadow .3s, transform .3s; }
.ghg-item--wide { grid-column: span 2; }
.ghg-item--tall { grid-row: span 2; }
.ghg-item--big { grid-column: span 2; grid-row: span 2; }
.ghg-img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.ghg-item.is-gray .ghg-img { filter: grayscale(1); }
.ghg-item:hover, .ghg-item:focus-visible { box-shadow: 0 16px 40px rgba(17,24,39,.18); transform: translateY(-3px); }
.ghg-item:hover .ghg-img, .ghg-item:focus-visible .ghg-img { transform: scale(1.05); filter: grayscale(0); }
.ghg-item:focus-visible { outline: 3px solid var(--ghg-pri); outline-offset: 3px; }
.ghg-item__cap { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 10px; border-radius: 999px; background: rgba(17,24,39,.7); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghg-item:hover .ghg-item__cap, .ghg-item:focus-visible .ghg-item__cap { opacity: 1; transform: none; }

@media (max-width: 1024px) { .ghg { --ghg-row: 170px; } }
@media (max-width: 767px) {
	.ghg { --ghg-gap: 8px; --ghg-row: 140px; }
	.ghg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ghg-item { border-radius: 12px; }
	.ghg-item--tall { grid-row: span 2; }
	.ghg-nav { top: calc(var(--ghg-top, 60px) + 6px); border-radius: 16px; width: 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
	.ghg-nav::-webkit-scrollbar { display: none; }
	.ghg-nav a { font-size: 13px; padding: 7px 12px; }
	.ghg-sec__intro { font-size: 15px; }
}
/* En pantallas táctiles no hay hover: las fotos en gris se colorean al entrar en pantalla */
.ghg-item.is-gray.is-seen .ghg-img { filter: grayscale(0); transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .ghg-img, .ghg-item { transition: none !important; } }

/* Visor a pantalla completa */
.ghg-lb { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; background: rgba(8,10,14,.82); -webkit-backdrop-filter: blur(14px) saturate(.9); backdrop-filter: blur(14px) saturate(.9); opacity: 0; transition: opacity .25s; }
.ghg-lb.is-open { opacity: 1; }
.ghg-lb[hidden] { display: none; }
.ghg-lb__fig { position: relative; margin: 0; max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); display: flex; flex-direction: column; align-items: center; }
.ghg-lb__img { max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); opacity: 0; transform: scale(.98); transition: opacity .25s, transform .25s; user-select: none; -webkit-user-drag: none; }
.ghg-lb__img.is-ready { opacity: 1; transform: none; }
.ghg-lb__cap { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: calc(100vw - 32px); color: rgba(255,255,255,.88); font-size: 14px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghg-lb__cap b { color: #fff; }
.ghg-lb__btn { position: fixed; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s, transform .2s; }
.ghg-lb__btn:hover, .ghg-lb__btn:focus-visible { background: rgba(255,255,255,.26); outline: none; }
.ghg-lb__btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ghg-lb__close { top: 18px; right: 18px; }
.ghg-lb__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.ghg-lb__next { right: 18px; top: 50%; transform: translateY(-50%); }
.ghg-lb__count { position: fixed; top: 28px; left: 24px; color: rgba(255,255,255,.75); font-size: 13px; font-variant-numeric: tabular-nums; }
.ghg-lb__spin { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: ghg-spin .8s linear infinite; }
.ghg-lb__spin[hidden] { display: none; }
@keyframes ghg-spin { to { transform: rotate(360deg); } }
body.ghg-lock { overflow: hidden; }
@media (max-width: 767px) {
	.ghg-lb__fig, .ghg-lb__img { max-width: 100vw; max-height: calc(100vh - 140px); }
	.ghg-lb__img { border-radius: 0; }
	.ghg-lb__prev, .ghg-lb__next { top: auto; bottom: 56px; transform: none; width: 44px; height: 44px; }
	.ghg-lb__close { top: 12px; right: 12px; }
	.ghg-lb__count { top: 24px; left: 16px; }
	.ghg-lb__cap { bottom: 16px; font-size: 13px; }
}

/* Etapas dentro de cada sección */
.ghg-stage { margin-bottom: 48px; }
.ghg-stage__title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px !important; font-size: clamp(20px, 2vw, 26px) !important; line-height: 1.2; }
.ghg-stage__num { color: var(--ghg-pri); font-variant-numeric: tabular-nums; font-size: .8em; }
.ghg-stage__title small { margin-left: auto; color: var(--ghg-mut); font-size: 13px; font-weight: 600; }

/* Mini galería (página general): 1 grande + 5 chicas */
.ghg--mini { --ghg-row: 150px; }
.ghg-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: var(--ghg-row); grid-auto-flow: dense; gap: 12px; }
.ghg-mini .ghg-item--big { grid-column: span 2; grid-row: span 2; }
.ghg-mini--1 .ghg-item--big { grid-column: span 3; }
@media (max-width: 1024px) { .ghg--mini { --ghg-row: 130px; } }
@media (max-width: 767px) {
	.ghg--mini { --ghg-row: 110px; }
	.ghg-mini { gap: 8px; }
}

/* Página general Del taller */
.gh-taller-row { padding: 56px 0; }
.gh-taller-row + .gh-taller-row { border-top: 1px solid rgba(17,24,39,.08); }
@media (min-width: 768px) {
	.gh-taller-row { display: flex; align-items: center; }
	.gh-taller-row--alt { flex-direction: row-reverse; }
	.gh-taller-row .gh-taller-txt > .vc_column-inner { padding-right: 40px; }
	.gh-taller-row--alt .gh-taller-txt > .vc_column-inner { padding-right: 15px; padding-left: 40px; }
}
@media (max-width: 767px) { .gh-taller-row { padding: 36px 0; } .gh-taller-txt { margin-bottom: 18px; } }
.gh-taller-more { margin-top: 24px; padding-top: 40px; border-top: 1px solid rgba(17,24,39,.08); }
.gh-taller-more .btn { margin: 4px; }

/* Página Instrumentos a medida */
.gh-medida-hero { padding-bottom: 32px; }
.gh-medida-hero .btn { margin: 6px; }
.gh-medida-head { margin-top: 48px; margin-bottom: 8px; }
.gh-medida-cards > .wpb_column > .vc_column-inner, .gh-medida-steps > .wpb_column > .vc_column-inner { height: 100%; }
.gh-medida-card > .vc_column-inner > .wpb_wrapper, .gh-medida-step > .vc_column-inner > .wpb_wrapper { height: 100%; padding: 26px 24px; background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(17,24,39,.07); transition: transform .3s, box-shadow .3s; }
.gh-medida-card > .vc_column-inner > .wpb_wrapper:hover, .gh-medida-step > .vc_column-inner > .wpb_wrapper:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(17,24,39,.12); }
.gh-medida-cards, .gh-medida-steps { margin-bottom: 8px; }
.gh-medida-cards .wpb_column, .gh-medida-steps .wpb_column { margin-bottom: 22px; }
.gh-medida-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #1274e7; color: #fff; font-weight: 800; font-size: 18px; }
.gh-medida-cta { margin-top: 56px; padding: 48px 24px; background: #fff; border-radius: 22px; box-shadow: 0 10px 30px rgba(17,24,39,.07); }
.gh-medida-cta .btn { margin: 6px; }
