/*
Theme Name: Finishing Company
Theme URI: https://finishing-company.net
Author: Finishing Company
Author URI: https://finishing-company.net
Description: ثيم ووردبريس احترافي مخصص لشركة تشطيبات — Finishing Company. متوافق مع أحدث إصدارات الووردبريس وجميع الإضافات مثل Rank Math و Classic Editor.
Version: 8.9.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finishing-company
Tags: right-to-left, custom-logo, custom-menu, featured-images, theme-options, translation-ready
*/

/* ===== CSS RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1B365D;
  --navy-dark: #112240;
  --navy-light: #2A4A7F;
  --gold: #C8963E;
  --gold-light: #D4AB5E;
  --gold-dark: #A67B2E;
  --cream: #FAF8F5;
  --light-bg: #F4F1EC;
  --white: #FFFFFF;
  --text-dark: #1A1A2E;
  --text-body: #3D3D50;
  --text-muted: #6B6B80;
  --whatsapp: #25D366;
  --whatsapp-dark: #1EBE57;
  --border: #E8E4DE;
  --shadow-sm: 0 2px 8px rgba(27,54,93,0.08);
  --shadow-md: 0 4px 20px rgba(27,54,93,0.12);
  --shadow-lg: 0 8px 40px rgba(27,54,93,0.16);
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  font-family: 'Cairo', sans-serif;
  color: var(--text-body);
  background: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
  max-width: 100%;
  direction: rtl;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul, ol { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== FLOATING WHATSAPP ===== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 999;
  width: 64px;
  height: 64px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
.whatsapp-float svg { width: 34px; height: 34px; fill: white; }

@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 8px 0;
  position: relative;
  z-index: 99;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a {
  color: var(--gold-light);
  font-weight: 600;
  direction: ltr;
}

/* ✓ v8.4: Sticky wrapper keeps top-bar + site-header visible together on scroll */
.fc-header-sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  padding: 12px 0;
  position: relative;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.site-logo img,
.site-logo .custom-logo {
  height: 52px;
  width: auto;
}
.logo-fallback {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.logo-icon {
  width: 52px;
  height: 52px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
}
.logo-text {
  min-width: 0;
  overflow: hidden;
}
.logo-text h1, .logo-text .site-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  margin: 0;
}
.logo-text h1 span, .logo-text .site-title span { color: var(--gold); }
.logo-text p, .logo-text .site-desc {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* Main Navigation */
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav ul { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.main-nav ul li { position: relative; }
.main-nav ul li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a,
.main-nav ul li.current_page_item a { color: var(--gold); }
.main-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 16px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}
.main-nav ul li a:hover::after,
.main-nav ul li.current-menu-item a::after { width: calc(100% - 32px); }

/* Sub-menu */
.main-nav ul li ul.sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px 0;
  display: none;
  z-index: 200;
  border: 1px solid var(--border);
}
.main-nav ul li:hover > ul.sub-menu { display: block; }
.main-nav ul li ul.sub-menu li a {
  padding: 8px 20px;
  font-size: 13px;
}
.main-nav ul li ul.sub-menu li a::after { display: none; }
.main-nav ul li ul.sub-menu li a:hover { background: var(--light-bg); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.btn-call {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.3s;
  direction: ltr;
  font-family: 'Cairo', sans-serif;
}
.btn-call:hover { background: var(--navy-light); color: white; }
.btn-call svg { width: 18px; height: 18px; fill: var(--gold); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== BUTTONS ===== */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  font-family: 'Cairo', sans-serif;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
  border: none;
  cursor: pointer;
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); transform: translateY(-2px); color: white; }
.btn-whatsapp svg { width: 22px; height: 22px; fill: white; }

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s;
  cursor: pointer;
}
.btn-gold:hover { background: var(--gold); color: var(--navy-dark); }

