/* =========================================================================
   Best4Hotels Theme — Main Stylesheet
   theme.json tarafından üretilen değerleri tamamlayan ek stiller.
   ========================================================================= */

/* ---------------------------------------------------------------
   Generel iyileştirmeler
   --------------------------------------------------------------- */
:where(html) { scroll-behavior: smooth; }

.best4-hide-page-title .wp-block-post-title,
body.best4-hide-page-title .wp-block-template-part .wp-block-post-title { display: none; }

img { max-width: 100%; height: auto; }

/* Header scroll-state (ui.js ekler) */
.best4-header { transition: box-shadow .25s ease, padding .25s ease; }
.best4-header.is-scrolled { box-shadow: 0 2px 16px rgba(14, 31, 55, 0.08); }

/* ---------------------------------------------------------------
   HERO SLIDER
   --------------------------------------------------------------- */
.best4-hero-slider {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

/* Slaytları üst üste yığ. İlk slayt boşluğu (yüksekliği) belirler;
   diğerleri absolute olarak üzerine binsin. */
.best4-hero-slider > .best4-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 1.1s ease, transform 8s ease;
	pointer-events: none;
	z-index: 1;
}
.best4-hero-slider > .best4-slide:first-child {
	position: relative; /* Container yüksekliğini belirlesin. */
}
.best4-hero-slider > .best4-slide.is-active {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
	z-index: 2;
}

