:root {
	--rgts-theme-blue: #082d61;
	--rgts-theme-blue-deep: #031b3b;
	--rgts-theme-green: #0b9b4b;
	--rgts-theme-text: #172b3e;
	--rgts-theme-muted: #68788a;
	--rgts-theme-line: #e2e9ef;
	--rgts-theme-surface: #f5f8fa;
	--rgts-theme-container: 1180px;
	--rgts-theme-gutter: clamp(20px, 4vw, 56px);
}

html {
	box-sizing: border-box;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	min-width: 320px;
	color: var(--rgts-theme-text);
	background: #fff;
	font-family: "Inter", Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.admin-bar {
	--rgts-admin-bar-offset: 32px;
}

img,
picture,
video,
canvas,
svg {
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--rgts-theme-blue);
}

a:hover {
	color: var(--rgts-theme-green);
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
[type="button"],
[type="submit"] {
	-webkit-appearance: none;
}

.rgts-theme-site,
.rgts-theme-main,
.rgts-theme-content,
.site-content {
	width: 100%;
	min-width: 0;
	max-width: none;
}

.rgts-theme-site {
	min-height: 100vh;
	min-height: 100dvh;
	overflow: clip;
}

.rgts-theme-main {
	display: block;
	min-height: 1px;
}

.rgts-theme-main--front,
.rgts-theme-main--elementor,
.rgts-theme-main--full-width,
body.elementor-page .rgts-theme-main {
	padding: 0;
}

.rgts-theme-container {
	width: min(calc(100% - (var(--rgts-theme-gutter) * 2)), var(--rgts-theme-container));
	margin-inline: auto;
}

.rgts-theme-main--singular,
.rgts-theme-main--listing,
.rgts-theme-error {
	padding-block: clamp(54px, 8vw, 108px);
}

.rgts-theme-article {
	width: 100%;
}

.rgts-theme-entry-header {
	margin-bottom: 36px;
}

.rgts-theme-entry-header h1,
.rgts-theme-listing-header h1,
.rgts-theme-error h1 {
	margin: 0;
	color: var(--rgts-theme-blue-deep);
	font-size: clamp(34px, 5vw, 64px);
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.rgts-theme-entry-meta,
.rgts-theme-post-card__meta {
	color: var(--rgts-theme-muted);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rgts-theme-entry-media {
	margin: 0 0 36px;
}

.rgts-theme-entry-media img {
	display: block;
	width: 100%;
	border-radius: 10px;
}

.rgts-theme-entry-content > :first-child {
	margin-top: 0;
}

.rgts-theme-entry-content > :last-child {
	margin-bottom: 0;
}

.rgts-theme-entry-content h2,
.rgts-theme-entry-content h3 {
	color: var(--rgts-theme-blue-deep);
	line-height: 1.2;
}

.rgts-theme-listing-header {
	margin-bottom: 42px;
}

.rgts-theme-archive-description {
	max-width: 720px;
	color: var(--rgts-theme-muted);
}

.rgts-theme-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.rgts-theme-post-card {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--rgts-theme-line);
	border-radius: 10px;
	box-shadow: 0 16px 38px rgba(7, 38, 73, 0.06);
}

.rgts-theme-post-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.rgts-theme-post-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.rgts-theme-post-card:hover .rgts-theme-post-card__media img {
	transform: scale(1.035);
}

.rgts-theme-post-card__body {
	padding: 25px;
}

.rgts-theme-post-card__body h2 {
	margin: 8px 0 14px;
	font-size: 23px;
	line-height: 1.22;
}

.rgts-theme-post-card__body h2 a {
	color: var(--rgts-theme-blue-deep);
	text-decoration: none;
}

.rgts-theme-empty-state {
	padding: 42px;
	background: var(--rgts-theme-surface);
	border: 1px solid var(--rgts-theme-line);
	border-radius: 10px;
}

.rgts-theme-error {
	max-width: 760px;
	text-align: center;
}

.rgts-theme-error__code {
	margin: 0;
	color: var(--rgts-theme-green);
	font-size: clamp(80px, 18vw, 190px);
	font-weight: 800;
	line-height: 0.9;
}

.rgts-theme-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: 20px;
	padding: 12px 22px;
	color: #fff;
	background: var(--rgts-theme-green);
	border-radius: 6px;
	text-decoration: none;
	font-weight: 700;
}

/* Header de contingencia: solamente se muestra cuando RG Tecnoservice Core
   no está disponible o su header está desactivado. */
.rgts-theme-fallback-header {
	position: relative;
	z-index: 9990;
	width: 100%;
	background: #fff;
	border-bottom: 1px solid var(--rgts-theme-line);
	box-shadow: 0 8px 30px rgba(8, 37, 72, 0.05);
}

.rgts-theme-fallback-header__inner {
	display: flex;
	align-items: center;
	width: min(calc(100% - 40px), 1420px);
	min-height: 84px;
	margin: 0 auto;
}

.rgts-theme-fallback-header__brand {
	display: flex;
	align-items: center;
	max-width: 320px;
	color: var(--rgts-theme-blue);
	text-decoration: none;
	font-size: 22px;
	font-weight: 800;
}

.rgts-theme-fallback-header__brand .custom-logo-link {
	display: flex;
}

.rgts-theme-fallback-header__brand img {
	display: block;
	width: auto;
	max-height: 60px;
}

.rgts-theme-fallback-nav {
	margin-left: auto;
}

.rgts-theme-fallback-nav__list {
	display: flex;
	align-items: center;
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rgts-theme-fallback-nav__list a {
	color: var(--rgts-theme-text);
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.rgts-theme-fallback-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	width: 46px;
	height: 46px;
	margin-left: auto;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.rgts-theme-fallback-header__toggle span {
	display: block;
	width: 25px;
	height: 2px;
	background: var(--rgts-theme-blue-deep);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.rgts-theme-fallback-header__toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.rgts-theme-fallback-header__toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.rgts-theme-fallback-header__toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.rgts-theme-footer {
	padding: 18px var(--rgts-theme-gutter);
	color: rgba(255, 255, 255, 0.76);
	background: var(--rgts-theme-blue-deep);
	font-size: 13px;
}

.rgts-theme-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: min(100%, 1420px);
	margin: 0 auto;
}

.rgts-theme-footer p {
	margin: 0;
}

.rgts-theme-footer__menu {
	display: flex;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rgts-theme-footer a {
	color: #fff;
	text-decoration: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus,
.rgts-theme-skip-link:focus {
	z-index: 100000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	color: #fff;
	background: var(--rgts-theme-blue-deep);
	border-radius: 4px;
}

:focus-visible {
	outline: 2px solid var(--rgts-theme-green);
	outline-offset: 3px;
}

@media (max-width: 960px) {
	.rgts-theme-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rgts-theme-fallback-header__toggle {
		display: flex;
	}

	.rgts-theme-fallback-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		padding: 12px 20px 20px;
		background: #fff;
		border-top: 1px solid var(--rgts-theme-line);
		box-shadow: 0 18px 32px rgba(4, 27, 59, 0.12);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: 0.2s ease;
	}

	.rgts-theme-fallback-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.rgts-theme-fallback-nav__list {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
		width: min(100%, 720px);
		margin: 0 auto;
	}

	.rgts-theme-fallback-nav__list a {
		display: flex;
		align-items: center;
		min-height: 48px;
		border-bottom: 1px solid var(--rgts-theme-line);
	}
}

@media (max-width: 767px) {
	body.admin-bar {
		--rgts-admin-bar-offset: 46px;
	}

	.rgts-theme-post-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.rgts-theme-fallback-header__inner {
		min-height: 72px;
	}

	.rgts-theme-fallback-header__brand img {
		max-width: 250px;
		max-height: 50px;
	}

	.rgts-theme-footer__inner {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}


/* Native theme typography outside Elementor-built RG sections. */
.rgts-theme-entry-header h1,
.rgts-theme-listing-header h1,
.rgts-theme-error h1,
.rgts-theme-post-card__body h2,
.rgts-theme-fallback-header,
.rgts-theme-button {
	font-family: "Kumbh Sans", Arial, Helvetica, sans-serif;
}

body.rgts-native-theme {
	background: #faf9f7;
}
