/* نسمة المعمار — طبقة نظام التصميم (تُحمَّل أخيرًا)
   لا تغيّر منطق الباك اند. تعيد توحيد الألوان والمسافات ومحاذاة العناصر. */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

html { font-size: 16px; }
body {
  font-family: var(--font-ar);
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding-top: 88px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  letter-spacing: -0.015em;
}
p { color: var(--text-muted); }

/* ===== Header ===== */
.header {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  border-bottom-color: var(--color-border-default);
  box-shadow: var(--shadow-sm);
}
.header-inner { height: 80px; gap: 1rem; }
.logo-img { height: 56px; max-width: 180px; }
.nav { align-items: center; gap: .15rem; }
.nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: .95rem;
  padding: .55rem .9rem;
  border-radius: var(--radius-sm);
}
.nav-link:hover { color: var(--color-action-primary-hover); background: var(--color-feedback-success-bg); }
.nav-link.active { color: var(--color-action-primary-hover); font-weight: 700; background: var(--color-feedback-success-bg); }
.nav-link.active::after { background: var(--color-action-primary); }
.theme-toggle, .mobile-menu-btn {
  width: 40px; height: 40px;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-heading);
}
.theme-toggle:hover, .mobile-menu-btn:hover {
  background: var(--color-feedback-success-bg);
  color: var(--color-action-primary-hover);
  border-color: transparent;
}

.mobile-menu {
  top: 80px;
  background: var(--bg-primary);
  transform: none;
  visibility: hidden;
  pointer-events: none;
  display: none;
  width: 100%;
  max-width: 100%;
}
.mobile-menu.open {
  display: block;
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.mobile-nav .nav-link { border-radius: var(--radius-md); }

/* ===== Buttons ===== */
.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  gap: 8px;
}
.btn-primary {
  background: var(--color-action-primary);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--color-action-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--color-action-secondary);
  color: #fff;
  border: 0;
}
.btn-secondary:hover { background: var(--color-action-secondary-hover); color: #fff; }
.btn-white { color: var(--p-navy-700); }
.btn-outline-white:hover { color: var(--p-navy-700); }
.btn-whatsapp { background: #128C65 !important; color: #fff !important; border-radius: var(--radius-md); }

/* ===== Hero / banners ===== */
.hero, .hero-slider, .page-banner, .article-hero {
  background: var(--gradient-brand);
}
.hero { padding-top: 0; min-height: calc(100dvh - 80px); }
.hero::before {
  background:
    linear-gradient(135deg, rgba(18,42,68,.88) 0%, rgba(40,88,142,.78) 50%, rgba(46,156,141,.80) 100%),
    url('../images/hero-bg.jpg') center/cover no-repeat;
}
.page-banner {
  padding: 4.5rem 0 3.5rem;
  min-height: 240px;
  margin-top: 0;
}
.page-banner.has-image {
  background-size: cover;
  background-position: center;
  position: relative;
}
.page-banner.has-image::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(18,42,68,.82), rgba(46,156,141,.55));
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1, .page-banner p, .article-hero h1 { color: #fff !important; text-shadow: none; }
.page-banner p { color: rgba(255,255,255,.84) !important; max-width: 640px; margin: .6rem auto 0; }

.hero-slider { min-height: 620px; }
.hero-badge, .section-badge {
  background: var(--color-feedback-success-bg);
  color: var(--color-action-primary-hover);
  border: 0;
}
.hero-badge {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}
.section-badge { font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.section-header { max-width: 720px; }

/* ===== Cards / grids ===== */
.card, .project-card, .why-card, .testimonial-card, .partner-logo,
.contact-info-card, .cert-card, .branch-card, .article-card, .blog-card,
.service-copy, .project-copy, .contact-form-card, .sidebar-card,
.service-contact-card, .contact-side-card {
  border-color: var(--color-border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card:hover, .project-card:hover, .why-card:hover, .contact-info-card:hover {
  border-color: rgba(79,193,176,.35);
  box-shadow: var(--shadow-md);
}
.why-icon, .contact-icon, .cert-icon, .service-card-icon {
  background: var(--color-feedback-success-bg);
  color: var(--color-action-primary-hover);
}
.feature-symbol {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin: 0 auto 1rem;
  border-radius: var(--radius-md);
  background: var(--color-feedback-success-bg);
  color: var(--color-action-primary-hover);
  font-size: 1.4rem;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .5rem;
  margin: .85rem 0 1rem;
}
.project-facts span {
  background: var(--color-surface-sunken);
  border-radius: var(--radius-sm);
  padding: .55rem .4rem;
  color: var(--color-action-primary-hover);
}
.project-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--color-action-primary-hover); font-weight: 700;
}

.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.branch-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--color-border-default);
}
.branch-city {
  display: inline-flex;
  font-size: .75rem; font-weight: 700;
  color: var(--p-sand-600);
  background: var(--p-sand-100);
  padding: .25rem .7rem; border-radius: var(--radius-full);
}

/* ===== Forms ===== */
.editor-form input, .editor-form select, .editor-form textarea,
.login-card input, .contact-form-card input, .contact-form-card select,
.contact-form-card textarea, .search-input, .filter-select,
.admin-body input, .admin-body select, .admin-body textarea {
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: #fff;
}
.editor-form input:focus, .editor-form select:focus, .editor-form textarea:focus,
.login-card input:focus, .search-input:focus,
.admin-body input:focus, .admin-body select:focus, .admin-body textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 4px rgba(79,193,176,.16);
  outline: none;
}
.form-grid { gap: 1rem; }
.alert.success { background: var(--color-feedback-success-bg); color: var(--color-feedback-success); }
.alert.error, .alert.danger { background: var(--color-feedback-danger-bg); color: var(--color-feedback-danger); }
.preview-notice { background: var(--color-feedback-warning-bg); color: var(--color-feedback-warning); }

