/* =========================================================================
   FAVESAM - Portada y rejilla de categorías (prefijo .fv-)
   Se carga después de style.css/shortcodes.css; los selectores van
   calificados para ganar aunque esos CSS lleguen tarde (preload async).
   ========================================================================= */

:root {
	--fv-green-dark: #426315;
	--fv-green: #8DBC43;
	--fv-green-soft: #eef5e3;
	--fv-ink: #1f2a17;
	--fv-text: #55605a;
	--fv-line: #e3e9dc;
	--fv-bg-alt: #f5f8f0;
	--fv-radius: 14px;
	--fv-shadow: 0 1px 2px rgba(31, 42, 23, .06), 0 6px 20px rgba(31, 42, 23, .07);
	--fv-shadow-hover: 0 2px 4px rgba(31, 42, 23, .08), 0 16px 36px rgba(31, 42, 23, .14);
}

.fv-home { color: var(--fv-text); }
.fv-home h3, .fv-home h4, .fv-home h5 { color: var(--fv-ink); }

/* ---------- Utilidades ---------- */
.fv-kicker {
	display: inline-block;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--fv-green-dark);
	margin-bottom: 10px;
}
.fv-kicker::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 2px;
	background: var(--fv-green);
	vertical-align: middle;
	margin-right: 10px;
}
.fv-kicker-light { color: #fff; }
.fv-kicker-light::before { background: #fff; }

.fv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 999px;
	border: 2px solid transparent;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.fv-btn:hover { transform: translateY(-2px); }
.fv-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fv-btn-primary { background: var(--fv-green); color: #fff !important; box-shadow: 0 6px 16px rgba(66, 99, 21, .25); }
.fv-btn-primary:hover { background: var(--fv-green-dark); }
.fv-btn-ghost { border-color: rgba(255, 255, 255, .85); color: #fff !important; }
.fv-btn-ghost:hover { background: #fff; color: var(--fv-green-dark) !important; }
.fv-btn-white { background: #fff; color: var(--fv-green-dark) !important; }
.fv-btn-white:hover { background: var(--fv-ink); color: #fff !important; }

.fv-link {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fv-green-dark) !important;
	white-space: nowrap;
}
.fv-link i { margin-left: 6px; transition: transform .2s; }
.fv-link:hover i { transform: translateX(4px); }

.fv-card {
	background: #fff;
	border: 1px solid var(--fv-line);
	border-radius: var(--fv-radius);
	box-shadow: var(--fv-shadow);
}
.fv-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--fv-green-soft);
	margin-bottom: 18px;
}
.fv-icon img { max-width: 44px; max-height: 44px; width: auto; height: auto; }

/* ---------- Secciones ---------- */
.fv-section { padding-top: 80px; padding-bottom: 20px; }
.fv-section-head { max-width: 760px; margin-bottom: 40px; }
.fv-section-head h3 {
	font-family: 'Raleway', sans-serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
	margin: 0 0 14px;
}
.fv-section-head p { font-size: 16px; line-height: 1.7; margin: 0; }
.fv-section-head-row {
	max-width: none;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}
.fv-section-head-row h3 { margin-bottom: 0; }

/* ---------- Hero ---------- */
.page-banner.fv-hero {
	height: auto;
	min-height: 560px;
	max-height: none;
	padding: 96px 0 220px;
}
.page-banner.fv-hero::before {
	background: linear-gradient(180deg, rgba(20, 30, 10, .55) 0%, rgba(20, 30, 10, .70) 100%);
}
.page-banner.fv-hero .fv-eyebrow {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 999px;
	background: rgba(141, 188, 67, .9);
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 22px;
}
.page-banner.fv-hero h1 {
	font-size: 52px;
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
	letter-spacing: 1px;
	margin: 0 0 14px;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.page-banner.fv-hero h2 {
	font-size: 24px;
	font-weight: 400;
	color: #fff;
	margin: 0 0 8px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.page-banner.fv-hero p {
	font-size: 16px;
	color: rgba(255, 255, 255, .9);
	letter-spacing: .3px;
	margin: 0;
}
.fv-hero-actions {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 30px;
}

/* ---------- Cifras ---------- */
.fv-stats-wrap { position: relative; z-index: 3; margin-top: -70px; }
.fv-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: #fff;
	border-radius: var(--fv-radius);
	box-shadow: var(--fv-shadow-hover);
	overflow: hidden;
}
.fv-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 28px 16px;
	border-left: 1px solid var(--fv-line);
}
.fv-stat:first-child { border-left: 0; }
.fv-stat-num {
	font-family: 'Montserrat', sans-serif;
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
	color: var(--fv-green-dark);
}
.fv-stat-label {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fv-text);
}

/* ---------- Sectores ---------- */
.fv-sectors {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.fv-sector { padding: 32px 28px; transition: transform .25s, box-shadow .25s; }
.fv-sector:hover { transform: translateY(-4px); box-shadow: var(--fv-shadow-hover); }
.fv-sector h4 {
	font-family: 'Raleway', sans-serif;
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 12px;
}
.fv-sector p { font-size: 15px; line-height: 1.7; margin: 0 0 10px; }
.fv-sector p:last-child { margin-bottom: 0; }

/* ---------- Familias (portada y /categorias) ---------- */
.fv-families-wrap { background: var(--fv-bg-alt); padding: 80px 0; margin-top: 60px; }
.fv-families {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 15px 64px;   /* /categorias: la rejilla va sin contenedor */
}
.fv-families-wrap .fv-families { padding: 0; }
.fv-family {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--fv-line);
	border-radius: var(--fv-radius);
	box-shadow: var(--fv-shadow);
	overflow: hidden;
	color: var(--fv-text) !important;
	text-decoration: none !important;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.fv-family:hover,
.fv-family:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--fv-shadow-hover);
	border-color: var(--fv-green);
}
.fv-family-media {
	position: relative;
	height: 150px;
	background: linear-gradient(135deg, var(--fv-green-dark), var(--fv-green));
	overflow: hidden;
}
.fv-family-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}
.fv-family:hover .fv-family-media img { transform: scale(1.06); }
.fv-family-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .25) 100%);
}
.fv-family-body {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 44px 22px 22px;
}
.fv-family-icon {
	position: absolute;
	top: -32px;
	left: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 4px 14px rgba(31, 42, 23, .15);
}
/* Los iconos son sprites 40x74: mitad superior verde, inferior blanca (hover J3). Mostramos la verde. */
.fv-family-icon img { width: 40px; height: 37px; max-width: none; object-fit: cover; object-position: top; }
.fv-family-body h5 {
	font-family: 'Montserrat', sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--fv-ink);
	margin: 0 0 8px;
}
.fv-family-body p {
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.fv-family-more {
	margin-top: auto;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fv-green-dark);
}
.fv-family-more i { margin-left: 4px; transition: transform .2s; }
.fv-family:hover .fv-family-more i { transform: translateX(4px); }


