/* Ambulancias Sánchez — estilos (basados en el aspecto del tema Twenty Twenty) */

@font-face {
	font-family: "Inter var";
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	src: url(../fonts/Inter-upright-var.woff2) format("woff2");
}
@font-face {
	font-family: "Inter var";
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
	src: url(../fonts/Inter-italic-var.woff2) format("woff2");
}

:root {
	--blue: #001e61;
	--red: #af0503;
	--accent: #e22658;
	--text: #000;
	--secondary: #6d6d6d;
	--border: #dbdbdb;
	--sans: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
	--serif: "Hoefler Text", Garamond, "Times New Roman", serif;
	--header-h: 8rem;
}

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

html { font-size: 62.5%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: #fff;
	color: var(--text);
	font-family: var(--sans);
	font-size: 1.8rem;
	letter-spacing: -0.015em;
	-webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--accent); }
strong { font-weight: 700; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link {
	position: absolute; left: -9999rem; top: 2.5rem; z-index: 999;
	padding: 1rem 1.5rem; background: #fff; color: var(--blue); font-weight: 600;
}
.skip-link:focus { left: 2.5rem; }

.section-inner {
	width: calc(100% - 4rem);
	max-width: 120rem;
	margin: 0 auto;
}
.section-inner.medium { max-width: 100rem; }

/* ---------- Cabecera ---------- */

#site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 168rem;
	min-height: var(--header-h);
	padding: 1.1rem 0;
}
.site-logo img { width: 240px; max-width: 60vw; }

.primary-menu-wrapper { display: none; }
.primary-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
}
.primary-menu li { margin: 0.8rem 0 0.8rem 2.5rem; }
.primary-menu a {
	color: var(--blue);
	font-size: 1.8rem;
	font-weight: 500;
	letter-spacing: -0.0277em;
	text-decoration: none;
}
.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu a[aria-current="page"] { text-decoration: underline; }

.nav-toggle {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem;
	border: 0;
	background: none;
	color: var(--blue);
	font: 600 1.2rem var(--sans);
	text-transform: uppercase;
	letter-spacing: 0.036em;
	cursor: pointer;
}
.nav-toggle svg { fill: currentColor; }

@media (min-width: 1000px) {
	.primary-menu-wrapper { display: block; }
	.nav-toggle { display: none; }
}

/* Menú móvil */
.menu-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: #fff;
	overflow-y: auto;
}
.menu-modal[hidden] { display: none; }
.menu-modal-inner { width: calc(100% - 4rem); margin: 0 auto; padding-bottom: 4rem; }
.close-nav-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.6rem;
	width: 100%;
	min-height: var(--header-h);
	border: 0;
	background: none;
	color: var(--blue);
	font: 500 1.6rem var(--sans);
	cursor: pointer;
}
.modal-menu { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.modal-menu li { border-bottom: 1px solid var(--border); }
.modal-menu a {
	display: block;
	padding: 2rem 0;
	color: var(--blue);
	font-size: 2rem;
	font-weight: 500;
	text-decoration: none;
}
.menu-modal .social-icons { margin-top: 3rem; justify-content: center; }
body.menu-open { overflow: hidden; }

.social-icons { display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.social-icons a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4.4rem;
	height: 4.4rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
}

/* ---------- Portada ---------- */

.cover-header {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: calc(100vh - var(--header-h));
	background: #011863 url(../img/servicio-de-ambulancias.jpg) center / cover no-repeat;
}
@media (min-width: 1000px) and (hover: hover) {
	.cover-header { background-attachment: fixed; }
}
.cover-overlay { position: absolute; inset: 0; background: #011863; opacity: 0.8; }
.cover-header-inner {
	position: relative;
	padding: 12rem 0 8rem;
	text-align: center;
	color: #fff;
}
.cover-header .entry-title { color: #fff; margin: 0 0 4rem; }
.to-the-content { display: inline-block; padding: 1rem; }
@media (min-width: 700px) {
	.cover-header .entry-title { margin-bottom: 12rem; }
}

/* ---------- Títulos ---------- */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--sans);
	font-feature-settings: "lnum";
	letter-spacing: -0.0415625em;
	line-height: 1.25;
	color: var(--red);
}
.entry-title {
	font-size: 3.6rem;
	font-weight: 800;
	line-height: 1.138888889;
	margin: 0;
}
h2 { font-size: 3.2rem; font-weight: 700; margin: 3.5rem auto 2rem; }
h4 { font-size: 2.4rem; font-weight: 500; color: var(--blue); margin: 3.5rem 0 2rem; }

@media (min-width: 700px) {
	.entry-title { font-size: 6.4rem; }
	h2 { font-size: 4.8rem; margin: 6rem auto 3rem; }
	h4 { font-size: 3.2rem; }
}
@media (min-width: 1220px) {
	.entry-title { font-size: 8.4rem; }
}

.entry-header { padding: 4rem 0; text-align: center; }
@media (min-width: 700px) {
	.entry-header { padding: 8rem 0; }
}

/* ---------- Contenido ---------- */

.entry-content {
	font-family: var(--serif);
	font-size: 1.8rem;
	line-height: 1.5;
	letter-spacing: normal;
}
@media (min-width: 700px) {
	.entry-content { font-size: 2.1rem; line-height: 1.476; }
}
.entry-content p,
.entry-content ul,
.entry-content ol { margin-top: 0; margin-bottom: 1.25em; }
.entry-content li { margin: 0.5rem 0 0 2rem; }
.entry-content ul, .entry-content ol { padding-left: 1em; }

/* Ancho: los bloques normales ocupan el ancho del contenido, los anchos/completos se salen */
.entry-content > * {
	width: calc(100% - 4rem);
	max-width: 120rem;
	margin-left: auto;
	margin-right: auto;
}
.entry-content > .alignfull { width: 100%; max-width: none; }
.alignwide {
	width: calc(100% - 4rem);
	max-width: 120rem;
	margin-left: auto;
	margin-right: auto;
}
.entry-content h2 { text-align: center; }
.post-inner.thin .entry-content h2 { text-align: left; }

.entry-content hr {
	width: calc(100% - 4rem);
	max-width: 120rem;
	margin: 4rem auto;
	border: 0;
	border-top: 1px solid var(--border);
}
@media (min-width: 700px) {
	.entry-content hr { margin: 8rem auto; }
}

.has-large-font-size { font-size: 1.25em; line-height: 1.4; }

.columns { display: flex; flex-wrap: wrap; gap: 2rem 4rem; }
.columns > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 781px) {
	.columns > * { flex-basis: 100%; }
}
.columns p:last-child { margin-bottom: 0; }

