/* Garðheimar Forsíða - front-page section styles.
   Namespaced (.ghf-* / .ghv-*) so nothing here can touch other page styles.
   Accent green #3a6a37 matches the site's existing links. */

/* =========================================================
   Fróðleiksmolar previews
   ========================================================= */
.ghf-frod { width: 100%; line-height: 1.5; }

.ghf-frod-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr) auto;
	gap: 28px;
	align-items: stretch;
}

.ghf-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.ghf-card-img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	background-color: #dfe6da;
	border-radius: 14px;
}
.ghf-card-img--empty { background: linear-gradient(135deg, #cdd9c5, #e6ece0); }

.ghf-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding-top: 16px;
}

/* Titles are <h3>: inherit Lusitana from the theme, but pin size/weight/line-height
   with enough specificity (+ !important) so the theme's large heading sizing can't
   inflate the cards. */
.ghf-frod .ghf-card-title {
	margin: 0 0 8px !important;
	padding: 0;
	font-family: "Lusitana", Georgia, "Times New Roman", serif !important;
	font-size: 20px !important;
	line-height: 1.3 !important;
	font-weight: 600 !important;
	color: #282828;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ghf-card-excerpt {
	font-size: 15px;
	line-height: 1.55;
	color: #5f5f5f;
	margin-bottom: 18px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ghf-btn {
	align-self: flex-start;
	margin-top: auto;
	display: inline-block;
	background: #3a6a37; /* Salient theme Accent-Color */
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 20px;
	padding: 15px 35px;
	border-radius: 4px;
	transition: background .15s ease;
}
.ghf-card:hover .ghf-btn { background: #2f562c; }

.ghf-seeall {
	display: flex;
	align-self: center;
	align-items: center;
	justify-content: center;
	padding-left: 4px;
}
.ghf-seeall-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #3a6a37;
	transition: color .15s ease;
}
.ghf-seeall-arrow { font-size: 42px; line-height: 1; }
.ghf-seeall-text { font-size: 15px; font-weight: 600; }
.ghf-seeall-link:hover { color: #2f562c; }

@media (max-width: 1000px) {
	.ghf-frod-grid { grid-template-columns: repeat(2, 1fr); }
	.ghf-seeall { grid-column: 1 / -1; padding: 8px 0 0; }
	.ghf-seeall-link { flex-direction: row; gap: 12px; }
	.ghf-seeall-arrow { font-size: 28px; }
}
@media (max-width: 560px) {
	.ghf-frod-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Viðburðadagatal (calendar + event cards)
   ========================================================= */

/* Anchor target for the "Viðburðadagatal" menu link. scroll-margin keeps the
   heading clear of the fixed header when jumped to (same-page or cross-page). */
#vidburdadagatal { scroll-margin-top: 250px; }

.ghv {
	display: grid;
	grid-template-columns: minmax(320px, 40%) 1fr;
	gap: 32px;
	align-items: stretch; /* cards column stretches to the calendar's height */
	line-height: 1.5;
}

/* --- Calendar panel --- */
.ghv-calendar {
	background: #e7f0e0;
	border-radius: 18px;
	padding: 26px 26px 22px;
}
.ghv-cal-head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
	min-height: 32px;
}
.ghv .ghv-cal-title {
	margin: 0 !important;
	padding: 0;
	font-family: "Lusitana", Georgia, "Times New Roman", serif !important;
	font-size: 22px !important;
	line-height: 1.2 !important;
	font-weight: 600 !important;
	color: #282828;
	text-align: center;
}
.ghv-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	color: #3a6a37;
	padding: 4px 8px;
}
.ghv-prev { left: 0; }
.ghv-next { right: 0; }
.ghv-nav:hover { color: #2f562c; }

.ghv-cal-weekdays,
.ghv-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}
.ghv-cal-weekdays { margin-bottom: 6px; }
.ghv-cal-weekdays span {
	text-align: center;
	font-size: 11px;
	letter-spacing: .08em;
	font-weight: 600;
	text-transform: uppercase;
	color: #7c8a72;
}

.ghv-cal-day {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	font-size: 15px;
	color: #2f2f2f;
}
.ghv-daynum {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	transition: background .12s ease;
}
.ghv-empty { visibility: hidden; }

.ghv-has-event { cursor: pointer; }
.ghv-has-event::after {
	content: "";
	position: absolute;
	bottom: 7px;
	left: 50%;
	transform: translateX(-50%);
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #3a6a37;
}
.ghv-has-event:hover .ghv-daynum { background: rgba(45, 90, 39, .14); }

/* Today = accent green; selected = deeper green (declared after so it wins if a day is both). */
.ghv-today .ghv-daynum { background: #3a6a37; color: #fff; }
.ghv-selected .ghv-daynum { background: #16351a; color: #fff; }
.ghv-today.ghv-has-event::after,
.ghv-selected.ghv-has-event::after { background: #fff; }

.ghv-cal-hint {
	margin-top: 16px;
	text-align: center;
	font-size: 12px;
	color: #7c8a72;
}

/* --- Event cards ---
   Two columns x two rows, sized so the whole 4-card block matches the calendar's
   height (incl. the row gap). The column stretches to the calendar (align-items:
   stretch on .ghv); the two rows split that height (1fr 1fr) and each card's media
   flexes to fill whatever is left after its text, so cards never grow the section. */
.ghv-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: 1fr 1fr;
	gap: 22px;
	min-height: 0;
}
.ghv-card {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .07);
	text-decoration: none;
	color: inherit;
}
.ghv-card-media {
	position: relative;
	flex: 1 1 0;
	min-height: 84px;
	width: 100%;
	background-size: cover;
	background-position: center;
	background-color: #dfe6da;
}
.ghv-card-media--empty { background: linear-gradient(135deg, #cdd9c5, #e6ece0); }

.ghv-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #3a6a37;
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.ghv-badge b { font-size: 16px; font-weight: 700; }
.ghv-badge i { font-size: 9px; font-style: normal; letter-spacing: .05em; margin-top: 2px; }

.ghv-card-body {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	padding: 12px 16px 13px;
}
.ghv .ghv-card-title {
	margin: 0 0 4px !important;
	padding: 0;
	font-family: "Lusitana", Georgia, "Times New Roman", serif !important;
	font-size: 17px !important;
	line-height: 1.25 !important;
	font-weight: 600 !important;
	color: #282828;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ghv-card-meta { font-size: 13px; line-height: 1.3; color: #6b6b6b; margin-bottom: 8px; }
.ghv-card-more { margin-top: auto; font-size: 13px; font-weight: 600; color: #3a6a37; }
.ghv-card:hover .ghv-card-more { color: #2f562c; }

.ghv-noevents {
	grid-column: 1 / -1;
	padding: 44px;
	text-align: center;
	color: #6b6b6b;
	background: #fff;
	border-radius: 14px;
}

@media (max-width: 900px) {
	.ghv { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.ghv-cards { grid-template-columns: 1fr; }
}

/* Fyrirtækjaþjónusta section: when the columns stack (<=999px, Salient breakpoint),
   restore top spacing on the image column so the decorative margin-top:-50px on the
   .plant image does not pull it up over the "Sjá meira" button. Desktop is unaffected. */
@media (max-width: 999px) {
	.ghf-fyr-imgcol { margin-top: 30px !important; }
}