/* Pagination dots (JS oluşturuyor) */
.best4-slider-dots {
	position: absolute;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 5;
}
.best4-slider-dot {
	appearance: none;
	background: rgba(255, 255, 255, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.6);
	width: 36px;
	height: 3px;
	padding: 0;
	cursor: pointer;
	transition: background .25s ease, width .25s ease;
	border-radius: 0;
}
.best4-slider-dot:hover { background: rgba(255, 255, 255, 0.7); }
.best4-slider-dot.is-active {
	background: var(--wp--preset--color--secondary, #C9A96E);
	border-color: var(--wp--preset--color--secondary, #C9A96E);
	width: 56px;
}

/* Önceki / sonraki oklar (JS oluşturuyor) */
.best4-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	appearance: none;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	width: 48px;
	height: 48px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.75rem;
	line-height: 1;
	border-radius: 50%;
	transition: background .25s ease, border-color .25s ease;
	backdrop-filter: blur(6px);
}
.best4-slider-arrow:hover {
	background: var(--wp--preset--color--secondary, #C9A96E);
	border-color: var(--wp--preset--color--secondary, #C9A96E);
	color: var(--wp--preset--color--primary, #0E1F37);
}
.best4-slider-arrow--prev { left: 20px; }
.best4-slider-arrow--next { right: 20px; }

@media (max-width: 768px) {
	.best4-slider-arrow { width: 38px; height: 38px; font-size: 1.4rem; }
	.best4-slider-arrow--prev { left: 8px; }
	.best4-slider-arrow--next { right: 8px; }
	.best4-slider-dots { bottom: 18px; }
	.best4-slider-dot { width: 24px; }
	.best4-slider-dot.is-active { width: 36px; }
}

/* ---------------------------------------------------------------
   ARAMA FORMU KARTI
   --------------------------------------------------------------- */
.best4-search-section { position: relative; z-index: 10; }
.best4-search-card { transition: box-shadow .3s ease; }
.best4-search-card:hover { box-shadow: 0 28px 70px rgba(14, 31, 55, 0.22) !important; }

/* Eklenti formu içindeki temel input'lara default stil (eklenti override edebilir). */
.best4-search-card .b4h-search-form input[type="date"],
.best4-search-card .b4h-search-form input[type="number"],
.best4-search-card .b4h-search-form input[type="text"],
.best4-search-card .b4h-search-form select {
	font-family: var(--wp--preset--font-family--body);
	border-color: var(--wp--preset--color--border, #E5DFD2);
}

/* ---------------------------------------------------------------
   OLANAKLAR
   --------------------------------------------------------------- */
.best4-amenity {
	padding: 1.5rem 1rem;
	transition: transform .25s ease;
}
.best4-amenity:hover {
	transform: translateY(-4px);
}

/* ---------------------------------------------------------------
   GALERİ
   --------------------------------------------------------------- */
.best4-gallery-section .wp-block-gallery .wp-block-image {
	overflow: hidden;
	border-radius: 4px;
}
.best4-gallery-section .wp-block-gallery .wp-block-image img {
	transition: transform .5s ease;
	display: block;
}
.best4-gallery-section .wp-block-gallery .wp-block-image:hover img {
	transform: scale(1.05);
}

/* ---------------------------------------------------------------
   YORUMLAR KARTLARI
   --------------------------------------------------------------- */
.best4-testimonial {
	transition: transform .25s ease, border-color .25s ease;
}
.best4-testimonial:hover {
	border-color: var(--wp--preset--color--secondary, #C9A96E) !important;
	transform: translateY(-3px);
}

/* ---------------------------------------------------------------
   İLETİŞİM HARİTASI
   --------------------------------------------------------------- */
.best4-contact-map iframe {
	width: 100%;
	min-height: 380px;
	border: 0;
	border-radius: 4px;
	display: block;
}

/* ---------------------------------------------------------------
   ODA KARTLARI (eklentinin [best4hotels_rooms] çıktısı için)
   --------------------------------------------------------------- */
.b4h-rooms-grid .b4h-room-card,
.b4h-results .b4h-result-card {
	background: var(--wp--preset--color--surface, #ffffff);
	border: 1px solid var(--wp--preset--color--border, #E5DFD2);
	border-radius: 4px;
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.b4h-rooms-grid .b4h-room-card:hover,
.b4h-results .b4h-result-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 48px rgba(14, 31, 55, 0.12);
	border-color: var(--wp--preset--color--secondary, #C9A96E);
}

/* ---------------------------------------------------------------
   BUTON VARYANTLARI
   --------------------------------------------------------------- */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--primary, #0E1F37);
	color: var(--wp--preset--color--primary, #0E1F37);
	transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary, #0E1F37);
	color: var(--wp--preset--color--background, #FAF9F6);
}

/* ---------------------------------------------------------------
   WooCommerce ek dokunuşlar
   --------------------------------------------------------------- */
.best4-product-archive .wc-block-grid__product,
.best4-product-archive .wp-block-product-template > .wp-block-group {
	transition: transform .25s ease, box-shadow .25s ease;
}
.best4-product-archive .wp-block-product-template > .wp-block-group:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(14, 31, 55, 0.10);
}

.woocommerce-form__label,
.woocommerce form .form-row label {
	font-weight: 500;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
	color: var(--wp--preset--color--secondary-dark, #A88848);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: 4px;
}
.woocommerce-message {
	border-top-color: var(--wp--preset--color--secondary, #C9A96E);
}
.woocommerce-info {
	border-top-color: var(--wp--preset--color--primary-light, #1A3556);
}

/* ---------------------------------------------------------------
   FOOTER navigasyon — varsayılan rengi düzelt
   --------------------------------------------------------------- */
.best4-footer .wp-block-navigation a {
	color: #cfd6e0;
	transition: color .2s ease;
}
.best4-footer .wp-block-navigation a:hover {
	color: var(--wp--preset--color--secondary, #C9A96E);
}

/* ---------------------------------------------------------------
   Yardımcı: bölüm başlığı altın çizgi
   --------------------------------------------------------------- */
.best4-section-heading h2::after {
	content: "";
	display: block;
	width: 60px;
	height: 2px;
	background: var(--wp--preset--color--secondary, #C9A96E);
	margin: 1rem auto 0;
}

/* ---------------------------------------------------------------
   Mobil ince ayarlar
   --------------------------------------------------------------- */
@media (max-width: 781px) {
	.best4-hero-slider > .best4-slide {
		min-height: 70vh !important;
	}
	.best4-search-section {
		margin-top: -40px !important;
	}
	.best4-amenities-grid .wp-block-column {
		flex-basis: calc(50% - var(--wp--preset--spacing--40, 1.5rem)) !important;
	}
}

@media (max-width: 480px) {
	.best4-amenities-grid .wp-block-column {
		flex-basis: 100% !important;
	}
	.best4-search-section {
		margin-top: 0 !important;
		padding-top: var(--wp--preset--spacing--40, 1.5rem);
	}
}

/* ---------------------------------------------------------------
   Erişilebilirlik
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.best4-hero-slider > .best4-slide,
	.best4-amenity,
	.best4-testimonial,
	.best4-gallery-section .wp-block-gallery .wp-block-image img,
	.b4h-rooms-grid .b4h-room-card,
	.b4h-results .b4h-result-card,
	.best4-product-archive .wp-block-product-template > .wp-block-group,
	:where(html) {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--secondary, #C9A96E);
	outline-offset: 2px;
}
