/* ============================================================
   AGENTE100 — agente.css  (landings de agentes)
   Se carga después de styles.css y propiedades.css. Los colores del
   agente llegan como variables CSS desde la plantilla (--brand, etc.).
   ============================================================ */

.page-agente .btn--primary { color: var(--on-brand, #fff); }
.page-agente .footer { background: var(--brand-dark, #0F2A44); }

/* ---------- Botón WhatsApp (verde reconocible, con contraste AA) ---------- */
.ag-btn-wa { background: #0F7B43; color: #fff; }
.ag-btn-wa:hover { background: #0B6536; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,123,67,.3); }
.ag-btn-wa svg, .btn svg { flex: none; }
.ag-nav-wa { padding: 10px 18px; font-size: var(--text-small); }

/* ---------- Marca en cabecera ---------- */
.ag-brand { gap: 12px; min-width: 0; }
.ag-brand__logo { height: 44px; max-width: 200px; object-fit: contain; }
.ag-brand__mark {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--gradient-cta); color: var(--on-brand, #fff);
  font-size: 15px; font-weight: 800; letter-spacing: 0;
}
.ag-brand__name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Hero ---------- */
.ag-hero { background: var(--gradient-hero-bg); padding-block: clamp(40px, 6vw, 88px) clamp(48px, 7vw, 96px); position: relative; overflow: hidden; }
.ag-hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ag-hero h1 { font-size: var(--text-hero); font-weight: 800; }
.ag-hero__marca { margin-top: 8px; font-family: var(--font-display); font-weight: 700; color: var(--color-accent-blue); font-size: 18px; }
.ag-hero__sub { margin-top: 18px; font-size: clamp(18px, 1.6vw, 21px); color: var(--color-text-primary); font-weight: 500; max-width: 560px; }
.ag-hero__intro { margin-top: 12px; font-size: var(--text-body-lg); max-width: 560px; }
.ag-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ag-hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px 24px; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--color-border); }
.ag-hero__stats .stat__num { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--color-accent-blue); line-height: 1; }
.ag-hero__stats .stat__label { font-size: var(--text-small); margin-top: 6px; }

.ag-hero__visual { position: relative; max-width: 440px; justify-self: center; width: 100%; }
.ag-hero__blob {
  position: absolute; inset: 8% -6% -6% 10%; border-radius: 32px;
  background: var(--brand, var(--color-accent-blue)); opacity: .92;
  transform: rotate(4deg);
}
.ag-hero__photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: #fff; box-shadow: 0 24px 60px rgba(15,42,68,.18);
}
.ag-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.ag-hero__photo--logo { display: grid; place-items: center; padding: 14%; aspect-ratio: 1; }
.ag-hero__photo--logo img { object-fit: contain; }
.ag-hero__photo--ini { display: grid; place-items: center; aspect-ratio: 1; background: var(--color-accent-blue-light); }
.ag-hero__photo--ini span { font-family: var(--font-display); font-weight: 800; font-size: clamp(64px, 10vw, 120px); color: var(--color-accent-blue); }
.ag-hero__logochip {
  position: absolute; top: 18px; left: -18px; background: #fff; border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(15,42,68,.14); max-width: 150px;
}
.ag-hero__logochip img { max-height: 42px; width: auto; }
.ag-hero__chip { left: -24px; bottom: 26px; right: auto; top: auto; }
.ag-hero__chip .icon-medallion svg { width: 20px; height: 20px; }

/* ---------- Propiedades ---------- */
.ag-props { padding-block: var(--gap-section) 24px; }
.ag-props .section__head { margin-bottom: 28px; }

/* ---------- Sobre mí ---------- */
.ag-about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.ag-about__bio { margin-top: 22px; display: grid; gap: 14px; font-size: var(--text-body-lg); }
.ag-about__reg { margin-top: 20px; font-size: var(--text-small); color: var(--color-text-muted); }
.ag-about__side { display: grid; gap: 18px; }
.ag-box { padding: 24px; }
.ag-box h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ag-box h3 svg { width: 18px; height: 18px; color: var(--color-accent-blue); }
.ag-box .pinfo__chips { margin: 0; }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ag-list li { display: flex; gap: 10px; align-items: flex-start; }
.ag-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--color-accent-blue); }

