/*
Theme Name: Costa Rica Journeys
Theme URI: https://costaricajourneys.com/
Description: Costa Rica Journeys design on top of the Kadence theme.
Author: Costa Rica Journeys
Template: kadence
Version: 1.1.0
Requires PHP: 7.4
Text Domain: crj-kadence
*/

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
	font-family: "Literata";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("fonts/literata-latin.woff2") format("woff2");
}

:root {
	--crj-serif: Literata, Georgia, "Times New Roman", serif;
	--crj-radius: 6px;
	--crj-gap: clamp(20px, 3vw, 32px);
}

/* ---------- Shared ---------- */
.crj-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}
.crj-kicker,
.crj-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--global-palette2);
	margin: 0;
}
.crj-label { font-size: 12px; }
.crj-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 22px;
}
.crj-section-head h2 { margin: 0; }
.crj-section-head a { font-weight: 600; font-size: 15px; }
.crj-grid { display: grid; gap: 28px; }
.crj-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.crj-grid--regions { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }

.crj-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--global-palette3);
	text-decoration: none;
}
.crj-card:hover .crj-card__title,
.crj-mini:hover .crj-mini__title { color: var(--global-palette2); }
.crj-card__img {
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--crj-radius);
	display: block;
	background: var(--global-palette8);
}
.crj-ratio-16-10 { aspect-ratio: 16 / 10; }
.crj-ratio-4-3 { aspect-ratio: 4 / 3; }
.crj-ratio-3-2 { aspect-ratio: 3 / 2; }
.crj-card__title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.crj-card__title--lg { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.crj-card__dek { font-family: var(--crj-serif); font-size: 16px; line-height: 1.55; color: var(--global-palette5); }
.crj-card--lead .crj-card__dek { font-size: 17px; }

/* ---------- Homepage ---------- */
.crj-hero__media {
	position: relative;
	height: clamp(300px, 46vw, 560px);
	overflow: hidden;
	background: var(--global-palette1);
}
.crj-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 40%;
	display: block;
}
.crj-hero__credit {
	position: absolute;
	right: 12px;
	bottom: 10px;
	font-size: 12px;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	padding: 3px 8px;
	border-radius: 3px;
}
.crj-hero__card {
	position: relative;
	background: var(--global-palette9);
	margin-top: -96px;
	padding: clamp(24px, 4vw, 44px);
	max-width: 760px;
	box-shadow: 0 10px 40px rgba(20, 20, 20, 0.12);
	border-radius: var(--crj-radius);
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.crj-hero__card h1 {
	margin: 0;
	font-size: clamp(32px, 4.6vw, 54px);
	line-height: 1.05;
	letter-spacing: -0.02em;
}
.crj-lede {
	margin: 0;
	font-family: var(--crj-serif);
	font-size: 19px;
	line-height: 1.55;
	color: var(--global-palette5);
}
.crj-search {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}
.crj-search input[type="search"] {
	flex: 1 1 240px;
	min-width: 0;
	height: 52px;
	padding: 0 16px;
	font: inherit;
	font-size: 16px;
	border: 1.5px solid #C9CFCC;
	border-radius: var(--crj-radius);
	background: #fff;
	color: var(--global-palette3);
}
.crj-search button {
	height: 52px;
	padding: 0 26px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: var(--global-palette1);
	border: 0;
	border-radius: var(--crj-radius);
	cursor: pointer;
}
.crj-search button:hover { background: var(--global-palette2); }

.crj-home__body {
	padding-top: 64px;
	display: flex;
	flex-direction: column;
	gap: 72px;
}
.crj-region {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	border: 1px solid var(--global-palette7);
	border-radius: var(--crj-radius);
	background: var(--global-palette8);
	color: var(--global-palette3);
	text-decoration: none;
}
.crj-region:hover { border-color: var(--global-palette1); }
.crj-region__name { font-size: 18px; font-weight: 700; }
.crj-region__desc { font-size: 14px; color: var(--global-palette6); }

.crj-featured { display: flex; flex-wrap: wrap; gap: 32px; }
.crj-card--lead { flex: 2 1 520px; min-width: 0; gap: 14px; }
.crj-featured__list { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.crj-mini {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	color: var(--global-palette3);
	text-decoration: none;
}
.crj-mini__img {
	width: 132px;
	height: 96px;
	object-fit: cover;
	border-radius: var(--crj-radius);
	flex: 0 0 auto;
	display: block;
}
.crj-mini__text { display: flex; flex-direction: column; gap: 6px; }
.crj-mini__title { font-size: 18px; font-weight: 700; line-height: 1.25; }

.crj-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crj-pill {
	font-size: 12px;
	font-weight: 700;
	color: var(--global-palette1);
	background: #E6EFEA;
	padding: 4px 10px;
	border-radius: 999px;
}
.crj-place { font-size: 12px; font-weight: 600; color: var(--global-palette6); }

.crj-topics h2 { font-size: 22px; margin: 0 0 18px; }
.crj-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.crj-chip {
	font-weight: 600;
	font-size: 15px;
	color: var(--global-palette3);
	text-decoration: none;
	border: 1.5px solid #C9CFCC;
	border-radius: 999px;
	padding: 11px 18px;
}
.crj-chip:hover { border-color: var(--global-palette1); color: var(--global-palette1); }

/* ---------- Articles ---------- */
.single-post .entry-content {
	font-family: var(--crj-serif);
	font-size: 19px;
	line-height: 1.7;
	color: var(--global-palette4);
}
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
	font-family: Archivo, system-ui, sans-serif;
	letter-spacing: -0.01em;
	scroll-margin-top: 24px;
}
.single-post .entry-content img { border-radius: var(--crj-radius); height: auto; }
.single-post .entry-title { letter-spacing: -0.02em; }
.single-post .entry-hero .kadence-breadcrumbs,
.single-post .kadence-breadcrumbs { font-size: 14px; color: var(--global-palette6); }

.crj-checked {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 10px 0 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--global-palette1);
	background: #E6EFEA;
	padding: 4px 10px;
	border-radius: 999px;
}

