
 /* =========================
   FONTS
========================= */

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

@font-face {
  font-family: "BahijTitr";
  src: url("/fonts/Bahij Titr-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "MSAbdali";
  src: url("/fonts/MSAbdali-Megasoft.ttf") format("truetype");
}

/* Reuse the existing face for Pashto paragraphs only. The compatibility
   override outranks legacy .pashto-font rules that also use !important. */
html[lang="ps"] body.pashto-font p {
  font-family: "MSAbdali", sans-serif !important;
}

/* =========================
   ROOT
========================= */
body {
  padding-top: 0 !important;
}
/* Keep the viewport as the sticky scroll container on every frontend page. */
body:has(> .site-header) {
  overflow-x: clip !important;
}

/* Both rows share one sticky box; their natural heights determine the stack. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1002;
  width: 100%;
  overflow: visible;
  transform: none;
  transition: none;
  animation: none;
}

.site-header > .header,
.site-header > .header-section {
  top: auto;
  transform: none;
  transition: none;
  animation: none;
}
:root {
  --brand-blue: #009fe3;
  --brand-green: #4cb648;
}
/* Top Bar */
.header {
  width: 100%;
  background: #090979;
  color: white;
  padding: 0.5rem 1rem; /* کم padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1000;
}

/* Left Side (Social Icons) */
.social-icons {
  display: flex;
  gap: 2rem;
}
.social-icons a {
  display: inline-block;
  font-size: 2rem;
  color: white;
  transition:
    transform 0.6s ease,
    color 0.3s ease;
  perspective: 600px;
  padding: 1px;
  margin-right: 5px;
}
.social-icons a i {
  display: inline-block;
  transition:
    transform 0.6s ease,
    color 0.3s ease,
    text-shadow 0.3s ease;
}
.social-icons a:hover i {
  transform: rotateY(180deg);
  color: #00d4ff;
}

/* Center Text */
.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
}
.header-center i {
  font-size: 1.4rem;
}
.animated-text {
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
}

/* The full message reserves its original dimensions and remains available to
   assistive technology. Only the aria-hidden overlay is animated. */
.site-header .header-center .animated-text {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: #f5faff;
  text-shadow: 0 0 12px #63d9ff26;
}
.site-header .header-center > .fa-hospital {
  color: #a4e9f1;
  filter: drop-shadow(0 0 4px #59d6f52b);
}
.site-header .animated-text .header-typing-accent {
  color: #a8f3d0;
  unicode-bidi: isolate;
  text-shadow: 0 0 8px #64e8b52e;
}
.site-header .animated-text[data-typing-active] .header-typing-source {
  opacity: 0;
}
.site-header .header-typing-live {
  display: none;
}
.site-header .animated-text[data-typing-active] .header-typing-live {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  white-space: pre;
  direction: inherit;
  unicode-bidi: isolate;
  max-width: 100%;
  font-size: .98em;
  opacity: 1;
  transition: opacity .18s ease;
}
.site-header .animated-text[data-typing-phase="deleting"] .header-typing-live { opacity: .86; }
.site-header .animated-text[data-typing-phase="pause"] .header-typing-accent { text-shadow: 0 0 9px #64e8b54d; }
.site-header .header-typing-live::after {
  content: "";
  flex: 0 0 1px;
  height: 1em;
  margin-inline-start: 1px;
  border-radius: 1px;
  background: #a8f3d0;
  box-shadow: 0 0 5px #64e8b566;
  animation: header-cursor-blink 1.15s ease-in-out infinite;
}
@keyframes header-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .animated-text[data-typing-active] .header-typing-source { opacity: 1; }
  .site-header .animated-text[data-typing-active] .header-typing-live { display: none; }
  .site-header .header-typing-live::after { animation: none; }
  .site-header .animated-text[data-typing-active] .header-typing-live { transition: none; }
}

/* Right Side Buttons */
.header-right-buttons {
  display: flex;
  gap: 1rem;
  margin-left: auto;
  margin-right: 20px;
}
.header .gray-tab {
  display: inline-flex;     
  align-items: center;      
  justify-content: center;   

  background: white;
  color: #009fe3;

  padding: 0.45rem 1rem;
  border-radius: 25px;
  border: none;

  font-weight: bold;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;

  cursor: pointer;
  transition: all 0.3s ease;

  line-height: 1;            /* د پورته تللو مخه نیسي */
  text-align: center;
}

.header .gray-tab:hover {
  background: linear-gradient(90deg, #4CB648 0%, #009FE3 100%);
  color: white;
  transform: scale(1.05);
}
/* Pashto font for menu and submenu */

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background-color: #f8f9fa;
  font-family: "BahijTitrBold", sans-serif;
}

.header-links a {
  margin-right: 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-family: sans-serif;
}

.header-links a:last-child {
  margin-right: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  width: 90px;
  height: 36px;
  font-size: 14px;
  border: none;
  background: var(--brand-blue);
  color: white; /* main text color */
  cursor: pointer;
  border-radius: 50px;
  font-weight: 600;
  font-family: "BahijTitrBold", sans-serif;
  position: relative;
  overflow: hidden;
  transition: all 0.8s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

  /* FORCE text color for all link states */
  color: white !important;
}

.lang-btn:link,
.lang-btn:visited,
.lang-btn:hover,
.lang-btn:active {
  color: white !important; /* ensures white in all states */
}

.lang-btn.pashto {
  font-family: "BahijTitr", sans-serif !important; /* force override */
}

.lang-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-20deg);
  transition: all 0.8s ease;
}

