/*
Theme Name: UAR Atletismo
Theme URI: https://uar.es/
Author: UAR
Author URI: https://uar.es/
Description: Tema de bloques contemporaneo para un club de atletismo. Incluye portada, disciplinas, calendario, noticias, resultados y captacion de socios.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uar-athletics
Tags: full-site-editing, block-patterns, custom-colors, custom-logo, editor-style, accessibility-ready, news, portfolio
*/

:root {
	--uar-ink: #061b52;
	--uar-ink-soft: #0b377f;
	--uar-accent: #e31d34;
	--uar-accent-bright: #f0192d;
	--uar-focus: #2368c4;
	--uar-paper: #f4f7fb;
	--uar-white: #ffffff;
	--uar-line: rgba(6, 27, 82, 0.14);
	--uar-muted: #5b6680;
	--uar-radius-sm: 12px;
	--uar-radius-md: 22px;
	--uar-radius-lg: 34px;
	--uar-shadow: 0 24px 70px rgba(6, 27, 82, 0.14);
	--uar-ease: cubic-bezier(.2, .75, .2, 1);
}

html {
	overflow-x: clip;
	scroll-behavior: smooth;
}

body {
	max-width: 100%;
	overflow-x: hidden;
}

::selection {
	background: var(--uar-accent);
	color: var(--uar-white);
}

/* Compatibilidad con contenido creado en la primera iteración del tema. */
.has-lime-color {
	color: var(--uar-accent-bright) !important;
}

.has-lime-background-color {
	background-color: var(--uar-accent) !important;
}

a,
button,
input,
textarea,
select {
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s var(--uar-ease), box-shadow .2s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--uar-focus);
	outline-offset: 4px;
}

.uar-skip-link {
	background: var(--uar-accent);
	color: var(--uar-white);
	font-weight: 800;
	left: 1rem;
	padding: .75rem 1rem;
	position: fixed;
	top: -100px;
	z-index: 99999;
}

.uar-skip-link:focus {
	top: 1rem;
}

.uar-site-header {
	backdrop-filter: blur(18px);
	background: rgba(255, 255, 255, .94);
	border-bottom: 1px solid rgba(6, 27, 82, .12);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.uar-site-header.is-scrolled {
	box-shadow: 0 12px 40px rgba(2, 7, 14, .22);
}

.uar-header-inner {
	min-height: 80px;
}

.uar-brand-logo-link {
	display: inline-flex;
	height: 58px;
	width: clamp(132px, 13vw, 174px);
}

.uar-brand-logo {
	background: url('assets/brand/logo-uar-concept-tight.png') center / contain no-repeat;
	display: block;
	height: 100%;
	width: 100%;
}

.uar-site-header .wp-block-navigation-item__content {
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
}

.uar-site-header .wp-block-navigation-item__content:hover {
	color: var(--uar-accent);
}

.uar-site-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--uar-ink) !important;
	color: var(--uar-white) !important;
	padding: 1.5rem;
}

.uar-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	gap: 1.1rem;
	margin-top: 4rem;
}

.uar-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.8rem, 8vw, 3rem);
	letter-spacing: -.03em;
}

.wp-block-button__link {
	align-items: center;
	display: inline-flex;
	gap: .55rem;
	justify-content: center;
}

.wp-block-button__link:hover {
	box-shadow: 0 12px 28px rgba(6, 27, 82, .18);
	transform: translateY(-2px);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--uar-ink);
	border-color: var(--uar-ink);
	color: var(--uar-white);
}

.uar-header-cta .wp-block-button__link {
	background: var(--uar-accent);
	color: var(--uar-white);
	padding: .75rem 1.1rem;
}

.uar-hero {
	min-height: clamp(680px, 87vh, 900px);
}

.uar-hero .wp-block-cover__image-background {
	object-position: center center;
	z-index: 0;
}

.uar-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(6, 27, 82, .98) 0%, rgba(6, 27, 82, .91) 32%, rgba(6, 27, 82, .52) 58%, rgba(6, 27, 82, .1) 100%) !important;
	opacity: 1 !important;
	z-index: 1;
}

.uar-hero .wp-block-cover__inner-container {
	z-index: 2;
}

.uar-hero-content {
	padding-bottom: clamp(3.5rem, 7vw, 6rem);
	padding-top: clamp(5rem, 10vw, 8rem);
}

