/* -----------------------------------------------------------------------------
   Image Buttons block — base (inner pages). Homepage variant: .image-buttons--homepage
   ----------------------------------------------------------------------------- */

.image-buttons {
	overflow-x: hidden;
	position: relative;
	z-index: 1;
}

.image-buttons__bg {
	position: absolute;
	z-index: -1;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	opacity: 0.29;
	object-fit: cover;
}

.image-buttons__headlines {
	margin-bottom: 12px;
}

.image-buttons__headlines :last-child {
	margin-bottom: 0;
}

.image-buttons__bttn {
	margin-top: 12px;
}

.image-buttons .bottom_content {
	margin-top: 12px;
}

/* Grid — base */
.image-button-grid {
	font-size: 0;
	margin: 0 -32px 0 -10px;
	padding-bottom: 42px;
}

.image-button-item {
	padding: 0 10px;
	transition: width 0.3s ease-in-out;
}

/* Button card — base */
.image-button {
	position: relative;
	display: block;
	text-decoration: none;
	height: 384px;
	width: 292px;
}

.image-button::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 232px;
	left: 0;
	bottom: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
	transition: background 0.3s ease-in-out, height 0.3s ease-in-out;
}

.image-button__details {
	position: absolute;
	width: 100%;
	bottom: 0;
	left: 0;
	z-index: 1;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: all 0.3s ease-in-out;
}

.image-button__title {
	color: var(--white);
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1em;
	text-transform: uppercase;
}

.image-button__icons {
	display: flex;
	background: var(--primary-color);
	max-width: 54px;
	height: 54px;
	width: 100%;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	color: var(--secondary-color);
	font-size: 12px;
	line-height: 1em;
	font-weight: normal;
}

/* Grid — Slick arrows (base) */
.image-button-grid .slick-arrow {
	background: none;
	width: 24px;
	height: 24px;
	color: var(--black);
	padding: 0;
	margin: 0;
	transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.image-button-grid .slick-arrow::before {
	font-size: 23px;
}

.image-button-grid .slick-prev {
	margin-left: -44px;
}

.image-button-grid .slick-next {
	margin-right: -24px;
}

.bg-dark .image-button-grid .slick-arrow,
.bg-darkest .image-button-grid .slick-arrow {
	color: var(--white);
}

/* Slider — base */
.image-button-slider {
	padding-top: 79px;
	font-size: 0;
	margin: 0 -10px 0 12px;
}

.image-buttons__bttn--slide {
	margin-top: 20px;
}

.image-button-slider .slick-arrow {
	top: 0;
	bottom: auto;
}

/* Too few cards to scroll: constrain the viewport to the cards so the row sits
   centered instead of hugging the left edge of the full bleed slider. */
.image-button-slider.image-button-slider--static {
	padding-top: 0;
}

.image-button-slider--static .slick-list {
	max-width: var(--ibs-content-width, 100%);
	margin-left: auto;
	margin-right: auto;
}

.image-button__hover {
	display: none;
}

.image-button-slider .image-button__details {
	padding: 28px;
}

.image-button-slider .image-button {
	border: 1px solid var(--dark);
	transition: border-color 0.3s ease-in-out;
}

.image-button-slider .image-button__hover-text {

	&.has-scrollable-content {
		max-height: calc(1.38em * 6);
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding-right: 15px;
	}
}

/* -----------------------------------------------------------------------------
   Responsive — 768px
   ----------------------------------------------------------------------------- */

@media (min-width: 768px) {
	.image-buttons__headlines {
		margin-bottom: 20px;
	}

	.image-buttons__bttn {
		margin-top: 20px;
	}

	.image-buttons .bottom_content {
		margin-top: 20px;
	}

	.image-button-grid {
		margin: 0 -68px 0 -16px;
		padding-bottom: 46px;
	}

	.image-button-item {
		padding: 0 16px;
	}

	.image-button {
		width: 398px;
	}

	.image-button__title {
		font-size: 23px;
	}

	.image-button-slider {
		padding-top: 90px;
		padding-bottom: 0;
		margin: 0 -16px;
	}

	.image-buttons__bttn--slide {
		margin-top: 32px;
	}

	.image-buttons__bttn--slide .btn-group {
		column-gap: 32px;
		margin-top: 0;
	}

	.image-button-slider .image-button {
		width: 292px;
	}

	.image-button-slider .image-button::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.53) 0%, rgba(0, 0, 0, 1) 100%);
		height: 100%;
	}

	.image-button-slider .image-button__details {
		display: block;
		color: var(--light);
	}

	.image-button-slider .image-button__title {
		max-width: 197px;
	}

	.image-button__hover p {
		color: var(--white);
		font-size: 14px;
		line-height: 1.38em;
		margin-top: 10px;
		margin-bottom: 10px;
	}

	.image-button-slider .image-button__icons {
		width: 33px;
		height: 33px;
	}

	.image-button-slider .slick-current .image-button {
		border-color: var(--medium);
	}

	.image-button-slider .slick-current .image-button__hover {
		display: block;
	}
}

