/* Club Orión: additions to the ALPS theme (colour scheme nad-vine).
   Palette: moss/forest from the scheme, bark brown and ember orange from ALPS's nad-branch and nad-spark. */
:root {
	--orion-forest: #1e2519;
	--orion-moss: #364d26;
	--orion-leaf: #4a7729;
	--orion-bark: #4e3629;
	--orion-ember: #d86018;
	--orion-ember-dark: #b34d10;
	--orion-sand: #f3f5f2;
	--orion-line: #d9dfd3;
}

/* ---- Inner page headers: the trail map under the title ---- */
/* A header with a club photo (ALPS's `has-background`) keeps the photo; the others get the map. */
.c-page-header.u-theme--background-color--dark:not(.has-background) {
	background-image: url("topo.svg");
	background-size: 900px auto;
	background-position: right -120px center;
	background-repeat: no-repeat;
}

/* The photos are group portraits: keep the faces in the thin band. */
.c-page-header.has-background { background-position: center 28%; }

/* ---- Home page sections (built with core blocks, see setup/pages.php) ---- */
.orion-section-title {
	position: relative;
	margin-top: 2.5rem;
	padding-top: 1.1rem;
	letter-spacing: .01em;
}
.orion-section-title::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--orion-ember);
}
.orion-lead { font-size: 1.15em; max-width: 46rem; }

