/* Casa Tapiz: pie de página en columnas (se aplica a todas las páginas). */

/* Oculta lo que el bloque nuevo reemplaza: fila de enlaces, ubicación, copyright y correo suelto. */
footer > div:first-child > div:nth-of-type(2),
footer > div:first-child > p:nth-last-of-type(-n+2),
footer > p {
  display: none;
}

.ct-seo-footer {
  max-width: 72rem;
  margin: 3.5rem auto 0;
  padding: 0 1.5rem;
  color: var(--cream);
  text-align: left;
  font-family: var(--font-body);
}

.ct-seo-grid {
  padding-top: 2.75rem;
  border-top: 1px solid color-mix(in oklab, var(--gold) 28%, transparent);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 1.5rem;
}

@media (min-width: 900px) {
  .ct-seo-grid {
    grid-template-columns: 1fr 1.5fr 1fr 1.3fr;
    gap: 2rem 2.5rem;
  }
}

/* Celular y tablet: Servicios y Casa Tapiz lado a lado; Comunas y Contacto a todo el ancho. */
@media (max-width: 899px) {
  .ct-seo-col:nth-child(1) { order: 1; }
  .ct-seo-col:nth-child(3) { order: 2; }
  .ct-seo-col:nth-child(2) { order: 3; grid-column: 1 / -1; }
  .ct-seo-col:nth-child(4) { order: 4; grid-column: 1 / -1; }
}

.ct-seo-col h3 {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.ct-seo-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.ct-seo-col ul.ct-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.25rem;
}

.ct-seo-col li,
.ct-seo-col a {
  font-size: 0.86rem;
  line-height: 1.35;
  color: color-mix(in oklab, var(--cream) 78%, transparent);
  text-decoration: none;
  overflow-wrap: break-word;
}

.ct-seo-col a:hover {
  color: var(--gold);
}

.ct-seo-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.75rem;
  padding: 1.25rem 0 0.25rem;
  border-top: 1px solid color-mix(in oklab, var(--cream) 14%, transparent);
  font-size: 0.75rem;
  color: color-mix(in oklab, var(--cream) 55%, transparent);
}

@media (max-width: 599px) {
  .ct-seo-bottom {
    flex-direction: column;
  }
}

/* Botones de contacto: barra inferior en celular, botones rectangulares en escritorio. Letras doradas. */
a[aria-label="Cotiza gratis por WhatsApp"],
.ct-call {
  position: fixed !important;
  z-index: 60;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  border-radius: 0.5rem !important;
  border: 2px solid var(--gold) !important;
  color: var(--gold) !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.15s ease, filter 0.15s ease;
}
a[aria-label="Cotiza gratis por WhatsApp"]:hover,
.ct-call:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}
a[aria-label="Cotiza gratis por WhatsApp"] {
  background: #0e4a2b !important;
  padding: 0 1.4rem !important;
}
a[aria-label="Cotiza gratis por WhatsApp"] span {
  display: inline !important;
  color: var(--gold) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}
a[aria-label="Cotiza gratis por WhatsApp"] svg {
  stroke: #25d366;
  width: 1.25rem;
  height: 1.25rem;
}
.ct-call {
  background: var(--forest-deep);
  padding: 0 1.3rem;
}
.ct-call svg {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
}

/* Escritorio y tablet: dos botones rectangulares apilados a la derecha. */
@media (min-width: 768px) {
  a[aria-label="Cotiza gratis por WhatsApp"] {
    right: 1.5rem !important;
    bottom: 1.5rem !important;
    left: auto !important;
    animation: ct-pulse 2.8s ease-out infinite;
  }
  .ct-call {
    right: 1.5rem;
    bottom: 5.25rem;
  }
}

/* Celular: barra compacta pegada al borde inferior (Llamar 40% | WhatsApp 60%). */
@media (max-width: 767px) {
  a[aria-label="Cotiza gratis por WhatsApp"],
  .ct-call {
    bottom: 0 !important;
    border-radius: 0 !important;
    border-width: 2px 0 0 0 !important;
    min-height: calc(3rem + env(safe-area-inset-bottom, 0px) * 0.4);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) * 0.4) !important;
    box-shadow: 0 -6px 18px -8px rgba(0, 0, 0, 0.35) !important;
  }
  a[aria-label="Cotiza gratis por WhatsApp"] {
    right: 0 !important;
    left: auto !important;
    width: 60%;
  }
  .ct-call {
    left: 0;
    right: auto;
    width: 40%;
  }
  a[aria-label="Cotiza gratis por WhatsApp"]:hover,
  .ct-call:hover {
    transform: none;
  }
  .ct-seo-footer {
    padding-bottom: 4.5rem;
  }
}

