
/* =========================================================
   STAR IMMOBILE — V6 PROFESSIONAL FRONT-END
   Arabic / French / RTL / Mobile First
   ========================================================= */

:root{
  --navy:#082a45;
  --navy-2:#0d3b5c;
  --blue:#17658a;
  --gold:#c79a45;
  --gold-2:#e0b866;
  --cream:#fbfaf7;
  --bg:#f4f7fa;
  --text:#17283a;
  --muted:#68798a;
  --line:#e3e9ef;
  --white:#fff;
  --success:#1d8a5a;
  --shadow:0 14px 40px rgba(8,42,69,.10);
  --shadow-lg:0 24px 60px rgba(8,42,69,.16);
  --radius:18px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Tahoma,Arial,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
body[dir="rtl"]{font-family:Tahoma,Arial,"Segoe UI",sans-serif}
img{max-width:100%;display:block}
a{color:var(--navy);text-decoration:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}

.wrap{
  width:min(1180px,calc(100% - 40px));
  margin-inline:auto;
}

/* ================= HEADER ================= */

header{
  background:rgba(255,255,255,.97);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:1000;
  backdrop-filter:blur(12px);
}

.nav{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.logo{
  width:68px;
  height:68px;
  object-fit:contain;
  flex:0 0 68px;
}

.nav nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
  font-size:14px;
  font-weight:700;
}

.nav nav a{
  padding:9px 12px;
  border-radius:10px;
  transition:.2s ease;
  white-space:nowrap;
}

.nav nav a:hover{
  background:#eef5f9;
  color:var(--gold);
}

.nav .lang{
  border:1px solid #d8e1e9;
  border-radius:22px;
  padding:7px 14px;
}

/* ================= HERO ================= */

.hero.home-hero{
  position:relative;
  overflow:hidden;
  color:#fff;
  padding:78px 0 92px;
  background:
    radial-gradient(circle at 85% 15%,rgba(224,184,102,.22),transparent 28%),
    radial-gradient(circle at 10% 80%,rgba(23,101,138,.55),transparent 34%),
    linear-gradient(135deg,#061f36 0%,#0c3d5d 55%,#125875 100%);
}

.hero.home-hero:before{
  content:"";
  position:absolute;
  inset:auto -10% -160px auto;
  width:520px;
  height:520px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:50%;
}

.hero.home-hero:after{
  content:"";
  position:absolute;
  inset:30px auto auto -180px;
  width:430px;
  height:430px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:50%;
}

.hero-content{
  position:relative;
  z-index:2;
  max-width:820px;
  margin-bottom:30px;
}

.hero-kicker,
.section-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--gold-2);
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.hero h1{
  margin:10px 0 12px;
  font-size:clamp(34px,5vw,60px);
  line-height:1.15;
  letter-spacing:-1px;
}

.hero p{
  margin:0;
  max-width:760px;
  color:rgba(255,255,255,.82);
  font-size:19px;
}

/* ================= SEARCH ================= */

.home-search,
.search{
  position:relative;
  z-index:5;
  max-width:1120px;
  margin-top:28px;
  padding:26px;
  background:#fff;
  color:var(--text);
  border:1px solid rgba(255,255,255,.6);
  border-radius:20px;
  box-shadow:var(--shadow-lg);
}

.search-title{
  margin-bottom:18px;
}

.search-title h2{
  margin:0 0 3px;
  color:var(--navy);
  font-size:22px;
}

.search-title p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.fields{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field label,
.advanced-search label{
  color:#33495e;
  font-size:13px;
  font-weight:800;
}

input,select,textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid #d6e0e8;
  border-radius:11px;
  background:#fff;
  color:var(--text);
  outline:none;
  transition:.2s ease;
}

input:focus,select:focus,textarea:focus{
  border-color:#6ca6c2;
  box-shadow:0 0 0 4px rgba(23,101,138,.09);
}

.home-search-actions{
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:18px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  padding:10px 18px;
  background:var(--gold);
  color:#fff!important;
  border:0;
  border-radius:11px;
  font-weight:800;
  transition:.2s ease;
  box-shadow:0 7px 18px rgba(199,154,69,.20);
}

.btn:hover{
  transform:translateY(-2px);
  background:#b78936;
}

.btn.dark{
  background:var(--navy);
  box-shadow:0 7px 18px rgba(8,42,69,.18);
}

.btn.dark:hover{background:#0e4567}

.advanced-link,
.section-link{
  color:var(--navy);
  font-weight:800;
}

.advanced-link:hover,
.section-link:hover{color:var(--gold)}

/* ================= SECTIONS ================= */

.section{
  padding:72px 0;
}

.home-categories{
  padding-top:58px;
  padding-bottom:64px;
  background:linear-gradient(180deg,#fff 0%,#f7fafc 100%);
}

.latest-section{
  background:#f4f7fa;
}

.featured-section{
  background:#fff;
}

.section-title,
.section-header-row{
  margin-bottom:28px;
}

.section-header-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
}

.section-title h2,
.section-header-row h2{
  margin:5px 0 5px;
  color:var(--navy);
  font-size:clamp(25px,3vw,34px);
  line-height:1.25;
}

.section-title p,
.section-header-row p{
  margin:0;
  color:var(--muted);
  font-size:15px;
}

.section-link{
  white-space:nowrap;
  padding:9px 0;
}

/* ================= CATEGORIES ================= */

.category-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
}

.category-card{
  min-height:170px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:20px 12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 8px 25px rgba(8,42,69,.06);
  transition:.25s ease;
}

.category-card:hover{
  transform:translateY(-6px);
  border-color:#d9bd80;
  box-shadow:0 18px 35px rgba(8,42,69,.12);
}

.category-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin-bottom:11px;
  border-radius:17px;
  background:#eef6fa;
  font-size:28px;
}

