/* ==========================================================================
   SeedsVision — homepage (front-page) styles
   ========================================================================== */

/* Section scaffolding ------------------------------------------------------ */

.section {
	padding: 56px 0;
}

.section--last {
	padding-bottom: 72px;
}

.section__title {
	margin: 0;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--color-fg);
}

.section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}

.section__head .section__title {
	margin: 0;
}

.section__foot {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	margin-top: 28px;
}

.section__foot--end {
	display: flex;
	justify-content: flex-end;
}

.link-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-green);
	grid-column: 3;
	justify-self: end;
}

.link-more:hover {
	color: #1d5536;
	text-decoration: none;
}

.link-more .icon--chevron {
	width: 14px;
	height: 14px;
}

/* Carousel controls -------------------------------------------------------- */

.carousel-arrows {
	display: inline-flex;
	gap: 10px;
}

.carousel-arrow {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--color-fg);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	transition: background var(--transition), border-color var(--transition);
}

.carousel-arrow:hover {
	background: var(--color-hover);
	border-color: #cfcfcf;
}

.carousel-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	grid-column: 2;
}

.carousel-dots[hidden] {
	display: none;
}

.carousel-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #cfcfcf;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	line-height: 0;
	transition: background var(--transition);
}

.carousel-dot.is-active {
	background: var(--color-green);
}

/* Shared card meta --------------------------------------------------------- */

.card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--color-fg-muted);
}

.card-meta__dot {
	color: #bdbdbd;
}

/* Carousel ----------------------------------------------------------------- */

.carousel {
	--per-view: 3;
}
.carousel[data-per-view="4"] {
	--per-view: 4;
}

.carousel__viewport {
	overflow: hidden;
}

.carousel__track {
	display: flex;
	gap: 24px;
	transition: transform 350ms ease;
	will-change: transform;
}

.carousel__slide {
	flex: 0 0 calc((100% - (var(--per-view) - 1) * 24px) / var(--per-view));
	display: flex;
}

.carousel__slide > article {
	width: 100%;
}

.carousel-arrow:disabled {
	opacity: 0.4;
	cursor: default;
}
.carousel-arrow:disabled:hover {
	background: #fff;
	border-color: var(--color-border);
}

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

.hero {
	padding: 24px 0 8px;
}

.hero__banner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 440px;
	border-radius: 6px;
	overflow: hidden;
	text-align: center;
	color: #fff;
}

.hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 0;
	background-color: var(--color-placeholder);
	background-image: url(../images/hero.jpg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 30, 15, 0.35) 0%, rgba(20, 30, 15, 0.55) 100%);
}

.hero__content {
	position: relative;
	z-index: 1;
	max-width: 760px;
	padding: 40px 24px;
}

.hero__title {
	margin: 0 0 28px;
	font-size: 44px;
	line-height: 1.15;
	font-weight: 700;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
}

/* About -------------------------------------------------------------------- */

.about .section__title {
	margin-bottom: 28px;
}

.about__text p {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--color-fg-muted);
}

.about__lead {
	margin: 0 0 18px;
	font-size: 20px;
	line-height: 1.4;
	font-weight: 700;
	color: var(--color-fg);
}

.about__subtitle {
	margin: 32px 0 12px;
	font-size: 17px;
	line-height: 1.4;
	font-weight: 700;
	color: var(--color-fg);
}

.about__text .about__roles {
	font-weight: 600;
	color: var(--color-fg);
}

.about__list {
	margin: 0 0 18px;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--color-fg-muted);
}

.about__list li {
	margin-bottom: 6px;
}

.about__text .about__outro {
	font-weight: 600;
	color: var(--color-fg);
}

.about__extra > *:last-child {
	margin-bottom: 0;
}

.about__more {
	display: inline-flex;
	margin-top: 12px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--color-green);
	font-size: 14px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Publication cards -------------------------------------------------------- */

.pub-card {
	display: flex;
	flex-direction: column;
	background: #f5f5f5;
	border-radius: 8px;
	overflow: hidden;
}

.pub-card__media {
	display: block;
	height: 200px;
	border-radius: 0;
	overflow: hidden;
}

.pub-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pub-card__body {
	padding: 20px;
}

.pub-card__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
}

.pub-card__title a:hover {
	color: var(--color-green);
	text-decoration: none;
}

/* News --------------------------------------------------------------------- */

