:root {
	--robmat-primary: #2c3e50;
	--robmat-secondary: #a8aeb2;
	--robmat-accent: #25d366;
	--robmat-light: #f5f7f8;
	--robmat-white: #ffffff;
	--robmat-dark: #1a252f;
	--robmat-radius: 10px;
	--robmat-shadow: 0 10px 28px rgba(44, 62, 80, 0.14);
	--robmat-max: 1200px;
}

/* Header */
.site-logo-img,
.site-branding {
	overflow: visible;
}

.site-logo-img img,
.custom-logo-link img,
.header-widget-area .wp-block-image img {
	max-height: 58px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ast-primary-header-bar .site-branding {
	padding: 0.5rem 0;
}

.ast-site-title-wrap,
.site-header .site-title {
	display: none !important;
}

.ast-builder-menu-1 .menu-item > .menu-link,
.ast-builder-menu-mobile .menu-item > .menu-link,
.main-header-menu > .menu-item > .menu-link {
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #5a6570 !important;
	transition: color 0.2s ease, background-color 0.2s ease;
	position: relative;
}

.ast-builder-menu-1 .menu-item > .menu-link:hover,
.ast-builder-menu-1 .menu-item > .menu-link:focus,
.ast-builder-menu-mobile .menu-item > .menu-link:hover,
.ast-builder-menu-mobile .menu-item > .menu-link:focus,
.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .menu-item > .menu-link:focus {
	color: var(--robmat-primary) !important;
}

.ast-builder-menu-1 .menu-item.current-menu-item > .menu-link,
.ast-builder-menu-1 .menu-item.current-menu-ancestor > .menu-link,
.ast-builder-menu-mobile .menu-item.current-menu-item > .menu-link,
.ast-builder-menu-mobile .menu-item.current-menu-ancestor > .menu-link,
.main-header-menu > .menu-item.current-menu-item > .menu-link,
.main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
	color: var(--robmat-primary) !important;
	font-weight: 700;
}

/* Subrayado verde en ítem activo y hover (desktop) */
@media (min-width: 922px) {
	.ast-builder-menu-1 .menu-item > .menu-link::after,
	.main-header-menu > .menu-item > .menu-link::after {
		content: "";
		position: absolute;
		left: 0.65rem;
		right: 0.65rem;
		bottom: 0.15rem;
		height: 2px;
		border-radius: 2px;
		background: var(--robmat-accent);
		opacity: 0;
		transform: scaleX(0.6);
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	.ast-builder-menu-1 .menu-item > .menu-link:hover::after,
	.ast-builder-menu-1 .menu-item > .menu-link:focus::after,
	.ast-builder-menu-1 .menu-item.current-menu-item > .menu-link::after,
	.ast-builder-menu-1 .menu-item.current-menu-ancestor > .menu-link::after,
	.main-header-menu > .menu-item > .menu-link:hover::after,
	.main-header-menu > .menu-item > .menu-link:focus::after,
	.main-header-menu > .menu-item.current-menu-item > .menu-link::after,
	.main-header-menu > .menu-item.current-menu-ancestor > .menu-link::after {
		opacity: 1;
		transform: scaleX(1);
	}
}

.ast-primary-header-bar {
	box-shadow: 0 1px 0 rgba(44, 62, 80, 0.08);
}

.site-logo-img img,
.custom-logo-link img {
	image-rendering: auto;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

/* Layout */
.robmat-section {
	padding: clamp(2.5rem, 5vw, 4.5rem) 1.25rem;
}

.robmat-section--light {
	background: var(--robmat-light);
}

.robmat-section__inner,
.robmat-hero .wp-block-group__inner-container {
	max-width: var(--robmat-max);
	margin: 0 auto;
}

.robmat-section__title {
	color: var(--robmat-primary);
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin-bottom: 0.5rem;
	position: relative;
	padding-bottom: 0.65rem;
}

.robmat-section__title::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 3px;
	margin: 0.65rem auto 0;
	background: linear-gradient(90deg, var(--robmat-primary), var(--robmat-accent));
	border-radius: 999px;
}

.robmat-section__title:not(.has-text-align-center)::after {
	margin-left: 0;
}

.robmat-section__subtitle {
	color: #5a6570;
	max-width: 42rem;
	margin-bottom: 2rem;
}

/* Hero — split panel (grid en desktop, stack en móvil) */
.robmat-hero-split {
	padding: 0 !important;
	margin-top: 0;
	width: 100%;
	max-width: none !important;
}

.entry-content > .wp-block-group.alignfull.robmat-hero-split,
.entry-content[data-ast-blocks-layout] > .wp-block-group.alignfull.robmat-hero-split {
	padding: 0 !important;
}

.robmat-hero-split__cols {
	margin: 0 !important;
	gap: 0 !important;
	width: 100%;
}

.robmat-hero-split__cols > .wp-block-column {
	margin: 0 !important;
	min-width: 0 !important;
}

/* Desktop — Astra breakpoint 922px+ */
@media (min-width: 922px) {
	.robmat-hero-split__cols {
		display: grid !important;
		grid-template-columns: 46% 54%;
		align-items: stretch !important;
		min-height: clamp(480px, 68vh, 680px);
		flex-wrap: nowrap !important;
	}

	.robmat-hero-split__cols > .wp-block-column {
		width: 100% !important;
		max-width: none !important;
		flex: none !important;
		align-self: stretch !important;
		min-height: clamp(480px, 68vh, 680px);
	}

	.robmat-hero-split__content {
		background: linear-gradient(145deg, var(--robmat-dark) 0%, var(--robmat-primary) 100%);
		padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 5vw, 4rem) !important;
		display: flex;
		align-items: center;
	}

	.robmat-hero-split__media {
		position: relative;
		padding: 0 !important;
		overflow: hidden;
	}

	.robmat-hero-split__photo {
		position: absolute;
		inset: 0;
		margin: 0 !important;
		width: 100%;
		height: 100%;
		max-width: none;
	}

	.robmat-hero-split__photo img {
		width: 100%;
		height: 100%;
		min-height: 100%;
		object-fit: cover;
		object-position: 55% center;
		display: block;
	}
}

