/* ==========================================================================
   TÉRMINOS Y CONDICIONES | CLIC AL CORAZÓN
   CSS COMPLETAMENTE ENCAPSULADO PARA WORDPRESS + ELEMENTOR
   Raíz absoluta: .page-teco (Sin selectores globales que afecten temas externos)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES DE DISEÑO & CONFIGURACIÓN BASE
   -------------------------------------------------------------------------- */
.page-teco {
  --c: #fbf0d8;
  --v: #770101;
  --r: #c1111e;
  --a: #023048;
  --al: #659aba;
  --w: #fffaf0;
  --line: rgba(2, 48, 72, 0.15);

  /* Estructura y contenedor raíz */
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  color: var(--a);
  line-height: 1.5;
  background-color: var(--r);
  background-image: url("https://www.clicalcorazon.com/wp-content/uploads/2025/06/FONDO-WEB-PERFIL.png");
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: max(25px, env(safe-area-inset-top)) 18px
    max(28px, env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. OVERLAY VISUAL DE FONDO (AISLADO EN .page-teco)
   -------------------------------------------------------------------------- */
.page-teco::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(251, 240, 216, 0.12),
      transparent 32%
    ),
    radial-gradient(circle at 0 70%, rgba(2, 48, 72, 0.12), transparent 30%);
}

/* --------------------------------------------------------------------------
   3. RESET AISLADO & ESPECÍFICO (SIN AFECTAR WORDPRESS/ELEMENTOR)
   -------------------------------------------------------------------------- */
.page-teco,
.page-teco *,
.page-teco *::before,
.page-teco *::after {
  box-sizing: border-box;
}

.page-teco h1,
.page-teco h2,
.page-teco p,
.page-teco ul,
.page-teco li {
  margin: 0;
  padding: 0;
}

.page-teco img {
  max-width: 100%;
  height: auto;
  border-style: none;
}

/* --------------------------------------------------------------------------
   4. ESTRUCTURA Y CONTENEDORES PRINCIPALES
   -------------------------------------------------------------------------- */
.page-teco .header,
.page-teco .hero,
.page-teco .layout,
.page-teco .footer {
  width: min(100%, 1050px);
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   5. HEADER & NAVEGACIÓN SUPERIOR
   -------------------------------------------------------------------------- */
.page-teco .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.page-teco .brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.page-teco .brand img {
  width: 115px;
  height: auto;
  display: block;
}

.page-teco .back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 2px solid rgba(251, 240, 216, 0.5);
  border-radius: 14px;
  color: var(--c);
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  background: rgba(2, 48, 72, 0.12);
  white-space: nowrap;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.page-teco .back:hover,
.page-teco .back:focus-visible {
  background: rgba(2, 48, 72, 0.28);
  border-color: rgba(251, 240, 216, 0.85);
  color: var(--w);
  outline: none;
}

.page-teco .back svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: currentColor;
  display: block;
}

/* --------------------------------------------------------------------------
   6. HERO SECTION
   -------------------------------------------------------------------------- */
.page-teco .hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.page-teco .hero-photo {
  width: 90px;
  height: 90px;
  flex: 0 0 90px;
  border-radius: 50%;
  padding: 4px;
  background: var(--c);
  border: 3px solid var(--a);
  box-shadow: 0 9px 25px #0003;
  object-fit: cover;
  display: block;
}

.page-teco .hero > div {
  min-width: 0;
  flex: 1 1 auto;
}

.page-teco .eyebrow {
  color: var(--c);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin: 0 0 7px;
  line-height: 1.2;
}

