/* ==========================================================
   Romecor Gestiones — capa visual sobre MediaGlobal Theme
   ========================================================== */

/* ---------- Tipografías autoalojadas ---------- */
@font-face {
	font-family: 'Manrope';
	src: url('../fonts/manrope-latin-700-normal.woff2') format('woff2');
	font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Manrope';
	src: url('../fonts/manrope-latin-800-normal.woff2') format('woff2');
	font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
	font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
	font-weight: 600; font-style: normal; font-display: swap;
}

:root {
	--rc-font-head: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--rc-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--rc-shadow: 0 18px 44px rgba(15, 36, 56, .10);
	--rc-shadow-lg: 0 26px 60px rgba(15, 36, 56, .16);
}

/* El tema imprime --font-base/--font-headings en línea (después de esta hoja),
   así que subimos especificidad con html:root para que ganen nuestras fuentes. */
html:root {
	--font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-headings: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html body { font-family: var(--rc-font-body); letter-spacing: -.005em; }
html body h1, html body h2, html body h3, html body h4,
.rc-card-title, .site-branding a, .btn {
	font-family: var(--rc-font-head);
	letter-spacing: -.022em;
}
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }

/* ---------- Cabecera (blanca: el logo lleva fondo claro y aligera la web) ----------
   El tema imprime su CSS en línea DESPUÉS de esta hoja, así que subimos
   especificidad con html body para que estas reglas ganen. */
html body .site-header {
	background: rgba(255, 255, 255, .94);
	backdrop-filter: saturate(150%) blur(12px);
	-webkit-backdrop-filter: saturate(150%) blur(12px);
	transition: padding .3s ease, box-shadow .3s ease, background .3s ease;
	border-bottom: 1px solid var(--color-border);
	padding: 12px 0;
}
html body .site-header.rc-scrolled {
	padding: 7px 0;
	box-shadow: 0 8px 28px rgba(11, 62, 99, .12);
	background: rgba(255, 255, 255, .98);
}
html body .site-branding a { font-size: 1.25rem; letter-spacing: -.03em; color: var(--color-headings); }
html body .site-branding img { max-height: 56px; width: auto; transition: max-height .3s ease; }
html body .site-header.rc-scrolled .site-branding img { max-height: 44px; }
html body .site-nav a { position: relative; font-size: .95rem; color: #24405A; }
html body .site-nav a:hover { color: var(--color-primary); }
.site-nav > div > ul > li > a::after {
	content: ""; position: absolute; left: 0; bottom: -6px;
	width: 100%; height: 2px; background: var(--color-primary);
	transform: scaleX(0); transform-origin: right; transition: transform .32s cubic-bezier(.2,.7,.3,1);
}
.site-nav > div > ul > li:hover > a::after { transform: scaleX(1); transform-origin: left; }
.header-cta { box-shadow: 0 8px 22px rgba(11, 111, 176, .35); }

/* ---------- Hero ---------- */
.hero {
	min-height: 78vh;
	display: flex;
	align-items: center;
	padding: 120px 0;
	position: relative;
	overflow: hidden;
}
.hero--image { background-attachment: scroll; }
html body .hero--image::before {
	background: linear-gradient(105deg, rgba(9, 52, 84, .90) 0%, rgba(11, 62, 99, .74) 48%, rgba(0, 111, 160, .52) 100%);
}
.hero .container { max-width: 900px; margin-right: auto; margin-left: auto; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); line-height: 1.06; margin-bottom: .35em; }
.hero .hero-subtitle { font-size: clamp(1.02rem, 1.7vw, 1.24rem); line-height: 1.6; max-width: 680px; }
/* Sobre el velo azul oscuro, el amarillo del logo es lo que mejor destaca
   (el azul corporativo sobre azul no tendría contraste suficiente). */
html body .hero .hero-accent { color: var(--color-accent); }
html body .hero .btn {
	background: var(--color-accent);
	color: #0B3E63;
	box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}
