/*
 * Theme Name:   Hamate Child
 * Theme URI:    https://hamategroup.com
 * Description:  قالب هامات الفرعي المبني على GeneratePress
 * Author:       Hamate Group
 * Author URI:   https://hamategroup.com
 * Template:     generatepress
 * Version:      1.0.0
 * Text Domain:  hamate-child
 */

/* ============================================================
   الاستيراد من القالب الأب — لا تحذف هذا السطر
   ============================================================ */
@import url("../generatepress/style.css");

/* ============================================================
   متغيرات التصميم
   ============================================================ */
:root {
  --primary:    #0B1F33;
  --primary-2:  #102C46;
  --primary-3:  #071727;
  --gold:       #C9A24D;
  --gold-2:     #E5C677;
  --white:      #FFFFFF;
  --light:      #F5F7FA;
  --text:       #2B2B2B;
  --muted:      #6B7280;
  --border:     #E5E7EB;
  --green:      #28C76F;
  --whatsapp:   #25D366;
  --shadow:     0 18px 48px rgba(11,31,51,.10);
  --shadow-strong: 0 30px 80px rgba(11,31,51,.22);
  --radius:     18px;
  --radius-sm:  12px;
}

/* ============================================================
   إعادة تعيين + أساسيات
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  font-family: "Tajawal", sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.en { font-family: "Montserrat", sans-serif; }

/* ============================================================
   HEADER — الحاوية الثابتة
   ============================================================ */
.hamate-header {
  position: fixed;
  top: 14px;
  right: 0;
  left: 0;
  z-index: 9999;
  transition: top .3s ease;
}

/* الشريط الداخلي */
.hamate-nav-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: auto;
  min-height: 76px;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(229,231,235,.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(11,31,51,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  transition: background .3s ease, border-color .3s ease, min-height .3s ease;
}

/* حالة Scrolled */
.hamate-header.scrolled .hamate-nav-wrap {
  min-height: 68px;
  background: rgba(11,31,51,.96);
  border-color: rgba(255,255,255,.10);
}

/* ============================================================
   LOGO
   ============================================================ */
.hamate-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  text-decoration: none;
}

.hamate-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
  transition: transform .3s ease;
}

.hamate-logo:hover img { transform: scale(1.07); }

.hamate-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.hamate-logo-text strong {
  font-size: 15px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: .5px;
  transition: color .3s ease;
}

.hamate-logo-text small {
  margin-top: 5px;
  font-size: 15px;
  font-weight: 900;
  color: var(--primary);
  transition: color .3s ease;
}

/* نصوص اللوجو عند الـ Scroll */
.hamate-header.scrolled .hamate-logo-text strong,
.hamate-header.scrolled .hamate-logo-text small {
  color: white;
}

/* ============================================================
   NAV MENU — القائمة الرئيسية
   ============================================================ */
.hamate-nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 800;
  color: var(--primary);
  font-size: 15px;
}

.hamate-header.scrolled .hamate-nav-menu {
  color: rgba(255,255,255,.82);
}

.hamate-nav-menu li a {
  position: relative;
  padding: 7px 0;
  transition: color .2s ease;
  color: inherit;
}

/* خط تحت الرابط عند الـ Hover */
.hamate-nav-menu li a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .25s ease;
}

.hamate-nav-menu li a:hover { color: var(--gold); }
.hamate-nav-menu li a:hover::after { width: 100%; }

/* الرابط النشط */
.hamate-nav-menu li.current-menu-item > a,
.hamate-nav-menu li.current-page-ancestor > a {
  color: var(--gold);
}
.hamate-nav-menu li.current-menu-item > a::after {
  width: 100%;
}

/* ============================================================
   POLYLANG — مبدّل اللغة
   ============================================================ */
.hamate-lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hamate-lang-switcher .lang-item {
  list-style: none;
}

.hamate-lang-switcher .lang-item a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid rgba(11,31,51,.18);
  transition: .2s ease;
  text-transform: uppercase;
}

.hamate-lang-switcher .lang-item a:hover,
.hamate-lang-switcher .lang-item.current-lang a {
  background: var(--gold);
  color: var(--primary);
  border-color: var(--gold);
}

.hamate-header.scrolled .hamate-lang-switcher .lang-item a {
  color: rgba(255,255,255,.82);
  border-color: rgba(255,255,255,.22);
}
.hamate-header.scrolled .hamate-lang-switcher .lang-item a:hover,
.hamate-header.scrolled .hamate-lang-switcher .lang-item.current-lang a {
  background: var(--gold);
  color: var(--primary);
  border-color: var(--gold);
}

/* ============================================================
   NAV ACTIONS — زر CTA
   ============================================================ */
.hamate-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamate-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--primary) !important;
  font-weight: 900;
  font-size: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
  white-space: nowrap;
  text-decoration: none;
}

.hamate-header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(201,162,77,.26);
}

/* ============================================================
   HAMBURGER — زر القائمة على الجوال
   ============================================================ */
.hamate-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.hamate-menu-toggle span,
.hamate-menu-toggle span::before,
.hamate-menu-toggle span::after {
  content: "";
  position: absolute;
  right: 11px;
  width: 22px;
  height: 2px;
  background: white;
  transition: .25s ease;
}
.hamate-menu-toggle span        { top: 21px; }
.hamate-menu-toggle span::before { top: -7px; right: 0; }
.hamate-menu-toggle span::after  { top:  7px; right: 0; }

/* تحويل إلى X عند الفتح */
.hamate-menu-toggle.open span        { background: transparent; }
.hamate-menu-toggle.open span::before { transform: rotate(45deg) translate(5px, 5px); }
.hamate-menu-toggle.open span::after  { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   RTL ← LTR — دعم اتجاه اللغة
   ============================================================ */
/* في حالة الإنجليزية (LTR) نعكس اتجاه الفلكس */
html[dir="ltr"] .hamate-nav-wrap {
  flex-direction: row-reverse;
}

html[dir="ltr"] .hamate-logo {
  flex-direction: row;
  min-width: auto;
}

html[dir="ltr"] .hamate-logo-text {
  text-align: left;
}

html[dir="ltr"] .hamate-nav-menu li a::after {
  right: auto;
  left: 0;
}

/* ============================================================
   RESPONSIVE — الاستجابة
   ============================================================ */
@media (max-width: 900px) {
  .hamate-nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(11,31,51,.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    font-size: 18px;
    color: white;
    transform: translateY(-105%);
    opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
    z-index: 9998;
  }

  .hamate-nav-menu.open {
    transform: translateY(0);
    opacity: 1;
  }

  .hamate-nav-menu li a { color: rgba(255,255,255,.88); }
  .hamate-nav-menu li a:hover { color: var(--gold); }

  .hamate-menu-toggle { display: flex; justify-content: center; align-items: center; }

  .hamate-header-btn { display: none; }

  .hamate-lang-switcher { display: none; }
}

@media (max-width: 680px) {
  .hamate-logo img {
    width: 40px;
    height: 40px;
  }
  .hamate-logo-text strong,
  .hamate-logo-text small {
    font-size: 13px;
  }
}

/* ============================================================
   دفع المحتوى لأسفل بحيث لا يختبئ تحت الهيدر الثابت
   ============================================================ */
body.has-hamate-header .site-main,
body.has-hamate-header #genesis-content,
body.has-hamate-header .entry-content:first-child {
  padding-top: 110px;
}
