/* Abdullah Plumbing - Mobile-first, no overflow, fast */
:root {
  --primary: #1a365d;
  --primary-dark: #0f2744;
  --accent: #c9a227;
  --text: #1a202c;
  --text-light: #4a5568;
  --bg: #fff;
  --bg-alt: #f7fafc;
  --bg-dark: #1a365d;
  --border: #e2e8f0;
  --whatsapp: #25d366;
  --call: #2b6cb0;
  --radius: 8px;
  --shadow: 0 1px 6px rgba(0,0,0,.08);
  --max: 1100px;
  --hh: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--primary); color: #fff;
  padding: .7rem 1rem; z-index: 10000; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; box-shadow: var(--shadow);
  height: var(--hh); width: 100%;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 .6rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  width: 100%;
}

.logo-link {
  display: flex; align-items: center; gap: .4rem;
  flex-shrink: 1; min-width: 0; overflow: hidden;
}
.logo-link img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.logo-text {
  font-weight: 700; font-size: .8rem; color: var(--primary);
  line-height: 1.15; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 100px;
}
.logo-text span { display: none; }

.main-nav { display: none; }

.header-actions {
  display: flex; align-items: center; gap: .3rem; flex-shrink: 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .3rem; padding: .55rem .7rem;
  font-weight: 600; font-size: .8rem;
  border-radius: var(--radius); border: none; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  min-height: 42px; transition: background .15s;
}
.btn:active { opacity: .9; }

