:root {
	/* Vertical rhythm */
	--section-pad-y: clamp(3rem, 6vw, 6rem);
	--section-pad-y-tight: clamp(2rem, 4vw, 3.5rem);
	--section-pad-y-loose: clamp(4rem, 8vw, 8rem);

	/* Topic spacing */
	--topic-gap: clamp(2.5rem, 5vw, 4rem);
	--topic-gap-tight: clamp(1.5rem, 3vw, 2.5rem);
}

#post-content.home-post-content.content-section {
	max-width: 1140px;
}

section[id] {
	/* 	margin: 0 auto; */
	/* 	padding: 0; */
}

.content-section {
	padding-block: var(--section-pad-y);
}

.content-section .topic.topic--basic {
	max-width: 1140px;
	margin: 0 auto;
}

.content-section .topic.topic--cards {
	max-width: 980px;
	margin: 0 auto;
	padding: 2rem;
}

.content-section__inner {
	display: flex;
	flex-direction: column;
	gap: var(--topic-gap);
}

.content-section--why-go,
.content-section--when-to-go {
	padding-block: var(--section-pad-y);
}

.content-section--where-to-go,
.content-section--tours-safaris {
	padding-block: var(--section-pad-y-tight);
}

.content-section--where-to-go .content-section__inner {
	gap: var(--topic-gap-tight);
}

.content-section--accommodation {
	padding-block: var(--section-pad-y-loose);
}

.content-section--overview,
.content-section--itinerary,
.content-section--rates {
	padding-block: var(--section-pad-y-tight);
}

.topic__header, .topic__title{
	max-width: 80ch;
	margin-bottom: 1.5rem;
	margin-left: auto;
	margin-right: auto;
}

.content-section h2.topic__title {
	text-align: center;
	margin-top: 0;
}

.topic--cards .topic__header {
	margin-bottom: 2rem;
}

.topic--lr-media .topic-item {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}

.topic--lr-media .topic-item + .topic-item {
	margin-top: var(--topic-gap);
}

@media (max-width: 768px) {
	.topic--lr-media .topic-item {
		grid-template-columns: 1fr;
	}
}

.content-section .topic.topic--basic, .content-section .topic.topic--basic .topic-item__media {
	border-radius: 10px;
	max-width: 80ch;
	margin: 0 auto 1rem;
}

.content-section .topic.topic--basic .topic-item__media img {
	border-radius: 5px;
	max-width: 80ch;
	margin: 0 auto;
}


figure.topic-item__media {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	width: 80ch;
}

.tta-topic-extension {
	margin-top: clamp(3rem, 6vw, 5rem);
}

.tta-tours-extension .tta-section-header {
	margin-bottom: 1.5rem;
}

.tta-topic-extension.tta-tours-extension .tta-section-header {
	text-align: center;
}

#tours-safaris .tta-topic-extension.tta-tours-extension, #tours-safaris .topic.topic--basic {
	margin-top: 0;
}

div.tta-context-tours-block > div.tta-section-header {
	margin: 0 auto;
	text-align: center;
	max-width: 720px;
}

.tta-context-tours-block {
	padding: 2rem;
}

#tours-safaris > .tta-context-tours-block > header > h2 {
	text-align: center;
	margin-top: 0rem;
}

#tours-safaris.content-section {
	padding-top: var(--section-pad-y-tight);
}

#tours-safaris.content-section header {
	max-width: 80ch;
	margin-left: auto;
	margin-right: auto;
}
/* ============================= */
/* CALENDAR BASE */
/* ============================= */

.topic-calendar .calendar {
	margin-top: 2rem;
}

/* ============================= */
/* TABS */
/* ============================= */

.topic-calendar .calendar-tabs {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(0,0,0,0.1);
}

.topic-calendar .calendar-tabs button {
	background: none;
	border: none;
	padding: 0.6rem 1rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	position: relative;
	opacity: 0.7;
	transition: opacity 0.2s ease;
	color: var(--link-color);
}

.topic-calendar .calendar-tabs button:hover {
	opacity: 1;
}

.topic-calendar .calendar-tabs button.is-active {
	opacity: 1;
}

.topic-calendar .calendar-tabs button.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 2px;
	background: currentColor;
}

/* ============================= */
/* PANELS */
/* ============================= */

.topic-calendar .calendar-panel {
	display: none;
	padding-top: 2rem;
}

.topic-calendar .calendar-panel.is-active {
	display: block;
}

/* ============================= */
/* PANEL HEADER */
/* ============================= */

.topic-calendar .calendar-panel-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 1.5rem;
	margin-bottom: 1rem;
}

.topic-calendar .calendar-panel-header h3 {
	margin: 0;
}

/* ============================= */
/* METRICS */
/* ============================= */

.topic-calendar .calendar-metrics {
	display: flex;
	gap: 1rem;
}

