/* ==========================================================================
   💬 زر التواصل العائم + قائمة السوشيال ميديا (Glassmorphism)
   ========================================================================== */

/* --- الزر العائم --- */
.chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 9999;
  font-family: 'Tajawal', sans-serif;
}

.chat-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0288D1, #002F6C);
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 47, 108, 0.5);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-toggle:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #00BFFF, #0288D1);
}

.chat-toggle svg {
  width: 30px;
  height: 30px;
  fill: white;
  transition: transform 0.4s ease;
}

/* Badge الإشعار */
.chat-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff3b30;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-badge.show {
  opacity: 1;
  transform: scale(1);
  animation: badgeBounce 0.6s ease-in-out;
}

@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* Tooltip "تبي مساعدة؟" */
.chat-tooltip {
  position: absolute;
  bottom: 50%;
  right: 75px;
  transform: translateY(50%) translateX(20px);
  padding: 12px 18px;
  background: #fff;
  color: #002F6C;
  border: 2px solid #00BFFF;
  border-radius: 25px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-tooltip::before {
  content: "👋 ";
  margin-left: 5px;
}

.chat-tooltip::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-left: 10px solid #fff;
}

.chat-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(50%) translateX(0);
}

/* --- القائمة المنبثقة الزجاجية --- */
.chat-menu {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 300px;
  padding: 20px;
  
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(25px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 20px 60px rgba(0, 47, 108, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transform-origin: bottom right;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-widget.open .chat-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* رأس القائمة */
.chat-menu-header {
  text-align: center;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.chat-menu-header h4 {
  margin: 0 0 5px 0;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chat-menu-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- أزرار الاتصال والواتساب --- */
.chat-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.chat-action:hover {
  transform: translateX(-5px);
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}

/* زر الاتصال (بدون رقم) */
.chat-action.call {
  color: #ffffff;
}

.chat-action.call .chat-action-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* إخفاء الرقم */
.chat-action.call .chat-action-subtitle {
  display: none !important;
}

/* زر الواتساب */
.chat-action.whatsapp {
  color: #ffffff;
}

.chat-action.whatsapp .chat-action-title {
  display: block;
  margin-bottom: 2px;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chat-action.whatsapp .chat-action-subtitle {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* الأيقونة الدائرية */
.chat-action-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.chat-action:hover .chat-action-icon {
  transform: rotate(15deg) scale(1.1);
}

.chat-action-icon svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.chat-action.call:hover .chat-action-icon {
  background: #ffffff;
}

.chat-action.call:hover .chat-action-icon svg {
  fill: #0288D1;
}

.chat-action.whatsapp:hover .chat-action-icon {
  background: #25D366;
}

/* --- منصات التواصل --- */
.chat-social-title {
  position: relative;
  margin: 15px 0 10px 0;
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chat-social-title::before,
.chat-social-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.chat-social-title::before { right: 0; }
.chat-social-title::after { left: 0; }

.chat-social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 5px;
}

.chat-social-item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-social-item:hover {
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.chat-social-item svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* ألوان المنصات */
.chat-social-item.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.chat-social-item.twitter { background: #000000; }
.chat-social-item.snapchat { background: #FFFC00; }
.chat-social-item.snapchat svg { fill: #000; }
.chat-social-item.tiktok { background: linear-gradient(135deg, #ff0050, #00f2ea); }
.chat-social-item.facebook { background: #1877f2; }

/* --- Overlay --- */
.chat-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chat-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* --- حالة الزر المفتوح --- */
.chat-widget.open .chat-toggle {
  background: linear-gradient(135deg, #ff5252, #c62828);
}

.chat-widget.open .chat-toggle svg {
  transform: rotate(180deg) scale(0.9);
}

/* --- التجاوب مع الجوال --- */
@media (max-width: 479px) {
  .chat-widget {
    bottom: 80px;
    right: 15px;
  }
  
  .chat-toggle {
    width: 52px;
    height: 52px;
  }
  
  .chat-toggle svg {
    width: 26px;
    height: 26px;
  }
  
  .chat-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  
  .chat-tooltip {
    right: 62px;
    padding: 10px 14px;
    font-size: 12px;
  }
  
  .chat-menu {
    width: calc(100vw - 30px);
    max-width: 320px;
    right: -5px;
    bottom: 65px;
  }
  
  .chat-social-item {
    width: 38px;
    height: 38px;
  }
  
  .chat-social-item svg {
    width: 18px;
    height: 18px;
  }
}

.promo-banner {
  display: block;
  width: 100%;
  max-width: 1440px;
  aspect-ratio: 1440 / 810;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.promo-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* إذا ما تبي أي قص للصورة، بدل cover إلى contain */
/* .promo-banner__img { object-fit: contain; } */

.promo-banner:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

.promo-banner.is-pressed {
  transform: scale(0.985);
  opacity: 0.98;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.promo-banner:focus-visible {
  outline: 3px solid #2b7cff;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .promo-banner {
    border-radius: 10px;
  }
}

.peurma-smooth-banner{
  display:block;
  width:100%;
  margin:0 auto;
  line-height:0;
  overflow:hidden;
  border-radius:8px;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.peurma-smooth-banner img{
  display:block;
  width:100%;
  height:auto;
  border-radius:8px;
}

.peurma-smooth-banner:active{
  opacity:.96;
}

.peurma-mobile-banner{
  display:block;
  width:100%;
  margin:0 auto;
  padding:0;
  line-height:0;
  overflow:hidden;
  background:transparent;
  -webkit-tap-highlight-color:transparent;
  touch-action:pan-y;
  user-select:none;
  -webkit-user-select:none;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  contain:paint;
}

.peurma-mobile-banner a{
  display:block;
  margin:0;
  padding:0;
  text-decoration:none;
}

.peurma-mobile-banner img{
  display:block;
  width:100%;
  height:auto;
  margin:0 auto;
  border:0;
  border-radius:10px;
  transform:translate3d(0,0,0);
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  image-rendering:auto;
}

/* تأثير خفيف جدًا بدون تقطيع */
.peurma-mobile-banner a:active img{
  opacity:.98;
}