/*
Theme Name: الفريد لتأجير المعدات
Theme URI: https://alfareed.local
Author: Alfareed
Description: قالب مخصص لموقع الفريد لتأجير المعدات الثقيلة - ثنائي اللغة (عربي/إنجليزي)
Version: 1.0.0
Text Domain: alfareed
*/

/* ============ Design Tokens ============ */
:root {
  --navy: #12233e;
  --navy-dark: #0b1830;
  --navy-light: #1c3a63;
  --orange: #159089;
  --orange-dark: #0f7269;
  --white: #ffffff;
  --gray-light: #f4f6f9;
  --gray: #6b7686;
  --gray-dark: #2a2f3a;
  --border: #e3e7ee;
  --success: #1e8e5a;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 12px 40px rgba(11, 37, 69, 0.14);
  --container: 1200px;
  --font-ar: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

html[lang^="ar"] body { font-family: var(--font-ar); }
html[lang^="en"] body { font-family: var(--font-en); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.35; color: var(--navy); font-weight: 700; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-alt { background: var(--gray-light); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head .eyebrow {
  display: inline-block; color: var(--orange); font-weight: 700;
  font-size: .85rem; letter-spacing: .04em; margin-bottom: 8px;
  text-transform: uppercase;
}
.section-head p { color: var(--gray); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700;
  border: 2px solid transparent; transition: all .2s ease; font-size: .95rem;
}
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: var(--orange-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-whatsapp { background: #25d366; color: var(--white); }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 18px; font-size: .85rem; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-topbar {
  background: var(--navy-dark); color: var(--white); font-size: .82rem;
}
.header-topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.header-topbar a { color: var(--white); opacity: .9; }
.header-topbar a:hover { opacity: 1; color: var(--orange); }
.topbar-contacts { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-contacts span { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch { display: flex; gap: 10px; }
.lang-switch a { font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.lang-switch a.active { background: var(--orange); color: var(--white); }

.header-main .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 24px; }
.site-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; color: var(--navy); flex-shrink: 0; }
.site-logo .logo-mark {
  width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--orange); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 900;
}
.site-logo img { max-height: 48px; width: auto; }

.primary-nav { display: flex; gap: 6px; }
.primary-nav a {
  padding: 10px 16px; border-radius: 8px; font-weight: 600; color: var(--gray-dark); font-size: .95rem;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--navy); background: var(--gray-light); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; background: none; border: none; width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span { width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; }

/* Off-canvas mobile menu */
.mobile-nav-panel {
  position: fixed; inset-inline-end: 0; top: 0; height: 100%; width: min(320px, 85vw);
  background: var(--white); z-index: 200; box-shadow: var(--shadow-lg);
  transform: translateX(110%); transition: transform .3s ease; overflow-y: auto;
}
html[dir="rtl"] .mobile-nav-panel { transform: translateX(-110%); }
.mobile-nav-panel.is-open { transform: translateX(0); }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.mobile-nav-close { background: none; border: none; font-size: 1.6rem; color: var(--navy); }
.mobile-nav-panel .primary-nav { flex-direction: column; padding: 12px; gap: 2px; }
.mobile-nav-panel .primary-nav a { padding: 14px 16px; display: block; }
.nav-overlay { position: fixed; inset: 0; background: rgba(7,26,51,.5); z-index: 199; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }

/* ============ Sticky Mobile Contact Bar ============ */
.mobile-sticky-bar {
  display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 150;
  background: var(--white); box-shadow: 0 -4px 20px rgba(0,0,0,.1);
  grid-template-columns: repeat(3, 1fr);
}
.mobile-sticky-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px; font-size: .72rem; font-weight: 700; color: var(--navy);
  border-inline-end: 1px solid var(--border);
}
.mobile-sticky-bar a:last-child { border-inline-end: none; }
.mobile-sticky-bar a.bar-whatsapp { color: #1ebe5b; }
.mobile-sticky-bar a.bar-quote { color: var(--orange); }
.mobile-sticky-bar .bar-icon { font-size: 1.2rem; }

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy) 60%, var(--navy-light));
  color: var(--white); padding: 72px 0 88px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset-inline-end: -10%; top: -20%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245,130,31,.25), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 18px; }
