/* =========================================================
   El Canal Seguro — styles.css (tema claro unificado)
   ========================================================= */

:root{
  /* Paleta basada en tu logo rojo */
  --bg: #ffffff;
  --brand: #ff3b30;        /* rojo principal */
  --brand-700:#dc2626;     /* hover / activo */
  --brand-900:#b91c1c;     /* más oscuro */
  --text: #0f172a;         /* texto principal */
  --muted:#64748b;         /* párrafos secundarios */
  --surface:#ffffff;       /* fondos de tarjetas */
  --card:#ffffff;
  --card-border: rgba(15,23,42,.10);
  --hairline: rgba(15,23,42,.12);
  --link:#2563eb;          /* enlaces estándar */
  --link-hover:#1d4ed8;
  --soft:#f8fafc;          /* gris muy claro para separar bloques */
  --ok:#22c55e;            /* verde éxito */
  --warn:#f59e0b;          /* ámbar aviso */
  --danger:#ef4444;        /* rojo estado "obligado" */
}

*{box-sizing:border-box}
html,body{height:100%}
img{max-width:100%; height:auto; display:block}

body{
  margin:0;
  font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  color:var(--text);
  background: var(--bg);
  display:flex; flex-direction:column; min-height:100vh;
}

h1,h2,h3{color:var(--text); letter-spacing:.2px}
p{color:var(--muted)}
a{color:var(--link); text-underline-offset:2px}
a:hover{color:var(--link-hover); text-decoration:underline}
.small{font-size:.94rem}
.container{max-width:1100px;margin:0 auto;padding:0 1rem}

/* =========================================================
   Header / Navegación
   ========================================================= */