/* ===== Footer — restore brand block that later CSS hid ===== */
.footer {
  background: var(--gradient-footer);
  padding-top: 3.5rem;
}
.footer .footer-grid,
.footer-grid {
  display: grid !important;
  grid-template-columns: minmax(0,1.4fr) minmax(160px,1fr) minmax(160px,1fr) !important;
  gap: 2.25rem !important;
  align-items: start;
  padding-block: 0 1.5rem;
}
.footer-brand { max-width: none !important; }
.footer-brand .logo,
.footer-brand > p {
  display: block !important;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand .logo img,
.footer-brand .logo-img {
  height: 56px; width: auto;
  filter: brightness(0) invert(1);
  opacity: .96;
}
.footer-brand p {
  color: rgba(255,255,255,.68);
  font-size: .92rem;
  max-width: 340px;
}
.footer-social-title {
  margin: 1.1rem 0 .7rem !important;
  font-size: 1rem !important;
  color: #fff !important;
  font-weight: 700;
}
.footer-brand .footer-social { margin: 0; display: flex; gap: .55rem; flex-wrap: wrap; }
.footer-brand .social-link,
.footer .social-link {
  width: 40px !important; height: 40px !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}
.footer-brand .social-link:hover,
.footer .social-link:hover {
  background: var(--p-teal-500) !important;
  border-color: var(--p-teal-500) !important;
  color: #122A44 !important;
}
.footer-col h2, .footer-col h4 {
  color: #fff !important;
  font-size: 1.02rem !important;
  margin: 0 0 .85rem !important;
}
.footer-links { display: flex !important; flex-direction: column; gap: .2rem; }
.footer-links a {
  color: rgba(255,255,255,.68) !important;
  font-size: .9rem !important;
  line-height: 1.7 !important;
}
.footer-links a:hover { color: #fff !important; padding-right: 4px; }
.footer-bottom {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  padding-block: 1.15rem !important;
  margin-top: 0 !important;
  border-top: 1px solid rgba(255,255,255,.13);
  font-size: .8rem !important;
  color: rgba(255,255,255,.55);
  text-align: start;
}
.footer-bottom span { display: inline; margin: 0 !important; text-align: inherit !important; }
.footer .developer-credit { color: #fff; }

/* ===== Floating actions ===== */
.float-actions {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  position: fixed;
  left: 1.15rem;
  bottom: 1.15rem;
  z-index: 90;
}
.float-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 48px;
  padding: .55rem 1rem;
  border-radius: var(--radius-full);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  box-shadow: var(--shadow-md);
}
.float-btn.wa { background: #128C65; }
.float-btn.call { background: var(--p-navy-700); }
.back-to-top { background: var(--p-teal-600); bottom: 1.15rem; }

/* ===== Blog / articles ===== */
.blog-toolbar {
  display: flex; gap: .75rem; align-items: center;
  margin: 1.25rem 0 1.75rem;
}
.blog-search { flex: 1; }
.article-content h2, .article-content h3 {
  color: var(--color-text-heading);
  font-family: var(--font-display);
}
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 2rem; }
.status-published { background: var(--color-feedback-success-bg); color: var(--color-feedback-success); }
.status-scheduled { background: var(--color-feedback-warning-bg); color: var(--color-feedback-warning); }
.status-draft { background: var(--p-gray-100); color: var(--p-gray-500); }

/* ===== Dark theme keep readable ===== */
[data-theme="dark"] {
  --bg-primary: #0F1419;
  --bg-secondary: #151C23;
  --bg-tertiary: #1E262E;
  --bg-card: #151C23;
  --text-primary: #EAF1FA;
  --text-secondary: #D5DEE6;
  --text-muted: #9AA6AD;
  --border: #2A343C;
  --color-text-heading: #EAF1FA;
  --color-surface-default: #151C23;
  --color-surface-sunken: #0F1419;
  --color-border-default: #2A343C;
}
[data-theme="dark"] .header { background: rgba(15,20,25,.92); }
[data-theme="dark"] .footer-brand .logo img { filter: none; }

/* ===== Admin overlay ===== */
.admin-body { padding-top: 0; background: var(--color-surface-sunken); font-family: var(--font-ar); }
.admin-sidebar {
  background: var(--p-navy-800);
  width: 272px;
}
.admin-brand { gap: 12px; padding: 18px 20px; }
.admin-brand img { width: 52px; height: 40px; background: #fff; border-radius: 8px; object-fit: contain; }
.admin-sidebar nav a {
  border-radius: 10px;
  padding: 10px 12px;
  color: #D7E5F5;
}
.admin-sidebar nav a.active,
.admin-sidebar nav a:hover {
  background: rgba(79,193,176,.18);
  color: #fff;
}
.admin-sidebar nav p {
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8ea9c7;
}
.admin-topbar {
  margin-right: 272px;
  height: 68px;
  background: #fff;
  border-bottom: 1px solid var(--color-border-default);
}
.admin-main { margin-right: 272px; padding: 28px; }
.admin-title h1 { font-family: var(--font-display); color: var(--p-navy-700); }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.admin-stats .info-card {
  background: #fff;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
}
.admin-stats strong { color: var(--p-teal-600); font-size: 1.7rem; }
.editor-panel, .table-wrap, .admin-filters, .save-bar {
  border-color: var(--color-border-default);
  border-radius: var(--radius-lg);
}
.save-bar { bottom: 16px; }
.admin-body .btn-primary { background: var(--p-teal-600); }
.admin-body .btn-secondary { background: var(--p-blue-100); color: var(--p-blue-600); border: 1px solid transparent; }
.guest-admin { background: var(--gradient-brand) !important; padding-top: 0; }
.guest-admin .admin-main { margin: 0 !important; }
.login-shell {
  width: min(100%, 460px) !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: var(--shadow-lg) !important;
}
.login-card { padding: 2rem !important; }
.login-card h2 { font-family: var(--font-display); color: var(--p-navy-700); }
.admin-eyebrow { color: var(--p-sand-600); font-size: 12.5px; font-weight: 700; }

@media (max-width: 1050px) {
  .admin-topbar, .admin-main { margin-right: 0; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1023px) {
  .article-layout, .service-detail-grid, .project-detail-layout, .contact-form-grid, .about-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 767px) {
  body { padding-top: 72px; }
  .header-inner { height: 72px; }
  .logo-img { height: 46px; }
  .mobile-menu { top: 72px; }
  .hero-slider { min-height: 560px; }
  .footer .footer-grid, .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .float-actions {
    left: 0; right: 0; bottom: 0;
    flex-direction: row;
    padding: .55rem .7rem;
    background: rgba(255,255,255,.94);
    border-top: 1px solid var(--color-border-default);
    box-shadow: var(--shadow-md);
  }
  .float-btn { flex: 1; justify-content: center; border-radius: 12px; }
  .back-to-top { bottom: 76px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
@media (max-width: 480px) {
  .footer .footer-grid, .footer-grid { grid-template-columns: 1fr !important; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body.menu-open{overflow:hidden;}

/* ===== Large screens: content uses 85% of viewport ===== */
@media (min-width: 1200px) {
  .container {
    width: 80%;
    max-width: 80%;
    padding-inline: 0;
  }
  .narrow { width: min(880px, 80%); margin-inline: auto; }
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--color-border-default);
  color: var(--color-text-heading);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 11px 20px;
}
.btn-ghost:hover {
  border-color: var(--color-action-primary);
  color: var(--color-action-primary-hover);
}

/* ===== Projects filter ===== */
.projects-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.projects-heading-row h2 { margin: .35rem 0 0; font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.projects-count {
  background: var(--color-feedback-success-bg);
  color: var(--color-action-primary-hover);
  font-weight: 700;
  font-size: .85rem;
  padding: .4rem .85rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.projects-toolbar {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,1.2fr) auto;
  gap: 12px;
  align-items: end;
  background: var(--color-surface-default);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
}
.projects-toolbar label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.projects-toolbar .filter-search { min-width: 0; }
.projects-toolbar .filter-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.projects-toolbar .filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.projects-toolbar input,
.projects-toolbar select {
  min-height: 46px;
  width: 100%;
}
.projects-filter-bar { display: none; }
@media (max-width: 1023px) {
  .projects-filter-bar {
    display: flex;
    gap: .6rem;
    align-items: center;
    margin-bottom: .85rem;
  }
  .projects-filter-toggle { min-height: 46px; }
  .projects-toolbar {
    display: none;
    grid-template-columns: 1fr;
    position: static;
    z-index: 5;
    margin-bottom: 1.25rem;
  }
  .projects-toolbar.is-open { display: grid; }
  .projects-toolbar .filter-actions .btn { flex: 1; min-height: 48px; }
  .projects-toolbar .filter-selects { grid-template-columns: 1fr; }
  .projects-heading-row { align-items: flex-start; flex-direction: column; }
}

/* ===== Project detail ===== */
.project-hero-wrap { margin-top: -88px; }
.project-hero-visual {
  position: relative;
  min-height: 420px;
  background: var(--gradient-brand) center/cover no-repeat;
  display: flex;
  align-items: flex-end;
}
.project-hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,42,68,.25) 0%, rgba(18,42,68,.78) 70%, rgba(11,28,46,.92) 100%);
}
.project-hero-copy {
  position: relative;
  z-index: 1;
  padding-block: 6.5rem 2.4rem;
  color: #fff;
}
.project-hero-copy h1 { color: #fff; max-width: 18ch; margin: .7rem 0 .6rem; }
.project-hero-copy p { color: rgba(255,255,255,.86); max-width: 46rem; margin: 0; }
.project-back {
  display: inline-flex;
  margin-bottom: .9rem;
  color: rgba(255,255,255,.8);
  font-size: .86rem;
  font-weight: 600;
}
.project-back:hover { color: #fff; }
.project-page { padding-top: 1.5rem; }
.project-specbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  margin: 0 0 2rem;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  background: var(--color-surface-default);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.project-specbar > div {
  padding: 1rem 1.1rem;
  border-inline-end: 1px solid var(--color-border-default);
}
.project-specbar > div:last-child { border-inline-end: 0; }
.project-specbar dt {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-bottom: .25rem;
}
.project-specbar dd {
  margin: 0;
  font-weight: 800;
  color: var(--color-text-heading);
  overflow-wrap: anywhere;
}
.project-copy {
  padding: clamp(1.15rem, 2.4vw, 2rem);
  background: var(--color-surface-default);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
}
@media (max-width: 1023px) {
  .project-hero-wrap { margin-top: -72px; }
  .project-hero-visual { min-height: 360px; }
  .project-hero-copy { padding-block: 5.5rem 1.6rem; }
  .project-hero-copy h1 { max-width: none; font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .project-specbar { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .project-hero-visual { min-height: 320px; }
  .project-specbar { grid-template-columns: 1fr 1fr; }
  .project-specbar > div { border-bottom: 1px solid var(--color-border-default); }
  .project-copy { padding: 1rem; }
}

/* ===== Sources ===== */
.sources-panel {
  margin: 2rem 0 0;
  padding: 1.4rem 1.35rem 1.15rem;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  background: var(--color-surface-sunken);
}
.sources-head h2 {
  margin: .35rem 0 .35rem;
  font-size: 1.35rem;
}
.sources-head p { margin: 0 0 1rem; font-size: .9rem; }
.sources-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.sources-list li {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: .85rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
}
.source-index {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
}
.source-body a {
  display: block;
  font-weight: 700;
  color: var(--color-text-heading);
  overflow-wrap: anywhere;
}
.source-body a:hover { color: var(--color-action-primary-hover); }
.source-url { display: block; margin-top: .2rem; color: var(--color-text-muted); font-size: .78rem; direction: ltr; text-align: right; }

/* ===== Branch cards (contact reference) ===== */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
}
.branch-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.35rem 1.2rem 1.2rem;
  background: #fff;
  border: 1px solid #E4EEF6;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(27,58,92,.06);
  min-height: 100%;
}
.branch-card:hover { border-color: rgba(56,120,192,.28); box-shadow: var(--shadow-md); }
.branch-city {
  align-self: flex-start;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  color: #28588E;
  background: #EAF1FA;
  padding: .28rem .75rem;
  border-radius: var(--radius-full);
}
.branch-card h3 {
  margin: 0;
  font-size: 1.12rem;
  color: var(--p-navy-700);
  line-height: 1.45;
}
.branch-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.branch-meta li {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: .55rem;
  align-items: start;
  color: var(--color-text-muted);
  font-size: .9rem;
  line-height: 1.6;
}
.branch-ico {
  width: 18px; height: 18px;
  color: #3878C0;
  margin-top: .15rem;
}
.branch-ico svg { width: 18px; height: 18px; display: block; }
.branch-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; overflow-wrap: anywhere; }
.branch-meta a { color: var(--p-navy-700); font-weight: 600; }
.branch-cta {
  margin-top: auto;
  align-self: center;
  min-height: 44px;
  padding-inline: 1.4rem;
  border-radius: 999px;
  background: #28588E;
}
.branch-cta:hover { background: #1B3A5C; }
@media (max-width: 1100px) { .branches-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .branches-grid { grid-template-columns: 1fr; } }

/* ===== Contact page mobile repair ===== */
.contact-page,
.contact-branches { overflow-x: hidden; }
.contact-page .container,
.contact-branches .container { min-width: 0; }
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.contact-info-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.2rem 1.1rem;
  text-align: start;
  min-width: 0;
  max-width: 100%;
}
.contact-info-card h2 { font-size: 1.02rem; margin: 0 0 .25rem; }
.contact-info-card p { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.contact-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--p-blue-100);
  color: var(--p-blue-600);
  font-size: 1.2rem;
  flex: 0 0 auto;
}
.contact-form-grid {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,.75fr);
  gap: 1.5rem;
  align-items: start;
}
.contact-form-card,
.contact-side-card,
.contact-form,
.form-grid,
.form-grid label { min-width: 0; max-width: 100%; }
.contact-form-card .form-grid { grid-template-columns: 1fr 1fr; }
.contact-page .span-2 { grid-column: 1 / -1; }
.contact-submit { min-height: 48px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  .contact-page .container,
  .contact-branches .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 16px !important;
  }
  .contact-info-grid,
  .contact-page .contact-info-grid {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
  }
  .contact-info-card,
  .contact-page .contact-info-card {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: .85rem !important;
    padding: 1rem !important;
  }
  .contact-form-grid,
  .contact-page .contact-form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
  .contact-side { position: static !important; width: 100% !important; }
  .contact-form-card .form-grid,
  .contact-page .form-grid,
  .contact-form .form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .85rem !important;
  }
  .contact-page .span-2,
  .contact-form-card .span-2 { grid-column: 1 / -1 !important; }
  .contact-form-card { padding: 1rem !important; }
  .contact-form-card h2 { font-size: 1.25rem !important; }
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    min-height: 48px !important;
    font-size: 16px !important;
  }
  .contact-form textarea { min-height: 140px !important; }
  .contact-submit,
  .contact-side-card .aside-actions .btn,
  .contact-page .btn {
    width: 100% !important;
    white-space: normal !important;
    justify-content: center;
  }
  .contact-page .section { padding: 2rem 0 !important; }
  .contact-branches .branches-grid {
    grid-template-columns: 1fr !important;
  }
  .page-banner { min-height: 180px !important; padding: 5.5rem 0 2rem !important; }
  .page-banner h1 { font-size: 1.6rem !important; overflow-wrap: anywhere; }
}

/* Lock layout to the real viewport — prevents zoomed-out "huge screen" */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}
body { position: relative; }
.header {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  inset-inline: 0 !important;
}
.header-inner, .container, main, .footer, .section {
  max-width: 100%;
  min-width: 0;
}
.nav { flex-wrap: wrap; }
@media (max-width: 1023px) {
  .nav { display: none !important; }
  .mobile-menu-btn { display: flex !important; }
  .header-inner { height: 64px !important; }
  .logo-img { height: 42px !important; max-width: 140px !important; }
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 16px !important;
  }
  .footer .footer-grid,
  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .footer-col, .footer-brand { min-width: 0 !important; max-width: none !important; }
}