/* Teléfonos */
.capatelefonos {
	padding: 2rem;
	margin-bottom: 3rem;
	background: #fbfbfb;
	border-bottom: 1px solid #e3e3e3;
	text-align: center;
}
.phone-zone { margin: 0 0 1rem; color: var(--red); font-weight: 700; }
.phone-number { margin: 0; font-size: 4rem; font-weight: 700; line-height: 1.476; }
.phone-number a { color: #222; text-decoration: none; }
.phone-number a:hover, .phone-number a:focus { text-decoration: underline; }
@media (max-width: 781px) {
	.capatelefonos .columns { gap: 2rem; }
	.phone-number { font-size: 3.2rem; }
}

/* Imagen + texto */
.media-text {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	margin-top: 4rem;
	margin-bottom: 4rem;
}
.media-text-content { padding: 0 8%; }
.media-text-content p { margin: 0; }
@media (min-width: 700px) {
	.media-text { margin-top: 8rem; margin-bottom: 8rem; }
}
@media (max-width: 782px) {
	.media-text { display: block; padding: 1rem; }
	.media-text-content { padding: 2rem 0 0; }
}

/* Bandas de fondo */
.band { padding: 4rem 2rem; margin-bottom: 3rem; }
.band > h2:first-child { margin-top: 0; }
@media (min-width: 700px) {
	.band { padding: 8rem 4rem; }
}

/* Flota */
.fleet-item { display: flex; gap: 2rem 4rem; align-items: flex-start; }
.fleet-item > figure { flex: 0 0 calc(33.33% - 2rem); display: flex; justify-content: flex-end; padding-top: 4rem; }
.fleet-item > div { flex: 1 1 0; }
.fleet-item:first-of-type { align-items: center; }
.fleet-item:first-of-type > figure { padding-top: 0; }
@media (max-width: 781px) {
	.fleet-item { flex-direction: column; }
	.fleet-item > figure,
	.fleet-item:first-of-type > figure { flex-basis: auto; justify-content: flex-start; padding-top: 2rem; }
}

/* Logos de entidades */
.logos {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 2rem;
	padding: 0 !important;
	list-style: none;
}
.logos li { margin: 0; display: flex; justify-content: center; align-items: center; }
@media (max-width: 781px) {
	.logos { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Pie ---------- */

#site-footer {
	padding: 3rem 0;
	background: var(--blue);
	color: #fff;
	font-size: 1.6rem;
}
#site-footer .section-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}
#site-footer a { color: #fff; }
.footer-credits { display: flex; flex-wrap: wrap; gap: 0 2.4rem; }
.footer-credits p { margin: 0; }
.footer-copyright { font-weight: 700; }
.footer-credits a { text-decoration: none; }
.footer-credits a:hover, .footer-credits a:focus { text-decoration: underline; }
#site-footer .social-icons { margin-left: auto; }
@media (min-width: 700px) {
	#site-footer { padding: 4.3rem 0; font-size: 1.8rem; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media print {
	#site-header, .menu-modal, #site-footer .social-icons, .to-the-content { display: none !important; }
	.cover-header { min-height: 0; background: none; }
	.cover-overlay { display: none; }
	.cover-header .entry-title { color: var(--red); margin-bottom: 2rem; }
}
