/* ==========================================================================
   مقاول الرياض المتخصص لأعمال الدهانات والديكورات والترميم
   Master Stylesheet - Pure Vanilla CSS3 (Zero Dependencies)
   Mobile-First Architecture & Core Web Vitals Optimized
   ========================================================================== */

:root {
  --primary: #0b1329;
  --primary-light: #162244;
  --secondary: #1d4ed8;
  --secondary-hover: #1e40af;
  --accent: #0284c7;
  --cyan: #38bdf8;
  --bg-light: #f1f5f9;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --success: #16a34a;
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebd5a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(11,19,41,0.08);
  --shadow-lg: 0 10px 25px rgba(11,19,41,0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.25s ease-in-out;
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  direction: rtl;
}

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

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

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

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* --------------------------------------------------------------------------
   Top Urgency Notification Bar
   -------------------------------------------------------------------------- */
.top-urgency-bar {
  background: linear-gradient(90deg, #0b1329 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  text-align: center;
  position: relative;
  z-index: 1003;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.top-urgency-bar a {
  color: var(--cyan);
  text-decoration: underline;
  margin-right: 0.5rem;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1001;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.brand-wrapper img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 600;
  display: block;
}

.nav-desktop {
  display: none;
}

@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
}

.nav-link {
  font-weight: 600;
  color: var(--text-main);
  padding: 0.5rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

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

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.5rem 0.25rem;
}

.dropdown-btn svg {
  transition: transform 0.25s ease;
  width: 14px;
  height: 14px;
}

.dropdown.open .dropdown-btn svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  min-width: 260px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 0.5rem 0;
  z-index: 1002;
}

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

@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
  .dropdown:hover .dropdown-btn svg {
    transform: rotate(180deg);
  }
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--text-main);
  border-bottom: 1px solid #f8fafc;
}

.dropdown-item:hover {
  background-color: var(--bg-light);
  color: var(--secondary);
  padding-right: 1.25rem;
}

.header-cta-btn {
  display: none;
  background-color: var(--secondary);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .header-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Mobile Hamburger */
.mobile-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

@media (min-width: 992px) {
  .mobile-toggle {
    display: none;
  }
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* Mobile Drawer (Max 75% / 290px) */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 19, 41, 0.7);
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 290px;
  height: 100%;
  background-color: #ffffff;
  z-index: 1011;
  overflow-y: auto;
  box-shadow: -4px 0 15px rgba(0,0,0,0.15);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.drawer-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  border-bottom: 1px solid #f1f5f9;
}

.drawer-submenu {
  display: none;
  padding-right: 1rem;
  background-color: #f8fafc;
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
}

.drawer-submenu.open {
  display: block;
}

.drawer-sublink {
  display: block;
  padding: 0.5rem 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.drawer-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background-color: var(--bg-light);
}

/* --------------------------------------------------------------------------
   Hero Section with Readability Banner Overlay
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 480px;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  color: #ffffff;
  padding: 4rem 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 19, 41, 0.94) 0%, rgba(11, 19, 41, 0.85) 50%, rgba(29, 78, 216, 0.75) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

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

.hero-title {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: #e2e8f0;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary {
  background-color: var(--secondary);
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

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

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

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

.hero-features {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.hero-features span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --------------------------------------------------------------------------
   Services Grid 2 (Strict Rule 8: 2 in row for desktop, 1 for mobile)
   -------------------------------------------------------------------------- */
.services-section {
  padding: 4rem 0;
  background-color: var(--surface);
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-tag {
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.services-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .services-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  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(--cyan);
}

.service-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  background-color: #e2e8f0;
  overflow: hidden;
}

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

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

.service-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(11, 19, 41, 0.85);
  color: var(--cyan);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

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

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

.service-card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  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 #f1f5f9;
  padding-top: 1rem;
}

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

/* --------------------------------------------------------------------------
   Why Choose Us & Highlights
   -------------------------------------------------------------------------- */
.why-us-section {
  padding: 4rem 0;
  background-color: var(--bg-light);
}

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

.feature-box {
  background-color: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background-color: rgba(2, 132, 199, 0.1);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Testimonials (Authentic Riyadh Dialect)
   -------------------------------------------------------------------------- */
.testimonials-section {
  padding: 4rem 0;
  background-color: var(--surface);
}

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

.testimonial-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.stars {
  color: #f59e0b;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.testimonial-quote {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
  font-style: normal;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.client-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.client-info h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

.client-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Pricing Alert Box (Strict Rule 7)
   -------------------------------------------------------------------------- */
.price-notice-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-right: 4px solid var(--success);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #14532d;
  margin: 1.5rem 0 2.5rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   CRO Fast Lead Form (.ajax-lead-form) - Before Footer
   -------------------------------------------------------------------------- */
.lead-form-section {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, var(--bg-light) 0%, #e2e8f0 100%);
}

.lead-form-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
  max-width: 840px;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .lead-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: #f8fafc;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--secondary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(90deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  border: none;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
}

.btn-submit:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.form-guarantee-note {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--primary);
  color: #cbd5e1;
  padding: 4rem 0 1.5rem;
  border-top: 3px solid var(--secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

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

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.footer-contact-item svg {
  flex-shrink: 0;
  color: var(--cyan);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

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

/* --------------------------------------------------------------------------
   Floating CTA Buttons (Strict Rule 3: Pulse Shake on Right)
   -------------------------------------------------------------------------- */
.floating-actions-right {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
  position: relative;
}

.float-btn.float-call {
  background-color: var(--secondary);
  color: #ffffff;
  animation: pulseShake 3.5s infinite;
}

.float-btn.float-wa {
  background-color: var(--whatsapp);
  color: #ffffff;
  animation: pulseShake 3.5s infinite 1.75s;
}

.float-btn:hover {
  transform: scale(1.1);
}

@keyframes pulseShake {
  0%, 100% { transform: scale(1) rotate(0deg); }
  10%, 30% { transform: scale(1.08) rotate(-4deg); }
  20%, 40% { transform: scale(1.08) rotate(4deg); }
  50% { transform: scale(1) rotate(0deg); }
}

/* Scroll To Top Button (Left Bottom) */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

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

.scroll-top-btn:hover {
  background-color: var(--secondary);
}