.lang-btn:hover::before {
  left: 100%;
  background: wheat;
}

.lang-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .header-links {
    margin-bottom: 10px;
  }

}
@media screen and (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    gap: 1rem;
  }

  .header-center {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    text-align: center;
    font-size: 0.9rem;
    flex: unset;
  }
 
  }

a.search-btn {
  background: white;
  color: #009fe3;
  padding: 0.65rem 1.2rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
  display: inline-block;
}

a.search-btn:hover {
  background: linear-gradient(90deg, #4cb648 0%, #009fe3 100%);
  color: white;
  transform: scale(1.05);
  text-decoration: none !important;
}
@media (max-width: 768px) {

  .header-right-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .language-select {
    display: flex;
    gap: 6px;
  }

  .search-btn,
  .gray-tab,
  .lang-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;

    height: 34px;
    padding: 0 14px;

    border-radius: 50px !important; /* دواړه طرفونه ګرد */

    overflow: hidden;
    white-space: nowrap;

    min-width: auto;
    width: auto;

    box-sizing: border-box;
  }

}
/* =========================
   HEADER WRAPPER
========================= */



.header-section {
  /* Anchor the mobile menu while the wrapper handles sticky positioning. */
  position: relative;
  width: 100%;
  height: 110px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
  z-index: 1001 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
/* English menu bold fix */
.en-bold a {
  font-weight: 600;
}

/* Optional: smooth look for menu items */

/* =========================
   LOGO SECTION
========================= */

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-img {
  height: 70px;
  width: 70px;          /* مهم: fixed square box */
  object-fit: contain;  /* مهم: crop نه کوي */

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 6px;         /* inside breathing space */

  background: #fff;     /* box clean ښکاره کوي */

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.12);

  border-radius: 10px;

}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-weight: bold;
}

.logo-text .s1 {
  font-size: 1.2rem;
  color: #8000ff;
    margin-bottom: 2px;
}

.logo-text .s2 {
  font-size: 1.05rem;
  color: #000;
  margin-bottom: 2px;
  line-height: 1.2;
}

.logo-text p {
  font-size: 0.9rem;
  text-align: center;
  background: linear-gradient(90deg, #0027e8, #ed0735);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  align-self: center;
  font-weight: 700;
  margin-top: 1px;
  margin-bottom: 0;
}

/* =========================
   MENU WRAPPER
========================= */

.header-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
    padding-right: 60px;
}

/* menu links */
.header-right > a,
.header-right .menu-item > a {
  text-decoration: none;
  color: #333;
  padding: 6px 10px;
  position: relative;
}

/* underline hover */
.submenu a {
  position: relative;
}

.submenu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* تر ټولو لاندې */
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-blue));

  border-radius: 0 0 8px 8px; /* ښکته دواړه کونجونه ګرد */

  transition: width 0.5s ease;
}

.submenu a:hover::after {
  width: 100%;
}
/* active */
a.active {
  background: #0d6efd;
  color: #fff !important;
  border-radius: 6px;
}

/* =========================
   DROPDOWN MENU
========================= */

.menu-item {
  position: relative;
}