/* -----------------------------------------------------------------------------
   Responsive — 1200px
   ----------------------------------------------------------------------------- */

@media (min-width: 1200px) {
	.image-buttons__headlines {
		margin-bottom: 32px;
	}

	.image-buttons__bttn {
		margin-top: 32px;
	}

	.image-buttons .bottom_content {
		margin-top: 32px;
	}

	.image-button-grid {
        margin: 0;
		padding-bottom: 0;
		display: flex;
		justify-content: center;
	}

	.image-button-grid + .image-button-grid {
		margin-top: 37px;
	}

	.image-button-item {
		width: 33.33%;
	}

	.image-button__details {
		padding: 28px;
	}

	.image-button {
		width: 100%;
	}

	.image-button__title {
		font-size: 28px;
		max-width: 208px;
	}

	.image-button__icons {
		opacity: 0;
		visibility: hidden;
		transform: scale(0);
		transform-origin: center center;
		transition: all 0.3s ease-in-out;
	}

	.image-button:hover .image-button__icons {
		opacity: 1;
		visibility: visible;
		transform: scale(1);
	}

	.image-button-grid:has(.image-button-item:hover) .image-button-item {
		width: 25%;
	}

	.image-button-grid:has(.image-button-item:hover) .image-button-item:hover {
		width: 50%;
	}

	.image-button-slider {
		padding-top: 118px;
	}

	.image-buttons__bttn--slide {
		margin-top: 60px;
	}

	.image-button-slider .image-button::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
		height: 232px;
	}

	.image-button-slider .image-button:hover::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.53) 0%, rgba(0, 0, 0, 1) 100%);
		height: 100%;
	}

	.image-button-slider .slick-current .image-button {
		border-color: var(--dark);
	}

	.image-button-slider .image-button:hover .image-button__hover {
		display: block;
	}

	.image-button-slider .image-button:hover {
		border-color: var(--light);
	}

	.image-button-slider .image-button .image-button__details {
		justify-content: flex-end;
		align-items: flex-start;
		transition: all 0.3s ease-in-out;
	}

	.image-button-slider .image-button:hover .image-button__details {
		height: 100%;
	}

	.image-button__hover {
		display: block;
		opacity: 0;
		max-height: 0;
		transition: all 0.5s ease-in-out;
	}

	.image-button:hover .image-button__hover {
		max-height: 100%;
        transition: all 0.5s ease-in-out;
		opacity: 1;
	}
}

/* -----------------------------------------------------------------------------
   Homepage variant (.image-buttons--homepage)
   ----------------------------------------------------------------------------- */

/* Grid — homepage: tighter spacing, flex from 768px */
.image-buttons--homepage .image-button-grid {
	margin: 0 -5px;
	padding-bottom: 50px;
}

.image-buttons--homepage .image-button-item {
	padding: 0 5px;
}

@media (min-width: 768px) {
	.image-buttons--homepage .image-button-grid {
		margin: 0 -16px;
		padding-bottom: 0;
		display: flex;
		/* flex-wrap: wrap; */
	}

	.image-buttons--homepage .image-button-item {
		padding: 0 16px;
		width: 33.33%;
	}

	.image-buttons--homepage .image-button-grid + .image-button-grid {
		margin-top: 27px;
	}
}

@media (min-width: 1200px) {
	.image-buttons--homepage .image-button-grid + .image-button-grid {
		margin-top: 37px;
	}
}

/* Button card — homepage: shorter heights until 1200px, no fixed width */
.image-buttons--homepage .image-button {
	height: 170px;
	width: auto;
}

.image-buttons--homepage .image-button::after {
	height: 82px;
}

.image-buttons--homepage .image-button__details {
    flex-wrap: wrap;
	padding: 20px;
	transition: transform 0.3s ease-in-out;
}

.image-buttons--homepage .image-button__title {
	font-size: 19px;
	transition: transform 0.3s ease-in-out;
}

.image-buttons--homepage .image-button__icons {
	display: none;
}

@media (min-width: 768px) {
	.image-buttons--homepage .image-button {
		height: 286px;
	}

	.image-buttons--homepage .image-button::after {
		height: 232px;
	}

	.image-buttons--homepage .image-button__title {
		font-size: 23px;
	}
}

