/*
Theme Name: Webcom Gada
Theme URI: https://webcomeg.com
Author: Webcom للبرمجة
Author URI: https://webcomeg.com
Description: قالب وردبريس احترافي لخدمات جلي وتلميع الرخام بجدة - تصميم متجاوب عصري مع دعم كامل للغة العربية (RTL)
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: webcom-gada
Tags: rtl-language-support, custom-menu, featured-images, theme-options, translation-ready, blog, one-column, two-columns
*/

/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
  --primary: #1a365d;
  --primary-dark: #0f2744;
  --primary-light: #2a4a7a;
  --accent: #c9a227;
  --accent-hover: #b8911f;
  --gold: #d4af37;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #e9ecef;
  --gray: #6c757d;
  --dark: #212529;
  --text: #2c3e50;
  --success: #28a745;
  --whatsapp: #25d366;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --font-main: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --container: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button, .btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray);
}

/* ===========================
   Layout
   =========================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 4rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title p {
  max-width: 600px;
  margin-inline: auto;
  margin-top: 1rem;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-accent {
  background: var(--accent);
  color: var(--dark);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

/* ===========================
   Header
   =========================== */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo img {
  height: 50px;
  width: auto;
}

.site-logo .logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.site-logo .logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(26, 54, 93, 0.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
  direction: ltr;
}

.header-phone svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  padding: 0.5rem;
  color: var(--primary);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* ===========================
   Hero
   =========================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding-block: 5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ===========================
   Services
   =========================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-card .card-img {
  height: 200px;
  background: linear-gradient(135deg, #e0e7ef, #c5d0de);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.service-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card .card-img .placeholder-icon {
  font-size: 3.5rem;
  opacity: 0.4;
}

.service-card .card-body {
  padding: 1.5rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ===========================
   Features / Why Us
   =========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  color: var(--white);
  font-size: 1.75rem;
}

.feature-item h4 {
  margin-bottom: 0.5rem;
}

/* ===========================
   FAQ
   =========================== */
.faq-list {
  max-width: 800px;
  margin-inline: auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.15rem 1.5rem;
  background: none;
  text-align: right;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.faq-question:hover {
  background: rgba(26, 54, 93, 0.03);
}

.faq-question .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray);
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ===========================
   Locations
   =========================== */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.location-card {
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.location-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.location-card h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.location-card a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.location-card a:hover {
  color: var(--accent);
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding-block: 4rem;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  max-width: 550px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding-block: 3.5rem 0;
}

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

.footer-col h4 {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-col p,
.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.9;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 4px;
  fill: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.footer-bottom a {
  color: var(--accent);
  font-weight: 600;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ===========================
   Floating Contact
   =========================== */
.floating-contact {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: var(--transition);
  color: var(--white);
}

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

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

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

.float-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* ===========================
   Page Content
   =========================== */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding-block: 3rem;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.85;
}

.page-header .breadcrumb a {
  color: var(--accent);
}

.content-area {
  padding-block: 3rem;
}

.entry-content {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 900px;
  margin-inline: auto;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.75rem;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1rem;
  padding-inline-start: 1.5rem;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.4rem;
  color: var(--gray);
}

/* ===========================
   Blog / Articles
   =========================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-card .post-thumb {
  height: 180px;
  background: var(--light-gray);
  overflow: hidden;
}

.post-card .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card .post-body {
  padding: 1.35rem;
}

.post-card .post-meta {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.post-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.post-card h3 a:hover {
  color: var(--accent);
}

/* ===========================
   Privacy & Legal
   =========================== */
.legal-content h2 {
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 992px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--light-gray);
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--light-gray);
  }

  .menu-toggle {
    display: block;
  }

  .header-phone span {
    display: none;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 3rem;
  }

  .hero {
    padding-block: 3.5rem 3rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .floating-contact {
    bottom: 1rem;
    left: 1rem;
  }

  .float-btn {
    width: 50px;
    height: 50px;
  }

  .float-btn svg {
    width: 24px;
    height: 24px;
  }

  .footer-grid {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .header-inner {
    padding-block: 0.7rem;
  }

  .site-logo .logo-text {
    font-size: 1.05rem;
  }

  .entry-content {
    padding: 1.25rem;
  }
}

/* ===========================
   Utility
   =========================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-none { display: none; }

/* Print */
@media print {
  .site-header,
  .floating-contact,
  .cta-section,
  .site-footer {
    display: none;
  }
}