header{
  backdrop-filter:saturate(120%) blur(6px);
  background: rgba(255,255,255,.85);
  border-bottom:1px solid var(--hairline);
}
.nav{
  display:flex; align-items:center; justify-content:space-between; padding:.9rem 0; position:relative
}
.nav .brand{
  display:flex; align-items:center; gap:.75rem; text-decoration:none; color:var(--text); font-weight:700
}
.nav .brand img{
  width:36px;height:36px;border-radius:8px; box-shadow:0 1px 0 rgba(0,0,0,.04) inset
}
.nav .actions a{
  margin-left:.6rem; text-decoration:none; color:#374151;
  padding:.48rem .9rem; border-radius:10px; border:1px solid var(--hairline);
  background: #fff;
}
.nav .actions a.cta{ background: var(--brand); border-color: transparent; color:#fff; }
.nav .actions a:hover{background: #f3f4f6}
.nav .actions a.cta:hover{background: var(--brand-700); color:#fff}

/* Menú responsive (hamburguesa + desplegable) */
.menu-toggle{
  display:none; background:transparent; border:0; padding:.5rem; margin-left:auto; cursor:pointer;
  width:44px; height:44px; border-radius:10px; border:1px solid var(--hairline);
}
.menu-toggle span{
  display:block; width:24px; height:2px; background:#1f2937; margin:6px auto; transition:transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(8px) rotate(45deg) }
.menu-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0 }
.menu-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-8px) rotate(-45deg) }

@media (max-width: 860px){
  .menu-toggle{display:block}
  .actions{
    position:absolute; right:0; top:64px; z-index:20;
    background: #fff;
    border:1px solid var(--hairline);
    border-radius:12px;
    padding:.5rem;
    display:none; flex-direction:column; gap:.25rem;
    width:min(280px, 90vw);
    box-shadow:0 14px 40px rgba(0,0,0,.12);
  }
  .actions a{
    margin:0 !important; display:block; padding:.7rem .9rem;
    border-radius:8px; border:1px solid transparent; color:#111827;
    background:transparent;
  }
  .actions a:hover{background:#f3f4f6}
  .actions.open{display:flex}
}

/* =========================================================
   Hero
   ========================================================= */
.hero{ text-align:center; padding: 3.5rem 1rem 2rem; background:var(--soft) }
.hero h1{font-size:clamp(1.9rem,3.5vw,3rem); margin:.6rem 0 1rem; color:#0b1220}
.hero p.lead{color:#4b5563; font-size:clamp(1rem,2.2vw,1.25rem); line-height:1.6}
.img-hero{max-width:100%; height:auto; border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,.08)}
.badge{
  display:inline-block; font-size:.85rem; font-weight:600; letter-spacing:.3px;
  padding:.25rem .7rem; border-radius:999px;
  background:#fee2e2; border:1px solid #fecaca; color:#991b1b;
}

/* =========================================================
   Secciones / Cards / Botones
   ========================================================= */
.section{padding:3rem 1rem; background:var(--bg)}
.section h2{text-align:center; font-size:1.8rem; margin-bottom:1.8rem}
.grid{display:grid; gap:2rem; grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}

.card{
  background: var(--card);
  border:1px solid var(--card-border);
  border-radius:16px;
  padding:1.4rem;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
  transition:background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card h3{margin-top:0; margin-bottom:.4rem}
.card p{margin:.2rem 0 0; line-height:1.55}
.icon{width:48px;height:48px;margin-bottom:.6rem}

/* Botón marca (sin azul en hover/visited) */
.btn{
  display:inline-block; padding:.9rem 1.6rem; font-size:1.05rem;
  background:var(--brand); border:none; border-radius:10px; cursor:pointer;
  text-decoration:none; font-weight:600;
  color:#fff !important;
  transition: background .25s ease, transform .05s ease, color .2s ease;
}
.btn:link,.btn:visited{ color:#fff !important; }
.btn:hover{background:var(--brand-700); color:#fff !important; text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn:focus{ outline:3px solid color-mix(in srgb, var(--brand) 45%, white); outline-offset:3px }
/* Botón deshabilitado (gris) */
.btn:disabled{
  background:#e5e7eb; color:#9ca3af !important; cursor:not-allowed; border:1px solid #e5e7eb;
}
.btn:disabled:hover{ background:#e5e7eb; color:#9ca3af !important; }

/* =========================================================
   Footer
   ========================================================= */
footer{
  background:var(--soft);
  border-top:1px solid var(--hairline);
  text-align:center; padding:1.2rem; font-size:.92rem
}
.foot{display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:1rem}
.foot .links a{margin-left:1rem; color:#374151; text-decoration:none}
.foot .links a:hover{color:var(--link-hover); text-decoration:underline}
.foot-company{ color:#374151; font-size:.92rem; line-height:1.5 }
.foot-company a{ color:var(--link); text-decoration:none }
.foot-company a:hover{ text-decoration:underline }

/* =========================================================
   Formularios base
   ========================================================= */
label{color:var(--text)}
input, textarea, select{
  width:100%;
  padding:.9rem;
  border-radius:12px;
  border:1px solid #e5e7eb;
  background:#ffffff;
  color:#111827;
}
select { appearance:none; -webkit-appearance:none; -moz-appearance:none; background-image: none; }
input::placeholder, textarea::placeholder{color:#9ca3af}
input:focus, textarea:focus, select:focus{
  outline:2px solid color-mix(in srgb, var(--brand) 55%, white);
  outline-offset:2px;
  border-color: transparent;
}
.required::after{
  content:" *"; color:var(--brand-700); font-weight:700;
}

/* === CHECKS COMPACTOS EN 1 LÍNEA (CONTACTO + OBLIGADAS) === */
.gdpr-line{
  display:inline-grid;
  grid-template-columns: 18px auto;  /* check + texto */
  align-items:center;
  gap:.55rem;
  margin:.25rem 0;
  color:#1f2937;
  line-height:1.35;
  vertical-align:middle;
}
.gdpr-line input{
  width:18px; height:18px;
  margin:0;
  accent-color: var(--brand);
}
.gdpr-line span{ white-space:nowrap; }           /* 1 línea en escritorio */
@media (max-width: 520px){ .gdpr-line span{ white-space:normal; } } /* permite partir en móvil */

/* =========================================================
   Contacto (una columna, sin imagen)
   ========================================================= */
.contact-section .container{max-width:860px}
.contact-header .contact-title{ margin:.6rem 0 .4rem; font-size:clamp(1.6rem,2.8vw,2.1rem) }
.contact-header .contact-intro{ max-width:760px; margin:0 0 1.2rem; color:#4b5563 }

.form-card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:16px;
  padding:1.2rem;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:1rem;
}
.form-grid .full{ grid-column: 1 / -1 }
.field input, .field textarea{ width:100% }
@media (max-width: 680px){
  .form-grid{ grid-template-columns: 1fr }
}

/* =========================================================
   Evaluador “¿Estoy obligado?” — estilos (usados en index)
   ========================================================= */
.ob-card{ padding:1.2rem 1.2rem 1rem; background:#fff; transition:background .25s ease, border-color .25s ease }
.ob-fields{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1rem }
@media (max-width:640px){ .ob-fields{ grid-template-columns:1fr } }

/* Barra superior: título + consentimiento alineado */
.ob-bar{
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; padding:.75rem .9rem; border:1px solid var(--hairline);
  border-radius:12px; background:#f8fafc; margin-bottom:.8rem;
}
.ob-bar-title{ font-weight:700; color:#0f172a }
.ob-bar .gdpr-line{ margin:0 } /* sin separación extra en la barra */

/* Resultado muy visual */
.ob-result{
  display:flex; gap:1rem; align-items:flex-start;
  padding:1rem; border-radius:14px; margin:.8rem 0;
  border:1px solid var(--hairline);
}
.ob-result__icon{
  flex:0 0 auto; width:48px; height:48px; border-radius:12px;
  display:grid; place-items:center; font-weight:900; font-size:1.2rem;
  background:#fff; color:#0f172a; border:1px solid var(--hairline);
}
.ob-badge{
  display:inline-block; font-weight:800; font-size:.85rem;
  padding:.25rem .6rem; border-radius:999px; border:1px solid transparent;
}
.ob-badge--yes{ background:#ef4444; color:#fff }
.ob-badge--ok{  background:#22c55e; color:#052e16 }
.ob-badge--warn{background:#f59e0b; color:#111827 }
.ob-result--yes{ background:#ffe2e5; border-color:#fca5a5 }
.ob-result--ok{  background:#e7f7ec; border-color:#bbf7d0 }
.ob-result--warn{background:#fff4df; border-color:#fed7aa }

/* Fondo del card según veredicto (TODO el bloque cambia) */
.ob-card--yes{ background:#fdecec; border-color:#fca5a5; }
.ob-card--ok{  background:#eafaf0; border-color:#bbf7d0; }
.ob-card--warn{background:#fff8e6; border-color:#fde68a; }

/* Acordeones de actividades */
.ob-accordion{ display:grid; gap:.6rem }
.acc{
  border:1px solid var(--card-border); border-radius:12px; background:#fafafa;
}
.acc[open]{ background:#fff }
.acc > summary{
  list-style:none; cursor:pointer; padding:.8rem 1rem; margin:0; font-weight:700; color:#111827;
  display:flex; align-items:center; justify-content:space-between;
}
.acc > summary::marker{ display:none; content:"" }
.acc > summary::after{ content:"▾"; transform:rotate(0deg); transition:transform .15s ease; opacity:.7 }
.acc[open] > summary::after{ transform:rotate(180deg) }
.acc .acc-body{ padding:.6rem 1rem .9rem }
.tick{
  display:flex; align-items:center; gap:.6rem;
  padding:.45rem .35rem; border-radius:8px; cursor:pointer;
  line-height:1.35; color:#111827;
}
.tick:hover{ background:#f3f4f6 }
.tick input[type="checkbox"]{ width:18px; height:18px; accent-color: var(--brand); }
.tick span{ color:#111827 }

/* Subgrupo dentro de Asesoría */
.ob-subgroup{
  margin:.4rem 0 0 .2rem; padding:.6rem .6rem .2rem;
  border-left:3px solid #e5e7eb; background:#fafafa; border-radius:6px
}

/* Cuerpo bloqueado hasta consentimiento (gris) */
.ob-body{ position:relative; transition:filter .2s ease, opacity .2s ease }
.ob-locked{
  filter: grayscale(.7);
  opacity:.45;
  pointer-events:none;
}
.ob-locked::after{
  content:"Bloqueado — acepta el tratamiento de datos";
  position:absolute; inset:0; display:grid; place-items:center;
  background: rgba(243,244,246,.85);     /* gris */
  color:#334155; font-weight:800; text-transform:uppercase; letter-spacing:.4px;
  border-radius:12px;
}

/* Utilidades de accesibilidad */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