@keyframes ct-pulse {
  0% { box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(212, 166, 78, 0.55); }
  70% { box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45), 0 0 0 12px rgba(212, 166, 78, 0); }
  100% { box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(212, 166, 78, 0); }
}
@media (prefers-reduced-motion: reduce) {
  a[aria-label="Cotiza gratis por WhatsApp"] { animation: none !important; }
}

/* Antes / después deslizable: una sola foto, una línea que se arrastra. */
.ct-cmp {
  --p: 50%;
  position: relative;
  max-width: 52rem;
  aspect-ratio: 4 / 3;
  margin: 3rem auto 0;
  overflow: hidden;
  border: 6px solid var(--cream);
  border-radius: 0.35rem;
  box-shadow: 0 22px 40px -14px rgba(0, 0, 0, 0.55);
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ct-cmp img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ct-cmp-top {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--p)) 0 0);
}
.ct-cmp-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--p);
  width: 3px;
  margin-left: -1.5px;
  background: var(--cream);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.ct-cmp-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3rem;
  height: 3rem;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: var(--forest-deep);
  color: var(--gold);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.6);
}
.ct-cmp:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ct-cmp-tag {
  position: absolute;
  top: 0.9rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.3rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.ct-cmp-tag-l { left: 0.9rem; background: var(--forest-deep); color: var(--cream); }
.ct-cmp-tag-r { right: 0.9rem; background: var(--gold); color: var(--forest-deep); }
.ct-cmp-hint {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  background: color-mix(in oklab, var(--cream) 94%, transparent);
  color: var(--forest-deep);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ct-cmp-used .ct-cmp-hint { opacity: 0; }
@media (max-width: 599px) {
  .ct-cmp { margin-top: 2.25rem; border-width: 4px; }
  .ct-cmp-knob { width: 2.6rem; height: 2.6rem; }
}

/* Botón del hero: ¿Dónde funcionamos? */
.ct-where {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid color-mix(in oklab, var(--gold) 55%, transparent);
  border-radius: 999px;
  color: var(--cream);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.2s ease;
  vertical-align: top;
}
.ct-where:hover { background: color-mix(in oklab, var(--gold) 12%, transparent); }
.ct-where svg { color: var(--gold); flex: none; }
@media (max-width: 479px) { .ct-where { margin-left: 0; margin-top: 0.75rem; } .ct-where.mt-8 { margin-top: 0.75rem; } }

/* Reseñas de Google */
.ct-rev { background: var(--cream); color: var(--forest-deep); padding: 4rem 1.5rem; }
.ct-rev-wrap { max-width: 72rem; margin: 0 auto; text-align: center; font-family: var(--font-body); }
.ct-rev-eyebrow { margin: 0; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.ct-rev-title { margin: 0.5rem 0 0; font-family: var(--font-display, serif); font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--forest-deep); }
.ct-rev-sub { max-width: 34rem; margin: 0.75rem auto 0; font-size: 0.95rem; line-height: 1.6; color: color-mix(in oklab, var(--forest-deep) 75%, transparent); }
.ct-rev-grid { display: grid; gap: 1.25rem; margin-top: 2.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); text-align: left; }
.ct-rev-card { margin: 0; padding: 1.4rem; background: #fff; border: 1px solid color-mix(in oklab, var(--forest) 14%, transparent); border-radius: 0.4rem; }
.ct-rev-stars { color: var(--gold); letter-spacing: 0.15em; font-size: 1rem; }
.ct-rev-text { margin: 0.75rem 0 0; font-size: 0.92rem; line-height: 1.6; }
.ct-rev-name { margin-top: 1rem; font-size: 0.8rem; font-weight: 600; }
.ct-rev-date { font-weight: 400; opacity: 0.65; }
.ct-rev-btn { display: inline-flex; margin-top: 2rem; padding: 0.8rem 1.5rem; border-radius: 0.5rem; border: 2px solid var(--gold); background: var(--forest-deep); color: var(--gold); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.ct-rev-btn:hover { filter: brightness(1.15); }
