/*
 * Main frontend styles for the iSalamanca theme.
 */

:root {
	--is-primary: #00b050;
	--is-primary-dark: #008b40;
	--is-text: #002060;
	--is-muted: #5f6f86;
	--is-bg: #ffffff;
	--is-soft: #f5f8fb;
	--is-border: #dce6e1;
	--is-shadow: 0 18px 45px rgba(0, 32, 96, 0.09);
	--is-shadow-soft: 0 10px 28px rgba(0, 32, 96, 0.07);
	--is-max-width: 1180px;
	--is-anchor-offset: 112px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--is-bg);
	color: var(--is-text);
	font-family: Raleway, Arial, Helvetica, sans-serif;
	font-size: 17px;
	line-height: 1.7;
}

a {
	color: var(--is-primary);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

img {
	height: auto;
	max-width: 100%;
}

.container,
.site-header__inner,
.site-footer__inner {
	width: min(100% - 32px, var(--is-max-width));
	margin-inline: auto;
}

.site-header {
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--is-border);
	box-shadow: 0 6px 24px rgba(0, 32, 96, 0.04);
	position: sticky;
	top: 0;
	z-index: 10;
	backdrop-filter: blur(10px);
}

.site-header__inner {
	display: grid;
	grid-template-columns: minmax(180px, auto) 1fr minmax(220px, auto);
	gap: 28px;
	align-items: center;
	min-height: 92px;
	padding: 16px 0;
}

.site-branding {
	display: flex;
	align-items: center;
	min-width: 0;
}

.custom-logo {
	display: block;
	max-height: 64px;
	width: auto;
}

.site-title {
	color: var(--is-text);
	font-size: 22px;
	font-weight: 700;
}

.primary-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu a {
	color: var(--is-text);
	font-size: 15px;
	font-weight: 700;
	position: relative;
	text-decoration: none;
}

.primary-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -8px;
	height: 2px;
	background: var(--is-primary);
	opacity: 0;
	transform: scaleX(0.5);
	transition: opacity 180ms ease, transform 180ms ease;
}

.primary-menu a:hover::after,
.primary-menu a:focus::after {
	opacity: 1;
	transform: scaleX(1);
}

.header-contact {
	display: grid;
	gap: 3px;
	text-align: right;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.header-contact a {
	color: var(--is-text);
}

.hero {
	min-height: 650px;
	display: grid;
	align-items: center;
	background-position: center;
	background-size: cover;
	position: relative;
	color: #ffffff;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(0, 32, 96, 0.82) 0%, rgba(0, 32, 96, 0.62) 46%, rgba(0, 32, 96, 0.44) 100%),
		rgba(0, 0, 0, 0.18);
}

.hero__inner {
	position: relative;
	width: min(100% - 32px, var(--is-max-width));
	margin-inline: auto;
	padding: 128px 0;
}

.hero__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
	gap: 64px;
	align-items: center;
}

.hero__content {
	max-width: 680px;
}

