/*
 * Public website. One stylesheet for both directions (logical properties).
 *
 * Every colour of the site is one of the variables below and nothing else
 * in this file or in the views names a colour. The first ten are the copy's
 * identity and are rewritten per customer; --danger and --ok stay as they are.
 */
:root {
	--brand: #0f766e;
	--brand-dark: #0b5a54;
	--brand-ink: #ffffff;
	--accent: #d9a441;
	--bg: #f6f2ea;
	--card: #ffffff;
	--text: #1f2a2e;
	--muted: #56646a;
	--line: #ded7c8;
	--radius: 12px;
	--danger: #b3261e;
	--ok: #1d6b3a;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.7;
}

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

a { color: var(--brand-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--brand); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

h1, h2, h3 { line-height: 1.35; margin: 0 0 0.5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 0.8em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 760px; }
.block { padding-block: 28px; }

.skip {
	position: absolute;
	inset-inline-start: 8px;
	top: -60px;
	background: var(--card);
	color: var(--text);
	padding: 8px 14px;
	border-radius: var(--radius);
	border: 2px solid var(--brand);
	z-index: 10;
}
.skip:focus { top: 8px; }

.preview-bar {
	margin: 0;
	padding: 6px 16px;
	background: var(--text);
	color: var(--card);
	font-size: 0.86rem;
	text-align: center;
}

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.menu { flex: 1 1 auto; min-width: 0; }
.menu ul { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.menu a {
	display: block;
	padding: 8px 12px;
	border-radius: 999px;
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
}
.menu a:hover { background: var(--bg); color: var(--brand-dark); }
.menu a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.lang-switch {
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
}
.lang-switch:hover { border-color: var(--brand); }

/* Buttons */
.button {
	display: inline-block;
	padding: 10px 22px;
	min-height: 44px;
	border: 2px solid var(--brand);
	border-radius: 999px;
	background: var(--brand);
	color: var(--brand-ink);
	font: inherit;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--brand-ink); }
.button-quiet { background: transparent; color: var(--brand-dark); }
.button-quiet:hover { background: var(--brand); color: var(--brand-ink); }
.button-light { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--brand-dark); }
.button-light:hover { background: transparent; color: var(--brand-ink); border-color: var(--brand-ink); }
.button-wide { display: block; width: 100%; }

/* Home top */
.hero { background: var(--brand); color: var(--brand-ink); padding-block: 36px 44px; border-bottom: 4px solid var(--accent); }
.hero h1 { font-size: 1.9rem; }
.hero-text { max-width: 46em; font-size: 1.05rem; }

/* Search */
.search {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px 16px;
	align-items: end;
	margin-block: 16px 8px;
	padding: 16px;
	background: var(--card);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, legend { font-weight: 600; }
.field-check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.field-check input { width: 20px; height: 20px; accent-color: var(--brand); }

input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--muted);
	border-radius: 8px;
	background: var(--card);
	color: var(--text);
	font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }

/* Lists of offers */
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-block-end: 12px; }
.block-head h2 { margin: 0; padding-block-end: 4px; border-bottom: 3px solid var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.card:hover, .card:focus-within { border-color: var(--brand); }
.card-media { display: block; aspect-ratio: 8 / 5; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1 1 auto; }
.card-title { margin: 0; font-size: 1.08rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--brand-dark); text-decoration: underline; }
.card-line { margin: 0; color: var(--muted); font-size: 0.94rem; }
.card-agency a { font-weight: 600; }
.tag {
	display: inline-block;
	align-self: flex-start;
	margin: 0;
	padding: 1px 10px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg);
	color: var(--text);
	font-size: 0.82rem;
}
.price { margin: auto 0 0; padding-block-start: 8px; color: var(--brand-dark); font-weight: 700; font-size: 1.12rem; }
.price-ask { color: var(--text); }
.price-large { font-size: 1.6rem; padding: 0; margin-block-end: 6px; }
.price-extra { color: var(--muted); }

/* Where a picture is missing: a quiet pattern drawn from the copy's own colours. */
.no-picture {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 48px;
	background:
		radial-gradient(circle at 30% 35%, var(--accent) 0 9%, transparent 10%),
		linear-gradient(160deg, transparent 0 58%, var(--brand) 58% 100%),
		var(--line);
	opacity: 0.55;
}

.results-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--muted); }

.empty {
	padding: 36px 20px;
	background: var(--card);
	border: 1px dashed var(--muted);
	border-radius: var(--radius);
	text-align: center;
}
.empty p:last-child { margin-block-end: 0; }

.paging { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-block-start: 24px; }
.paging-position { color: var(--muted); }

