/*
 * DawnSpar guides page (the posts page, templates/home.html). Recreates DawnSpar's "Boxing Training Guides"
 * reference (Nov 2026, docs/design/reference-guides-page/). Loaded only on that page, after home.css
 * (shared header, footer and palette). Cards come from the dawnspar/guide-grid block (plugin).
 */

.dsg-red { color: var(--h-red); }
.dsg-main { position: relative; }
.dsg-main > .alignfull + .alignfull { margin-block-start: 0; }

/* -------------------------------------------------------------------- hero */
.dsg-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: center;
	min-height: clamp(380px, 29.3vw, 440px);
	padding-block: clamp(1.5rem, 2.2vw, 2rem) !important;
	background:
		radial-gradient(42% 75% at 46% 100%, rgba(227, 38, 54, 0.22), transparent 72%),
		linear-gradient(100deg, #0B0B0E 0%, #121216 45%, #0E0E11 100%);
}
.dsg-hero::after { /* red line along the bottom edge, strongest under the text */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, rgba(227, 38, 54, 0.15) 0%, rgba(240, 68, 68, 0.95) 34%, rgba(227, 38, 54, 0.55) 56%, rgba(227, 38, 54, 0.08) 100%);
	box-shadow: 0 0 14px rgba(227, 38, 54, 0.55);
}
.dsg-hero > .dsg-hero__visual,
.dsg-hero > .dsg-hero__slash {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 52%;
	max-width: none !important;
	margin: 0 !important;
}
.dsg-hero > .dsg-hero__visual { z-index: -1; clip-path: polygon(15% 0, 100% 0, 100% 100%, 1.5% 100%); }
.dsg-hero__visual picture,
.dsg-hero__visual img { display: block; width: 100%; height: 100%; }
.dsg-hero__visual img { object-fit: cover; object-position: 60% 70%; transform: scale(1.22); transform-origin: 62% 82%; }
.dsg-hero__visual::after { /* blend the photo into the dark hero on its left */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(11, 11, 14, 0.55) 0%, rgba(11, 11, 14, 0) 34%), linear-gradient(0deg, rgba(11, 11, 14, 0.35), transparent 30%);
	pointer-events: none;
}
.dsg-hero > .dsg-hero__slash { z-index: 0; height: 100%; overflow: visible; pointer-events: none; }
.dsg-hero__slash line { stroke: url(#dsg-slash-fade); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(227, 38, 54, 0.9)); }
.dsg-hero > .dsg-hero__content { position: relative; z-index: 1; width: 100%; }
.dsg-hero__content > * { max-width: 36rem; }

.dsg-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1rem;
	color: var(--h-red);
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.dsg-eyebrow a { color: inherit; text-decoration: none; }
.dsg-eyebrow a:hover { color: var(--h-red2); }
.dsg-topic[aria-current="page"] { cursor: default; }
.dsg-topic[aria-current="page"]:hover { transform: none; }
.dsg-eyebrow::before,
.dsg-eyebrow::after { content: ""; width: 1.4rem; height: 2px; background: var(--h-red); }
.dsg-hero__title {
	margin: 0 0 1.25rem;
	color: #fff;
	font-size: clamp(2.6rem, 0.9rem + 4.3vw, 4.8rem);
	font-weight: 800;
	font-style: italic;
	line-height: 0.98;
	letter-spacing: -0.025em;
}
.dsg-hero__title .dsg-red { display: block; }
.dsg-hero .dsg-hero__lead { max-width: 33.5rem; margin: 0 0 1.7rem; color: #F2F2F4; font-size: clamp(1.05rem, 0.8rem + 0.6vw, 1.33rem); font-weight: 500; line-height: 1.42; }

.dsg-topics { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; }
.dsg-topic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	min-height: 60px;
	padding: 0 2rem;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	color: #fff;
	font-size: 1.12rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.dsg-topic:hover { border-color: #fff; background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.dsg-topic--primary { border-color: var(--h-red); background: var(--h-red); }
.dsg-topic--primary:hover { border-color: #C81E2D; background: #C81E2D; }
.dsg-topic:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dsg-topic svg { flex: none; }

/* ------------------------------------------------------------------ guides */
.dsg-guides {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(1.75rem, 2.5vw, 2.25rem) clamp(4rem, 9vw, 7.5rem) !important;
	background:
		radial-gradient(38% 30% at 82% 98%, rgba(227, 38, 54, 0.26), transparent 70%),
		radial-gradient(60% 40% at 50% 0%, rgba(255, 255, 255, 0.03), transparent 70%),
		linear-gradient(180deg, #111216 0%, #0C0D10 100%);
}
.dsg-guides::before { /* soft red light streak bottom right */
	content: "";
	position: absolute;
	z-index: -1;
	right: -10%;
	bottom: 6%;
	width: 75%;
	height: 22%;
	border-radius: 50%;
	border-top: 2px solid rgba(227, 38, 54, 0.55);
	filter: blur(3px);
	transform: rotate(-7deg);
	opacity: 0.7;
	pointer-events: none;
}
.dsg-head { margin-bottom: clamp(1.75rem, 3vw, 2.75rem) !important; text-align: center; }
.dsg-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(1rem, 2.3vw, 2rem);
	margin: 0 0 0.6rem;
	color: #fff;
	font-size: clamp(2rem, 1.2rem + 2.3vw, 3.1rem);
	font-weight: 800;
	font-style: italic;
	line-height: 1.1;
	letter-spacing: -0.02em;
}
.dsg-title::before,
.dsg-title::after { content: ""; flex: 0 1 8.5rem; height: 3px; border-radius: 3px; }
.dsg-title::before { background: linear-gradient(90deg, transparent, var(--h-red)); }
.dsg-title::after { background: linear-gradient(90deg, var(--h-red), transparent); }
.dsg-sub { margin: 0; color: #D3D5DA; font-weight: 500; font-size: clamp(1rem, 0.9rem + 0.3vw, 1.15rem); }

.dsg-grid-wrap { max-width: min(1280px, 100%) !important; }
.dsg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1.8rem; }
.dsg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #3A3B42;
	border-radius: 16px;
	background: linear-gradient(180deg, #17181C 0%, #121317 100%);
	transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.dsg-card:hover { border-color: rgba(227, 38, 54, 0.7); transform: translateY(-3px); box-shadow: 0 14px 34px -18px rgba(227, 38, 54, 0.6); }
.dsg-card:focus-within { border-color: var(--h-red); }
.dsg-card__media { position: relative; aspect-ratio: 2.12 / 1; overflow: hidden; background: #1A1B20; }
.dsg-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #17181C 0%, rgba(23, 24, 28, 0.55) 22%, rgba(23, 24, 28, 0) 55%); pointer-events: none; }
.dsg-card__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.dsg-card:hover .dsg-card__img { transform: scale(1.035); }
.dsg-card__img--empty { background: radial-gradient(70% 90% at 70% 30%, rgba(227, 38, 54, 0.35), transparent 70%), #1A1B20; }
.dsg-card__body { position: relative; display: flex; flex: 1; flex-direction: column; margin-top: -1.95rem; padding: 0 2.1rem 1.1rem; }
.dsg-card__cat {
	align-self: flex-start;
	margin: 0 0 0.85rem;
	padding: 0.32rem 0.8rem;
	border-radius: 999px;
	background: var(--h-red);
	color: #fff;
	font-size: 0.86rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.dsg-card__title { margin: 0 0 0.85rem; color: #fff; font-size: clamp(1.25rem, 0.95rem + 0.7vw, 1.58rem); font-weight: 800; line-height: 1.24; letter-spacing: -0.01em; }
.dsg-card__link { color: inherit !important; text-decoration: none; }
.dsg-card__link::after { content: ""; position: absolute; z-index: 1; inset: -100vh -100vw; } /* clipped by the card: whole card is the link */
.dsg-card__link:focus-visible { outline: none; }
.dsg-card__text { margin: 0 0 1.3rem; color: #C9CBD1; font-size: 1.06rem; font-weight: 500; line-height: 1.36; }
.dsg-card__meta { display: flex; align-items: center; gap: 1rem; margin-top: auto; color: #fff; font-size: 1.02rem; font-weight: 500; }
.dsg-card__level,
.dsg-card__time { display: inline-flex; align-items: center; gap: 0.55rem; }
.dsg-card__level svg,
.dsg-card__time svg { color: var(--h-red); }
.dsg-card__time svg { color: #fff; }
.dsg-card__level + .dsg-card__time { padding-left: 1rem; border-left: 1px solid #4A4B52; }
.dsg-card__go {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin-left: auto;
	border-radius: 50%;
	background: var(--h-red);
	color: #fff;
	box-shadow: 0 0 16px rgba(227, 38, 54, 0.45);
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.dsg-card:hover .dsg-card__go { background: #F04444; transform: translateX(2px); }
.dsg-empty { color: var(--h-muted); text-align: center; }

.dsg-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.dsg-pages .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 0.9rem; border: 1px solid #3A3B42; border-radius: 999px; color: #fff; text-decoration: none; }
.dsg-pages .page-numbers.current,
.dsg-pages a.page-numbers:hover { border-color: var(--h-red); background: var(--h-red); }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
	.dsg-card,
	.dsg-card__img,
	.dsg-card__go,
	.dsg-topic { transition: none; }
	.dsg-card:hover,
	.dsg-card:hover .dsg-card__img,
	.dsg-card:hover .dsg-card__go { transform: none; }
}

/* ------------------------------------------------------------------ tablet */
@media (max-width: 1100px) {
	.dsg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dsg-hero > .dsg-hero__visual,
	.dsg-hero > .dsg-hero__slash { width: 50%; }
	.dsg-hero__content > * { max-width: 27rem; }
	.dsg-topic { min-height: 54px; padding: 0 1.5rem; font-size: 1.02rem; }
	.dsg-card__body { padding-inline: 1.6rem; }
}

/* ------------------------------------------------------------------ mobile */
@media (max-width: 781px) {
	.dsg-hero { flex-direction: column; align-items: stretch; min-height: 0; padding-top: 0 !important; padding-bottom: 2.25rem !important; }
	.dsg-hero > .dsg-hero__visual { position: relative; z-index: 0; width: auto; height: auto; aspect-ratio: 16 / 10; margin-inline: calc(-1 * var(--h-pad)) !important; clip-path: none; }
	.dsg-hero__visual::after { background: linear-gradient(0deg, #0E0E11 0%, rgba(14, 14, 17, 0.6) 22%, rgba(14, 14, 17, 0) 50%); }
	.dsg-hero__visual img { object-position: 50% 55%; transform: none; }
	.dsg-hero > .dsg-hero__slash { display: none; }
	.dsg-hero > .dsg-hero__content { margin-top: -1.5rem; }
	.dsg-hero__content > * { max-width: none; }
	.dsg-eyebrow { font-size: 0.92rem; margin-bottom: 0.8rem; }
	.dsg-hero__lead { margin-bottom: 1.4rem; }
	.dsg-topics { gap: 0.7rem; }
	.dsg-topic { flex: 1 1 10rem; min-height: 52px; padding: 0 1rem; font-size: 1rem; }
	.dsg-hero::after { background: linear-gradient(90deg, rgba(227, 38, 54, 0.1), rgba(240, 68, 68, 0.9) 50%, rgba(227, 38, 54, 0.1)); }
	.dsg-guides { padding-top: 2rem !important; }
	.dsg-title::before,
	.dsg-title::after { flex-basis: 2.5rem; }
	.dsg-grid { grid-template-columns: 1fr; gap: 1.1rem; }
	.dsg-card__body { padding: 0 1.25rem 1.15rem; margin-top: -1.7rem; }
	.dsg-card__text { font-size: 1rem; margin-bottom: 1.1rem; }
	.dsg-card__meta { font-size: 0.96rem; gap: 0.8rem; }
	.dsg-card__level + .dsg-card__time { padding-left: 0.8rem; }
	.dsg-card__go { width: 40px; height: 40px; }
}