@media (min-width: 1200px) {
	.image-buttons--homepage .image-button {
		height: 384px;
	}

	.image-buttons--homepage .image-button img {
		object-position: top;
	}

	.image-buttons--homepage .image-button__details {
		padding: 28px;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.image-buttons--homepage .image-button__title {
		font-size: 28px;
		max-width: 208px;
	}

	.image-buttons--homepage .image-button__icons {
		display: flex;
		width: 0;
		height: 0;
		opacity: 0;
		visibility: hidden;
		transform: scale(0);
		transform-origin: center center;
		transition: all 0.3s ease-in-out;
		background: var(--primary-color);
		border-radius: 50%;
		align-items: center;
		justify-content: center;
		color: var(--white);
		font-size: 12px;
		line-height: 1em;
		font-weight: normal;
	}

	.image-buttons--homepage .image-button:hover .image-button__icons {
		width: 54px;
		height: 54px;
		transform: scale(1);
		opacity: 1;
		visibility: visible;
	}
}

/* Grid arrows — homepage: larger arrows */
.image-buttons--homepage .image-button-slider .slick-arrow {
    top: unset;
    bottom: 0;
}

.image-buttons--homepage .image-button-grid .slick-arrow,
.image-buttons--homepage .image-button-slider .slick-arrow {
	width: 39px;
	height: 39px;
	transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.image-buttons--homepage .image-button-grid .slick-prev,
.image-buttons--homepage .image-button-slider .slick-prev {
	margin-left: -49px;
}

.image-buttons--homepage .image-button-grid .slick-next,
.image-buttons--homepage .image-button-slider .slick-next {
	margin-right: -49px;
}

/* Slider — homepage: different padding/margin, gradient opacity */
.image-buttons--homepage .image-button-slider {
	padding-top: 8px;
	padding-bottom: 58px;
	margin: 0 -5px;
}

.image-buttons--homepage .image-button-slider .image-button {
	width: 292px;
	height: 384px;
	color: var(--light);
}

.image-buttons--homepage .image-button-slider .image-button::after {
	height: 100%;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.29) 0%, rgba(0, 0, 0, 1) 100%);
}

.image-buttons--homepage .image-button-slider .image-button__details {
	padding: 27px;
}

.image-buttons--homepage .image-button-slider .image-button__hover {
    display: block;
	margin-top: 0;
	color: var(--white);
	width: 100%
}

.image-buttons--homepage .image-button__hover p {
	margin-top: 10px;
	margin-bottom: 10px;
	line-height: 1.38em;
	font-size: 14px;
}

.image-buttons--homepage .image-button-slider .image-button__icons {
	display: flex;
	background: var(--primary-color);
	width: 33px;
	height: 33px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	color: var(--white);
	font-size: 12px;
	line-height: 1em;
	font-weight: normal;
}

.image-buttons--homepage .image-button-slider .slick-current .image-button {
	border-color: var(--medium);
}

@media (min-width: 768px) {
	.image-buttons--homepage .image-button-slider .image-button__title {
		max-width: 197px;
	}

	.image-buttons--homepage .image-button-slider {
		padding-top: 90px;
		padding-bottom: 0;
		margin: 0 -5px;
	}

	.image-buttons--homepage .image-button-slider .slick-arrow {
		top: 0;
		bottom: auto;
	}

	.image-buttons--homepage .image-button-slider .image-button::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.53) 0%, rgba(0, 0, 0, 1) 100%);
	}
}

@media (min-width: 1200px) {
	.image-button-slider .image-button__details {
		display: flex;
		flex-wrap: nowrap;
		flex-direction: column;
		align-items: flex-start;
	}

	.image-buttons--homepage .image-button-slider {
		padding-top: 118px;
	}

	.image-buttons--homepage .image-button-slider .image-button::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
		height: 232px;
	}

	.image-buttons--homepage .image-button-slider .image-button:hover::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.53) 0%, rgba(0, 0, 0, 1) 100%);
		height: 100%;
	}

	.image-buttons--homepage .image-button-slider .image-button:hover {
		border-color: var(--medium);
	}

	.image-buttons--homepage .image-button-slider .slick-current .image-button {
		border-color: var(--dark);
	}

	.image-buttons--homepage .image-button-slider .slick-current .image-button:hover {
		border-color: var(--medium);
	}

	.image-buttons--homepage .image-button-slider .slick-arrow {
		width: 59px;
		height: 59px;
	}

	.image-buttons--homepage .image-button-slider .slick-prev {
		margin-left: -69px;
	}

	.image-buttons--homepage .image-button-slider .slick-next {
		margin-right: -69px;
	}

	.image-buttons--homepage .image-button-slider .image-button:hover .image-button__icons {
		width: 33px;
		height: 33px;
	}
}
