/**
 * Front page — news carousel + loan carousel styles.
 * Ported from Laravel resources/views/home.blade.php @push('styles').
 */

/* Immersive News Carousel Styles with Borderless Effect */
.news-carousel-container {
	position: relative;
	padding: 0 80px;
	margin: 0 -2rem;
}

.news-carousel {
	overflow: visible !important;
}

.news-carousel .swiper-wrapper {
	align-items: stretch;
}

.news-carousel .swiper-slide {
	height: auto;
	opacity: 0.3;
	transform: scale(0.75);
	transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
	filter: blur(3px) grayscale(40%);
}

.news-carousel .swiper-slide-active {
	opacity: 1;
	transform: scale(1);
	z-index: 20;
	filter: blur(0) grayscale(0%);
}

.news-carousel .swiper-slide-active a {
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.news-carousel .storage-img {
	height: 100%;
}

.news-carousel .storage-img img {
	height: 100%;
}

.news-carousel .swiper-slide-prev,
.news-carousel .swiper-slide-next {
	opacity: 0.5;
	transform: scale(0.85);
	filter: blur(2px) grayscale(20%);
	z-index: 10;
}

/* Immersive Navigation Buttons */
.news-carousel-prev,
.news-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.9));
	backdrop-filter: blur(12px);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 30;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 15px 35px rgba(251, 191, 36, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
	border: 3px solid rgba(255, 255, 255, 0.2);
	margin-top: 0;
}

/* Remove Swiper's default ::after arrows so only our custom icon shows */
.news-carousel-prev::after,
.news-carousel-next::after {
	display: none !important;
	content: '' !important;
}

.news-carousel-prev:hover,
.news-carousel-next:hover {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	box-shadow: 0 20px 45px rgba(251, 191, 36, 0.6), 0 10px 25px rgba(0, 0, 0, 0.4);
	transform: translateY(-50%) scale(1.15);
	border-color: rgba(255, 255, 255, 0.4);
}

.news-carousel-prev i,
.news-carousel-next i {
	font-size: 24px;
	color: #1e3a8a;
	transition: all 0.3s ease;
	line-height: 1;
	display: block;
}

/* Mobile Loan Details Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mobile Loan Card Optimization */
@media (max-width: 1023px) {
	.loan-card {
		max-height: none;
	}

	.loan-carousel-container .swiper-slide {
		height: auto;
	}
}

/* Desktop Loan Card Consistent Height */
@media (min-width: 1024px) {
	.loan-carousel-container .swiper-slide {
		height: 400px;
	}

	.loan-card {
		height: 100%;
	}
}

.news-carousel-prev:hover i,
.news-carousel-next:hover i {
	color: #1e3a8a;
	transform: scale(1.1);
}

.news-carousel-prev {
	left: 10px;
}

.news-carousel-next {
	right: 10px;
}

/* Immersive Pagination Dots */
.news-carousel-pagination {
	position: relative !important;
	bottom: 0 !important;
	display: flex;
	justify-content: center;
	gap: 12px;
}

.news-carousel-pagination .swiper-pagination-bullet {
	width: 12px;
	height: 12px;
	background: rgba(255, 255, 255, 0.4);
	opacity: 1;
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 12px;
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.news-carousel-pagination .swiper-pagination-bullet-active {
	background: #fbbf24;
	width: 48px;
	box-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
	border-color: rgba(251, 191, 36, 0.5);
}

/* Line clamp utilities */
.line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
	.news-carousel-container {
		padding: 0 70px;
	}

	.news-carousel .swiper-slide {
		transform: scale(0.80);
	}

	.news-carousel .swiper-slide-prev,
	.news-carousel .swiper-slide-next {
		transform: scale(0.88);
	}
}

@media (max-width: 1024px) {
	.news-carousel-container {
		padding: 0 60px;
		margin: 0 -1rem;
	}

	.news-carousel-prev,
	.news-carousel-next {
		width: 56px;
		height: 56px;
	}

	.news-carousel-prev i,
	.news-carousel-next i {
		font-size: 20px;
	}
}

