/* === Variables === */
:root {
	--navy:    #0f2044;
	--blue:    #1a4080;
	--gold:    #c8960c;
	--gold-lt: #e8b520;
	--gold-dk: #8a6508; /* AA-compliant on white: 4.8:1 */
	--light:   #f4f6fa;
	--white:   #ffffff;
	--gray:    #4b5675;  /* darkened for AA contrast on white */
	--gray-lt: #e2e8f0;
	--text:    #1e293b;

	--radius:  8px;
	--shadow:  0 4px 24px rgba(15,32,68,.10);
	--transition: .2s ease;

	--font-head: 'Poppins', system-ui, -apple-system, sans-serif;
	--font-body: 'Open Sans', system-ui, -apple-system, sans-serif;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--text);
	background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
ul { list-style: none; }
address { font-style: normal; }

/* === Focus states (accessibility) === */
:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
	border-radius: 3px;
}
/* Remove outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) { outline: none; }

/* === Layout === */
.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* === Buttons === */
.btn {
	display: inline-block;
	padding: .75rem 1.75rem;
	border-radius: var(--radius);
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .95rem;
	cursor: pointer;
	transition: all var(--transition);
	border: 2px solid transparent;
}
.btn-primary {
	background: var(--gold);
	color: var(--navy);
	border-color: var(--gold);
}
.btn-primary:hover {
	background: var(--gold-lt);
	border-color: var(--gold-lt);
	color: var(--navy);
}
.btn-outline {
	background: transparent;
	color: var(--navy);
	border-color: var(--navy);
}
.btn-outline:hover {
	background: var(--navy);
	color: var(--white);
}

/* === Section helpers === */
/* On light/white backgrounds use --navy for AA contrast */
.section-label {
	display: inline-block;
	font-family: var(--font-head);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--navy);
	margin-bottom: .5rem;
}
/* On dark backgrounds switch to gold */
.hero .section-label,
.section-cta .section-label,
.site-footer .section-label {
	color: var(--gold);
}

.section-header {
	text-align: center;
	margin-bottom: 3rem;
}
.section-header h2 {
	font-family: var(--font-head);
	font-size: 2rem;
	color: var(--navy);
}

/* === Header === */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--navy);
	box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100px;
	gap: 1rem;
}

.site-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
	flex-shrink: 0;
}
.site-logo img {
	display: block;
	height: 76px;
	width: auto;
	background: var(--white);
	padding: 12px 20px;
	border-radius: 12px;
	box-shadow: 0 6px 22px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.05);
}

.nav-list {
	display: flex;
	gap: 2rem;
}
.nav-list a {
	color: rgba(255,255,255,.85);
	font-family: var(--font-head);
	font-size: .9rem;
	font-weight: 500;
	padding: .3rem 0;
	border-bottom: 2px solid transparent;
	transition: all var(--transition);
}
.nav-list a:hover,
.nav-list .current-menu-item > a {
	color: var(--gold);
	border-bottom-color: var(--gold);
}

/* Hamburger button */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: .5rem;
	width: 40px;
	height: 40px;
}
.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--white);
	border-radius: 2px;
	transition: transform .25s ease, opacity .25s ease;
	transform-origin: center;
}
/* X state */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* === Hero === */
.hero {
	background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
	color: var(--white);
	padding: 6rem 0 5rem;
}
.hero-content { max-width: 680px; }
.hero-kicker {
	font-family: var(--font-head);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 1rem;
}
.hero h1 {
	font-family: var(--font-head);
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 800;
	line-height: 1.15;
	margin-bottom: 1.25rem;
	color: var(--white);
}
.hero-sub {
	font-size: 1.05rem;
	color: rgba(255,255,255,.85);
	margin-bottom: 2rem;
	max-width: 560px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .btn-outline {
	color: var(--white);
	border-color: rgba(255,255,255,.5);
}
.hero .btn-outline:hover {
	background: rgba(255,255,255,.1);
	border-color: var(--white);
	color: var(--white);
}

/* === Trust strip === */
.trust-strip {
	background: var(--white);
	border-bottom: 1px solid var(--gray-lt);
	padding: 1.25rem 0;
}
.trust-strip-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2rem 3rem;
}
.trust-item {
	display: flex;
	align-items: center;
	gap: .6rem;
	color: var(--navy);
}
.trust-item svg {
	flex-shrink: 0;
	color: var(--gold);
}
.trust-item strong {
	font-family: var(--font-head);
	font-size: .88rem;
	font-weight: 700;
	color: var(--navy);
}
.trust-item span {
	font-size: .78rem;
	color: var(--gray);
}
.trust-divider {
	width: 1px;
	height: 28px;
	background: var(--gray-lt);
}

