/* =====================================================
   Adventure Medic — Homepage hero + recent list layout
   ===================================================== */

.tam-homepage {
	padding: 0;
	margin: 0;
}

/* Remove default GP padding from the content container on the front page */
.home .site-content .inside-site-content {
	padding: 0;
}

/* ---- Two-column wrapper ---- */
.tam-home-hero-wrap {
	display: flex;
	align-items: stretch;
	min-height: 500px;
	max-width: 100%;
}

/* =====================================================
   Hero (left, ~65 %)
   ===================================================== */
.tam-hero-slides {
	flex: 0 0 65%;
	position: relative;
	min-height: 500px;
}

.tam-hero {
	position: absolute;
	inset: 0;
	display: block;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
	background-color: #1a1a1a;
	text-decoration: none;
	color: #fff;
}

.tam-hero.is-active {
	opacity: 1;
	pointer-events: auto;
}

.tam-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.tam-hero:hover .tam-hero__bg {
	opacity: var(--tam-hero-hover-opacity, 0.6);
}

/* Nav buttons */
.tam-hero-nav {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: flex;
	gap: 0.35rem;
	z-index: 10;
}

.tam-hero-nav__btn {
	width: 34px;
	height: 34px;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	border-radius: 2px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s;
	flex-shrink: 0;
}

.tam-hero-nav__btn:hover {
	background: rgba(0, 0, 0, 0.75);
}

.tam-hero-nav__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.tam-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, var(--tam-hero-gradient-darkness, 0.85)) 0%,
		rgba(0, 0, 0, calc(var(--tam-hero-gradient-darkness, 0.85) * 0.7)) calc(var(--tam-hero-gradient-height, 33%) * 0.6),
		transparent var(--tam-hero-gradient-height, 33%)
	);
}

.tam-hero__text {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 2rem 2rem 1.75rem;
}

.tam-hero__cat {
	display: inline-block;
	background: #c0392b;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.2em 0.65em;
	margin-bottom: 0.65rem;
}

.tam-hero__title {
	font-size: clamp(1.4rem, 2.4vw, 2rem);
	line-height: 1.2;
	margin: 0 0 0.6rem;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.tam-hero__excerpt {
	font-size: 1rem;
	line-height: 1.5;
	margin: 0 0 0.85rem;
	opacity: 0.88;
	max-width: 44em;
}

.tam-hero__read-more {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #fff;
}

.tam-hero:hover {
	color: #fff;
	text-decoration: none;
}

.tam-hero:hover .tam-hero__title {
	color: #fff;
	text-decoration: none;
}

.tam-hero:hover .tam-hero__excerpt {
	color: #fff;
	text-decoration: none;
}

.tam-hero:hover .tam-hero__read-more {
	color: #fff;
}

.tam-hero--freeze-text-hover .tam-hero:hover,
.tam-hero--freeze-text-hover .tam-hero:hover .tam-hero__title,
.tam-hero--freeze-text-hover .tam-hero:hover .tam-hero__excerpt {
	color: #fff;
	text-decoration: none;
}

.tam-hero--freeze-text-hover .tam-hero:hover .tam-hero__read-more {
	color: #fff;
}

/* =====================================================
   Recent-list column (right, ~35 %)
   ===================================================== */
.tam-hero-sidebar {
	flex: 0 0 35%;
	display: flex;
	flex-direction: column;
	border-left: 1px solid #e0e0e0;
}

.tam-hero-sidebar .tam-section__heading {
	margin: 0;
	padding: 0rem 1rem 0.6rem;
	border-bottom: none;
	text-transform: none;
	letter-spacing: 0;
	font-size: 1.6rem;
}

.tam-recent-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.tam-recent-list__item {
	flex: 1;
	display: flex;
	border-bottom: 1px solid #e0e0e0;
}

.tam-recent-list__item:last-child {
	border-bottom: 0;
}

.tam-recent-list__item:hover {
	background: rgba(30, 115, 190, 0.05);
}

.tam-recent-list__link {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	padding: 0.9rem 1rem;
	text-decoration: none;
	color: inherit;
	width: 100%;
}



.tam-recent-list__thumb {
	flex: 0 0 80px;
	width: 80px;
	height: 75px;
	object-fit: cover;
	display: block;
}

.tam-recent-list__thumb-spacer {
	flex: 0 0 80px;
	width: 80px;
	height: 75px;
	border: 1px solid #d0d0d0;
	background: #ebebeb;
}

.tam-recent-list__body {
	flex: 1;
	min-width: 0;
}

.tam-recent-list__cat {
	display: inline-block;
	font-size: 0.63rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #c0392b;
	margin-bottom: 0.3rem;
}

.tam-recent-list__title {
	font-size: 1rem;
	line-height: 1.35;
	margin: 0 0 0.3rem;
	font-weight: 600;
}

.tam-recent-list__link:hover .tam-recent-list__title {
	color: var( --tam-link-hover-color );
}

.tam-recent-list__date {
	font-size: 0.73rem;
	color: #888;
}

/* =====================================================
   Hero Alternative — full-width hero, Feature Articles grid
   below reuses the Latest Adventures card markup/classes directly
   (.tam-ladv-section / .tam-ladv__heading / .tam-ladv-grid / .tam-ladv-card__*)
   so the two stay visually identical.
   ===================================================== */
.tam-home-hero-alt-wrap {
	display: flex;
	flex-direction: column;
	max-width: 100%;
}

.tam-hero-alt-slides {
	width: 100%;
	position: relative;
	min-height: 500px;
}

.tam-hero-alt {
	position: absolute;
	inset: 0;
	display: block;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
	background-color: #1a1a1a;
	text-decoration: none;
	color: #fff;
}

.tam-hero-alt.is-active {
	opacity: 1;
	pointer-events: auto;
}

.tam-hero-alt__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.tam-hero-alt:hover .tam-hero-alt__bg {
	opacity: var(--tam-hero-alt-hover-opacity, 0.6);
}

.tam-hero-alt-nav {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: flex;
	gap: 0.35rem;
	z-index: 10;
}

.tam-hero-alt-nav__btn {
	width: 34px;
	height: 34px;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	border-radius: 2px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s;
	flex-shrink: 0;
}

.tam-hero-alt-nav__btn:hover {
	background: rgba(0, 0, 0, 0.75);
}

.tam-hero-alt-nav__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.tam-hero-alt__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, var(--tam-hero-alt-gradient-darkness, 0.85)) 0%,
		rgba(0, 0, 0, calc(var(--tam-hero-alt-gradient-darkness, 0.85) * 0.7)) calc(var(--tam-hero-alt-gradient-height, 33%) * 0.6),
		transparent var(--tam-hero-alt-gradient-height, 33%)
	);
}