.page-teco h1 {
  color: var(--w);
  font-family: inherit;
  font-size: clamp(32px, 5vw, 55px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -1.4px;
  margin: 0;
  overflow-wrap: break-word;
}

.page-teco .hero p {
  margin: 9px 0 0;
  color: #fffaf0dd;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   7. LAYOUT & GRID PRINCIPAL
   -------------------------------------------------------------------------- */
.page-teco .layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* --------------------------------------------------------------------------
   8. ÍNDICE LATERAL (STICKY)
   -------------------------------------------------------------------------- */
.page-teco .index {
  position: sticky;
  top: 18px;
  background: #fbf0d8f7;
  border: 3px solid var(--a);
  border-radius: 24px;
  padding: 20px 17px;
  box-shadow:
    0 8px 0 var(--v),
    0 15px 30px #02304840;
  min-width: 0;
}

.page-teco .index-title {
  display: block;
  color: var(--v);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.2;
}

.page-teco .index a {
  display: block;
  padding: 8px 7px;
  border-radius: 9px;
  color: var(--a);
  text-decoration: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: normal;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.page-teco .index a:hover,
.page-teco .index a:focus-visible {
  background: var(--al);
  color: var(--w);
  outline: none;
}

/* --------------------------------------------------------------------------
   9. DOCUMENTO & CONTENIDO LEGAL
   -------------------------------------------------------------------------- */
.page-teco .document {
  background: var(--c);
  border: 3px solid var(--a);
  border-radius: 34px;
  box-shadow:
    0 10px 0 var(--v),
    0 20px 40px #02304840;
  overflow: hidden;
  min-width: 0;
}

.page-teco .document-top {
  padding: 27px 34px 23px;
  border-bottom: 1px solid var(--line);
}

.page-teco .notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #659aba26;
  border: 1px solid #02304818;
  font-size: 12px;
  line-height: 1.55;
}

.page-teco .notice-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--a);
  color: var(--c);
  font-weight: 800;
  font-style: normal;
  line-height: 1;
}

.page-teco .notice p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: break-word;
}

.page-teco .document-body {
  padding: 4px 34px 36px;
}

.page-teco .section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}

.page-teco .section:last-child {
  border-bottom: 0;
}

.page-teco .section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--v);
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  overflow-wrap: break-word;
}

.page-teco .num {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--a);
  color: var(--c);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.page-teco .section p {
  font-size: 14px;
  line-height: 1.72;
  margin: 0 0 11px;
  overflow-wrap: break-word;
}

.page-teco .section strong {
  font-weight: 700;
}

.page-teco .section ul {
  padding-left: 20px;
  margin: 8px 0 11px;
  list-style: disc;
}

.page-teco .section li {
  font-size: 14px;
  line-height: 1.65;
  margin: 5px 0;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   10. INFO GRID & FICHAS DE DATOS
   -------------------------------------------------------------------------- */
.page-teco .info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 15px;
}

.page-teco .info {
  padding: 15px;
  border-radius: 16px;
  background: #659aba1f;
  border: 1px solid #02304818;
  min-width: 0;
}

.page-teco .info-label {
  display: block;
  color: var(--v);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin-bottom: 5px;
  overflow-wrap: break-word;
  line-height: 1.2;
}

.page-teco .info-value {
  display: block;
  color: inherit;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.page-teco .info-value a {
  color: var(--a);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 650;
  line-height: inherit;
  word-break: break-word;
  overflow-wrap: break-word;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.page-teco .info-value a:hover,
.page-teco .info-value a:focus-visible {
  color: var(--v);
  text-decoration-color: var(--v);
  outline: none;
}

.page-teco .teco-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--v);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.page-teco .teco-cancel-btn:hover,
.page-teco .teco-cancel-btn:focus-visible {
  color: var(--r);
  text-decoration-color: var(--r);
  outline: none;
}

.page-teco .placeholder {
  border: 1px dashed var(--v);
  background: #c1111e0d;
}

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
.page-teco .footer {
  margin-top: 40px;
  text-align: center;
  color: #fbf0d8dd;
  font-size: 11px;
  line-height: 1.5;
}

.page-teco .footer img {
  width: 140px;
  max-width: 42vw;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 13px;
  display: inline-block;
}

.page-teco .footer p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: break-word;
}

.page-teco .footer small {
  display: block;
  color: #fbf0d899;
  font-size: 10px;
  margin-top: 8px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   12. VENTANA MODAL: POLÍTICA DE CANCELACIÓN
   -------------------------------------------------------------------------- */
.page-teco .teco-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.page-teco .teco-modal.is-active,
.page-teco .teco-modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.page-teco .teco-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 48, 72, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.page-teco .teco-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  max-height: min(88vh, 620px);
  overflow-y: auto;
  background: var(--c);
  border: 3px solid var(--a);
  border-radius: 28px;
  box-shadow:
    0 10px 0 var(--v),
    0 25px 50px rgba(2, 48, 72, 0.45);
  padding: 30px 32px 28px;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
}