/* Tablet / móvil — stack vertical */
@media (max-width: 921.98px) {
	.robmat-hero-split__cols {
		display: flex !important;
		flex-direction: column !important;
		min-height: auto;
	}

	.robmat-hero-split__cols > .wp-block-column {
		width: 100% !important;
		max-width: 100% !important;
		flex: 1 1 auto !important;
		min-height: auto;
	}

	.robmat-hero-split__media {
		order: -1;
		height: clamp(220px, 38vh, 360px);
		overflow: hidden;
	}

	.robmat-hero-split__photo {
		margin: 0 !important;
		height: 100%;
		width: 100%;
	}

	.robmat-hero-split__photo img {
		width: 100%;
		height: clamp(220px, 38vh, 360px);
		object-fit: cover;
		object-position: center 30%;
		display: block;
	}

	.robmat-hero-split__content {
		background: linear-gradient(145deg, var(--robmat-dark) 0%, var(--robmat-primary) 100%);
		padding: 2rem 1.25rem !important;
	}
}

.robmat-hero__content {
	max-width: 34rem;
}

.robmat-hero__logo img {
	filter: brightness(0) invert(1);
	opacity: 0.98;
	transform: translateZ(0);
}

.robmat-hero-split .robmat-btn-primary .wp-block-button__link {
	background: #fff !important;
	color: var(--robmat-primary) !important;
}

.robmat-hero-split .robmat-btn-primary .wp-block-button__link:hover {
	background: var(--robmat-light) !important;
	color: var(--robmat-dark) !important;
}

.robmat-hero-split .robmat-btn-outline .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.85) !important;
	color: #fff !important;
}

.robmat-hero__tagline,
.robmat-hero-split .robmat-hero__tagline {
	font-size: clamp(1rem, 1.6vw, 1.28rem) !important;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.96) !important;
	max-width: 100%;
	line-height: 1.45;
	margin-bottom: 1.75rem !important;
	text-shadow: none;
	background: transparent;
	padding: 0;
	border: 0;
	border-radius: 0;
	backdrop-filter: none;
}

.robmat-hero__logo {
	max-width: min(260px, 70vw);
	width: 100%;
	height: auto;
	margin-bottom: 1.25rem;
}

/* Buttons */
.robmat-cta-buttons,
.robmat-hero .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.robmat-btn,
.robmat-hero-split .wp-block-button__link,
.robmat-hero .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.35rem;
	border-radius: var(--robmat-radius);
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	border: 2px solid transparent;
}

.robmat-btn:hover,
.robmat-hero-split .wp-block-button__link:hover,
.robmat-hero .wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: var(--robmat-shadow);
}

.robmat-btn--primary,
.robmat-hero .robmat-btn-primary .wp-block-button__link {
	background: var(--robmat-primary) !important;
	color: #fff !important;
}

.robmat-btn--whatsapp,
.robmat-hero .robmat-btn-whatsapp .wp-block-button__link {
	background: var(--robmat-accent) !important;
	color: #fff !important;
}

.robmat-btn--outline,
.robmat-hero .robmat-btn-outline .wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	border-color: #fff !important;
}

/* Service grid */
.robmat-services-grid .wp-block-columns {
	gap: 1.25rem;
}