html body .hero .btn:hover { background: #fff; color: var(--color-primary); }

/* Heros internos algo más compactos que la portada */
body:not(.home) .hero { min-height: 56vh; padding: 104px 0; }

/* ---------- Tarjetas con imagen ---------- */
.rc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: 26px;
	margin-top: 46px;
}
.rc-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: var(--rc-shadow);
	transition: transform .42s cubic-bezier(.2,.7,.3,1), box-shadow .42s ease;
}
.rc-card:hover { transform: translateY(-7px); box-shadow: var(--rc-shadow-lg); text-decoration: none; }
.rc-card-media { display: block; overflow: hidden; background: var(--color-surface); }
.rc-card-media img {
	display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2;
	object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.3,1);
}
.rc-card:hover .rc-card-media img { transform: scale(1.06); }
.rc-card-body { display: flex; flex-direction: column; gap: 9px; padding: 24px 24px 26px; flex: 1; }
.rc-card-title { display: block; font-size: 1.1rem; font-weight: 700; color: var(--color-headings); line-height: 1.25; }
.rc-card-text { display: block; color: var(--color-muted); font-size: .94rem; line-height: 1.55; flex: 1; }
.rc-card-link { display: block; margin-top: 4px; color: var(--color-primary); font-weight: 600; font-size: .9rem; }
.rc-card-link::after { content: " →"; display: inline-block; transition: transform .32s ease; }
.rc-card:hover .rc-card-link::after { transform: translateX(5px); }

/* ---------- Títulos de sección ---------- */
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: .4em; }
.section-intro { font-size: 1.05rem; line-height: 1.65; margin-bottom: 0; }

/* ---------- Migas de pan ---------- */
.rc-breadcrumb { font-size: .85rem; color: var(--color-muted); margin: 0 0 26px; }
.rc-breadcrumb a { color: var(--color-muted); text-decoration: none; }
.rc-breadcrumb a:hover { color: var(--color-primary); text-decoration: underline; }
.rc-breadcrumb span[aria-hidden] { margin: 0 7px; opacity: .55; }

/* ---------- Contenido de páginas de servicio ---------- */
.rc-prose { max-width: 780px; margin: 0 auto; }
.rc-prose h2 {
	font-size: 1.45rem; margin-top: 2.2em; margin-bottom: .6em;
	padding-top: .9em; border-top: 1px solid var(--color-border);
}
.rc-prose h2:first-of-type { margin-top: 1.4em; }
.rc-prose p { line-height: 1.75; }
.rc-prose ul { padding-left: 0; list-style: none; }
.rc-prose ul li {
	position: relative; padding: 9px 0 9px 34px; color: var(--color-text);
	border-bottom: 1px dashed var(--color-border);
}
.rc-prose ul li:last-child { border-bottom: 0; }
.rc-prose ul li::before {
	content: ""; position: absolute; left: 4px; top: 17px;
	width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
}

/* ---------- Pasos ---------- */
.mg-step-item::before { box-shadow: 0 8px 20px rgba(11, 111, 176, .34); }
.mg-step-item h3 { font-size: 1.12rem; }

/* ---------- FAQ ---------- */
.mg-faq-item { box-shadow: 0 4px 16px rgba(15, 36, 56, .05); transition: box-shadow .3s ease; }
.mg-faq-item[open] { box-shadow: var(--rc-shadow); }
.mg-faq-item summary { font-family: var(--rc-font-head); }

