/* ============ Tokens (paleta original del tema Neve) ============ */
:root {
	--primary: #0366d6;
	--secondary: #0e509a;
	--light: #ededed;
	--dark: #14171c;
	--text: #2b2b2b;
	--white: #ffffff;
	--container: 1140px;
	--font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-display: 'Bebas Neue', 'Poppins', Impact, sans-serif;

	/* Para poner una foto en el banner superior:
	   --hero-image: url('img/banner.jpg'); */
	--hero-image: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--text);
	background: var(--white);
}
body.nav-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 2000;
	background: var(--white); color: var(--text); padding: 8px 14px;
}
.skip-link:focus { left: 8px; }

/* ============ Botones ============ */
.btn {
	display: inline-block;
	font-family: var(--font-display);
	font-size: 1.35rem;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--white);
	background: var(--secondary);
	border-radius: 0;
	padding: .65em 1.7em;
	transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--primary); }
.btn--sm { font-size: 1.15rem; padding: .6em 1.4em; }
.btn--xs { font-size: 1rem; padding: .5em 1.15em; }
.btn--light { background: var(--white); color: var(--secondary); }
.btn--light:hover { background: var(--light); color: var(--dark); }

/* ============ Header ============ */
.site-header {
	position: sticky; top: 0; z-index: 1000;
	background: var(--white);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--primary); }
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	max-width: 1170px; margin: 0 auto; padding: 12px 20px;
}
.brand img { width: clamp(150px, 20vw, 230px); }

.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu a {
	display: block; padding: 10px 14px;
	color: var(--text); text-decoration: none; font-weight: 400;
	transition: color .2s ease;
}
.menu a:hover, .menu a[aria-current] { color: var(--primary); }
.sub-toggle {
	border: 0; background: none; padding: 8px 6px 8px 0; margin-left: -8px;
	cursor: pointer; color: var(--text); display: inline-flex; align-items: center;
}
.sub-toggle svg { width: 10px; height: 10px; fill: currentColor; transition: transform .2s ease; }
.has-sub.is-open .sub-toggle svg { transform: rotate(180deg); }

.nav-toggle, .nav-close { display: none; }
.nav-overlay { display: none; }

/* Escritorio */
@media (min-width: 961px) {
	.site-nav { display: block; }
	.menu { display: flex; align-items: center; }
	.sub-menu {
		display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
		background: var(--white); border: 1px solid var(--light);
		box-shadow: 0 8px 20px rgba(0, 0, 0, .08); z-index: 10;
	}
	.sub-menu a { padding: 11px 18px; }
	.has-sub:hover > .sub-menu,
	.has-sub:focus-within > .sub-menu,
	.has-sub.is-open > .sub-menu { display: block; }
}

/* Tablet y móvil: menú lateral deslizable desde la izquierda */
@media (max-width: 960px) {
	.nav-toggle {
		display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
		width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer;
	}
	.nav-toggle span { display: block; height: 2px; background: var(--text); }
	.site-nav {
		position: fixed; top: 0; left: 0; bottom: 0; z-index: 2;
		width: min(320px, 85vw); overflow-y: auto;
		background: var(--white); padding: 56px 12px 24px;
		transform: translateX(-100%); visibility: hidden;
		transition: transform .3s ease, visibility 0s .3s;
	}
	.site-nav.is-open { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
	.nav-close {
		display: block; position: absolute; top: 8px; right: 8px;
		width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
		font-size: 1.8rem; line-height: 1; color: var(--text);
	}
	.nav-overlay {
		display: block; position: fixed; inset: 0; z-index: 1;
		background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden;
		transition: opacity .3s ease, visibility 0s .3s;
	}
	.nav-overlay.is-visible { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
	.menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--light); }
	.menu > li > a { flex: 1; }
	.sub-toggle { padding: 12px 14px; margin: 0; }
	.sub-menu { display: none; width: 100%; padding-left: 14px; }
	.has-sub.is-open > .sub-menu { display: block; }
}

/* ============ Banner ============ */
.hero {
	position: relative;
	min-height: 440px;
	background:
		var(--hero-image) center / cover no-repeat,
		linear-gradient(135deg, var(--dark) 0%, var(--secondary) 45%, var(--primary) 100%);
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(14, 80, 154, .35); }
.hero { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.hero__logo { position: relative; z-index: 1; width: min(560px, 86%); height: auto; }
@media (max-width: 767px) { .hero { min-height: 260px; padding: 28px 20px; } }

/* ============ Título ============ */
.headline { padding: 56px 0 24px; text-align: center; }
.headline h1 {
	margin: 0; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2.6rem, 7vw, 4.75rem); line-height: 1.05; letter-spacing: .03em;
	color: var(--secondary);
}

