/* Main CSS for home-flip.php - Non-critical styles */

/* Swiper Styles */
.swiper {
	width: 100%;
	height: auto;
	/* Allow both horizontal swiping and vertical scrolling */
	touch-action: pan-y pinch-zoom;
}

.swiper-slide {
	border-radius: 12px;
	height: auto;
	/* Allow vertical scrolling while in swiper */
	touch-action: pan-y pinch-zoom;
}

.swiper-wrapper {
	/* Allow vertical scrolling */
	touch-action: pan-y pinch-zoom;
}

/* Ensure the swiper container doesn't block scrolling */
.popular-destination {
	overflow: visible;
	touch-action: manipulation;
    margin: 0 0 3rem 0;
    padding: 0 1rem 1rem 1rem;
}

/* Clickable destination cards hover effect */
.clickable-destination:hover {
	transform: scale(1.02);
	transition: transform 0.2s ease;
}

.clickable-destination {
	transition: transform 0.2s ease;
}

.destination-card {
	text-align: center;
	transition: transform 0.3s ease;
	position: relative;
	/* Ensure card doesn't block scrolling */
	-webkit-overflow-scrolling: touch;
}

/* Ensure video container doesn't interfere with scrolling */
.video-container {
	pointer-events: none;
}

.destination-card .destination-loc {
	position: absolute;
	text-align: left;
	bottom: 20px;
	left: 14px;
	display: flex;
	flex-direction: column;
	row-gap: 12px;
}

.destination-card::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 40%;
	background: linear-gradient(to top, rgba(0, 0, 0, 10) 0%, rgba(0, 0, 0, 0) 100%);
	border-radius: 0 0 12px 12px;
	pointer-events: none;
}

.destination-card .destination-loc .destination-city {
	font-size: 2.2rem;
	font-weight: 600;
}

.destination-card .destination-loc .destination-country {
	font-size: .8rem;
	font-weight: 400;
}

.destination-card .destination-loc .destination-country i {
	padding-left: 4px;
}

.destination-card .destination-loc .destination-country span {
	padding-left: 2px;
}

.destination-card h3 {
	margin: 0 0 8px 0;
	font-size: 24px;
	font-weight: 600;
}

.destination-card p {
	margin: 0;
	font-size: 14px;
	opacity: 0.9;
}

.swiper-slide a:hover {
	color: #005baa;
}

.swiper-slide div {
	transition: .25s;
	opacity: .8;
}

.swiper-slide-active div {
	opacity: 1;
}

.swiper-slide-prev div {
	transform: rotate(-20deg);
}

.swiper-slide-next div {
	transform: rotate(20deg);
}

/* Search Card Extended Styles */
.search-card p {
	font-size: 14px;
	font-weight: 500;
	line-height: 18px;
	color: #757575;
	margin-bottom: 4px;
}

/* Date Selection Styles */
.date-selection-container {
	display: flex;
	justify-content: space-between;
}

.date-selector {
	border: 1px solid #E7E7E7;
	border-radius: 8px;
	padding: 4px 12px;
	color: #2D3A45;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
	cursor: pointer;
	column-gap: 6px;
}

.date-selector:hover {
	border-color: #FD6542;
	background-color: #FFF8F6;
	transform: translateY(-1px);
}

.date-selector:active {
	transform: translateY(0);
}

.date-selector .date-day-number {
	font-weight: 600;
	font-size: 24px;
	min-width: max-content;
	min-height: 1.8rem;
	display: flex;
	align-items: center;
	transition: opacity 0.2s ease;
}

.date-info {
	font-size: 10px;
	line-height: 14px;
	font-weight: 500;
	min-height: 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: opacity 0.2s ease;
}

.date-day {
	min-height: 1rem;
	display: flex;
	align-items: center;
}

.date-month-year {
	min-height: 1rem;
	display: flex;
	align-items: center;
}

/* Duration Badge */
.duration-container {
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	bottom: -13px;
}

.duration-container::before,
.duration-container::after {
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 2px;
	background: #E7E7E7;
	opacity: 0.6;
}

.duration-container::before {
	left: -12px;
}

.duration-container::after {
	right: -12px;
	background: #E7E7E7;
}

