/* AB Insurance & Investment — absalesb.com
   Sistema visual v3 · inicio v13 (neuroventas). Un solo color de acción (#DA684E), titulares grandes en peso 400. */

:root {
  --bg: #F4F4F2;
  --card: #FFFFFF;
  --ink: #14161A;
  --muted: #5A5F66;
  --soft: #8A8F96;
  --line: #E4E4E0;
  --hair: #EFEFEC;
  --navy: #323A47;
  --navy-2: #3B4451;
  --navy-line: #4A5361;
  --navy-text: #C3C8D1;
  --navy-soft: #8A93A1;
  --accent: #DA684E;
  --accent-dark: #C25A41;
  --accent-tint: #FDF0EC;
  --photo: #E7E7E3;
  --radius-lg: 24px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 14px 36px rgba(20,22,26,.07);
  --pad: 80px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.section { padding-bottom: 100px; }
.section-lead { max-width: 640px; color: var(--muted); font-size: 16px; }

h1, .h1 { font-size: clamp(34px, 4.6vw, 62px); font-weight: 400; line-height: 1.07; letter-spacing: -.03em; text-wrap: pretty; }
h2, .h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; text-wrap: pretty; }
.h2-sm { font-size: clamp(26px, 2.7vw, 36px); font-weight: 400; line-height: 1.12; letter-spacing: -.03em; }
h3, .h3 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.mark { color: var(--accent); }
.eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.eyebrow-accent { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--soft); }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-align: center; transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #FFF; box-shadow: 0 8px 22px rgba(218,104,78,.3); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #FFF; }
.btn-light { border: 1.5px solid var(--navy-line); color: #FFF; }
.btn-light:hover { background: rgba(255,255,255,.08); }
.btn-sm { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.link-arrow { font-size: 15px; font-weight: 600; color: var(--accent); }
.link-arrow:hover { color: var(--ink); }

/* --- Barra superior y cabecera --- */
.topbar {
  display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
  min-height: 40px; padding: 6px 20px; background: var(--navy); color: #FFF; font-size: 13px;
}
.topbar .sep { color: #6B7383; }
.topbar strong { font-weight: 600; }

.header { position: sticky; top: 0; z-index: 40; background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.brand-city { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.is-active { color: var(--accent); }
.nav > .btn { display: none; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.lang { font-size: 13px; color: var(--muted); white-space: nowrap; }
.lang b { color: var(--ink); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; align-items: center; justify-content: center; }

/* --- Hero --- */
.hero { padding: 96px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; }
.hero-col { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.hero p { font-size: 18px; color: var(--muted); max-width: 540px; }

.photo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--photo); border-radius: var(--radius-lg); padding: 24px; text-align: center;
  min-height: 520px; color: #6E7379;
}
.photo .label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.photo .note { font-size: 14px; max-width: 300px; }
.photo-sm { min-height: 300px; border-radius: var(--radius); }

/* --- Cotizador --- */
.quoter { width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.quoter-row { display: flex; gap: 10px; }
.field {
  width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); font-size: 15px; color: var(--ink); font-family: inherit;
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8F96' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field-zip { max-width: 130px; }

/* --- Rejillas y tarjetas --- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.card { background: var(--card); border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; }
.card-lg { padding: 34px 30px; gap: 12px; }
.card .link-arrow { margin-top: auto; padding-top: 6px; }
.card h3 { font-size: 23px; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.6; }
.panel { background: var(--card); border-radius: var(--radius-lg); padding: 56px 60px; }

.stat { background: var(--card); border-radius: 18px; padding: 26px 28px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.stat span { font-size: 14px; color: var(--muted); }

.step { display: flex; flex-direction: column; gap: 12px; }
.step-n { font-size: 15px; font-weight: 600; color: var(--accent); }

.carriers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; width: 100%; }
.carrier { display: flex; align-items: center; justify-content: center; height: 108px; background: var(--card); border-radius: 18px; padding: 18px; }
/* El limite de altura solo frena a los logos cuadrados: los anchos topan antes
   con el ancho de la caja. Con 42 px, marcas como Ambetter o American Amicable
   ocupaban un 28% del hueco y parecian de segunda. A 56 px se equilibran sin
   que los alargados crezcan, porque esos siguen limitados por el ancho. */
.carrier img { max-height: 56px; max-width: 100%; width: auto; height: auto; object-fit: contain; }

.quote-card { display: flex; flex-direction: column; gap: 16px; background: var(--card); border-radius: var(--radius); padding: 32px 28px; }
.stars { color: var(--accent); letter-spacing: .08em; font-size: 15px; }
.who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.who .av { width: 42px; height: 42px; border-radius: 50%; background: var(--photo); flex-shrink: 0; }

.agent-card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
/* Retrato vertical 4:5, la misma proporcion a la que el panel recorta las fotos.
   Antes era una franja apaisada de 230 px y de un retrato solo se veia el pecho. */
.agent-card .portrait { aspect-ratio: 4 / 5; height: auto; background: var(--photo); display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6E7379; }
@supports not (aspect-ratio: 4 / 5) { .agent-card .portrait { height: 330px; } }
.agent-card .body { padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.chip { padding: 6px 12px; background: var(--bg); border-radius: 999px; font-size: 13px; color: var(--muted); }
.chip-line { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.chip-on { background: var(--accent-tint); border: 1px solid var(--accent); color: var(--accent-dark); }

/* --- Banda oscura --- */
.band { background: var(--navy); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; }
.band-body { padding: 60px 56px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.band-body h2 { color: #FFF; }
.band-body p { color: var(--navy-text); font-size: 17px; max-width: 500px; }
.band-photo { background: var(--navy-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 24px; min-height: 460px; }
/* Las fotos de estas bandas son de GRUPO y horizontales, y el hueco es vertical.
   Recortarlas deja fuera a la gente de los extremos, asi que aqui se muestran
   completas sobre el azul: se ve a todo el equipo, que es justo el mensaje. */
.band-photo .slot-img { object-fit: contain; object-position: 50% 50%; }
.band-photo .label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-text); font-weight: 600; }
.band-photo .note { font-size: 14px; color: var(--navy-soft); max-width: 300px; }
.band-extra { padding-top: 20px; border-top: 1px solid var(--navy-line); width: 100%; display: flex; flex-direction: column; gap: 12px; }
.chip-dark { padding: 9px 16px; border: 1px solid var(--navy-line); border-radius: 999px; font-size: 14px; color: var(--navy-text); }

/* --- FAQ --- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: start; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--card); border-radius: 18px; padding: 24px 30px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--soft); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; color: var(--accent); }
.faq details p { padding-top: 12px; font-size: 15px; color: var(--muted); }

/* --- CTA final --- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 48px; background: var(--card); border-radius: var(--radius-lg); padding: 56px 60px; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cta-phone { font-size: 22px; font-weight: 500; }

/* --- Formulario por pasos --- */
.form-wrap { display: grid; grid-template-columns: 1fr 1.15fr; background: var(--card); border-radius: var(--radius-lg); overflow: hidden; }
.form-aside { padding: 56px 52px; background: #F9F9F7; border-right: 1px solid var(--hair); display: flex; flex-direction: column; gap: 18px; }
.form-main { padding: 52px 54px; display: flex; flex-direction: column; gap: 24px; }
.progress { display: flex; align-items: center; gap: 8px; }
.progress i { height: 5px; flex: 1; background: var(--photo); border-radius: 3px; }
.progress i.on { background: var(--accent); }
.progress span { font-size: 13px; color: var(--soft); padding-left: 10px; }
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 22px; border: 1px solid var(--line); border-radius: 14px; font-size: 16px; cursor: pointer; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }
.choice:hover { border-color: var(--soft); }
.choice.sel { border: 1.5px solid var(--accent); background: var(--accent-tint); }
.step-pane { display: none; flex-direction: column; gap: 22px; }
.step-pane.on { display: flex; }
.form-note { font-size: 13px; color: var(--soft); }
.check-line { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--muted); }
.check-line svg { flex-shrink: 0; margin-top: 4px; }

/* --- Perfil de agente --- */
.profile { display: grid; grid-template-columns: .8fr 1.2fr; background: var(--card); border-radius: 26px; overflow: hidden; }
.profile-photo { background: var(--photo); min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 24px; color: #6E7379; }
.profile-body { padding: 56px 54px; display: flex; flex-direction: column; gap: 22px; }
.qr { width: 74px; height: 74px; background: var(--bg); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); flex-shrink: 0; }
.play { width: 64px; height: 64px; border-radius: 50%; background: #FFF; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 8px 22px rgba(20,22,26,.12); }
.breadcrumb { font-size: 14px; color: var(--soft); }
.breadcrumb b { color: var(--ink); font-weight: 400; }

/* --- Tabla de producto --- */
.spec { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.spec div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 30px; border-bottom: 1px solid var(--hair); font-size: 15px; }
.spec div span:first-child { color: var(--soft); font-size: 14px; }
.card-flat { background: var(--card); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.card-flat .head { padding: 32px 30px 24px; display: flex; flex-direction: column; gap: 10px; }
.card-flat .foot { padding: 22px 30px 30px; }

/* --- Aviso --- */
.notice { display: flex; gap: 16px; background: var(--card); border-radius: 18px; padding: 24px 28px; font-size: 14px; color: var(--muted); line-height: 1.65; }
.notice svg { flex-shrink: 0; margin-top: 2px; }

/* --- Footer --- */
.footer { background: var(--navy); color: var(--navy-text); padding: 60px 0 44px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-soft); font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.footer a:hover { color: #FFF; }
.footer img { height: 50px; width: auto; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--navy-line); font-size: 13px; color: var(--navy-soft); }

/* --- Aviso de demo --- */
.demo-flag { background: #FFF8F1; border-bottom: 1px solid #F0DCC9; color: #7A5A32; font-size: 13px; text-align: center; padding: 9px 20px; }

/* ============ Responsive ============ */
@media (max-width: 1180px) {
  :root { --pad: 40px; }
  .hero-grid { gap: 36px; }
  .band-body, .profile-body { padding: 48px 40px; }
  .panel, .cta { padding: 44px 40px; }
  .form-aside, .form-main { padding: 40px 36px; }
  .carriers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
}

@media (max-width: 980px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }
  .header-actions .lang { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 40px 24px;
  }
  .nav.open a { padding: 16px 0; border-bottom: 1px solid var(--hair); font-size: 17px; }
  .nav.open .btn { display: inline-flex; margin-top: 18px; }
  .header-inner { position: relative; min-height: 68px; }
  .brand img { height: 44px; }

  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .photo { min-height: 300px; order: -1; }
  .hero p { font-size: 17px; }
  .section { padding-bottom: 64px; }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carriers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carrier { height: 88px; }

  .band, .profile, .form-wrap { grid-template-columns: 1fr; }
  /* En escritorio este hueco es vertical (0.84) y en pantallas menores pasaba a
     ser una tira de 3:1, donde una foto de equipo quedaba reducida a una franja.
     Con una proporcion fija de 3:2 el recorte es mucho menor y ademas es siempre
     el mismo, sea cual sea el ancho. */
  .band-photo, .profile-photo { aspect-ratio: 3 / 2; min-height: 0; order: -1; }
  .form-aside { border-right: 0; border-bottom: 1px solid var(--hair); }
  .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta { flex-direction: column; align-items: flex-start; gap: 26px; }
  .cta-actions { align-items: flex-start; width: 100%; }
  .photo { min-height: 280px !important; }
  .band-photo, .profile-photo { aspect-ratio: 3 / 2; min-height: 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --pad: 18px; }
  body { font-size: 16px; }
  .topbar { gap: 10px; font-size: 12px; }
  .topbar .sep { display: none; }
  .nav.open { padding: 8px 18px 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .carriers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quoter-row { flex-direction: column; }
  .field-zip { max-width: none; }
  .panel, .cta { padding: 32px 22px; border-radius: var(--radius); }
  .band-body, .profile-body, .form-aside, .form-main { padding: 32px 22px; }
  .card, .quote-card { padding: 24px 22px; }
  .spec div { padding: 14px 22px; }
  .card-flat .head { padding: 26px 22px 20px; }
  .card-flat .foot { padding: 18px 22px 26px; }
  .faq details { padding: 20px 22px; }
  .faq summary { font-size: 17px; }
  .cta-phone { font-size: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .btn { width: 100%; }
  .btn-inline { width: auto; }
  .photo { min-height: 220px !important; }
  .band-photo, .profile-photo { aspect-ratio: 3 / 2; min-height: 0 !important; }
  .brand-city { display: none; }
  .brand-name { font-size: 15px; }
  .brand img { height: 40px; }
  .hero-col, .band-body { align-items: stretch; }
}

/* --- Dos oficinas --- */
.offices { display: flex; flex-wrap: wrap; gap: 28px; margin: 14px 0 12px; font-size: 14px; line-height: 1.65; }
.offices b { color: #FFF; font-weight: 500; }
.office-card { background: var(--card); border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; }
.office-card .city { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.office-card h3 { font-size: 21px; }
.office-card p { font-size: 15px; color: var(--muted); line-height: 1.6; }
/* Contacto: foto de la oficina en 4:3 fijo (igual que en el Inicio); con 150 px de alto solo se veía una franja */
.office-card .map { aspect-ratio: 4 / 3; flex-shrink: 0; background: var(--photo); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6E7379; margin-bottom: 4px; }
@supports not (aspect-ratio: 4 / 3) { .office-card .map { height: 150px; } }

/* --- Bloque 11: recursos gratuitos --- */
.res-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--card); border: 1.5px dashed #C7C7C2; border-radius: var(--radius); padding: 26px 28px; }
.res-card h3 { font-size: 20px; }
.res-card p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.badge-f3 { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1.5px solid var(--navy); color: var(--navy); border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; flex-shrink: 0; }

/* --- Bloque 12: columna visitanos --- */
.visit { display: flex; flex-direction: column; border-left: 1px solid var(--hair); }
.visit .map { height: 260px; background: var(--photo); display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6E7379; border-bottom: 1px dashed #C7C7C2; }
.visit .data { padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 980px) { .visit { border-left: 0; border-top: 1px solid var(--hair); } .visit .map { height: 200px; } }

/* --- Cotizador de 3 campos y segundo CTA de cabecera --- */
.field-lang { max-width: 150px; }
@media (max-width: 1180px) { .btn-agent { display: none; } }
@media (max-width: 640px) { .field-lang { max-width: none; } }

/* --- Fotos subidas desde el panel --- */
[data-slot] { position: relative; overflow: hidden; }
/* object-position por encima del centro: si el navegador tiene que recortar en
   vertical (pasa cuando el hueco cambia de forma entre escritorio y movil),
   que se lleve el suelo y no las caras, que siempre estan en el tercio de arriba. */
.slot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0; transition: opacity .9s ease; }
.slot-img.on { opacity: 1; }
[data-slot].has-photo > *:not(.slot-img):not(.slot-dots):not(.slot-play) { visibility: hidden; }

/* Carrusel del hero */
.slot-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.slot-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 1px 3px rgba(20,22,26,.35); cursor: pointer; transition: background .25s ease, transform .25s ease; }
.slot-dot.on { background: #FFFFFF; transform: scale(1.25); }
.slot-dot:hover { background: #FFFFFF; }

/* --- Video de fondo del hero --- */
.hero.con-video { position: relative; overflow: hidden; }
.hero.con-video > .container { position: relative; z-index: 1; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }

/* ============ Movimiento ============ */
/* Aparición al bajar. La clase la pone el JS, así que sin JS todo se ve igual. */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); transition-delay: var(--d, 0ms); }
.reveal.visible { opacity: 1; transform: none; }

/* Resalte que sigue al cursor dentro de cada tarjeta */
.hover-glow { position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.hover-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(218,104,78,.11), transparent 62%);
  opacity: 0; transition: opacity .3s ease;
}
.hover-glow:hover::after { opacity: 1; }
.hover-glow:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20,22,26,.09); }
.hover-glow > * { position: relative; z-index: 1; }
.carrier.hover-glow:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,22,26,.08); }
.band .hover-glow:hover::after { background: radial-gradient(240px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.10), transparent 62%); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
  .hover-glow, .hover-glow::after { transition: none; }
  .hover-glow:hover { transform: none; }
}

/* --- Cinta de aseguradoras --- */
.cinta { width: 100%; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cinta-fila { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.cinta-pista { display: flex; gap: 16px; width: max-content; animation: desfile var(--dur, 44s) linear infinite; will-change: transform; }
.cinta-fila.inversa .cinta-pista { animation-direction: reverse; }
.cinta:hover .cinta-pista { animation-play-state: paused; }
@keyframes desfile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cinta .carrier { flex: 0 0 auto; width: 208px; height: 104px; }
@media (max-width: 640px) { .cinta .carrier { width: 150px; height: 84px; } }
@media (prefers-reduced-motion: reduce) {
  .cinta-fila { -webkit-mask-image: none; mask-image: none; }
  .cinta-pista { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .cinta-pista .duplicado { display: none; }
}
.cinta-caja { width: 100%; max-width: 100%; min-width: 0; }

/* ============================================================
   v13 — Inicio con recorrido de neuroventas:
   video AB → historia → Paulo/Johana → tres áreas → aseguradoras →
   agentes → únete → oficinas → contacto → speaker
   ============================================================ */

.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.section-head .section-lead { margin-top: 4px; }
.eyebrow-light { color: rgba(255,255,255,.72); }

/* --- Hero AB: video de fondo a pantalla completa --- */
.hero-ab {
  position: relative; overflow: hidden; background: var(--navy); color: #FFF;
  padding: 0; min-height: min(86vh, 820px); display: flex; align-items: center;
}
.hero-ab .hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--navy-2); }
.hero-ab .hero-bg .slot-img { opacity: .55; }
.hero-ab .hero-bg .slot-img.on { opacity: .55; }
.hero-ab .hero-video { z-index: 0; }
.hero-ab::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(50,58,71,.55) 0%, rgba(50,58,71,.35) 45%, rgba(50,58,71,.88) 100%),
              linear-gradient(90deg, rgba(50,58,71,.75) 0%, rgba(50,58,71,.15) 70%);
}
.hero-ab-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-top: 110px; padding-bottom: 110px; max-width: 1280px; }
.hero-ab h1 { max-width: 760px; color: #FFF; }
.hero-ab .mark { color: #F3A48E; }
.hero-ab .hero-ab-text { font-size: clamp(17px, 1.5vw, 20px); color: rgba(255,255,255,.86); max-width: 620px; }
.pilares { display: flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: #FFF; }
.pilares i { font-style: normal; color: var(--accent); }
.hero-ab-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-ab-ctas .btn-light { border-color: rgba(255,255,255,.55); }
.hero-ab-ctas .btn-light:hover { background: rgba(255,255,255,.12); }
.hero-ab .hero-ab-note { font-size: 13px; color: rgba(255,255,255,.62); max-width: 640px; line-height: 1.6; }
.hero-ab-hint { position: absolute; right: 24px; bottom: 18px; z-index: 2; max-width: 300px; font-size: 12px; color: rgba(255,255,255,.55); text-align: right; line-height: 1.5; }
.hero-ab-hint .label { display: block; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; font-size: 11px; color: rgba(255,255,255,.7); }
.hero-ab.con-video .hero-ab-hint { display: none; }
.hero-ab.con-video .hero-bg { display: none; }
.hero-ab + .section { padding-top: 100px; }

/* --- Historia --- */
.historia { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.historia-texto { display: flex; flex-direction: column; gap: 18px; }
.historia-texto p { color: var(--muted); font-size: 17px; max-width: 560px; }
.historia-nums { margin-top: 14px; }
.historia-foto { min-height: 560px; }

/* --- Liderazgo --- */
.lideres { gap: 24px; }
.lider { background: var(--card); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-columns: .9fr 1.1fr; }
.lider-foto { background: var(--photo); min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; color: #6E7379; }
.lider-foto .label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.lider-foto .note { font-size: 13px; max-width: 240px; }
.lider-body { padding: 36px 34px; display: flex; flex-direction: column; gap: 12px; }
.lider-body h3 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.lider-cargo { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.lider-datos { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lider-datos li { position: relative; padding-left: 22px; font-size: 15px; color: var(--muted); }
.lider-datos li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.lider-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }

/* --- Tres áreas --- */
.areas { gap: 22px; align-items: stretch; }
.area { background: var(--card); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
/* Forma fija 16:9 en cualquier pantalla, la misma a la que el panel recorta al subir
   (config.php): así la foto se ve entera. Con alto fijo, el hueco cambiaba de forma
   con el ancho y en tableta solo se veía la mitad de la foto. */
.area-foto { background: var(--photo); aspect-ratio: 16 / 9; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; color: #6E7379; }
@supports not (aspect-ratio: 16 / 9) { .area-foto { min-height: 230px; } }
.area-foto .label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.area-foto .note { font-size: 13px; max-width: 240px; }
.area-body { padding: 30px 30px 32px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.area-tag { display: inline-flex; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.area-body h3 { font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.area-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.area-lista li { position: relative; padding-left: 18px; }
.area-lista li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.area-body .btn { margin-top: auto; align-self: flex-start; }
.area-dark { background: var(--navy); color: #FFF; }
.area-dark .area-foto { background: var(--navy-2); color: var(--navy-soft); }
.area-dark .area-foto .label { color: var(--navy-text); }
.area-dark .area-lista { color: var(--navy-text); }
.area-dark .area-tag { background: rgba(255,255,255,.1); color: #F3A48E; }

/* --- Únete: tres pasos --- */
.unete-pasos { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; width: 100%; padding: 20px 0 6px; border-top: 1px solid var(--navy-line); }
.unete-pasos div { display: flex; flex-direction: column; gap: 4px; }
.unete-pasos b { color: #FFF; font-weight: 600; font-size: 16px; }
.unete-pasos span { color: var(--navy-soft); font-size: 14px; }

/* --- Oficinas --- */
/* La foto va encima de la dirección con forma fija 4:3, la misma a la que recorta el
   panel al subirla (config.php, oficina-1/2 = 1.33): la fachada se ve entera en
   cualquier pantalla. Al lado de la dirección el hueco era casi cuadrado y cortaba el letrero. */
.oficinas { gap: 22px; }
.oficina { background: var(--card); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.oficina-foto { background: var(--photo); aspect-ratio: 4 / 3; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; color: #6E7379; }
@supports not (aspect-ratio: 4 / 3) { .oficina-foto { min-height: 280px; } }
.oficina-foto .label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.oficina-foto .note { font-size: 13px; max-width: 220px; }
.oficina-body { padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.office-card-city { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.oficina-dir { font-size: 20px; font-weight: 500; letter-spacing: -.01em; line-height: 1.35; }
.oficina-tel { font-size: 17px; font-weight: 500; }
.oficina-body .link-arrow { margin-top: auto; padding-top: 8px; }

/* --- Contacto: tres tarjetas + formulario corto --- */
.contacto-wrap { display: grid; grid-template-columns: 1.05fr .95fr; background: var(--card); border-radius: var(--radius-lg); overflow: hidden; }
.contacto-intro { padding: 52px 54px; display: flex; flex-direction: column; gap: 22px; background: #F9F9F7; border-right: 1px solid var(--hair); }
.contacto-cards { display: flex; flex-direction: column; gap: 10px; }
.contacto-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font: inherit; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.contacto-card b { font-size: 17px; font-weight: 500; }
.contacto-card span { font-size: 14px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.contacto-card:hover { border-color: var(--soft); }
.contacto-card.sel { border: 1.5px solid var(--accent); background: var(--accent-tint); }
.contacto-wa { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--hair); }
.contacto-wa b { font-size: 16px; font-weight: 500; }
.contacto-form { padding: 52px 54px; display: flex; flex-direction: column; gap: 16px; }
.campo-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--soft); }
.campo-f textarea.field { padding: 14px 16px; min-height: 96px; resize: vertical; }
.contacto-form .btn { margin-top: 6px; }

/* --- Speaker: el gran final --- */
.speaker { position: relative; overflow: hidden; background: var(--navy); color: #FFF; padding: 110px 0 100px; }
.speaker + .footer { border-top: 1px solid rgba(255,255,255,.14); }
.speaker-bg { position: absolute; inset: 0; z-index: 0; margin: 0; background: linear-gradient(160deg, #3F4858 0%, var(--navy) 60%); }
.speaker-bg .slot-img { opacity: .38 !important; }
.speaker::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(50,58,71,.35), rgba(50,58,71,.9)); }
.speaker-hint { font-size: 12px; color: var(--navy-soft); line-height: 1.5; max-width: 420px; }
.speaker-hint .label { display: block; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; font-size: 11px; color: var(--navy-text); }
.speaker:has(.speaker-bg.has-photo) .speaker-hint { display: none; }
.speaker-inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 48px; }
.speaker-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.speaker-head h2 { color: #FFF; }
.speaker-head p { color: var(--navy-text); font-size: 18px; max-width: 620px; }
.speaker-temas { gap: 18px; }
.tema { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 0 0 28px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; backdrop-filter: blur(4px); }
.tema-foto { height: 150px; background: rgba(255,255,255,.08); margin-bottom: 8px; }
.tema .area-tag { margin: 0 26px; background: rgba(255,255,255,.1); color: #F3A48E; }
.tema h3 { margin: 0 26px; font-size: 21px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; color: #FFF; }
.tema p { margin: 0 26px; font-size: 14px; color: var(--navy-text); line-height: 1.6; }
.speaker-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.speaker-publico { font-size: 14px; letter-spacing: .06em; color: var(--navy-text); }

/* --- Responsive de lo nuevo --- */
@media (max-width: 1180px) {
  .lider { grid-template-columns: 1fr; }
  .lider-foto { min-height: 300px; }
  .contacto-intro, .contacto-form { padding: 40px 36px; }
}
@media (max-width: 980px) {
  .hero-ab { min-height: 0; }
  .hero-ab-inner { padding-top: 72px; padding-bottom: 72px; }
  .hero-ab + .section { padding-top: 64px; }
  .hero-ab-hint { display: none; }
  .historia { grid-template-columns: 1fr; gap: 30px; }
  .historia-foto { min-height: 300px; order: -1; }
  .lideres, .areas { grid-template-columns: 1fr; }
  .contacto-wrap { grid-template-columns: 1fr; }
  .contacto-intro { border-right: 0; border-bottom: 1px solid var(--hair); }
  .speaker { padding: 72px 0; }
  .speaker-temas { grid-template-columns: 1fr; }
  .unete-pasos { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .pilares { flex-wrap: wrap; gap: 8px 12px; font-size: 12px; }
  .historia-nums { grid-template-columns: 1fr 1fr; gap: 10px; }
  .historia-nums .stat { padding: 20px 18px; }
  .historia-nums .stat b { font-size: 26px; }
  .hero-ab-ctas .btn { width: 100%; }
  .lider-body, .area-body, .oficina-body { padding: 26px 22px; }
  .contacto-intro, .contacto-form { padding: 30px 22px; }
  .contacto-card { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contacto-card span { white-space: normal; }
  .tema h3, .tema p, .tema .area-tag { margin-left: 20px; margin-right: 20px; }
  .lider-ctas .btn { width: 100%; }
}

/* Aviso tras enviar un formulario */
.form-ok, .form-error { padding: 14px 18px; border-radius: 12px; font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
.form-ok { background: #EEF5EE; color: #3E6B46; border: 1px solid #CFE3D2; }
.form-error { background: #FDF0EC; color: #A6412C; border: 1px solid #F1CFC5; }

/* El QR impreso: cuando hay agente real deja de ser un cuadro gris y pasa a ser
   la imagen vectorial. Fondo blanco y aire alrededor, que es lo que necesita un
   lector de codigos para enfocar bien sobre papel. */
img.qr { background: #fff; padding: 4px; object-fit: contain; }

/* --- Conmutador de idioma con bandera ---
   Las banderas van dibujadas en el CSS (SVG en linea), asi que no cuestan
   ninguna peticion al servidor y se ven nitidas en cualquier pantalla. */
.lang { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.lang-op {
  display: inline-flex; align-items: center; gap: 0;
  padding: 6px 8px; border-radius: 999px;
  font-size: 0;   /* solo la bandera: las letras EN/ES no se ven, pero siguen ahí para los lectores de pantalla */
  transition: background .15s ease, color .15s ease;
}
.lang-op::before {
  content: ""; width: 19px; height: 13px; flex: none; border-radius: 2px;
  background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px rgba(20,22,26,.14);
}
.lang-en::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 10'%3E%3Crect width='19' height='10' fill='%23fff'/%3E%3Cg fill='%23b22234'%3E%3Crect width='19' height='.77'/%3E%3Crect y='1.54' width='19' height='.77'/%3E%3Crect y='3.08' width='19' height='.77'/%3E%3Crect y='4.62' width='19' height='.77'/%3E%3Crect y='6.15' width='19' height='.77'/%3E%3Crect y='7.69' width='19' height='.77'/%3E%3Crect y='9.23' width='19' height='.77'/%3E%3C/g%3E%3Crect width='7.6' height='5.38' fill='%233c3b6e'/%3E%3C/svg%3E"); }
.lang-es::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect width='3' height='2' fill='%23c60b1e'/%3E%3Crect y='.5' width='3' height='1' fill='%23ffc400'/%3E%3C/svg%3E"); }
a.lang-op { color: var(--soft); }
a.lang-op:hover { color: var(--ink); background: var(--bg); }
b.lang-op { color: var(--ink); background: var(--bg); font-weight: 600; }   /* el idioma activo */

/* Testimonios y clientes del inicio (se cargan en el panel: pestañas Testimonios y Clientes) */
.quote-card.testimonio { margin: 0; }
.quote-card blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.who > span { min-width: 0; overflow-wrap: anywhere; }
.who img.av { object-fit: cover; }
.who .av-ini { display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-tint); }
.who b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.who .tiny { display: block; }
/* Cada logo llega del panel ya cuadrado y con su propio fondo (inc/logo.php), asi que
   la casilla no le pone margen: el logo es la casilla. Columnas fijas por tramo
   (6 / 4 / 2) y la ultima fila centrada, para no dejar un logo suelto. */
.clientes-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 100%; }
.clientes-logos .carrier { width: calc((100% - 80px) / 6); max-width: 168px; height: auto; aspect-ratio: 1 / 1; padding: 0; overflow: hidden; }
.clientes-logos .carrier img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
@supports not (aspect-ratio: 1 / 1) { .clientes-logos .carrier { height: 150px; } }
@media (max-width: 980px) {
  .clientes-logos .carrier { width: calc((100% - 48px) / 4); max-width: 200px; }
}
@media (max-width: 640px) {
  .clientes-logos { gap: 10px; }
  .clientes-logos .carrier { width: calc((100% - 10px) / 2); max-width: 220px; }
}
a.chip-line { color: var(--ink); transition: border-color .15s ease, color .15s ease; }
a.chip-line:hover { border-color: var(--accent); color: var(--accent); }

/* Videos de los huecos de foto (panel: Fotos, huecos con la etiqueta «Admite video»).
   main.js pone el boton de reproducir sobre la portada y el video se ve en un cuadro aparte. */
[data-slot].has-clip > .play { display: none; }   /* el ▶ del marcador gris: lo sustituye el boton de verdad */
.slot-play { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slot-play .play { transition: transform .18s ease, box-shadow .18s ease; }
.slot-play:hover .play, .slot-play:focus-visible .play { transform: scale(1.08); box-shadow: 0 10px 28px rgba(20,22,26,.24); }
.slot-play:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.slot-dur { position: absolute; left: 12px; top: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(20,22,26,.74); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.5; text-transform: none; }
html.clip-abierto { overflow: hidden; }
/* fit-content (no auto): un <dialog> modal va a pantalla completa y con width:auto se estira y se pega a la izquierda */
.clip-dialog { width: fit-content; max-width: none; padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.clip-dialog::backdrop { background: rgba(20,22,26,.82); }
/* --ar (ancho/alto del video) lo pone main.js; el video nunca pasa de 900 px de ancho ni del 72% de la altura de la ventana */
.clip-caja { position: relative; width: min(94vw, 900px, calc(72vh * var(--ar, 1.7778))); background: #101216; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.clip-caja video { display: block; width: 100%; aspect-ratio: var(--ar, 1.7778); background: #000; border-radius: 18px 18px 0 0; }
.clip-titulo { margin: 0; padding: 14px 20px 16px; font-size: 15px; line-height: 1.4; color: rgba(255,255,255,.9); }
.clip-dialog.sin-titulo .clip-titulo { display: none; }
.clip-dialog.sin-titulo .clip-caja video { border-radius: 18px; }
.clip-cerrar { position: absolute; top: -16px; right: -16px; z-index: 1; width: 40px; height: 40px; padding: 0 0 2px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
.clip-cerrar:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .clip-cerrar { top: 8px; right: 8px; background: rgba(20,22,26,.7); color: #fff; } }

/* Foto junto a la historia del agente: su columna es la más ancha para que una escena
   de grupo quepa entera; el texto tiene altura fija (recortado), así que no crece.
   En pantallas medianas y móviles se apila (el estilo en línea de la plantilla manda, de ahí el !important). */
.historia-agente .slot-img { object-position: 55% 15%; }
@media (max-width: 980px) {
  .historia-agente { grid-template-columns: 1fr !important; }
  .historia-agente .photo { aspect-ratio: 3 / 2; min-height: 0 !important; }
}

/* Historia del agente: se recorta a unas líneas con "Ver completo" (el botón lo crea main.js solo si el texto es largo) */
.story.is-clamped { position: relative; max-height: 15.5em; overflow: hidden; }
.story.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5em; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--card)); pointer-events: none; }
.story.is-clamped.is-open { max-height: none; overflow: visible; }
.story.is-clamped.is-open::after { display: none; }
.story-toggle { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent, #DA684E); cursor: pointer; }
.story-toggle:hover { text-decoration: underline; }