.hero p.lead { font-size: 1.1rem; opacity: .92; max-width: 540px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stats .stat-num { font-size: 1.9rem; font-weight: 800; color: var(--orange); }
.hero-stats .stat-label { font-size: .85rem; opacity: .85; }
.hero-stats .stat-qualifier { display: block; font-size: .68rem; font-weight: 600; color: rgba(255,255,255,.6); margin-top: 2px; }
.hero-visual { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 8px; }
.hero-visual .placeholder-img { border-radius: 8px; }

/* ============ Statistics band ============ */
.stats-band { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%); position: relative; overflow: hidden; }
.stats-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 15% 20%, rgba(21,144,137,.18), transparent 40%), radial-gradient(circle at 85% 80%, rgba(21,144,137,.14), transparent 45%);
  pointer-events: none;
}
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; z-index: 1; }
.stat-card-big {
  text-align: center; padding: 28px 14px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius);
  transition: transform .2s ease, background .2s ease;
}
.stat-card-big:hover { transform: translateY(-4px); background: rgba(255,255,255,.08); }
.stat-card-big .stat-number-big {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 900; color: var(--white);
  font-family: 'Poppins', sans-serif; line-height: 1;
}
.stat-card-big .stat-number-big .stat-plus { color: var(--orange); }
.stat-card-big .stat-title { margin-top: 10px; font-size: .92rem; font-weight: 700; color: rgba(255,255,255,.92); }
.stat-card-big .stat-badge { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.stat-card-big .stat-badge-target { background: rgba(21,144,137,.18); color: #5fd4cb; border: 1px solid rgba(21,144,137,.4); }
.stat-card-big .stat-badge-real { background: rgba(255,255,255,.14); color: var(--white); border: 1px solid rgba(255,255,255,.3); }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

/* ============ Cards ============ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card .card-media, .equipment-card .card-media { position: relative; aspect-ratio: 4/3; background: var(--gray-light); }
.card .card-body, .equipment-card .card-body { padding: 18px; }
.equipment-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.equipment-card .card-spec { color: var(--gray); font-size: .88rem; margin-bottom: 12px; }
.equipment-card .card-actions { display: flex; gap: 8px; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--orange); color: var(--white); position: absolute; top: 10px; inset-inline-start: 10px;
}
.badge-unavailable { background: var(--gray); }

.city-card { padding: 22px; text-align: center; }
.city-card .city-icon { font-size: 2rem; margin-bottom: 10px; }
.city-card h3 { margin-bottom: 4px; font-size: 1.05rem; }
.city-card p { color: var(--gray); font-size: .85rem; margin: 0; }

.placeholder-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gray-light), var(--border)); color: var(--gray);
  font-size: 2rem; font-weight: 800; min-height: 160px;
}

/* ============ Why us / features ============ */
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--gray-light);
  color: var(--orange); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.feature-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature-item p { color: var(--gray); margin: 0; font-size: .92rem; }

/* ============ Steps ============ */
.steps { display: flex; gap: 24px; counter-reset: step; }
.step { flex: 1; text-align: center; position: relative; }
.step .step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 14px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--gray); font-size: .88rem; }

/* ============ Testimonials ============ */
.testimonial-card { padding: 24px; }
.testimonial-stars { color: var(--orange); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial-text { font-style: italic; color: var(--gray-dark); margin-bottom: 14px; }
.testimonial-author { font-weight: 700; color: var(--navy); font-size: .9rem; }
.testimonial-role { color: var(--gray); font-size: .8rem; }

/* ============ FAQ Accordion ============ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: start; background: none; border: none; padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center; font-weight: 700;
  color: var(--navy); font-size: 1rem;
}
.faq-question .faq-icon { transition: transform .2s ease; color: var(--orange); font-size: 1.3rem; }
.faq-item.is-open .faq-question .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-answer-inner { padding-bottom: 18px; color: var(--gray); }
.faq-item.is-open .faq-answer { max-height: 400px; }

/* ============ Forms ============ */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .9rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: .95rem; background: var(--white);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--orange); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.quote-form-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; }

/* ============ Specs table ============ */
.specs-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table td { padding: 12px 0; }
.specs-table td:first-child { color: var(--gray); font-weight: 600; width: 40%; }
.specs-table td:last-child { color: var(--navy); font-weight: 700; }

/* ============ Filter bar ============ */
.filter-bar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 32px; }
.filter-bar form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filter-bar .form-row { margin: 0; flex: 1; min-width: 160px; }

/* ============ Breadcrumb ============ */
.breadcrumb { font-size: .85rem; color: var(--gray); padding: 16px 0; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .sep { margin: 0 6px; }

/* ============ Category pills ============ */
.category-group { margin-bottom: 40px; }
.category-group h3 { font-size: 1.3rem; margin-bottom: 18px; padding-inline-start: 14px; border-inline-start: 4px solid var(--orange); }
.pill-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 10px 20px; border-radius: 999px; background: var(--gray-light); border: 1.5px solid var(--border);
  font-weight: 700; font-size: .9rem; color: var(--navy); transition: all .15s ease;
}
.pill:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ============ Footer ============ */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.85); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { opacity: .85; font-size: .9rem; }
.footer-col a:hover { opacity: 1; color: var(--orange); }
.footer-about p { font-size: .88rem; opacity: .85; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; font-size: .83rem; opacity: .75;
}

/* ============ Map ============ */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ============ Static page content ============ */
.page-content { max-width: 820px; margin: 0 auto; }
.page-content h2 { margin-top: 1.6em; }
.page-content ul { list-style: disc; padding-inline-start: 1.4em; margin-bottom: 1em; }
.page-content ul li { margin-bottom: .4em; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .primary-nav, .header-actions .btn { display: none; }
  .menu-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-wrap: wrap; }
  .step { flex-basis: 45%; }
}
@media (max-width: 640px) {
  .mobile-sticky-bar { display: grid; }
  body { padding-bottom: 62px; }
  .section { padding: 44px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step { flex-basis: auto; }
  .hero { padding: 44px 0 64px; }
  .header-topbar .topbar-contacts { display: none; }
}