/* === About === */
.section-about {
	padding: 5rem 0;
	background: var(--white);
}
.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
}
.about-text h2 {
	font-family: var(--font-head);
	font-size: 1.9rem;
	color: var(--navy);
	margin-bottom: 1rem;
	line-height: 1.3;
}
.about-text p { color: var(--gray); margin-bottom: 1rem; }
.about-text .btn { margin-top: .5rem; }

.about-stats {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.stat {
	background: var(--light);
	border-radius: var(--radius);
	padding: 1.5rem 2rem;
	border-left: 4px solid var(--gold);
	transition: transform var(--transition), box-shadow var(--transition);
}
.stat:hover {
	transform: translateX(4px);
	box-shadow: var(--shadow);
}
.stat-num {
	display: block;
	font-family: var(--font-head);
	font-size: 2.5rem;
	font-weight: 900;
	color: var(--navy);
	line-height: 1;
}
.stat-label {
	font-size: .85rem;
	color: var(--gray);
	font-weight: 500;
}

/* === Services (home preview) === */
.section-services {
	padding: 5rem 0;
	background: var(--light);
}
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1.5rem;
}
.service-card {
	background: var(--white);
	border-radius: var(--radius);
	padding: 2rem 1.5rem;
	box-shadow: var(--shadow);
	transition: transform var(--transition), box-shadow var(--transition);
	cursor: pointer;
	display: block;
	text-decoration: none;
	color: inherit;
	border: 2px solid transparent;
}
.service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 32px rgba(15,32,68,.14);
	border-color: var(--gold);
	color: inherit;
}
.service-icon {
	width: 48px;
	height: 48px;
	background: var(--light);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
	color: var(--navy);
	transition: background var(--transition), color var(--transition);
}
.service-card:hover .service-icon {
	background: var(--navy);
	color: var(--gold);
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
	font-family: var(--font-head);
	font-size: 1rem;
	color: var(--navy);
	margin-bottom: .5rem;
	font-weight: 600;
}
.service-card p { font-size: .9rem; color: var(--gray); }
.service-card-arrow {
	display: flex;
	align-items: center;
	gap: .3rem;
	margin-top: 1rem;
	font-size: .82rem;
	font-weight: 600;
	color: var(--gold-dk);
	font-family: var(--font-head);
}
.service-card-arrow svg { width: 14px; height: 14px; transition: transform var(--transition); }
.service-card:hover .service-card-arrow svg { transform: translateX(4px); }
.services-cta { text-align: center; margin-top: 2.5rem; }

/* === Testimonials === */
.section-testimonials {
	padding: 5rem 0;
	background: var(--navy);
}
.section-testimonials .section-header h2 { color: var(--white); }
.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}
.testimonial-card {
	background: rgba(255,255,255,.07);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: var(--radius);
	padding: 2rem;
}
.testimonial-stars {
	color: var(--gold);
	font-size: 1.1rem;
	letter-spacing: .1em;
	margin-bottom: 1rem;
}
.testimonial-quote {
	font-size: .97rem;
	color: rgba(255,255,255,.85);
	line-height: 1.7;
	margin-bottom: 1.5rem;
	font-style: italic;
}
.testimonial-author {
	display: flex;
	align-items: center;
	gap: .75rem;
}
.testimonial-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--gold);
	color: var(--navy);
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.testimonial-author-info strong {
	display: block;
	color: var(--white);
	font-size: .9rem;
	font-family: var(--font-head);
	font-weight: 600;
}
.testimonial-author-info span {
	font-size: .78rem;
	color: rgba(255,255,255,.55);
}