/* SUBMENU */
.submenu {
  display: none;
  position: absolute;
  top: 100%;             
  left: 0;
  min-width: 250px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  flex-direction: column;
  z-index: 1000;
  margin-top: 6px;        
}

/* Desktop only hover */
@media (min-width: 993px) {
  .menu-item:hover .submenu {
    display: flex;
  }
}
.submenu {
  display: none;
}

.menu-item.active .submenu {
  display: flex;
}
/* LINKS */
.submenu a {
  padding: 8px 10px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #222 !important;
  border-radius: 6px;
  transition: all 0.3s ease;
}

/* HOVER EFFECT */
.submenu a:hover {
  background: linear-gradient(90deg, #0027e8, #ed0735);
  color: #fff !important;
}

/* =========================
   FULL RTL FIX (IMPORTANT)
========================= */

.ps-mode.header-section {
  direction: rtl;
  display: flex;
  justify-content: space-between;
}

/* logo always right */
/* Pashto + English SAME logo structure */
.header-left {
  display: flex;
  align-items: center;
  flex-direction: row;
}

/* Pashto mode ONLY alignment fix (NO flipping) */
.ps-mode .logo-text {
  text-align: right;
  align-items: flex-start;
}
/* menu always left */


/* submenu fix */
.ps-mode .submenu {
  left: auto;
  right: 0;
}


/* ensure image always comes first */
.ps-mode .header-left .logo-img {
  order: 0;
}

/* text always after image */
.ps-mode .header-left .logo-text {
  order: 1;
  text-align: right;
}


/* ONLY FIX: Logo order in Pashto mode */
.ps-mode .header-left {
  flex-direction: row;
}

/* logo image first (left side visually) */
.ps-mode .header-left .logo-img {
  order: 1;
}

/* text comes after logo */
.ps-mode .header-left .logo-text {
  order: 2;
}
/* ONLY FIX: keep logo always on RIGHT side in Pashto */
.ps-mode .header-section {
  direction: rtl;
}

/* force logo container to stay RIGHT */
.ps-mode .header-left {
  margin-left: auto;
  margin-right: 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

/* ensure image first then text (no flipping issues) */
.ps-mode .header-left .logo-img {
  order: 0;
}

.ps-mode .header-left .logo-text {
  order: 1;
  text-align: right;
}
/* mobile fix */


/* =========================
   HAMBURGER
========================= */

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: #333;
  border-radius: 2px;
  transition: 0.3s;
}

/* animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {

  .header-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .header-right {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    background: #3f99df;
    padding: 1rem;
  }

  .header-right.active {
    display: flex;
  }

  .hamburger {
    display: flex;
    position: absolute;
    right: 2rem;
    top: 1rem;
  }

  .submenu {
    position: relative;
    display: none;
    width: 100%;
    margin-top: 6px;
  }

  .menu-item.active .submenu {
    display: flex;
  }
}
@media (max-width: 768px) {

  /* 🔥 Logo image bigger but clean */
  .logo-img {
    height: 60px !important;
    width: 60px !important;
    padding: 4px !important;
  }

  /* 🔥 Keep text visible */
  .logo-text {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
  }

  /* 🔥 Proper mobile sizing */
  .logo-text .s1 {
    font-size: 1rem !important;
    font-weight: 700;
  }

  .logo-text .s2 {
    font-size: 0.85rem !important;
    font-weight: 600;
  }

  .logo-text p {
    font-size: 0.75rem !important;
  }

  /* 🔥 spacing fix */
  .header-left {
    gap: 8px !important;
  }
}

/* =========================
   PASHTO MOBILE HAMBURGER FIX
========================= */

@media (max-width: 992px) {

  .ps-mode .hamburger {
    left: 1rem !important;
    right: auto !important;
    top: 1rem;
  }

}
/* =========================
   ONLY TOP HEADER BUTTON FIX (MOBILE)
========================= */

@media (max-width: 768px) {

  /* یوازې top header buttons */
  .header .header-right-buttons {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }

  .header .header-right-buttons .language-select {
    display: flex;
    flex: 1;
    gap: 6px;
  }

  /* یوازې همدا 3 buttons */
  .header .header-right-buttons .search-btn,
  .header .header-right-buttons .gray-tab,
  .header .header-right-buttons .lang-btn {
    flex: 1;                 /* درې واړه برابر */
    width: 100%;
    min-width: 0 !important; /* مهم: overflow مخه نیسي */
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50px;
    white-space: nowrap;
  }
}