.btn-navy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn-navy:hover { background: var(--navy-light); color: white; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200,150,62,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content { color: white; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,150,62,0.15);
  border: 1px solid rgba(200,150,62,0.3);
  color: var(--gold-light);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1,
.hero h2 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
  color: white;
}
.hero h1 .gold,
.hero h2 .gold { color: var(--gold); }
.service-card h3 a { color: var(--navy); }
.service-card h3 a:hover { color: var(--gold); }
.hero-desc {
  font-size: 17px;
  line-height: 1.9;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-image-main {
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, rgba(200,150,62,0.2), rgba(27,54,93,0.3));
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid rgba(200,150,62,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  font-weight: 600;
}
.hero-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
  padding-bottom: 40px;
}
.hero-stat {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: white;
}
.hero-stat .num {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  display: block;
}
.hero-stat .label {
  font-size: 13px;
  opacity: 0.8;
  font-weight: 500;
}

/* ===== SECTION STYLES ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--light-bg); }
.section-dark { background: var(--navy-dark); color: white; }
.section-cream { background: var(--cream); }

.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-header .eyebrow::before,
.section-header .eyebrow::after {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--gold);
}
.section-header h2 {
  font-size: 34px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.4;
}
.section-dark .section-header h2 { color: white; }
.section-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.section-dark .section-header p { color: rgba(255,255,255,0.7); }

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-image {
  height: 400px;
  background: linear-gradient(135deg, var(--light-bg), var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-content h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.5;
}
.about-content h3 span { color: var(--gold); }
.about-content p {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 16px;
  color: var(--text-body);
}
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.about-feature .check {
  width: 28px;
  height: 28px;
  background: rgba(200,150,62,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transition: transform 0.3s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}
.service-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}
.service-card p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  transition: gap 0.3s;
}
.service-link:hover { gap: 12px; }

/* ===== AREAS ===== */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.area-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}
.area-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.area-icon {
  width: 52px;
  height: 52px;
  background: rgba(200,150,62,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
}
.area-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.area-card p {
  font-size: 12px;
  color: var(--text-muted);
}
a.area-card-link {
  text-decoration: none;
  display: block;
  color: inherit;
}
a.area-card-link:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
a.area-card-link:hover h3 {
  color: var(--gold);
}

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card { text-align: center; padding: 32px 20px; }
.why-icon {
  width: 68px;
  height: 68px;
  background: rgba(200,150,62,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 28px;
}
.why-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}
.why-card p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

/* ===== PORTFOLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.portfolio-item {
  height: 280px;
  background: linear-gradient(135deg, var(--light-bg), var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27,54,93,0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s;
  color: white;
}
.portfolio-overlay h4 { font-size: 16px; font-weight: 700; }
.portfolio-overlay p { font-size: 12px; opacity: 0.8; }

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
}
.testimonial-stars { color: var(--gold); font-size: 18px; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-card p {
  font-size: 14px;
  line-height: 2;
  color: var(--text-body);
  margin-bottom: 20px;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px;
  height: 44px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 16px;
}
.testimonial-name { font-weight: 700; color: var(--navy); font-size: 14px; }
.testimonial-loc { font-size: 12px; color: var(--text-muted); }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(200,150,62,0.08) 0%, transparent 60%);
  border-radius: 50%;
}
.cta-section h2 {
  font-size: 34px;
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
  position: relative;
}
.cta-section h2 span { color: var(--gold); }
.cta-section > .container > p {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  position: relative;
}
.cta-phone {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  direction: ltr;
  display: block;
  margin-bottom: 28px;
  position: relative;
  letter-spacing: 2px;
}
.cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ===== SEO ARTICLE ===== */
.article-section {
  padding: 70px 0;
  background: var(--cream);
  border-top: 3px solid var(--gold);
}
.article-content {
  max-width: 860px;
  margin: 0 auto;
}
.article-content h2 {
  font-size: 30px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.5;
}
.article-content h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin: 30px 0 14px;
}
.article-content p {
  font-size: 15px;
  line-height: 2.1;
  color: var(--text-body);
  margin-bottom: 16px;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 850px;
  margin: 0 auto;
}
.faq-item {
  background: var(--white);
  border-radius: 16px;
  margin-bottom: 16px;
  border: 2px solid transparent;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 12px rgba(27,54,93,0.06);
}
.faq-item:hover {
  box-shadow: 0 6px 24px rgba(27,54,93,0.12);
  transform: translateY(-2px);
}
.faq-item.active {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(200,150,62,0.15);
  transform: translateY(-2px);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  text-align: right;
  line-height: 1.7;
  gap: 16px;
  transition: all 0.3s;
}
.faq-question:hover {
  color: var(--gold-dark);
}
.faq-item.active .faq-question {
  color: var(--gold-dark);
  background: linear-gradient(135deg, rgba(200,150,62,0.06), rgba(200,150,62,0.02));
}
.faq-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  color: var(--gold);
  transition: all 0.4s;
}
.faq-item.active .faq-icon {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: white;
  transform: rotate(45deg);
  border-radius: 50%;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 28px;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 28px 28px;
}
.faq-answer p {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-body);
  background: linear-gradient(135deg, var(--light-bg), var(--cream));
  padding: 20px 24px;
  border-radius: 12px;
  border-right: 4px solid var(--gold);
  margin: 0;
}