.robmat-service-card {
	background: var(--robmat-white);
	border: 1px solid #e4e8eb;
	border-radius: var(--robmat-radius);
	padding: 1.65rem;
	height: 100%;
	box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
	transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
	border-top: 3px solid var(--robmat-primary);
}

.robmat-service-card:hover {
	box-shadow: var(--robmat-shadow);
	transform: translateY(-2px);
}

.robmat-service-card h3 {
	color: var(--robmat-primary);
	font-size: 1.1rem;
	margin: 0 0 0.5rem;
}

.robmat-service-card p {
	color: #5a6570;
	font-size: 0.95rem;
	margin: 0 0 1rem;
	line-height: 1.5;
}

.robmat-service-card a {
	color: var(--robmat-primary);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

.robmat-service-card a:hover {
	text-decoration: underline;
	color: var(--robmat-accent);
}

/* Trust points */
.robmat-trust-grid .wp-block-column {
	background: var(--robmat-white);
	border-radius: var(--robmat-radius);
	padding: 1.5rem;
	border-left: 4px solid var(--robmat-primary);
}

.robmat-trust-grid h3 {
	color: var(--robmat-primary);
	font-size: 1.05rem;
	margin: 0 0 0.5rem;
}

/* Process steps */
.robmat-process-step {
	text-align: center;
	padding: 1rem;
}

.robmat-process-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--robmat-primary);
	color: #fff;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

/* CTA band */
.robmat-cta-band {
	background: var(--robmat-primary);
	color: #fff;
	text-align: center;
	padding: clamp(2.5rem, 5vw, 3.5rem) 1.25rem;
}

.robmat-cta-band h2 {
	color: #fff;
	margin-bottom: 0.75rem;
}

.robmat-cta-band p {
	color: rgba(255, 255, 255, 0.9);
	max-width: 36rem;
	margin: 0 auto 1.5rem;
}

@media (min-width: 922px) {
	.robmat-cta-band p {
		white-space: nowrap;
		max-width: none;
		letter-spacing: -0.01em;
	}
}

/* Footer NAP */
.robmat-nap {
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--robmat-primary);
}

.robmat-nap strong {
	display: block;
	font-size: 1.05rem;
	margin-bottom: 0.25rem;
}

/* FAQ */
.robmat-faq details {
	border: 1px solid #e4e8eb;
	border-radius: var(--robmat-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 0.75rem;
	background: var(--robmat-white);
}

.robmat-faq summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--robmat-primary);
}

.robmat-faq p {
	margin: 0.75rem 0 0;
	color: #5a6570;
	line-height: 1.6;
}

/* Projects gallery */
.robmat-proyectos-page h1 {
	margin-bottom: 0.75rem;
}

.robmat-proyectos-gallery,
.robmat-proyectos-featured,
.robmat-servicios-gallery {
	margin: 2rem 0 0;
}

.robmat-proyectos-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
}

.robmat-proyectos-filters__btn {
	appearance: none;
	border: 1px solid #d8dee3;
	background: var(--robmat-white);
	color: var(--robmat-primary);
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.robmat-proyectos-filters__btn:hover,
.robmat-proyectos-filters__btn.is-active {
	background: var(--robmat-primary);
	border-color: var(--robmat-primary);
	color: #fff;
}

.robmat-proyectos-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.robmat-proyectos-grid__item {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	border-radius: var(--robmat-radius);
	overflow: hidden;
}

.robmat-proyectos-grid__item.is-hidden {
	display: none;
}

.robmat-proyectos-grid__thumb {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #eef1f3;
	border: 1px solid #e4e8eb;
	border-radius: var(--robmat-radius);
}

.robmat-proyectos-grid__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.robmat-proyectos-grid__item:hover .robmat-proyectos-grid__thumb img,
.robmat-proyectos-grid__item:focus-visible .robmat-proyectos-grid__thumb img {
	transform: scale(1.04);
}

.robmat-proyectos-grid__item:focus-visible {
	outline: 2px solid var(--robmat-primary);
	outline-offset: 2px;
}

.robmat-proyectos-grid--featured .robmat-proyectos-grid__item:first-child .robmat-proyectos-grid__thumb {
	aspect-ratio: auto;
	min-height: 100%;
}

@media (min-width: 600px) {
	.robmat-proyectos-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 922px) {
	.robmat-proyectos-gallery .robmat-proyectos-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1rem;
	}

	.robmat-proyectos-grid--featured {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows: minmax(160px, 1fr);
	}

	.robmat-proyectos-grid--featured .robmat-proyectos-grid__item:first-child {
		grid-column: span 2;
		grid-row: span 2;
	}
}

.robmat-proyectos-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 23, 32, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem 1rem 1.5rem;
}

.robmat-proyectos-lightbox[hidden] {
	display: none !important;
}