@media (max-width: 768px) {
	.news-carousel-container {
		padding: 0 50px;
		margin: 0;
	}

	.news-carousel-prev,
	.news-carousel-next {
		width: 48px;
		height: 48px;
	}

	.news-carousel-prev i,
	.news-carousel-next i {
		font-size: 18px;
	}

	.news-carousel .swiper-slide {
		opacity: 0.25;
		transform: scale(0.85);
		filter: blur(2px) grayscale(60%);
	}

	.news-carousel .swiper-slide-prev,
	.news-carousel .swiper-slide-next {
		opacity: 0.4;
		transform: scale(0.92);
		filter: blur(1.5px) grayscale(30%);
	}
}

@media (max-width: 640px) {
	.news-carousel-container {
		padding: 0 40px;
	}

	.news-carousel-prev,
	.news-carousel-next {
		width: 44px;
		height: 44px;
	}

	.news-carousel-prev i,
	.news-carousel-next i {
		font-size: 16px;
	}

	.news-carousel .swiper-slide {
		opacity: 1;
		transform: scale(1);
		filter: blur(0) grayscale(0%);
	}

	.news-carousel .swiper-slide-prev,
	.news-carousel .swiper-slide-next {
		opacity: 0.3;
		transform: scale(0.95);
		filter: blur(1px) grayscale(40%);
	}
}

@media (max-width: 480px) {
	.news-carousel-container {
		padding: 0;
		margin: 0 -1rem;
	}

	.news-carousel-prev,
	.news-carousel-next {
		width: 40px;
		height: 40px;
	}

	.news-carousel-prev {
		left: 5px;
	}

	.news-carousel-next {
		right: 5px;
	}
}

/* Animation Utilities */
@keyframes float {
	0% { transform: translateY(0px); }
	50% { transform: translateY(-10px); }
	100% { transform: translateY(0px); }
}

@keyframes blob {
	0% { transform: scale(1) translate(0px, 0px); }
	33% { transform: scale(1.1) translate(20px, -10px); }
	66% { transform: scale(0.9) translate(-20px, 10px); }
	100% { transform: scale(1) translate(0px, 0px); }
}

.animate-float {
	animation: float 6s ease-in-out infinite;
}

.animate-blob {
	animation: blob 7s infinite;
}

.animation-delay-2000 {
	animation-delay: 2s;
}

.animation-delay-4000 {
	animation-delay: 4s;
}

/* Enhanced Loan Carousel Styling */
.loan-carousel-wrapper {
	position: relative;
	padding: 0 60px;
}

@media (max-width: 768px) {
	.loan-carousel-wrapper {
		padding: 0 20px;
	}
}

.loan-carousel-container {
	overflow: visible !important;
}