.uar-eyebrow {
	align-items: center;
	display: flex;
	font-size: .74rem;
	font-weight: 850;
	gap: .65rem;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.uar-eyebrow::before {
	background: currentColor;
	content: "";
	height: 2px;
	width: 34px;
}

.uar-hero-title {
	font-size: clamp(4rem, 10.6vw, 9.5rem) !important;
	letter-spacing: -.07em;
	line-height: .79 !important;
	margin-bottom: 1.75rem;
	margin-top: 1.5rem;
	max-width: 7.5ch;
	text-wrap: balance;
}

.uar-hero-title mark {
	color: var(--uar-accent-bright);
}

.uar-hero-copy {
	font-size: clamp(1.05rem, 1.5vw, 1.28rem);
	line-height: 1.55;
	max-width: 540px;
}

.uar-hero-actions {
	margin-top: 2rem;
}

.uar-hero-note {
	align-items: center;
	display: flex;
	font-size: .82rem;
	font-weight: 700;
	gap: .55rem;
	margin-top: 2.25rem;
}

.uar-pulse {
	background: var(--uar-accent-bright);
	border: 4px solid rgba(240, 25, 45, .2);
	border-radius: 50%;
	box-sizing: content-box;
	height: 8px;
	width: 8px;
}

.uar-stats-band {
	background: var(--uar-accent);
	color: var(--uar-white);
	position: relative;
}

.uar-stats-grid {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.uar-stat {
	border-right: 1px solid rgba(255, 255, 255, .28);
	padding: 2rem clamp(1rem, 3vw, 2.5rem);
}

.uar-stat:last-child {
	border-right: 0;
}

.uar-stat-value {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.6rem, 5vw, 4.5rem);
	font-weight: 900;
	letter-spacing: -.06em;
	line-height: .9;
}

.uar-stat-label {
	font-size: .72rem;
	font-weight: 850;
	letter-spacing: .12em;
	margin-top: .55rem;
	text-transform: uppercase;
}

.uar-section {
	padding-bottom: clamp(4.5rem, 9vw, 8rem);
	padding-top: clamp(4.5rem, 9vw, 8rem);
}

.uar-section-heading {
	align-items: end;
	display: grid !important;
	gap: 2rem;
	grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr);
	margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.uar-section-title {
	font-size: clamp(3.2rem, 7vw, 6.8rem) !important;
	letter-spacing: -.065em;
	line-height: .86 !important;
	max-width: 10ch;
	text-wrap: balance;
}

.uar-section-intro {
	color: var(--uar-muted);
	font-size: 1.05rem;
	line-height: 1.65;
}

.uar-discipline-grid {
	display: grid !important;
	gap: 1rem;
	grid-template-columns: repeat(12, minmax(0, 1fr));
}

.uar-discipline-card {
	background: var(--uar-white);
	border: 1px solid var(--uar-line);
	border-radius: var(--uar-radius-md);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	grid-column: span 4;
	justify-content: space-between;
	min-height: 330px;
	overflow: hidden;
	padding: clamp(1.5rem, 3vw, 2.2rem);
	position: relative;
}

.uar-discipline-card:first-child,
.uar-discipline-card:nth-child(4) {
	grid-column: span 8;
}

.uar-discipline-card:nth-child(5) {
	grid-column: 1 / -1;
	min-height: 300px;
}

.uar-discipline-card::after {
	background: linear-gradient(135deg, transparent 0 45%, rgba(240, 25, 45, .38) 45% 52%, transparent 52% 100%);
	content: "";
	height: 180px;
	opacity: 0;
	position: absolute;
	right: -30px;
	top: -30px;
	transform: translate(25px, -25px);
	transition: opacity .35s ease, transform .45s var(--uar-ease);
	width: 180px;
}

.uar-discipline-card:hover {
	border-color: var(--uar-ink);
	box-shadow: var(--uar-shadow);
	transform: translateY(-6px);
}

.uar-discipline-card:hover::after {
	opacity: 1;
	transform: translate(0, 0);
}

.uar-discipline-card.is-dark {
	background: var(--uar-ink);
	border-color: var(--uar-ink);
	color: var(--uar-white);
}

.uar-discipline-card.is-accent,
.uar-discipline-card.is-lime {
	background: var(--uar-accent);
	border-color: var(--uar-accent);
	color: var(--uar-white);
}

.uar-discipline-card.is-accent a,
.uar-discipline-card.is-lime a {
	color: var(--uar-white);
}

.uar-card-index {
	font-size: .7rem;
	font-weight: 850;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.uar-discipline-title {
	font-size: clamp(2.15rem, 4vw, 4.2rem) !important;
	letter-spacing: -.055em;
	line-height: .9 !important;
	margin-bottom: 1rem;
}

.uar-card-link {
	font-size: .78rem;
	font-weight: 850;
	letter-spacing: .08em;
	text-decoration: none;
	text-transform: uppercase;
}

.uar-card-link::after {
	content: " \2197";
}

.uar-events-section {
	background: var(--uar-ink);
	color: var(--uar-white);
}

.uar-event-list {
	border-top: 1px solid rgba(255, 255, 255, .16);
}

.uar-event-row {
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, .16);
	display: grid !important;
	gap: 1.5rem;
	grid-template-columns: 110px minmax(0, 1.2fr) minmax(180px, .6fr) auto;
	padding: 1.55rem 0;
	transition: padding .25s var(--uar-ease), background .25s ease;
}

.uar-event-row:hover {
	background: rgba(255, 255, 255, .035);
	padding-left: 1rem;
	padding-right: 1rem;
}

.uar-event-date {
	color: var(--uar-accent-bright);
	font-family: var(--wp--preset--font-family--display);
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -.04em;
}

.uar-event-title {
	font-size: clamp(1.25rem, 2vw, 1.7rem) !important;
	margin: 0;
}

.uar-event-meta {
	color: #aab6c5;
	font-size: .88rem;
}

.uar-event-tag {
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 999px;
	font-size: .68rem;
	font-weight: 800;
	letter-spacing: .09em;
	padding: .45rem .7rem;
	text-transform: uppercase;
}

.uar-news-grid .wp-block-post-template {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.uar-news-grid .wp-block-post {
	background: var(--uar-white);
	border: 1px solid var(--uar-line);
	border-radius: var(--uar-radius-md);
	overflow: hidden;
	transition: transform .25s var(--uar-ease), box-shadow .25s ease;
}

.uar-news-grid .wp-block-post:hover {
	box-shadow: var(--uar-shadow);
	transform: translateY(-6px);
}

.uar-news-grid .wp-block-post-featured-image {
	aspect-ratio: 16 / 10;
	margin: 0;
	overflow: hidden;
}

.uar-news-grid .wp-block-post-featured-image img {
	height: 100%;
	object-fit: cover;
	transition: transform .5s var(--uar-ease);
	width: 100%;
}

.uar-news-grid .wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.035);
}