.robmat-proyectos-lightbox__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.5rem, 2vw, 1rem);
	width: min(1200px, 100%);
	margin: 0 auto;
}

.robmat-proyectos-lightbox__figure {
	margin: 0;
	flex: 1;
	min-width: 0;
	max-height: calc(100vh - 6rem);
	text-align: center;
}

.robmat-proyectos-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 8rem);
	width: auto;
	height: auto;
	margin: 0 auto;
	border-radius: var(--robmat-radius);
}

.robmat-proyectos-lightbox__caption {
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.95rem;
	margin-top: 0.75rem;
	line-height: 1.5;
}

.robmat-proyectos-lightbox__close,
.robmat-proyectos-lightbox__nav {
	appearance: none;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.robmat-proyectos-lightbox__close span,
.robmat-proyectos-lightbox__nav span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	line-height: 1;
}

.robmat-proyectos-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.75rem;
}

.robmat-proyectos-lightbox__nav {
	width: 2.75rem;
	height: 2.75rem;
	font-size: 2rem;
}

.robmat-proyectos-lightbox__nav--prev span {
	padding-right: 0.12em;
}

.robmat-proyectos-lightbox__nav--next span {
	padding-left: 0.12em;
}

.robmat-proyectos-lightbox__close:hover,
.robmat-proyectos-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 599px) {
	.robmat-proyectos-lightbox {
		padding: 3.5rem 0.5rem 1rem;
	}

	.robmat-proyectos-lightbox__stage {
		gap: 0.35rem;
	}

	.robmat-proyectos-lightbox__nav {
		width: 2.35rem;
		height: 2.35rem;
		font-size: 1.65rem;
	}

	.robmat-proyectos-lightbox__close {
		width: 2.35rem;
		height: 2.35rem;
		font-size: 1.5rem;
	}
}

body.robmat-lightbox-open {
	overflow: hidden;
}

/* Projects placeholder */
.robmat-projects-note {
	background: #fff8e6;
	border: 1px solid #f0d78c;
	border-radius: var(--robmat-radius);
	padding: 1rem 1.25rem;
	color: #6b5a1e;
	font-size: 0.95rem;
}

/* WhatsApp FAB */
.robmat-whatsapp-fab {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 9999;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: var(--robmat-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
	transition: transform 0.15s ease;
}

.robmat-whatsapp-fab:hover {
	transform: scale(1.06);
	color: #fff;
}

/* Contact page */
.robmat-contact-page h1 {
	color: var(--robmat-primary);
	margin-bottom: 0.5rem;
}

.robmat-contact-columns {
	gap: 1.75rem;
	align-items: stretch;
}

.robmat-contact-info {
	background: var(--robmat-light);
	border-radius: var(--robmat-radius);
	padding: 1.5rem;
	height: 100%;
	border: 1px solid #e4e8eb;
}

.robmat-contact-form-wrap {
	background: var(--robmat-white);
	border: 1px solid #e4e8eb;
	border-radius: var(--robmat-radius);
	padding: 1.5rem;
	box-shadow: 0 2px 10px rgba(44, 62, 80, 0.06);
}

.robmat-contact-form-wrap .wpforms-container {
	margin-top: 0.5rem;
}

.robmat-contact-form-wrap .wpforms-field-label {
	color: var(--robmat-primary);
	font-weight: 600;
}

.robmat-contact-form-wrap .wpforms-submit-container {
	margin-top: 0.5rem;
}

.robmat-contact-form-wrap button[type="submit"],
.robmat-contact-form-wrap .wpforms-submit {
	background: var(--robmat-primary) !important;
	border-color: var(--robmat-primary) !important;
	border-radius: var(--robmat-radius) !important;
	padding: 0.85rem 1.5rem !important;
	font-weight: 600;
}

.robmat-contact-form-wrap button[type="submit"]:hover,
.robmat-contact-form-wrap .wpforms-submit:hover {
	background: #1a252f !important;
	border-color: #1a252f !important;
}

/* Inner pages */
.entry-content > .wp-block-group.alignfull.robmat-section:first-child,
.entry-content > .wp-block-group.alignfull.robmat-hero-split:first-child {
	margin-top: 0;
}

.entry-content .wp-block-heading:not(.robmat-section__title) {
	color: var(--robmat-primary);
}

/* Footer */
.site-below-footer-wrap {
	background: var(--robmat-light) !important;
}

.ast-footer-copyright p {
	color: #5a6570;
	font-size: 0.92rem;
}

@media (max-width: 921px) {
	.robmat-contact-columns {
		flex-direction: column;
	}
}

@media (max-width: 782px) {
	.robmat-services-grid .wp-block-columns {
		flex-direction: column;
	}

	.robmat-hero__logo {
		max-width: 220px;
	}
}