/* ---------- Banda CTA ---------- */
html body .cta-band {
	background: linear-gradient(120deg, #00A0E1 0%, #0666A5 52%, #0B3E63 100%);
	box-shadow: var(--rc-shadow-lg);
	padding: 68px 32px;
}
html body .cta-band .btn { background: #fff; color: var(--color-primary); }
html body .cta-band .btn:hover { background: var(--color-accent); color: #0B3E63; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-band p { max-width: 620px; margin-left: auto; margin-right: auto; opacity: .92; }
.cta-band .btn:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }

/* ---------- Formulario ---------- */
.romecor-form input:focus, .romecor-form select:focus, .romecor-form textarea:focus {
	outline: none; border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(11, 111, 176, .14);
}
.romecor-form button[type=submit] { box-shadow: 0 12px 28px rgba(11, 111, 176, .32); }
.romecor-form button[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Pie ---------- */
.site-footer { padding: 64px 0 32px; }
.site-footer .menu a { color: rgba(255, 255, 255, .78); }
.site-footer .menu a:hover { color: #fff; }
.footer-columns { gap: 40px; }
.footer-widget-title { font-family: var(--rc-font-head); font-size: 1.05rem; margin-bottom: 14px; }
.footer-widget p { line-height: 1.7; font-size: .94rem; margin: 0 0 12px; }
.footer-widget ul { list-style: none; padding: 0; margin: 0; }
.footer-widget ul li { padding: 6px 0; font-size: .94rem; }
.footer-widget ul a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s ease; }
.footer-widget ul a:hover { color: var(--color-primary); text-decoration: none; }
.footer-widget .btn { margin-top: 6px; padding: 11px 24px; font-size: .92rem; }
.rc-footer-contact li span { color: rgba(255, 255, 255, .6); }

/* ---------- Menú móvil ---------- */
.rc-burger {
	display: none; background: transparent; border: 0; cursor: pointer;
	width: 44px; height: 44px; padding: 10px; z-index: 1002; position: relative;
}
.rc-burger span {
	display: block; height: 2px; width: 100%; background: var(--color-headings); border-radius: 2px;
	transition: transform .34s cubic-bezier(.2,.7,.3,1), opacity .22s ease;
}
.rc-burger span + span { margin-top: 5px; }
body.rc-menu-open .rc-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.rc-menu-open .rc-burger span:nth-child(2) { opacity: 0; }
body.rc-menu-open .rc-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.rc-burger { display: block; }
	.site-header .container { flex-direction: row; justify-content: space-between; gap: 12px; }
	html body .site-nav {
		position: fixed; inset: 0 0 0 auto; width: min(86vw, 340px);
		background: #fff; padding: 96px 28px 32px;
		transform: translateX(100%); transition: transform .42s cubic-bezier(.2,.7,.3,1);
		z-index: 1001; overflow-y: auto; box-shadow: -20px 0 60px rgba(11, 62, 99, .22);
	}
	html body.rc-menu-open .site-nav { transform: translateX(0); }
	.site-nav ul { flex-direction: column; align-items: flex-start; gap: 2px; }
	.site-nav ul li { width: 100%; }
	.site-nav ul li a {
		display: block; width: 100%; padding: 13px 0; font-size: 1.05rem;
		border-bottom: 1px solid var(--color-border);
	}
	.site-nav ul ul { padding-left: 14px; margin-top: 0; }
	.site-nav ul ul a { font-size: .95rem; color: #4A6076; }
	.header-extras { order: 2; }
	.header-cta { display: none; }
	.rc-menu-backdrop {
		position: fixed; inset: 0; background: rgba(15, 36, 56, .55);
		opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 1000;
		backdrop-filter: blur(2px);
	}
	body.rc-menu-open .rc-menu-backdrop { opacity: 1; pointer-events: auto; }
	body.rc-menu-open { overflow: hidden; }
	.hero { min-height: 68vh; padding: 88px 0; }
	body:not(.home) .hero { min-height: auto; padding: 76px 0; }
	.rc-cards { gap: 20px; }
	.cta-band { padding: 48px 24px; }
}

/* ---------- Submenú desplegable ---------- */
.site-nav ul { position: relative; }
.site-nav li { position: relative; }
.site-nav ul ul {
	display: none; position: absolute; top: 100%; left: 0; flex-direction: column;
	background: #fff; min-width: 250px; padding: 10px 0; margin-top: 14px;
	border-radius: 10px; box-shadow: 0 18px 44px rgba(11, 62, 99, .16); gap: 0;
	border: 1px solid var(--color-border);
}
.site-nav ul ul a:hover { background: var(--color-surface); }
.site-nav ul ul::before {
	content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
.site-nav ul ul li { width: 100%; }
.site-nav ul ul a { display: block; padding: 11px 22px; white-space: nowrap; font-size: .93rem; }
.site-nav ul ul a::after { display: none; }
.site-nav li:hover > ul, .site-nav li:focus-within > ul { display: flex; }

@media (max-width: 900px) {
	.site-nav ul ul { display: flex; position: static; box-shadow: none; border: 0; margin-top: 0; background: transparent; padding: 0; }
}

/* ---------- Estados iniciales de animación ---------- */
@media (prefers-reduced-motion: no-preference) {
	.rc-anim { opacity: 0; }

	/* El hero entra por CSS: no depende de JS y así nunca parpadea. */
	.hero h1,
	.hero .hero-subtitle,
	.hero .btn {
		animation: rcHeroIn .95s cubic-bezier(.2, .7, .3, 1) both;
	}
	.hero h1 { animation-delay: .10s; }
	.hero .hero-subtitle { animation-delay: .22s; }
	.hero .btn { animation-delay: .34s; }

	@keyframes rcHeroIn {
		from { opacity: 0; transform: translateY(30px); }
		to { opacity: 1; transform: none; }
	}
}

/* ---------- Aviso de cookies ---------- */
.romecor-cookies { font-size: .92rem; }
.romecor-cookies p { line-height: 1.55; }

/* ---------- Botón flotante de WhatsApp ---------- */
.mg-whatsapp { box-shadow: 0 10px 30px rgba(37, 211, 102, .42); }
