/*
Theme Name: discoveryAPP4U
Theme URI: https://app.discovery4u.ro
Author: Discovery Tours
Description: Hebrew RTL app theme for the Bucharest guide. Light mode, mobile first.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: discovery-app
License: GPL-2.0-or-later
*/

:root {
	--bg: #FBF8F3;
	--surface: #FFFFFF;
	--ink: #17213A;
	--muted: #5A6273;
	--body: #3D4659;
	--line: #E8E2D8;
	--navy: #1D3A70;
	--accent: #C2410C;
	--accent-soft: #FFF4EC;
	--peach: #9A3412;
	--blue-soft: #E7EEF9;
	--sand: #EFE6D8;
	color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: Heebo, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
}

img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: var(--ink); }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: Rubik, Heebo, sans-serif; line-height: 1.15; }
h1, h2 { font-weight: 800; }
a { color: var(--navy); }
a:hover { color: #0F2550; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.sr,
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	inset-inline-start: 16px;
	top: -48px;
	z-index: 80;
	background: var(--surface);
	color: var(--ink);
	padding: 10px 16px;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
}
.skip-link:focus { top: 8px; }

.ltr { direction: ltr; unicode-bidi: isolate; }

.wrap {
	max-width: 1100px;
	margin-inline: auto;
	padding: 16px 16px 24px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	border: 0;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	line-height: 1;
}
.btn--accent,
.btn--accent:hover { background: var(--accent); color: #fff; }
.btn--navy,
.btn--navy:hover { background: var(--navy); color: #fff; }
.btn--line,
.btn--line:hover { background: transparent; color: var(--navy); border: 2px solid var(--navy); }

.desk-head,
.desk-foot { display: none; }

.app-head {
	background: var(--navy);
	color: #fff;
	padding: 14px 16px 18px;
	border-radius: 0 0 24px 24px;
}
.app-head--home {
	padding: 18px 18px 0;
	border-radius: 0;
}
.app-head__row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.app-head__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	line-height: 1.15;
}
.app-head__brand img,
.app-logo {
	background: #fff;
	border-radius: 12px;
	padding: 3px;
	height: 40px;
	width: auto;
}
.app-logo { height: 36px; border-radius: 10px; }
.app-head__brand b { display: block; font-family: Rubik, Heebo, sans-serif; font-size: 19px; font-weight: 700; }
.app-head__brand span span { font-size: 13px; color: #D7DEEC; }
.app-title {
	margin: 0;
	flex: 1;
	font-family: Rubik, Heebo, sans-serif;
	font-size: 23px;
	font-weight: 800;
}
.app-head--home .app-title {
	padding: 14px 0 22px;
	font-size: 24px;
}
.icon-btn {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	flex: none;
	text-decoration: none;
}

.page-title { margin: 0 0 16px; font-size: clamp(28px, 4vw, 40px); }

.app-nav { display: none; }

.search-pill { margin: 0 0 14px; }
.search-pill .search-form,
.search-live-form form,
.search-live-form {
	display: block;
}
.search-field,
.search-live-field,
.search-pill input[type="search"],
.search-pill input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font: 400 16px/1.4 Heebo, sans-serif;
}
.search-live { position: relative; }
.search-live-results {
	position: absolute;
	z-index: 5;
	inset-inline: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
}

.hero {
	display: block;
	position: relative;
	height: 132px;
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 10px;
	text-decoration: none;
	background: var(--sand);
	color: #fff;
}
.hero img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(12, 22, 42, 0.82), rgba(12, 22, 42, 0) 70%);
}
.hero__text {
	position: absolute;
	bottom: 12px;
	right: 16px;
	left: 16px;
}
.hero__text b { display: block; font-family: Rubik, Heebo, sans-serif; font-size: 22px; font-weight: 800; }
.hero__text span { font-size: 14px; }

.htiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
.htile {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 8px;
	min-height: 84px;
	padding: 12px 14px;
	border-radius: 18px;
	text-decoration: none;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
	background: var(--surface);
	color: var(--ink);
	border: 1px solid var(--line);
}
.htile img {
	width: 36px;
	height: 36px;
	object-fit: cover;
	border-radius: 8px;
}
.htile.is-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.htile.is-peach { background: var(--accent-soft); color: var(--peach); border-color: transparent; }
.htile.is-blue { background: var(--blue-soft); color: var(--navy); border-color: transparent; }

.prompt { margin: 0 0 14px; color: var(--muted); font-size: 15px; }

.chips {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.chip {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 64px;
	padding: 8px 16px;
	border-radius: 16px;
	text-decoration: none;
	font-weight: 700;
	font-size: 16px;
	background: var(--surface);
	color: var(--ink);
	border: 1px solid var(--line);
}
.chip img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 10px;
	flex: none;
}
.chip--bar {
	grid-column: 1 / -1;
	justify-content: space-between;
	background: var(--blue-soft);
	color: var(--navy);
	border-color: transparent;
	min-height: 56px;
}
.chip__side { font-weight: 500; font-size: 13px; }

.howto {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	background: var(--accent-soft);
	border-radius: 18px;
	padding: 14px 16px;
	text-decoration: none;
	color: var(--ink);
}
.howto b { display: block; font-size: 15px; }
.howto span span { font-size: 13px; color: var(--muted); }
.howto .btn { flex: none; }

.reviews {
	margin-top: 16px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 16px;
}
.reviews__top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 8px;
}
.reviews__top b { font-size: 16px; }
.reviews__top span,
.reviews__who { font-size: 13px; }
.reviews p { margin: 0; font-size: 14px; color: var(--body); line-height: 1.55; }
.reviews__who { margin-top: 6px; font-weight: 700; color: var(--navy); }

.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--navy); text-decoration: none; font-weight: 500; }

.list { display: grid; gap: 12px; }
.row {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
}
.row__main {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 12px;
	text-decoration: none;
	color: var(--ink);
}
.row__main img,
.ph {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	flex: none;
	object-fit: cover;
	background: var(--sand);
}
.row__text { flex: 1; min-width: 0; }
.row__text b { display: block; font-size: 17px; }
.row__text span { display: block; font-size: 14px; color: var(--muted); }
.chev { color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid #CFC7BA;
	color: var(--navy);
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
}

.help {
	display: block;
	margin-top: 12px;
	background: var(--accent-soft);
	border-radius: 18px;
	padding: 16px;
	text-decoration: none;
	color: var(--ink);
}
.help b { display: block; font-size: 16px; }
.help span { font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); }
.term-desc { margin: 0 0 14px; }

.gallery-strip {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin: 0 0 16px;
}
.gallery-strip a {
	flex: 0 0 80%;
	scroll-snap-align: start;
	aspect-ratio: 16 / 10;
	border-radius: 18px;
	overflow: hidden;
	background: var(--sand);
}
.gallery-strip img { width: 100%; height: 100%; object-fit: contain; display: block; } /* many first images are logos: never crop */

.type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.type-chips a {
	background: var(--blue-soft);
	color: var(--navy);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}
.place-title { margin: 0 0 16px; font-size: clamp(32px, 4vw, 50px); }
.place-side { min-width: 0; }

.tour-cta {
	background: var(--accent-soft);
	border-radius: 20px;
	padding: 24px;
	margin: 28px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
}
.tour-cta h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; font-family: Heebo, Arial, sans-serif; }
.tour-cta p { margin: 0; color: var(--muted); font-size: 15px; }
.more-title { margin: 0 0 16px; font-size: 26px; }
.more-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
	gap: 12px;
}
.more-card {
	display: block;
	text-decoration: none;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 16px 18px;
	min-height: 44px;
}
.more-card b { display: block; }
.more-card span { color: var(--muted); font-size: 14px; }