.ag-certs { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.ag-certs li {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--color-border); font-size: var(--text-small); font-weight: 600; color: var(--color-text-primary);
}
.ag-certs svg { width: 16px; height: 16px; color: var(--color-accent-gold); flex: none; }
.ag-video { margin-top: 28px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 16 / 9; background: #0B1520; }
.ag-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.ag-video__play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: none; }
.ag-video__play img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.78); transition: filter .2s; }
.ag-video__play:hover img { filter: brightness(.9); }
.ag-video__btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gradient-cta); color: var(--on-brand, #fff); box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.ag-video__btn svg { width: 28px; height: 28px; margin-left: 4px; }
.ag-video__txt { position: absolute; left: 18px; bottom: 14px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* ---------- Opiniones ---------- */
.ag-testim { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.ag-testim__card { margin: 0; padding: 28px 26px 24px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.ag-testim__q { width: 34px; height: 34px; color: var(--color-accent-gold); }
.ag-testim__card blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--color-text-primary); flex: 1; }
.ag-testim__card figcaption { display: flex; flex-direction: column; font-size: var(--text-small); }
.ag-testim__card figcaption strong { font-family: var(--font-display); color: var(--color-text-primary); font-size: 15px; }
.ag-testim__card figcaption span { color: var(--color-text-muted); }
.ag-testim__more { text-align: center; margin-top: 30px; }

/* ---------- Contacto ---------- */
.ag-contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.ag-contact__intro > p { margin-top: 16px; font-size: var(--text-body-lg); }
.ag-contact__direct { display: grid; gap: 12px; margin-top: 28px; }
.ag-contact > * { min-width: 0; }
.ag-direct > span:not(.ag-direct__ic) { min-width: 0; overflow-wrap: anywhere; } /* emails largos no desbordan en móvil */
.ag-direct {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-card);
  border: 1px solid var(--color-border); background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ag-direct--static:hover { border-color: var(--color-border); box-shadow: none; transform: none; }
.ag-direct:hover { border-color: var(--color-accent-blue); box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.ag-direct strong { display: block; font-family: var(--font-display); color: var(--color-text-primary); font-size: 16px; }
.ag-direct__ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--color-accent-blue-light); color: var(--color-accent-blue); }
.ag-direct__ic svg { width: 22px; height: 22px; }
.ag-direct--wa .ag-direct__ic { background: #0F7B43; color: #fff; }
.ag-redes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; }
.ag-redes a { font-weight: 600; color: var(--color-accent-blue); font-size: var(--text-small); }
.ag-redes a:hover { text-decoration: underline; }
.ag-redes__tit { margin-top: 26px; font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary, #5B6B7B); }
.ag-redes--botones { margin-top: 10px; gap: 10px; }
.ag-redes--botones a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--color-accent-blue); color: var(--color-accent-blue); background: #fff; text-decoration: none;
  transition: background .2s, color .2s;
}
.ag-redes--botones a:hover { background: var(--color-accent-blue); color: #fff; text-decoration: none; }
.ag-redes--botones svg { width: 18px; height: 18px; flex: none; }
.ag-footer__redes { display: flex; gap: 10px; margin-top: 16px; }
.ag-footer__redes a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.28); color: #fff; transition: background .2s;
}
.ag-footer__redes a:hover { background: rgba(255,255,255,.12); }
.ag-footer__redes svg { width: 19px; height: 19px; }

.ag-form-card { padding: clamp(22px, 3vw, 34px); }
.ag-form { display: grid; gap: 4px; }
.ag-form .field input, .ag-form textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--text-body); color: var(--color-text-primary);
  padding: 12px 14px; border: 1.5px solid var(--color-border); border-radius: 9px; background: #fff;
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
.ag-form textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.ag-form .field input::placeholder, .ag-form textarea::placeholder { color: var(--color-text-muted); }
.ag-form .field { margin-bottom: 16px; }
.ag-form .field input:focus, .ag-form textarea:focus { outline: none; border-color: var(--color-accent-blue); box-shadow: 0 0 0 3px rgba(var(--accent-r),var(--accent-g),var(--accent-b),.15); }
.ag-form .check { margin: 8px 0 12px; }
.ag-form__err { color: var(--color-negative); font-size: var(--text-small); font-weight: 600; margin: 4px 0 10px; }
.ag-form__legal { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 14px; line-height: 1.5; }
.ag-form__ok { text-align: center; padding: 24px 8px; }
.ag-form__ok h3 { margin: 14px 0 8px; }
.ag-form__ok p { margin-bottom: 18px; }
.ag-form__ok .success__check { margin: 0 auto; }
.ag-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pie ---------- */
.ag-footer__top { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.ag-footer__brand { font-size: 20px; }
.ag-footer__links { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: flex-start; }
.ag-footer__links a { font-size: var(--text-small); color: rgba(255,255,255,.75); }
.ag-footer__links a:hover { color: #fff; }
.ag-footer__a100 { color: rgba(255,255,255,.6); }
.ag-footer__a100:hover { color: #fff; }

/* ---------- Barra fija de contacto (móvil) ---------- */
.ag-sticky { display: none; }

@media (max-width: 900px) {
  .ag-hero__grid, .ag-about, .ag-contact { grid-template-columns: 1fr; }
  .ag-hero__visual { max-width: 340px; order: -1; }
  .ag-hero__chip { left: -8px; bottom: 16px; }
  .ag-hero__logochip { left: -8px; }
  .ag-nav-wa span { display: none; }
  .ag-nav-wa { padding: 10px 12px; }
  .ag-sticky {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 20px rgba(15,42,68,.08);
  }
  .ag-sticky .btn { padding: 12px 10px; font-size: 15px; }
  .ag-sticky .btn:only-child { grid-column: 1 / -1; }
  .page-agente .footer { padding-bottom: 96px; }
}
@media (max-width: 520px) {
  .ag-hero__actions .btn { width: 100%; }
  .ag-brand__name { font-size: 16px; max-width: 46vw; }
}
@media (prefers-reduced-motion: reduce) { .ag-direct, .ag-btn-wa { transition: none; } }