.uar-news-content {
	padding: 1.5rem;
}

.uar-news-grid .wp-block-post-date,
.uar-post-kicker {
	color: var(--uar-muted);
	font-size: .7rem;
	font-weight: 850;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.uar-news-grid .wp-block-post-title {
	font-size: clamp(1.7rem, 2.8vw, 2.45rem);
	letter-spacing: -.045em;
	line-height: .98;
	margin: .8rem 0;
}

.uar-news-grid .wp-block-post-title a {
	text-decoration: none;
}

.uar-news-grid .wp-block-read-more {
	font-size: .75rem;
	font-weight: 850;
	letter-spacing: .08em;
	text-decoration: none;
	text-transform: uppercase;
}

.uar-join-wrap {
	padding-bottom: clamp(4rem, 8vw, 7rem);
	padding-top: clamp(4rem, 8vw, 7rem);
}

.uar-join-card {
	background: var(--uar-accent);
	border-radius: var(--uar-radius-lg);
	color: var(--uar-white);
	overflow: hidden;
	padding: clamp(2rem, 6vw, 5rem);
	position: relative;
}

.uar-join-card::before,
.uar-join-card::after {
	border: clamp(22px, 4vw, 54px) solid rgba(255, 255, 255, .1);
	border-radius: 50%;
	content: "";
	height: clamp(170px, 28vw, 380px);
	position: absolute;
	right: -6%;
	top: -38%;
	width: clamp(170px, 28vw, 380px);
}

.uar-join-card::after {
	right: 14%;
	top: 57%;
}

.uar-join-title {
	font-size: clamp(3.2rem, 8vw, 7.5rem) !important;
	letter-spacing: -.07em;
	line-height: .82 !important;
	max-width: 8ch;
	position: relative;
	z-index: 2;
}

.uar-join-content {
	align-items: end;
	display: grid !important;
	gap: 2rem;
	grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
	position: relative;
	z-index: 2;
}

.uar-site-footer {
	background: #031036;
	color: var(--uar-white);
	padding-bottom: 2.25rem;
	padding-top: 4rem;
}

.uar-footer-grid {
	display: grid !important;
	gap: 2rem;
	grid-template-columns: minmax(280px, 1.5fr) repeat(2, minmax(150px, .55fr));
	padding-bottom: 3rem;
}

.uar-footer-title {
	font-size: clamp(2.8rem, 5vw, 5rem) !important;
	letter-spacing: -.06em;
	line-height: .85 !important;
	max-width: 8ch;
}

.uar-footer-label {
	color: var(--uar-accent-bright);
	font-size: .7rem;
	font-weight: 850;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.uar-footer-links a {
	color: #cbd4df;
	text-decoration: none;
}

.uar-footer-links a:hover {
	color: var(--uar-accent-bright);
}

.uar-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .13);
	color: #98a7b8;
	font-size: .75rem;
	padding-top: 1.5rem;
}

