/* ===========================================
   TMEX — Home / Portada (front-page) — componentes premium
   Sobre el sistema global tl- (landing.css). Adaptado del diseño de la landing 557.
   Sin librerias externas: graficas en CSS + micro-interacciones con landing.js.
   =========================================== */

/* Fondo azul profundo reutilizable */
.tmex-landing .tl-section--deep { background: linear-gradient(135deg, #071c2d 0%, #0b2538 55%, #12384d 100%); color: #fff; position: relative; overflow: hidden; }
.tmex-landing .tl-section--deep h2 { color: #fff; }
.tmex-landing .tl-section--deep .tl-label { color: var(--tmex-primary); }

/* ===================== HERO (imagen tratada) ===================== */
.tmex-landing .fp-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #ffffff 0%, #ffffff 56%, #f2fafd 100%); padding: 56px 0 64px; text-align: left; }
.tmex-landing .fp-hero::before { content: ""; position: absolute; top: -150px; right: -120px; width: 520px; height: 520px; background: var(--tmex-primary-10); border-radius: 50%; z-index: 0; }
.tmex-landing .fp-hero::after { content: ""; position: absolute; bottom: -210px; left: -160px; width: 420px; height: 420px; background: rgba(0,175,233,0.06); border-radius: 50%; z-index: 0; }
.tmex-landing .fp-hero .tl-container { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); gap: 48px; align-items: center; }
.tmex-landing .fp-hero h1 { color: var(--tmex-dark); font-size: clamp(36px, 4vw, 52px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; max-width: 600px; margin: 0 0 18px; }
.tmex-landing .fp-hero h1 span { color: var(--tmex-primary); }
.tmex-landing .fp-hero p { color: var(--tmex-text); font-size: 18px; max-width: 560px; margin: 0 0 24px; }
.tmex-landing .fp-hero .tl-btn-group { justify-content: flex-start; margin-top: 0; }
.tmex-landing .fp-hero__chips { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 26px; }
.tmex-landing .fp-hero__chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--tmex-border); background: #fff; border-radius: 999px; font-size: 14px; color: var(--tmex-dark); box-shadow: 0 4px 14px rgba(31,41,51,0.05); }
.tmex-landing .fp-hero__chip svg { width: 17px; height: 17px; color: var(--tmex-primary); flex-shrink: 0; }

/* Figura del hero: imagen con forma + tarjeta de confianza encimada */
.tmex-landing .fp-herofig { position: relative; min-height: 440px; display: flex; align-items: center; justify-content: center; }
.tmex-landing .fp-herofig::before { content: ""; position: absolute; inset: 24px 20px 48px 58px; background: linear-gradient(145deg, #00afe9 0%, #0098cc 100%); border-radius: 110px 28px 110px 28px; transform: rotate(-5deg); z-index: 0; }
.tmex-landing .fp-herofig::after { content: ""; position: absolute; top: 38px; right: -6px; width: 86px; height: 86px; background-image: radial-gradient(#00afe9 2px, transparent 2px); background-size: 15px 15px; opacity: 0.7; z-index: 0; }
.tmex-landing .fp-herofig__wrap { position: relative; z-index: 1; width: min(100%, 390px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 110px 28px 110px 28px; background: var(--tmex-bg-light); box-shadow: 0 22px 48px rgba(31,41,51,0.16); }
.tmex-landing .fp-herofig__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tmex-landing .fp-herofig__card { position: absolute; left: 30px; right: 30px; bottom: 22px; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border: 1px solid var(--tmex-border); border-radius: 14px; box-shadow: 0 16px 36px rgba(31,41,51,0.14); overflow: hidden; }
.tmex-landing .fp-herofig__card div { padding: 12px 8px; text-align: center; }
.tmex-landing .fp-herofig__card div + div { border-left: 1px solid var(--tmex-border); }
.tmex-landing .fp-herofig__card strong { display: block; margin-bottom: 3px; font-family: var(--tmex-font-title); font-size: 14px; color: var(--tmex-primary); }
.tmex-landing .fp-herofig__card span { display: block; font-size: 12px; line-height: 1.3; color: var(--tmex-text); }

/* ===================== PANEL DE METRICAS (graficas) ===================== */
.tmex-landing .tl-metrics .tl-container { position: relative; z-index: 1; }
.tmex-landing .tl-metrics__intro { text-align: center; margin-bottom: 40px; }
.tmex-landing .tl-metrics__intro .tl-label { color: var(--tmex-primary); }
.tmex-landing .tl-metrics__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr); gap: 28px; align-items: stretch; }
.tmex-landing .tl-metrics__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tmex-landing .tl-stat-card { padding: 26px 22px; background: rgba(255,255,255,0.06); border: 1px solid rgba(217,234,242,0.16); border-radius: 16px; backdrop-filter: blur(4px); }
.tmex-landing .tl-stat-card__num { font-family: var(--tmex-font-title); font-size: clamp(32px, 4vw, 46px); font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: #fff; }
.tmex-landing .tl-stat-card__num b { color: var(--tmex-primary); font-weight: 900; }
.tmex-landing .tl-stat-card__label { margin-top: 8px; font-size: 14.5px; line-height: 1.4; color: rgba(255,255,255,0.78); }
.tmex-landing .tl-metrics__viz { padding: 28px; background: rgba(255,255,255,0.05); border: 1px solid rgba(217,234,242,0.16); border-radius: 18px; display: flex; flex-direction: column; gap: 22px; }

/* Mini grafica de barras verticales (crecimiento) */
.tmex-landing .tl-vchart { display: flex; align-items: flex-end; gap: 12px; height: 120px; }
.tmex-landing .tl-vbar { flex: 1; height: 0; align-self: flex-end; background: linear-gradient(180deg, #00afe9 0%, #16c79a 100%); border-radius: 8px 8px 0 0; transition: height 1.1s cubic-bezier(.22,1,.36,1); }
.tmex-landing .tl-vchart__label { font-size: 13px; color: rgba(255,255,255,0.6); text-align: center; margin-top: -8px; }

/* Barras horizontales (indicadores) */
.tmex-landing .tl-hbars { margin-top: 4px; }
.tmex-landing .tl-hbar + .tl-hbar { margin-top: 16px; }
.tmex-landing .tl-hbar__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tmex-landing .tl-hbar__head span { font-size: 14.5px; color: rgba(255,255,255,0.85); }
.tmex-landing .tl-hbar__head strong { font-family: var(--tmex-font-title); font-size: 14px; color: var(--tmex-primary); }
.tmex-landing .tl-hbar__track { height: 10px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; }
.tmex-landing .tl-hbar__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #00afe9 0%, #16c79a 100%); transition: width 1.2s cubic-bezier(.22,1,.36,1); }

/* ===================== TIMELINE (proceso) ===================== */
.tmex-landing .tl-timeline { position: relative; }
.tmex-landing .tl-timeline__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.tmex-landing .tl-timeline__steps::before { content: ""; position: absolute; top: 27px; left: 12%; right: 12%; height: 2px; background: linear-gradient(90deg, var(--tmex-primary), rgba(0,175,233,0.25)); z-index: 0; }
.tmex-landing .tl-tstep { position: relative; z-index: 1; background: var(--tmex-white); border: 1px solid var(--tmex-border); border-radius: 14px; padding: 30px 26px 26px; box-shadow: 0 10px 28px rgba(31,41,51,0.06); transition: transform .25s ease, box-shadow .25s ease; }
.tmex-landing .tl-tstep:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31,41,51,0.1); }
.tmex-landing .tl-tstep__num { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin-bottom: 16px; border-radius: 50%; background: var(--tmex-primary); color: #fff; font-family: var(--tmex-font-title); font-size: 18px; font-weight: 800; box-shadow: 0 10px 22px rgba(0,175,233,0.28); }
.tmex-landing .tl-tstep h3 { font-size: 20px; margin-bottom: 8px; }
.tmex-landing .tl-tstep p { color: var(--tmex-muted); margin: 0; }

/* ===================== BLOQUE IMAGEN + CONTENIDO ===================== */
.tmex-landing .tl-imgblock .tl-container { display: grid; grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr); gap: 52px; align-items: center; }
.tmex-landing .tl-imgblock--rev .tl-container { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); }
.tmex-landing .tl-imgblock--rev .tl-imgfig { order: 2; }
.tmex-landing .tl-imgfig { position: relative; min-height: 420px; display: flex; align-items: center; justify-content: center; }
.tmex-landing .tl-imgfig::before { content: ""; position: absolute; inset: 30px 24px 50px 10px; background: linear-gradient(145deg, #00afe9 0%, #0098cc 100%); border-radius: 28px 110px 28px 110px; transform: rotate(4deg); z-index: 0; }
.tmex-landing .tl-imgfig__wrap { position: relative; z-index: 1; width: min(100%, 430px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 28px 110px 28px 110px; background: var(--tmex-bg-light); box-shadow: 0 24px 54px rgba(31,41,51,0.16); }
.tmex-landing .tl-imgfig__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tmex-landing .tl-imgfig__badge { position: absolute; left: 24px; right: 24px; bottom: 20px; z-index: 2; padding: 16px 20px; background: #fff; border: 1px solid var(--tmex-border); border-radius: 14px; box-shadow: 0 18px 42px rgba(31,41,51,0.16); text-align: center; }
.tmex-landing .tl-imgfig__badge strong { display: block; font-family: var(--tmex-font-title); font-size: 17px; color: var(--tmex-primary); margin-bottom: 2px; }
.tmex-landing .tl-imgfig__badge span { font-size: 13.5px; color: var(--tmex-text); }

/* ===================== CTA PREMIUM (final) ===================== */
.tmex-landing .tl-cta-premium { position: relative; overflow: hidden; background: linear-gradient(135deg, #071c2d 0%, #0b2538 55%, #12384d 100%); padding: 86px 0 92px; color: #fff; }
.tmex-landing .tl-cta-premium::before { content: ""; position: absolute; top: -170px; right: -150px; width: 440px; height: 440px; background: rgba(0,175,233,0.18); border-radius: 50%; }
.tmex-landing .tl-cta-premium::after { content: ""; position: absolute; left: -160px; bottom: -190px; width: 420px; height: 420px; background: rgba(0,175,233,0.1); border-radius: 50%; }
.tmex-landing .tl-cta-premium__container { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 0 24px; text-align: center; }
.tmex-landing .tl-cta-premium__card { position: relative; padding: 46px 42px; background: rgba(255,255,255,0.07); border: 1px solid rgba(217,234,242,0.22); border-radius: 22px; box-shadow: 0 24px 54px rgba(0,0,0,0.18); backdrop-filter: blur(6px); }
.tmex-landing .tl-cta-premium__eyebrow { display: inline-flex; align-items: center; margin-bottom: 16px; padding: 7px 14px; border-radius: 999px; background: rgba(0,175,233,0.14); border: 1px solid rgba(0,175,233,0.42); color: var(--tmex-primary); font-family: var(--tmex-font-title); font-size: 13px; font-weight: 800; }
.tmex-landing .tl-cta-premium__card h2 { max-width: 760px; margin: 0 auto 18px; color: #fff; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; }
.tmex-landing .tl-cta-premium__card p { max-width: 760px; margin: 0 auto 28px; color: rgba(255,255,255,0.88); font-size: 17px; line-height: 1.7; }
.tmex-landing .tl-cta-premium__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 30px; border-radius: 8px; background: var(--tmex-primary); border: 2px solid var(--tmex-primary); color: #fff; font-family: var(--tmex-font-title); font-size: 16px; font-weight: 800; box-shadow: 0 12px 28px rgba(0,175,233,0.32); transition: all .2s ease; }
.tmex-landing .tl-cta-premium__btn:hover { background: var(--tmex-primary-hover); border-color: var(--tmex-primary-hover); color: #fff; transform: translateY(-1px); }
.tmex-landing .tl-cta-premium__note { margin: 20px 0 0; color: rgba(255,255,255,0.72); font-size: 14.5px; }

/* ===================== Realce de cards de servicio ===================== */
.tmex-landing .fp-service.tl-card { display: flex; flex-direction: column; }
.tmex-landing .fp-service .tl-card__link { margin-top: auto; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .tmex-landing .fp-hero .tl-container { grid-template-columns: 1fr; gap: 40px; }
  .tmex-landing .fp-herofig { min-height: auto; max-width: 560px; margin: 0 auto; padding-bottom: 60px; }
  .tmex-landing .tl-metrics__grid { grid-template-columns: 1fr; }
  .tmex-landing .tl-timeline__steps { grid-template-columns: 1fr; }
  .tmex-landing .tl-timeline__steps::before { display: none; }
  .tmex-landing .tl-imgblock .tl-container,
  .tmex-landing .tl-imgblock--rev .tl-container { grid-template-columns: 1fr; gap: 40px; }
  .tmex-landing .tl-imgblock--rev .tl-imgfig { order: 0; }
  .tmex-landing .tl-imgfig { min-height: auto; max-width: 520px; margin: 0 auto; padding-bottom: 50px; }
}

@media (max-width: 767px) {
  .tmex-landing .fp-hero { padding: 44px 0 52px; }
  .tmex-landing .fp-herofig__card { left: 12px; right: 12px; }
  .tmex-landing .tl-metrics__stats { grid-template-columns: 1fr; }
  .tmex-landing .tl-cta-premium { padding: 58px 0 66px; }
  .tmex-landing .tl-cta-premium__card { padding: 32px 22px; }
}

/* =================================================================
   v2 — Componentes fintech (cards, trust, logos, FAQ, blog)
   ================================================================= */

/* ----- Icon tile (gradiente suave) ----- */
.tmex-landing .fp-icontile { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--tmex-primary); background: linear-gradient(145deg, #eaf7fe 0%, #d4eefb 100%); box-shadow: inset 0 1px 2px rgba(255,255,255,0.85), 0 8px 18px rgba(0,175,233,0.12); margin-bottom: 18px; }
.tmex-landing .fp-icontile svg { width: 28px; height: 28px; }

/* ----- Seccion 2: ¿Cual es tu caso? ----- */
.tmex-landing .fp-cases-wrap { position: relative; overflow: hidden; }
.tmex-landing .fp-cases-wrap::before { content: ""; position: absolute; top: -120px; right: -90px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(0,175,233,0.10), transparent 70%); z-index: 0; }
.tmex-landing .fp-cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; z-index: 1; }
.tmex-landing .fp-case { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--tmex-border); border-radius: 20px; padding: 30px 26px; box-shadow: 0 12px 30px rgba(31,41,51,0.06); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tmex-landing .fp-case::before { content: ""; position: absolute; top: -1px; left: 26px; right: 26px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--tmex-primary), #16c79a); opacity: 0; transition: opacity .25s ease; }
.tmex-landing .fp-case:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(31,41,51,0.12); border-color: rgba(0,175,233,0.40); }
.tmex-landing .fp-case:hover::before { opacity: 1; }
.tmex-landing .fp-case h3 { font-size: 22px; margin-bottom: 10px; }
.tmex-landing .fp-case p { color: var(--tmex-muted); flex: 1; margin: 0; }
.tmex-landing .fp-case__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; padding: 12px 18px; border-radius: 10px; border: 1.5px solid var(--tmex-border); background: #fff; color: var(--tmex-primary); font-family: var(--tmex-font-title); font-weight: 700; font-size: 14px; transition: all .2s ease; }
.tmex-landing .fp-case__btn:hover { border-color: var(--tmex-primary); background: var(--tmex-bg-soft); }
.tmex-landing .fp-case--featured { background: linear-gradient(160deg, #f2fbff 0%, #e8f6fe 100%); border-color: rgba(0,175,233,0.45); box-shadow: 0 20px 46px rgba(0,175,233,0.16); }
.tmex-landing .fp-case--featured .fp-icontile { background: linear-gradient(145deg, #00afe9, #0098cc); color: #fff; box-shadow: 0 10px 24px rgba(0,175,233,0.4); }
.tmex-landing .fp-case__badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-bottom: 16px; padding: 6px 13px; border-radius: 999px; background: linear-gradient(90deg, #00afe9, #16c79a); color: #fff; font-family: var(--tmex-font-title); font-size: 12px; font-weight: 800; letter-spacing: .3px; }
.tmex-landing .fp-case--featured .fp-case__btn { background: linear-gradient(90deg, #00afe9, #0098cc); border-color: transparent; color: #fff; box-shadow: 0 10px 24px rgba(0,175,233,0.32); }
.tmex-landing .fp-case--featured .fp-case__btn:hover { transform: translateY(-1px); }

/* ----- Tira de confianza ----- */
.tmex-landing .fp-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 42px; padding-top: 32px; border-top: 1px solid var(--tmex-border); position: relative; z-index: 1; }
.tmex-landing .fp-trust__item { display: flex; align-items: center; gap: 12px; }
.tmex-landing .fp-trust__item svg { width: 30px; height: 30px; color: var(--tmex-primary); flex-shrink: 0; }
.tmex-landing .fp-trust__item strong { display: block; font-family: var(--tmex-font-title); font-size: 14.5px; color: var(--tmex-dark); }
.tmex-landing .fp-trust__item span { font-size: 13px; color: var(--tmex-muted); }

/* ----- Logos en tarjetas (visibles) ----- */
.tmex-landing .fp-logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.tmex-landing .fp-logo-card { display: flex; align-items: center; justify-content: center; height: 112px; padding: 18px; background: #fff; border: 1px solid var(--tmex-border); border-radius: 16px; box-shadow: 0 8px 22px rgba(31,41,51,0.05); transition: transform .2s ease, box-shadow .2s ease; }
.tmex-landing .fp-logo-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31,41,51,0.10); }
.tmex-landing .fp-logo-card img { max-width: 100%; max-height: 62px; width: auto; height: auto; object-fit: contain; filter: grayscale(100%); opacity: .8; transition: filter .25s ease, opacity .25s ease; }
.tmex-landing .fp-logo-card:hover img { filter: grayscale(0); opacity: 1; }

/* ----- FAQ moderno (corrige fondo azul del boton del tema) ----- */
.tmex-landing .tl-faq__item { background: #fff !important; border: 1px solid var(--tmex-border); border-radius: 14px; box-shadow: 0 6px 18px rgba(31,41,51,0.04); }
.tmex-landing .tl-faq__q { background: transparent !important; color: var(--tmex-dark) !important; }
.tmex-landing .tl-faq__q:hover { background: var(--tmex-bg-soft) !important; }
.tmex-landing .tl-faq__item.active { border-color: rgba(0,175,233,0.5); box-shadow: 0 10px 26px rgba(0,175,233,0.10); }
.tmex-landing .tl-faq__q svg { color: var(--tmex-primary); }

/* ----- Blog con imagen ----- */
.tmex-landing .fp-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tmex-landing .fp-post { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--tmex-border); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(31,41,51,0.06); transition: transform .25s ease, box-shadow .25s ease; }
.tmex-landing .fp-post:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(31,41,51,0.12); }
.tmex-landing .fp-post__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tmex-bg-soft); }
.tmex-landing .fp-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tmex-landing .fp-post:hover .fp-post__media img { transform: scale(1.06); }
.tmex-landing .fp-post__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.tmex-landing .fp-post__cat { font-family: var(--tmex-font-title); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--tmex-primary); margin-bottom: 8px; }
.tmex-landing .fp-post__body h3 { font-size: 18px; line-height: 1.3; margin-bottom: 10px; }
.tmex-landing .fp-post__body p { color: var(--tmex-muted); font-size: 14.5px; flex: 1; margin: 0; }
.tmex-landing .fp-post .tl-card__link { margin-top: 14px; }

@media (max-width: 1024px) {
  .tmex-landing .fp-cases { grid-template-columns: repeat(2, 1fr); }
  .tmex-landing .fp-trust { grid-template-columns: repeat(2, 1fr); }
  .tmex-landing .fp-logos { grid-template-columns: repeat(3, 1fr); }
  .tmex-landing .fp-posts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .tmex-landing .fp-cases { grid-template-columns: 1fr; }
  .tmex-landing .fp-trust { grid-template-columns: 1fr 1fr; }
  .tmex-landing .fp-logos { grid-template-columns: repeat(2, 1fr); }
  .tmex-landing .fp-posts { grid-template-columns: 1fr; }
}

/* FAQ: mas alto para respuestas completas */
.tmex-landing .tl-faq__item.active .tl-faq__a { max-height: 560px; }
