/* Mobile-first professional styles for للتبريدوالتكييف */
:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --accent: #198754;
  --whatsapp: #25d366;
  --dark: #1a1a2e;
  --gray: #6c757d;
  --light: #f8f9fa;
  --white: #ffffff;
  --border: #dee2e6;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-width: 1140px;
  --header-h: 70px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.rtl {
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  direction: rtl;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
}

/* Header - Sticky, mobile-first, centered logo */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: var(--header-h);
  padding: 8px 0;
}

/* Left actions (Call + WA on larger screens) */
.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
}

/* Center logo + name */
.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.logo-area:hover { text-decoration: none; color: inherit; }

.logo-mark {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d6efd, #0a4da3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(13,110,253,0.35);
}
.logo-mark svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
body.rtl .logo-text { align-items: flex-end; text-align: right; }

.logo-name {
  font-size: clamp(0.9rem, 3.2vw, 1.2rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  word-break: break-word;
  max-width: 180px;
}
@media (min-width: 400px) {
  .logo-name { max-width: none; }
}

.logo-loc {
  font-size: 0.7rem;
  color: var(--gray);
  line-height: 1.2;
}

/* Right actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.btn-sm { padding: 6px 10px; font-size: 0.8125rem; }

.btn-call {
  background: var(--primary);
  color: var(--white);
}
.btn-call:hover { background: var(--primary-dark); color: var(--white); text-decoration: none; }

.btn-wa {
  background: var(--whatsapp);
  color: var(--white);
}
.btn-wa:hover { background: #1da851; color: var(--white); text-decoration: none; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); text-decoration: none; }

.lang-switch {
  display: flex;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.lang-switch a, .lang-switch button {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 4px 6px;
  font-size: inherit;
  font-weight: inherit;
}
.lang-switch a.active, .lang-switch button.active,
.lang-switch a:hover, .lang-switch button:hover {
  color: var(--primary);
}

.phone-display {
  display: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}

/* Hide left call buttons on very small screens to prevent overflow */
.header-left .btn { display: none; }

/* Nav toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--dark);
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.main-nav {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 8px 0;
}
.main-nav.open { display: block; }

.main-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.main-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--dark);
  font-weight: 500;
  border-radius: var(--radius);
}
.main-nav a:hover, .main-nav a.active {
  background: var(--light);
  color: var(--primary);
  text-decoration: none;
}

/* Tablet+ */
@media (min-width: 576px) {
  .header-left .btn { display: inline-flex; }
  .logo-mark { width: 46px; height: 46px; }
  .logo-mark svg { width: 28px; height: 28px; }
}

/* Desktop */
@media (min-width: 768px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
  }
  .nav-toggle { display: none; }
  .main-nav {
    display: block !important;
    grid-column: auto;
    width: auto;
    border: none;
    padding: 0;
    justify-self: center;
  }
  .main-nav ul {
    flex-direction: row;
    gap: 4px;
  }
  .main-nav a { padding: 8px 12px; }
  .phone-display { display: inline; }
  .logo-name { font-size: 1.25rem; max-width: none; }
  .logo-area { justify-content: flex-start; }
  .header-left { order: 0; }
  .logo-area { order: 0; }
  .header-actions { order: 0; }
}

@media (min-width: 992px) {
  .header-actions .btn-sm { padding: 8px 14px; font-size: 0.875rem; }
  .container { padding: 0 16px; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0d6efd 0%, #0a4da3 100%);
  color: var(--white);
  padding: 40px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}
.hero p {
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto 20px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.hero .btn-call, .hero .btn-wa { padding: 12px 20px; font-size: 1rem; }
.hero .btn-outline {
  border-color: var(--white);
  color: var(--white);
}
.hero .btn-outline:hover { background: var(--white); color: var(--primary); }

/* Sections */
section { padding: 40px 0; }
.section-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--gray);
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 576px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

.card-img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  background: var(--light);
}

.card-body { padding: 16px; }
.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.card-body p {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 12px;
}

/* Why choose */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 576px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}
.feature {
  text-align: center;
  padding: 20px 12px;
  background: var(--light);
  border-radius: var(--radius);
}
.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: 0.875rem; color: var(--gray); }

/* Problems list */
.problems {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 576px) {
  .problems { grid-template-columns: repeat(2, 1fr); }
}
.problem-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--light);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.problem-item::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Service areas */
.areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.area-tag {
  background: var(--light);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Info / NAP */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}
.info-box {
  background: var(--light);
  padding: 20px;
  border-radius: var(--radius);
}
.info-box h3 { margin-bottom: 12px; font-size: 1.1rem; }
.info-box p, .info-box a {
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.map-placeholder {
  background: #e9ecef;
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  text-align: center;
}
.map-placeholder a.btn { margin-top: 8px; }
.map-embed {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #e9ecef;
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
}
.map-embed-contact {
  margin-top: 24px;
  min-height: 320px;
}
.map-embed-contact iframe { min-height: 320px; }
.map-open-link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
.map-open-link:hover,
.map-open-link:focus-visible {
  background: var(--primary-dark);
  color: var(--white);
}
[dir="rtl"] .map-open-link {
  right: auto;
  left: 12px;
}

/* CTA band */
.cta-band {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 36px 0;
}
.cta-band h2 { margin-bottom: 8px; font-size: clamp(1.25rem, 3.5vw, 1.5rem); }
.cta-band p { opacity: 0.9; margin-bottom: 20px; }
.cta-band .hero-btns { justify-content: center; }

/* Services page */
.service-group {
  margin-bottom: 36px;
}
.service-group h2 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 576px) {
  .service-list { grid-template-columns: repeat(2, 1fr); }
}
.service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--light);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.service-item::before {
  content: "•";
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* About */
.about-content {
  max-width: 720px;
  margin: 0 auto;
}
.about-content p { margin-bottom: 16px; }
.about-content ul {
  margin: 16px 0;
  padding-left: 20px;
}
body.rtl .about-content ul { padding-left: 0; padding-right: 20px; }
.about-content li { margin-bottom: 8px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-info h2 { margin-bottom: 16px; }
.contact-info p { margin-bottom: 8px; }
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: inherit;
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button[type="submit"] {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #ccc;
  padding: 36px 0 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (min-width: 576px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.footer-brand .logo-name { color: var(--white); margin-bottom: 8px; }
.footer-brand p { font-size: 0.875rem; margin-bottom: 4px; }
.footer-brand a { color: #aad4ff; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #ccc; font-size: 0.875rem; }
.footer-col a:hover { color: var(--white); }
.footer-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.footer-bottom {
  border-top: 1px solid #333;
  padding: 16px 0;
  text-align: center;
  font-size: 0.8rem;
}
.footer-bottom a { color: #aad4ff; }

/* Developer credit - absolute bottom */
.dev-credit {
  background: #111;
  color: #888;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.75rem;
}
.dev-credit a { color: #25d366; }

/* Storefront ready */
.storefront {
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
}
.storefront-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #ddd;
  min-height: 180px;
}
.storefront-caption {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--gray);
  text-align: center;
}

/* Utility */
.bg-light { background: var(--light); }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 80px 16px;
}
.error-page h1 { font-size: 3rem; margin-bottom: 12px; }