.duration-badge {
	border: 1px solid #E7E7E7;
	padding: 2px 10px;
	border-radius: 40px;
	color: #757575;
	font-weight: 500;
	min-width: 3.5rem;
	min-height: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	font-size: 0.875rem;
}

.duration-badge:hover {
	border-color: #FD6542;
	color: #FD6542;
	background-color: #FFF8F6;
}

/* Guest Options */
.guest-options {
	display: flex;
	column-gap: 1rem;
}

.guest-option-group {
	display: flex;
	column-gap: 12px;
}

.option-box {
	border: 1px solid #E7E7E7;
	padding: 8px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: -0.17px;
	line-height: 18px;
	transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
	cursor: pointer;
	color: #2D3A45;
}

.option-box:hover {
	border-color: #FD6542;
	background-color: #FFF8F6;
	transform: translateY(-1px);
}

.option-box:active {
	transform: translateY(0);
}

.option-box#bedTypeGuest {
	display: flex;
	gap: 4px;
}

/* Guest Preferences */
.guest-preferences {
	margin-top: 1rem;
}

.guest-preferences p {
	margin-bottom: 4px;
}

.date-range-header {
	display: flex;
	justify-content: space-between;
	margin-top: 1rem;
	margin-bottom: 4px;
}

/* Section Location Search */
section.location-search {
	display: flex;
	flex-direction: column;
	row-gap: 4px;
}

/* Hotel Recommendations */
.hotel-recommendation {
	margin: 0 0 3rem 0;
	padding: 0 1rem 2.5rem 1rem;
	position: relative;
}

.hotel-recommendation h2 {
	color: #2D3A45;
	font-size: 20px;
	font-weight: 500;
	margin: 0 0 2rem 0;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

h2 {
	font-size: 20px;
	font-weight: 500;
	color: #2D3A45;
	margin: 0 0 2rem 0;
	line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Hotel Grid */
.hotel-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.5rem;
}

.hotel-card {
	display: flex;
	flex-direction: column;
}

.hotel-card img {
	border-radius: 12px;
	width: 100%;
	height: 120px;
	object-fit: cover;
	margin-bottom: 2px;
}

.hotel-card-body {
	padding: 12px 8px 8px 8px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.hotel-rating {
	font-size: 12px;
	font-weight: 600;
	color: #FD6542;
	margin: 0;
	line-height: 1.2;
}

.hotel-rating span {
	color: #9CA4AB;
	font-weight: 400;
	font-size: 11px;
}

.hotel-name {
	font-weight: 600;
	font-size: 14px;
	color: #171725;
	line-height: 1.3;
	margin-top: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hotel-card-body p {
	font-size: 11px;
	font-weight: 400;
	color: #66707A;
	line-height: 1.4;
	margin: 0;
	opacity: 0.9;
}

.hotel-price {
	margin-top: 4px;
}

.price-display {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 4px;
}

.hotel-original-price {
	font-size: 12px;
	font-weight: 500;
	color: #9CA4AB;
	line-height: 1.2;
	text-decoration: line-through;
}

.hotel-show-price {
	font-size: 14px;
	font-weight: 600;
	color: #171725;
	line-height: 1.2;
}

.price-display span {
	font-weight: 400;
	font-size: 10px;
	color: #66707A;
	line-height: 1.2;
	opacity: 0.8;
}

/* Search Button Enhanced */
.search-button-container button:before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s;
}

.search-button-container button:hover:before {
	left: 100%;
}

.search-button-container button:hover:not(:disabled) {
	background-color: #E5593B;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(253, 101, 66, 0.3);
}

.search-button-container button:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(253, 101, 66, 0.3);
}

.search-button-container button:disabled {
	background-color: #CCCCCC;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.search-button-container button.searching::after {
	content: '';
	position: absolute;
	left: calc(50% - 10px);
	top: calc(50% - 10px);
	width: 20px;
	height: 20px;
	border: 2px solid transparent;
	border-top: 2px solid #FFFFFF;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Error message styling */
.search-error-message {
	background-color: #FF6B6B;
	color: #FFFFFF;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-size: 14px;
	text-align: center;
	margin-top: 0.5rem;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
