/*
 * MedicalWay – Custom Header Redesign
 * File: custom-header.css
 * Upload to: /wp-content/uploads/medicalway-header/custom-header.css
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

/* ─── HIDE ONLY TOPBAR + LOGO AREA, KEEP NAV ────────────────── */
.site-header .topbar,
.site-header .header-inner {
  display: none !important;
}

/* Keep nav / pinning wrapper fully visible */
.site-header .bs-pinning-wrapper,
.site-header .main-menu-wrapper,
.site-header .main-menu-inner,
.site-header .main-menu-container,
.site-header #main-navigation {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
}

.site-header #main-navigation {
  display: flex !important;
}

/* ─── NEW HEADER WRAPPER ─────────────────────────────────────── */
#mw-new-header {
  font-family: 'Cairo', sans-serif !important;
  direction: rtl;
  width: 100%;
}

/* ─── ANNOUNCEMENT BAR ───────────────────────────────────────── */
#mw-announce {
  background: linear-gradient(90deg, #008f92, #00b5b8);
  color: #ffffff;
  font-family: 'Cairo', sans-serif !important;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  line-height: 1.5;
}

#mw-announce-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  flex: 1;
}

#mw-announce-left strong {
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

#mw-announce-date {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Cairo', sans-serif !important;
}

#mw-announce-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  line-height: 1;
}

#mw-announce-close:hover {
  background: rgba(255,255,255,0.38);
}

/* ─── MAIN HEADER BAR ────────────────────────────────────────── */
#mw-header-bar {
  background: #ffffff;
  box-shadow: 0 2px 16px rgba(0,181,184,0.1);
  padding: 0 28px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

/* Logo */
#mw-logo {
  text-decoration: none !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

#mw-logo img {
  height: 44px !important;
  width: auto !important;
  display: block !important;
  max-width: none !important;
}

/* Search bar */
#mw-search {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f2f7f7;
  border: 1.5px solid #ddeaea;
  border-radius: 50px;
  height: 46px;
  padding: 0 8px 0 16px;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-width: 0;
}

#mw-search:focus-within {
  border-color: #00b5b8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0,181,184,0.12);
}

#mw-search-icon {
  color: #9ab8b8;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

#mw-search:focus-within #mw-search-icon { color: #00b5b8; }

#mw-search-input {
  flex: 1 !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 13.5px !important;
  color: #1a2e2e !important;
  direction: rtl;
  min-width: 0;
  padding: 0 !important;
  height: auto !important;
}

#mw-search-input::placeholder { color: #9ab8b8 !important; }

#mw-search-btn {
  background: #00b5b8;
  border: none;
  color: #ffffff;
  border-radius: 50px;
  padding: 0 18px;
  height: 34px;
  font-family: 'Cairo', sans-serif !important;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

#mw-search-btn:hover { background: #008f92; transform: scale(1.03); }

/* CTA Button */
#mw-cta {
  display: flex !important;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, #7dc242 0%, #5fa030 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 14px;
  font-weight: 800;
  padding: 0 22px;
  height: 46px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(125,194,66,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

#mw-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(125,194,66,0.5);
  color: #ffffff !important;
}

#mw-cta-dot {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  flex-shrink: 0;
  animation: mwPulse 1.8s ease-out infinite;
}

@keyframes mwPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  #mw-header-bar { padding: 0 16px; gap: 12px; height: 60px; }
  #mw-logo img { height: 36px !important; }
  #mw-announce { padding: 7px 16px; font-size: 12px; }
  #mw-announce-date { display: none; }
}

@media (max-width: 600px) {
  #mw-header-bar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  #mw-search { order: 3; width: 100%; }
  #mw-cta { font-size: 13px; padding: 0 16px; height: 40px; }
}