/* === CTA banner === */
.section-cta {
	padding: 5rem 0;
	background: linear-gradient(135deg, #0a1a38 0%, var(--navy) 100%);
	color: var(--white);
	text-align: center;
	position: relative;
	overflow: hidden;
}
.section-cta::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.section-cta .container { position: relative; }
.cta-badge {
	display: inline-block;
	background: rgba(200,150,12,.15);
	border: 1px solid var(--gold);
	color: var(--gold);
	font-family: var(--font-head);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: .35rem .9rem;
	border-radius: 20px;
	margin-bottom: 1.25rem;
}
.section-cta h2 {
	font-family: var(--font-head);
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	margin-bottom: .75rem;
}
.section-cta p {
	color: rgba(255,255,255,.75);
	margin-bottom: 2rem;
	font-size: 1.05rem;
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

/* === Page hero === */
.page-hero {
	background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
	color: var(--white);
	padding: 4rem 0 3rem;
}
.page-hero h1 {
	font-family: var(--font-head);
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin: .5rem 0 1rem;
}
.page-hero p { color: rgba(255,255,255,.8); max-width: 560px; }

/* === Page generic === */
.page-main { padding: 4rem 0; }
.page-title {
	font-family: var(--font-head);
	font-size: 2rem;
	color: var(--navy);
	margin-bottom: 1.5rem;
}
.entry-content h2 {
	font-family: var(--font-head);
	color: var(--navy);
	margin: 2rem 0 .75rem;
}
.entry-content p { color: var(--gray); margin-bottom: 1rem; }
.entry-content ul { padding-left: 1.5rem; list-style: disc; color: var(--gray); }
.entry-content li { margin-bottom: .4rem; }

/* === Services detail === */
.services-detail { padding: 4rem 0 5rem; }
.service-block {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
	padding: 2.5rem;
	border-radius: var(--radius);
	margin-bottom: 1.5rem;
	background: var(--white);
	box-shadow: var(--shadow);
	border-left: 4px solid var(--gold);
}
.service-block-icon {
	width: 56px;
	height: 56px;
	background: var(--light);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--navy);
	flex-shrink: 0;
}
.service-block-icon svg { width: 28px; height: 28px; }
.service-block-body h2 {
	font-family: var(--font-head);
	font-size: 1.3rem;
	color: var(--navy);
	margin-bottom: .5rem;
}
.service-block-body p,
.service-block-body li { color: var(--gray); font-size: .95rem; }
.service-block-body ul { padding-left: 1.25rem; list-style: disc; margin-top: .5rem; }
.service-block-body li { margin-bottom: .3rem; }

/* === Contact === */
.contact-section { padding: 4rem 0 5rem; background: var(--light); }
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
}
.contact-form-wrap h2,
.contact-info h2 {
	font-family: var(--font-head);
	font-size: 1.4rem;
	color: var(--navy);
	margin-bottom: 1.5rem;
}

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
	font-size: .88rem;
	font-weight: 600;
	color: var(--navy);
	font-family: var(--font-head);
}
.form-group input,
.form-group textarea {
	padding: .75rem 1rem;
	border: 1.5px solid var(--gray-lt);
	border-radius: var(--radius);
	font-size: .95rem;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--white);
	transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(26,64,128,.15);
}
.form-group textarea { resize: vertical; }

/* CF7 override */
.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-tel,
.wpcf7-form .wpcf7-textarea {
	width: 100%;
	padding: .75rem 1rem;
	border: 1.5px solid var(--gray-lt);
	border-radius: var(--radius);
	font-size: .95rem;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--white);
	transition: border-color var(--transition);
	margin-bottom: 1rem;
}
.wpcf7-form .wpcf7-text:focus,
.wpcf7-form .wpcf7-email:focus,
.wpcf7-form .wpcf7-textarea:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(26,64,128,.15);
}
.wpcf7-form .wpcf7-submit {
	display: inline-block;
	padding: .75rem 1.75rem;
	border-radius: var(--radius);
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .95rem;
	cursor: pointer;
	background: var(--gold);
	color: var(--navy);
	border: 2px solid var(--gold);
	transition: all var(--transition);
}
.wpcf7-form .wpcf7-submit:hover {
	background: var(--gold-lt);
}

.contact-item {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin-bottom: 1.5rem;
}
.contact-item-icon {
	width: 40px;
	height: 40px;
	background: var(--light);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--navy);
	flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; }
