/* ==========================================================================
   أثر الدار لتنفيذ الدهانات والديكورات والترميمات بالرياض
   Style Sheet - Luxury Charcoal & Champagne Gold (Modern Vanilla CSS)
   ========================================================================== */

/* 1. المتغيرات التصميمية والألوان الرئيسية */
:root {
  --primary: #18181b;         /* فحم غامق فاخر (Luxury Charcoal) */
  --primary-dark: #09090b;    /* خلفيات الهيدر والفوتر والدرجات العميقة */
  --primary-light: #27272a;   /* كروت وتفاصيل ثانوية */
  --secondary: #d97706;       /* ذهبي عنبري دافئ (Champagne Gold Dark) */
  --accent: #b45309;          /* برونزي عميق للتركيز والحواف */
  --gold: #fbbf24;            /* ذهبي براق للأيقونات والنجوم والعناوين */
  --gold-glow: rgba(251, 191, 36, 0.25);
  --bg-light: #fafaf9;        /* خلفية عامة مريحة للعين */
  --bg-surface: #ffffff;      /* خلفية البطاقات والأقسام البيضاء */
  --text-main: #18181b;       /* لون النصوص الأساسي */
  --text-muted: #52525b;      /* نصوص توضيحية وفرعية */
  --text-light: #f4f4f5;      /* نصوص على خلفيات غامقة */
  --border-light: #e4e4e7;
  --border-gold: rgba(217, 119, 6, 0.35);
  
  --whatsapp-color: #25d366;
  --whatsapp-hover: #1ebd5a;
  --phone-color: #0284c7;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 10px 25px rgba(24, 24, 27, 0.12);
  --shadow-gold: 0 8px 24px rgba(217, 119, 6, 0.25);

  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans Arabic", "Cairo", sans-serif;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
}

/* 2. التهيئة وضبط الأداء الأساسي */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-light);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* 3. معايير الهواتف المحمولة وقواعد التحويل الصارمة (CRO Buttons) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  /* المعايير الإلزامية لمنع قص النصوص على شاشات الجوال */
  white-space: normal !important;
  line-height: 1.35 !important;
  padding: 0.85rem 1.25rem !important;
  min-height: 50px !important;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: #ffffff !important;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e58a12 0%, var(--secondary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--secondary) 100%);
  color: var(--primary-dark) !important;
  font-weight: 800;
}

.btn-gold:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--gold);
  color: var(--gold) !important;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--gold);
  color: var(--primary-dark) !important;
}

.btn-whatsapp {
  background-color: var(--whatsapp-color);
  color: #ffffff !important;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-2px);
}

.btn-phone {
  background-color: var(--phone-color);
  color: #ffffff !important;
}

.btn-phone:hover {
  background-color: #0369a1;
  transform: translateY(-2px);
}

/* 4. شريط الإعلان العلوي والهيدر (Header & Luxury Nav) */
.top-bar {
  background-color: var(--primary-dark);
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.top-bar-links a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(24, 24, 27, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
  transition: var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  min-height: 72px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.header-logo img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--gold);
}

.header-logo-text {
  display: flex;
  flex-direction: column;
}

.header-logo-text .brand-title {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.header-logo-text .brand-subtitle {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 500;
}

/* القائمة الرئيسية - سطح المكتب */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: #e4e4e7;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold);
}

/* القائمة المنسدلة للخدمات في سطح المكتب */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--primary);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  min-width: 290px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  padding: 0.75rem 0;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1010;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #f4f4f5;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: rgba(217, 119, 6, 0.15);
  color: var(--gold);
  padding-right: 1.5rem;
}

/* زر الهمبرغر للجوال */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  cursor: pointer;
  width: 44px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--gold);
  border-radius: 2px;
  transition: var(--transition);
}

/* 5. قسم الهيرو العام (Hero Section Layout) */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 80% 20%, #27272a 0%, #18181b 100%);
  color: #ffffff;
  padding: 4rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 2px solid var(--border-gold);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm1 1h38v38H1V1z' fill='%23fbbf24' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(217, 119, 6, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 3.5vw + 1rem, 3.2rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.hero-title .highlight {
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow);
}