/* ===== BLOG / ARCHIVE ===== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}
.posts-list { display: flex; flex-direction: column; gap: 30px; }
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s, transform 0.3s;
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.post-card-image {
  height: 220px;
  overflow: hidden;
  background: var(--light-bg);
}
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 28px; }
.post-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.post-card-meta span { display: flex; align-items: center; gap: 4px; }
.post-card h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.6;
}
.post-card h2 a:hover { color: var(--gold); }
.post-card .excerpt {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.post-card .read-more {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}
.post-card .read-more:hover { color: var(--gold-dark); }

/* ===== SINGLE POST ===== */
.single-post-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 60px 0 50px;
  text-align: center;
  color: white;
}
.single-post-header h1 {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.5;
  max-width: 800px;
  margin: 0 auto 16px;
}
.single-post-header .post-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  display: flex;
  gap: 20px;
  justify-content: center;
}
.single-content {
  max-width: none;
}
/* Only style elements NOT inside custom containers */
.single-content > h2,
.service-page-content > h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin: 32px 0 16px;
}
.single-content > h3,
.service-page-content > h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  margin: 26px 0 12px;
}
.single-content > p,
.service-page-content > p {
  font-size: 15px;
  line-height: 2.2;
  margin-bottom: 18px;
}
.single-content > img {
  border-radius: var(--radius);
  margin: 20px 0;
  max-width: 100%;
  height: auto;
}
.single-content > ul,
.single-content > ol,
.service-page-content > ul,
.service-page-content > ol {
  padding-right: 24px;
  margin-bottom: 18px;
  list-style: disc;
}
.single-content > ul > li,
.single-content > ol > li,
.service-page-content > ul > li,
.service-page-content > ol > li {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 6px;
}
.single-content > blockquote {
  border-right: 4px solid var(--gold);
  padding: 20px 24px;
  margin: 24px 0;
  background: var(--light-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ===== SIDEBAR ===== */
.sidebar { position: sticky; top: 100px; }
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}

/* WhatsApp Sidebar Widget */
.wa-sidebar {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: white;
  text-align: center;
}
.wa-sidebar h3 { color: var(--gold); border-bottom-color: rgba(255,255,255,0.1); }
.wa-sidebar p { font-size: 14px; margin-bottom: 18px; opacity: 0.9; }
.wa-sidebar .btn-whatsapp { width: 100%; justify-content: center; font-size: 14px; padding: 12px 20px; }

/* Recent Posts Widget */
.recent-post-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.recent-post-item:last-child { border-bottom: none; }
.recent-post-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--light-bg);
}
.recent-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-post-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.6;
  margin-bottom: 4px;
}
.recent-post-info h4 a:hover { color: var(--gold); }
.recent-post-info span { font-size: 11px; color: var(--text-muted); }

