/**
 * Hexa Category Slider Styles
 *
 * Production-grade scoped CSS for the category slider widget.
 * All styles are prefixed with .hexa- to prevent conflicts.
 *
 * @package Hexa_Category_Slider
 * @since 1.0.0
 */

/* ==========================================================================
   Slider Wrapper
   ========================================================================== */

.hexa-category-slider-wrapper {
	position: relative;
	width: 100%;
	margin: 0 auto;
}

.hexa-category-swiper {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding: 0 50px 50px;
}

/* ==========================================================================
   Pre-Initialization Styles (Prevent Layout Shift)
   ========================================================================== */

.hexa-slider-pre-init .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	gap: 30px;
}

.hexa-slider-pre-init .swiper-slide {
	flex-shrink: 0;
	width: calc(25% - 22.5px);
	max-width: 100%;
}

@media (max-width: 1024px) {
	.hexa-slider-pre-init .swiper-slide {
		width: calc(50% - 15px);
	}
}

@media (max-width: 768px) {
	.hexa-slider-pre-init .swiper-slide {
		width: 100%;
	}
}

.hexa-slider-initialized .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
}

/* ==========================================================================
   Category Card
   ========================================================================== */

.hexa-category-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hexa-category-card-link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.hexa-category-card-link:hover,
.hexa-category-card-link:focus {
	text-decoration: none;
	outline: none;
}

/* ==========================================================================
   Image Wrapper
   ========================================================================== */

.hexa-category-image-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.hexa-category-image-wrapper::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: transparent;
	transition: background-color 0.3s ease;
	pointer-events: none;
}

/*.hexa-category-card:hover .hexa-category-image-wrapper::after {*/
/*	background-color: rgba(0, 0, 0, 0.1);*/
/*}*/

.hexa-category-image {
	width: 100%;
	height: 250px;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.hexa-category-card:hover .hexa-category-image {
	transform: scale(1.05);
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.hexa-category-content {
	/* padding: 24px; */
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.hexa-category-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: #1a1a1a;
	margin: 0px !important;
	transition: color 0.3s ease;
	text-align:center;
}

.hexa-category-card:hover .hexa-category-title {
	color: #0073e6;
}

.hexa-category-description {
	font-size: 14px;
	line-height: 1.6;
	color: #666666;
	/* margin: 0 0 15px 0; */
	flex-grow: 1;
}

/* ==========================================================================
   Button
   ========================================================================== */

.hexa-category-button {
	display: inline-block;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: #ffffff;
	background-color: #0073e6;
	border: none;
	border-radius: 6px;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	align-self: flex-start;
	pointer-events: none;
}

.hexa-category-card-link:hover .hexa-category-button {
	background-color: #005bb5;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.hexa-slider-button-prev,
.hexa-slider-button-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #ffffff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #0073e6;
	cursor: pointer;
	z-index: 10;
	transition: all 0.3s ease;
	user-select: none;
}

.hexa-slider-button-prev:hover,
.hexa-slider-button-next:hover {
	background-color: #0073e6;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
	transform: translateY(-50%) scale(1.1);
}

.hexa-slider-button-prev {
	left: 0;
}

.hexa-slider-button-next {
	right: 0;
}

.hexa-slider-button-prev.swiper-button-disabled,
.hexa-slider-button-next.swiper-button-disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

.hexa-slider-button-prev svg,
.hexa-slider-button-next svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* ==========================================================================
   Pagination Dots
   ========================================================================== */

.hexa-slider-pagination {
	position: relative;
	text-align: center;
	margin-top: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.hexa-slider-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	background-color: #cccccc;
	border-radius: 50%;
	opacity: 1;
	transition: all 0.3s ease;
	cursor: pointer;
}

.hexa-slider-pagination .swiper-pagination-bullet:hover {
	background-color: #999999;
	transform: scale(1.2);
}

.hexa-slider-pagination .swiper-pagination-bullet-active {
	background-color: #0073e6;
	width: 24px;
	border-radius: 5px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
	.hexa-category-swiper {
		padding: 0 40px 40px;
	}

	.hexa-slider-button-prev,
	.hexa-slider-button-next {
		width: 36px;
		height: 36px;
	}

	.hexa-slider-button-prev svg,
	.hexa-slider-button-next svg {
		width: 18px;
		height: 18px;
	}
}

@media (max-width: 768px) {
	.hexa-category-swiper {
		padding: 0 30px 35px;
	}
.hexa-category-slider-wrapper .swiper-horizontal {
    padding: 0px 16px;
}
	.hexa-category-content {
		padding: 5px 0px;
	}

	.hexa-category-title {
		font-size: 18px;
		margin-bottom: 12px;
	}

	.hexa-category-description {
		font-size: 13px;
		margin-bottom: 12px;
	}

	.hexa-category-button {
		padding: 10px 20px;
		font-size: 13px;
	}

	.hexa-slider-button-prev,
	.hexa-slider-button-next {
		width: 32px;
		height: 32px;
	}

	.hexa-slider-button-prev svg,
	.hexa-slider-button-next svg {
		width: 16px;
		height: 16px;
	}
}

@media (max-width: 480px) {
	.hexa-category-swiper {
		padding: 0 20px 30px;
	}

.hexa-category-slider-wrapper .swiper-horizontal {
    padding: 0px 16px;
}
	.hexa-category-content {
		padding: 5px 0px;
	}
	.hexa-category-title {
		font-size: 16px;
		margin-bottom: 10px;
	}

	.hexa-category-description {
		font-size: 12px;
		margin-bottom: 10px;
	}

	.hexa-category-button {
		padding: 8px 16px;
		font-size: 12px;
	}

	.hexa-slider-button-prev,
	.hexa-slider-button-next {
		width: 28px;
		height: 28px;
	}

	.hexa-slider-button-prev svg,
	.hexa-slider-button-next svg {
		width: 14px;
		height: 14px;
	}

	.hexa-slider-pagination .swiper-pagination-bullet {
		width: 8px;
		height: 8px;
	}

	.hexa-slider-pagination .swiper-pagination-bullet-active {
		width: 20px;
	}
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.hexa-category-button:focus,
.hexa-slider-button-prev:focus,
.hexa-slider-button-next:focus {
	outline: 2px solid #0073e6;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.hexa-category-card,
	.hexa-category-image,
	.hexa-category-button,
	.hexa-slider-button-prev,
	.hexa-slider-button-next,
	.hexa-slider-pagination .swiper-pagination-bullet {
		transition: none;
	}
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

[dir="rtl"] .hexa-slider-button-prev {
	left: auto;
	right: 0;
}

[dir="rtl"] .hexa-slider-button-next {
	right: auto;
	left: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.hexa-slider-button-prev,
	.hexa-slider-button-next,
	.hexa-slider-pagination {
		display: none;
	}

	.hexa-category-card {
		break-inside: avoid;
	}
}
