/* =====================================================================
   TÉRMINOS Y CONDICIONES + POLÍTICA DE PRIVACIDAD  (página legal /tyc)
   ---------------------------------------------------------------------
   Capa PROPIA de las páginas legales (Términos y Condiciones · Política de
   Privacidad; misma vista). Reutiliza el layout de lectura legal (.g-legal* de
   g-legal.css) y añade lo específico:
     - selector por PRODUCTO en pestañas (los "dos botones": talleres/medicina),
     - tarjeta de "documento legal" (meta + descarga PDF + cuerpo) del producto
       activo.
   Consume SOLO tokens del contrato (g-colors.css). Clases prefijadas g-.
   ===================================================================== */

/* ---------------------------------------------------------------------
   0) INTRO CENTRADA (bajo el encabezado)
   Bloque de introducción centrado y con ancho de lectura acotado.
   --------------------------------------------------------------------- */
.g-tyc-intro {
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------------------------------------------
   1) SELECTOR DE PRODUCTO (pestañas)
   Segmented control: los dos productos (talleres/medicina) como botones
   grandes. El activo se rellena con el azul de marca; conmuta el cuerpo
   legal en pantalla (no descarga). Cada página muestra UN documento.
   --------------------------------------------------------------------- */
.g-tyc-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 40px;
    padding: 8px;
    background: var(--g-bg-light);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-lg);
}
.g-tyc-switch__btn {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid transparent;
    border-radius: var(--g-radius-md);
    background: transparent;
    color: var(--g-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.g-tyc-switch__btn i {
    font-size: 20px;
    color: var(--g-primary);
    transition: color .18s ease;
}
.g-tyc-switch__btn:hover {
    background: var(--g-white);
    color: var(--g-heading);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
/* Estado ACTIVO (pestaña seleccionada) */
.g-tyc-switch__btn.active {
    background: var(--g-primary);
    color: var(--g-white);
    box-shadow: 0 6px 16px rgba(var(--g-primary-rgb), .28);
}
.g-tyc-switch__btn.active i { color: var(--g-white); }

/* ---------------------------------------------------------------------
   2) TARJETA DE DOCUMENTO (cuerpo legal del producto activo)
   Contenedor enmarcado con la meta (versión + descarga PDF) arriba y el
   cuerpo legal debajo. Ya NO es un acordeón: cada pestaña muestra su
   documento directamente.
   --------------------------------------------------------------------- */
.g-tyc-doc {
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-lg);
    background: var(--g-white);
    overflow: hidden;
}
.g-tyc-doc__inner {
    padding: 26px 24px;
}

/* Barra superior del documento: metadatos + descarga PDF */
.g-tyc-doc__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.g-tyc-doc__version {
    margin: 0;
    font-size: 13px;
    color: var(--g-text-muted);
}

/* ---------------------------------------------------------------------
   3) CUERPO DE TEXTO LEGAL — salida de MARKDOWN renderizado
   El texto legal vive en archivos .md (uno por software × documento ×
   idioma) y el controlador lo convierte a HTML (league/commonmark) e
   inyecta aquí. Este bloque estiliza los TAGS que produce Markdown
   (h2/h3/p/ul/ol/strong…) SIN necesidad de clases en el .md. Envolver
   la salida en .g-legal-md.
   --------------------------------------------------------------------- */
.g-legal-md > *:first-child { margin-top: 0; }
.g-legal-md > *:last-child { margin-bottom: 0; }
.g-legal-md h2 {
    margin: 26px 0 10px;
    font-size: 19px;
    font-weight: 700;
    color: var(--g-heading);
}
.g-legal-md h3 {
    margin: 22px 0 8px;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--g-heading);
}
.g-legal-md p {
    margin: 0 0 12px;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--g-text);
    text-align: justify;
}
.g-legal-md ul,
.g-legal-md ol {
    margin: 0 0 12px;
    padding-left: 22px;
}
.g-legal-md li {
    margin-bottom: 6px;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--g-text);
    text-align: justify;
}
.g-legal-md strong { color: var(--g-heading); font-weight: 700; }
.g-legal-md a {
    color: var(--g-primary);
    font-weight: 600;
    text-decoration: underline;
}
.g-legal-md a:hover { color: var(--g-primary-hover); }
.g-legal-md hr {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--g-border);
}

/* ---------------------------------------------------------------------
   4) NOTA DE ACEPTACIÓN (destacada)
   --------------------------------------------------------------------- */
.g-tyc-accept {
    display: flex;
    gap: 14px;
    margin: 8px 0 0;
    padding: 20px 22px;
    background: rgba(var(--g-primary-rgb), .07);
    border: 1px solid rgba(var(--g-primary-rgb), .18);
    border-radius: var(--g-radius-lg);
}
.g-tyc-accept i {
    font-size: 20px;
    color: var(--g-primary);
    margin-top: 2px;
}
.g-tyc-accept p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--g-text);
}

/* ---------------------------------------------------------------------
   5) BLOQUE "ATENCIÓN AL CLIENTE" (compartido, fuera de pestañas)
   --------------------------------------------------------------------- */
.g-tyc-help {
    text-align: center;
    margin-top: 12px;
    padding: 36px 24px;
    background: var(--g-bg-light);
    border-radius: var(--g-radius-lg);
}
.g-tyc-help__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--g-heading);
}
.g-tyc-help__text {
    margin: 0 0 20px;
    font-size: 16px;
    color: var(--g-text);
}
.g-tyc-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ---------------------------------------------------------------------
   6) RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .g-tyc-switch { flex-direction: column; }
    .g-tyc-switch__btn { flex: 1 1 auto; }
    .g-tyc-doc__inner { padding-left: 18px; padding-right: 18px; }
}
