/* ranking-2zoo.css — rich two-zoo ranking layout (rare-animal pages). */

.rz2-container {
	max-width: 1500px;
	margin: 0 auto;
	padding: 24px 16px 60px;
}

.rz2-header h1 {
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin: 0 0 10px;
	color: #16181d;
}

.rz2-sub {
	color: #555;
	margin: 0 0 14px;
	font-size: 1.05rem;
}

.rz2-rarity {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, #f0f8ea, #dcefd0);
	border: 1px solid rgba(74, 138, 42, 0.2);
	color: #1f3d14;
	font-weight: 600;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 0.95rem;
	margin: 0 0 14px;
	box-shadow: 0 2px 8px rgba(74, 138, 42, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rz2-rarity:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(74, 138, 42, 0.22);
}

.rz2-rarity i { color: #4a8a2a; }

/* Part 1 — comparison intro */
.rz2-intro {
	margin: 14px 0 4px;
	line-height: 1.7;
	font-size: 1.06rem;
	color: #20242b;
}

.rz2-intro p { margin: 0 0 13px; }

/* Shared block titles (Quick comparison / Which zoo) */
.rz2-block-title {
	position: relative;
	font-size: 1.28rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #16181d;
	margin: 0 0 14px;
	padding-left: 14px;
}

.rz2-block-title::before {
	content: '';
	position: absolute;
	left: 0;
	top: 2px;
	bottom: 2px;
	width: 4px;
	border-radius: 4px;
	background: linear-gradient(180deg, #4a8a2a, #2f5d1e);
}

/* Part 2 — Quick comparison */
.rz2-quick {
	margin: 26px 0;
	padding: 22px;
	background: linear-gradient(135deg, #f7faf5, #eef4e8);
	border: 1px solid #e7efe0;
	border-radius: 18px;
	box-shadow: 0 2px 12px rgba(74, 138, 42, 0.06);
}

.rz2-quick-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 0 0 14px;
}

.rz2-quick-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
	border: 1px solid #e7efe0;
	border-radius: 14px;
	padding: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rz2-quick-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.rz2-quick-heading {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.rz2-quick-rank { color: #4a8a2a; font-size: 0.9rem; font-weight: 800; }
.rz2-quick-name { font-size: 1.05rem; font-weight: 700; color: #111; }

.rz2-quick-card-text {
	line-height: 1.6;
	font-size: 0.95rem;
	color: #333;
}

.rz2-quick-card-text p { margin: 0 0 8px; }
.rz2-quick-card-text p:last-child { margin-bottom: 0; }

.rz2-quick-text {
	line-height: 1.65;
	color: #222;
}

.rz2-quick-text p { margin: 0 0 12px; }
.rz2-quick-text p:last-child { margin-bottom: 0; }

/* Part 3 — Which zoo should you visit */
.rz2-which {
	margin: 26px 0;
	padding: 22px;
	border: 1px solid #eee;
	border-left: 4px solid #4a8a2a;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.rz2-which-text {
	line-height: 1.7;
	color: #20242b;
}

.rz2-which-text p { margin: 0 0 12px; }
.rz2-which-text p:last-child { margin-bottom: 0; }

/* Per-zoo section headings (Parts 4 & 5) — accent bar via ::before, matches
   ranking-1zoo.css's .rz1-section-heading treatment */
.rz2-section-heading {
	position: relative;
	font-size: 1.14rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 20px 0 10px;
	padding-left: 13px;
	color: #16181d;
}

.rz2-section-heading::before {
	content: '';
	position: absolute;
	left: 0;
	top: 2px;
	bottom: 2px;
	width: 3px;
	border-radius: 3px;
	background: linear-gradient(180deg, #4a8a2a, #2f5d1e);
}

/* Shared conclusion — styled as a quiet pull-quote, matching rz1's lead teaser */
.rz2-conclusion {
	position: relative;
	margin: 26px 0 8px;
	line-height: 1.7;
	font-size: 1.05rem;
	color: #333;
	font-style: italic;
	background: linear-gradient(135deg, #f5faf1, #eaf3e2);
	border-left: 4px solid #4a8a2a;
	border-radius: 12px;
	padding: 18px 22px;
	box-shadow: 0 2px 10px rgba(74, 138, 42, 0.08);
}

.rz2-conclusion p { margin: 0 0 12px; }
.rz2-conclusion p:last-child { margin-bottom: 0; }

/* Each zoo block — gallery is full-bleed on top, text lives in a padded body.
   overflow:hidden clips the gallery to the card's rounded top corners. */
.rz2-zoo {
	border: 1px solid #eee;
	border-radius: 18px;
	padding: 0;
	margin: 22px 0;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rz2-zoo:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.rz2-zoo-body {
	padding: 8px 20px 20px;
}

.rz2-zoo-head {
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eee;   /* divider under the rating, same as ranking-1zoo */
}

.rz2-zoo-head h2 {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 10px;
	color: #16181d;
}

.rz2-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 24px;
	padding: 0 6px;
	margin-right: 6px;
	border-radius: 999px;
	background: #f2f2f2;
	color: #6b7280;
	font-weight: 700;
	font-size: 0.8rem;
	vertical-align: middle;
}

.rz2-location,
.rz2-rating {
	display: inline-flex;
	align-items: center;
	background: #f6f7f5;
	border: 1px solid #ececec;
	border-radius: 999px;
	padding: 6px 13px;
	margin: 0 8px 0 0;
}

.rz2-location {
	color: #4b5563;
	font-size: 0.9rem;
}

.rz2-rating { font-size: 1rem; color: #16181d; font-weight: 700; }
.rz2-rating i { filter: drop-shadow(0 0 3px rgba(255, 203, 34, 0.45)); }

.rz2-reviews {
	color: #9aa0a6;
	font-weight: 400;
	font-size: 0.9rem;
	margin-left: 4px;
}

.rz2-narrative {
	margin: 18px 0 20px;
	line-height: 1.7;
	font-size: 1rem;
	color: #20242b;
}

.rz2-narrative .rz2-lead {
	font-weight: 600;
	color: #111;
	margin: 0 0 12px;
}

.rz2-narrative p { margin: 0 0 12px; }

.rz2-sources {
	font-size: 0.85rem;
	color: #999;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.rz2-sources-label {
	display: block;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
	margin: 0 0 8px;
}

.rz2-sources a {
	display: inline-block;
	min-width: 20px;
	text-align: center;
	margin: 0 3px;
	padding: 1px 7px;
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 20px;
	color: #4a8a2a;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.rz2-sources a:hover {
	background: #4a8a2a;
	border-color: #4a8a2a;
	color: #fff;
	transform: translateY(-1px);
}

/* ── "Visit {zoo}" CTA — compact white pill (reused from ranking-1zoo) ──── */
.rz2-cta-wrap {
	text-align: center;
	margin: 26px 0 0;
}

.rz2-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 11px 18px;
	border-radius: 999px;
	text-decoration: none;
	background: #fff;
	border: 1.5px solid #111;
	color: #111;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rz2-cta-icon {
	flex: 0 0 auto;
	font-size: 0.95rem;
	color: #111;
	transition: color 0.2s ease;
}

.rz2-cta-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	flex: 1 1 auto;
	min-width: 0;
}

.rz2-cta-title {
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.rz2-cta-sub {
	font-size: 0.76rem;
	font-weight: 400;
	line-height: 1.3;
	opacity: 0.7;
}

.rz2-cta-arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	transition: transform 0.2s ease;
}

.rz2-cta:hover {
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
	transform: translateY(-2px);
}

.rz2-cta:hover .rz2-cta-arrow { transform: translateX(4px); }

/* ── "See the Animals" tab — pill centred on each zoo gallery's bottom edge
      (reused from ranking-1zoo). Desktop behaviour only for now; mobile later. ──── */
.rz2-zoo-gallery {
	position: relative;      /* anchors the side-tab */
}

/* Sits just inside the gallery's bottom edge (fully within, so the card's
   overflow:hidden doesn't clip it) — over the bottom of the last photo. */
.rz2-side-tab-wrap {
	position: absolute;
	bottom: 14px;
	left: 50%;
	z-index: 30;
	display: flex;
	align-items: stretch;
	border-radius: 999px;
	background: #fff;
	border: 1.5px solid #111;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	transform: translate(-50%, 0);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Desktop reveals via hover, not a manual toggle — hide the button. */
.rz2-side-tab-toggle { display: none; }

.rz2-side-tab {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 13px 18px 13px 16px;
	color: #111;
	text-decoration: none;
	white-space: nowrap;
}

.rz2-side-tab-icon {
	flex: 0 0 auto;
	font-size: 1.05rem;
}

.rz2-side-tab-text {
	font-size: 0.86rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	transition: opacity 0.2s ease;
}

@media (hover: hover) {
	.rz2-side-tab-wrap:hover,
	.rz2-side-tab-wrap:focus-within {
		transform: translate(-50%, -2px);
		box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
	}
}

/* Mobile — same behaviour as ranking-1zoo: the tab flies in at each gallery's
   top-right corner, then collapses/expands via the toggle button. The flyin
   holds position + entrance; the wrap handles the collapse slide (separate
   elements so the two transforms never fight). */
@media (max-width: 768px) {
	.rz2-side-tab-flyin {
		position: absolute;
		top: 5px;
		right: 6px;
		z-index: 20;
		opacity: 0;
	}

	/* Fly in when scrolled into view (class added by JS), not on page load. */
	.rz2-side-tab-flyin--in {
		animation: rz2SideTabFlyIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	}

	.rz2-side-tab-wrap {
		position: static;
		border-radius: 999px;
		background: #fff;
		border: 1.5px solid #111;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
		transform: none;
		transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	}

	/* Collapsed: slide right so only the toggle + paw peek out; the rest slides
	   past the image edge and is clipped by .rz2-zoo's overflow:hidden. */
	.rz2-side-tab-wrap--collapsed {
		transform: translateX(calc(100% - 62px));
	}

	.rz2-side-tab-wrap--collapsed .rz2-side-tab-text {
		opacity: 0;
	}

	.rz2-side-tab-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		width: 30px;
		background: transparent;
		border: none;
		border-right: 1px solid #eee;
		color: #111;
		font-size: 0.85rem;
		cursor: pointer;
		padding: 0;
	}

	.rz2-side-tab-toggle .rz2-toggle-icon-open { display: none; }
	.rz2-side-tab-wrap--collapsed .rz2-side-tab-toggle .rz2-toggle-icon-close { display: none; }
	.rz2-side-tab-wrap--collapsed .rz2-side-tab-toggle .rz2-toggle-icon-open { display: inline-block; }

	.rz2-side-tab { padding: 4px 8px; color: #111; }
	.rz2-side-tab-icon { color: #111; }
}

@keyframes rz2SideTabFlyIn {
	from {
		opacity: 0;
		transform: translate(24px, -14px) scale(0.85);
	}
	to {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
}

/* Desktop — pair the two comparison blocks, and the two zoo articles, side by side.
   (Mobile is handled separately below and stays stacked.) */
@media (min-width: 768px) {
	.rz2-compare-row {
		display: flex;
		gap: 16px;
		align-items: stretch;
		margin: 26px 0;
	}

	.rz2-compare-row > .rz2-quick,
	.rz2-compare-row > .rz2-which {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
	}

	/* Cards stack inside the now-narrower Quick comparison column. */
	.rz2-compare-row .rz2-quick-grid { grid-template-columns: 1fr; }

	.rz2-zoos-row {
		display: flex;
		gap: 22px;
		align-items: flex-start;
		margin: 22px 0;
	}

	.rz2-zoos-row > .rz2-zoo {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
	}
}

@media (max-width: 600px) {
	.rz2-header h1 { font-size: 1.5rem; }
	.rz2-container { padding: 18px 14px 48px; }
	.rz2-zoo { border: none; box-shadow: none; }
	.rz2-zoo-body { padding: 16px; }
	.rz2-quick, .rz2-which { padding: 16px; }
	/* No box border — just a divider line under the text, like the one under the rating. */
	.rz2-which {
		border: none;
		border-bottom: 1px solid #eee;
		border-radius: 0;
	}
	.rz2-quick-grid { grid-template-columns: 1fr; }
	.rz2-block-title { font-size: 1.15rem; }
}