.hero-desc {
  font-size: 1.125rem;
  color: #d4d4d8;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #f4f4f5;
}

.trust-badge-item svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* نموذج طلب التسعير الفوري داخل الهيرو */
.quote-card {
  background: #ffffff;
  color: var(--text-main);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 2px solid var(--gold);
  position: relative;
}

.quote-card-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.quote-card-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.quote-card-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--primary-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #fafaf9;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* 6. كروت الخدمات والشبكات العامة */
.section {
  padding: 4.5rem 0;
}

.section-dark {
  background-color: var(--primary);
  color: #ffffff;
}

.section-title-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-subtitle {
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 2.5vw + 0.8rem, 2.5rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.35;
}

.section-dark .section-title {
  color: #ffffff;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: var(--bg-surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.service-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: #27272a;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

.service-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

.service-card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.read-more-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.read-more-link:hover {
  color: var(--accent);
}

/* 7. معرض الأعمال (Gallery & Portfolio) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
  background-color: #18181b;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 24, 27, 0.92) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  color: #ffffff;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

/* 8. الأسئلة الشائعة والأكورديون */
.faq-accordion {
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}

.faq-question svg {
  transition: transform 0.25s ease;
  color: var(--secondary);
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding-bottom: 1.25rem;
}

/* 9. الفوتر وتنسيقات الجوال المعتمدة (Footer & Local Cloud) */
.site-footer {
  background-color: var(--primary-dark);
  color: #a1a1aa;
  padding-top: 4.5rem;
  border-top: 3px solid var(--gold);
  /* مسافة أمان إجبارية في الجوال لمنع حجب الحقوق بالأزرار العائمة */
  padding-bottom: 130px !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 2px;
  background-color: var(--gold);
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: #a1a1aa;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--gold);
  padding-right: 0.35rem;
}

/* سحابة الأحياء المستهدفة في الرياض (Local SEO Cloud) */
.neighborhood-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.neighborhood-tag {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #d4d4d8;
}

.neighborhood-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.developer-signature {
  margin-top: 0.75rem;
  color: #71717a;
  font-size: 0.85rem;
}

.developer-signature a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}

/* 10. الأزرار العائمة الفاخرة (Floating Actions - Right & Left) */
.floating-actions-right {
  position: fixed;
  bottom: 25px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fab-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  text-decoration: none;
}

.fab-btn:hover {
  transform: scale(1.08);
}

.fab-whatsapp {
  background-color: var(--whatsapp-color);
  color: #ffffff;
  animation: pulse-gold 2.2s infinite;
}

.fab-call {
  background-color: var(--primary-dark);
  color: var(--gold);
  border: 2px solid var(--gold);
}

@keyframes pulse-gold {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* زر الصعود للأعلى يساراً */
.scroll-top-btn {
  position: fixed;
  bottom: 25px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--gold);
  color: var(--primary-dark);
}

/* 11. استجابة الهواتف والتجاوب الشامل (Mobile Navigation & Responsive) */
@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .menu-toggle {
    display: flex;
  }

  /* درج التنقل المتحرك في الجوال */
  .nav-menu {
    position: fixed;
    top: 72px;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: calc(100vh - 72px);
    background-color: var(--primary-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    border-left: 1px solid var(--border-gold);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    gap: 0.5rem;
    z-index: 1005;
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  /* نظام الأكورديون للخدمات في الجوال */
  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background-color: #27272a;
    border-radius: 6px;
    margin-top: 0.5rem;
    border: 1px solid rgba(251, 191, 36, 0.15);
    opacity: 1;
    transform: none;
  }

  .dropdown.mobile-open .dropdown-menu {
    display: block;
  }

  .dropdown > .nav-link {
    justify-content: space-between;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  .neighborhood-cloud {
    justify-content: center;
  }

  .top-bar-content {
    justify-content: center;
  }

  .hero-badges-row {
    justify-content: center;
  }
}
