/*
Theme Name: Resort City - مدينة مصيفية
Description: قالب عربي عصري لمدينة مصيفية كبيرة: واجهة بحرية، بحث بالشارع، دليل محلات، ووحدات للبيع. يعمل مع إضافة Resort Network.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: resort-city
*/

:root {
	--rt-deep: #072b45;
	--rt-sea: #0a7ea4;
	--rt-lagoon: #19b3c4;
	--rt-sun: #f0a92e;
	--rt-sun-d: #d98f12;
	--rt-sand: #ecdfc4;
	--rt-foam: #f2f7fa;
	--rt-ink: #13222f;
	--rt-mute: #566878;
	--rt-line: #d9e3ea;
	--rt-head: 'El Messiri', 'Segoe UI', Tahoma, 'Noto Naskh Arabic', serif;
	--rt-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif;
	--rt-radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: #fff; color: var(--rt-ink);
	font-family: var(--rt-body); font-size: 17px; line-height: 1.85;
	direction: rtl; text-align: right; overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--rt-sea); text-underline-offset: 3px; }
a:hover { color: var(--rt-deep); }
h1, h2, h3, h4 { font-family: var(--rt-head); color: var(--rt-deep); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.4em; }
:focus-visible { outline: 3px solid var(--rt-sun); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rt-skip { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--rt-deep); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 6px; z-index: 1000; }
.rt-skip:focus { top: 0; color: #fff; }
.rt-wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }

