/*
 Theme Name:   Rogue Rock Gym GeneratePress Child
 Description:  Rogue Rock Gym GeneratePress child theme
 Author:       Jesse Hodges
 Author URI:   https://www.twoloonsoftware.com/
 Template:     generatepress
 Version:      1.0
*/

/* Loads before GenerateBlocks' per-page CSS, so a block's own styles can override these classes. */

/* ---- Site-wide ---------------------------------------------------------- */

:is(.entry-content, .rrg-footer) :is(p, li) a:not([class]) {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
:is(.entry-content, .rrg-footer) :is(p, li) a:not([class]):hover {
	color: var(--accent);
}
:is(.entry-content, .rrg-footer) .rrg-section--dark :is(p, li) a:not([class]),
.rrg-footer :is(p, li) a:not([class]) {
	color: var(--base-3);
}
:is(.entry-content, .rrg-footer) .rrg-section--dark :is(p, li) a:not([class]):hover,
.rrg-footer :is(p, li) a:not([class]):hover {
	color: var(--accent-3);
}

:is(.entry-content, .rrg-footer) a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* Keep in-page anchors clear of the sticky header. */
.entry-content [id] {
	scroll-margin-top: 6rem;
}

/* ---- Buttons ------------------------------------------------------------ */

.rrg-btn-primary,
.rrg-btn-secondary,
.rrg-btn-third,
.rrg-btn-outline {
	align-items: center;
	border-radius: 4px;
	color: var(--base-3);
	display: inline-flex;
	font-weight: 600;
	gap: 0.5rem;
	justify-content: center;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.rrg-btn-primary:focus-visible,
.rrg-btn-secondary:focus-visible,
.rrg-btn-third:focus-visible,
.rrg-btn-outline:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}
:is(.rrg-section--dark, .rrg-page-hero) :is(.rrg-btn-primary, .rrg-btn-secondary, .rrg-btn-third):focus-visible {
	outline-color: var(--accent-3);
}

.rrg-btn-primary {
	background-color: var(--accent);
	min-height: 48px;
	padding: 0.75rem 1.375rem;
}
.rrg-btn-primary:hover {
	background-color: color-mix(in srgb, var(--accent) 82%, #000);
	color: var(--base-3);
}

/* Secondary and third default to light backgrounds and switch to white inside dark sections and heroes. */

/* Outline button (rrg-btn-outline is the older name for the light version) */
.rrg-btn-secondary,
.rrg-btn-outline {
	border: 1px solid color-mix(in srgb, var(--contrast) 35%, transparent);
	color: var(--contrast);
	min-height: 48px;
	padding: 0.75rem 1.375rem;
}
.rrg-btn-secondary:hover,
.rrg-btn-outline:hover {
	background-color: color-mix(in srgb, var(--contrast) 6%, transparent);
	border-color: var(--contrast);
	color: var(--contrast);
}
:is(.rrg-section--dark, .rrg-page-hero) .rrg-btn-secondary {
	border-color: rgba(255, 255, 255, 0.45);
	color: var(--base-3);
}
:is(.rrg-section--dark, .rrg-page-hero) .rrg-btn-secondary:hover {
	background-color: rgba(255, 255, 255, 0.08);
	border-color: var(--base-3);
	color: var(--base-3);
}
.rrg-btn-secondary svg {
	display: block;
	height: 1.125rem;
	width: 1.125rem;
}

/* Compact tinted action */
.rrg-btn-third {
	background-color: color-mix(in srgb, var(--contrast) 8%, transparent);
	color: var(--contrast);
	font-size: 0.875rem;
	min-height: 40px;
	padding: 0.5rem 0.875rem;
}
.rrg-btn-third:hover {
	background-color: color-mix(in srgb, var(--contrast) 15%, transparent);
	color: var(--contrast);
}
:is(.rrg-section--dark, .rrg-page-hero) .rrg-btn-third {
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--base-3);
}
:is(.rrg-section--dark, .rrg-page-hero) .rrg-btn-third:hover {
	background-color: rgba(255, 255, 255, 0.2);
	color: var(--base-3);
}
.rrg-btn-third svg {
	display: block;
	height: 0.9375rem;
	width: 0.9375rem;
}

@media (max-width: 767px) {
	.rrg-btn-third {
		min-height: 44px;
	}
}

/* ---- Page hero ---------------------------------------------------------- */

/* The background photo is set per page on the block itself. */
.rrg-page-hero {
	align-items: flex-end;
	background-color: var(--contrast);
	background-position: center;
	background-size: cover;
	color: var(--base-3);
	display: flex;
	min-height: 26rem;
	padding: 7rem 1.5rem 3.5rem;
	position: relative;
}
.rrg-page-hero::before {
	background-image: linear-gradient(90deg, rgba(19, 26, 38, 0.92) 0%, rgba(19, 26, 38, 0.75) 40%, rgba(19, 26, 38, 0.15) 75%);
	content: '';
	inset: 0;
	pointer-events: none;
	position: absolute;
}
.rrg-page-hero > .rrg-rail {
	position: relative;
	z-index: 1;
}
.rrg-page-hero--tall {
	min-height: min(78vh, 760px);
	padding-top: 6rem;
}
.rrg-page-hero-content {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 40rem;
}
.rrg-page-hero-content > * {
	margin: 0;
}
.rrg-page-title {
	color: var(--base-3);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0;
}
.rrg-page-hero .rrg-p--lead {
	color: var(--base-2);
	max-width: 34rem;
}
@media (max-width: 767px) {
	.rrg-page-hero {
		background-position: 30% top;
		min-height: 0;
		padding: 9rem 1.5rem 2.5rem;
	}
	.rrg-page-hero--tall {
		padding-top: 10rem;
	}
	.rrg-page-hero::before {
		background-image: linear-gradient(180deg, rgba(19, 26, 38, 0.35) 0%, rgba(19, 26, 38, 0.92) 55%);
	}
	.rrg-page-hero .rrg-actions:not(.rrg-actions--sub) > * {
		flex: 1 1 100%;
	}
}

.rrg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.rrg-actions--sub {
	gap: 0.5rem;
	margin-top: -0.75rem;
}

/* ---- Sections ----------------------------------------------------------- */

.rrg-section {
	padding: 5rem 1.5rem;
}
@media (max-width: 767px) {
	.rrg-section {
		padding-bottom: 3.5rem;
		padding-top: 3.5rem;
	}
}

.rrg-section--dark {
	background-color: var(--contrast);
	color: var(--base-2);
}
.rrg-section--dark :is(h1, h2, h3, h4) {
	color: var(--base-3);
}
.rrg-section--dark .rrg-label {
	color: var(--accent-3);
}

/* ---- Desktop menu --------------------------------------------------------- */

/* Set by js/nav-a11y.js when a group is clicked closed; beats GeneratePress's :hover/.sfHover rule. */
.main-navigation:not(.toggled) ul li.rrg-closed > ul {
	left: -99999px;
	opacity: 0;
	pointer-events: none;
}

/* ---- Off-canvas (mobile) menu ------------------------------------------- */

#generate-slideout-menu .main-nav,
#generate-slideout-menu .slideout-menu {
	width: 100%;
}
#generate-slideout-menu .slideout-menu {
	text-align: left;
}
#generate-slideout-menu .slideout-menu li {
	border-bottom: 1px solid color-mix(in srgb, var(--contrast) 10%, transparent);
	width: 100%;
}
#generate-slideout-menu .slideout-menu .sub-menu li:last-child {
	border-bottom: 0;
}
#generate-slideout-menu .slideout-menu a {
	align-items: center;
	display: flex;
	justify-content: space-between;
	min-height: 48px;
	padding: 0.25rem 0;
	width: 100%;
}
#generate-slideout-menu .slideout-menu .sub-menu {
	width: 100%;
}
#generate-slideout-menu .slideout-menu .sub-menu a {
	padding-left: 1rem;
}
#generate-slideout-menu .dropdown-menu-toggle {
	align-items: center;
	align-self: stretch;
	border-left: 0;
	display: flex;
	height: auto;
	margin: 0;
	padding: 0 0 0 1.5rem;
}