.orion-cards { gap: 1.5rem; margin-top: 1.5rem; }
.orion-card {
	height: 100%;
	padding: 0 0 1.4rem;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--orion-line);
	border-top: 5px solid var(--orion-moss);
	border-radius: 4px;
	transition: transform .18s ease, box-shadow .18s ease;
}
.orion-card:hover, .orion-card:focus-within { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30, 37, 25, .14); }
/* The club's photo fills the top of the card; its icon sits on the photo's lower edge as a round badge. */
.orion-card__photo { margin: 0; }
.orion-card__photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 35%; }
.orion-card__icon {
	position: relative;
	width: 56px;
	height: 56px;
	margin: -28px 0 .5rem 1.5rem;
	background: var(--orion-sand);
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(30, 37, 25, .25);
}
.orion-card__icon img { display: block; width: 100%; height: 100%; padding: 9px; }
.orion-card > :not(.orion-card__photo):not(.orion-card__icon) { margin-inline: 1.5rem; }
.orion-card__age {
	display: inline-block;
	margin: 0 0 .4rem;
	padding: .15rem .7rem;
	border: 1.5px solid var(--orion-ember);
	border-radius: 999px;
	color: var(--orion-ember-dark);
	font-size: .8em;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.orion-card h3 { margin-top: .2rem; }

.orion-field {
	margin-top: 2.5rem;
	padding: 2.2rem 2rem 2.4rem;
	background-color: var(--orion-moss);
	background-image: url("topo.svg");
	background-size: 800px auto;
	background-position: right -80px center;
	background-repeat: no-repeat;
	color: #fff;
	border-radius: 4px;
}
.orion-field h2, .orion-field h3, .orion-field p { color: #fff; }
.orion-field .orion-section-title::before { background: #ffa06c; }
.orion-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .9rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.orion-chips li { margin: 0; padding: 0; }
.orion-chips li::before { content: none !important; }
.orion-chips a {
	display: block;
	padding: .55rem .8rem;
	background: rgba(255, 255, 255, .1);
	border-left: 4px solid #ffa06c;
	border-radius: 2px;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.orion-chips a:hover, .orion-chips a:focus { background: rgba(255, 255, 255, .22); }
@media (max-width: 600px) { .orion-chips { grid-template-columns: 1fr; } }

/* "Últimas aventuras": the shared plugin's [UltimasNovedades], in the club's greens (it reads the same variables as the post list). */
.orion-news .advenz-latest {
	--advenz-list-accent: var(--orion-leaf);
	--advenz-list-line: var(--orion-line);
	--advenz-list-ink: var(--orion-forest);
	--advenz-list-muted: #5b6b52;
}
.orion-news .advenz-latest__title { text-decoration: none; }
.orion-news .advenz-latest__title:hover, .orion-news .advenz-latest__title:focus { text-decoration: underline; }
.orion-news .advenz-latest__more { margin-top: 1.5rem; }
.orion-news .advenz-latest__more a {
	display: inline-block;
	padding: .6rem 1.4rem;
	border: 2px solid var(--orion-moss);
	border-radius: 999px;
	color: var(--orion-moss);
	font-weight: 700;
	text-decoration: none;
}
.orion-news .advenz-latest__more a:hover, .orion-news .advenz-latest__more a:focus { background: var(--orion-moss); color: #fff; }

.orion-cta {
	margin-top: 2.5rem;
	padding: 2rem;
	background: var(--orion-bark);
	color: #fff;
	border-radius: 4px;
}
.orion-cta h2, .orion-cta p { color: #fff; }
.orion-cta .wp-block-button__link { background: var(--orion-ember); color: #fff; border-color: var(--orion-ember); }
.orion-cta .wp-block-button__link:hover { background: var(--orion-ember-dark); }

.orion-hub { gap: 1.5rem; margin-top: 1.2rem; }
.orion-hub ul { list-style: none; margin: .4rem 0 0; padding: 0; }
.orion-hub li::before { content: none !important; }
.orion-hub li a { display: block; padding: .5rem 0; border-bottom: 1px solid var(--orion-line); font-weight: 600; }

/* ---- Home hero (ALPS's own hero, restyled) ---- */
.c-hero .c-media-block__title {
	font-size: clamp(2.8rem, 7vw, 5rem);
	line-height: 1;
	letter-spacing: -.01em;
	text-shadow: 0 2px 22px rgba(0, 0, 0, .5);
}
.c-hero .c-block__category {
	color: #ffa06c;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.c-hero .c-block__button.o-button--outline {
	background: var(--orion-ember);
	border-color: var(--orion-ember);
	color: #fff;
	font-weight: 700;
}
.c-hero .c-block__button.o-button--outline:hover,
.c-hero .c-block__button.o-button--outline:focus { background: var(--orion-ember-dark); border-color: var(--orion-ember-dark); }
.c-hero .c-media-block__image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(30, 37, 25, .15) 0%, rgba(30, 37, 25, .15) 40%, rgba(30, 37, 25, .72) 100%);
	pointer-events: none;
}

/* ---- Layout of the sections ---- */
.orion-wrap { max-width: 1120px; margin-inline: auto; padding: 0 1.5rem 3rem; }
.orion-cards .wp-block-column { display: flex; }
.orion-card { display: flex; flex-direction: column; width: 100%; }
.orion-card .wp-block-buttons { margin-top: auto; padding-top: 1rem; }
.orion-card p { margin-block: .3rem; }

/* ---- Buttons in the club's colours (ALPS's default is grey) ---- */
.wp-block-button__link, .wp-element-button {
	background: var(--orion-moss);
	color: #fff;
	border: 2px solid var(--orion-moss);
	border-radius: 999px;
	font-weight: 700;
	transition: background .15s ease, border-color .15s ease;
}
.wp-block-button__link:hover, .wp-block-button__link:focus { background: var(--orion-forest); border-color: var(--orion-forest); color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--orion-moss); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--orion-moss); color: #fff; }

/* ---- Small spacing fixes ---- */
.orion-section-title + .orion-lead { margin-top: .9rem; }
.orion-wrap > p:last-child { margin-top: 2.5rem; color: #555; }

/* WordPress stacks columns below 782px but ALPS leaves a left margin on the 2nd and 3rd. */
@media (max-width: 781px) {
	.orion-cards > .wp-block-column,
	.orion-hub > .wp-block-column { margin-left: 0 !important; flex-basis: 100% !important; }
	.orion-wrap { padding-inline: 1rem; }
}

/* ---- Lists of posts from the shared plugin ([MostrarListaTitulosPosts]): the club's greens.
   The list lives in a shadow root, so a theme only sets these variables on the host element. ---- */
.advenz-list {
	--advenz-list-accent: var(--orion-leaf);
	--advenz-list-tint: #eef3e8;
	--advenz-list-line: var(--orion-line);
	--advenz-list-ink: var(--orion-forest);
	--advenz-list-muted: #5b6b52;
}

/* A card with no photo (the setup was run without one): the icon stands alone, as before. */
.orion-card > .orion-card__icon:first-child { margin: 1.6rem 1.5rem .8rem; background: none; border: 0; box-shadow: none; border-radius: 0; width: auto; height: auto; }
.orion-card > .orion-card__icon:first-child img { width: 60px; height: 60px; padding: 0; }

/* ---- The shield alone is the logo: keep the header at a normal height ---- */
.c-header__logo.c-logo img.style-svg { width: auto; height: 100px; max-width: none; }
@media (max-width: 700px) { .c-header__logo.c-logo img.style-svg { height: 72px; } }