.crj-toc {
	font-family: Archivo, system-ui, sans-serif;
	border-left: 3px solid var(--global-palette1);
	background: var(--global-palette8);
	border-radius: 0 var(--crj-radius) var(--crj-radius) 0;
	padding: 16px 22px;
	margin: 0 0 32px;
}
.crj-toc__title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--global-palette6);
}
.crj-toc ol { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.5; }
.crj-toc li { margin: 4px 0; }
.crj-toc a { font-weight: 600; text-decoration: none; }

.crj-related {
	font-family: Archivo, system-ui, sans-serif;
	border-top: 1px solid var(--global-palette7);
	margin-top: 48px;
	padding-top: 32px;
}
.crj-related h2 { font-size: 26px; margin: 0 0 22px; }
.crj-related .crj-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 22px; }
.crj-related .crj-card__title { font-size: 17px; }

.crj-glance {
	font-family: Archivo, system-ui, sans-serif;
	background: var(--global-palette8);
	border: 1px solid var(--global-palette7);
	border-radius: var(--crj-radius);
	padding: 20px 24px;
	margin: 0 0 32px;
}
.crj-glance__title { margin: 0 0 10px; font-size: 18px; font-weight: 800; color: var(--global-palette3); }
.crj-glance dl { margin: 0; display: grid; gap: 8px; font-size: 16px; line-height: 1.45; }
.crj-glance dl div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.crj-glance dt { font-weight: 700; color: var(--global-palette3); min-width: 90px; }
.crj-glance dd { margin: 0; }
.crj-glance__note { color: var(--global-palette6); font-size: 14px; }

.crj-faq {
	font-family: Archivo, system-ui, sans-serif;
	border-top: 1px solid var(--global-palette7);
	margin-top: 40px;
	padding-top: 28px;
}
.crj-faq h2 { margin: 0 0 10px; }
.crj-faq details { border-bottom: 1px solid var(--global-palette7); padding: 14px 0; }
.crj-faq summary { font-size: 18px; font-weight: 700; color: var(--global-palette3); cursor: pointer; }
.crj-faq details p { margin: 10px 0 0; font-family: var(--crj-serif); font-size: 17px; line-height: 1.6; }

/* ---------- Footer ---------- */
.crj-footer {
	margin-top: 72px;
	background: var(--global-palette1);
	color: #fff;
}
.crj-footer a { color: #E3ECE7; text-decoration: none; }
.crj-footer a:hover { color: #fff; text-decoration: underline; }
.crj-footer__top {
	padding-top: 48px;
	padding-bottom: 32px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 32px 64px;
}
.crj-footer__about { flex: 1 1 320px; max-width: 460px; }
.crj-footer__about p { margin: 0 0 12px; font-family: var(--crj-serif); font-size: 16px; line-height: 1.55; color: #E3ECE7; }
.crj-footer .crj-footer__name { font-family: Archivo, system-ui, sans-serif; font-size: 22px; font-weight: 800; color: #fff; }
.crj-footer__links { display: flex; flex-wrap: wrap; gap: 32px 56px; font-size: 15px; }
.crj-footer__links div { display: flex; flex-direction: column; gap: 10px; }
.crj-footer__head { margin: 0; font-weight: 700; color: #fff; }
.crj-footer__bottom {
	padding-top: 16px;
	padding-bottom: 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 13px;
	color: #CFDDD5;
}

/* ---------- Old-content safety ---------- */
.entry-content iframe,
.entry-content embed,
.entry-content video { max-width: 100%; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content .alignleft,
.entry-content .alignright { max-width: 50%; }
@media (max-width: 600px) {
	.entry-content .alignleft,
	.entry-content .alignright { float: none; max-width: 100%; margin: 0 0 16px; }
}
