/* His pages in the home page's design: same colours (site.css variables), type and buttons. */
.sub { padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); background: var(--ground); }
.page { max-width: 1100px; margin: 0 auto; }
.page > * + * { margin-top: 1.1rem; }
.page h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; margin: .4rem 0 .6rem; }
.page h2 { font-size: clamp(24px, 2.8vw, 36px); line-height: 1.1; margin-top: 2rem; }
.page h3, .page h4 { font-size: clamp(19px, 1.8vw, 24px); margin-top: 1.4rem; }
.page .txt { color: var(--ink); font-size: 1.05rem; line-height: 1.65; max-width: 75ch; }
.page .txt p { margin: 0 0 .9rem; }
.page .txt ul, .page .txt ol { padding-left: 1.2rem; margin: .4rem 0 1rem; }
.page .txt a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.page .txt img { max-width: 100%; height: auto; border-radius: 12px; }
.page .txt img.float { float: right; width: min(42%, 420px); margin: 0 0 1rem 1.4rem; }
.page .txt table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.page .txt td, .page .txt th { border: 1px solid var(--line); padding: .45rem .6rem; }
.page .txt::after { content: ""; display: block; clear: both; }

.back-row { margin: 0 0 .6rem; }
.back { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .85rem;
  letter-spacing: .04em; text-decoration: none; transition: background .2s, color .2s; }
.back:hover { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.cols { display: grid; gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4, .cols-5, .cols-6 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.col > * + * { margin-top: .9rem; }

.sub-img { margin: 0; }
.sub-img img { width: 100%; height: auto; border-radius: 14px; display: block; }
.sub-img figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 45%), 1fr)); gap: 12px; }
.gal-i { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--surface); }
.gal-i img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gal-i:hover img { transform: scale(1.05); }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: clamp(16px, 2.2vw, 28px); }
.card { display: flex; flex-direction: column; gap: .55rem; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 12px 18px; text-align: center; }
.card-media { display: block; border-radius: 12px; overflow: hidden; text-decoration: none; border: 2px solid var(--brand); }
.card-title { display: block; padding: .6rem .5rem; background: var(--brand); color: var(--on-brand); font-weight: 800; letter-spacing: .03em; }
.card-media img { width: 100%; aspect-ratio: 289 / 154; object-fit: cover; display: block; transition: transform .35s ease; }
.card-media:hover img { transform: scale(1.04); }
.card .card-sub { font-size: 1rem; margin: .3rem 0 0; text-transform: uppercase; letter-spacing: .03em; }
.card p { color: var(--muted); margin: 0; flex: 1; }
.card .btn { align-self: center; white-space: nowrap; }
.services .cards { margin-top: 1.4rem; }

.form { display: grid; gap: .9rem; max-width: 640px; padding: clamp(18px, 3vw, 28px); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; }
.form label { display: grid; gap: .35rem; font-weight: 700; font-size: .9rem; }
.form input, .form textarea { font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.form .small { color: var(--muted); font-size: .85rem; margin: 0; }
.form .btn { justify-self: start; }

.allpages ul { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.allpages a { color: inherit; opacity: .85; font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-decoration: none; }
.allpages a:hover { opacity: 1; text-decoration: underline; }
.foot .shell { display: block; }

.nav a[aria-current="page"] { color: var(--brand-text); }

/* His header: orange top bar with his five buttons, then his logo and "Solicite presupuesto sin compromiso". */
.site-head { background: #fff; border-bottom: 3px solid var(--brand); position: relative; z-index: 20; }
.topbar { background: var(--brand); }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.tb-left, .tb-right { display: flex; gap: 6px; flex-wrap: wrap; }
.tb { display: inline-flex; align-items: center; padding: .5rem .9rem; border-radius: 8px; background: rgba(0, 0, 0, .28);
  color: #fff; font-weight: 700; font-size: .85rem; text-decoration: none; transition: background .2s; }
.tb:hover, .tb[aria-current="page"] { background: rgba(0, 0, 0, .5); }
.tb-call { background: #1d8fd1; }
.tb-call:hover { background: #1577b0; }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo-new { height: clamp(52px, 7vw, 84px); width: auto; display: block; }
.quote { display: grid; text-align: right; line-height: 1.05; text-decoration: none; color: var(--ink); font-weight: 800;
  font-size: clamp(16px, 2vw, 26px); }
.quote b { color: var(--brand); }
@media (max-width: 640px) { .quote { display: none; } .brandrow { justify-content: center; } .topbar-in { justify-content: center; } }

/* Home: his blocks in order */
.home .page { max-width: 1180px; }
.home .page > h1, .home .page > h2, .home .page > h3, .home .page .cols h2, .home .page .cols h3 { text-align: center; }
.slider-wrap { margin: 0 auto 1.4rem; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 28px); margin-top: 1.4rem; }
.tiles .col { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .8rem; transition: transform .25s, box-shadow .25s; }
.tiles .col:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(40, 25, 15, .1); }
.tiles h2 { font-size: clamp(16px, 1.6vw, 20px); margin: 0; letter-spacing: .03em; }
.tiles .sub-img { margin: 0; }
.tiles .sub-img img { width: min(200px, 100%); height: auto; border-radius: 12px; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.social img { width: 30px; height: 30px; border-radius: 6px; display: block; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }

.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: 18px;
  scrollbar-width: none; background: var(--surface); }
.slider::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.slide img { width: 100%; height: auto; display: block; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--tint2); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--brand); width: 24px; border-radius: 6px; }

.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 45%), 1fr)); gap: 14px; margin-top: 1.2rem; }
.job { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.job img { width: 100%; height: auto; display: block; transition: transform .35s ease; }
.job:hover img { transform: scale(1.04); }

.video-cover { display: block; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.video-cover .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 54px; border-radius: 14px; background: #e00; }
.video-cover .play::after { content: ""; position: absolute; left: 31px; top: 16px; border-style: solid;
  border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }

.lb { position: fixed; inset: 0; z-index: 100; background: rgba(20, 12, 6, .92); display: grid; place-items: center; padding: 4vw; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 88vh; border-radius: 10px; }
.lb-x { position: absolute; top: 14px; right: 18px; font-size: 34px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

@media (max-width: 760px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .page .txt img.float { float: none; width: 100%; margin: 0 0 1rem; }
}

/* Centred headings get a centred bar; tiles carry no bar. His "Llamar - Ahora" link is a button. */
.home .page > h1::before, .home .page > h2::before, .home .page > h3::before, .home .cols h2::before { margin-left: auto; margin-right: auto; }
.tiles h2::before { display: none; }
.page .txt a[href^="tel:"] { display: inline-flex; margin: .4rem 0; padding: .6rem 1.2rem; border-radius: 10px; background: var(--brand);
  color: var(--on-brand); text-decoration: none; font-weight: 800; }
@media (max-width: 420px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tiles .col { padding: 12px 10px 14px; } .tiles h2 { font-size: 13px; } }
.home .page .txt { margin-left: auto; margin-right: auto; }
