/* ==============================================================
   OBSERV · SALUDPANAMA · v1.0
   Hoja de estilos aislada para observ-html-base.html + observ.js
   Textos, colores e iconos: se editan SOLO en el HTML.
   =============================================================== */

.observ,
.observ * { box-sizing: border-box; }

.observ {
  --observ-ink: #142019;
  --observ-muted: #64736c;
  --observ-accent: #6b9a3a;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 76px 0 66px;
  overflow: hidden;
  background: #fff;
  color: var(--observ-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

.observ__inner { width: 100%; margin-inline: auto; }
.observ__heading { position: relative; z-index: 3; text-align: center; padding-inline: 22px; }
.observ__heading .observ__eyebrow {
  margin: 0 0 13px;
  color: var(--observ-accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.observ__heading h2 {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 59px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: -.052em;
  color: var(--observ-ink);
}
.observ__heading > p:last-child {
  margin: 17px auto 0;
  max-width: 640px;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6;
  color: var(--observ-muted);
}

/* Escena 3D: el JS aplica translate3d, escala, opacidad y profundidad. */
.observ__scene {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: 100%;
  height: 615px;
  margin: 8px auto 0;
  perspective: 1350px;
  perspective-origin: 50% 46%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.observ__scene:active { cursor: grabbing; }
.observ__orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
.observ__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(740px, 91vw);
  height: 440px;
  transform: translate(-50%, -49%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(122, 169, 118, .14) 0%, rgba(151, 186, 142, .07) 38%, transparent 72%);
  pointer-events: none;
}
/* Una elipse delicada y única, sin trazos alrededor de satélites. */
.observ__ellipse {
  position: absolute;
  left: 50%;
  top: 53%;
  width: min(1120px, 92%);
  height: 240px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(83, 124, 91, .105);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(108, 170, 113, .035);
  pointer-events: none;
}
.observ__ellipse::before {
  content: "";
  position: absolute;
  inset: 16px 35px;
  border: 1px solid rgba(83, 124, 91, .055);
  border-radius: 50%;
}

.observ__card {
  --observ-color: #6b9a3a;
  --observ-color-2: #a8c977;
  --observ-text: #fff;
  position: absolute;
  left: 50%;
  top: 49%;
  display: block;
  width: 286px;
  aspect-ratio: 4 / 5;
  border-radius: 27px;
  color: var(--observ-text);
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(151deg, var(--observ-color-2) 0%, var(--observ-color) 75%);
  box-shadow: 0 25px 65px rgba(30, 50, 40, .13), inset 0 1px 0 rgba(255, 255, 255, .42);
  transform: translate(-50%, -50%);
  transform-origin: center;
  overflow: visible;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  will-change: transform, opacity;
}
.observ__card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(148deg, rgba(255,255,255,.23), transparent 40%, rgba(255,255,255,.045));
}
.observ__card-face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  width: 100%;
  min-width: 0;
  padding: 30px 25px 25px;
  border-radius: inherit;
  overflow: hidden;
}
.observ__icon {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.observ__card h3 {
  margin: auto 0 0;
  max-width: 100%;
  font-size: 30px;
  font-weight: 830;
  line-height: 1.09;
  letter-spacing: -.045em;
  text-wrap: balance;
  overflow-wrap: break-word;
  color: inherit;
}
.observ__card:nth-of-type(5) h3 { font-size: 26px; line-height: 1.12; }
.observ__card-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .035em;
  color: inherit;
  opacity: .9;
}
.observ__card-action span { font-size: 19px; line-height: .75; font-weight: 400; }
.observ__card[data-observ-active="true"] { box-shadow: 0 34px 85px rgba(39, 72, 46, .21), inset 0 1px 0 rgba(255,255,255,.54); }
.observ__card:focus-visible,
.observ__arrow:focus-visible { outline: 3px solid #346f34; outline-offset: 5px; }

/* Los tres pequeños cuerpos no dibujan sus trayectorias orbitales. */
.observ__satellite {
  position: absolute;
  z-index: 3;
  display: block;
  pointer-events: none;
  transform-origin: center;
  box-shadow: inset -3px -3px 7px rgba(0,0,0,.10), inset 2px 2px 5px rgba(255,255,255,.7), 0 7px 14px rgba(42,72,52,.12);
  animation: observ-satellite-float 5.8s ease-in-out infinite alternate;
}
.observ__satellite--one {
  top: 16%;
  left: -15px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f0b977;
  animation-delay: -.8s;
}
.observ__satellite--two {
  top: -14px;
  right: 9%;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #a6cc83;
  animation-duration: 7s;
  animation-delay: -2.2s;
}
.observ__satellite--three {
  bottom: 12%;
  right: -13px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c9b5de;
  animation-duration: 4.9s;
  animation-delay: -3s;
}
.observ__card:nth-of-type(2n) .observ__satellite--one { top: 63%; left: -11px; background: #bbd8e7; }
.observ__card:nth-of-type(3n) .observ__satellite--two { right: -10px; top: 21%; border-radius: 50%; background: #d3b0da; }
.observ__card:nth-of-type(4n) .observ__satellite--three { right: 22%; bottom: -8px; background: #edbd85; }
@keyframes observ-satellite-float {
  0% { translate: -5px -5px; rotate: -16deg; }
  100% { translate: 8px 8px; rotate: 22deg; }
}

.observ__controls {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  margin-top: -20px;
}
.observ__arrow {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(38, 70, 49, .14);
  border-radius: 50%;
  background: #fff;
  color: #35483b;
  font: 500 23px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 7px 22px rgba(20, 40, 24, .045);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.observ__arrow:hover { background: #f0f6ea; border-color: rgba(92, 146, 58, .35); transform: translateY(-2px); }
.observ__arrow:active { transform: translateY(0); }
.observ__counter { min-width: 77px; text-align: center; color: #5b6c60; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .14em; }
.observ__hint { position: relative; z-index: 2; margin: 16px 18px 0; color: #7a877f; font-size: 13px; line-height: 1.5; text-align: center; }

/* Antes de cargar JS, mostrar la primera tarjeta sin apilamientos caóticos. */
.observ:not([data-observ-ready="true"]) .observ__card { opacity: 0; pointer-events: none; }
.observ:not([data-observ-ready="true"]) .observ__card:first-child { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .observ { padding-top: 61px; }
  .observ__scene { height: 545px; perspective: 1100px; }
  .observ__card { width: 258px; border-radius: 24px; }
  .observ__card-face { padding: 27px 22px 23px; }
  .observ__card h3 { font-size: 27px; }
  .observ__card:nth-of-type(5) h3 { font-size: 23px; }
  .observ__ellipse { height: 190px; }
}
@media (max-width: 600px) {
  .observ { padding: 48px 0 48px; }
  .observ__heading { padding-inline: 19px; }
  .observ__heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .observ__heading > p:last-child { max-width: 350px; font-size: 14px; }
  .observ__scene { height: 440px; margin-top: 10px; perspective: 980px; }
  .observ__card { width: min(232px, 62vw); border-radius: 22px; }
  .observ__card-face { padding: 23px 19px 21px; }
  .observ__icon { width: 43px; height: 43px; flex-basis: 43px; }
  .observ__card h3 { font-size: clamp(19px, 5.4vw, 25px); }
  .observ__card:nth-of-type(5) h3 { font-size: clamp(17px, 4.65vw, 21px); }
  .observ__card-action { font-size: 10px; margin-top: 18px; }
  .observ__ellipse { width: 104%; height: 155px; }
  .observ__glow { width: 100vw; height: 300px; }
  .observ__controls { margin-top: -5px; gap: 20px; }
  .observ__arrow { width: 47px; height: 47px; }
  .observ__hint { margin-top: 14px; }
}
@media (max-width: 390px) {
  .observ__scene { height: 405px; }
  .observ__card { width: min(216px, 62vw); }
  .observ__card-face { padding: 20px 17px 19px; }
  .observ__card h3 { font-size: 21px; }
  .observ__card:nth-of-type(5) h3 { font-size: 17px; }
  .observ__ellipse { height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .observ__satellite { animation: none !important; }
  .observ__arrow { transition: none; }
}

/* OBSERV v1.1: contraste de textos y neutralización de hover del tema Joomla */
.observ .observ__heading,
.observ .observ__heading h2 { text-align: center !important; }

.observ a.observ__card,
.observ a.observ__card:link,
.observ a.observ__card:visited,
.observ a.observ__card h3,
.observ a.observ__card .observ__card-action,
.observ a.observ__card .observ__icon {
  color: var(--observ-text, #f2f2f2) !important;
}

.observ a.observ__card:hover,
.observ a.observ__card:hover h3,
.observ a.observ__card:hover .observ__card-action,
.observ a.observ__card:hover .observ__icon,
.observ a.observ__card:focus-visible,
.observ a.observ__card:focus-visible h3,
.observ a.observ__card:focus-visible .observ__card-action,
.observ a.observ__card:focus-visible .observ__icon {
  color: #ffffff !important;
}
/* OBSERV — Navegación inferior centrada */

.observ .observ__controls {
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  gap: 20px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.observ .observ__counter {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 65px;
  text-align: center !important;
}