/* ---- Site footer (GeneratePress Element) ---------------------------------- */

.rrg-footer-bottom {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	text-align: center;
}
.rrg-footer-bottom > * {
	margin: 0;
}
.rrg-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
.rrg-footer .rrg-footer-links a:not([class]) {
	font-weight: 600;
	text-decoration: none;
}
.rrg-footer .rrg-footer-links a:not([class]):hover {
	text-decoration: underline;
}
.rrg-footer-social {
	display: flex;
	gap: 0.25rem;
	justify-content: center;
}
/* 44px tap target around a 1.25rem icon */
.rrg-social {
	align-items: center;
	color: var(--base-3);
	display: inline-flex;
	height: 44px;
	justify-content: center;
	transition: color 0.2s ease;
	width: 44px;
}
.rrg-social:hover {
	color: var(--accent-3);
}
.rrg-social svg {
	display: block;
	height: 1.25rem;
	width: 1.25rem;
}
@media (max-width: 767px) {
	.rrg-footer-bottom {
		align-items: flex-start;
		text-align: left;
	}
	.rrg-footer-links,
	.rrg-footer-social {
		justify-content: flex-start;
	}
	/* Pull the 44px icon tap targets back so the icons line up with the text edge. */
	.rrg-footer-social {
		margin-left: -0.625rem;
	}
}

