/* ==========================================================================
   الصفحة الرئيسية - تنسيق الواجهة (Homepage Layout)
   يعتمد على متغيرات style.css
   ========================================================================== */

.hp {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Section shell ---------- */
.hp-sec {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.hp-sec.hp-soft {
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
}

.hp-sec > *:last-child { margin-bottom: 0; }

/* ---------- Section header ---------- */
.hp-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
}

.hp-head h2,
.hp-ac-intro h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 900;
  line-height: 1.45;
  color: var(--text-heading);
  margin: 0 0 16px;
}

.hp-head h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: var(--primary-gradient);
}

.hp-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #0369a1;
  background: var(--primary-light);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: var(--radius-pill);
}

.hp-eyebrow a { color: inherit; }

.hp-lead {
  color: #475569;
  font-size: 16.5px;
  line-height: 1.95;
  margin: 0 0 8px;
}

.hp-lead em { font-style: normal; color: var(--primary); font-weight: 700; }
.hp-lead strong { color: var(--text-heading); }

.hp-center { text-align: center; margin-top: 36px; }

/* ---------- Buttons (variants) ---------- */
.hp .btn { margin: 8px 0 0; }

.hp .btn-lg { font-size: 17px; padding: 14px 40px; }

.hp .btn-light {
  background: #ffffff;
  color: var(--primary-dark) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  font-weight: 900;
}

.hp .btn-light:hover { color: var(--primary) !important; background: #f8fafc; }

.hp .btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
  box-shadow: none;
  padding: 9px 26px;
}

.hp .btn-outline:hover {
  background: var(--primary);
  color: #ffffff !important;
}

.hp .btn[href^="tel:"]::before { content: '📞'; font-size: 1.05em; }

/* ---------- Grids & cards ---------- */
.hp-grid { display: grid; gap: 24px; }
.hp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.hp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.hp-grid-4 { grid-template-columns: repeat(4, 1fr); }

.hp-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.hp-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-lg);
}

.hp-card h5 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0 0 10px;
  line-height: 1.5;
}

.hp-card h5 a { color: inherit; }
.hp-card h5 a:hover { color: var(--primary); }

.hp-card p {
  color: #64748b;
  font-size: 15px;
  line-height: 1.85;
  margin: 0;
}

/* ---------- Hero ---------- */
.hp-hero {
  background: var(--hero-gradient);
  border: none;
  padding: 88px 40px 80px;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 48px -12px rgba(11, 92, 173, 0.5);
}

.hp-hero::before,
.hp-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hp-hero::before {
  width: 520px; height: 520px;
  top: -220px; right: -160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}

.hp-hero::after {
  width: 420px; height: 420px;
  bottom: -220px; left: -120px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, transparent 70%);
}

.hp-hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }

.hp-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 900;
  line-height: 1.3;
  margin: 0 0 30px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

.hp-hero-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin: 0 auto 34px;
}

.hp-hero-points p { margin: 0; }

.hp-hero-points strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hp-hero-points strong::before {
  content: '✓';
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #38bdf8;
  color: #052649;
  font-size: 12px;
  font-weight: 900;
}

/* ---------- Services (4 cards with icons) ---------- */
.hp-service { text-align: center; align-items: center; }

.hp-service::before {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--primary-light);
  font-size: 30px;
  transition: var(--transition-smooth);
}

.hp-service:nth-child(1)::before { content: '🚚'; }
.hp-service:nth-child(2)::before { content: '❄️'; }
.hp-service:nth-child(3)::before { content: '🧽'; }
.hp-service:nth-child(4)::before { content: '🐜'; }

.hp-service:hover::before { background: var(--primary); transform: scale(1.06); }

/* ---------- Quick tiles ---------- */
.hp-tile {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 22px 24px 22px 56px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-right: 4px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition-smooth);
}

.hp-tile::after {
  content: '←';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-weight: 900;
  font-size: 18px;
  transition: var(--transition-smooth);
}

.hp-tile:hover { border-color: var(--card-border-hover); border-right-color: var(--primary); box-shadow: var(--shadow-md); }
.hp-tile:hover::after { left: 14px; }

.hp-tile h5 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
}

.hp-tile h5 a { color: inherit; }
.hp-tile h5 a::after { content: ''; position: absolute; inset: 0; } /* whole tile clickable */

.hp-tile p,
.hp-tile h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Feature cards (lists) ---------- */
.hp-feature h5 {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
  color: var(--primary);
}

.hp-feature ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.hp-feature li {
  position: relative;
  padding: 6px 30px 6px 0;
  color: #475569;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.7;
}

