﻿/**
 * Community Ads System â€” Footer, Sidebar, and Hero responsive styles.
 */

/* Footer carousel â€” horizontal auto-scrolling partner logo row */
.cas-footer-carousel {
	width: 100%;
	overflow: hidden;
}

.cas-footer-carousel__viewport {
	overflow: hidden;
	width: 100%;
}

.cas-footer-carousel__track {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 2.5rem;
	width: max-content;
}

.cas-footer-carousel--static .cas-footer-carousel__viewport {
	display: flex;
	justify-content: center;
}

.cas-footer-carousel--static .cas-footer-carousel__track {
	width: auto;
}

.cas-footer-carousel--scroll .cas-footer-carousel__track {
	animation: cas-footer-scroll 40s linear infinite;
}

.cas-footer-carousel--scroll:hover .cas-footer-carousel__track {
	animation-play-state: paused;
}

.cas-ad-about {
	display: contents;
}

.cas-footer-carousel__item {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72px;
}

.cas-footer-carousel__link {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 44px;
	min-height: 72px;
	height: 72px;
	line-height: 0;
}

.cas-footer-carousel__logo {
	display: block;
	height: 72px;
	width: auto;
	min-width: 44px;
	max-width: 180px;
	object-fit: contain;
}

@keyframes cas-footer-scroll {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

@media (max-width: 767px) {
	.cas-footer-carousel--scroll .cas-footer-carousel__track {
		animation-duration: 32s;
	}

	.cas-footer-carousel__track {
		gap: 1.75rem;
	}

	.cas-footer-carousel__logo {
		height: 60px;
		max-width: 150px;
	}

	.cas-footer-carousel__item,
	.cas-footer-carousel__link {
		min-height: 60px;
		height: 60px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cas-footer-carousel--scroll .cas-footer-carousel__track {
		animation: none;
	}

	.cas-footer-carousel--scroll .cas-footer-carousel__viewport,
	.cas-footer-carousel--static .cas-footer-carousel__viewport {
		display: flex;
		justify-content: center;
	}

	.cas-footer-carousel__track {
		flex-wrap: wrap;
		justify-content: center;
		width: 100%;
	}
}

/* Sidebar card â€” 245px-wide responsive ad unit */
.cas-sidebar-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 245px;
	max-width: 100%;
	margin: 0;
	padding: 16px 0 14px;
	gap: 12px;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cas-sidebar-card__title {
	margin: 0;
	padding: 0 14px;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	color: inherit;
}

.cas-sidebar-card__description {
	margin: 0;
	padding: 0 14px;
	font-size: 0.8125rem;
	line-height: 1.45;
	text-align: center;
	color: inherit;
}

.cas-sidebar-card__media {
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background-color: rgba(0, 0, 0, 0.04);
}

.cas-sidebar-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.cas-sidebar-card__media--logo {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
}

.cas-sidebar-card__media--logo .cas-sidebar-card__image {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}


.cas-sidebar-card__description p {
	margin: 0 0 0.65em;
	color: inherit;
}

.cas-sidebar-card__description p:last-child {
	margin-bottom: 0;
}

.cas-sidebar-card__actions {
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 0 14px;
	box-sizing: border-box;
}

.cas-sidebar-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	background: transparent;
	border: 2px solid currentColor;
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.cas-sidebar-card__cta:hover,
.cas-sidebar-card__cta:focus {
	opacity: 0.85;
}

.cas-sidebar-card--ad-image {
	padding: 0;
	gap: 0;
	background: transparent;
	box-shadow: none;
}

.cas-sidebar-card__ad-link {
	display: block;
	line-height: 0;
}

.cas-sidebar-card__ad-image {
	display: block;
	width: 100%;
	height: auto;
}

@media (min-width: 981px) {
	.cas-sidebar-card {
		width: 245px;
	}
}

@media (min-width: 768px) and (max-width: 980px) {
	.cas-sidebar-card {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.cas-sidebar-card {
		width: 100%;
		max-width: 320px;
		margin-left: auto;
		margin-right: auto;
	}

}

/* Hero section â€” full-width homepage placement */
.cas-hero {
	position: relative;
	width: 100%;
	min-height: 65vh;
	overflow: hidden;
}

.cas-hero__track {
	position: relative;
	width: 100%;
	min-height: inherit;
}

.cas-hero__slide {
	position: relative;
	display: none;
	width: 100%;
	min-height: 65vh;
}

.cas-hero__slide.is-active {
	display: block;
}

.cas-hero:not(.cas-hero--carousel) .cas-hero__slide {
	display: block;
}

.cas-hero--has-ad-slides,
.cas-hero--has-ad-slides .cas-hero__track,
.cas-hero__slide--ad-image {
	min-height: 0;
}

.cas-hero__ad-link {
	display: block;
	line-height: 0;
}

.cas-hero__ad-image {
	display: block;
	width: 100%;
	height: auto;
}

.cas-hero__background {
	position: absolute;
	inset: 0;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.cas-hero__overlay {
	position: absolute;
	inset: 0;
}

.cas-hero__content {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: min(100%, 720px);
	min-height: 65vh;
	margin: 0 auto;
	padding: 48px 24px;
}

.cas-hero__logo {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 120px;
	min-height: 44px;
	margin-bottom: 16px;
	aspect-ratio: 5 / 3;
	line-height: 0;
}

.cas-hero__logo-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 120px;
	max-height: 72px;
	object-fit: contain;
}

.cas-hero__title {
	margin: 0 0 12px;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
}

.cas-hero__description {
	margin: 0 0 24px;
	font-size: clamp(1rem, 2.2vw, 1.25rem);
	line-height: 1.5;
}

.cas-hero__description p {
	margin: 0 0 0.75em;
}

.cas-hero__description p:last-child {
	margin-bottom: 0;
}

.cas-hero__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	background: transparent;
	border: 2px solid currentColor;
	border-radius: 4px;
	transition: opacity 0.2s ease;
}

.cas-hero__cta:hover,
.cas-hero__cta:focus {
	opacity: 0.85;
}

.cas-hero__cta,
.cas-sidebar-card__cta {
	padding: 0 30px;
}

.cas-hero__control {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 28px;
	line-height: 1;
	color: #fff;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.45);
	border: 0;
	border-radius: 50%;
	transform: translateY( -50% );
}

.cas-hero__control--prev {
	left: 16px;
}

.cas-hero__control--next {
	right: 16px;
}

.cas-hero__control:hover,
.cas-hero__control:focus {
	background: rgba(0, 0, 0, 0.65);
}

@media (min-width: 768px) and (max-width: 980px) {
	.cas-hero,
	.cas-hero__slide,
	.cas-hero__content {
		min-height: 55vh;
	}

	.cas-hero__content {
		width: 80%;
		padding: 40px 20px;
	}
}

@media (max-width: 767px) {
	.cas-hero,
	.cas-hero__slide,
	.cas-hero__content {
		min-height: auto;
	}

	.cas-hero__content {
		width: 100%;
		min-height: calc(100vw * 9 / 16);
		padding: 32px 20px;
	}

	.cas-hero__title {
		font-size: 1.5rem;
	}

	.cas-hero__description {
		font-size: 0.95rem;
	}

	.cas-hero__cta {
		width: 100%;
		min-height: 44px;
	}

	.cas-hero__control {
		width: 44px;
		height: 44px;
		font-size: 24px;
	}

	.cas-hero__control--prev {
		left: 8px;
	}

	.cas-hero__control--next {
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cas-hero__cta {
		transition: none;
	}
}