.hero__eyebrow,
.section-kicker {
	margin: 0 0 14px;
	color: var(--is-primary);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hero__eyebrow {
	color: #7ff0a9;
}

.hero h1 {
	margin: 0 0 22px;
	font-size: clamp(42px, 6vw, 78px);
	line-height: 1.03;
	font-weight: 800;
}

.hero__subtitle {
	max-width: 640px;
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
	font-size: clamp(19px, 2vw, 23px);
	line-height: 1.55;
}

.hero__content .hero__subtitle + .hero__subtitle {
	margin-top: 1.2em;
}

.hero__form-card {
	width: 100%;
	max-width: 420px;
	justify-self: end;
	padding: 42px;
	background: #002040;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
	color: #ffffff;
}

.hero__form-card h2 {
	margin: 0 0 12px;
	color: #ffffff;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 800;
}

.hero__form-card p {
	margin: 0 0 18px;
	color: rgba(255, 255, 255, 0.84);
}

.hero__form-card .wpcf7 {
	color: #ffffff;
}

.hero__form-card .wpcf7-form {
	display: grid;
	gap: 14px;
}

.hero__form-card label {
	display: grid;
	gap: 7px;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.hero__form-card input,
.hero__form-card textarea {
	width: 100%;
	padding: 13px 15px;
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 6px;
	color: var(--is-text);
	font: inherit;
	line-height: 1.35;
}

.hero__form-card textarea {
	min-height: 118px;
	resize: vertical;
}

.hero__form-card input[type="submit"] {
	display: block;
	width: auto;
	min-height: 50px;
	margin: 0 auto;
	padding: 0 28px;
	background: #00b050;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 14px 30px rgba(0, 176, 80, 0.25);
	color: #ffffff;
	font-weight: 800;
	cursor: pointer;
	transition: box-shadow 180ms ease, transform 180ms ease;
}

.hero__form-card input[type="submit"]:hover,
.hero__form-card input[type="submit"]:focus {
	box-shadow: 0 18px 38px rgba(0, 176, 80, 0.32);
	transform: translateY(-1px);
}

.hero__form-card .wpcf7-submit,
.hero__form-card input[type="submit"] {
	display: block;
	margin: 0 auto;
}

.hero__form-card .wpcf7 p:last-child,
.hero__form-card .hero__legal,
.hero__form-card .lopd {
	text-align: center;
}

.hero__form-card .wpcf7-form > p:last-of-type {
	text-align: center;
}

.hero__form-card .wpcf7-form > p:last-of-type em {
	display: block;
	text-align: center;
}

.hero__form-card .wpcf7-spinner {
	margin: 0 0 0 12px;
}

.hero__form-card .wpcf7-response-output {
	margin: 0;
	color: #ffffff;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 28px;
	background: linear-gradient(135deg, var(--is-primary), var(--is-primary-dark));
	color: #ffffff;
	border-radius: 999px;
	box-shadow: 0 14px 30px rgba(0, 176, 80, 0.25);
	font-weight: 700;
	text-decoration: none;
	transition: box-shadow 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus {
	color: #ffffff;
	box-shadow: 0 18px 38px rgba(0, 176, 80, 0.32);
	transform: translateY(-1px);
	text-decoration: none;
}

.content-section {
	padding: 96px 0;
	scroll-margin-top: var(--is-anchor-offset);
}

.content-section--soft {
	background: var(--is-soft);
}

.hero + .content-section,
#servicios,
#sobre-mi {
	background: var(--is-soft);
}

#contacto {
	background: #ffffff;
}

.section-heading {
	max-width: 760px;
	margin: 0 0 42px;
}

.section-heading--center {
	margin-inline: auto;
	text-align: center;
}

.section-heading h2 {
	margin: 0 0 16px;
	font-size: clamp(32px, 4vw, 50px);
	line-height: 1.12;
	font-weight: 800;
}

.section-heading p {
	margin: 0;
	color: var(--is-muted);
}

.split-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
	gap: 64px;
	align-items: start;
}

.text-panel {
	padding: 34px;
	background: #ffffff;
	border: 1px solid var(--is-border);
	border-radius: 10px;
	box-shadow: var(--is-shadow-soft);
}

.text-panel p:first-child {
	margin-top: 0;
}

.text-panel p:last-child {
	margin-bottom: 0;
}

.about-me-layout {
	display: grid;
	grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
	gap: 48px;
	align-items: start;
}

.about-me-media {
	margin: 0;
}

.about-me-media img {
	display: block;
	width: 100%;
	max-height: 560px;
	border-radius: 8px;
	object-fit: cover;
}

.about-me-content {
	max-width: 760px;
	text-align: left;
}

.about-me-content p {
	margin: 0 0 1.15em;
	text-align: left;
}

.about-me-content p:last-child {
	margin-bottom: 0;
}

.services-banner {
	position: relative;
	display: grid;
	align-items: center;
	width: 100%;
	min-height: 420px;
	color: #ffffff;
	background-position: center;
	background-size: cover;
	overflow: hidden;
}

.services-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 32, 96, 0.72);
}

.services-banner__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
}

.services-banner__content {
	width: 100%;
	padding: 72px 0;
	color: #ffffff;
	text-align: left;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.services-banner h2 {
	margin: 0 0 18px;
	color: #ffffff;
	font-size: clamp(42px, 5vw, 68px);
	line-height: 1.05;
	font-weight: 800;
}

.services-banner p {
	max-width: 66.666%;
	margin: 0;
	color: #ffffff;
	font-size: 19px;
	line-height: 1.7;
	text-align: left;
}

.services-banner + #servicios {
	padding-top: 64px;
}