.hp-feature li::before {
  content: '✓';
  position: absolute;
  right: 0;
  top: 8px;
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.hp-feature .btn { align-self: flex-start; }

/* ---------- Photo cards ---------- */
.hp-photo { padding: 0; overflow: hidden; }

.hp-photo figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.hp-photo figure a,
.hp-photo figure img { display: block; width: 100%; height: 100%; }

.hp-photo figure img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hp-photo:hover figure img { transform: scale(1.06); }

.hp-photo-body { padding: 20px 22px 22px; text-align: center; }

.hp-photo-body h5 { margin-bottom: 4px; }

.hp-photo-body > p { margin-bottom: 16px; color: var(--primary); font-weight: 600; font-size: 14px; }

.hp-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.hp-socials .social {
  margin: 0;
  padding: 5px 12px;
  font-size: 12px;
  box-shadow: none;
}

/* ---------- AC + FAQ ---------- */
.hp-ac {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 44px;
  align-items: start;
}

.hp-ac-intro {
  position: sticky;
  top: 110px;
  padding: 32px 28px;
  background: var(--primary-subtle);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
}

.hp-ac-intro p:not(.hp-eyebrow) { color: #475569; line-height: 2; margin: 0; }
.hp-ac-intro a[href*="wa.me"] { margin-top: 6px; }

.hp-faq details {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin: 0 0 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.hp-faq details:last-child { margin-bottom: 0; }

.hp-faq details[open] {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px -6px rgba(11, 92, 173, 0.18);
}

.hp-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.hp-faq summary::-webkit-details-marker { display: none; }

.hp-faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: var(--transition-smooth);
}

.hp-faq details[open] summary { background: var(--primary-subtle); color: var(--primary); }
.hp-faq details[open] summary::after { content: '−'; background: var(--primary); color: #ffffff; }
.hp-faq summary:hover { color: var(--primary); }

.hp-faq details > *:not(summary) {
  margin: 0;
  padding: 0 22px 16px;
  color: #475569;
  line-height: 1.9;
  font-size: 15px;
}

.hp-faq details > summary + * { padding-top: 16px; }

.hp-faq details ul,
.hp-faq details ol { padding-right: 44px; }

.hp-faq details li { margin: 6px 0; }
.hp-faq details li::marker { color: var(--primary); font-weight: 800; }

/* ---------- Reviews ---------- */
.hp-review { position: relative; gap: 16px; }

.hp-review::after {
  content: '”';
  position: absolute;
  left: 22px;
  top: 4px;
  font-size: 84px;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--primary-light);
  pointer-events: none;
}

.hp-review-author { display: flex; align-items: center; gap: 14px; }

.hp-review-author figure { margin: 0; flex: none; }

.hp-review-author img {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--primary), 0 6px 14px rgba(11, 92, 173, 0.2);
}

.hp-review-author h5 { margin: 0; }

.hp-review > p {
  color: #334155;
  font-size: 15.5px;
  line-height: 1.95;
  position: relative;
  z-index: 1;
}

/* ---------- Trusted companies ---------- */
.hp-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 48px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.hp-trust-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  padding-left: 32px;
  border-left: 1px solid #cbd5e1;
  direction: ltr;
}

.hp-trust-num {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
}

.hp-trust-num span { color: var(--accent-gold); }

.hp-trust-label {
  order: 2;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hp-trust-logos {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 24px 36px;
}

.hp-trust-logos img {
  height: 36px;
  width: auto;
  max-width: 130px;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition-smooth);
}

.hp-trust-logos img:hover { filter: none; opacity: 1; transform: scale(1.08); }

/* ---------- Contact CTA ---------- */
.hp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 52px;
  background: var(--hero-gradient);
  border: none;
  color: #ffffff;
  overflow: hidden;
}

.hp-cta::before {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  top: -180px; left: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.hp-cta > * { position: relative; }

.hp-cta h4 { color: #ffffff; font-size: 1.7rem; font-weight: 900; margin: 0 0 6px; }
.hp-cta p { color: rgba(255, 255, 255, 0.85); margin: 0; font-size: 16px; }
.hp-cta .btn { margin: 0; flex: none; }

/* ---------- Blog posts ---------- */
.hp-post { padding: 0; overflow: hidden; }

.hp-post-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
}

.hp-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hp-post:hover .hp-post-img img { transform: scale(1.06); }

.hp-post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }

.hp-post-cat { list-style: none; padding: 0; margin: 0 0 10px; }

.hp-post-cat a {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
}

.hp-post h2 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.55;
  margin: 0 0 10px;
}

.hp-post h2 a { color: var(--text-heading); }
.hp-post h2 a:hover { color: var(--primary); }

.hp-post p { font-size: 14.5px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .hp-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
  .hp-sec { padding: 44px 28px; }
  .hp-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hp-ac { grid-template-columns: 1fr; gap: 28px; }
  .hp-ac-intro { position: static; }
  .hp-trust { flex-direction: column; text-align: center; padding: 36px 28px; }
  .hp-trust-count { padding: 0 0 20px; border-left: none; border-bottom: 1px solid #cbd5e1; }
  .hp-cta { flex-direction: column; text-align: center; padding: 40px 28px; }
}

@media (max-width: 640px) {
  .hp { gap: 20px; }
  .hp-sec { padding: 34px 18px; border-radius: var(--radius-md); }
  .hp-hero { padding: 56px 18px 52px; }
  .hp-hero-points { grid-template-columns: 1fr; }
  .hp-head { margin-bottom: 28px; }
  .hp-grid-2,
  .hp-grid-3,
  .hp-grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .hp-card { padding: 24px 20px; }
  .hp-photo,
  .hp-post { padding: 0; }
  .hp-cta h4 { font-size: 1.4rem; }
  .hp .btn-lg { width: 100%; padding: 14px 24px; }
}

.hp-tile:not(:has(a))::after { display: none; }

/* إصلاح زر الواتساب العائم (قاعدة a[href*="wa.me"] العامة كانت تضغط الأيقونة) */
.floating-btn.whatsapp { padding: 0; gap: 0; justify-content: center; }
.floating-btn.whatsapp::before { content: none; }
