/** @format */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	color: #1f2937;
}

.equipment-card {
	min-height: 600px;
	display: flex;
	flex-direction: column;
	background: white;
	border-radius: 1.5rem;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	transition: all 0.3s ease;
	border: 1px solid #e5e7eb;
	position: relative;
	z-index: 1;
}

.equipment-card:hover {
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	border-color: #bfdbfe;
}

.equipment-card .card-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
}

.equipment-card .card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.equipment-card .card-footer {
	margin-top: auto;
	display: flex;
	flex-direction: column;
}

.equipment-card .relative.h-48 {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.text-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
}

.text-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
}

.spec-list {
	font-feature-settings: "tnum";
}

.spec-list > div {
	border-bottom: 1px solid #f3f4f6;
	padding: 0.5rem 0;
}

.spec-list > div:last-child {
	border-bottom: none;
}

.price-section {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border-radius: 1rem;
	border: 2px solid #e0e7ff;
}

.btn-rent {
	background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
	color: white;
	font-weight: 600;
	border-radius: 0.75rem;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.btn-rent:hover {
	background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-rent:active {
	transform: translateY(0);
}

.scroll-reveal {
	opacity: 0;
	transform: translateY(50px);
	-webkit-transform: translateY(50px);
	transition: opacity 0.8s ease-out, transform 0.8s ease-out;
	-webkit-transition: opacity 0.8s ease-out, -webkit-transform 0.8s ease-out;
	will-change: opacity, transform;
}

.scroll-reveal.revealed {
	opacity: 1;
	transform: translateY(0);
	-webkit-transform: translateY(0);
}

/* Mobile and Tablet Optimizations */
@media (max-width: 1024px) {
	.scroll-reveal {
		opacity: 0;
		transform: translateY(30px);
		-webkit-transform: translateY(30px);
		transition: opacity 0.6s ease-out, transform 0.6s ease-out;
		-webkit-transition: opacity 0.6s ease-out, -webkit-transform 0.6s ease-out;
	}

	.scroll-reveal.revealed {
		opacity: 1;
		transform: translateY(0);
		-webkit-transform: translateY(0);
	}
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
		-webkit-transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
		-webkit-transform: translateY(0);
	}
}

@-webkit-keyframes fadeInDown {
	from {
		opacity: 0;
		-webkit-transform: translateY(-20px);
	}
	to {
		opacity: 1;
		-webkit-transform: translateY(0);
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
		-webkit-transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
		-webkit-transform: translateY(0);
	}
}

@-webkit-keyframes fadeInUp {
	from {
		opacity: 0;
		-webkit-transform: translateY(20px);
	}
	to {
		opacity: 1;
		-webkit-transform: translateY(0);
	}
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

.animate-fade-in-down {
	animation: fadeInDown 0.8s ease-out forwards;
	-webkit-animation: fadeInDown 0.8s ease-out forwards;
	opacity: 0;
	will-change: opacity, transform;
}

.animate-fade-in-up {
	animation: fadeInUp 0.8s ease-out forwards;
	-webkit-animation: fadeInUp 0.8s ease-out forwards;
	opacity: 0;
	will-change: opacity, transform;
}

.delay-300 {
	animation-delay: 0.3s;
}

/* CRITICAL: Search Form z-index harus lebih tinggi dari navbar (z-50) */
#searchForm {
	position: relative;
	z-index: 10;
}

#searchForm input[type="text"] {
	transition: all 0.3s ease;
	position: relative;
	z-index: 10;
}

#searchForm input[type="text"]:focus {
	box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
	z-index: 11;
}

#searchForm > div.relative {
	position: relative;
	z-index: 10;
}

#categoryDropdownBtn {
	position: relative;
	z-index: 10;
	transition: all 0.3s ease;
}

#categoryDropdownBtn:hover {
	box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

#categoryDropdownBtn.active {
	z-index: 45;
}

#categoryDropdownMenu {
	position: absolute;
	z-index: 40;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 0.25rem;
	background: white;
	border-radius: 0.5rem;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
	animation: dropdownSlideDown 0.2s ease-out;
}

@keyframes dropdownSlideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.category-option {
	transition: all 0.15s ease;
}

.category-option:hover {
	background: #eff6ff;
	padding-left: 1.25rem;
}

.category-option:active {
	background: #dbeafe;
}

#categoryDropdownIcon {
	transition: transform 0.3s ease;
}

.dropdown-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 39;
	background: transparent;
}

#loadingIndicator {
	position: relative;
	z-index: 1;
}

.animate-spin {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

#equipmentContainer {
	position: relative;
	z-index: 1;
}

#paginationContainer {
	padding-bottom: 80px;
	position: relative;
	z-index: 1;
}

.pagination-button {
	transition: all 0.3s ease;
}

.pagination-button:hover {
	transform: translateY(-2px);
}

.hero-background {
	background-image: url("../img/9.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

@media (max-width: 768px) {
	.equipment-card {
		min-height: auto;
	}

	.hero-background {
		height: 400px;
	}

	#categoryDropdownMenu {
		max-height: 50vh;
	}
}

@media (max-width: 640px) {
	.hero-background {
		height: 350px;
	}

	#searchForm {
		flex-direction: column;
		gap: 1rem;
	}

	#searchForm > div.relative {
		width: 100%;
	}
}

.bg-gray-50 {
	background-color: #f9fafb;
}

.shadow-xl {
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
		0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-2xl {
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html {
	scroll-behavior: smooth;
}

::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

::-webkit-scrollbar-track {
	background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

@media print {
	.hero-background,
	#searchForm,
	#paginationContainer,
	.btn-rent {
		display: none;
	}

	.equipment-card {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #e5e7eb;
	}
}
/* Navbar z-index sudah di-set di navbar.php dengan z-50 */