.quick-links { padding: 8px 0 56px; }
.quick-links__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quick-links__row > :first-child { justify-self: end; }
.quick-links__row > :last-child { justify-self: start; }
@media (max-width: 767px) {
	.quick-links__row { grid-template-columns: 1fr; gap: 14px; }
	.quick-links__row > * { justify-self: stretch !important; text-align: center; }
}

/* ============ Ahorros / Gestión en línea ============ */
.features { background: var(--light); padding: 56px 0; }
.features .container { display: grid; gap: 40px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.feature__text {
	display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
	padding: clamp(28px, 5vw, 64px); color: var(--white);
}
.feature__text--a { background: var(--primary); }
.feature__text--b { background: var(--secondary); }
.feature__text h2 {
	margin: 0 0 14px; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1.05; letter-spacing: .03em;
}
.feature__title-link { color: inherit; text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .2s ease; }
.feature__title-link:hover { border-bottom-color: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.feature__text p { margin: 0 0 24px; max-width: 46ch; }
@media (max-width: 767px) {
	.feature { grid-template-columns: 1fr; }
	.feature__media { order: -1; } /* en móvil la imagen siempre va primero */
}

/* ============ Convenios (carrusel) ============ */
.section-title {
	margin: 0; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: .03em;
	color: var(--secondary);
}
.agreements { padding: 64px 0 56px; }
.agreements .section-title { text-align: center; margin-bottom: 32px; }

.carousel { position: relative; }
.carousel__viewport { overflow: hidden; }
.carousel__track { display: flex; --per-view: 3; }
.carousel__slide { flex: 0 0 calc(100% / var(--per-view)); padding: 0 10px; }
.carousel__slide figure {
	margin: 0; height: 220px; display: flex; align-items: center; justify-content: center;
	background: var(--white); border: 1px solid var(--light); padding: 12px;
}
.carousel__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.carousel__arrow {
	position: absolute; top: 110px; transform: translateY(-50%); z-index: 2;
	width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(20, 23, 28, .6); color: var(--white);
	display: flex; align-items: center; justify-content: center;
	transition: background-color .2s ease;
}
.carousel__arrow:hover { background: var(--primary); }
.carousel__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.carousel__arrow--prev { left: 18px; }
.carousel__arrow--next { right: 18px; }

.carousel__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 20px; }
.carousel__dot {
	width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.carousel__dot::before {
	content: ""; width: 10px; height: 10px; border-radius: 50%;
	background: #b8bec6; transition: background-color .2s ease, transform .2s ease;
}
.carousel__dot[aria-current="true"]::before { background: var(--primary); transform: scale(1.25); }

/* ============ Créditos ============ */
.credits { padding: 8px 0 64px; }
.credits__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.credits__image { background: var(--light); }
.credits__image img { width: 100%; height: clamp(220px, 34vw, 440px); object-fit: cover; }

/* ============ Llamado a contactar ============ */
.contact-cta { background: var(--primary); color: var(--white); text-align: center; padding: 72px 0; }
.contact-cta h2 {
	margin: 0 0 8px; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: .03em;
}
.contact-cta p { margin: 0 0 28px; font-size: 1.1rem; }

/* ============ Footer ============ */
.site-footer { background: var(--dark); color: var(--white); text-align: center; padding: 22px 20px; font-size: .9rem; }

/* ============ Botón flotante de WhatsApp ============ */
.whatsapp-float {
	position: fixed; z-index: 900;
	right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
	width: 60px; height: 60px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #25d366; color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.whatsapp-float:focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; }
.whatsapp-float svg { width: 34px; height: 34px; fill: currentColor; }
@media (max-width: 767px) { .whatsapp-float { width: 56px; height: 56px; right: 16px; bottom: 16px; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}
	
/* ============ Páginas internas ============ */
.page-hero {
	background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 55%, var(--primary) 100%);
	color: var(--white); padding: 64px 0 56px;
}
.page-hero h1 {
	margin: 0 0 10px; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2.8rem, 7vw, 4.5rem); line-height: 1.02; letter-spacing: .03em;
}
.page-hero p { margin: 0; max-width: 60ch; font-size: 1.1rem; }

.container--narrow { max-width: 900px; }
.page-body { padding: 56px 0 72px; }
.page-body h2 {
	margin: 48px 0 12px; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.05; letter-spacing: .03em; color: var(--secondary);
}
.page-body h2:first-child { margin-top: 0; }
.page-body p { max-width: 68ch; margin: 0 0 16px; }
.page-body .btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
@media (max-width: 767px) {
	.page-body .btn-row .btn { flex: 1 1 100%; text-align: center; }
}
button.btn { border: 0; cursor: pointer; }

.check-list {
	list-style: none; margin: 0 0 8px; padding: 0;
	display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px;
}
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
	content: ""; position: absolute; left: 2px; top: .55em; width: 13px; height: 7px;
	border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary);
	transform: rotate(-45deg);
}
@media (max-width: 767px) { .check-list { grid-template-columns: 1fr; } }