.news {
	margin-top: 32px;
	display: grid;
	grid-template-columns: 1fr 1.55fr;
	gap: 56px;
}

.news-byline,
.news-byline__head {
	display: flex;
	gap: 12px;
	align-items: center;
}

.news-byline__avatar,
.news-item__avatar {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	/* The org logo variant is an <img>; the fallback is a placeholder span. */
	object-fit: cover;
}

.news-byline__org {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--color-fg);
}

.news-byline__meta {
	display: block;
	font-size: 12px;
	color: var(--color-fg-muted);
}

.news-feature__title {
	margin: 18px 0 0;
	font-size: 18px;
	line-height: 1.4;
	font-weight: 600;
}

.news-feature__title a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.news-feature__title a:hover {
	color: var(--color-green);
}

.news-feature__excerpt {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-fg-muted);
}

.news-list {
	display: flex;
	flex-direction: column;
}

.news-item {
	display: flex;
	gap: 14px;
	padding: 22px 0;
	border-top: 1px solid var(--color-border);
}

.news-item:first-child {
	padding-top: 0;
	border-top: 0;
}

.news-item__title {
	margin: 8px 0 8px;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 600;
}

.news-item__title a:hover {
	color: var(--color-green);
	text-decoration: none;
}

.news-item__excerpt {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--color-fg-muted);
}

/* Event cards -------------------------------------------------------------- */

.event-card {
	display: flex;
	flex-direction: column;
	background: #f5f5f5;
	border-radius: 8px;
	overflow: hidden;
}

.event-card__media {
	display: block;
	height: 200px;
	border-radius: 0;
	overflow: hidden;
}

.event-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.event-card__body {
	padding: 20px;
}

.event-card__title {
	margin: 0 0 14px;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
}

.event-card__title a:hover {
	color: var(--color-green);
	text-decoration: none;
}

.event-card__place {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-size: 14px;
	color: var(--color-fg-muted);
}

.event-card__place .icon--pin {
	flex-shrink: 0;
	color: var(--color-fg-muted);
}

/* Variety cards ------------------------------------------------------------ */

.variety-card {
	position: relative; /* anchors the favourite toggle */
	display: flex;
	flex-direction: column;
	background: #f5f5f5;
	border-radius: 8px;
	overflow: hidden;
}

.variety-card__media {
	position: relative;
	display: block;
}

.variety-card__media:hover {
	text-decoration: none;
}

.variety-card__img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 0;
}

.variety-card__flag {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	background: #fff;
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 500;
	color: var(--color-fg);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Favourite toggle — the shared seedsvision_favorite_button() form, same look
   as in the catalogue (assets/css/catalog.css). Farmers only, so it is simply
   absent for everyone else. */
.variety-fav {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	margin: 0;
}

.variety-fav__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 999px;
	padding: 7px;
	cursor: pointer;
	color: #9aa0a6;
	line-height: 0;
	transition: color var(--transition), background var(--transition);
}

.variety-fav__btn:hover {
	color: #e0574f;
}

.variety-fav.is-active .variety-fav__btn {
	color: #e0574f;
}

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

.variety-card__cat {
	margin: 0 0 10px;
	font-size: 12px;
	color: var(--color-fg-muted);
}

.variety-card__title {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 1.35;
	font-weight: 600;
}

.variety-card__title a:hover {
	color: var(--color-green);
	text-decoration: none;
}

.variety-card__company {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-size: 13px;
	color: var(--color-fg-muted);
}

.variety-card__company .icon--company {
	flex-shrink: 0;
}

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

@media (max-width: 1100px) {
	.hero__title {
		font-size: 36px;
	}
}

@media (max-width: 900px) {
	.section {
		padding: 48px 0;
	}
	.news {
		grid-template-columns: 1fr;
		gap: 36px;
	}
	.hero__banner {
		min-height: 360px;
	}
	.hero__title {
		font-size: 30px;
	}
}

@media (max-width: 600px) {
	.section {
		padding: 40px 0;
	}
	.section__head {
		flex-wrap: wrap;
	}
	.section__title {
		font-size: 24px;
	}

	.about__lead {
		font-size: 18px;
	}
	.about__subtitle {
		font-size: 16px;
	}

	/* Hero buttons: yellow on top, green below */
	.hero__actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}
	.hero__actions .btn {
		width: 100%;
	}
	.hero__title {
		font-size: 26px;
	}
}
