/*
Theme Name: Sianat Fast Theme
Theme URI: https://saudi-insulation.com/
Author: Web Development Team
Description: قالب ووردبريس سريع لخدمات شركة صيانة المنزلية.
Version: 2.1.0
Requires PHP: 7.4
Text Domain: sianat-fast
*/

:root {
  --primary: #0b5ed7;
  --primary-dark: #084298;
  --call: #d32f2f;
  --whatsapp: #25d366;
  --dark: #212529;
  --light: #f8fafc;
  --border: #dee2e6;
  --white: #ffffff;
}

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

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  direction: rtl;
  text-align: right;
  background-color: var(--white);
  color: var(--dark);
  line-height: 1.6;
  padding-bottom: 65px;
}

@media (min-width: 992px) {
  body { padding-bottom: 0; }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }

.container, .wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center { text-align: center; }
.section-padding { padding: 50px 0; }
.bg-alt { background-color: var(--light); }

.grid {
  display: grid;
  gap: 20px;
}

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

.grid-cols-4 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* الهيدر والعلامة التجارية */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.top-bar {
  background: #f1f3f5;
  font-size: 0.85rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.top-phone {
  font-weight: bold;
  color: var(--primary);
  direction: ltr;
  display: inline-block;
}

.main-header { padding: 10px 0; }

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
}

.brand-title .main-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1.1;
}

.brand-title .sub-name {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: bold;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-list li {
  position: relative;
}

.nav-list a {
  display: block;
  font-weight: 600;
  color: var(--dark);
  padding: 8px 6px;
  transition: color 0.2s ease;
}

.nav-list a:hover {
  color: var(--primary);
}

/* القائمة المنسدلة */
.nav-list .sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border-radius: 8px;
  border-top: 3px solid var(--primary);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  z-index: 1000;
}

.nav-list .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-list .sub-menu a {
  padding: 10px 15px;
  font-size: 0.95rem;
  border-bottom: 1px solid #f1f3f5;
}

.nav-list .sub-menu a:hover {
  background-color: #eef5ff;
  color: var(--primary);
  padding-right: 20px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 4px 10px;
  font-size: 1.4rem;
  border-radius: 4px;
  cursor: pointer;
}

/* الأزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  color: #ffffff !important;
}

.btn-primary { background: var(--primary); }
.btn-call { background: var(--call); }
.btn-whatsapp { background: var(--whatsapp); }

.btn-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
  flex: 1;
}

.btn-pulse {
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

/* الهيرو */
.hero-section {
  background: linear-gradient(135deg, #0b5ed7, #052c65);
  color: #fff;
  padding: 60px 0;
}

.hero-section .badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 15px;
}

.hero-title {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 15px;
}

.hero-desc {
  max-width: 700px;
  margin: 0 auto 25px auto;
  font-size: 1.05rem;
  color: #e9ecef;
}

.hero-cta-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* كروت الخدمات والمدن */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.service-box .icon,
.city-box .city-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.service-box h3,
.city-box h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.service-box p,
.city-box p {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 15px;
}

.card-btn-wrap {
  display: flex;
  gap: 8px;
}

.city-call-link {
  color: var(--primary);
  font-weight: bold;
  display: inline-block;
  font-size: 0.95rem;
}

/* قسم من أعمالنا */
.sec { padding: 60px 0; }
.sec-deep {
  background-color: #f8fafc;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 15px;
  flex-wrap: wrap;
}

.sec-head h2 {
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: 6px;
}

.sec-sub {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.sec-head .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.sec-head .more:hover {
  transform: translateX(-4px);
}

/* شبكة المعرض */
.work {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}

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

@media (min-width: 992px) {
  .work { grid-template-columns: repeat(3, 1fr); }
  .work figure.wide { grid-column: span 2; }
}

.work figure {
  margin: 0;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1e293b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.work figure img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.work figure:hover img {
  transform: scale(1.04);
}

.work figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* خطوات كيف نشتغل */
.steps.h {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

@media (min-width: 992px) {
  .steps.h { grid-template-columns: repeat(4, 1fr); }
}

.steps.h li {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 20px;
  counter-increment: step-counter;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.steps.h li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
}

.steps.h li::before {
  content: counter(step-counter, decimal-leading-zero);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  opacity: 0.3;
  margin-bottom: 8px;
  line-height: 1;
}

.steps.h li strong {
  font-size: 1.15rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.steps.h li span {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.6;
}

/* المقالات والأسئلة والفوتر */
.blog-card {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.blog-thumb {
  margin-bottom: 15px;
  max-height: 200px;
  overflow: hidden;
  border-radius: 6px;
}

.blog-date {
  font-size: 0.8rem;
  color: #6c757d;
  display: block;
  margin-bottom: 6px;
}

.blog-title {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-title a:hover { color: var(--primary); }

.blog-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.read-more {
  color: var(--primary);
  font-weight: bold;
  font-size: 0.9rem;
}

.faq-wrap { max-width: 750px; }
.faq-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 12px 16px;
}

.faq-box summary {
  font-weight: bold;
  cursor: pointer;
}

.faq-box p {
  margin-top: 10px;
  color: #6c757d;
  font-size: 0.95rem;
}

.site-footer {
  background: #111417;
  color: #adb5bd;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
}

.footer-grid { gap: 25px; }

.footer-widget h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-links li { margin-bottom: 8px; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 15px 0;
  font-size: 0.85rem;
  text-align: center;
}

/* شريط الاتصال الثابت للموبايل */
.sticky-mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 56px;
  background-color: #ffffff;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
  z-index: 999999;
}

.sticky-mobile-bar .bar-btn {
  flex: 1;
  height: 44px;
  margin: 0 4px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff !important;
  text-decoration: none;
}

.sticky-mobile-bar .bar-call { background-color: var(--call) !important; }
.sticky-mobile-bar .bar-whatsapp { background-color: var(--whatsapp) !important; }

@media (min-width: 992px) {
  .sticky-mobile-bar { display: none !important; }
}

@media (max-width: 991px) {
  .top-bar, .header-action-desktop { display: none; }
  .mobile-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 15px;
  }
  .site-nav.active { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav-list .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-top: 5px;
    padding-right: 15px;
    width: 100%;
  }
}