/*
Theme Name: New Compound Portal
Description: Arabic real-estate portal theme for the new-compound.biz-sky.com hub: listing search, latest listings, regions and the compounds directory.
Version: 1.0.1.3
Author: biz-sky
Text Domain: newcompound-portal
*/

:root {
	--plum: #1f8a4c;
	--plum-dark: #146b38;
	--plum-2: #4cc27a;
	--saffron: #f4a300;
	--saffron-dark: #d88f00;
	--bg: #f1faf4;
	--card: #ffffff;
	--ink: #14261b;
	--text: #34473b;
	--muted: #62786a;
	--line: #d6efdf;
	--radius: 16px;
	--shadow: 0 10px 30px rgba(20, 107, 56, .08);
	--wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Almarai", "Segoe UI", Tahoma, sans-serif;
	font-size: 16.5px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: "Readex Pro", "Almarai", sans-serif; color: var(--ink); line-height: 1.35; margin: 0 0 .5em; font-weight: 600; }
a { color: var(--plum-2); text-decoration: none; }
a:hover { color: var(--saffron-dark); }
img { max-width: 100%; height: auto; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.np-rtl .ico-flip, .np-rtl a .ico:last-child:not(:first-child) { transform: scaleX(-1); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto; clip-path: none; height: auto; width: auto; background: #fff; color: var(--ink); padding: 10px 16px; z-index: 100; inset-inline-start: 10px; top: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .75em 1.35em; border-radius: 12px; font-family: "Readex Pro", sans-serif; font-weight: 600; font-size: .95rem; border: 0; cursor: pointer; transition: background .15s, transform .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-saffron { background: var(--saffron); color: var(--plum-dark); }
.btn-saffron:hover { background: var(--saffron-dark); color: var(--plum-dark); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover { background: var(--plum-dark); color: #fff; }
.btn-white { background: #fff; color: var(--plum); }
.btn-white:hover { color: var(--plum-dark); }

/* Top bar + header */
.topbar { background: var(--plum-dark); color: #cfeedb; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: 6px; }
.topbar-links { gap: 18px !important; }
.topbar a { color: #fff; }
.topbar a:hover { color: var(--saffron); }
.site-header { background: #fff; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 30; }
.admin-bar .site-header { top: 32px; }
.header-row { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { max-height: 54px; width: auto; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; background: var(--plum); color: var(--saffron); display: grid; place-items: center; }
.brand-mark .ico { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: "Readex Pro", sans-serif; font-size: 1.25rem; }
.brand-text small { font-size: .74rem; color: var(--muted); max-width: 230px; }
.main-nav { margin-inline-start: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-weight: 700; font-size: .95rem; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--bg); color: var(--plum); }
.main-nav .sub-menu { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 230px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 8px; z-index: 5; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { font-weight: 400; }
.nav-toggle { display: none; background: var(--bg); border: 0; border-radius: 10px; width: 44px; height: 44px; padding: 11px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--plum); margin: 5px 0; }

/* Hero */
.hero { position: relative; color: #fff; padding: 84px 0 0; background: linear-gradient(180deg, rgba(20, 107, 56, .78), rgba(20, 107, 56, .92)), var(--hero) center / cover no-repeat, var(--plum); }
.hero-inner { max-width: 860px; text-align: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(244, 163, 0, .16); color: var(--saffron); font-weight: 700; font-size: .9rem; margin: 0 0 18px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3.2rem); margin-bottom: 12px; }
.hero-sub { color: #d4f2df; margin: 0 0 28px; }
.hero-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 8px; padding-inline-start: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.hero-search > .ico { color: var(--muted); width: 22px; height: 22px; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; color: var(--ink); padding: 12px 0; background: none; }
.hero-search .btn { padding: .9em 2em; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: .9rem; color: #d4f2df; }
.quick a { padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.quick a:hover { background: var(--saffron); border-color: var(--saffron); color: var(--plum-dark); }
.hero-stats { list-style: none; margin: 56px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: var(--radius) var(--radius) 0 0; max-width: 860px; color: var(--ink); }
.hero-stats li { padding: 22px; text-align: center; border-inline-end: 1px solid var(--line); }
.hero-stats li:last-child { border-inline-end: 0; }
.hero-stats strong { display: block; font-family: "Readex Pro", sans-serif; font-size: 1.9rem; color: var(--plum); line-height: 1.1; }
.hero-stats span { font-size: .88rem; color: var(--muted); }

/* Sections */
.section { padding: 64px 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.sec-kicker { display: inline-block; color: var(--saffron-dark); font-weight: 800; font-size: .88rem; margin-bottom: 4px; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--plum); }

/* Listing cards */
.listings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.listing { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.listing:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 107, 56, .14); }
/* The whole uploaded image is shown (flyers keep their text); a blurred copy fills the empty sides. */
.listing-img { position: relative; display: block; overflow: hidden; background: var(--bg); }
.listing-img::before { content: ""; position: absolute; inset: -20px; background: var(--thumb, none) center / cover no-repeat; filter: blur(18px) brightness(.9); }
.listing-img img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.listing-img .badge { z-index: 1; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--saffron); color: var(--plum-dark); font-size: .78rem; font-weight: 800; }
.listing-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.listing h3 { font-size: 1.02rem; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing h3 a { color: var(--ink); }
.listing p { margin: 0 0 14px; font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.listing-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.listing-foot span, .listing-foot a { display: inline-flex; align-items: center; gap: 5px; }
.listing-foot a { font-weight: 800; color: var(--plum); }

/* Regions */
.regions { background: #fff; }
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 16px; }
.region { position: relative; border-radius: var(--radius); overflow: hidden; display: block; background: var(--plum); }
.region-lg { grid-column: span 2; grid-row: span 2; }
.region img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.region::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 107, 56, .88) 0%, rgba(20, 107, 56, .1) 65%); }
.region:hover img { transform: scale(1.05); }
.region-txt { position: absolute; inset-inline: 18px; bottom: 16px; z-index: 1; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.region-txt strong { font-family: "Readex Pro", sans-serif; font-size: 1.15rem; color: #fff; }
.region-lg .region-txt strong { font-size: 1.7rem; }
.region-txt em { font-style: normal; font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--saffron); color: var(--plum-dark); white-space: nowrap; }

/* Compounds directory */
.filter { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; min-width: 260px; }
.filter input { border: 0; outline: none; font: inherit; padding: 8px 0; width: 100%; background: none; }
.compounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.compounds li[hidden] { display: none; }
.compounds a { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border-radius: 14px; border: 1px solid var(--line); color: var(--ink); height: 100%; transition: border-color .15s, box-shadow .15s; }
.compounds a:hover { border-color: var(--saffron); box-shadow: var(--shadow); }
.cmp-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--bg); color: var(--plum); display: grid; place-items: center; flex: none; }
.cmp-txt { min-width: 0; }
.cmp-txt strong { display: block; font-family: "Readex Pro", sans-serif; font-size: .92rem; font-weight: 600; line-height: 1.35; }
.cmp-txt em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); line-height: 1.4; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--plum) 0%, var(--plum-2) 100%); color: #e0f7e8; padding: 48px 0; }
.cta-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.cta-band h2 { color: #fff; margin-bottom: 4px; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Inner pages */
.page-head { background: var(--plum); color: #d4f2df; padding: 40px 0 36px; }
.page-head h1 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin: 6px 0 0; max-width: 30em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; }
.crumbs a { color: var(--saffron); }
.head-search { display: flex; gap: 10px; max-width: 560px; margin-top: 20px; }
.head-search input { flex: 1; min-width: 0; border: 0; border-radius: 12px; padding: 12px 16px; font: inherit; }
.empty .head-search { margin: 18px auto; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; padding-block: 40px 64px; align-items: start; }
.entry { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; min-width: 0; }
.entry-featured img { display: block; width: 100%; border-radius: 12px; margin-bottom: 24px; }
.entry-content { overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 10px; }
.entry-content h1, .entry-content h2, .entry-content h3 { margin-top: 1em; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 8px 10px; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin-inline: auto; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 1.5em 0; }
.gallery-item { margin: 0; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.side .sticky { position: sticky; top: 100px; display: grid; gap: 20px; }
.box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.box h3 { font-size: 1.05rem; }
.box-plum { background: var(--plum); display: grid; gap: 10px; }
.box-plum h3 { color: #fff; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.side-list a { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: .88rem; line-height: 1.45; }
.side-list img { width: 64px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 5px 12px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .85rem; }
.tags em { font-style: normal; color: var(--saffron-dark); font-weight: 800; }
.pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { padding: 7px 14px; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.pagination .current { background: var(--plum); color: #fff; }
.empty { text-align: center; }
.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.search-submit { padding: 10px 16px; border: 0; border-radius: 10px; background: var(--saffron); font: inherit; font-weight: 700; cursor: pointer; }

/* Footer */
.site-footer { background: var(--plum-dark); color: #a9dcbc; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.site-footer a { color: #d8f3e2; display: inline-flex; align-items: center; gap: 8px; }
.site-footer a:hover { color: var(--saffron); }
.site-footer p { font-size: .92rem; }
.brand-foot, .brand-foot .brand-text strong { color: #fff; }
.brand-foot .brand-text small { color: #a9dcbc; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }

@media (max-width: 1100px) {
	.listings, .compounds { grid-template-columns: repeat(3, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.nav-toggle { display: block; margin-inline-start: auto; }
	.header-cta { display: none; }
	.main-nav { position: absolute; inset-inline: 0; top: 100%; background: #fff; box-shadow: var(--shadow); display: none; margin: 0; max-height: 75vh; overflow-y: auto; }
	.main-nav.open { display: block; }
	.main-nav > ul { flex-direction: column; padding: 10px 16px 16px; }
	.main-nav .sub-menu { display: block; position: static; box-shadow: none; padding: 0; padding-inline-start: 14px; }
	.layout { grid-template-columns: 1fr; }
	.side .sticky { position: static; }
	.listings, .compounds { grid-template-columns: repeat(2, 1fr); }
	.region-grid { grid-template-columns: repeat(2, 1fr); }
	.brand-text small { display: none; }
}
@media (max-width: 600px) {
	.hide-sm, .topbar-note { display: none !important; }
	.topbar .wrap { justify-content: center; }
	.hero { padding-top: 52px; }
	.hero-search { flex-wrap: wrap; padding: 8px; }
	.hero-search > .ico { display: none; }
	.hero-search input { padding: 10px; width: 100%; flex-basis: 100%; }
	.hero-search .btn { width: 100%; }
	.hero-stats li { padding: 14px 6px; }
	.hero-stats strong { font-size: 1.4rem; }
	.hero-stats span { font-size: .76rem; }
	.listings, .compounds, .footer-grid { grid-template-columns: 1fr; }
	.region-grid { grid-auto-rows: 140px; }
	.region-lg { grid-row: span 1; }
	.region-lg .region-txt strong { font-size: 1.3rem; }
	.section { padding: 48px 0; }
	.entry { padding: 20px; }
	.filter { min-width: 0; width: 100%; }
	.gallery { grid-template-columns: repeat(2, 1fr); }
	.head-search { flex-wrap: wrap; }
	.head-search .btn { width: 100%; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
