/*
Theme Name: Factoring Ahorrochile
Description: Landing de Factoring Ahorrochile, migrada desde el diseño HTML original.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ahorrochile
*/

body { margin: 0; font-family: Archivo, Helvetica, Arial, sans-serif; color: #14161F; background: #ffffff; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a { color: #0C1E78; text-decoration: none; }
a:hover { color: #2C3EBB; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
input, textarea, button, select { font-family: inherit; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }

/* Barra de administración de WP: el header sticky queda debajo */
.admin-bar header.site-header { top: 32px !important; }
@media (max-width: 782px) { .admin-bar header.site-header { top: 46px !important; } }

/* Estados hover/focus (en el diseño original venían como style-hover / style-focus) */
.hv-light:hover { color: #A9B3E8 !important; }
.hv-bg-soft:hover { background: #E8EAF6 !important; }
.hv-bg-strong:hover { background: #16299B !important; color: #fff !important; }
.fc-input:focus { border-color: #0C1E78 !important; }

/* Header en móvil: el diseño original desbordaba bajo ~900px */
@media (max-width: 900px) {
	.site-header .site-nav { display: none !important; }
	.site-header .site-cta { margin-left: auto; }
}
@media (max-width: 480px) {
	.site-header .site-logo { height: 48px !important; }
	.site-header .site-cta { padding: 10px 14px !important; font-size: 13.5px !important; }
}

/* Hero / banner principal */
.hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(115deg, #0C1E78 0%, #1E3FAE 42%, #4C7FDD 78%, #6A9BEA 100%);
}
.hero-deco {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		repeating-radial-gradient(circle at 8% 40%, transparent 0 58px, rgba(255,255,255,.07) 58px 59px),
		repeating-linear-gradient(0deg, transparent 0 46px, rgba(255,255,255,.09) 46px 47px) right top / 34% 55% no-repeat;
	-webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 45%, transparent 60%, #000 100%);
	mask-image: linear-gradient(90deg, #000 0%, transparent 45%, transparent 60%, #000 100%);
}
.hero-inner {
	position: relative;
	max-width: 1240px;
	margin: 0 auto;
	padding: 80px 24px 88px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: 56px;
	align-items: center;
}
.hero-eyebrow { font-size: 14px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.9); }
.hero-title {
	margin-top: 26px;
	font-size: clamp(32px, 4.6vw, 58px);
	line-height: 1.32;
	letter-spacing: -.01em;
	font-weight: 800;
	text-transform: uppercase;
}
.hero-title span {
	background: #fff;
	color: #0C1E78;
	padding: 6px 16px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.hero-sub { margin-top: 30px; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; max-width: 26em; text-wrap: pretty; }
.hero-cta {
	display: inline-flex;
	gap: 18px;
	align-items: center;
	background: #0C1E78;
	color: #fff;
	padding: 16px 28px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	box-shadow: 0 10px 24px rgba(8, 16, 70, .35);
	transition: background .2s ease, transform .2s ease;
}
.hero-cta:hover { background: #16299B; color: #fff; transform: translateY(-2px); }

.hero-media { position: relative; padding: 28px 0 0; }
.hero-frame {
	position: relative;
	padding: 12px;
	border: 2px solid rgba(255,255,255,.45);
	border-radius: 32px;
}
.hero-frame img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: 55% 30%;
	border-radius: 22px;
	box-shadow: 0 24px 48px rgba(8, 16, 70, .3);
}
.hero-bubble {
	position: absolute;
	background: #fff;
	color: #0C1E78;
	padding: 16px 22px;
	border-radius: 18px;
	font-size: 18px;
	line-height: 1.35;
	text-align: center;
	box-shadow: 0 14px 30px rgba(8, 16, 70, .25);
}
.hero-bubble strong { font-weight: 800; }
.hero-bubble--top { top: 0; right: 4%; }
.hero-bubble--side { left: -36px; top: 52%; }

@media (max-width: 960px) {
	.hero-inner { grid-template-columns: 1fr; gap: 48px; padding: 64px 24px 72px; }
	.hero-bubble--side { left: 12px; top: auto; bottom: -18px; }
}
@media (max-width: 480px) {
	.hero-bubble { font-size: 15px; padding: 12px 16px; }
	.hero-bubble--top { right: 12px; }
}

/* Cómo funciona: las cards se elevan al pasar el cursor */
.step-card {
	position: relative;
	background: #fff;
	border: 1px solid #E1E4F0;
	padding: 32px 28px;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.step-card::before {
	content: "";
	position: absolute;
	left: -1px; right: -1px; top: -1px;
	height: 4px;
	background: #0C1E78;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s ease;
}
.step-card:hover {
	transform: translateY(-8px);
	border-color: #C3C9E4;
	box-shadow: 0 22px 44px rgba(12, 30, 120, .16);
}
.step-card:hover::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
	.step-card, .step-card::before { transition: none; }
	.step-card:hover { transform: none; }
}

/* Pop-up de bienvenida */
.ac-popup {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 12, 40, .7);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}
.ac-popup.is-open { opacity: 1; visibility: visible; }
.ac-popup__box {
	position: relative;
	width: min(960px, 100%);
	transform: translateY(16px) scale(.98);
	transition: transform .3s ease;
}
.ac-popup.is-open .ac-popup__box { transform: none; }
.ac-popup__link { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.ac-popup__link img { display: block; width: 100%; height: auto; }
.ac-popup__close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #0C1E78;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.ac-popup__close:hover { background: #E8EAF6; }
@media (max-width: 600px) {
	.ac-popup__close { top: -14px; right: -6px; }
}

/* Beneficios: título centrado sobre azul; al pasar el cursor aparece el texto sobre blanco */
.benefit-card {
	position: relative;
	min-height: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: #0C1E78;
	border: 1px solid #0C1E78;
	text-align: center;
	cursor: default;
	overflow: hidden;
	outline: 0;
}
.benefit-card h3 {
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.012em;
	max-width: 13em;
	text-wrap: balance;
	transition: opacity .25s ease;
}
.benefit-card p {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 32px;
	background: #fff;
	border-top: 3px solid #0C1E78;
	color: #3A3F52;
	font-size: 16px;
	line-height: 1.6;
	text-wrap: pretty;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .25s ease, transform .25s ease;
}
.benefit-card:hover p,
.benefit-card:focus-within p,
.benefit-card:focus p { opacity: 1; transform: none; }
.benefit-card:hover h3,
.benefit-card:focus h3 { opacity: 0; }
.benefit-card:focus-visible { box-shadow: 0 0 0 3px #A9B3E8; }
@media (prefers-reduced-motion: reduce) {
	.benefit-card h3, .benefit-card p { transition: none; }
}

.ac-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
