/* Header */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:50;
  background:transparent;
  transition: background .25s ease, box-shadow .25s ease;
}

.site-header.scrolled{
  background:rgba(255,255,255,.94);
  box-shadow: 0 10px 26px rgba(2,6,23,.10);
  backdrop-filter: blur(10px);
}

.header-inner{
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
}

/* الجهة اليسرى من الهيدر */
.header-left{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.brand-logo{
  height:42px;
  width:auto;
}

/* رقم الهاتف بجانب اللوجو */
.header-phone{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.10);
  color:#fff;
  font-weight:700;
  font-size:14px;
  line-height:1;
  white-space:nowrap;
  transition:.2s;
  cursor:pointer;
}

.site-header.scrolled .header-phone{
  background:#fff;
  color:var(--text);
  border-color: var(--line);
}

.header-phone-ic{
  width:18px;
  height:18px;
  display:block;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24c1.12.37 2.33.57 3.58.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1C10.07 21 3 13.93 3 5a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.46.57 3.58a1 1 0 0 1-.24 1.01l-2.2 2.2z'/%3E%3C/svg%3E");
}

.site-header.scrolled .header-phone-ic{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f172a'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24c1.12.37 2.33.57 3.58.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1C10.07 21 3 13.93 3 5a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.46.57 3.58a1 1 0 0 1-.24 1.01l-2.2 2.2z'/%3E%3C/svg%3E");
}

/* مفتاح اللغة */
.lang-switcher{
  position:relative;
}

.lang-btn{
  display:flex;
  gap:10px;
  align-items:center;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.10);
  color:#fff;
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  transition:.2s;
}

.site-header.scrolled .lang-btn{
  background:#fff;
  color:var(--text);
  border-color: var(--line);
}

.flag{
  width:20px;
  height:14px;
  border-radius:3px;
  object-fit:cover;
}

.chev{
  opacity:.9;
  font-size:12px;
}

.lang-menu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:220px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow: var(--shadow);
  padding:8px;
  margin:0;
  list-style:none;
  display:none;
}

.lang-menu.open{
  display:block;
}

.lang-menu li{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:10px;
  cursor:pointer;
  color:var(--text);
  transition:background .2s;
}

.lang-menu li:hover{
  background:rgba(14,165,233,.08);
}

.lang-menu li.active{
  background:rgba(34,197,94,.10);
}

/* ========== تنسيقات العنوان ========== */

/* حاوية معلومات الاتصال */
.header-contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.site-header.scrolled .header-contact-info {
  border-left-color: rgba(15, 23, 42, 0.1);
}

/* تنسيق العنوان */
.header-address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.site-header.scrolled .header-address {
  color: var(--muted);
}

/* أيقونة العنوان */
.header-address-icon {
  width: 12px;
  height: 12px;
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.site-header.scrolled .header-address-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

/* نص العنوان */
.header-address-text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* تنسيق الهواتف */
.header-phones {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.site-header.scrolled .header-phones {
  color: var(--text);
}

.header-phone-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.header-phone-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.header-phone-sep {
  color: rgba(255, 255, 255, 0.4);
}

.site-header.scrolled .header-phone-sep {
  color: var(--line);
}

/* ========== تنسيقات سطح المكتب ========== */
@media (min-width: 1025px) {
  .header-contact-info {
    display: flex;
  }
}

/* ========== تنسيقات التابلت ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-contact-info {
    display: flex;
  }
  
  .header-address-text {
    max-width: 200px;
    font-size: 10px;
  }
  
  .header-phones {
    font-size: 11px;
  }
}

/* ========== تنسيقات المحمول ========== */
@media (max-width: 768px) {
  .header-inner {
    height: auto;
    min-height: 60px;
    padding: 8px 12px;
  }
  
  .header-left {
    flex: 1;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .brand-logo {
    height: 32px;
  }
  
  /* زر الهاتف المنفصل */
  .header-phone {
    padding: 6px 10px;
  }
  
  .header-phone-txt {
    display: none;
  }
  
  .header-phone-ic {
    width: 16px;
    height: 16px;
  }
  
  /* حاوية المعلومات تظهر في سطر منفصل أسفل الشعار */
  .header-contact-info {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-top: 6px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .site-header.scrolled .header-contact-info {
    border-top-color: rgba(15, 23, 42, 0.1);
  }
  
  /* إظهار العنوان في المحمول */
  .header-address {
    display: flex !important;
    font-size: 10px;
  }
  
  .header-address-text {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* الهواتف في سطر المعلومات */
  .header-phones {
    font-size: 10px;
  }
  
  .header-phone-link {
    font-size: 10px;
  }
  
  .header-phone-sep {
    display: inline;
  }
  
  /* مفتاح اللغة */
  .lang-btn {
    padding: 6px 10px;
  }
  
  .lang-code {
    font-size: 12px;
  }
  
  .flag {
    width: 18px;
    height: 12px;
  }
  
  .chev {
    font-size: 10px;
  }
}

/* ========== شاشات صغيرة جداً ========== */
@media (max-width: 480px) {
  .header-left {
    gap: 8px;
  }
  
  .brand-logo {
    height: 28px;
  }
  
  .header-phone {
    padding: 5px 8px;
  }
  
  .header-contact-info {
    gap: 8px;
    padding-top: 5px;
  }
  
  .header-address {
    font-size: 9px;
  }
  
  .header-address-text {
    max-width: 140px;
  }
  
  .header-phones {
    font-size: 9px;
    gap: 4px;
  }
  
  .header-phone-link {
    font-size: 9px;
  }
}