.btn-call { background: var(--call); color: #fff; }
.btn-call:hover { background: #2c5282; color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #1a202c; }
.btn-accent:hover { background: #b8911f; color: #1a202c; }
.btn-outline {
  background: transparent; border: 2px solid var(--primary); color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: .45rem .6rem; font-size: .75rem; min-height: 38px; }
.btn-dev { background: #4a5568; color: #fff; }
.btn-dev:hover { background: #2d3748; color: #fff; }

.menu-toggle {
  display: flex; flex-direction: column; justify-content: center;
  gap: 4px; background: none; border: none; padding: .5rem;
  cursor: pointer; min-width: 42px; min-height: 42px;
}
.menu-toggle span {
  display: block; width: 20px; height: 2.5px;
  background: var(--primary); border-radius: 2px;
}

/* Mobile menu */
.mobile-nav {
  display: none; position: fixed;
  top: var(--hh); left: 0; right: 0; bottom: 0;
  background: #fff; z-index: 999;
  padding: .75rem 1rem 1.5rem;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav a {
  display: block; padding: .9rem .4rem;
  font-weight: 600; font-size: 1.05rem;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.mobile-nav .mobile-actions {
  margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem;
}
.mobile-nav .mobile-actions .btn {
  width: 100%; padding: .9rem; font-size: .95rem;
}

/* Sticky mobile CTA */
.mobile-cta-bar {
  display: flex; position: fixed;
  bottom: 0; left: 0; right: 0; z-index: 990;
  background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.1);
  padding: .4rem; gap: .4rem;
  padding-bottom: max(.4rem, env(safe-area-inset-bottom));
}
.mobile-cta-bar .btn {
  flex: 1; padding: .8rem .3rem; font-size: .9rem; min-height: 46px;
}

main { padding-bottom: 68px; width: 100%; overflow-x: hidden; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(145deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 1.5rem .75rem 2rem; text-align: center;
  width: 100%;
}
.hero-inner { max-width: var(--max); margin: 0 auto; width: 100%; }
.hero h1 {
  font-size: 1.25rem; line-height: 1.3; margin-bottom: .7rem; font-weight: 700;
  word-wrap: break-word; overflow-wrap: break-word;
}
.hero .arabic-name { font-size: 1.1rem; margin-bottom: .3rem; display: block; }
.hero p {
  font-size: .92rem; opacity: .95; max-width: 100%;
  margin: 0 auto 1rem; word-wrap: break-word;
}
.hero-btns {
  display: flex; flex-direction: column; gap: .5rem;
  width: 100%; max-width: 280px; margin: 0 auto;
}
.hero-btns .btn { width: 100%; padding: .8rem; font-size: .95rem; }
.hero-meta {
  margin-top: 1rem; font-size: .8rem; opacity: .9;
  display: flex; flex-direction: column; gap: .25rem; align-items: center;
}

/* ===== SECTIONS ===== */
.section { padding: 1.5rem .75rem; width: 100%; overflow-x: hidden; }
.section-alt { background: var(--bg-alt); }
.container { max-width: var(--max); margin: 0 auto; width: 100%; }

.section h2 {
  font-size: 1.2rem; color: var(--primary);
  margin-bottom: .7rem; line-height: 1.3;
  word-wrap: break-word;
}
.section h3 {
  font-size: 1.05rem; color: var(--primary-dark);
  margin: 1.1rem 0 .4rem; word-wrap: break-word;
}
.section p {
  margin-bottom: .8rem; color: var(--text); font-size: .93rem;
  word-wrap: break-word; overflow-wrap: break-word;
}
.section ul, .section ol { margin: 0 0 .8rem 1.1rem; }
.section li { margin-bottom: .35rem; font-size: .93rem; }

/* Cards */
.cards {
  display: grid; gap: .85rem; margin-top: 1rem;
  width: 100%;
}
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem;
  box-shadow: var(--shadow); width: 100%;
  overflow: hidden;
}
.card h3 { margin-top: .4rem; font-size: 1rem; }
.card img {
  border-radius: 6px; margin-bottom: .5rem;
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  background: #edf2f7;
}
.card p { font-size: .88rem; margin-bottom: 0; }

/* CTA */
.cta-block {
  background: var(--primary); color: #fff;
  padding: 1.25rem .85rem; border-radius: var(--radius);
  text-align: center; margin: 1.25rem 0; width: 100%;
}
.cta-block h2, .cta-block h3 { color: #fff; margin-bottom: .4rem; font-size: 1.15rem; }
.cta-block p { opacity: .95; margin-bottom: .85rem; font-size: .92rem; }
.cta-block .btn { margin: .25rem; min-width: 120px; width: auto; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: .85rem 0; }
.faq-item h3 { font-size: .95rem; margin: 0 0 .3rem; color: var(--primary); }
.faq-item p { margin: 0; color: var(--text-light); font-size: .9rem; }

/* Contact box */
.contact-box {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
  width: 100%; overflow: hidden;
}
.contact-box p { margin-bottom: .4rem; font-size: .92rem; word-wrap: break-word; }
.contact-box strong { color: var(--primary); }

/* Map */
.map-wrap {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin: 1rem 0;
  aspect-ratio: 4/3; max-height: 240px; width: 100%;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Breadcrumbs */
.breadcrumbs {
  padding: .55rem .75rem; font-size: .78rem;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  width: 100%; overflow-x: auto;
}
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs span { color: var(--text); }

/* Developer center */
.dev-center {
  text-align: center; padding: 1.25rem .75rem;
  background: #edf2f7; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); width: 100%;
}
.dev-center p { font-size: .85rem; color: var(--text-light); margin-bottom: .6rem; }
.dev-center .btn-dev {
  min-width: 180px; padding: .75rem 1.1rem; font-size: .9rem;
}

/* Footer */
.site-footer {
  background: var(--bg-dark); color: #e2e8f0;
  padding: 1.5rem .75rem 1rem; font-size: .85rem; width: 100%;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: 1.4rem; width: 100%;
}
.footer-brand h3 { color: #fff; font-size: 1rem; margin-bottom: .35rem; }
.footer-brand .ar-name { font-size: .9rem; margin-bottom: .5rem; color: var(--accent); }
.footer-brand p { margin-bottom: .3rem; opacity: .9; word-wrap: break-word; }

.footer-links h4 { color: #fff; font-size: .9rem; margin-bottom: .5rem; }
.footer-links ul { list-style: none; }
.footer-links a {
  color: #cbd5e0; display: block; padding: .25rem 0; min-height: 34px;
}
.footer-links a:hover { color: var(--accent); }

.footer-map {
  max-height: 160px; border-radius: var(--radius); overflow: hidden; width: 100%;
}
.footer-map iframe { width: 100%; height: 160px; border: 0; }

.footer-bottom {
  max-width: var(--max); margin: 1.4rem auto 0;
  padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.15);
  text-align: center; font-size: .78rem; opacity: .85;
}
.footer-bottom .btn-dev { margin-top: .7rem; display: inline-flex; }

/* ===== TABLET 768+ ===== */
@media (min-width: 768px) {
  :root { --hh: 68px; }
  .menu-toggle { display: none; }
  .main-nav { display: block; }
  .mobile-cta-bar { display: none; }
  main { padding-bottom: 0; }

  .logo-text { max-width: none; font-size: .92rem; }
  .logo-text span {
    display: inline; font-size: .78rem; font-weight: 500;
    color: var(--text-light); margin-left: .2rem;
  }

  .main-nav ul { list-style: none; display: flex; gap: .1rem; }
  .main-nav a {
    display: block; padding: .45rem .65rem; font-weight: 600;
    font-size: .85rem; color: var(--text); border-radius: var(--radius);
  }
  .main-nav a:hover, .main-nav a.active {
    background: var(--bg-alt); color: var(--primary);
  }

  .hero { padding: 2.5rem 1.25rem 3rem; text-align: left; }
  .hero h1 { font-size: 1.7rem; }
  .hero .arabic-name { font-size: 1.3rem; }
  .hero p { margin-left: 0; font-size: 1rem; }
  .hero-btns {
    flex-direction: row; flex-wrap: wrap; max-width: none;
    margin: 0; justify-content: flex-start;
  }
  .hero-btns .btn { width: auto; min-width: 130px; }
  .hero-meta {
    flex-direction: row; flex-wrap: wrap; gap: 1rem; justify-content: flex-start;
  }

  .cards { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .section { padding: 2.25rem 1.25rem; }
  .section h2 { font-size: 1.5rem; }
  .map-wrap { aspect-ratio: 16/9; max-height: 320px; }

  .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-map { grid-column: 1 / -1; max-height: 190px; }
  .footer-map iframe { height: 190px; }
  .dev-center { padding: 1.5rem 1.25rem; }
}

/* ===== DESKTOP 1024+ ===== */
@media (min-width: 1024px) {
  .header-inner { padding: 0 1.2rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .footer-map { grid-column: auto; max-height: 190px; }
  .hero { padding: 3rem 1.5rem 3.5rem; }
  .hero h1 { font-size: 1.9rem; }
  .section { padding: 2.75rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .site-header, .mobile-cta-bar, .btn, .site-footer, .dev-center { display: none !important; }
  main { padding-bottom: 0; }
}