.category-card h3{
  margin:0 0 4px;
  color:var(--navy);
  font-size:16px;
}

.category-card span{
  color:var(--muted);
  font-size:12px;
}

/* ================= PROPERTY GRID ================= */

.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
}

.home-property-grid{
  align-items:stretch;
}

.card{
  position:relative;
  min-width:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 9px 28px rgba(8,42,69,.08);
  transition:.25s ease;
}

.card:hover{
  transform:translateY(-5px);
  box-shadow:0 18px 42px rgba(8,42,69,.14);
}

.card.featured{
  border:2px solid rgba(199,154,69,.75);
}

.property-image{
  position:relative;
  overflow:hidden;
  background:#e9eef2;
}

.property-image a{
  display:block;
}

.card .property-image img,
.card>img{
  width:100%;
  height:250px;
  object-fit:cover;
  transition:transform .45s ease;
}

.card:hover .property-image img{
  transform:scale(1.045);
}

.property-featured,
.property-transaction{
  position:absolute;
  top:14px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:5px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  box-shadow:0 5px 14px rgba(0,0,0,.16);
}

.property-featured{
  inset-inline-start:14px;
  background:var(--gold);
  color:#fff;
}

.property-transaction{
  inset-inline-end:14px;
  background:rgba(8,42,69,.93);
  color:#fff;
}

.card .body{
  padding:19px;
}

.property-type{
  display:inline-block;
  margin-bottom:5px;
  color:var(--gold);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.card h3{
  margin:2px 0 8px;
  font-size:20px;
  line-height:1.35;
}

.card h3 a{color:var(--navy)}
.card h3 a:hover{color:var(--gold)}

.property-location{
  margin:0 0 13px;
  color:var(--muted);
  font-size:13px;
  min-height:24px;
}

.property-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:0 0 14px;
}

.property-meta span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 8px;
  background:#f2f6f8;
  border-radius:8px;
  color:#4c6070;
  font-size:12px;
  font-weight:700;
}

.property-price{
  margin:5px 0 13px;
  color:#a8731f;
  font-size:23px;
  font-weight:900;
  line-height:1.2;
}