/* Sidebar Services Widget - fix link visibility */
.sidebar-widget .footer-links li { margin-bottom: 10px; }
.sidebar-widget .footer-links a {
  color: var(--navy) !important;
  font-size: 14px;
  font-weight: 600;
  display: block;
  padding: 8px 12px;
  background: var(--light-bg);
  border-radius: 8px;
  transition: all 0.3s;
}
.sidebar-widget .footer-links a:hover {
  color: var(--gold) !important;
  background: rgba(200,150,62,0.1);
}

/* Hide WordPress default widgets we don't need */
.widget_recent_posts,
.widget_recent_comments,
.wp-block-latest-posts,
.wp-block-latest-comments { display: none !important; }

/* ===== PAGE HEADER (for inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 60px 0 50px;
  text-align: center;
  color: white;
}
.page-header h1 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 12px;
}
.page-header p {
  font-size: 16px;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}
.breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 16px;
}
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== CONTACT PAGE ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.contact-info-icon {
  width: 56px;
  height: 56px;
  background: rgba(200,150,62,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.contact-info-card h4 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.contact-info-card p { font-size: 14px; color: var(--text-muted); }
.contact-info-card a { color: var(--gold); font-weight: 600; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--border);
}
.contact-form h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 24px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s;
  direction: rtl;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
}
.form-group textarea { height: 120px; resize: vertical; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer h4 {
  color: var(--gold);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
}
.site-footer p { font-size: 13px; line-height: 1.9; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.footer-links a:hover { color: var(--gold); }
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.footer-contact-item .icon { color: var(--gold); font-size: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--border);
  color: var(--navy);
  transition: all 0.3s;
}
.pagination a:hover { background: var(--gold); color: white; border-color: var(--gold); }
.pagination .current { background: var(--navy); color: white; border-color: var(--navy); }

/* ===== 404 ===== */
.page-404 { text-align: center; padding: 100px 0; }
.page-404 h1 { font-size: 120px; font-weight: 900; color: var(--gold); line-height: 1; }
.page-404 h2 { font-size: 28px; color: var(--navy); margin-bottom: 16px; }
.page-404 p { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; }