.uar-page-hero {
	background: var(--uar-ink);
	color: var(--uar-white);
	padding-bottom: clamp(3.5rem, 8vw, 7rem);
	padding-top: clamp(3.5rem, 8vw, 7rem);
}

.uar-page-title {
	font-size: clamp(3.8rem, 9vw, 8rem) !important;
	letter-spacing: -.07em;
	line-height: .84 !important;
}

.uar-content-shell {
	padding-bottom: clamp(4rem, 8vw, 7rem);
	padding-top: clamp(3rem, 6vw, 5rem);
}

.uar-content-shell :where(h2, h3, h4) {
	letter-spacing: -.04em;
}

.uar-content-shell :where(p, li) {
	line-height: 1.75;
}

.uar-content-shell .wp-block-image img {
	border-radius: var(--uar-radius-md);
}

.uar-pagination {
	margin-top: 3rem;
}

.uar-pagination .page-numbers {
	border: 1px solid var(--uar-line);
	border-radius: 999px;
	display: inline-flex;
	min-height: 42px;
	min-width: 42px;
	padding: .5rem .8rem;
}

.uar-pagination .current {
	background: var(--uar-ink);
	color: var(--uar-white);
}

.uar-reveal {
	opacity: 0;
	transform: translateY(24px);
}

.uar-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity .7s var(--uar-ease), transform .7s var(--uar-ease);
}

@media (max-width: 980px) {
	.uar-header-cta {
		display: none;
	}

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

	.uar-stat:nth-child(2) {
		border-right: 0;
	}

	.uar-stat:nth-child(-n+2) {
		border-bottom: 1px solid rgba(255, 255, 255, .28);
	}

	.uar-section-heading,
	.uar-join-content {
		align-items: start;
		grid-template-columns: 1fr;
	}

	.uar-discipline-card,
	.uar-discipline-card:first-child,
	.uar-discipline-card:nth-child(4),
	.uar-discipline-card:nth-child(5) {
		grid-column: span 6;
	}

	.uar-discipline-card:nth-child(5) {
		grid-column: 1 / -1;
	}

	.uar-event-row {
		grid-template-columns: 90px minmax(0, 1fr) auto;
	}

	.uar-event-meta {
		display: none;
	}

	.uar-news-grid .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.uar-news-grid .wp-block-post:last-child {
		grid-column: 1 / -1;
	}

	.uar-footer-grid {
		grid-template-columns: 1.4fr 1fr;
	}

	.uar-footer-grid > :first-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.uar-header-inner {
		min-height: 68px;
	}

	.uar-brand-subtitle {
		display: none;
	}

	.uar-hero {
		min-height: 720px;
	}

	.uar-hero .wp-block-cover__image-background {
		object-position: 66% center;
	}

	.uar-hero .wp-block-cover__background {
		background: linear-gradient(180deg, rgba(6, 27, 82, .66) 0%, rgba(6, 27, 82, .86) 42%, rgba(6, 27, 82, .98) 100%) !important;
	}

	.uar-hero-content {
		align-items: flex-start;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		min-height: 620px;
	}

	.uar-hero-title {
		font-size: clamp(3.8rem, 18vw, 6rem) !important;
	}

	.uar-hero-actions .wp-block-button,
	.uar-hero-actions .wp-block-button__link {
		width: 100%;
	}

	.uar-stat {
		padding: 1.5rem 1rem;
	}

	.uar-discipline-grid {
		gap: .75rem;
	}

	.uar-discipline-card,
	.uar-discipline-card:first-child,
	.uar-discipline-card:nth-child(4),
	.uar-discipline-card:nth-child(5) {
		grid-column: 1 / -1;
		min-height: 270px;
	}

	.uar-event-row {
		align-items: start;
		gap: .45rem 1rem;
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.uar-event-tag {
		grid-column: 2;
		justify-self: start;
	}

	.uar-news-grid .wp-block-post-template {
		grid-template-columns: 1fr;
	}

	.uar-news-grid .wp-block-post:last-child {
		grid-column: auto;
	}

	.uar-join-card {
		border-radius: var(--uar-radius-md);
	}

	.uar-footer-grid {
		grid-template-columns: 1fr;
	}

	.uar-footer-grid > :first-child {
		grid-column: auto;
	}
}

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

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

	.uar-reveal {
		opacity: 1;
		transform: none;
	}
}
