/*
Theme Name: Albarq Theme
Theme URI: https://albaarq.com
Author: Albarq Team
Author URI: https://albaarq.com
Description: قالب احترافي لشركة البرق للخدمات المنزلية - تنظيف، مكافحة حشرات، عزل، كشف تسربات. متوافق مع Rank Math SEO وWPCode وClassic Editor. RTL + سريع + قابل للتخصيص بالكامل.
Version: 8.0
Requires at least: 5.8
Tested up to: 6.5
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: albarq
Tags: rtl-language-support, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, custom-colors, theme-options, wide-blocks, block-styles
*/

/* ============================================
   1. CSS VARIABLES (Customizable from Customizer)
   ============================================ */
:root {
  --albarq-primary: #f47d02;
  --albarq-primary-dark: #d96a00;
  --albarq-primary-light: #ffa84d;
  --albarq-secondary: #0c2340;
  --albarq-cta: #25d366;
  --albarq-cta-dark: #1ebe5d;
  --albarq-bg: #ffffff;
  --albarq-fg: #0f172a;
  --albarq-muted: #64748b;
  --albarq-border: #e2e8f0;
  --albarq-card: #f8fafc;
  --albarq-radius: 14px;
  --albarq-shadow: 0 4px 20px rgba(15,23,42,.08);
  --albarq-shadow-lg: 0 12px 40px rgba(15,23,42,.12);
  --albarq-container: 1340px;
  --albarq-glass-bg: rgba(255,255,255,.75);
  --albarq-glass-border: rgba(255,255,255,.4);
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--albarq-fg);
  background: var(--albarq-bg);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--albarq-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--albarq-primary-dark); }
h1,h2,h3,h4,h5,h6 { font-family: 'Cairo', sans-serif; font-weight: 800; line-height: 1.3; margin: 0 0 .8em; color: var(--albarq-secondary); }
h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(24px, 4vw, 36px); }
h3 { font-size: clamp(20px, 3vw, 26px); }
p { margin: 0 0 1em; }
ul, ol { padding-right: 1.5em; }

/* ============================================
   3. LAYOUT
   ============================================ */
.albarq-container { max-width: var(--albarq-container); margin: 0 auto; padding: 0 20px; }
.albarq-section { padding: 70px 0; }
.albarq-section--alt { background: var(--albarq-card); }
.albarq-grid { display: grid; gap: 24px; }
.albarq-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.albarq-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.albarq-grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ============================================
   4. HEADER & NAV (Glass)
   ============================================ */
.albarq-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--albarq-glass-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--albarq-glass-border);
  box-shadow: var(--albarq-shadow);
}
.albarq-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: var(--albarq-container); margin: 0 auto; gap: 20px; }
.albarq-logo img { max-height: 56px; width: auto; }
.albarq-logo a { font-family: 'Cairo'; font-weight: 900; font-size: 24px; color: var(--albarq-primary); }
.albarq-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.albarq-nav a { color: var(--albarq-secondary); font-weight: 700; padding: 10px 14px; border-radius: 10px; font-size: 16px; }
.albarq-nav a:hover, .albarq-nav .current-menu-item > a { background: var(--albarq-primary); color: #fff; }
.albarq-nav .sub-menu, .albarq-nav .children {
  position: absolute; background: #fff; min-width: 220px; padding: 8px;
  border-radius: 12px; box-shadow: var(--albarq-shadow-lg);
  display: none; list-style: none; margin: 0;
}
.albarq-nav li { position: relative; }
.albarq-nav li:hover > .sub-menu, .albarq-nav li:hover > .children { display: block; }
.albarq-nav .sub-menu a { display: block; padding: 10px 14px; }
.albarq-cta-btn {
  background: var(--albarq-cta); color: #fff !important;
  padding: 11px 22px !important; border-radius: 30px !important;
  font-weight: 800; box-shadow: 0 4px 14px rgba(37,211,102,.4);
}
.albarq-cta-btn:hover { background: var(--albarq-cta-dark) !important; }

/* Mobile menu */
.albarq-menu-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--albarq-primary); color: #fff;
}
.albarq-menu-toggle svg { width: 24px; height: 24px; }