.topic-calendar .metric {
	display: flex;
	align-items: baseline;
	gap: 0.25rem;
	font-weight: 600;
}

.topic-calendar .metric small {
	font-size: 0.8rem;
	opacity: 0.7;
}

/* ============================= */
/* MOBILE TWEAK */
/* ============================= */

@media (max-width: 768px) {

	.topic-calendar .calendar-panel-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

}

#calendar {
	max-width: 920px;
	margin-left: auto;
	margin-right: auto;
}

/* ================================
Calendar Table Base
================================ */

.topic-calendar-table .calendar-table {
	display: block;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
}

.calendar-row {
	display: grid;
	grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr 1.2fr 40px;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

.calendar-head {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.8rem;
	opacity: 0.8;
	cursor: default;
}

.calendar-summary {
	cursor: pointer;
	transition: background 0.2s ease;
}

.calendar-summary:hover {
	background: rgba(255,255,255,0.05);
}

.calendar-summary.is-open {
	background: rgba(255,255,255,0.08);
}

.unit {
	font-size: 0.8em;
	opacity: 0.7;
	margin-left: 2px;
}

/* ================================
Toggle Arrow
================================ */

.calendar-toggle-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.25s ease;
}

.calendar-summary.is-open .calendar-toggle-icon {
	transform: rotate(135deg);
}

/* ================================
Expandable Panel
================================ */

.calendar-panel {
	overflow: hidden;
	transition: opacity 0.25s ease;
	opacity: 0;
}

.calendar-panel.is-open {
	opacity: 1;
}

.calendar-panel-inner {
	padding: 20px;
	background: rgba(255,255,255,0.03);
}

.calendar-panel-media img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 12px;
}

.calendar-caption {
	font-size: 0.85rem;
	opacity: 0.7;
	margin-bottom: 16px;
}

.calendar-panel-cta {
	margin-top: 16px;
}

.calendar-cta-button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	background: var(--accent, #ff6b35);
	color: #fff;
	text-decoration: none;
	font-weight: 500;
}

/* ================================
Badge Types
================================ */

.calendar-summary.peak { border-left: 4px solid #2ecc71; }
.calendar-summary.good { border-left: 4px solid #3498db; }
.calendar-summary.shoulder { border-left: 4px solid #f1c40f; }
.calendar-summary.low { border-left: 4px solid #e67e22; }
.calendar-summary.rainy { border-left: 4px solid #2980b9; }
.calendar-summary.dry { border-left: 4px solid #27ae60; }
.calendar-summary.migration { border-left: 4px solid #8e44ad; }
.calendar-summary.whales { border-left: 4px solid #16a085; }
.calendar-summary.flowers { border-left: 4px solid #e84393; }

/* ================================
Dark Variant
================================ */

.topic-variant-dark {
	background: #111;
	color: #eee;
}

.topic-variant-dark h2, .topic-variant-dark h3, .topic-variant-dark h4 {
	color: var(--brand-gold);
}

/* ================================
Light Variant
================================ */

.topic-variant-light {
	background: #fff;
	color: #222;
}

.topic.topic-calendar-table.content-section > .container {
	max-width: 90ch;
	margin: auto;
}

.topic-variant-light .calendar-row {
	border-bottom: 1px solid rgba(0,0,0,0.08);
}

.topic-variant-light .calendar-summary:hover {
	background: rgba(0,0,0,0.04);
}

.topic-variant-light .calendar-panel-inner {
	background: rgba(0,0,0,0.03);
}

/* ================================
Responsive
================================ */

@media (max-width: 768px) {

	.calendar-row {
		grid-template-columns: 1fr 1fr 1fr;
		grid-template-areas:
			"month season toggle"
			"rain min max";
		row-gap: 6px;
	}

	.col-month { grid-area: month; }
	.col-season { grid-area: season; text-align: right; }
	.col-toggle { grid-area: toggle; text-align: right; }
	.col-rain { grid-area: rain; }
	.col-temp:nth-of-type(3) { grid-area: min; }
	.col-temp:nth-of-type(4) { grid-area: max; }

}

.topic.topic-calendar-table.topic-variant-light.content-section > div {
	max-width: 844px;
	margin-right: auto;
	margin-left: auto;
}

/* CALENDAR SECTION TITLE */
.topic.topic-calendar-table.content-section h2.topic-title {
	margin-top: 0;
}

section.topic.topic-calendar-table.content-section {
	padding-top: var(--section-pad-y-tight);
}

#when-to-go.content-section {
	padding-top: var(--section-pad-y-tight);
}

/* CENTER THE DESTINATIONS TITLE */
#country-destinations .tta-section-header {
	text-align: center;
}
/* CONTENT SECTION PADDING */
.content-section > article, .content-section > .container {
	padding: 1rem;
}

