/* ==========================================================================
   Altomize Theme — "Resources" page template
   Scope: body.template-resources
   ========================================================================== */

.template-resources .site-inner {
	width: 100%;
	max-width: none;
	padding: 0;
}

/* Hero
   -------------------------------------------------------------------------- */

.res-hero {
	position: relative;
	overflow: hidden;
	padding: 48px 0 8px;
	background: linear-gradient(180deg, #f7fcfb, #ffffff);
}

.res-hero::before {
	content: "";
	position: absolute;
	right: -120px;
	top: 60px;
	width: 320px;
	height: 320px;
	background-image: radial-gradient(#cfdbe2 1.3px, transparent 1.3px);
	background-size: 18px 18px;
	opacity: 0.55;
	pointer-events: none;
}

.res-hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 40px;
	align-items: start;
}

.res-hero__title {
	margin: 0 0 16px;
	font-size: clamp(2.2rem, 3.6vw, 3rem);
	line-height: 1.1;
	letter-spacing: -0.04em;
}

.res-hero__title .accent { color: var(--alt-teal-strong); }

.res-hero__intro {
	max-width: 440px;
	margin: 0 0 26px;
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--alt-muted);
}

.res-features {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.res-features li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--alt-muted);
}

.res-features strong { font-size: 0.9rem; color: var(--alt-navy); }

.res-features__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin-bottom: 6px;
	border-radius: 50%;
	background: var(--alt-mint);
	color: var(--alt-teal-strong);
}

.res-panel {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 18px;
	padding: 22px;
	border-radius: var(--alt-radius-lg);
	background: linear-gradient(135deg, #f4fcf9, #f8fbfd);
	border: 1px solid var(--alt-border);
}

.res-panel__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 14px;
	border-radius: var(--alt-radius-md);
	background: #fff;
	border: 1px solid var(--alt-border);
	align-self: start;
}

.res-panel__nav strong { margin-bottom: 10px; font-size: 0.98rem; color: var(--alt-navy); }

.res-panel__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	border-radius: 10px;
	color: var(--alt-navy);
	font-size: 0.88rem;
	font-weight: 600;
}

.res-panel__link:hover,
.res-panel__link:focus,
.res-panel__link.is-active {
	background: var(--alt-mint);
	color: var(--alt-teal-strong);
	text-decoration: none;
}

.res-panel__icon { width: 16px; height: 16px; }

.res-panel__featured {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.res-featured {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 118px;
	gap: 14px;
	padding: 14px;
	border-radius: var(--alt-radius-md);
	background: #fff;
	border: 1px solid var(--alt-border);
	color: var(--alt-navy);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.res-featured:hover,
.res-featured:focus {
	text-decoration: none;
	border-color: rgba(5, 207, 168, 0.55);
	box-shadow: 0 10px 24px rgba(7, 21, 47, 0.06);
}

.res-featured__body { display: flex; flex-direction: column; gap: 6px; }

.res-featured__body strong { font-size: 0.96rem; line-height: 1.3; }

.res-featured__media {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	background: linear-gradient(135deg, #e9fbf5, #f3f8fb);
	color: var(--alt-teal-strong);
	overflow: hidden;
}

.res-featured__media img { width: 100%; height: 100%; object-fit: cover; }

.res-panel__empty {
	margin: 0;
	padding: 18px;
	border-radius: var(--alt-radius-md);
	background: #fff;
	border: 1px dashed var(--alt-border);
	font-size: 0.9rem;
	color: var(--alt-muted);
}

.res-type,
.res-topic,
.res-level {
	display: inline-block;
	align-self: flex-start;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--alt-mint);
	color: var(--alt-teal-strong);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.res-meta { font-size: 0.78rem; color: var(--alt-muted); }

/* Library heading + tabs
   -------------------------------------------------------------------------- */

.res-library .home-section__title { margin-bottom: 18px; }

.res-tabs {
	display: flex;
	justify-content: center;
	gap: 6px;
	width: max-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 6px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--alt-border);
}

.res-tab {
	padding: 10px 26px;
	border-radius: 10px;
	color: var(--alt-navy);
	font-size: 0.92rem;
	font-weight: 700;
}

.res-tab:hover,
.res-tab:focus { text-decoration: none; background: var(--alt-mint); color: var(--alt-teal-strong); }

.res-tab.is-active { background: var(--alt-teal-strong); color: #fff; }

/* Lists
   -------------------------------------------------------------------------- */

.res-lists { padding-top: 28px; }

.res-lists__panel {
	border-radius: var(--alt-radius-lg);
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid var(--alt-border);
}

.res-list {
	padding: 26px 24px 28px;
	scroll-margin-top: 90px;
}

.res-list + .res-list { border-top: 1px solid var(--alt-border); }

.res-list__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 20px;
	margin-bottom: 18px;
}

.res-list__heading {
	margin: 0;
	font-size: 1.2rem;
	letter-spacing: -0.02em;
}

.res-list__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--alt-teal-strong);
	font-size: 0.9rem;
	font-weight: 700;
}

.res-list__all .panel__link-icon { width: 16px; height: 16px; }

.res-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.res-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--alt-radius-md);
	background: #fff;
	border: 1px solid var(--alt-border);
	overflow: hidden;
}

.res-card__media {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, #e9fbf5, #f3f8fb);
	color: var(--alt-teal-strong);
	overflow: hidden;
}

.res-card__media img { width: 100%; height: 100%; object-fit: cover; }

.res-card__media--tile .icon { width: 42px; height: 42px; }

.res-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 8px;
	padding: 16px 16px 18px;
}

.res-card__title {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.res-card__excerpt {
	flex: 1 1 auto;
	margin: 0;
	font-size: 0.84rem;
	line-height: 1.55;
	color: var(--alt-muted);
}

/* Academy lessons: compact row cards */

.res-card--academy .res-card__body {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr);
	grid-template-rows: auto auto auto;
	column-gap: 12px;
	row-gap: 6px;
	align-items: center;
}

.res-card--academy .res-level { grid-column: 1 / -1; }

.res-card__lesson-icon {
	display: grid;
	place-items: center;
	grid-row: 2 / 4;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--alt-mint);
	color: var(--alt-teal-strong);
}

.res-level--intermediate { background: #e6f0ff; color: #2457c5; }
.res-level--advanced { background: #fff2dc; color: #a46200; }
.res-level--masterclass { background: #f1e8ff; color: #6a3cc9; }

.res-empty {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 18px;
	padding: 20px 22px;
	border-radius: var(--alt-radius-md);
	background: #fff;
	border: 1px dashed var(--alt-border);
}

.res-empty__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--alt-mint);
	color: var(--alt-teal-strong);
}

.res-empty p {
	flex: 1 1 280px;
	margin: 0;
	font-size: 0.92rem;
	color: var(--alt-muted);
}

.res-empty strong { color: var(--alt-navy); }

/* Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.res-hero { padding: 40px 0 8px; }

	.res-hero__grid { grid-template-columns: 1fr; gap: 28px; }

	.res-hero__intro { max-width: none; }

	.res-panel { grid-template-columns: 1fr; }

	.res-panel__nav { flex-direction: row; flex-wrap: wrap; align-items: center; }

	.res-panel__nav strong { width: 100%; margin-bottom: 4px; }
}

@media (max-width: 640px) {
	.res-features { grid-template-columns: 1fr; }

	.res-features li { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

	.res-features li span:last-child { width: 100%; }

	.res-tabs { width: auto; }

	.res-tab { padding: 9px 14px; font-size: 0.86rem; }

	.res-list { padding: 20px 16px 22px; }

	.res-grid { grid-template-columns: 1fr; }
}