.focus-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.focus-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid var(--is-border);
	border-radius: 10px;
	box-shadow: 0 0 0 rgba(0, 32, 96, 0);
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.focus-card:hover {
	border-color: rgba(0, 176, 80, 0.35);
	box-shadow: var(--is-shadow);
	transform: translateY(-4px);
}

.focus-card__media {
	position: relative;
	height: 180px;
	overflow: hidden;
}

.focus-card__image {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.focus-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 32, 96, 0.08) 0%, rgba(0, 32, 96, 0.76) 100%);
}

.focus-card__title {
	margin: 0;
	font-size: 21px;
	line-height: 1.25;
	font-weight: 800;
}

.focus-card__media .focus-card__title {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 20px;
	color: #ffffff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.focus-card__body {
	flex: 1;
	padding: 26px 30px 30px;
	color: var(--is-muted);
}

.focus-card__body p {
	margin: 0;
}

.focus-card--plain {
	padding: 30px;
}

.focus-card--plain .focus-card__title {
	margin-bottom: 10px;
	color: var(--is-text);
}

.focus-card--plain .focus-card__body {
	padding: 0;
}

.focus-grid + p {
	margin: 34px 0 0;
}

.values-section {
	position: relative;
	background: #ffffff;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	color: #ffffff;
	overflow: hidden;
}

.values-section::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 32, 96, 0.72);
	opacity: 0;
}

.values-section[style*="background-image"]::before {
	opacity: 1;
}

.values-section > .container {
	position: relative;
	z-index: 1;
}

.values-section__heading {
	max-width: 760px;
}