/* ============================================
   5. HERO
   ============================================ */
.albarq-hero {
  padding: 70px 0;
  background: linear-gradient(135deg, #fff7ec 0%, #ffe4c4 100%);
  position: relative; overflow: hidden;
}
.albarq-hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; max-width: var(--albarq-container); margin: 0 auto; padding: 0 20px; }
.albarq-hero h1 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 18px; }
.albarq-hero p.lead { font-size: 19px; color: var(--albarq-muted); margin-bottom: 28px; line-height: 1.9; }
.albarq-hero__buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.albarq-hero__img { border-radius: 20px; box-shadow: var(--albarq-shadow-lg); overflow: hidden; }
.albarq-hero__img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* ============================================
   6. BUTTONS
   ============================================ */
.albarq-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  font-weight: 800; font-size: 16px;
  border: 0; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.albarq-btn--primary { background: var(--albarq-primary); color: #fff; }
.albarq-btn--primary:hover { background: var(--albarq-primary-dark); color: #fff; transform: translateY(-2px); }
.albarq-btn--cta { background: var(--albarq-cta); color: #fff; }
.albarq-btn--cta:hover { background: var(--albarq-cta-dark); color: #fff; transform: translateY(-2px); }
.albarq-btn--outline { background: transparent; color: var(--albarq-secondary); border: 2px solid var(--albarq-secondary); }
.albarq-btn--outline:hover { background: var(--albarq-secondary); color: #fff; }

/* ============================================
   7. STATS (4 side-by-side on mobile too)
   ============================================ */
.albarq-stats { background: var(--albarq-secondary); padding: 50px 0; color: #fff; }
.albarq-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: var(--albarq-container); margin: 0 auto; padding: 0 20px; text-align: center; }
.albarq-stat__num { font-family: 'Cairo'; font-weight: 900; font-size: clamp(22px, 4vw, 42px); color: var(--albarq-primary-light); line-height: 1.1; }
.albarq-stat__label { font-size: clamp(11px, 2vw, 16px); opacity: .9; margin-top: 6px; }

/* ============================================
   8. CARDS / SERVICES
   ============================================ */
.albarq-card {
  background: #fff; border-radius: var(--albarq-radius);
  padding: 28px; box-shadow: var(--albarq-shadow);
  border: 1px solid var(--albarq-border);
  transition: all .3s;
}
.albarq-card:hover { transform: translateY(-6px); box-shadow: var(--albarq-shadow-lg); border-color: var(--albarq-primary); }
.albarq-card__icon {
  width: 70px; height: 70px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--albarq-primary), var(--albarq-primary-light));
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px;
}
.albarq-card__icon i { font-size: 32px; }
.albarq-card h3 { margin-bottom: 10px; }
.albarq-card p { color: var(--albarq-muted); font-size: 15px; }

/* ============================================
   9. PRICING
   ============================================ */
.albarq-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.albarq-price-card { background: #fff; border-radius: 18px; padding: 32px; border: 2px solid var(--albarq-border); position: relative; }
.albarq-price-card--featured { border-color: var(--albarq-primary); transform: scale(1.03); box-shadow: var(--albarq-shadow-lg); }
.albarq-price-card__badge { position: absolute; top: -14px; right: 24px; background: var(--albarq-primary); color: #fff; padding: 5px 16px; border-radius: 20px; font-size: 13px; font-weight: 800; }
.albarq-price-card .price { font-family: 'Cairo'; font-size: 44px; font-weight: 900; color: var(--albarq-primary); margin: 14px 0; }
.albarq-price-card ul { list-style: none; padding: 0; margin: 20px 0; }
.albarq-price-card li { padding: 8px 0; border-bottom: 1px solid var(--albarq-border); font-size: 15px; }
.albarq-price-card li::before { content: "✓ "; color: var(--albarq-cta); font-weight: 900; }

/* ============================================
   10. FAQ
   ============================================ */
.albarq-faq__item { background: #fff; border: 1px solid var(--albarq-border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.albarq-faq__q { padding: 18px 20px; font-weight: 800; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--albarq-secondary); font-size: 16px; }
.albarq-faq__q::after { content: "+"; font-size: 24px; color: var(--albarq-primary); transition: transform .2s; }
.albarq-faq__item.active .albarq-faq__q::after { transform: rotate(45deg); }
.albarq-faq__a { padding: 0 20px; max-height: 0; overflow: hidden; transition: all .3s; color: var(--albarq-muted); }
.albarq-faq__item.active .albarq-faq__a { max-height: 500px; padding: 0 20px 20px; }

/* ============================================
   11. CALCULATOR
   ============================================ */
.albarq-calc { background: linear-gradient(135deg, #fff 0%, #fff7ec 100%); border: 2px solid var(--albarq-primary); border-radius: 20px; padding: 32px; box-shadow: var(--albarq-shadow-lg); }
.albarq-calc h3 { color: var(--albarq-primary); }
.albarq-calc__field { margin-bottom: 18px; }
.albarq-calc__field label { display: block; font-weight: 700; margin-bottom: 8px; }
.albarq-calc__field input, .albarq-calc__field select { width: 100%; padding: 12px; border: 2px solid var(--albarq-border); border-radius: 10px; font-family: inherit; font-size: 16px; }
.albarq-calc__result { background: var(--albarq-secondary); color: #fff; padding: 20px; border-radius: 12px; margin-top: 20px; text-align: center; }
.albarq-calc__result .num { font-family: 'Cairo'; font-size: 32px; font-weight: 900; color: var(--albarq-primary-light); }

/* ============================================
   12. BLOG
   ============================================ */
.albarq-blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.albarq-post-card { background: #fff; border-radius: var(--albarq-radius); overflow: hidden; box-shadow: var(--albarq-shadow); transition: all .3s; }
.albarq-post-card:hover { transform: translateY(-4px); box-shadow: var(--albarq-shadow-lg); }
.albarq-post-card a.thumb { display: block; aspect-ratio: 16/10; overflow: hidden; }
.albarq-post-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.albarq-post-card:hover img { transform: scale(1.05); }
.albarq-post-card__body { padding: 22px; }
.albarq-post-card__cat { display: inline-block; background: rgba(244,125,2,.1); color: var(--albarq-primary); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.albarq-post-card h3 { font-size: 18px; margin-bottom: 8px; }
.albarq-post-card h3 a { color: var(--albarq-secondary); }
.albarq-post-card h3 a:hover { color: var(--albarq-primary); }
.albarq-post-card__meta { font-size: 13px; color: var(--albarq-muted); display: flex; gap: 14px; margin-top: 12px; }

/* Single post */
.albarq-single { max-width: 820px; margin: 0 auto; padding: 40px 20px; }
.albarq-single__hero { aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; margin-bottom: 28px; }
.albarq-single__hero img { width: 100%; height: 100%; object-fit: cover; }
.albarq-single h1 { margin-bottom: 16px; }
.albarq-single .content { font-size: 18px; line-height: 2; }
.albarq-single .content h2, .albarq-single .content h3 { margin-top: 1.5em; }
.albarq-single .content img { border-radius: 12px; margin: 20px 0; }

/* Share buttons - wrap, no overflow */
.albarq-share { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px; background: var(--albarq-card); border-radius: 12px; margin: 30px 0; align-items: center; }
.albarq-share__label { font-weight: 800; margin-left: 6px; width: 100%; margin-bottom: 6px; }
.albarq-share a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; color: #fff; font-size: 13px; font-weight: 700; }
.albarq-share .wa { background: #25d366; }
.albarq-share .tw { background: #0f172a; }
.albarq-share .fb { background: #1877f2; }
.albarq-share .tg { background: #0088cc; }
.albarq-share .cp { background: var(--albarq-muted); }

/* Author box */
.albarq-author { display: flex; gap: 16px; padding: 22px; background: var(--albarq-card); border-radius: 14px; margin-top: 28px; align-items: flex-start; }
.albarq-author__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--albarq-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Cairo'; font-weight: 900; font-size: 26px; flex-shrink: 0; }
.albarq-author h4 { margin: 0 0 6px; }
.albarq-author p { margin: 0; color: var(--albarq-muted); font-size: 14px; }

/* Reviews grid (article-end) */
.albarq-reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.albarq-review { background: #fff; border: 1px solid var(--albarq-border); border-radius: 14px; padding: 20px; }
.albarq-review__stars { color: #f59e0b; margin-bottom: 8px; }
.albarq-review__text { color: var(--albarq-fg); font-size: 14px; margin-bottom: 12px; }
.albarq-review__author { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.albarq-review__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--albarq-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* ============================================
   13. BOOKING FORM
   ============================================ */
.albarq-booking { background: linear-gradient(135deg, var(--albarq-secondary) 0%, #1e3a5f 100%); padding: 60px 0; color: #fff; }
.albarq-booking h2 { color: #fff; text-align: center; }
.albarq-booking__form { max-width: 700px; margin: 30px auto 0; background: #fff; padding: 30px; border-radius: 18px; }
.albarq-booking__form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.albarq-booking__form input, .albarq-booking__form select, .albarq-booking__form textarea {
  width: 100%; padding: 13px; border: 2px solid var(--albarq-border); border-radius: 10px;
  font-family: inherit; font-size: 16px; margin-bottom: 12px; color: var(--albarq-fg);
}
.albarq-booking__form button { width: 100%; }

/* ============================================
   14. FOOTER
   ============================================ */
.albarq-footer { background: var(--albarq-secondary); color: #cbd5e1; padding: 60px 0 20px; }
.albarq-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; max-width: var(--albarq-container); margin: 0 auto; padding: 0 20px; }
.albarq-footer h4 { color: #fff; margin-bottom: 16px; font-size: 18px; }
.albarq-footer ul { list-style: none; padding: 0; margin: 0; }
.albarq-footer li { padding: 5px 0; }
.albarq-footer a { color: #cbd5e1; }
.albarq-footer a:hover { color: var(--albarq-primary-light); }
.albarq-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 13px; max-width: var(--albarq-container); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.albarq-payments { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.albarq-payments span { background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 6px; font-size: 12px; }

/* ============================================
   15. ANIMATIONS
   ============================================ */
.albarq-fade-in { opacity: 0; transform: translateY(20px); transition: all .6s ease-out; }
.albarq-fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   16. RESPONSIVE
   ============================================ */
@media (max-width: 980px) {
  .albarq-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .albarq-nav { position: fixed; top: 0; right: -100%; width: 85%; max-width: 340px; height: 100vh; background: #fff; padding: 70px 20px 30px; transition: right .3s; box-shadow: -10px 0 40px rgba(0,0,0,.1); overflow-y: auto; z-index: 99; }
  .albarq-nav.is-open { right: 0; }
  .albarq-nav ul { flex-direction: column; gap: 4px; align-items: stretch; }
  .albarq-nav a { padding: 14px 16px; display: block; font-size: 17px; }
  .albarq-nav .sub-menu { position: static; box-shadow: none; padding: 0 0 0 16px; display: block; background: var(--albarq-card); border-radius: 8px; margin-top: 4px; }
  .albarq-hero__inner { grid-template-columns: 1fr; }
  .albarq-card__icon { width: 80px; height: 80px; }
  .albarq-card__icon i { font-size: 38px; }
  .albarq-booking__form .row { grid-template-columns: 1fr; }
  body { font-size: 17px; }
}
@media (max-width: 480px) {
  .albarq-section { padding: 50px 0; }
  .albarq-hero { padding: 50px 0; }
  .albarq-hero__buttons { flex-direction: column; }
  .albarq-hero__buttons .albarq-btn { width: 100%; justify-content: center; }
  .albarq-price-card--featured { transform: none; }
}

/* WordPress core classes */
.alignleft { float: right; margin: 0 0 15px 15px; }
.alignright { float: left; margin: 0 15px 15px 0; }
.aligncenter { display: block; margin: 15px auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute; left: -9999px; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
