/**
 * Museum Hero Search Component Styles
 * Animated hero section with search and filter functionality
 *
 * @package Automuseums
 * @since 1.0.0
 * @author Synergy Marketing
 */

/* ========================================
   CSS Custom Properties (Variables)
======================================== */
:root {
	--hero-primary-color: #2563EB;
	--hero-primary-dark: #1E40AF;
	--hero-accent-color: #3B82F6;
	--hero-text-light: #FFFFFF;
	--hero-text-dark: #1F2937;
	--hero-overlay-opacity: 0.75;
	--hero-height-mobile: 500px;
	--hero-height-tablet: 600px;
	--hero-height-desktop: 400px;
	--hero-animation-duration: 0.8s;
	--hero-animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Keyframe Animations
======================================== */

/* Fade In Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Slide Up Animation */
@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Pulse Animation for Count */
@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* Shimmer Animation for Button */
@keyframes shimmer {
	0% {
		background-position: -200% center;
	}
	100% {
		background-position: 200% center;
	}
}

/* Gradient Animation for Overlay */
@keyframes gradientShift {
	0%, 100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

/* Bounce In Animation for Filter Tags */
@keyframes bounceIn {
	0% {
		opacity: 0;
		transform: scale(0.3);
	}
	50% {
		transform: scale(1.05);
	}
	70% {
		transform: scale(0.9);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

/* Slide Out Animation for Filter Tags */
@keyframes slideOut {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(-20px);
	}
}

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

/* ========================================
   Hero Container
======================================== */
.museum-hero-search {
	position: relative;
	width: 100vw;
	max-width: none !important;
	height: var(--hero-height-mobile);
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	animation: fadeIn var(--hero-animation-duration) var(--hero-animation-easing);
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	padding-left: 0 !important;
	padding-right: 0 !important;
	left: 0;
	right: 0;
}

/* Remove parent container padding/margin that interferes with full-width */
.site-content .museum-hero-search,
.ast-container .museum-hero-search,
#primary .museum-hero-search {
	margin-left: calc(-50vw + 50%) !important;
	margin-right: calc(-50vw + 50%) !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: none !important;
}

/* ========================================
   Background & Overlay
======================================== */
.museum-hero-search__background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--hero-primary-dark) 0%, var(--hero-primary-color) 50%, var(--hero-accent-color) 100%);
	background-size: 200% 200%;
	animation: gradientShift 15s ease infinite;
	z-index: 1;
}

/* Background Image (if provided) */
.museum-hero-search__background::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url('../../../../uploads/2025/09/veteranov.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.3;
	transition: transform 0.5s ease-out;
}

/* Parallax effect on background */
.museum-hero-search--scrolled .museum-hero-search__background::before {
	transform: translateY(var(--parallax-offset, 0));
}

/* Gradient Overlay */
.museum-hero-search__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(30, 64, 175, var(--hero-overlay-opacity)) 0%, rgba(37, 99, 235, 0.85) 50%, rgba(59, 130, 246, 0.7) 100%);
	z-index: 2;
}

/* ========================================
   Hero Content
======================================== */
.museum-hero-search__content {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: 1200px;
	padding: 2rem 1rem;
	text-align: center;
}

.museum-hero-search__content .container {
	width: 100%;
}

/* ========================================
   Headline & Count
======================================== */
.museum-hero-search__headline {
	color: var(--hero-text-light);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 2rem;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	animation: slideUp var(--hero-animation-duration) var(--hero-animation-easing) 0.2s forwards;
}

.museum-hero-search__count {
	display: inline-block;
	color: #FCD34D;
	font-size: 3rem;
	font-weight: 900;
	animation: slideUp var(--hero-animation-duration) var(--hero-animation-easing) 0.3s forwards, pulse 2s ease-in-out 1s infinite;
}

/* ========================================
   Form Wrapper & Form
======================================== */
.museum-hero-search__form-wrapper {
	animation: slideUp var(--hero-animation-duration) var(--hero-animation-easing) 0.4s forwards;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: stretch;
	max-width: 1400px;
	margin: 0 auto;
}

.museum-hero-search__form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	max-width: 900px;
	margin: 0 auto;
}

/* ========================================
   Form Fields
======================================== */
.museum-hero-search__field {
	opacity: 0;
	animation: slideUp 0.6s var(--hero-animation-easing) forwards;
}

/* Stagger field animations */
.museum-hero-search__field--search {
	animation-delay: 0.5s;
}

.museum-hero-search__field--country {
	animation-delay: 0.6s;
}

.museum-hero-search__field--city {
	animation-delay: 0.7s;
}

.museum-hero-search__field--vehicle {
	animation-delay: 0.8s;
}

.museum-hero-search__field--submit {
	animation-delay: 0.9s;
}

/* ========================================
   Input & Select Styling
======================================== */
.museum-hero-search__input,
.museum-hero-search__select {
	width: 100%;
	padding: 1rem 1.5rem;
	font-size: 1rem;
	font-family: inherit;
	color: var(--hero-text-dark);
	background: rgba(255, 255, 255, 0.95);
	border: 2px solid transparent;
	border-radius: 12px;
	outline: none;
	transition: all 0.3s var(--hero-animation-easing);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Hover State */
.museum-hero-search__input:hover,
.museum-hero-search__select:hover {
	background: rgba(255, 255, 255, 1);
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Focus State */
.museum-hero-search__input:focus,
.museum-hero-search__select:focus {
	background: rgba(255, 255, 255, 1);
	border-color: var(--hero-accent-color);
	transform: translateY(-2px) scale(1.01);
	box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3), 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Placeholder Styling */
.museum-hero-search__input::placeholder {
	color: #9CA3AF;
	opacity: 1;
}

/* ========================================
   Submit Button
======================================== */
.museum-hero-search__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 1rem 2rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--hero-text-light);
	background: linear-gradient(90deg, var(--hero-primary-color) 0%, var(--hero-accent-color) 100%);
	background-size: 200% 100%;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	outline: none;
	transition: all 0.3s var(--hero-animation-easing);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	position: relative;
	overflow: hidden;
}