.values-section[style*="background-image"] .values-section__heading h2,
.values-section[style*="background-image"] .values-mission h2 {
	color: #ffffff;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.values-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.values-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid rgba(0, 32, 96, 0.18);
	border-radius: 8px;
	box-shadow: var(--is-shadow-soft);
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.values-card:hover,
.values-card:focus-within {
	border-color: rgba(0, 176, 80, 0.35);
	box-shadow: var(--is-shadow);
	transform: translateY(-4px);
}

.values-card__header {
	min-height: 92px;
	display: flex;
	align-items: center;
	padding: 22px 24px;
	background: var(--is-text);
	color: #ffffff;
}

.values-card__header h3 {
	margin: 0;
	color: #ffffff;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 800;
}

.values-card__body {
	flex: 1;
	padding: 24px;
}

.values-card__body p {
	margin: 0;
	color: var(--is-muted);
	text-align: left;
}

.values-mission {
	margin-top: 64px;
}

.values-mission h2 {
	margin: 0 0 28px;
	color: var(--is-text);
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.12;
	font-weight: 800;
	text-align: center;
}

.values-mission__card {
	width: 100%;
	padding: 42px;
	background: #ffffff;
	border: 1px solid rgba(0, 32, 96, 0.16);
	border-radius: 8px;
	box-shadow: var(--is-shadow-soft);
	text-align: center;
}

.values-mission__card p {
	max-width: 900px;
	margin: 0 auto;
	color: var(--is-muted);
	font-size: 19px;
	line-height: 1.75;
	text-align: center;
}

.service-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.hero + .content-section .service-grid:has(> .service-card:nth-child(2):last-child) {
	align-items: stretch;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card,
.post-card {
	padding: 30px;
	background: #ffffff;
	border: 1px solid var(--is-border);
	border-radius: 10px;
	box-shadow: 0 0 0 rgba(0, 32, 96, 0);
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.service-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-height: 100%;
}

.service-card:hover,
.post-card:hover,
.client-logo:hover {
	border-color: rgba(0, 176, 80, 0.35);
	box-shadow: var(--is-shadow);
	transform: translateY(-4px);
}

.service-card__icon {
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	margin-bottom: 22px;
}

.service-card__icon-img {
	display: block;
	width: 68px;
	height: 68px;
	object-fit: contain;
}

.service-card h3,
.post-card__title {
	margin: 0 0 10px;
	font-size: 21px;
	line-height: 1.25;
}

.service-card p,
.post-card__summary {
	margin: 0;
	color: var(--is-muted);
}

.clients-section {
	background:
		linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.client-logo-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.client-logo {
	display: grid;
	place-items: center;
	min-height: 96px;
	padding: 18px;
	background: #ffffff;
	border: 1px solid var(--is-border);
	border-radius: 10px;
	box-shadow: var(--is-shadow-soft);
	color: var(--is-text);
	font-size: 16px;
	font-weight: 800;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.contact-list {
	display: grid;
	gap: 18px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.contact-list li {
	display: grid;
	gap: 3px;
}

.contact-list span {
	color: var(--is-muted);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.contact-list a {
	color: var(--is-text);
	font-size: 20px;
	font-weight: 800;
}

.contact-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
	gap: 28px;
	align-items: center;
}

.contact-panel__details {
	min-width: 0;
}

.contact-qr {
	display: grid;
	justify-items: center;
	gap: 10px;
	margin: 0;
	text-align: center;
}

.contact-qr__image {
	display: block;
	width: min(180px, 100%);
	max-width: 180px;
	border-radius: 6px;
}

.contact-qr figcaption {
	max-width: 180px;
	margin: 0;
	color: var(--is-muted);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}

.site-footer {
	background: var(--is-text);
	color: #ffffff;
}

.site-footer a {
	color: #ffffff;
}

.site-footer__inner {
	padding: 48px 0 26px;
}

.footer-content {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(220px, auto) minmax(220px, auto);
	gap: 28px;
	align-items: center;
	margin-bottom: 32px;
}

.footer-brand h2 {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.2;
}

.footer-brand p {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
}

.footer-contact {
	display: grid;
	gap: 8px;
	font-weight: 700;
}

.footer-social {
	display: flex;
	align-items: center;
	gap: 14px;
	justify-content: flex-end;
}

.footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	color: #ffffff;
	text-decoration: none;
	transition: color 180ms ease, transform 180ms ease;
}

.footer-social a:hover,
.footer-social a:focus {
	color: var(--is-primary);
	text-decoration: none;
	transform: translateY(-1px);
}

.footer-social svg {
	display: block;
	width: 32px;
	height: 32px;
	fill: currentColor;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	margin-bottom: 28px;
}

.footer-widget__title {
	margin: 0 0 12px;
	font-size: 18px;
}

.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	padding-top: 18px;
	font-size: 14px;
}

.site-footer__bottom p {
	margin: 0;
}

@media (max-width: 900px) {
	.site-header__inner,
	.split-grid,
	.client-logo-grid,
	.footer-content,
	.footer-widgets {
		grid-template-columns: 1fr;
	}

	.site-header__inner {
		gap: 18px;
		padding: 18px 0;
	}

	.primary-menu {
		justify-content: flex-start;
		gap: 14px 18px;
	}

	.header-contact {
		text-align: left;
	}

	.footer-social {
		justify-content: flex-start;
	}

	.contact-panel {
		grid-template-columns: 1fr;
	}

	.contact-qr {
		justify-self: center;
	}

	.about-me-layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.service-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hero {
		min-height: 580px;
	}

	.hero::before {
		background: rgba(0, 32, 96, 0.78);
	}

	.hero__inner {
		grid-template-columns: 1fr;
		padding: 92px 0;
	}

	.hero__layout {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.hero__content {
		max-width: 680px;
	}

	.hero__form-card {
		justify-self: stretch;
		max-width: none;
		padding: 28px;
	}

	.content-section {
		padding: 72px 0;
	}

	.services-banner {
		min-height: 320px;
	}

	.services-banner__content {
		padding: 56px 0;
	}

	.services-banner h2 {
		font-size: 42px;
	}

	.services-banner p {
		max-width: 100%;
		font-size: 19px;
	}
}

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

	.values-card-grid {
		grid-template-columns: 1fr;
	}

	.values-mission {
		margin-top: 44px;
	}

	.values-mission__card {
		padding: 28px 24px;
	}

	.values-mission__card p {
		font-size: 18px;
	}

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

	.focus-card__media,
	.focus-card__image {
		height: 150px;
	}

	.services-banner {
		min-height: 260px;
	}

	.hero {
		min-height: auto;
	}

	.hero__inner {
		padding: 74px 0;
	}

	.hero__layout {
		gap: 28px;
	}

	.hero__form-card {
		max-width: none;
		padding: 24px;
	}

	.hero__form-card h2 {
		font-size: 24px;
	}

	.hero__form-card textarea {
		min-height: 96px;
	}

	.services-banner__content {
		padding: 42px 0;
	}

	.services-banner h2 {
		font-size: 34px;
	}

	.services-banner p {
		max-width: 100%;
		font-size: 18px;
	}

	.hero + .content-section .service-grid:has(> .service-card:nth-child(2):last-child) {
		grid-template-columns: 1fr;
	}
}