.rrg-section--stone {
	background-color: var(--base);
}

.rrg-rail {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--gb-container-width);
	width: 100%;
}
.rrg-rail--narrow {
	max-width: 48rem;
}

/* ---- Type --------------------------------------------------------------- */

.rrg-heading {
	color: inherit;
	font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0;
}

.rrg-subheading {
	color: inherit;
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin: 0;
}

.rrg-label {
	color: var(--accent);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.rrg-subheading--sm {
	font-size: 1.125rem;
}

.rrg-p {
	margin: 0;
}
.rrg-p--lead {
	font-size: 1.1875rem;
}
.rrg-p--muted {
	color: var(--contrast-3);
}
.rrg-section--dark .rrg-p--muted {
	color: var(--accent-3);
}
.rrg-p--small {
	font-size: 0.9375rem;
	line-height: 1.5;
}

.rrg-list {
	margin: 0;
	padding-left: 1.25rem;
}
.rrg-list li + li {
	margin-top: 0.375rem;
}
.rrg-list--columns {
	column-gap: 3rem;
	columns: 2 16rem;
}
.rrg-list--columns li {
	break-inside: avoid;
}
.rrg-list--notes {
	color: var(--contrast-3);
	font-size: 0.9375rem;
}

/* ---- Layout ------------------------------------------------------------- */

.rrg-grid-3 {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1024px) {
	.rrg-grid-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 767px) {
	.rrg-grid-3 {
		grid-template-columns: 1fr;
	}
}

.rrg-grid-2 {
	display: grid;
	gap: 3rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 767px) {
	.rrg-grid-2 {
		gap: 2rem;
		grid-template-columns: 1fr;
	}
}

.rrg-grid-3--wide {
	gap: 3rem;
}
.rrg-grid-3--people {
	row-gap: 3.5rem;
}
@media (max-width: 1024px) and (min-width: 768px) {
	.rrg-span-tablet {
		grid-column: 1 / -1;
	}
}
@media (max-width: 767px) {
	.rrg-grid-3--wide,
	.rrg-grid-3--people {
		gap: 2rem;
	}
}

/* Heading beside content (1/3 + 2/3), stacked on tablet. */
.rrg-aside {
	display: grid;
	gap: 3rem;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
@media (max-width: 1024px) {
	.rrg-aside {
		gap: 2rem;
		grid-template-columns: 1fr;
	}
}

.rrg-section-head {
	align-items: flex-end;
	display: flex;
	gap: 1.5rem;
	justify-content: space-between;
	margin-bottom: 2.5rem;
}
.rrg-section-head .rrg-p {
	max-width: 28rem;
}
@media (max-width: 767px) {
	.rrg-section-head {
		align-items: flex-start;
		flex-direction: column;
	}
}

/* Vertical rhythm: flow for section-level blocks, stack for content columns. */
.rrg-flow {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}
.rrg-stack {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.rrg-stack-sm {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.rrg-flow > *,
.rrg-stack > *,
.rrg-stack-sm > * {
	margin: 0;
}
.rrg-stack > .rrg-list,
.rrg-stack > .rrg-pairs--price {
	align-self: stretch;
}
.rrg-stack > .rrg-subheading--sm {
	margin-top: 0.5rem;
}

.rrg-divided {
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	margin-top: 2.5rem;
	padding-top: 2.5rem;
}

/* Media beside content; --reverse puts the media on the right. */
.rrg-split {
	align-items: center;
	display: grid;
	gap: 3rem;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.rrg-split--reverse {
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.rrg-split--reverse > :first-child {
	order: 2;
}
@media (max-width: 767px) {
	.rrg-split,
	.rrg-split--reverse {
		gap: 2rem;
		grid-template-columns: 1fr;
	}
	.rrg-split--reverse > :first-child {
		order: 0;
	}
}

.rrg-media {
	aspect-ratio: 4 / 3;
	background-color: var(--base-2);
	border-radius: 8px;
	overflow: hidden;
}
.rrg-media--portrait {
	aspect-ratio: 4 / 5;
}
.rrg-media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
@media (max-width: 767px) {
	.rrg-media--portrait {
		aspect-ratio: 4 / 3;
	}
}

.rrg-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.rrg-card > * {
	margin: 0;
}
.rrg-card > .rrg-media {
	margin-bottom: 0.25rem;
}
/* Job title: sits tight under the name, with a hairline before the details. */
.rrg-card > .rrg-p--role {
	border-bottom: 1px solid color-mix(in srgb, var(--contrast) 12%, transparent);
	color: var(--accent);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	margin-top: -0.75rem;
	padding-bottom: 1rem;
}

/* Pricing plans: a genuinely distinct, comparable unit, so it gets a light outline. */
.rrg-plans {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.rrg-plan {
	align-items: flex-start;
	background-color: var(--base-3);
	border: 1px solid color-mix(in srgb, var(--contrast) 14%, transparent);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 1.75rem;
}
.rrg-plan > * {
	margin: 0;
}
.rrg-plan > .rrg-pairs--price {
	align-self: stretch;
}
.rrg-plan > .rrg-list {
	flex: 1;
}

/* Column with a hairline on top; the line follows the text colour on light or dark sections. */
.rrg-ruled {
	align-items: flex-start;
	border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-top: 1.25rem;
}

/* ---- Link cards --------------------------------------------------------- */

.rrg-tile {
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	text-decoration: none;
}
.rrg-tile img {
	transition: transform 0.4s ease;
}
.rrg-tile svg {
	transition: transform 0.2s ease;
}
.rrg-tile:hover img {
	transform: scale(1.03);
}
.rrg-tile:hover svg {
	transform: translateX(3px);
}
.rrg-tile:focus-visible {
	border-radius: 8px;
	outline: 2px solid var(--accent);
	outline-offset: 4px;
}

.rrg-tile-media {
	aspect-ratio: 4 / 5;
	background-color: var(--base-2);
	border-radius: 8px;
	overflow: hidden;
}
.rrg-tile-media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
@media (max-width: 1024px) {
	.rrg-tile-media {
		aspect-ratio: 3 / 4;
	}
}
@media (max-width: 767px) {
	.rrg-tile-media {
		aspect-ratio: 16 / 10;
	}
}

.rrg-row-link {
	align-items: center;
	color: inherit;
	display: grid;
	gap: 1rem;
	grid-template-columns: 88px minmax(0, 1fr);
	text-decoration: none;
}
.rrg-row-link img {
	border-radius: 8px;
	display: block;
	height: 88px;
	object-fit: cover;
	width: 88px;
}
.rrg-row-link:hover h3 {
	color: var(--accent);
}
.rrg-row-link:focus-visible {
	border-radius: 8px;
	outline: 2px solid var(--accent);
	outline-offset: 4px;
}
.rrg-row-link-text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	min-width: 0;
}
.rrg-row-link-text > * {
	margin: 0;
}

.rrg-tiles {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1024px) {
	.rrg-tiles {
		gap: 1rem;
	}
}
@media (max-width: 767px) {
	.rrg-tiles {
		gap: 2rem;
		grid-template-columns: 1fr;
	}
}
.rrg-tile > * {
	margin: 0;
}
.rrg-tile-title {
	align-items: center;
	display: flex;
	gap: 0.5rem;
}
.rrg-tile-title svg {
	color: var(--accent);
	display: block;
	height: 1.25rem;
	width: 1.25rem;
}

/* ---- Label / value pairs: hours, prices, program facts ------------------- */

.rrg-pairs {
	column-gap: 1.5rem;
	display: grid;
	font-variant-numeric: tabular-nums;
	grid-template-columns: auto auto;
	justify-content: start;
	row-gap: 0.5rem;
}
.rrg-pairs > :nth-child(odd) {
	font-weight: 600;
}
.rrg-section--dark .rrg-pairs > :nth-child(odd) {
	color: var(--base-3);
}

.rrg-pairs--hero {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--accent-3);
	column-gap: 1.25rem;
	font-size: 0.9375rem;
	margin-top: 0.5rem;
	padding-top: 1.25rem;
	row-gap: 0.25rem;
}
.rrg-pairs--hero > :nth-child(odd) {
	color: var(--base-3);
}

.rrg-pairs--price {
	grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr);
	justify-content: stretch;
	row-gap: 0;
}
.rrg-pairs--price > * {
	border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
	padding: 0.5rem 0;
}
.rrg-pairs--price > :nth-child(odd) {
	font-weight: 400;
}
.rrg-pairs--price > :nth-child(even) {
	font-weight: 700;
	text-align: right;
}

/* ---- FAQ (core Details blocks) ------------------------------------------- */

.rrg-faq {
	border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.rrg-faq details {
	border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
	margin: 0;
}
.rrg-faq summary {
	cursor: pointer;
	display: flex;
	font-size: 1.125rem;
	font-weight: 700;
	gap: 1rem;
	justify-content: space-between;
	list-style: none;
	padding: 1.25rem 0;
}
.rrg-faq summary::-webkit-details-marker {
	display: none;
}
.rrg-faq summary::after {
	color: var(--accent);
	content: '+';
	flex-shrink: 0;
	font-size: 1.5rem;
	line-height: 1;
}
.rrg-faq details[open] summary::after {
	content: '−';
}
.rrg-faq summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}
.rrg-faq details > p {
	margin: 0 0 1.25rem;
	max-width: 42rem;
}

/* ---- RockGymPro widgets -------------------------------------------------- */

/* [rgp] shortcode frame. Height is set from inside the frame once the widget loads. */
.rrg-embed {
	border: 0;
	display: block;
	height: 16rem;
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.rrg-tile img,
	.rrg-tile svg,
	.rrg-btn-primary,
	.rrg-btn-secondary,
	.rrg-btn-third,
	.rrg-btn-outline {
		transition: none;
	}
}