.contact-item strong {
	display: block;
	font-family: var(--font-head);
	font-size: .85rem;
	font-weight: 700;
	color: var(--navy);
	margin-bottom: .2rem;
}
.contact-item p, .contact-item a { color: var(--gray); font-size: .95rem; }
.contact-item a:hover { color: var(--gold-dk); }
.contact-map { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; }

/* === Footer === */
.site-footer {
	background: var(--navy);
	color: rgba(255,255,255,.75);
	padding: 4rem 0 0;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	gap: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { display: flex; flex-direction: column; gap: .75rem; }
.footer-brand img { opacity: .85; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.6); }

.footer-contact h3,
.footer-nav h3 {
	font-family: var(--font-head);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 1rem;
}
.footer-contact address p { font-size: .88rem; margin-bottom: .5rem; }
.footer-contact a, .footer-nav a { color: rgba(255,255,255,.7); font-size: .88rem; }
.footer-contact a:hover, .footer-nav a:hover { color: var(--gold); }
.footer-nav ul { display: flex; flex-direction: column; gap: .6rem; }

.footer-bottom {
	padding: 1.5rem 0;
	text-align: center;
	font-size: .8rem;
	color: rgba(255,255,255,.4);
}

/* Empresas del Grupo — banda en footer */
.group-companies {
	padding: 0 0 2.5rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid rgba(255,255,255,.1);
	text-align: center;
}
.group-companies .section-label {
	color: var(--gold);
	display: inline-block;
	margin-bottom: 1.5rem;
}
.group-companies-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	align-items: center;
	justify-items: center;
}
.group-company {
	background: var(--white);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	width: 100%;
	max-width: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0,0,0,.15);
	transition: transform var(--transition), box-shadow var(--transition);
}
.group-company:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.group-company img {
	max-height: 70px;
	width: auto;
	display: block;
}

/* Sección "Conozca al Grupo Serfico" en home */
.section-group {
	background: var(--light);
	padding: 5rem 0;
}
.section-group .section-header { text-align: center; margin-bottom: 2.5rem; }
.section-group .section-header p {
	max-width: 640px;
	margin: 1rem auto 0;
	color: var(--gray);
}
.group-companies-grid--featured {
	gap: 2rem;
	max-width: 980px;
	margin: 0 auto;
}
.section-group .group-company {
	padding: 1.75rem 2rem;
	max-width: 300px;
	box-shadow: var(--shadow);
}
.section-group .group-company img {
	max-height: 90px;
}

/* === Responsive === */
@media (max-width: 768px) {
	.nav-toggle { display: flex; }

	.site-nav {
		position: absolute;
		top: 100px;
		left: 0;
		right: 0;
		background: var(--navy);
		padding: 1.5rem;
		display: none;
		box-shadow: 0 8px 24px rgba(0,0,0,.3);
	}

	.site-header .container { height: 86px; }
	.site-logo img { height: 62px; padding: 10px 16px; }
	.site-nav { top: 86px; }
	.site-nav.is-open { display: block; }
	.nav-list { flex-direction: column; gap: .25rem; }
	.nav-list a {
		display: block;
		padding: .7rem 0;
		border-bottom: 1px solid rgba(255,255,255,.08);
	}

	.hero { padding: 3.5rem 0 3rem; }
	.hero-cta { flex-direction: column; }
	.hero-cta .btn { text-align: center; }

	.trust-strip-inner { gap: 1rem 2rem; }
	.trust-divider { display: none; }

	.about-grid,
	.contact-grid { grid-template-columns: 1fr; gap: 2rem; }

	.about-stats { flex-direction: row; flex-wrap: wrap; }
	.stat { flex: 1 1 140px; }

	.testimonials-grid { grid-template-columns: 1fr; }

	.footer-grid { grid-template-columns: 1fr; gap: 2rem; }

	.service-block { flex-direction: column; gap: 1rem; }

	.group-companies-grid { grid-template-columns: 1fr; gap: 1rem; }
	.group-company { max-width: 280px; margin: 0 auto; }
	.section-group { padding: 3.5rem 0; }
	.section-group .group-company { padding: 1.25rem 1.5rem; }
}

@media (max-width: 480px) {
	.services-grid { grid-template-columns: 1fr; }
}
