:root { font-family: system-ui, "Segoe UI", Tahoma, Arial, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f6f7fb; color: #111; }

.container { max-width: 980px; margin: 0 auto; padding: 18px; }
.muted { color: #555; margin: 6px 0 0; }

/* Header */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #e8e8ef;
  backdrop-filter: blur(10px);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap; /* يسمح بالالتفاف بالموبايل  */
}

/* Logo right + text left (RTL) */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;        /* مهم مع flex */
  white-space:normal; /* يسمح للنص يلتف بالموبايل */
}
.brand-logo{
  width:56px;
  height:auto;
  object-fit:contain;
  flex:0 0 auto;
}
.brand-text h1{
  margin:0;
  font-size:26px;
    line-height:1.2;
  overflow-wrap:anywhere; /* يمنع خروج النص خارج الشاشة */
}
.brand-text {
    min-width:0;        /* يخلي النص يقدر يلتف */
}

/* Nav */
.nav { display:flex; gap:10px; flex-wrap:wrap; }
.nav-btn{
  text-decoration:none;
  color:#111;
  background:#fff;
  border:1px solid #e7e7ee;
  padding:8px 12px;
  border-radius:999px;
  transition:transform .2s ease;
}
.nav-btn:hover{ transform: translateY(-1px); }

/* Hero */
.hero { padding-top: 18px; }
.hero-card{
  background:#fff;
  border:1px solid #e7e7ee;
  border-radius:18px;
  padding:18px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
}
.hero-card h2{ margin:0 0 8px; }
.hero-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }

.primary-btn, .secondary-btn{
  display:inline-block;
  text-decoration:none;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid #e7e7ee;
}
.primary-btn{ background:#111; color:#fff; border-color:#111; }
.secondary-btn{ background:#fff; color:#111; }

/* Cards */
.card{
  background:#fff;
  border:1px solid #e7e7ee;
  border-radius:16px;
  padding:18px;
  margin:14px 0;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}

h2 { margin:0 0 12px; font-size:20px; }
h3 { margin:0 0 10px; font-size:16px; }
p { margin:0; line-height:1.9; }

.subcard{
  border:1px solid #eee;
  border-radius:14px;
  padding:14px;
  margin-top:12px;
  background:#fff;
}
ul { margin:0; padding-right:18px; line-height:2; }

/* Services Grid + Hover Overlay */
.services-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
  margin-top:12px;
}
.service-card{
  position:relative;
  overflow:hidden;
  border-radius:14px;
  cursor:pointer;
  border:1px solid #eee;
}
.service-card img{
  width:100%;
  height:260px;
  object-fit:cover;
  display:block;
  transition:transform .4s ease;
}
.service-card:hover img{ transform:scale(1.08); }
.service-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.75);
  color:#fff;
  padding:18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
  opacity:0;
  transition:opacity .3s ease;
}
.service-card:hover .service-overlay{ opacity:1; }
.service-overlay h3{ margin:0 0 10px; font-size:18px; }
.service-overlay p{ font-size:14px; line-height:1.6; }

/* Contact */
.contact-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin-top:12px;
}
.contact-item{
  border:1px solid #e7e7ee;
  border-radius:14px;
  padding:14px;
  background:#fff;
}
.contact-label{ font-size:13px; color:#555; margin-bottom:6px; }
.contact-value{ font-size:16px; color:#111; text-decoration:none; word-break:break-word; }
a.contact-value:hover{ text-decoration:underline; }

.footer{ padding:22px 0;text-align: center}

/* Map */
.map-frame{
  margin-top:14px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid #e7e7ee;
  background:#fff;
}
.map-frame iframe{
  display:block;
  width:100%;
  height:320px;
  border:0;
}

/* Responsive */
@media (max-width: 768px){
  .header-inner{ flex-wrap:wrap; }
  .nav{ width:100%; justify-content:center; }
  .brand-logo{ width:44px; }
  .brand-text h1{ font-size:20px; }
  .brand-text .muted{ font-size:13px; }
}
@media (max-width: 520px){
  .map-frame iframe{ height:240px; }
}

/* Extra mobile tweaks */
@media (max-width: 520px){
  .container{ padding:14px; }
  .nav{ gap:8px; }
  .nav-btn{ flex:1 1 auto; text-align:center; }
  .hero-actions a{ flex:1 1 auto; text-align:center; }
}
