/* ==================================================
   Homepage
   ================================================== */

/* ================================================== */
/* Homepage */
/* ================================================== */

.home-content {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 2em 0 4em;
}


/* ============================== */
/* Shared homepage headings */
/* ============================== */

.section-heading {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 2em;
	margin-bottom: 1.2em;
}


	.section-heading h2 {
		margin: 0.15em 0 0;
		font-family: "Autour One", sans-serif;
		font-size: clamp(1.4rem, 3vw, 2rem);
		color: #333;
	}


	.section-heading > a {
		color: #665f18;
		font-family: "Autour One", sans-serif;
		font-size: 0.8em;
		text-decoration: none;
	}


		.section-heading > a:hover {
			text-decoration: underline;
		}



/* ============================== */
/* Welcome */
/* ============================== */

.home-welcome {
	display: grid;
	grid-template-columns: 3fr 1fr;
	align-items: center;
	gap: 3em;
	margin-bottom: 3em;
	padding: 3em;
	background-color: #FCE3C0;
	border: 2px solid #FFC269;
	border-radius: 18px;
}


.home-welcome-text h2 {
	max-width: 700px;
	margin: 0.25em 0;
	font-family: "Autour One", sans-serif;
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1.15;
	color: #292913;
}


.home-welcome-text p {
	max-width: 650px;
	margin: 1em 0 1.5em;
	font-size: 1.05em;
	line-height: 1.7;
	color: #555;
}


.home-welcome-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8em;
}



.home-welcome-decoration {
	display: flex;
	align-items: center;
	justify-content: center;
}


	.home-welcome-decoration img {
		width: min(100%, 180px);
		opacity: 0.7;
		filter: brightness(35%);
	}


/* ============================== */
/* Featured recipes */
/* ============================== */

.featured-section {
	margin-bottom: 3.5em;
}


.featured-carousel {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1em;
}


.featured-viewport {
	min-width: 0;
}


.featured-card {
	display: grid;
	grid-template-columns: minmax(250px, 2fr) minmax(300px, 3fr);
	min-height: 330px;
	overflow: hidden;
	background-color: #fffdf0;
	border: 1px solid #ded6a2;
	border-radius: 16px;
	box-shadow: 0 7px 20px rgba(70, 65, 20, 0.12);
}


.featured-image {
	min-height: 300px;
}


	.featured-image img {
		width: 100%;
		height: 100%;
		display: block;
		object-fit: cover;
	}


.featured-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(1.5em, 4vw, 3em);
}


.featured-label {
	margin-bottom: 0.6em;
	color: #82791f;
	font-family: "Autour One", sans-serif;
	font-size: 0.7em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}


.featured-info h3 {
	margin: 0;
	font-family: "Autour One", sans-serif;
	font-size: clamp(1.5rem, 4vw, 2.4rem);
	color: #292913;
}


.featured-info p {
	line-height: 1.6;
	color: #555;
}


.featured-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin: 0.8em 0;
	font-size: 0.85em;
}


/* Carousel arrows */

.carousel-button {
	width: 42px;
	height: 42px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: #D6CA33;
	color: #222;
	font-size: 2em;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease;
}


	.carousel-button:hover {
		background-color: #f2e75a;
		transform: scale(1.08);
	}


/* Carousel dots */

.carousel-dots {
	display: flex;
	justify-content: center;
	gap: 0.5em;
	margin-top: 1em;
}


.carousel-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: #c3bd84;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease;
}


	.carousel-dot.active {
		background-color: #77731f;
		transform: scale(1.3);
	}


/* ============================== */
/* Discovery cards */
/* ============================== */

.discovery-section {
	margin-bottom: 3.5em;
}


.category-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1em;
}


.category-card {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	min-height: 120px;
	padding: 1.2em;
	background-color: #fffdf0;
	border: 1px solid #ded6a2;
	border-radius: 12px;
	color: #333;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}


	.category-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 5px 12px rgba(60, 55, 15, 0.12);
	}


	.category-card strong {
		font-family: "Autour One", sans-serif;
	}


	.category-card > span:last-child {
		color: #666;
		font-size: 0.85em;
	}


.category-icon {
	font-size: 1.8em;
}


/* ============================== */
/* Smaller recipe cards */
/* ============================== */

.home-recipes-section {
	margin-bottom: 3.5em;
}


.home-recipes-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.3em;
}


.home-recipe-card {
	overflow: hidden;
	background-color: #fffdf0;
	border: 1px solid #ded6a2;
	border-radius: 12px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}


	.home-recipe-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 6px 15px rgba(60, 55, 15, 0.12);
	}


.home-recipe-image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}


	.home-recipe-image img {
		width: 100%;
		height: 100%;
		display: block;
		object-fit: cover;
		transition: transform 0.3s ease;
	}


.home-recipe-card:hover img {
	transform: scale(1.03);
}


.home-recipe-info {
	padding: 1em;
}


	.home-recipe-info h3 {
		margin: 0 0 0.6em;
		font-family: "Autour One", sans-serif;
		font-size: 1em;
	}


.home-recipe-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8em;
	margin-bottom: 1em;
	color: #666;
	font-size: 0.8em;
}


.home-recipe-info > a {
	color: #686115;
	font-family: "Autour One", sans-serif;
	font-size: 0.8em;
	text-decoration: none;
}


	.home-recipe-info > a:hover {
		text-decoration: underline;
	}


/* ============================== */
/* Submission CTA */
/* ============================== */

.home-contribute {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 3em;
	padding: 2.5em;
	background-color: #D4DB81;
	border-radius: 16px;
}


	.home-contribute h2 {
		margin: 0.3em 0;
		font-family: "Autour One", sans-serif;
		color: #292913;
	}


	.home-contribute p {
		max-width: 700px;
		margin-bottom: 0;
		line-height: 1.6;
		color: #47471f;
	}



/* ============================== */
/* Homepage responsive */
/* ============================== */

@media (max-width: 800px) {

	.home-content {
		width: calc(100% - 24px);
	}


	.home-welcome {
		grid-template-columns: 1fr;
		padding: 2em;
	}


	.home-welcome-decoration {
		display: none;
	}


	.featured-card {
		grid-template-columns: 1fr;
	}


	.featured-image {
		min-height: 220px;
		max-height: 320px;
	}


	.category-grid {
		grid-template-columns: repeat(2, 1fr);
	}


	.home-recipes-grid {
		grid-template-columns: 1fr;
	}


	.home-contribute {
		flex-direction: column;
		align-items: flex-start;
	}
}


@media (max-width: 500px) {

	.featured-carousel {
		grid-template-columns: 1fr;
	}


	.carousel-button {
		display: none;
	}


	.category-grid {
		grid-template-columns: 1fr;
	}
}