/* Theme toggle — always visible */
.theme-toggle {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1.5px solid var(--p-navy-700) !important;
  color: var(--p-navy-700) !important;
  display: inline-grid !important;
  place-items: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: var(--shadow-sm);
}
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
[data-theme="dark"] .theme-toggle {
  background: var(--p-navy-800) !important;
  border-color: var(--p-teal-500) !important;
  color: var(--p-teal-500) !important;
}
[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* Hero text at the start of the screen */
.hero-slider {
  align-items: flex-start !important;
  padding-top: 0 !important;
  min-height: calc(100dvh - 80px);
}
.hero-slider .container {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(16px, 4vw, 48px) !important;
  margin: 0 !important;
}
.hero-slider .hero-content {
  max-width: 34rem !important;
  margin: 0 !important;
  margin-inline-start: 0 !important;
  padding: 2.2rem 0 3rem !important;
  text-align: start;
}
.hero-slider .hero-title,
.hero-slider h1,
.hero-slider .lead,
.hero-slider .hero-badge {
  margin-inline: 0 !important;
}
@media (min-width: 1200px) {
  .hero-slider .container { padding-inline: 10vw !important; }
}

/* Spec blocks refinement */
.service-spec { gap: 1.5rem; }
.spec-block {
  padding: 1.4rem 1.3rem 1.3rem;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--gradient-brand) border-box;
  border: 1px solid transparent;
}
.spec-features .spec-cards {
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .spec-features .spec-cards { grid-template-columns: 1fr 1fr; }
}
.spec-stepper li {
  position: relative;
  padding-bottom: .4rem;
}
.spec-stepper li:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 40px;
  inset-inline-start: 19px;
  width: 2px;
  height: calc(100% - 28px);
  background: var(--p-gray-100);
}
.spec-materials {
  background: var(--p-sand-100);
  border: 1px solid #ead9b8;
}
.spec-chips li {
  background: #fff;
  border: 1px solid #ead9b8;
  box-shadow: var(--shadow-sm);
}