/* ---------- Llamada a presupuesto ---------- */
.fv-cta {
	background:
		radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .14) 0, rgba(255, 255, 255, 0) 45%),
		linear-gradient(120deg, var(--fv-green-dark) 0%, var(--fv-green) 100%);
	padding: 64px 0;
	color: #fff;
}
.fv-cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
}
.fv-cta-text { flex: 1 1 480px; }
.fv-home .fv-cta h3 {
	font-family: 'Raleway', sans-serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
	margin: 0 0 8px;
}
.fv-cta p { font-size: 16px; color: rgba(255, 255, 255, .9); margin: 0; }
.fv-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Horarios ---------- */
.fv-hours {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.fv-hour { padding: 28px; }
.fv-hour .fv-icon { width: 60px; height: 60px; }
.fv-hour .fv-icon img { max-width: 36px; max-height: 36px; }
.fv-hour h4 {
	font-family: 'Raleway', sans-serif;
	font-size: 19px;
	font-weight: 700;
	margin: 0 0 14px;
}
.fv-hour dl {
	display: grid;
	grid-template-columns: 1fr auto;
	margin: 0;
	font-size: 15px;
}
.fv-hour dt, .fv-hour dd {
	padding: 8px 0;
	border-top: 1px solid var(--fv-line);
	margin: 0;
}
.fv-hour dt { font-weight: 400; color: var(--fv-text); }
.fv-hour dd { font-weight: 700; color: var(--fv-ink); text-align: right; }
.fv-hour dd.fv-closed { color: #9a9a9c; font-weight: 400; }

/* ---------- Certificaciones ---------- */
.fv-certs-wrap { padding: 80px 0 90px; }
.fv-certs {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 48px;
	align-items: center;
}
.fv-certs-text h3 {
	font-family: 'Raleway', sans-serif;
	font-size: 30px;
	font-weight: 700;
	margin: 0 0 14px;
}
.fv-certs-text p { font-size: 16px; line-height: 1.7; }
.fv-home .fv-certs-text blockquote {
	font-size: 15px;
	line-height: 1.7;
	color: var(--fv-text);
	background: var(--fv-bg-alt);
	border-left: 4px solid var(--fv-green);
	border-radius: 0 var(--fv-radius) var(--fv-radius) 0;
	padding: 18px 22px;
	margin: 20px 0 28px;
}
/* El texto viene de md_vars con el marcado J3 (.latest-news > .container > .section-header + .row):
   se neutraliza su maquetación y se reordena para que el enlace quede al final como botón. */
.fv-certs-text .latest-news { padding: 0; background: none; }
.fv-certs-text .latest-news > .container {
	width: auto;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.fv-certs-text .section-header { display: contents; }
.fv-certs-text .section-header::before,
.fv-certs-text .section-header::after { display: none !important; }
.fv-certs-text .latest-news .section-header h3 { order: 1; padding: 0; text-transform: none; letter-spacing: 0; background: none; color: var(--fv-ink); }
.fv-certs-text .section-header h3::before,
.fv-certs-text .section-header h3::after { display: none; }
.fv-certs-text .latest-news .row { order: 2; margin: 0; }
.fv-certs-text .latest-news .row > [class*="col-"] { padding: 0; float: none; }
.fv-certs-text .section-header a {
	order: 3;
	position: static;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 999px;
	background: var(--fv-green);
	color: #fff !important;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	box-shadow: 0 6px 16px rgba(66, 99, 21, .25);
	transition: background-color .2s, transform .2s;
}
.fv-certs-text .section-header a:hover { background: var(--fv-green-dark); transform: translateY(-2px); }
.fv-certs-text .section-header a i { order: 2; color: #fff; }

.fv-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.fv-badges li {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 22px;
	background: #fff;
	border: 1px solid var(--fv-line);
	border-radius: var(--fv-radius);
	box-shadow: var(--fv-shadow);
}
.fv-badges li::before {
	content: "\f00c";
	font-family: 'FontAwesome';
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--fv-green);
	color: #fff;
	font-size: 18px;
}
.fv-badges strong {
	font-family: 'Montserrat', sans-serif;
	font-size: 18px;
	color: var(--fv-ink);
	white-space: nowrap;
}
.fv-badges span { font-size: 14px; color: var(--fv-text); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.fv-sectors, .fv-hours { grid-template-columns: 1fr 1fr; }
	.fv-certs { grid-template-columns: 1fr; gap: 32px; }
	.fv-stats { grid-template-columns: repeat(2, 1fr); }
	.fv-stat:nth-child(3) { border-left: 0; }
	.fv-stat:nth-child(n+3) { border-top: 1px solid var(--fv-line); }
}
@media (max-width: 767px) {
	.page-banner.fv-hero { min-height: 0; padding: 48px 0 150px; }
	.page-banner.fv-hero .fv-eyebrow { font-size: 10px; letter-spacing: 1px; margin-bottom: 16px; }
	.page-banner.fv-hero h1 { font-size: 30px; letter-spacing: .5px; }
	.page-banner.fv-hero h2 { font-size: 18px; }
	.page-banner.fv-hero p { font-size: 14px; }
	.fv-hero-actions { margin-top: 22px; }
	.fv-hero-actions .fv-btn { min-height: 44px; padding: 0 22px; }
	.fv-stats-wrap { margin-top: -40px; }
	.fv-stat { padding: 20px 10px; }
	.fv-stat-num { font-size: 30px; }
	.fv-stat-label { font-size: 11px; }
	.fv-section { padding-top: 56px; }
	.fv-section-head h3, .fv-home .fv-cta h3, .fv-certs-text h3 { font-size: 24px; }
	.fv-sectors, .fv-hours { grid-template-columns: 1fr; }
	.fv-families-wrap { padding: 56px 0; margin-top: 40px; }
	.fv-families { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.fv-family-media { height: 100px; }
	.fv-family-body { padding: 34px 14px 16px; }
	.fv-family-icon { width: 50px; height: 50px; top: -25px; left: 14px; }
	.fv-family-icon img { width: 32px; height: 30px; }
	.fv-family-body h5 { font-size: 12px; }
	.fv-family-body p { display: none; }
	.fv-cta-actions, .fv-cta-actions .fv-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.fv-home *, .fv-families * { transition: none !important; }
}
