/**
 * IMG Banner Frontend Styles
 * BEM Methodology
 */

/* Banner Container */
.img-banner {
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	margin: 0 auto;
}

.img-banner__container {
	position: relative;
	width: 100%;
	height: auto;
}

/* Banner Slide */
.img-banner__slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.img-banner__slide--active {
	position: relative;
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

/* Single banner (no slideshow) */
.img-banner:not(.img-banner--slideshow) .img-banner__slide {
	position: relative;
	opacity: 1;
	visibility: visible;
}

/* Banner Link */
.img-banner__link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	cursor: pointer;
}

/* Picture Element */
.img-banner__picture {
	display: block;
	width: 100%;
	height: auto;
}

/* Image */
.img-banner__image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
}

/* Slideshow Controls */
.img-banner__controls {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 20px;
	pointer-events: none;
	z-index: 10;
}

.img-banner__control {
	pointer-events: auto;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease;
	font-size: 18px;
	line-height: 1;
}

.img-banner__control:hover {
	background: rgba(0, 0, 0, 0.8);
}

.img-banner__control:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Indicators */
.img-banner__indicators {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
}

.img-banner__indicator {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.3s ease, border-color 0.3s ease;
	padding: 0;
}

.img-banner__indicator:hover {
	background: rgba(255, 255, 255, 0.8);
}

.img-banner__indicator--active {
	background: #fff;
	border-color: rgba(0, 0, 0, 0.3);
}

.img-banner__indicator:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
	.img-banner__control {
		width: 35px;
		height: 35px;
		font-size: 16px;
	}

	.img-banner__controls {
		padding: 0 10px;
	}

	.img-banner__indicators {
		bottom: 10px;
		gap: 8px;
	}

	.img-banner__indicator {
		width: 10px;
		height: 10px;
	}
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.img-banner__slide {
		transition: none;
	}
}

/* Loading state */
.img-banner__slide.is-loading {
	opacity: 0.5;
}