.tam-hero-alt__text {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 2rem 2rem 1.75rem;
}

.tam-hero-alt__cat {
	display: inline-block;
	background: #c0392b;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.2em 0.65em;
	margin-bottom: 0.65rem;
}

.tam-hero-alt__title {
	font-size: clamp(1.4rem, 2.4vw, 2rem);
	line-height: 1.2;
	margin: 0 0 0.6rem;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.tam-hero-alt__excerpt {
	font-size: 1rem;
	line-height: 1.5;
	margin: 0 0 0.85rem;
	opacity: 0.88;
	max-width: 44em;
}

.tam-hero-alt__read-more {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #fff;
}

.tam-hero-alt:hover {
	color: var( --tam-link-hover-color );
	text-decoration: none;
}

.tam-hero-alt:hover .tam-hero-alt__title {
	color: var( --tam-link-hover-color );
	text-decoration: none;
}

.tam-hero-alt:hover .tam-hero-alt__excerpt {
	color: var( --tam-link-hover-color );
	text-decoration: none;
}

.tam-hero-alt:hover .tam-hero-alt__read-more {
	color: var( --tam-link-hover-color );
}

.tam-hero-alt--freeze-text-hover .tam-hero-alt:hover,
.tam-hero-alt--freeze-text-hover .tam-hero-alt:hover .tam-hero-alt__title,
.tam-hero-alt--freeze-text-hover .tam-hero-alt:hover .tam-hero-alt__excerpt {
	color: #fff;
	text-decoration: none;
}

.tam-hero-alt--freeze-text-hover .tam-hero-alt:hover .tam-hero-alt__read-more {
	color: #fff;
}

/* =====================================================
   Section shared styles
   ===================================================== */
.tam-section__heading {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 1.25rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid #1a1a1a;
	color: #1a1a1a;
}

.tam-section__heading a {
	text-decoration: none;
}

.tam-section__heading a:hover {
	text-decoration: underline;
}

/* =====================================================
   Adventures grid
   ===================================================== */
.tam-adv-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

.tam-adv-grid__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.tam-adv-grid__img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.tam-adv-grid__img--placeholder {
	background: #ddd;
}

.tam-adv-grid__link:hover .tam-adv-grid__title {
	color: #c0392b;
}

.tam-adv-grid__body {
	padding: 0.6rem 0 0;
}

.tam-adv-grid__title {
	font-size: 0.92rem;
	line-height: 1.35;
	margin: 0 0 0.25rem;
	font-weight: 600;
	color: #1a1a1a;
}

.tam-adv-grid__date {
	font-size: 0.73rem;
	color: #888;
}

/* =====================================================
   Latest Adventures block (tam/latest-adventures)
   Typography mirrors .tam-hero-sidebar / .tam-recent-list
   ===================================================== */
.tam-ladv-section {
	margin-top: 3rem;
	margin-bottom: 0;
}

/* 3-column card grid */
.tam-ladv-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.tam-ladv-card__link {
	display: block;
	box-sizing: border-box;
	padding: 0.4rem;
	text-decoration: none;
	color: inherit;
}

.tam-ladv-card__link:hover {
	background: rgba(30, 115, 190, 0.05);
}

.tam-ladv-card__link:hover .tam-ladv-card__title {
	color: var( --tam-link-hover-color );
}


.tam-ladv-card__img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.tam-ladv-card__img--placeholder {
	background: #ddd;
}

.tam-ladv-card__body {
	padding: 0.6rem 0 0;
}

/* Title: sidebar list-item scale (.tam-recent-list__title) */
.tam-ladv-card__title {
	font-size: 1rem;
	line-height: 1.35;
	margin: 0 0 0.25rem;
	font-weight: 600;
}

.tam-ladv-card__date {
	font-size: 0.73rem;
	color: #888;
}

.tam-ladv-footer {
	margin-top: 1rem;
	text-align: right;
}

/* =====================================================
   TAM Hero Alternative — Feature Articles placeholder count
   + optional slider (scoped so the base .tam-ladv-grid /
   .tam-ladv-card rules above, shared with Latest Adventures,
   are untouched outside this block).
   ===================================================== */

.tam-hero-alt-features {
	margin-top: 0;
}

.tam-hero-alt-features .tam-ladv__heading {
	margin: 0;
	padding: 2rem 1rem 0.6rem;
}

.tam-hero-alt-features .tam-ladv-grid {
	grid-template-columns: repeat(var(--tam-hero-alt-feature-placeholders, 3), 1fr);
}

.tam-hero-alt-features__row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem;
}