.property-agency{
  margin-bottom:13px;
  padding-top:11px;
  border-top:1px solid var(--line);
  color:#536778;
  font-size:12px;
}

.property-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:13px;
  border-top:1px solid var(--line);
}

.views{
  color:#7a8996;
  font-size:12px;
}

.property-footer .btn{
  min-height:38px;
  padding:7px 14px;
  font-size:13px;
}

.badge{
  display:inline-flex;
  padding:5px 10px;
  background:#f4c542;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}

/* ================= ADVANCED SEARCH ================= */

.advanced-search{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:22px;
  box-shadow:var(--shadow);
  margin:25px 0;
}

.advanced-search form{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  align-items:end;
}

.advanced-search input,
.advanced-search select{width:100%}

/* ================= EMPTY ================= */

.empty-results,
.empty-state{
  padding:55px 25px;
  background:#fff;
  border:1px dashed #ccd7e0;
  border-radius:18px;
  text-align:center;
  color:var(--muted);
}

.empty-icon{
  font-size:44px;
  margin-bottom:8px;
}

.empty-results h2,
.empty-state h2{
  margin:0 0 5px;
  color:var(--navy);
}

/* ================= PROPERTY DETAIL ================= */

.property{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr);
  gap:28px;
}

.gallery img{
  width:100%;
  max-height:600px;
  object-fit:cover;
  border-radius:18px;
}

.side{
  height:max-content;
  padding:25px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
}

.map{
  height:380px;
  border-radius:14px;
  overflow:hidden;
}

.thumbs{
  display:flex;
  gap:8px;
  overflow:auto;
  margin-top:10px;
}

.thumbs button{
  border:0;
  background:transparent;
  padding:0;
}

.thumbs img{
  width:82px;
  height:64px;
  object-fit:cover;
  border-radius:8px;
}

/* ================= FORMS ================= */

.form{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:30px;
  box-shadow:var(--shadow);
}

.form-heading{
  margin-bottom:25px;
}

.form-heading h1{
  margin:5px 0;
  color:var(--navy);
}

.form-heading p{
  margin:0;
  color:var(--muted);
}

textarea{min-height:150px;resize:vertical}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.notice{
  padding:14px 16px;
  border-radius:11px;
  background:#eaf7ed;
  margin:15px 0;
}

.notice.error,
.error{background:#fff0f0;color:#9c3030}

.success-box{
  padding:35px;
  text-align:center;
  border:1px solid #cce8d7;
  background:#f4fcf7;
  border-radius:18px;
}

.success-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin:0 auto 12px;
  border-radius:50%;
  background:#1d8a5a;
  color:#fff;
  font-size:30px;
}

/* ================= FOOTER ================= */

footer{
  background:#071f34;
  color:#dce7ef;
}

.foot{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:35px;
  padding:55px 0 35px;
}

.foot h3{
  margin:0 0 10px;
  color:#fff;
}

.foot p{color:#b8c8d5}
.flogo{width:90px}

.contact-block{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.contact-item{
  display:flex;
  align-items:center;
  gap:9px;
  color:#dce7ef;
}

.contact-item:hover{color:var(--gold-2)}

.contact-item svg{
  width:18px;
  height:18px;
  flex:0 0 18px;
}

.copy{
  border-top:1px solid rgba(255,255,255,.12);
  padding:16px 0;
  text-align:center;
  color:#93a8b8;
  font-size:13px;
}

/* ================= PAGINATION ================= */

.pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:32px;
}

.pagination a,
.pagination span{
  min-width:40px;
  padding:7px 11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  text-align:center;
}

.pagination .active{
  background:var(--navy);
  border-color:var(--navy);
  color:#fff;
}

/* ================= TABLES / ADMIN-SHARED ================= */

.panel{
  padding:25px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 7px 24px rgba(16,41,68,.07);
}

.table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

.table th,.table td{
  padding:11px;
  border-bottom:1px solid var(--line);
  text-align:inherit;
}

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px;
}