/* ===== WORDPRESS CORE CLASSES ===== */
.aligncenter { display: block; margin: 0 auto; }
.alignright { float: right; margin: 0 0 20px 20px; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--text-muted); text-align: center; padding: 8px 0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-item { margin: 0; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.wp-block-image img { border-radius: var(--radius); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin: 0 auto 36px; }
  .hero-btns { justify-content: center; }
  .hero-image-main { display: none; }
  .hero h2 { font-size: 34px; }
  .hero h1 { font-size: 34px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .areas-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { height: 300px; }
  .blog-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* ===== v8.9 RESPONSIVE FIXES ===== */
  
  /* Tighter container padding */
  .container { padding: 0 16px; }
  
  /* --- HEADER: shrink logo, hide subtitle, compact CTA --- */
  .site-header { padding: 10px 0; }
  .site-header .container { gap: 10px; }
  .site-logo { flex: 1; min-width: 0; gap: 8px; }
  .site-logo img,
  .site-logo .custom-logo {
    height: 40px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
  }
  .logo-icon {
    width: 42px;
    height: 42px;
    font-size: 13px;
  }
  .logo-text h1,
  .logo-text .site-title {
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
  .logo-text p, 
  .logo-text .site-desc { display: none; }
  .btn-call { padding: 8px 12px; font-size: 12px; }

  /* --- NAV: mobile menu overlay --- */
  .main-nav { display: none !important; }
  .main-nav.active {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    z-index: 9999;
    padding: 80px 24px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.active ul { flex-direction: column; }
  .main-nav.active ul li a {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    display: block;
  }
  .main-nav.active ul li ul.sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-right: 20px;
    display: block;
  }
  .menu-toggle { display: block; z-index: 10001; position: relative; padding: 6px; }
  .menu-toggle span {
    width: 24px;
    height: 2.5px;
    margin: 4px 0;
  }
  .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
  .header-cta .btn-call span { display: none; }

  /* --- HERO --- */
  .hero { padding: 50px 0 30px; }
  .hero h2, .hero h1 { font-size: 26px; }
  .hero-desc { font-size: 15px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-stat { padding: 14px 8px; }
  .hero-stat .num { font-size: 22px; }
  .hero-stat .label { font-size: 11px; }

  /* --- SECTIONS --- */
  .section { padding: 50px 0; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }

  /* --- CTA SECTION --- */
  .cta-section { padding: 50px 0; }
  .cta-section h2 { font-size: 22px; }
  .cta-section > .container > p { font-size: 14px; }
  .cta-phone { font-size: 26px; letter-spacing: 1px; }
  .btn-whatsapp, .btn-gold, .btn-navy { font-size: 14px; padding: 12px 24px; }

  /* --- ARTICLE CONTENT (page.php default template) --- */
  .article-content { font-size: 15px; }
  .article-content h2 { font-size: 22px; margin: 26px 0 14px; line-height: 1.5; }
  .article-content h3 { font-size: 18px; margin: 22px 0 10px; line-height: 1.6; }
  .article-content p { font-size: 15px; line-height: 2; }
  .article-section { padding: 40px 0; }

  /* --- SINGLE POST --- */
  .single-post-header { padding: 40px 0 30px; }
  .single-post-header h1 { font-size: 22px; line-height: 1.5; }
  .single-post-header .post-meta { flex-direction: column; gap: 8px; }
  .single-content > h2, .service-page-content > h2 { font-size: 20px; }
  .single-content > h3, .service-page-content > h3 { font-size: 17px; }
  .single-content > p, .service-page-content > p { font-size: 15px; }

  /* --- PAGE HEADER (inner pages) --- */
  .page-header { padding: 40px 0 30px; }
  .page-header h1 { font-size: 24px; }
  .page-header p { font-size: 14px; }

  /* --- BLOG CARDS --- */
  .post-card-image { height: 180px; }
  .post-card-body { padding: 20px; }
  .post-card h2 { font-size: 17px; }

  /* --- FAQ --- */
  .faq-question { font-size: 15px; padding: 18px 20px; }
  .faq-icon { width: 36px; height: 36px; min-width: 36px; font-size: 20px; }
  .faq-answer { padding: 0 20px; }
  .faq-item.active .faq-answer { padding: 0 20px 20px; }

  /* --- TESTIMONIALS --- */
  .testimonial-card { padding: 24px; }

  /* --- TOP BAR & OTHER --- */
  .top-bar { display: none; }
  .about-features { grid-template-columns: 1fr; }

  /* --- FLOATING WHATSAPP: smaller on mobile --- */
  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: 20px;
    left: 20px;
  }
  .whatsapp-float svg { width: 28px; height: 28px; }

  /* --- CTA BUTTONS: stack on mobile --- */
  .cta-btns { flex-direction: column; align-items: stretch; }
  .cta-btns .btn-whatsapp,
  .cta-btns .btn-gold,
  .cta-btns .btn-navy {
    width: 100%;
    justify-content: center;
    max-width: 320px;
    margin: 0 auto;
  }

  /* --- SIDEBAR: reset sticky on mobile --- */
  .sidebar { position: static; top: auto; }
}

@media (max-width: 480px) {
  /* Tighter container */
  .container { padding: 0 14px; }

  /* Header: even smaller */
  .site-logo img,
  .site-logo .custom-logo {
    height: 34px;
    max-width: 110px;
  }
  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }
  .logo-text h1,
  .logo-text .site-title {
    font-size: 12px;
  }
  .btn-call { padding: 7px 10px; font-size: 12px; }
  .btn-call svg { width: 16px; height: 16px; }

  /* Hero */
  .hero h1, .hero h2 { font-size: 22px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { padding: 16px; }
  .hero-stat .num { font-size: 26px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-btns .btn-whatsapp,
  .hero-btns .btn-gold,
  .hero-btns .btn-navy {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Sections */
  .section-header h2 { font-size: 20px; }
  .areas-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }

  /* CTA section */
  .cta-section h2 { font-size: 20px; }
  .cta-phone { font-size: 22px; }

  /* Article content */
  .article-content h2 { font-size: 20px; }
  .article-content h3 { font-size: 17px; }

  /* Single post */
  .single-post-header h1 { font-size: 20px; }
  .page-header h1 { font-size: 22px; }

  /* 404 */
  .page-404 h1 { font-size: 80px; }
  .page-404 h2 { font-size: 22px; }
}

/* =============================================
   v8.9.1 MOBILE OVERFLOW HOTFIX
   Aggressive rules to force ALL content to fit
   within mobile viewport — overrides any inline
   styles or plugin CSS that cause horizontal overflow
   ============================================= */

@media (max-width: 768px) {
  /* --- Force viewport containment at every level --- */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
  }

  /* --- All top-level layout containers --- */
  body > *,
  .container,
  .site-header,
  .fc-header-sticky,
  .top-bar,
  .hero,
  .section,
  .cta-section,
  .single-post-header,
  .page-header,
  .article-section,
  .site-footer,
  .fc-landing-header,
  .fc-landing-content,
  .fc-landing-footer,
  .fc-landing-article-hero,
  .fc-landing-article-featured,
  .fc-landing-article-content,
  main {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* --- Article content wrappers --- */
  .article-content,
  .single-content,
  .fc-article,
  .service-page-content,
  .fc-landing-article-main,
  .fc-landing-article-layout {
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* --- ALL direct children of article containers --- */
  .article-content > *,
  .single-content > *,
  .fc-article > *,
  .service-page-content > *,
  .fc-landing-article-main > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* --- Force images/media to fit (overrides inline width) --- */
  img,
  video,
  iframe,
  embed,
  object,
  picture,
  .wp-block-image,
  .wp-block-image img,
  figure,
  figure img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* --- Tables: make them horizontally scrollable if too wide --- */
  .article-content table,
  .single-content table,
  .fc-article table,
  .service-page-content table {
    max-width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* --- Break long words / URLs / long Arabic phrases --- */
  p, li, h1, h2, h3, h4, h5, h6, span, div, blockquote, a, strong, em {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100%;
  }

  /* --- Kill any element with inline width in content areas --- */
  .article-content [style*="width"],
  .single-content [style*="width"],
  .fc-article [style*="width"],
  .service-page-content [style*="width"],
  .fc-landing-article-main [style*="width"] {
    max-width: 100% !important;
    width: auto !important;
  }

  /* --- CTA blocks: force full width, no overflow --- */
  .fc-cta,
  .fc-cta-mini,
  .fc-highlight,
  .fc-tip,
  .fc-features,
  .fc-feature-card,
  .fc-steps,
  .fc-stats,
  .fc-stat,
  .fc-table-wrap {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* --- Prevent hero image and portfolio items from overflowing --- */
  .hero-image-main,
  .portfolio-item,
  .about-image,
  .post-card-image,
  .fc-landing-article-img {
    max-width: 100% !important;
  }

  /* --- Fixed-position elements (whatsapp float, sticky headers) --- */
  .whatsapp-float {
    max-width: 60px !important;
  }
}

/* Extra safety for very small screens */
@media (max-width: 480px) {
  html, body {
    font-size: 15px;
  }
  * {
    max-width: 100vw !important;
  }
  img {
    max-width: 100% !important;
  }
}