.tam-hero-alt-features__track {
	flex: 1;
	min-width: 0;
}

.tam-hero-alt-features--slider .tam-ladv-grid {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.tam-hero-alt-features--slider .tam-ladv-grid::-webkit-scrollbar {
	display: none;
}

.tam-hero-alt-features--slider .tam-ladv-card {
	flex: 0 0 calc((100% - (var(--tam-hero-alt-feature-placeholders, 3) - 1) * 1.5rem) / var(--tam-hero-alt-feature-placeholders, 3));
	scroll-snap-align: start;
}

.tam-hero-alt-features__nav {
	flex: 0 0 auto;
	width: 28px;
	height: 168px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid #d0d0d0;
	border-radius: 2px;
	color: #1a1a1a;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s, border-color 0.15s;
}

.tam-hero-alt-features__nav:hover {
	background: #f0f0f0;
	border-color: #1a1a1a;
}

.tam-hero-alt-features__nav:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1072px) {
	.tam-home-hero-wrap {
		flex-direction: column;
		min-height: auto;
	}

	.tam-hero-slides,
	.tam-hero-sidebar {
		flex: none;
		width: 100%;
	}

	.tam-hero-slides {
		min-height: 300px;
	}

	.tam-hero-sidebar {
		border-left: 0;
		border-top: 1px solid #e0e0e0;
	}

	.tam-recent-list__item {
		flex: none;
	}

	.tam-adv-grid {
		grid-template-columns: 1fr;
	}

	.tam-ladv-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Overrides the inline custom property set by render.php — inline
	   styles otherwise beat any stylesheet rule regardless of selector
	   specificity, so this needs !important to cap placeholders on mobile. */
	.tam-hero-alt-features {
		--tam-hero-alt-feature-placeholders: 2 !important;
	}

	.tam-section__heading {
		padding: 2rem 1rem 0.6rem;
	}

	/* .tam-hero-sidebar .tam-section__heading (2 classes, set further up)
	   otherwise still wins on specificity over the plain rule just above
	   (1 class) regardless of this being inside a media query — matching
	   its selector here, rather than just relying on source order, is
	   what actually overrides it. This is currently the only
	   .tam-section__heading rendered on the live site ("Feature
	   Articles"), so without this the rule above had no visible effect
	   at all. */
	.tam-hero-sidebar .tam-section__heading {
		padding: 2rem 1rem 0.6rem;
	}

	.tam-hero-alt-slides {
		min-height: 300px;
	}

}