.page-teco .teco-modal.is-active .teco-modal-dialog,
.page-teco .teco-modal[aria-hidden="false"] .teco-modal-dialog {
  transform: scale(1);
}

.page-teco .teco-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 50%;
  background: var(--a);
  color: var(--c);
  border: 2px solid var(--a);
  font-size: 22px;
  font-family: Arial, sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.page-teco .teco-modal-close:hover,
.page-teco .teco-modal-close:focus-visible {
  background: var(--v);
  border-color: var(--v);
  color: var(--w);
  transform: scale(1.08);
  outline: none;
}

.page-teco .teco-modal-eyebrow {
  color: var(--v);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  line-height: 1.2;
}

.page-teco .teco-modal-dialog h3 {
  color: var(--v);
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px;
  padding-right: 36px;
  overflow-wrap: break-word;
}

.page-teco .teco-modal-content {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--a);
}

.page-teco .teco-modal-content p {
  margin: 0 0 11px;
  font-size: 13.5px;
  line-height: 1.68;
  overflow-wrap: break-word;
}

.page-teco .teco-modal-content p:last-of-type {
  margin-bottom: 0;
}

.page-teco .teco-modal-note {
  display: block;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(2, 48, 72, 0.78);
  font-style: italic;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  overflow-wrap: break-word;
}

/* ==========================================================================
   12. RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================================================== */

/* Tablet y pantallas medianas (<= 800px) */
@media (max-width: 800px) {
  .page-teco {
    background-attachment: scroll;
  }

  .page-teco .layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page-teco .index {
    position: relative;
    top: auto;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    border-radius: 18px;
    box-shadow:
      0 6px 0 var(--v),
      0 12px 24px #02304833;
    scrollbar-width: thin;
    scrollbar-color: var(--al) transparent;
  }

  .page-teco .index::-webkit-scrollbar {
    height: 4px;
  }

  .page-teco .index::-webkit-scrollbar-track {
    background: transparent;
  }

  .page-teco .index::-webkit-scrollbar-thumb {
    background: var(--al);
    border-radius: 4px;
  }

  .page-teco .index-title {
    display: none;
  }

  .page-teco .index a {
    flex: 0 0 auto;
    white-space: nowrap;
    background: #659aba20;
    padding: 8px 11px;
    border-radius: 8px;
  }
}

