/* =============================================
   Privacidad (Ley 21.719)
   - Aviso de cookies (consentimiento.js)
   - Enlaces legales del pie
   - Casilla y aviso del formulario de contacto
   - Página /politica-de-privacidad/
   Archivo aparte de styles.css a propósito: así se agrega sin tener que
   cambiar la versión de la hoja general en todas las páginas.
   ============================================= */

/* ─── Aviso de cookies ─── */
.cc-aviso {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10050;                 /* sobre el chat (9999) y el header (1000) */
  width: min(760px, calc(100vw - 32px));
  transform: translate(-50%, 16px);
  opacity: 0;
  background: #fff;
  color: #1a202c;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #4faf4f;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(6, 16, 40, .25);
  font-family: 'Barlow', Arial, sans-serif;
  font-size: .92rem;
  line-height: 1.5;
  transition: opacity .3s ease, transform .3s ease;
}
.cc-aviso.cc-visible { opacity: 1; transform: translate(-50%, 0); }
.cc-aviso[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .cc-aviso { transition: none; } }

.cc-principal { display: flex; align-items: center; gap: 1.25rem; padding: 1.1rem 1.25rem; }
.cc-cuerpo { flex: 1; min-width: 0; }
.cc-titulo { font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; color: #001f66; margin: 0 0 .2rem; }
.cc-texto { margin: 0; color: #4a5568; }
.cc-texto strong { color: #1a202c; font-weight: 600; }
.cc-texto a { color: #002d92; text-decoration: underline; font-weight: 600; }

.cc-acciones { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
/* Aceptar y Rechazar con el mismo peso visual: rechazar tiene que ser igual
   de fácil que aceptar, o el consentimiento no es libre. */
.cc-btn {
  font-family: 'Barlow Condensed', Arial, sans-serif; font-size: .92rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid transparent; border-radius: 50px; padding: .55rem 1.25rem;
  cursor: pointer; transition: background .18s ease, border-color .18s ease;
}
.cc-btn--aceptar { background: #2f7f35; color: #fff; }   /* verde oscurecido: contraste 5:1 con texto blanco */
.cc-btn--aceptar:hover { background: #26692b; }
.cc-btn--rechazar { background: #002d92; color: #fff; }
.cc-btn--rechazar:hover { background: #001f66; }
.cc-enlace {
  background: none; border: none; padding: .55rem .5rem; cursor: pointer;
  font-family: 'Barlow', Arial, sans-serif; font-size: .9rem; font-weight: 600;
  color: #4a5568; text-decoration: underline;
}
.cc-enlace:hover { color: #002d92; }
.cc-btn:focus-visible, .cc-enlace:focus-visible, .cc-interruptor input:focus-visible + span {
  outline: 3px solid #002d92; outline-offset: 2px;
}

.cc-panel { border-top: 1px solid #e2e8f0; padding: .4rem 1.25rem 1.1rem; }
.cc-panel[hidden] { display: none; }
.cc-opcion { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #edf2f7; }
.cc-opcion-titulo { margin: 0; font-weight: 700; color: #1a202c; }
.cc-opcion-txt { margin: .15rem 0 0; font-size: .85rem; color: #4a5568; }
.cc-siempre { flex-shrink: 0; font-size: .8rem; font-weight: 700; color: #2f7f35; white-space: nowrap; }
.cc-panel-acciones { display: flex; justify-content: flex-end; padding-top: .9rem; }

/* Interruptor accesible: es un checkbox de verdad, sólo que dibujado. */
.cc-interruptor { position: relative; flex-shrink: 0; width: 46px; height: 26px; }
.cc-interruptor input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.cc-interruptor span { position: absolute; inset: 0; background: #cbd5e0; border-radius: 26px; transition: background .18s ease; }
.cc-interruptor span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease; }
.cc-interruptor input:checked + span { background: #4faf4f; }
.cc-interruptor input:checked + span::after { transform: translateX(20px); }

/* Mientras se decide, el aviso de novedades espera: si no, se tapan. */
html.cc-abierto .blp-aviso { display: none !important; }

@media (max-width: 768px) {
  .cc-aviso { bottom: 0; width: 100%; border-radius: 16px 16px 0 0; border-left: none; border-right: none; border-bottom: none; font-size: .9rem; }
  .cc-principal { flex-direction: column; align-items: stretch; gap: .85rem; padding: 1rem 1rem .9rem; }
  .cc-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .cc-enlace { grid-column: 1 / -1; order: 3; padding: .2rem; }
  .cc-btn { width: 100%; padding: .7rem 1rem; }
  .cc-panel { padding: .2rem 1rem 1rem; max-height: 55vh; overflow-y: auto; }
  .cc-panel-acciones .cc-btn { width: 100%; }
}

/* ─── Contenido externo diferido (YouTube, LinkedIn, Google Maps) ───
   Recuadro que ocupa el lugar del iframe hasta que se activa (ver
   consentimiento.js). Al activarse se reemplaza por el iframe original, así
   que los estilos del sitio para ese iframe siguen valiendo tal cual. */
.diferido { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; font-family: 'Barlow', Arial, sans-serif; }
.diferido > template { display: none; }

/* Video: la caja ya ocupa todo .blog-row-media (regla .blog-row-media > *) */
.diferido--video { background: #000; overflow: hidden; }
.diferido--video > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.diferido-boton {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  background: linear-gradient(180deg, rgba(0,18,51,.15), rgba(0,18,51,.65));
  border: 0; color: #fff; cursor: pointer; padding: 1rem; text-align: center;
}
.diferido-play { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.95); color: #002d92; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .18s ease; }
.diferido-play svg { width: 28px; height: 28px; margin-left: 3px; }
.diferido-boton:hover .diferido-play { transform: scale(1.08); }
.diferido-boton .diferido-titulo { font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.diferido-boton .diferido-nota { font-size: .8rem; opacity: .9; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.diferido-boton:focus-visible { outline: 3px solid #4faf4f; outline-offset: -3px; }

/* LinkedIn y mapa: tarjeta clara con el botón */
.diferido--linkedin { min-height: 540px; background: #f3f6f8; }
.diferido--mapa { position: absolute; inset: 0; background: #edf2f7; }
.diferido-cuerpo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 1.5rem; max-width: 340px; }
.diferido-marca { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; background: #0a66c2; color: #fff; font-family: Arial, sans-serif; font-weight: 700; font-size: 1.6rem; }
.diferido-cuerpo .diferido-titulo { margin: 0; font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 700; font-size: 1.2rem; color: #001f66; }
.diferido-cuerpo .diferido-nota { margin: 0 0 .35rem; font-size: .88rem; line-height: 1.45; color: #4a5568; }
.diferido-accion {
  font-family: 'Barlow Condensed', Arial, sans-serif; font-size: .95rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #002d92; color: #fff; border: 0; border-radius: 50px; padding: .6rem 1.4rem; cursor: pointer; transition: background .18s ease;
}
.diferido-accion:hover { background: #001f66; }
.diferido-accion:focus-visible, .diferido-directo:focus-visible { outline: 3px solid #4faf4f; outline-offset: 2px; }
.diferido-directo { font-size: .85rem; font-weight: 600; color: #0a66c2; text-decoration: underline; }

/* ─── Pie: enlaces legales ─── */
.fb-legal { margin: 0; }
.fb-legal a { color: rgba(255,255,255,.65); text-decoration: underline; text-underline-offset: 2px; transition: color .18s ease; }
.fb-legal a:hover { color: #fff; }

/* ─── Formulario de contacto ─── */
.form-consent { display: flex; align-items: flex-start; gap: .65rem; margin: 0 0 .9rem; text-align: left; }
.form-consent input { flex-shrink: 0; width: 18px; height: 18px; margin: .15rem 0 0; accent-color: #4faf4f; cursor: pointer; }
.form-consent label { font-size: .9rem; line-height: 1.45; color: #4a5568; cursor: pointer; }
.form-consent label span { color: #718096; }
.form-aviso { margin: 0 0 1.25rem; font-size: .82rem; line-height: 1.5; color: #718096; text-align: left; }
.form-aviso a { color: #002d92; text-decoration: underline; font-weight: 600; }

/* ─── Página de política ─── */
.legal { background: #f6f9f6; padding: 3.25rem 0 4rem; }
.legal-doc {
  max-width: 880px; margin: 0 auto; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  color: #1a202c; font-size: 1rem; line-height: 1.7;
}
.legal-version { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #276b2c; background: #e8f5e9; padding: .25rem .7rem; border-radius: 4px; margin-bottom: 1.25rem; }
.legal-doc h2 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 1.5rem;
  color: #001f66; text-transform: uppercase; letter-spacing: .02em;
  margin: 2.5rem 0 .75rem; padding-top: .5rem; border-top: 1px solid #e2e8f0;
  scroll-margin-top: 110px;       /* que el header fijo no tape el título al saltar */
}
.legal-doc h2:first-of-type { margin-top: 1.5rem; }
.legal-doc h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.15rem; color: #1a202c; margin: 1.5rem 0 .4rem; }
.legal-doc p { margin: 0 0 .9rem; color: #2d3748; }
.legal-doc ul { list-style: disc; margin: 0 0 1rem 1.3rem; color: #2d3748; }
.legal-doc li { margin-bottom: .35rem; }
.legal-doc a { color: #002d92; text-decoration: underline; font-weight: 600; }
.legal-doc strong { color: #1a202c; }
.legal-indice { background: #f6f9f6; border: 1px solid #e2e8f0; border-radius: 10px; padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.legal-indice p { margin: 0 0 .4rem; font-weight: 700; color: #001f66; }
.legal-indice ol { margin: 0 0 0 1.2rem; columns: 2; column-gap: 2rem; font-size: .95rem; }
.legal-indice li { margin-bottom: .2rem; break-inside: avoid; }
.legal-ficha { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0 0 1rem; padding: 1rem 1.25rem; background: #f7fafc; border-left: 3px solid #4faf4f; border-radius: 0 8px 8px 0; }
.legal-ficha dt { font-weight: 700; color: #4a5568; }
.legal-ficha dd { margin: 0; color: #1a202c; }
.legal-tabla-envoltura { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid #e2e8f0; border-radius: 10px; }
.legal-tabla { width: 100%; border-collapse: collapse; font-size: .93rem; }
.legal-tabla th { background: #001f66; color: #fff; text-align: left; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; padding: .7rem .9rem; }
.legal-tabla td { padding: .75rem .9rem; border-top: 1px solid #e2e8f0; vertical-align: top; color: #2d3748; }
.legal-tabla tr:nth-child(even) td { background: #fafbfc; }
.legal-nota { font-size: .9rem; color: #4a5568; background: #fffbea; border: 1px solid #f6e05e; border-radius: 8px; padding: .8rem 1rem; }
.legal-boton { display: inline-flex; align-items: center; gap: .5rem; margin: .25rem 0 1rem; }
/* Más específico que .legal-doc a: si no, el botón hereda el azul de los
   enlaces del texto y queda azul sobre azul, sin leerse. */
.legal-doc .legal-boton { color: #fff; text-decoration: none; }

@media (max-width: 768px) {
  .legal { padding: 2rem 0 3rem; }
  .legal-indice ol { columns: 1; }
  .legal-ficha { grid-template-columns: 1fr; gap: .1rem; }
  .legal-ficha dd { margin-bottom: .5rem; }
  /* En celular las tablas se apilan como fichas: nada de deslizar de lado. */
  .legal-tabla thead { display: none; }
  .legal-tabla, .legal-tabla tbody, .legal-tabla tr, .legal-tabla td { display: block; width: 100%; }
  .legal-tabla tr { border-top: 1px solid #e2e8f0; padding: .5rem 0; }
  .legal-tabla tr:first-child { border-top: none; }
  .legal-tabla td { border: none; padding: .3rem .9rem; background: none !important; }
  .legal-tabla td::before { content: attr(data-t); display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #2f7f35; }
}
