/* =====================================================================
   Nutrition Encyclopedia — component styles
   Editorial palette: cream #FAF6EE · ink #23291F · deep green #1E3A2B
   terracotta #D9652B · sage #EDF1E6 · gold #C29B40
   Headings inherit Playfair Display from the Elementor site settings.
   ===================================================================== */

:root {
	--ne-cream: #FAF6EE;
	--ne-ink: #23291F;
	--ne-green: #1E3A2B;
	--ne-terracotta: #D9652B;
	--ne-sage: #EDF1E6;
	--ne-gold: #C29B40;
	--ne-serif: "Playfair Display", Georgia, serif;
	--ne-sans: "Inter", -apple-system, sans-serif;
}

/* ------------------------------------------------ Food / recipe cards */

.ne-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 28px;
}

.ne-card {
	background: #fff;
	border: 1px solid rgba(35, 41, 31, 0.08);
	border-radius: 14px;
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}

.ne-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(30, 58, 43, 0.14);
}

.ne-card a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.ne-card__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--ne-sage);
}

.ne-card__img,
.ne-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}

.ne-card:hover .ne-card__media img {
	transform: scale(1.05);
}

.ne-card__placeholder {
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 30% 30%, rgba(194, 155, 64, .25), transparent 55%),
		radial-gradient(circle at 75% 70%, rgba(30, 58, 43, .18), transparent 50%),
		var(--ne-sage);
}

.ne-card__body {
	padding: 18px 20px 20px;
}

.ne-card__kicker {
	display: inline-block;
	font-family: var(--ne-sans);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ne-terracotta);
	margin-bottom: 6px;
}

.ne-card__title {
	font-family: var(--ne-serif);
	font-size: 22px;
	line-height: 1.2;
	margin: 0 0 10px;
	color: var(--ne-ink);
}

.ne-card__stats {
	display: flex;
	gap: 14px;
	font-family: var(--ne-sans);
	font-size: 13px;
	color: rgba(35, 41, 31, 0.65);
}

.ne-card__stats strong {
	color: var(--ne-green);
}

/* ------------------------------------------------ Stat chips */

.ne-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 8px 0;
}

.ne-chip {
	background: #fff;
	border: 1px solid rgba(30, 58, 43, 0.14);
	border-radius: 12px;
	padding: 12px 18px;
	text-align: center;
	min-width: 92px;
	font-family: var(--ne-sans);
}

.ne-chip strong {
	display: block;
	font-family: var(--ne-serif);
	font-size: 24px;
	line-height: 1;
	color: var(--ne-green);
}

.ne-chip strong small {
	font-size: 12px;
	font-family: var(--ne-sans);
	font-weight: 600;
	color: rgba(35, 41, 31, .5);
	margin-left: 2px;
}

.ne-chip span {
	display: block;
	margin-top: 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(35, 41, 31, .55);
}

/* ------------------------------------------------ Nutrition facts label */

.ne-facts {
	background: #fff;
	border: 2px solid var(--ne-ink);
	border-radius: 6px;
	padding: 20px 22px;
	max-width: 360px;
	font-family: var(--ne-sans);
	color: var(--ne-ink);
}

.ne-facts__title {
	font-family: var(--ne-serif);
	font-weight: 800;
	font-size: 30px;
	line-height: 1.05;
	border-bottom: 10px solid var(--ne-ink);
	padding-bottom: 8px;
}

.ne-facts__serving {
	font-size: 13px;
	padding: 7px 0;
	border-bottom: 4px solid var(--ne-ink);
}

.ne-facts__calories {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 6px solid var(--ne-ink);
	font-weight: 800;
	font-size: 18px;
}

.ne-facts__calories strong {
	font-size: 32px;
	font-family: var(--ne-serif);
	color: var(--ne-terracotta);
}

.ne-facts__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	margin: 0;
}

.ne-facts__table tr {
	border-bottom: 1px solid rgba(35, 41, 31, 0.25);
}

.ne-facts__table th {
	text-align: left;
	font-weight: 700;
	padding: 6px 0;
	background: none;
	border: none;
}

.ne-facts__table tr.is-indent th {
	font-weight: 400;
	padding-left: 18px;
}

.ne-facts__table td {
	text-align: right;
	padding: 6px 0;
	border: none;
	font-variant-numeric: tabular-nums;
}

.ne-facts__vitamins {
	font-size: 12.5px;
	padding-top: 10px;
	border-top: 4px solid var(--ne-ink);
	margin-top: -1px;
	line-height: 1.5;
}

.ne-facts__gi {
	font-size: 12.5px;
	margin-top: 8px;
}