/* Button Hover State */
.museum-hero-search__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
	background-position: 100% 0;
}

/* Shimmer Effect on Hover */
.museum-hero-search__button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -200%;
	width: 200%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	transition: left 0.6s ease;
}

.museum-hero-search__button:hover::before {
	left: 200%;
}

/* Button Active State */
.museum-hero-search__button:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Button Icon */
.museum-hero-search__button-icon {
	flex-shrink: 0;
	transition: transform 0.3s var(--hero-animation-easing);
}

.museum-hero-search__button:hover .museum-hero-search__button-icon {
	transform: scale(1.1) rotate(5deg);
}

/* Loading State */
.museum-hero-search__button--loading {
	pointer-events: none;
	opacity: 0.7;
}

.museum-hero-search__button--loading .museum-hero-search__button-text::after {
	content: '...';
	animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
	0%, 20% {
		content: '.';
	}
	40% {
		content: '..';
	}
	60%, 100% {
		content: '...';
	}
}

/* ========================================
   Active Filters Display
======================================== */
.museum-hero-search__active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
	justify-content: center;
	min-height: 32px;
}

/* Filter Tag */
.museum-hero-search__filter-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--hero-text-dark);
	background: rgba(255, 255, 255, 0.95);
	border-radius: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	animation: bounceIn 0.4s var(--hero-animation-easing);
	transition: all 0.3s var(--hero-animation-easing);
}

/* Filter Tag Hover */
.museum-hero-search__filter-tag:hover {
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

/* Filter Tag Remove Button */
.museum-hero-search__filter-tag-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	background: var(--hero-primary-color);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
}

.museum-hero-search__filter-tag-remove:hover {
	background: var(--hero-primary-dark);
	transform: scale(1.1);
}

.museum-hero-search__filter-tag-remove::before {
	content: '×';
	color: white;
	font-size: 14px;
	line-height: 1;
}

/* Filter Tag Removing Animation */
.museum-hero-search__filter-tag--removing {
	animation: slideOut 0.3s var(--hero-animation-easing) forwards;
}

/* ========================================
   Responsive Design - Tablet
======================================== */
@media (min-width: 768px) {
	.museum-hero-search {
		height: var(--hero-height-tablet);
	}

	.museum-hero-search__headline {
		font-size: 2.5rem;
	}

	.museum-hero-search__count {
		font-size: 3.5rem;
	}

	.museum-hero-search__form {
		grid-template-columns: repeat(2, 1fr);
	}

	.museum-hero-search__field--search {
		grid-column: 1 / -1;
	}

	.museum-hero-search__field--submit {
		grid-column: 1 / -1;
	}
}

/* ========================================
   Responsive Design - Desktop
======================================== */
@media (min-width: 1024px) {
	.museum-hero-search {
		height: var(--hero-height-desktop);
	}

	.museum-hero-search__headline {
		font-size: 3rem;
		margin-bottom: 2.5rem;
	}

	.museum-hero-search__count {
		font-size: 4rem;
	}

	.museum-hero-search__form {
		grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr 1fr;
		gap: 1rem;
	}

	.museum-hero-search__field--search {
		grid-column: auto;
	}

	.museum-hero-search__field--submit {
		grid-column: auto;
	}

	.museum-hero-search__button {
		padding: 1rem 1.5rem;
	}

	.museum-hero-search__button-text {
		display: none;
	}

	.museum-hero-search__button-icon {
		display: block;
	}
}

@media (min-width: 1200px) {
	.museum-hero-search__button-text {
		display: inline;
	}
}

/* ========================================
   Accessibility - Reduced Motion
======================================== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.museum-hero-search__background::before {
		transform: none !important;
	}

	.museum-hero-search__button:hover {
		transform: none;
	}
}

/* ========================================
   Hero Section - Submit Button Override
======================================== */
.museum-hero-search .filter-submit-btn {
	color: #FFFFFF;
	background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
	box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.museum-hero-search .filter-submit-btn:hover {
	background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
	box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.museum-hero-search .filter-submit-btn:active {
	box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

/* ========================================
   Hero Section - Active Filters & Results Count
======================================== */
.museum-hero-search .active-filters {
	margin-top: 1rem;
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	visibility: visible !important;
	opacity: 1 !important;
}

.museum-hero-search .active-filters .label {
	color: #FFFFFF;
	font-weight: 600;
	margin-right: 0.5rem;
}

.museum-hero-search .filter-results-count {
	color: #FCD34D !important;
	font-size: 15px !important;
	display: block !important;
	margin-left: auto;
	font-weight: 500;
	visibility: visible !important;
	opacity: 1 !important;
}

.museum-hero-search .filter-results-count .results-text {
	color: #FCD34D !important;
	font-size: 15px !important;
	display: inline-block !important;
	visibility: visible !important;
}

/* ========================================
   Print Styles
======================================== */
@media print {
	.museum-hero-search {
		height: auto;
		min-height: auto;
		page-break-inside: avoid;
	}

	.museum-hero-search__background,
	.museum-hero-search__overlay {
		display: none;
	}

	.museum-hero-search__content {
		color: black;
	}

	.museum-hero-search__headline,
	.museum-hero-search__count {
		color: black;
		text-shadow: none;
	}
}