/* Móviles estándar (<= 560px) */
@media (max-width: 560px) {
  .page-teco {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-teco .header {
    margin-bottom: 20px;
    gap: 12px;
  }

  .page-teco .brand img {
    width: 100px;
  }

  .page-teco .back {
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 12px;
  }

  .page-teco .back svg {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .page-teco .hero {
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
  }

  .page-teco .hero-photo {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-width: 2px;
  }

  .page-teco h1 {
    font-size: 30px;
    letter-spacing: -1px;
  }

  .page-teco .hero p {
    font-size: 12px;
  }

  .page-teco .document {
    border-width: 2px;
    border-radius: 27px;
    box-shadow:
      0 8px 0 var(--v),
      0 14px 27px #02304840;
  }

  .page-teco .document-top {
    padding: 19px 17px 17px;
  }

  .page-teco .notice {
    font-size: 11.5px;
    padding: 12px;
    gap: 10px;
  }

  .page-teco .notice-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    font-size: 11px;
  }

  .page-teco .document-body {
    padding: 2px 18px 27px;
  }

  .page-teco .section {
    padding: 22px 0;
  }

  .page-teco .section h2 {
    font-size: 18px;
  }

  .page-teco .section p,
  .page-teco .section li {
    font-size: 13px;
    line-height: 1.65;
  }

  .page-teco .info-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .page-teco .info {
    padding: 13px;
  }

  .page-teco .footer {
    margin-top: 31px;
  }

  .page-teco .footer img {
    width: 120px;
  }

  .page-teco .teco-modal {
    padding: 12px;
  }

  .page-teco .teco-modal-dialog {
    width: 100%;
    max-height: min(90vh, 580px);
    border-radius: 22px;
    padding: 24px 20px 22px;
  }

  .page-teco .teco-modal-close {
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    font-size: 19px;
  }

  .page-teco .teco-modal-dialog h3 {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .page-teco .teco-modal-content,
  .page-teco .teco-modal-content p {
    font-size: 12.5px;
    line-height: 1.6;
  }

  .page-teco .teco-modal-note {
    font-size: 11px;
  }
}

/* Móviles compactos y extra pequeños (<= 380px, ej. 320px, 360px, 375px) */
@media (max-width: 380px) {
  .page-teco {
    padding-left: 10px;
    padding-right: 10px;
  }

  .page-teco .header {
    margin-bottom: 16px;
    gap: 8px;
  }

  .page-teco .brand img {
    width: 88px;
  }

  .page-teco .back {
    padding: 7px 10px;
    font-size: 10.5px;
    gap: 5px;
    border-radius: 10px;
  }

  .page-teco .back svg {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }

  .page-teco .hero {
    gap: 12px;
    margin-bottom: 18px;
  }

  .page-teco .hero-photo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }

  .page-teco .eyebrow {
    font-size: 10px;
    letter-spacing: 1.8px;
    margin-bottom: 5px;
  }

  .page-teco h1 {
    font-size: 24px;
    letter-spacing: -0.6px;
    line-height: 1.08;
  }

  .page-teco .hero p {
    font-size: 11.5px;
    line-height: 1.45;
  }

  .page-teco .index {
    padding: 8px 6px;
    border-radius: 14px;
  }

  .page-teco .index a {
    padding: 6px 9px;
    font-size: 11px;
  }

  .page-teco .document {
    border-radius: 20px;
  }

  .page-teco .document-top {
    padding: 15px 13px 13px;
  }

  .page-teco .notice {
    padding: 10px;
    gap: 8px;
    font-size: 11px;
    border-radius: 12px;
  }

  .page-teco .notice-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 10px;
  }

  .page-teco .document-body {
    padding: 0 13px 20px;
  }

  .page-teco .section {
    padding: 18px 0;
  }

  .page-teco .section h2 {
    font-size: 16px;
    gap: 8px;
    margin-bottom: 10px;
  }

  .page-teco .num {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    font-size: 10px;
  }

  .page-teco .section p,
  .page-teco .section li {
    font-size: 12.5px;
    line-height: 1.6;
  }

  .page-teco .info {
    padding: 11px 12px;
    border-radius: 12px;
  }

  .page-teco .info-label {
    font-size: 9.5px;
  }

  .page-teco .info-value {
    font-size: 12px;
  }

  .page-teco .footer {
    margin-top: 26px;
  }

  .page-teco .footer img {
    width: 105px;
  }

  .page-teco .teco-modal {
    padding: 8px;
  }

  .page-teco .teco-modal-dialog {
    border-radius: 18px;
    padding: 20px 14px 18px;
    border-width: 2px;
    box-shadow:
      0 6px 0 var(--v),
      0 16px 32px rgba(2, 48, 72, 0.4);
  }

  .page-teco .teco-modal-close {
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    font-size: 17px;
  }

  .page-teco .teco-modal-eyebrow {
    font-size: 10px;
    letter-spacing: 1.6px;
  }

  .page-teco .teco-modal-dialog h3 {
    font-size: 17px;
    padding-right: 30px;
    margin-bottom: 10px;
  }

  .page-teco .teco-modal-content,
  .page-teco .teco-modal-content p {
    font-size: 12px;
    line-height: 1.55;
    margin-bottom: 9px;
  }

  .page-teco .teco-modal-note {
    font-size: 10.5px;
    margin-top: 10px;
    padding-top: 10px;
  }
}

/* Accesibilidad: Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .page-teco .teco-modal,
  .page-teco .teco-modal-dialog,
  .page-teco .teco-modal-close {
    transition: none;
    transform: none;
  }
}