.inline-upload-box {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(140px,.8fr) minmax(140px,.8fr) auto;
  gap: .8rem;
  align-items: end;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #8eb7df;
  border-radius: 12px;
  background: #f5faff;
}
.admin-hint { font-size: .88rem; color: #63788e; margin: 0 0 .8rem; }
@media (max-width: 800px) {
  .inline-upload-box { grid-template-columns: 1fr; }
}


/* ===== Pagination (admin + public) ===== */
.site-pagination { margin: 1.5rem 0 0; }
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}
.page-item { margin: 0; }
.page-link,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 .9rem;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: #fff;
  color: var(--p-navy-700);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
}
.page-link:hover { border-color: var(--p-teal-500); color: var(--p-teal-600); }
.page-item.active .page-link,
.pagination .active .page-link {
  background: var(--p-navy-700);
  border-color: var(--p-navy-700);
  color: #fff;
}
.page-item.disabled .page-link {
  opacity: .45;
  pointer-events: none;
}
.d-sm-none .pagination { display: none !important; }
nav.d-flex .small.text-muted { display: none !important; }

/* ===== Spec blocks more professional ===== */
.service-spec { gap: 1.75rem; }
.spec-block header { display: flex; flex-direction: column; gap: .2rem; margin-bottom: 1.15rem; }
.spec-block h2 { font-size: 1.35rem; }
.spec-features .spec-cards {
  grid-template-columns: 1fr;
  gap: .65rem;
}
@media (min-width: 720px) {
  .spec-features .spec-cards { grid-template-columns: 1fr 1fr; }
}
.spec-cards li {
  background: #fff;
  border: 1px solid var(--color-border-default);
  box-shadow: none;
  padding: 1rem 1rem;
  border-radius: 14px;
}
.spec-cards li:hover { border-color: rgba(79,193,176,.45); }
.spec-steps { background: #fff; }
.spec-stepper { gap: 0; }
.spec-stepper li {
  grid-template-columns: 48px minmax(0,1fr);
  padding: .85rem 0;
  border-bottom: 1px solid var(--color-border-default);
}
.spec-stepper li:last-child { border-bottom: 0; }
.spec-stepper li:not(:last-child)::before { display: none; }
.step-num {
  width: 36px; height: 36px;
  font-size: .85rem;
}
.spec-materials { background: #fff; border: 1px solid var(--color-border-default); }
.spec-chips { gap: .6rem; }
.spec-chips li {
  background: var(--p-sand-100);
  color: var(--p-navy-700);
  border: 1px solid #ead9b8;
  font-weight: 700;
}

/* ===== Admin design-system overlay ===== */
.admin-body {
  font-family: var(--font-ar), Tajawal, sans-serif !important;
  background: var(--p-gray-50);
  color: var(--p-navy-700);
}
.admin-body h1, .admin-body h2, .admin-body h3 {
  font-family: var(--font-display), "IBM Plex Sans Arabic", sans-serif;
  color: var(--p-navy-700);
}
.admin-sidebar { background: var(--p-navy-800); }
.admin-sidebar nav a.active,
.admin-sidebar nav a:hover { background: var(--p-teal-500); color: var(--p-navy-800); }
.admin-eyebrow { color: var(--p-teal-600) !important; }
.admin-body .btn,
.admin-body .btn-primary,
.admin-body .btn-secondary,
.admin-body .btn-ghost,
.admin-body .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 40px;
  padding: .45rem .95rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .86rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.admin-body .btn-sm { min-height: 36px; padding: .35rem .75rem; font-size: .8rem; }
.admin-body .btn-primary { background: var(--p-navy-700); color: #fff; border-color: var(--p-navy-700); }
.admin-body .btn-primary:hover { background: var(--p-navy-800); }
.admin-body .btn-secondary { background: var(--color-feedback-success-bg); color: var(--p-navy-700); border-color: rgba(79,193,176,.35); }
.admin-body .btn-ghost { background: #fff; color: var(--p-navy-700); border-color: var(--color-border-default); }
.admin-body .btn-danger { background: #fff; color: #9b2c3c; border-color: #f0c9cf; }
.admin-body .btn-danger:hover { background: #9b2c3c; color: #fff; }
.row-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.admin-body .status {
  display: inline-flex;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.status-published { background: var(--color-feedback-success-bg); color: var(--p-teal-600); }
.status-draft { background: var(--p-sand-100); color: var(--p-sand-600); }
.status-scheduled { background: var(--p-blue-100); color: var(--p-blue-600); }
.admin-filters { border-color: var(--color-border-default) !important; border-radius: 16px !important; }
.table-wrap { border-color: var(--color-border-default) !important; border-radius: 16px !important; }
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  outline: 3px solid rgba(79,193,176,.25) !important;
  border-color: var(--p-teal-500) !important;
}

.lp-stats .info-card{background:#fff;border:1px solid var(--color-border-default);border-radius:16px;padding:1rem 1.1rem;display:grid;gap:.25rem}
.lp-stats .info-card span{color:var(--color-text-muted);font-size:.8rem}
.lp-stats .info-card strong{color:var(--p-navy-700);font-size:1.45rem}