.key-figures {
	display: grid; grid-template-columns: repeat(2, 1fr);
	gap: 16px; margin: 24px 0 32px;
}
@media (max-width: 560px) { .key-figures { grid-template-columns: 1fr; } }
.key-figure { min-width: 0; background: var(--light); border-left: 5px solid var(--primary); padding: 18px 20px; }
.key-figure dt { margin: 0; font-size: .9rem; font-weight: 600; }
.key-figure dd { margin: 0; font-family: var(--font-display); font-size: 2.7rem; line-height: 1.1; letter-spacing: .02em; color: var(--secondary); }
.key-figure dd small { font-family: var(--font-body); font-size: .85rem; letter-spacing: 0; color: var(--text); }

.loan-list { margin: 24px 0 8px; }
.loan {
	display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 32px;
	padding: 26px 0; border-top: 1px solid #d5d5d5;
}
.loan:last-child { border-bottom: 1px solid #d5d5d5; }
.loan h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; letter-spacing: .03em; color: var(--secondary); }
.loan p { margin: 4px 0 0; }
.loan__figure { font-family: var(--font-display); font-size: 3rem; line-height: 1; letter-spacing: .02em; color: var(--primary); text-align: right; }
.loan__figure small { display: block; font-family: var(--font-body); font-size: .85rem; letter-spacing: 0; color: var(--text); }
@media (max-width: 767px) {
	.loan { grid-template-columns: 1fr; }
	.loan__figure { text-align: left; }
}

.service-list { list-style: none; margin: 0; padding: 0; }
.service-link {
	display: block; padding: 24px 0; border-top: 1px solid #d5d5d5;
	color: var(--text); text-decoration: none;
}
.service-list li:last-child .service-link { border-bottom: 1px solid #d5d5d5; }
.service-link strong {
	display: block; font-family: var(--font-display); font-weight: 400;
	font-size: 2.1rem; letter-spacing: .03em; color: var(--secondary); transition: color .2s ease;
}
.service-link:hover strong { color: var(--primary); }

.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.logo-grid figure {
	margin: 0; height: 170px; display: flex; align-items: center; justify-content: center;
	background: var(--white); border: 1px solid var(--light); padding: 14px;
}
.logo-grid img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 767px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } .logo-grid figure { height: 130px; } }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }
.contact-list { margin: 0; display: grid; gap: 22px; }
.contact-list dt { font-size: .85rem; font-weight: 600; color: var(--secondary); }
.contact-list dd { margin: 2px 0 0; }
.contact-list a { color: var(--text); overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--primary); }
.contact-form h2 { margin-top: 0 !important; }
.form-field { display: grid; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: .9rem; font-weight: 600; }
.form-field input, .form-field textarea {
	width: 100%; font: inherit; color: var(--text); background: var(--white);
	border: 1px solid #b5b5b5; border-radius: 0; padding: 12px 14px;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus-visible, .form-field textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form-note { font-size: .85rem; margin: 12px 0 0 !important; }

/* ============ Redes sociales ============ */
.social-band { background: var(--light); padding: 56px 0; text-align: center; }
.social-band h2 {
	margin: 0 0 8px; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: .03em; color: var(--secondary);
}
.social-band p { margin: 0 0 24px; }
.social-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-width: 210px; padding: .7em 1.6em; color: var(--white); text-decoration: none;
	font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase;
	transition: transform .2s ease, filter .2s ease;
}
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.social-btn svg { width: 24px; height: 24px; flex: none; }
.social-btn--fb { background: #1877f2; }
.social-btn--ig { background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%); }
@media (max-width: 560px) { .social-btn { flex: 1 1 100%; } }

.site-footer__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 14px; }
.site-footer__social a {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
	color: var(--white); text-decoration: none; font-size: .9rem;
	border: 1px solid rgba(255, 255, 255, .4); transition: background-color .2s ease, border-color .2s ease;
}
.site-footer__social a:hover { background: var(--primary); border-color: var(--primary); }
.site-footer__social svg { width: 18px; height: 18px; }
.site-footer p { margin: 0; }

.btn--outline { background: transparent; color: var(--secondary); box-shadow: inset 0 0 0 2px var(--secondary); }
.btn--outline:hover { background: var(--secondary); color: var(--white); }