/* Agencies */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--text);
	text-decoration: none;
}
.tile:hover { border-color: var(--brand); color: var(--text); }
.tile-logo { flex: 0 0 56px; width: 56px; height: 56px; min-height: 0; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.tile-line { margin: 0; color: var(--muted); font-size: 0.92rem; }

.agency-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; margin-block-end: 28px; }
.agency-logo { flex: 0 0 120px; width: 120px; height: 120px; min-height: 0; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--line); }
.agency-text { flex: 1 1 260px; min-width: 0; }
.agency-text h1 { margin-block-end: 4px; }
.agency-id { display: flex; gap: 12px; align-items: center; margin-block-end: 10px; }
.contact-list { margin-block: 10px; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding-block: 4px; }
.contact-list span { color: var(--muted); }
.contact-list a { font-weight: 600; overflow-wrap: anywhere; }
.link-list { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* One offer */
.offer-head { margin-block-end: 14px; }
.offer-head h1 { margin-block: 6px 2px; }
.offer-place { color: var(--muted); margin: 0; }
.gallery { margin-block-end: 20px; }
.gallery-main { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.gallery-thumbs { display: flex; gap: 8px; margin-block-start: 8px; overflow-x: auto; padding-block-end: 4px; }
.gallery-thumbs a { display: block; flex: 0 0 auto; border: 2px solid transparent; border-radius: 8px; overflow: hidden; }
.gallery-thumbs a[aria-current="true"] { border-color: var(--brand); }
.gallery-thumbs img { width: 96px; height: 60px; object-fit: cover; }

.offer-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.offer-main, .offer-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* On a narrow screen the price and the way to ask for it come before the long details. */
.offer-side { order: -1; }
.panel { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { font-size: 1.15rem; }
.price-box { border-block-start: 4px solid var(--accent); }
.hint { color: var(--muted); font-size: 0.9rem; margin-block: 10px 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 18px; margin: 0; }
.facts dt, .inline-facts dt { color: var(--muted); font-size: 0.88rem; }
.facts dd, .inline-facts dd { margin: 0; font-weight: 600; }
.inline-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 6px 0 0; }
.rows .row { display: flex; gap: 12px; padding-block: 12px; border-block-start: 1px solid var(--line); }
.rows .row:first-child { border-block-start: 0; padding-block-start: 0; }
.row-logo { flex: 0 0 48px; width: 48px; height: 48px; min-height: 0; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.row-text { min-width: 0; }
.row-text p { margin: 0; }
.row-name { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.chips img { width: 24px; height: 24px; object-fit: contain; }
.prose { overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0 0 0.8em; padding-inline-start: 1.4em; }
.prose ul { list-style: disc; }
.prose h2, .prose h3, .prose h4 { margin-block-start: 1em; }

/* Form */
.lead { color: var(--muted); }
.request-about { font-weight: 700; }
.notice { padding: 10px 14px; border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: 8px; background: var(--card); }
.notice-error { border-color: var(--danger); border-inline-start-color: var(--danger); color: var(--danger); font-weight: 600; }
.form fieldset { margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); min-width: 0; }
.form legend { padding-inline: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.form-grid-small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field-full { grid-column: 1 / -1; }
.field-error { margin: 0; color: var(--danger); font-size: 0.9rem; font-weight: 600; }
.star { color: var(--danger); }
/* Programs fill this in, people never meet it. */
.trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.bottom { margin-block-start: 32px; background: var(--card); border-top: 1px solid var(--line); }
.app-block { background: var(--brand-dark); color: var(--brand-ink); padding-block: 22px; }
.app-block h2, .app-block p { margin: 0; }
.app-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.app-links { display: flex; flex-wrap: wrap; gap: 10px; }
.bottom-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 22px 8px; }
.bottom-name { font-weight: 700; margin-block-end: 2px; }
.bottom-about p { color: var(--muted); }
.bottom-about .bottom-name { color: var(--text); }
.bottom-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.bottom-rights { color: var(--muted); font-size: 0.88rem; padding-block: 8px 20px; margin: 0; }

@media (min-width: 900px) {
	h1 { font-size: 2rem; }
	.hero h1 { font-size: 2.3rem; }
	.offer-columns { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
	.offer-side { order: 0; position: sticky; top: 16px; }
}

@media (max-width: 420px) {
	.top-row { gap: 6px 10px; }
	.menu { order: 3; flex-basis: 100%; }
	.lang-switch { margin-inline-start: auto; }
	.menu a { padding: 6px 10px; }
	.grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
	.card, .tile, .button { transition: border-color 0.15s, background-color 0.15s; }
}

@media print {
	.top, .bottom, .preview-bar, .search, .button { display: none; }
}