/* ---------- الأزرار ---------- */
.rt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 24px; border-radius: 6px; border: 2px solid transparent;
	font: inherit; font-weight: 700; line-height: 1.4; text-decoration: none; cursor: pointer;
	transition: background-color .18s, color .18s, border-color .18s;
}
.rt-btn-sun { background: var(--rt-sun); color: var(--rt-deep); }
.rt-btn-sun:hover { background: var(--rt-sun-d); color: var(--rt-deep); }
.rt-btn-sea { background: var(--rt-sea); color: #fff; }
.rt-btn-sea:hover { background: var(--rt-deep); color: #fff; }
.rt-btn-line { border-color: rgba(255, 255, 255, .7); color: #fff; }
.rt-btn-line:hover { background: #fff; color: var(--rt-deep); }
.rt-btn-glass { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .55); color: #fff; backdrop-filter: blur(4px); }
.rt-btn-glass:hover { background: #fff; color: var(--rt-deep); }

/* ---------- الهيدر ---------- */
.rt-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rt-line); transition: box-shadow .2s; }
.rt-header.scrolled { box-shadow: 0 6px 24px rgba(7, 43, 69, .09); }
.admin-bar .rt-header { top: 32px; }
.rt-header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.rt-brand-name { font-family: var(--rt-head); font-size: 26px; font-weight: 700; color: var(--rt-deep); text-decoration: none; line-height: 1.2; }
.rt-brand img { max-height: 54px; width: auto; display: block; }
.rt-nav { display: flex; align-items: center; gap: 18px; }
.rt-menu, .rt-flinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.rt-menu a { display: block; padding: 8px 12px; color: var(--rt-ink); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; }
.rt-menu a:hover, .rt-menu .current-menu-item > a, .rt-menu .current_page_item > a { color: var(--rt-deep); border-bottom-color: var(--rt-sun); }
.rt-menu li { position: relative; }
.rt-menu .sub-menu { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 200px; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); box-shadow: 0 14px 30px rgba(7, 43, 69, .12); }
.rt-menu li:hover > .sub-menu, .rt-menu li:focus-within > .sub-menu { display: block; }
.rt-burger { display: none; width: 46px; height: 46px; padding: 11px 10px; border: 1px solid var(--rt-line); border-radius: 6px; background: #fff; cursor: pointer; flex-direction: column; justify-content: space-between; }
.rt-burger span { display: block; height: 3px; background: var(--rt-deep); border-radius: 2px; }

/* لوحة الإعداد (للمدير فقط) */
.rt-setup { margin: 14px 0; padding: 12px 18px; background: #fff8e1; border: 1px solid var(--rt-sun); border-radius: var(--rt-radius); font-size: 15px; }
.rt-setup summary { cursor: pointer; font-weight: 700; }
.rt-setup ul { list-style: none; margin: 10px 0 0; padding: 0; }
.rt-setup li { padding: 3px 0; }
.rt-setup li.ok b { color: #1f8a4c; }
.rt-setup li.no b { color: #b3261e; }
.rt-setup-ver, .rt-setup-note { margin: 8px 0 0; color: var(--rt-mute); font-size: 13px; }

/* ---------- الواجهة الرئيسية ---------- */
.rt-hero { position: relative; overflow: hidden; color: #fff; padding: 84px 0 210px; background: linear-gradient(180deg, #072b45 0%, #0a5c82 58%, #139bb4 100%); }
.rt-hero.short { padding-bottom: 150px; }
.rt-hero.has-img { background: linear-gradient(180deg, rgba(7, 43, 69, .6), rgba(7, 43, 69, .22) 55%, rgba(7, 43, 69, .55)), var(--hero) center / cover no-repeat; }
.rt-sun { position: absolute; width: 230px; height: 230px; border-radius: 50%; inset-inline-end: 9%; bottom: 86px; background: radial-gradient(circle at 50% 50%, #ffd37a 0 55%, rgba(240, 169, 46, .9) 56% 100%); opacity: .92; }
.rt-hero.has-img .rt-sun { display: none; }
.rt-hero-in { position: relative; z-index: 2; max-width: 1200px; }
.rt-hero h1 { color: #fff; font-size: clamp(36px, 6vw, 68px); max-width: 15ch; margin-bottom: .3em; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.rt-hero-sub { font-size: clamp(18px, 2.2vw, 22px); max-width: 38em; color: #e3f1f7; }
.rt-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.rt-wave { display: block; width: 100%; height: 60px; }
.rt-wave-hero { position: absolute; bottom: -1px; inset-inline: 0; height: 120px; z-index: 1; }
.rt-wave-hero .w1 { fill: #fff; }
.rt-wave-hero .w2 { fill: rgba(255, 255, 255, .38); }

.rt-finder-wrap { position: relative; z-index: 5; margin-top: -128px; }
.rt-finder { background: #fff; border-radius: 12px; padding: 22px 24px 8px; box-shadow: 0 24px 60px rgba(7, 43, 69, .2); border-top: 5px solid var(--rt-sun); }
.rt-finder-title { margin: 0 0 12px; font-family: var(--rt-head); font-size: 21px; font-weight: 700; color: var(--rt-deep); }
.rt-finder-row { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr auto 1fr auto; gap: 12px; align-items: end; }
.rt-finder label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.rt-finder select, .rt-finder input { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #b9c7d2; border-radius: 6px; font: inherit; background: #fff; color: var(--rt-ink); }
.rt-on { align-self: center; padding-bottom: 14px; color: var(--rt-sun-d); font-weight: 700; }
.rt-finder .rt-btn { min-height: 46px; margin-bottom: 14px; padding-inline: 30px; }
.rt-admin-note { background: #fff6dd; border: 1px solid var(--rt-sun); padding: 12px 16px; border-radius: 6px; }

/* ---------- الأرقام ---------- */
.rt-finder-foot { margin: 0 0 14px; font-size: 15px; color: var(--rt-mute); }
.rt-finder-foot a { font-weight: 700; }
.rt-stats-in { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 34px 10px; text-align: center; }
.rt-stats-in.rt-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rt-stats-in > div { padding: 4px 12px; }
.rt-stats-in > div + div { border-inline-start: 1px solid var(--rt-line); }
.rt-stats strong { display: block; font-family: var(--rt-head); font-size: clamp(34px, 5vw, 54px); line-height: 1.1; color: var(--rt-sea); }
.rt-stats span { color: var(--rt-mute); font-weight: 500; }

/* ---------- الأقسام ---------- */
.rt-section { padding: 64px 0; }
.rt-tint { background: var(--rt-foam); }
.rt-head { margin-bottom: 26px; }
.rt-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: .2em; }
.rt-head p { margin: 0; color: var(--rt-mute); }
.rt-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rt-more { font-weight: 700; color: var(--rt-deep); text-decoration: none; border-bottom: 3px solid var(--rt-sun); padding-bottom: 2px; }
.rt-more:hover { color: var(--rt-sea); }
.rt-empty { padding: 26px; background: var(--rt-foam); border-radius: var(--rt-radius); text-align: center; }

/* لافتة الشارع */
.rt-sign, body .rn-addr {
	display: inline-block; padding: 1px 12px; background: var(--rt-deep); color: #fff; border-radius: 4px; font-weight: 700; font-size: 14px; line-height: 1.8;
	box-shadow: inset 0 0 0 2px var(--rt-deep), inset 0 0 0 3px rgba(255, 255, 255, .7);
}
.rt-sign:empty { display: none; }

/* بطاقات الوحدات */
.rt-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.rt-unit { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); overflow: hidden; color: var(--rt-ink); text-decoration: none; transition: border-color .18s, transform .18s; }
.rt-unit:hover { border-color: var(--rt-sea); transform: translateY(-3px); color: var(--rt-ink); }
.rt-unit-img { display: block; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #d6e6ee, #eaf2f6); overflow: hidden; }
.rt-unit-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.rt-unit:hover .rt-unit-img img { transform: scale(1.04); }
.rt-unit-img em { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--rt-mute); font-style: normal; }
.rt-unit-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 16px; }
.rt-unit-kind { color: #a8690c; font-weight: 700; font-size: 14px; }
.rt-unit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-unit-chips i { font-style: normal; font-size: 13px; padding: 1px 10px; border: 1px solid var(--rt-line); border-radius: 20px; background: var(--rt-foam); }
.rt-unit-price { font-family: var(--rt-head); font-size: 23px; color: var(--rt-deep); margin-top: 4px; }

/* شريط من البحر إلى الداخل */
.rt-bands { display: flex; min-height: 160px; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 34px rgba(7, 43, 69, .12); }
.rt-bands-sea { flex: 0 0 64px; display: flex; align-items: center; justify-content: center; background: var(--rt-deep); color: #fff; font-family: var(--rt-head); font-weight: 700; font-size: 20px; writing-mode: vertical-rl; letter-spacing: .05em; }
.rt-band { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 16px 14px; text-decoration: none; background: var(--rt-sea); background: color-mix(in srgb, var(--rt-sea) var(--p), var(--rt-sand)); transition: filter .18s; min-width: 0; }
.rt-band strong { font-family: var(--rt-head); font-size: 19px; line-height: 1.3; }
.rt-band span { font-size: 13px; }
.rt-band.dark, .rt-band.dark:hover { color: #fff; }
.rt-band.light, .rt-band.light:hover { color: var(--rt-deep); }
.rt-band:hover { filter: brightness(.93); }

/* تصنيفات الدليل */
.rt-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rt-cats a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 18px; background: #fff; border: 1px solid var(--rt-line); border-inline-start: 5px solid var(--rt-sun); border-radius: 4px; text-decoration: none; color: var(--rt-ink); font-weight: 700; transition: border-color .18s, background-color .18s; }
.rt-cats a:hover { border-color: var(--rt-sea); border-inline-start-color: var(--rt-sea); background: #fff; color: var(--rt-deep); }
.rt-cats b { font-family: var(--rt-head); font-size: 24px; color: var(--rt-sea); }

/* الأرقام المهمة */
.rt-emerg-sec { background: #fdf3f2; border-block: 1px solid #f1d0cc; }
.rt-emerg { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rt-emerg-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: #fff; border-radius: 6px; border-inline-start: 5px solid #b3261e; }
.rt-emerg-item span { font-weight: 700; color: var(--rt-deep); }
.rt-emerg-item a { font-family: var(--rt-head); font-size: 24px; font-weight: 700; color: #b3261e; text-decoration: none; }

/* قسم الملاك الفرعي */
.rt-owners { padding: 44px 0; }
.rt-sub-h { font-size: 24px; margin-bottom: .1em; }
.rt-owners .rt-units { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.rt-owners .rt-unit-price { font-size: 20px; }

/* دعوة للإجراء */
.rt-cta { background: var(--rt-deep); color: #d8e8f0; padding: 60px 0; }
.rt-cta-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.rt-cta h2 { color: #fff; font-size: 28px; }
.rt-cta p { max-width: 30em; }
.rt-cta-in > div + div { border-inline-start: 1px solid rgba(255, 255, 255, .18); padding-inline-start: 40px; }

/* المقالات */
.rt-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.rt-post-img { display: block; aspect-ratio: 16 / 10; border-radius: var(--rt-radius); overflow: hidden; background: linear-gradient(135deg, #cfe3ec, #eaf2f6); }
.rt-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt-post-body { padding-top: 12px; }
.rt-post-body time { font-size: 13px; color: var(--rt-mute); }
.rt-post-body h3 { font-size: 21px; margin: 2px 0 6px; }
.rt-post-body h3 a { color: var(--rt-deep); text-decoration: none; }
.rt-post-body h3 a:hover { color: var(--rt-sea); }
.rt-post-body p { color: var(--rt-mute); font-size: 15px; margin: 0; }

/* ---------- ترويسة الصفحات الداخلية ---------- */
.rt-pagehead { position: relative; background: linear-gradient(180deg, #072b45, #0a6288); color: #fff; padding: 46px 0 84px; }
.rt-pagehead h1 { color: #fff; font-size: clamp(28px, 4.4vw, 46px); margin: 0; max-width: 24em; }
.rt-pagehead-meta { margin: 8px 0 0; color: #bcd6e3; }
.rt-pagehead-sign { margin: 12px 0 0; }
.rt-pagehead .rt-wave { position: absolute; bottom: -1px; inset-inline: 0; height: 56px; }
.rt-pagehead .rt-wave path { fill: #fff; }
.rt-content { padding: 20px 0 80px; }
.rt-narrow { max-width: 820px; }
.rt-crumb { margin: 0 0 16px; font-weight: 700; }

/* نص المحتوى */
.rt-entry > :where(p, ul, ol, h2, h3, h4, blockquote, table, figure, .wp-block-image) { max-width: 780px; margin-inline: auto; }
.rt-entry > .rn-wrap, .rt-entry-plugin > * { max-width: none; }
.rt-entry h2 { font-size: 30px; margin-top: 1.6em; }
.rt-entry h3 { font-size: 24px; margin-top: 1.4em; }
.rt-entry blockquote { border-inline-start: 5px solid var(--rt-sun); background: var(--rt-foam); margin-block: 1.4em; padding: 14px 20px; }
.rt-entry img { border-radius: var(--rt-radius); }
.rt-entry table { width: 100%; border-collapse: collapse; }
.rt-entry th, .rt-entry td { border: 1px solid var(--rt-line); padding: 8px 12px; }
.rt-entry th { background: var(--rt-foam); }
.rt-feature { margin: 0 0 24px; }
.rt-feature img { width: 100%; }
.alignwide { max-width: 1100px; }
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin-inline: auto; }

/* بحث وترقيم */
.rt-search { display: flex; gap: 8px; margin: 0 0 28px; max-width: 520px; }
.rt-search input { flex: 1; min-height: 46px; padding: 8px 14px; border: 1px solid #b9c7d2; border-radius: 6px; font: inherit; }
.navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nav-links a, .nav-links span { min-width: 42px; padding: 6px 14px; text-align: center; border: 1px solid var(--rt-line); border-radius: 6px; text-decoration: none; font-weight: 700; }
.nav-links .current { background: var(--rt-deep); border-color: var(--rt-deep); color: #fff; }

/* تعليقات */
.rt-comments { margin-top: 48px; }
.rt-comment-list { list-style: none; padding: 0; }
.rt-comment-list li { padding: 14px 0; border-bottom: 1px solid var(--rt-line); }
.rt-comments input[type=text], .rt-comments input[type=email], .rt-comments input[type=url], .rt-comments textarea { width: 100%; padding: 9px 12px; border: 1px solid #b9c7d2; border-radius: 6px; font: inherit; }
.rt-comments input[type=submit] { background: var(--rt-sea); color: #fff; border: 0; border-radius: 6px; padding: 11px 24px; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- التذييل ---------- */
.rt-footer { position: relative; background: var(--rt-deep); color: #c5d9e5; margin-top: 0; padding-top: 70px; }
.rt-wave-top { position: absolute; top: -1px; inset-inline: 0; height: 44px; }
.rt-wave-top path { fill: #fff; }
.rt-footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 34px; }
.rt-footer a { color: #fff; text-decoration: none; }
.rt-footer a:hover { color: var(--rt-sun); }
.rt-widget-title { color: #fff; font-size: 20px; }
.rt-flinks, .rt-contact { list-style: none; margin: 0; padding: 0; }
.rt-flinks { flex-direction: column; gap: 2px; }
.rt-flinks a { display: block; padding: 3px 0; }
.rt-contact li { margin-bottom: 6px; }
.rt-copy { border-top: 1px solid rgba(255, 255, 255, .14); padding: 16px 0 26px; font-size: 14px; color: #8fb0c4; }
.rt-top { position: fixed; bottom: 22px; inset-inline-start: 20px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--rt-deep); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 8px 22px rgba(7, 43, 69, .35); z-index: 90; display: grid; place-items: center; }
.rt-top[hidden] { display: none; }
.rt-top:hover { background: var(--rt-sea); }

/* ---------- ربط مع إضافة Resort Network ---------- */
body .rn-wrap {
	--rn-navy: var(--rt-deep); --rn-sea: var(--rt-sea); --rn-brass: #a8690c; --rn-ink: var(--rt-ink);
	--rn-mute: var(--rt-mute); --rn-line: var(--rt-line); --rn-soft: var(--rt-foam);
	font-family: var(--rt-body);
}
body .rn-wrap h1, body .rn-wrap h2, body .rn-wrap h3 { font-family: var(--rt-head); }
body .rn-go { background: var(--rt-deep); }
body .rn-go:hover { background: var(--rt-sea); }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 1060px) {
	.rt-finder-row { grid-template-columns: 1fr 1fr 1fr; }
	.rt-stats-in { grid-template-columns: repeat(2, 1fr) !important; row-gap: 18px; }
	.rt-stats-in > div:nth-child(odd) { border-inline-start: 0; }
	.rt-on { display: none; }
	.rt-footer-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
	.rt-burger { display: flex; }
	.rt-nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px 18px; background: #fff; border-bottom: 1px solid var(--rt-line); box-shadow: 0 18px 30px rgba(7, 43, 69, .12); }
	.rt-nav.open { display: flex; }
	.rt-menu { flex-direction: column; }
	.rt-menu a { padding: 11px 6px; border-bottom: 1px solid var(--rt-line); }
	.rt-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-inline-start: 14px; }
	.rt-nav-cta { align-self: stretch; }
}
@media (max-width: 782px) {
	.admin-bar .rt-header { top: 46px; }
}
@media (max-width: 680px) {
	.rt-hero { padding: 56px 0 190px; }
	.rt-sun { width: 130px; height: 130px; bottom: 100px; }
	.rt-finder-row { grid-template-columns: 1fr 1fr; }
	.rt-finder .rt-btn { grid-column: 1 / -1; }
	.rt-stats-in { padding-block: 24px 4px; }
	.rt-section { padding: 44px 0; }
	.rt-bands { flex-wrap: wrap; }
	.rt-bands-sea { flex: 1 1 100%; writing-mode: horizontal-tb; padding: 8px; }
	.rt-band { flex: 1 1 45%; min-height: 110px; }
	.rt-cta-in > div + div { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 32px; }
	.rt-footer-in { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
