/* ==========================================================================
   SAT · Header con fotos y opiniones de Google
   Cargar DESPUÉS de main.css y responsive.css
   ========================================================================== */

/* ---------- Header con fotos reales ---------- */
#hero-area {
  --sat-amarillo: #ffc033;
  --sat-negro: #0d0c0d;
  background: var(--sat-negro) none;
  color: #fff;
  overflow: hidden;
  position: relative;
}
#hero-area .overlay { display: none; }

/* El título original sigue en el HTML para Google y lectores de pantalla */
#hero-area .contents {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0 !important; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sat-hero {
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  gap: 48px;
  align-items: stretch;
  height: min(100vh, 820px);
  min-height: 640px;
  padding: 112px 0 44px max(24px, calc((100vw - 1140px) / 2));
}
.sat-hero__texto { align-self: center; min-width: 0; will-change: transform, opacity; }
.sat-hero__logo { display: block; width: min(250px, 70%); height: auto; margin-bottom: 30px; }

/* El logo grande reemplaza al del menú mientras se ve el header */
.navbar-brand { transition: opacity .3s; }
body.sat-arriba .navbar-brand { opacity: 0; pointer-events: none; }
.sat-hero__titulo {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
}
.sat-hero__bajada { max-width: 460px; margin: 0 0 28px; color: #c9c7c2; font-size: 16px; line-height: 27px; }
.sat-hero__acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.sat-cta {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--sat-amarillo);
  border-radius: 30px;
  background: var(--sat-amarillo);
  color: var(--sat-negro);
  font-size: 14px; font-weight: 700;
  transition: background .2s, color .2s, border-color .2s;
}
.sat-cta:hover, .sat-cta:focus { background: #fff; border-color: #fff; color: var(--sat-negro); }
.sat-cta--linea { background: transparent; border-color: #5a5852; color: #fff; }
.sat-cta--linea:hover, .sat-cta--linea:focus { background: transparent; border-color: var(--sat-amarillo); color: var(--sat-amarillo); }

.sat-galeria {
  display: flex; gap: 10px;
  min-width: 0; height: 100%;
  animation: sat-entra .9s cubic-bezier(.2, .7, .2, 1) both;
}
.sat-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0; padding: 0; border: 0;
  overflow: hidden;
  border-radius: 6px 0 0 6px;
  background: #1a191a;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: flex-grow .85s cubic-bezier(.65, 0, .2, 1);
  will-change: transform;
}
.sat-panel:not(:last-child) { border-radius: 6px; }
.sat-panel.is-activa { flex-grow: 7.2; cursor: default; }
.sat-panel img {
  position: absolute; top: -4%; left: 0;
  width: 100%; height: 108%;
  object-fit: cover;
  filter: brightness(.5) saturate(.82);
  transform: translate3d(0, var(--sat-y, 0), 0) scale(1.05);
  transition: filter .85s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1);
}
.sat-panel.is-activa img {
  filter: none;
  transform: translate3d(0, var(--sat-y, 0), 0) scale(1);
}
.sat-panel::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(to top, rgba(13, 12, 13, .84), rgba(13, 12, 13, 0));
  pointer-events: none;
}
.sat-panel__titulo {
  position: absolute; z-index: 1; left: 22px; bottom: 24px;
  max-width: calc(100% - 44px);
  color: #fff; font-size: 17px; font-weight: 700; line-height: 1.25; text-align: left;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.sat-panel.is-activa .sat-panel__titulo { opacity: 1; transform: none; transition-delay: .45s; }
.sat-panel__barra {
  position: absolute; z-index: 1; left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--sat-amarillo);
  transform: scaleX(0); transform-origin: left;
}
.sat-panel.is-activa .sat-panel__barra { animation: sat-barra var(--sat-tiempo, 6s) linear forwards; }
.sat-galeria.is-pausa .sat-panel__barra { animation-play-state: paused; }
.sat-panel:focus-visible { box-shadow: inset 0 0 0 3px var(--sat-amarillo); }

@keyframes sat-barra { to { transform: scaleX(1); } }
@keyframes sat-entra { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }

@media (max-width: 991px) {
  .sat-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    height: auto; min-height: 0;
    padding: 104px 0 36px 24px;
  }
  .sat-hero__texto { padding-right: 24px; }
  .sat-galeria { height: 440px; }
}
@media (max-width: 767px) {
  .sat-hero { padding: 92px 0 28px 16px; gap: 26px; }
  .sat-hero__texto { padding-right: 16px; }
  .sat-hero__logo { width: 180px; margin-bottom: 22px; }
  .sat-hero__bajada { font-size: 15px; line-height: 25px; margin-bottom: 22px; }
  .sat-cta { padding: 11px 22px; }
  .sat-galeria {
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-right: 16px;
    animation: none;
  }
  .sat-galeria::-webkit-scrollbar { display: none; }
  .sat-panel, .sat-panel.is-activa {
    flex: 0 0 80%;
    aspect-ratio: 4 / 5;
    border-radius: 6px;
    scroll-snap-align: start;
    cursor: pointer;
  }
  .sat-panel img, .sat-panel.is-activa img { filter: none; transform: translate3d(0, var(--sat-y, 0), 0) scale(1); }
  .sat-panel__titulo { opacity: 1; transform: none; left: 16px; bottom: 18px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .sat-galeria { animation: none; }
  .sat-panel, .sat-panel img, .sat-panel__titulo { transition: none; }
  .sat-panel.is-activa .sat-panel__barra { animation: none; }
}

/* ---------- Opiniones de Google ---------- */
#opiniones {
  --sat-amarillo: #ffc033;
  --sat-negro: #0d0c0d;
  --sat-texto: #333;
  --sat-suave: #6b6b66;
  --sat-borde: #e8e6df;
  background: #f8f7f3;
  overflow: hidden;
  scroll-margin-top: 70px;
}
#opiniones .section-header { margin-bottom: 28px; }

.sat-resumen {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: 8px 14px;
  margin-bottom: 34px;
  color: var(--sat-texto);
}
.sat-resumen[hidden] { display: none; }
.sat-resumen b { font-size: 34px; line-height: 1; font-weight: 700; color: var(--sat-negro); }
.sat-resumen a { color: var(--sat-texto); text-decoration: underline; text-underline-offset: 3px; }
.sat-resumen a:hover, .sat-resumen a:focus { color: #8a5f00; }

.sat-estrellas {
  position: relative; display: inline-block;
  font-size: 18px; line-height: 1; letter-spacing: 2px;
  color: #d9d6cc; white-space: nowrap;
}
.sat-estrellas::before { content: "★★★★★"; }
.sat-estrellas i {
  position: absolute; top: 0; left: 0;
  overflow: hidden; font-style: normal; color: var(--sat-amarillo);
}
.sat-estrellas i::before { content: "★★★★★"; }

.sat-slider { position: relative; }
.sat-pista {
  display: flex; gap: 20px;
  margin: 0; padding: 4px 2px 14px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sat-pista::-webkit-scrollbar { display: none; }
.sat-card {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 0;
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--sat-borde);
  border-radius: 6px;
}
.sat-card p {
  margin: 0; flex: 1 1 auto;
  color: var(--sat-texto);
  font-size: 15px; line-height: 25px;
  overflow-wrap: anywhere;
}
.sat-card p.sat-corto {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.sat-mas {
  align-self: flex-start;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: #8a5f00; font: inherit; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px;
}
.sat-autor {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--sat-borde);
  min-width: 0;
}
.sat-avatar {
  flex: 0 0 42px; width: 42px; height: 42px;
  object-fit: cover; border-radius: 50%;
  background: var(--sat-negro);
}
.sat-inicial {
  display: flex; align-items: center; justify-content: center;
  border-radius: 0;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  color: var(--sat-amarillo); font-weight: 700; font-size: 16px;
}
.sat-quien { min-width: 0; line-height: 1.3; }
.sat-quien a, .sat-quien strong {
  display: block; color: var(--sat-negro); font-weight: 700; font-size: 14px;
  overflow-wrap: anywhere;
}
.sat-quien a:hover, .sat-quien a:focus { color: #8a5f00; }
.sat-quien small { color: var(--sat-suave); font-size: 12px; }

.sat-controles {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 18px;
}
.sat-flecha {
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  background: var(--sat-negro); color: var(--sat-amarillo);
  font-size: 20px; line-height: 1;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  transition: background .2s, color .2s;
}
.sat-flecha:hover, .sat-flecha:focus-visible { background: var(--sat-amarillo); color: var(--sat-negro); }
.sat-puntos { display: flex; gap: 8px; }
.sat-puntos button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
  background: #cfccc2; cursor: pointer;
}
.sat-puntos button[aria-current="true"] { background: var(--sat-negro); }
.sat-pista:focus-visible, .sat-mas:focus-visible, .sat-puntos button:focus-visible {
  box-shadow: 0 0 0 2px #8a5f00; /* main.css anula outline en los botones */
}

.sat-acciones {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 22px; margin-top: 26px;
  font-size: 14px;
}
.sat-acciones a { color: var(--sat-texto); text-decoration: underline; text-underline-offset: 3px; }
.sat-acciones a:hover, .sat-acciones a:focus { color: #8a5f00; }
.sat-acciones .sat-btn {
  padding: 10px 26px; border-radius: 30px;
  background: var(--sat-negro); color: var(--sat-amarillo);
  text-decoration: none; font-weight: 700;
}
.sat-acciones .sat-btn:hover, .sat-acciones .sat-btn:focus { background: var(--sat-amarillo); color: var(--sat-negro); }
.sat-fuente { margin: 14px 0 0; text-align: center; color: var(--sat-suave); font-size: 12px; }

@media (max-width: 991px) {
  .sat-card { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 767px) {
  .sat-card { flex-basis: 86%; padding: 20px; }
  .sat-resumen b { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .sat-pista { scroll-behavior: auto; }
}