.loan-carousel-container .swiper-slide {
	height: auto;
	display: flex;
	align-items: stretch;
	opacity: 0.5;
	transform: scale(0.92);
	transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.loan-carousel-container .swiper-slide-active {
	opacity: 1;
	transform: scale(1);
	z-index: 2;
}

.loan-carousel-container .swiper-slide-prev,
.loan-carousel-container .swiper-slide-next {
	opacity: 0.6;
	transform: scale(0.95);
}

.loan-card-wrapper {
	width: 100%;
	height: 100%;
	perspective: 1000px;
}

.loan-card {
	width: 100%;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.loan-carousel-container .swiper-slide-active .loan-card {
	box-shadow: 0 20px 60px -10px rgba(59, 130, 246, 0.3), 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* Enhanced Navigation Buttons */
.loan-carousel-button-prev,
.loan-carousel-button-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	cursor: pointer;
	user-select: none;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loan-carousel-button-prev {
	left: 0;
}

.loan-carousel-button-next {
	right: 0;
}

.loan-carousel-button-prev:hover,
.loan-carousel-button-next:hover {
	transform: translateY(-50%) scale(1.1);
}

.loan-carousel-button-prev:active,
.loan-carousel-button-next:active {
	transform: translateY(-50%) scale(0.95);
}

.nav-button-inner {
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 24px;
	box-shadow: 0 8px 24px -6px rgba(59, 130, 246, 0.5), 0 4px 12px -3px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.nav-button-inner::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.loan-carousel-button-prev:hover .nav-button-inner,
.loan-carousel-button-next:hover .nav-button-inner {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	box-shadow: 0 12px 32px -8px rgba(59, 130, 246, 0.7), 0 6px 16px -4px rgba(0, 0, 0, 0.3);
}

.loan-carousel-button-prev:hover .nav-button-inner::before,
.loan-carousel-button-next:hover .nav-button-inner::before {
	opacity: 1;
}

.swiper-button-disabled .nav-button-inner {
	opacity: 0.4;
	cursor: not-allowed;
}

@media (max-width: 768px) {
	.nav-button-inner {
		width: 48px;
		height: 48px;
		font-size: 18px;
	}
}

/* Enhanced Pagination Styles */
.loan-carousel-pagination {
	position: relative !important;
	bottom: auto !important;
	display: flex;
	gap: 12px;
	justify-content: center;
	align-items: center;
}

.loan-carousel-pagination .swiper-pagination-bullet {
	width: 12px;
	height: 12px;
	background: #cbd5e1;
	opacity: 1;
	border-radius: 50%;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
	margin: 0 !important;
}

.loan-carousel-pagination .swiper-pagination-bullet::before {
	content: '';
	position: absolute;
	inset: -4px;
	border: 2px solid transparent;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.loan-carousel-pagination .swiper-pagination-bullet-active {
	width: 40px;
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
	box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.6);
}

.loan-carousel-pagination .swiper-pagination-bullet-active::before {
	border-color: #3b82f6;
	inset: -6px;
}

.loan-carousel-pagination .swiper-pagination-bullet:hover {
	background: #94a3b8;
	transform: scale(1.2);
}

/* Progress Bar */
.loan-carousel-progress-container {
	width: 100%;
	max-width: 400px;
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
	overflow: hidden;
	position: relative;
}

.loan-carousel-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
	border-radius: 2px;
	width: 0;
	transition: width 0.3s ease;
	position: relative;
}

.loan-carousel-progress-bar::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 40px;
	height: 100%;
	background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 100%);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0%, 100% { opacity: 0; }
	50% { opacity: 1; }
}

/* Loan Product Cards Animation */
.loan-product-card {
	animation: fadeInUp 0.5s ease-out backwards;
}

.loan-product-card:nth-child(1) { animation-delay: 0.1s; }
.loan-product-card:nth-child(2) { animation-delay: 0.2s; }
.loan-product-card:nth-child(3) { animation-delay: 0.3s; }
.loan-product-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Custom Scrollbar for Loan Products */
.custom-scrollbar::-webkit-scrollbar {
	width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
	border-radius: 3px;
	transition: background 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
}

/* Pulse Animation for Badge */
@keyframes pulse-subtle {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.9;
		transform: scale(1.02);
	}
}

.animate-pulse-subtle {
	animation: pulse-subtle 3s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.animate-gradient {
	background-size: 200% 200%;
	animation: gradient 15s ease infinite;
}

/* Shadow Utilities */
.shadow-3xl {
	box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.15), 0 15px 35px -10px rgba(0, 0, 0, 0.1);
}

/* Loan Carousel Styling */
.loan-carousel-container .swiper-slide {
	height: auto;
	display: flex;
	align-items: stretch;
}

.loan-carousel-container .swiper-slide > div {
	width: 100%;
}

/* Background Pattern Overlay (CTA) */
.bg-pattern-overlay {
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Enhanced Animation Utilities */
.bg-fixed {
	background-attachment: fixed;
}

/* Enhanced Floating Elements */
.floating-element {
	position: absolute;
	border-radius: 50%;
	filter: blur(15px);
	opacity: 0.4;
	mix-blend-mode: screen;
	z-index: 5;
	pointer-events: none;
}