.ne-facts__source {
	font-size: 11px;
	color: rgba(35, 41, 31, 0.5);
	margin-top: 10px;
}

/* ------------------------------------------------ Search */

.ne-search__bar {
	margin-bottom: 14px;
}

.ne-search__input {
	width: 100%;
	font-family: var(--ne-sans);
	font-size: 17px;
	padding: 16px 22px;
	border: 2px solid var(--ne-green);
	border-radius: 999px;
	background: #fff;
	color: var(--ne-ink);
	outline: none;
	transition: box-shadow .2s ease;
}

.ne-search__input:focus {
	box-shadow: 0 0 0 4px rgba(217, 101, 43, 0.18);
}

.ne-search__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 26px;
}

.ne-search__filters select {
	font-family: var(--ne-sans);
	font-size: 14px;
	padding: 10px 36px 10px 16px;
	border: 1.5px solid rgba(30, 58, 43, 0.25);
	border-radius: 999px;
	background-color: #fff;
	color: var(--ne-ink);
	cursor: pointer;
}

.ne-search__empty {
	font-family: var(--ne-sans);
	text-align: center;
	padding: 40px 0;
	color: rgba(35, 41, 31, 0.55);
}

.ne-search.is-loading .ne-search__results {
	opacity: .45;
	transition: opacity .15s ease;
}

/* ------------------------------------------------ Studies */

.ne-studies__heading {
	font-family: var(--ne-serif);
	font-size: 28px;
	margin-bottom: 18px;
}

.ne-study {
	border-left: 3px solid var(--ne-gold);
	padding: 4px 0 4px 20px;
	margin-bottom: 22px;
}

.ne-study__meta {
	font-family: var(--ne-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(35, 41, 31, 0.5);
	margin-bottom: 4px;
}

.ne-study__title {
	font-family: var(--ne-serif);
	font-size: 19px;
	line-height: 1.3;
	margin: 0 0 6px;
}

.ne-study__title a {
	color: var(--ne-ink);
	text-decoration: none;
}

.ne-study__title a:hover {
	color: var(--ne-terracotta);
}

.ne-study__finding {
	font-family: var(--ne-sans);
	font-size: 15px;
	line-height: 1.6;
	color: rgba(35, 41, 31, 0.75);
	margin: 0 0 6px;
}

.ne-study__link {
	font-family: var(--ne-sans);
	font-size: 14px;
	font-weight: 600;
	color: var(--ne-terracotta);
	text-decoration: none;
}

/* ------------------------------------------------ Detail cards (study/diet) */

.ne-detail-card {
	background: var(--ne-sage);
	border-radius: 14px;
	padding: 26px 28px;
}

.ne-detail-card h3 {
	font-family: var(--ne-serif);
	font-size: 22px;
	margin: 0 0 14px;
}

.ne-detail-card table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--ne-sans);
	font-size: 14.5px;
	margin-bottom: 14px;
}

.ne-detail-card th {
	text-align: left;
	vertical-align: top;
	padding: 8px 14px 8px 0;
	white-space: nowrap;
	color: var(--ne-green);
	font-weight: 700;
	border: none;
	background: none;
	width: 1%;
}

.ne-detail-card td {
	padding: 8px 0;
	border: none;
	line-height: 1.55;
}

.ne-detail-card tr + tr {
	border-top: 1px solid rgba(30, 58, 43, 0.12);
}

.ne-btn {
	display: inline-block;
	font-family: var(--ne-sans);
	font-size: 14px;
	font-weight: 700;
	background: var(--ne-green);
	color: #fff !important;
	padding: 12px 24px;
	border-radius: 999px;
	text-decoration: none;
	transition: background .2s ease;
}

.ne-btn:hover {
	background: var(--ne-terracotta);
}

/* ------------------------------------------------ A–Z index */

.ne-index__group {
	display: flex;
	gap: 26px;
	padding: 20px 0;
	border-bottom: 1px solid rgba(35, 41, 31, 0.12);
}

.ne-index__letter {
	font-family: var(--ne-serif);
	font-size: 34px;
	font-weight: 700;
	color: var(--ne-terracotta);
	min-width: 44px;
	line-height: 1;
}

.ne-index__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	align-items: center;
}

.ne-index__links a {
	font-family: var(--ne-sans);
	font-size: 15.5px;
	color: var(--ne-ink);
	text-decoration: none;
}

.ne-index__links a:hover {
	color: var(--ne-terracotta);
	text-decoration: underline;
}

/* ------------------------------------------------ Small screens */

@media (max-width: 640px) {
	.ne-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 16px;
	}
	.ne-card__title {
		font-size: 18px;
	}
	.ne-facts {
		max-width: none;
	}
}