.stat{
  padding:20px;
  background:#fff;
  border-radius:12px;
}

.stat b{font-size:30px}

/* ================= COMPARE / AGENCY ================= */

.compare-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px;
}

.compare-card{
  padding:16px;
  background:#fff;
  border-radius:14px;
  box-shadow:var(--shadow);
}

.compare-card img{
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:10px;
}

.agency-head{
  padding:25px;
  margin-bottom:25px;
  background:#fff;
  border-radius:16px;
}

.agency-head img{
  width:90px;
  height:90px;
  object-fit:contain;
  border-radius:12px;
}

.sharebar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:15px 0;
}

/* ================= RTL ================= */

[dir="rtl"] .section-header-row{
  text-align:right;
}

[dir="rtl"] .property-footer{
  direction:rtl;
}

[dir="rtl"] .hero-content{
  text-align:right;
}

[dir="rtl"] .home-search{
  text-align:right;
}

/* =========================================================
   STAR IMMOBILE — CONSOLIDATED RESPONSIVE SYSTEM
   One responsive layer only: tablet -> mobile -> small phones.
   ========================================================= */

@media (max-width:1050px){
  .wrap{width:min(100% - 36px,1180px)}
  .nav{min-height:76px;gap:14px}
  .nav nav{gap:3px}
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  .advanced-search form{grid-template-columns:repeat(3,minmax(0,1fr))}
  .grid,.home-property-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
  .property{grid-template-columns:1fr}
  .foot{grid-template-columns:1fr 1fr;gap:28px}
  .why-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .compare-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  .wrap{width:calc(100% - 24px);max-width:none}

  /* Header */
  header{position:relative}
  .nav{min-height:64px;padding:7px 0;gap:7px}
  .logo{width:50px!important;height:50px!important;flex:0 0 50px}
  .nav nav{
    flex:1 1 auto;
    min-width:0;
    max-width:none;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    justify-content:flex-start;
    gap:2px;
    padding:2px 0;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .nav nav::-webkit-scrollbar{display:none}
  .nav nav a{flex:0 0 auto;padding:7px 8px;font-size:13px!important;line-height:1.25}
  .nav .lang{flex:0 0 auto;padding:6px 8px;font-size:11px!important}

  /* Hero */
  .hero.home-hero{padding:38px 0 44px}
  .hero-content{max-width:none;margin-bottom:16px}
  .hero-kicker{font-size:10px;letter-spacing:.08em}
  .hero h1{font-size:clamp(27px,8vw,34px)!important;line-height:1.25;letter-spacing:0;margin:7px 0 10px}
  .hero p{font-size:14px!important;line-height:1.7}

  /* Main search */
  .home-search,.search{margin-top:16px;padding:15px!important;border-radius:15px}
  .search-title{margin-bottom:13px}
  .search-title h2{font-size:20px!important;line-height:1.4}
  .search-title p{font-size:12px!important;line-height:1.65}
  .fields,.advanced-search form{grid-template-columns:1fr;gap:9px}
  .field label,.advanced-search label{font-size:13px!important}
  input,select,textarea{min-height:45px;font-size:14px!important;padding:10px 12px}
  .home-search-actions{margin-top:12px;gap:8px;flex-direction:column;align-items:stretch}
  .home-search-actions .btn{width:100%}
  .advanced-link{text-align:center}

  /* Sections */
  .section{padding:40px 0!important}
  .home-categories{padding-top:40px!important;padding-bottom:40px!important}
  .section-title,.section-header-row{margin-bottom:18px}
  .section-header-row{align-items:flex-start;flex-direction:column;gap:8px}
  .section-title h2,.section-header-row h2{font-size:24px!important;line-height:1.4}
  .section-title p,.section-header-row p{font-size:13px!important;line-height:1.7}
  .section-link{font-size:13px!important;padding:0}

  /* Categories */
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .category-card{min-height:120px!important;padding:12px 7px!important;border-radius:14px}
  .category-icon{width:45px!important;height:45px!important;margin-bottom:7px;font-size:22px!important;border-radius:13px}
  .category-card h3{font-size:14px!important;margin-bottom:3px}
  .category-card span{font-size:10px!important;line-height:1.4}

  /* Property cards */
  .grid,.home-property-grid{grid-template-columns:1fr!important;gap:14px!important}
  .card{border-radius:15px}
  .card .property-image img,.card>img{height:210px!important;min-height:210px;object-fit:cover}
  .card .body{padding:14px!important}
  .property-featured,.property-transaction{top:9px!important;min-height:30px!important;padding:5px 9px!important;font-size:11px!important}
  .card h3{font-size:18px!important;line-height:1.4;margin:3px 0 6px}
  .property-type{font-size:11px!important;margin-bottom:3px}
  .property-location{font-size:12px!important;line-height:1.65;margin-bottom:9px}
  .property-meta{gap:5px;margin-bottom:9px}
  .property-meta span{font-size:11px!important;padding:4px 6px}
  .property-price{font-size:21px!important;margin:5px 0 9px}
  .property-agency{font-size:11px;margin-bottom:9px;padding-top:9px}
  .property-footer{padding-top:9px}
  .property-footer .btn{min-height:38px;padding:7px 11px;font-size:12px!important}
  .views{font-size:10px!important}

  /* Why / CTA */
  .home-about,.home-cta{padding-top:40px!important;padding-bottom:40px!important}
  .why-grid{grid-template-columns:1fr!important;gap:9px!important}
  .why-card{min-height:0;padding:15px 13px;display:grid;grid-template-columns:44px 1fr;column-gap:10px;align-items:center}
  .why-icon{width:44px;height:44px;font-size:20px;margin:0;grid-row:span 2}
  .why-card h3{font-size:15px;margin:0 0 2px}
  .why-card p{font-size:11px;line-height:1.6;margin:0}
  .cta-content{padding:19px 15px;display:block;border-radius:16px}
  .cta-content h2{font-size:21px;line-height:1.4}
  .cta-content p{font-size:12px;line-height:1.7}
  .cta-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .cta-actions .btn{min-width:0;width:100%;font-size:12px!important;padding:9px 7px}

  /* Forms / details */
  .form{padding:19px 14px}
  .property{grid-template-columns:1fr}
  .side{padding:16px}
  .map{height:300px}

  /* Footer */
  footer{overflow:hidden}
  .foot{grid-template-columns:1fr!important;gap:20px!important;padding:32px 0 24px!important}
  .flogo{width:68px!important;height:68px!important;object-fit:contain}
  .foot h3{font-size:17px!important}
  .foot p{font-size:12px!important;line-height:1.7}
  .contact-block{gap:7px!important}
  .contact-item{font-size:12px!important;line-height:1.5;gap:8px;min-height:30px}
  .contact-item svg,.contact-item img{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;flex:0 0 18px!important}
  .contact-item i,.contact-item .icon,.contact-item .fa,.contact-item .fas{width:18px!important;height:18px!important;font-size:17px!important;line-height:18px!important}
  .copy{font-size:9px!important;padding:11px 0!important;line-height:1.6}
}

@media (max-width:390px){
  .wrap{width:calc(100% - 20px)}
  .logo{width:48px!important;height:48px!important;flex-basis:48px}
  .nav nav a{font-size:12px!important;padding:6px 7px}
  .hero h1{font-size:26px!important}
  .hero p{font-size:13px!important}
  .category-card{min-height:112px!important}
  .card .property-image img,.card>img{height:195px!important;min-height:195px}
  .property-price{font-size:20px!important}
}

/* Arabic readability */
html[dir="rtl"] body,body[dir="rtl"]{font-family:Tahoma,"Arial",sans-serif}
html[dir="rtl"] .hero h1,
html[dir="rtl"] .section-title h2,
html[dir="rtl"] .section-header-row h2,
html[dir="rtl"] .card h3{letter-spacing:0}

/* Accessibility */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(199,154,69,.45);outline-offset:2px}