.facts {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 22px;
	padding: 24px;
	box-shadow: 0 18px 40px rgba(29, 58, 112, 0.08);
}
.facts dl { margin: 0 0 18px; display: grid; gap: 12px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.map-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.map-actions .btn { width: 100%; }

.video { margin: 16px 0 0; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

.prose { overflow-wrap: anywhere; }
.prose [style*="color"] { color: inherit !important; }
.prose [style*="background"] { background: none !important; }
.prose h2 { margin: 40px 0 14px; font-size: 28px; font-weight: 800; }
.prose h3 { margin: 28px 0 10px; font-size: 22px; font-weight: 800; }
.prose h4 { margin: 22px 0 8px; font-size: 19px; }
.prose p { margin: 0 0 20px; }
.prose ul,
.prose ol { margin: 0 0 20px; padding-inline-start: 1.2em; }
.prose li { margin: 0 0 6px; }
.prose img,
.prose video { border-radius: 12px; height: auto; }
.prose iframe { max-width: 100%; }
.prose .vc_row,
.prose .vc_column_container,
.prose .vc_column-inner,
.prose .wpb_wrapper { max-width: 100%; width: auto; }
.prose .vc_row { margin-inline: 0; }
.prose .vc_row[data-vc-full-width="true"] {
	width: 100% !important;
	max-width: 100% !important;
	left: auto !important;
	right: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.prose img { max-width: 100%; }

.nav-links { margin-top: 16px; display: flex; justify-content: space-between; gap: 12px; }
.nav-links a { font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

.place-mbar { display: none; }

.d4u-viewer { border: 0; padding: 0; max-width: min(1100px, 94vw); background: transparent; }
.d4u-viewer::backdrop { background: rgba(23, 33, 58, 0.86); }
.d4u-viewer img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 12px; }
.d4u-viewer__bar { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.d4u-viewer__bar button {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--ink);
	font: 600 15px Heebo, sans-serif;
	cursor: pointer;
}

@media (max-width: 1023px) {
	.page-title {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
	.place-title {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
	body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
	.app-nav {
		display: grid;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 40;
		background: var(--surface);
		border-top: 1px solid var(--line);
		grid-template-columns: repeat(6, minmax(0, 1fr));
		padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
	}
	.app-nav__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		min-height: 48px;
		justify-content: center;
		text-decoration: none;
		color: var(--muted);
		font-size: 11px;
		font-weight: 400;
	}
	.app-nav__item.is-current { color: var(--navy); font-weight: 700; }
	.app-nav__item.is-wa { color: var(--accent); font-weight: 700; }
	body.single-job_listing { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
	body.single-job_listing .app-nav { display: none; }
	.place-mbar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		gap: 10px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: var(--surface);
		border-top: 1px solid var(--line);
	}
	.place-mbar .btn { flex: 1; }
}

@media (min-width: 1024px) {
	.app-head,
	.app-nav,
	.place-mbar { display: none; }
	.wrap { padding: 28px 24px 80px; }
	.desk-head {
		display: block;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
	}
	.desk-head__inner,
	.desk-foot__inner {
		max-width: 1100px;
		margin: 0 auto;
		padding: 14px 24px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
	}
	.brand {
		display: flex;
		align-items: center;
		gap: 10px;
		text-decoration: none;
		color: var(--ink);
		flex: none;
	}
	.brand img { height: 48px; width: auto; }
	.brand__name { font-family: Rubik, Heebo, sans-serif; font-weight: 700; font-size: 18px; line-height: 1.1; }
	.brand__name span { font-weight: 600; font-size: 13px; color: var(--muted); }
	.desk-nav { display: flex; gap: 22px; font-size: 16px; font-weight: 500; flex-wrap: wrap; }
	.desk-nav a { text-decoration: none; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
	.desk-nav a[aria-current="page"] { font-weight: 700; }
	.desk-nav__tours { color: var(--navy); }
	.desk-tools { display: flex; align-items: center; gap: 12px; flex: none; }
	.head-phone { text-decoration: none; color: var(--ink); font-weight: 500; }
	.desk-foot {
		display: block;
		background: var(--surface);
		border-top: 1px solid var(--line);
	}
	.desk-foot__inner { font-size: 15px; flex-wrap: wrap; }
	.desk-foot img { height: 48px; width: auto; }
	.desk-foot a { text-decoration: none; }
	.desk-foot__links { display: flex; gap: 18px; }
	.htiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.place-split {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 32px;
		align-items: start;
	}
	.place-side { position: sticky; top: 24px; }
	.gallery-strip { display: grid; grid-template-columns: 2fr 1fr; overflow: visible; }
	.gallery-strip a { flex: auto; }
	.gallery-strip a:first-child { grid-row: span 2; aspect-ratio: auto; min-height: 280px; }
}

/* Place, mobile: contact card (phone, address, Waze) right after the description, before the tour box and "עוד ב…" */
@media (max-width: 1023px) {
	.place-split { display: flex; flex-direction: column; }
	.place-main { display: contents; }
	.place-title { order: 1; }
	.place-main > .prose { order: 2; }
	.place-side { order: 3; margin-bottom: 24px; }
	.place-main > .tour-cta { order: 4; }
	.place-main > .more-title { order: 5; }
	.place-main > .more-grid { order: 6; }
}
@media (min-width: 1024px) {
	/* a single image (often a logo) must not fill the whole column */
	.gallery-strip a:only-child { grid-column: 1 / -1; grid-row: auto; min-height: 0; height: 340px; background: var(--surface); }
	.gallery-strip a:only-child img { object-fit: contain; }
}
@media (min-width: 1024px) { .list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }

/* Bridge banner shim + content overflow guards */
.d4u-banner { display: block; margin: 16px 0; border-radius: 16px; overflow: hidden; }
.d4u-banner__img { display: block; width: 100%; height: auto; }
.prose img, .prose video, .prose iframe, .prose table { max-width: 100%; }
.prose img { height: auto; }
.prose .wp-caption { max-width: 100% !important; }
.prose .vc_row, .prose .wpb_wrapper, .prose .vc_column_container { max-width: 100%; }
.prose .image-container { display: flex !important; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.prose .image-container img { width: calc(33.333% - 6px) !important; min-width: 0; margin: 0 !important; border-radius: 10px; }
/* Facebook SDK parks hidden helper iframes far off-screen; in RTL that widens the scroll area */
html, body { overflow-x: clip; }
.prose[dir="ltr"] { text-align: left; }
.search-pill, .search-pill .search-live, .search-pill .search-live-form, .search-pill form { width: 100%; max-width: none; }

@media (min-width: 1024px) {
	/* desktop gallery: 1 large + 2 small; the rest stay in the viewer */
	.gallery-strip { grid-template-rows: repeat(2, 200px); overflow: hidden; }
	.gallery-strip a:first-child:not(:only-child) { min-height: 0; }
	.gallery-strip a:nth-child(n+4) { display: none; }
	.gallery-strip a { position: relative; }
	.gallery-strip:has(a:nth-child(4)) a:nth-child(3)::after {
		content: "כל התמונות ←"; position: absolute; inset: 0; display: grid; place-items: center;
		background: rgba(23, 33, 58, .55); color: #fff; font: 700 17px Rubik, Heebo, sans-serif;
	}
	.gallery-strip:has(a:only-child) { grid-template-rows: auto; }
}

@media (max-width: 760px) {
	.prose table { display: block; overflow-x: auto; max-width: 100%; }
	.prose td, .prose th { min-width: 5.5em; word-break: normal; overflow-wrap: normal; }
}

/* long words with no spaces (hyphenated term names, URLs) wrap instead of overflowing the screen */
h1, h2, h3, h4, .prose a { overflow-wrap: break-word; }
