
 /* ==========================================================
 * ASTI Global Layout
 * page.css
 * ----------------------------------------------------------
 * ==========================================================
 */

:root {
  --asti-green-950: #0b241a;
  --asti-green-900: #103426;
  --asti-green-800: #164633;
  --asti-green-700: #1f5d45;
  --asti-green-600: #2d7558;
  --asti-green-100: #e8f1ec;
  --asti-green-50: #f4f8f5;

  --asti-gold-600: #b78d43;
  --asti-gold-500: #c8a35d;
  --asti-gold-300: #e2cb99;

  --asti-white: #ffffff;
  --asti-page-bg: #f7f6f1;
  --asti-surface: #ffffff;
  --asti-text: #233029;
  --asti-muted: #68736c;
  --asti-border: #e2e7e2;

  --asti-radius-sm: 10px;
  --asti-radius-md: 16px;
  --asti-radius-lg: 22px;

  --asti-shadow-sm: 0 7px 20px rgba(16, 52, 38, 0.07);
  --asti-shadow-md: 0 16px 42px rgba(16, 52, 38, 0.12);
  --asti-shadow-lg: 0 26px 70px rgba(8, 31, 22, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--asti-page-bg);
  color: var(--asti-text);
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ==========================================================
   Manual language switching
========================================================== */

.le {
  display: none !important;
}

.la {
  display: inline;
}

body.en-body .la {
  display: none !important;
}

body.en-body .le {
  display: inline !important;
}

body.en-body {
  direction: ltr;
}

body:not(.en-body) {
  direction: rtl;
}

/* Keep global branded areas visually consistent. */
.asti-header,
.footer-b,
.top-bar {
  direction: rtl;
}

/* ==========================================================
   Top bar
========================================================== */

.top-bar {
  min-height: 50px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px;
  padding: 9px 24px !important;
  background:
    linear-gradient(
      90deg,
      #b88a37 0%,
      #d1a952 22%,
      #e8c979 50%,
      #d1a952 78%,
      #b88a37 100%
    ) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(116, 80, 20, 0.28) !important;
  box-shadow: 0 5px 18px rgba(184, 138, 55, 0.18) !important;
  text-shadow: 0 1px 3px rgba(74, 47, 7, 0.14);
  font-size: 14px;
  line-height: 1.7;
}

.top-bar > div:first-child {
  min-width: 0;
  flex: 1;
}

/* Gold top-bar content */
.top-bar > div:first-child,
.top-bar > div:first-child strong,
.top-bar > div:first-child span,
.top-bar .topbar-location,
.top-bar .topbar-location a {
  color: #ffffff !important;
}

/* Monochrome social icons: drawings only, without brand colors or boxes. */
.top-bar .top-extra > div:first-child a {
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
  opacity: 0.92;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.top-bar .top-extra > div:first-child a svg {
  width: 17px !important;
  height: 17px !important;
  display: block;
}

.top-bar .top-extra > div:first-child a svg path {
  fill: currentColor !important;
}

.top-bar .top-extra > div:first-child a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
  opacity: 1;
  transform: translateY(-1px);
}

.topbar-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-location a {
  color: inherit !important;
  text-decoration: none !important;
}

.topbar-location a:hover {
  color: var(--asti-gold-600) !important;
}

.topbar-divider {
  width: 1px;
  height: 20px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.42);
}

.top-extra {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0;
}

.tbtn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(91, 59, 8, 0.12);
  backdrop-filter: blur(6px);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.tbtn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
  transform: translateY(-1px);
}

/* Drupal may wrap editable content with paragraphs. */
.top-bar p,
.asti-header p,
.footer-b p {
  margin-top: 0;
}

/* ==========================================================
   Header
========================================================== */

#site-header.asti-header,
.asti-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 900 !important;
  width: 100%;
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid var(--asti-border) !important;
  box-shadow: 0 7px 24px rgba(16, 52, 38, 0.06) !important;
  backdrop-filter: blur(14px);
  transition:
    box-shadow 0.25s ease,
    background 0.25s ease;
}

#site-header.asti-header.sticky,
#site-header.asti-header.is-sticky {
  box-shadow: var(--asti-shadow-md) !important;
}

.asti-header > div:first-child {
  min-height: 92px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  width: min(100%, 1240px);
  margin: 0 auto !important;
  padding: 12px 24px !important;
}

/* Logo link in the current Twig. */
.asti-header > div:first-child > a:first-child {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
  border: 2px solid var(--asti-gold-500) !important;
  border-radius: 50% !important;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 52, 38, 0.11);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.asti-header > div:first-child > a:first-child:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 12px 28px rgba(16, 52, 38, 0.16);
}

.asti-header > div:first-child > a:first-child img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

/* ==========================================================
   Desktop navigation
========================================================== */

.desktop-nav {
  flex: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 0;
}

.desktop-nav p {
  display: contents !important;
}

.nav-link,
.nav-drop-btn {
  min-height: 42px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--asti-green-900) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.4;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover,
.nav-drop-btn:hover,
.nav-drop.open > .nav-drop-btn {
  background: var(--asti-green-100) !important;
  color: var(--asti-green-700) !important;
  transform: translateY(-1px);
}

.nav-drop {
  position: relative;
}

.nav-drop-icon {
  color: var(--asti-gold-600);
  font-size: 11px;
  transition: transform 0.2s ease;
}

.nav-drop.open .nav-drop-icon {
  transform: rotate(180deg);
}

.nav-drop-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  min-width: 245px;
  display: block !important;
  padding: 9px !important;
  border: 1px solid var(--asti-border) !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  box-shadow: var(--asti-shadow-md) !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  z-index: 1200;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.nav-drop.open .nav-drop-menu,
.nav-drop:hover .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-drop-item {
  display: block !important;
  padding: 10px 12px !important;
  border-radius: 9px;
  color: var(--asti-text) !important;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none !important;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    padding 0.18s ease;
}

.nav-drop-item:hover {
  padding-inline-start: 16px !important;
  background: var(--asti-green-50);
  color: var(--asti-green-700) !important;
}

/* Header actions */
.asti-header > div:first-child > div:last-child {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0;
}

.asti-header > div:first-child > div:last-child > a {
  min-height: 42px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 9px 17px !important;
  border-radius: 10px !important;
  background:
    linear-gradient(
      135deg,
      var(--asti-green-800),
      var(--asti-green-600)
    ) !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(22, 70, 51, 0.2) !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.asti-header > div:first-child > div:last-child > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(22, 70, 51, 0.28) !important;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 11px;
  background: var(--asti-green-50) !important;
  color: var(--asti-green-900) !important;
  font-size: 22px !important;
  cursor: pointer;
}

/* ==========================================================
   Mobile menu
========================================================== */

#mobileMenu.mobile-menu {
  display: none !important;
  border-top: 1px solid var(--asti-border);
  background: #ffffff !important;
  box-shadow: 0 18px 35px rgba(16, 52, 38, 0.1);
}

#mobileMenu.mobile-menu.open,
body.menu-open #mobileMenu.mobile-menu {
  display: block !important;
}

#mobileMenu .mob-link {
  display: block !important;
  padding: 11px 10px !important;
  border-bottom: 1px solid var(--asti-border);
  border-radius: 8px;
  color: var(--asti-green-900) !important;
  font-size: 14px;
  font-weight: 750 !important;
  text-decoration: none !important;
}

#mobileMenu .mob-link:hover {
  background: var(--asti-green-50);
  color: var(--asti-green-700) !important;
}

/* ==========================================================
   Main Drupal layout
========================================================== */

.layout-main-wrapper {
  background: var(--asti-page-bg);
}

.main-content,
.main-content__container,
.layout-main {
  min-width: 0;
}

.main-content__container.container {
  width: 100% !important;
  max-width: none !important;
  padding-inline: 0 !important;
}

/* ==========================================================
   Footer
========================================================== */

.footer-b {
  position: relative;
  width: 100%;
  overflow: hidden;
border-top:3px solid #b58a3d;  
  background:
    radial-gradient(
      circle at 12% 10%,
      rgba(200, 163, 93, 0.16),
      transparent 27%
    ),
    linear-gradient(
      145deg,
      var(--asti-green-950) 0%,
      var(--asti-green-900) 52%,
      #081b13 100%
    ) !important;
  color: #ffffff !important;
}

.footer-b > div {
  width: min(100%, 1200px);
  margin: 0 auto !important;
  padding: 50px 24px 24px !important;
}

.footer-b > div > div:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  margin-bottom: 27px !important;
}

.footer-b img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.footer-b > div > div:nth-child(2) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px 24px !important;
  margin-bottom: 26px !important;
}

.footer-b > div > div:nth-child(2) a {
  position: relative;
  padding: 5px 0 !important;
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.footer-b > div > div:nth-child(2) a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--asti-gold-500);
  transition: width 0.22s ease;
}

.footer-b > div > div:nth-child(2) a:hover {
  color: var(--asti-gold-300) !important;
  transform: translateY(-2px);
}

.footer-b > div > div:nth-child(2) a:hover::after {
  width: 100%;
}

.footer-b > div > div:nth-child(3) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  margin-bottom: 32px !important;
}

.footer-b > div > div:nth-child(3) a {
  width: 42px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.1) !important;
  text-decoration: none !important;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.footer-b > div > div:nth-child(3) a:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.17) !important;
  border-color: rgba(200, 163, 93, 0.75) !important;
}

.footer-b .contact-map {
  width: 100% !important;
  max-width: 1050px;
  margin: 0 auto !important;
  overflow: hidden !important;
  border: 2px solid rgba(200, 163, 93, 0.42) !important;
  border-radius: 19px !important;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.27) !important;
}

.footer-b .contact-map iframe {
  width: 100% !important;
  height: 310px !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.footer-b > div > p:last-child {
  margin: 26px 0 0 !important;
  padding: 19px 0 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.66) !important;
  font-size: 13px !important;
  text-align: center;
}

/* ==========================================================
   Dark mode — global layout
========================================================== */

body.dark-mode {
  --asti-page-bg: #0e1511;
  --asti-surface: #162019;
  --asti-text: #eef3ef;
  --asti-muted: #bbc7bf;
  --asti-border: rgba(255, 255, 255, 0.12);

  background: var(--asti-page-bg) !important;
  color: var(--asti-text) !important;
}

body.dark-mode .top-bar {
  background:
    linear-gradient(
      90deg,
      #13251b,
      #172c21,
      #13251b
    ) !important;
  color: #eef3ef !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .topbar-location,
body.dark-mode .tbtn {
  color: #eef3ef !important;
}

body.dark-mode .tbtn {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode #site-header.asti-header,
body.dark-mode .asti-header,
body.dark-mode #mobileMenu.mobile-menu,
body.dark-mode .nav-drop-menu {
  background: rgba(20, 29, 23, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .nav-link,
body.dark-mode .nav-drop-btn,
body.dark-mode #mobileMenu .mob-link {
  color: #edf3ef !important;
}

body.dark-mode .nav-drop-item {
  color: #dce6df !important;
}

body.dark-mode .nav-drop-item:hover,
body.dark-mode #mobileMenu .mob-link:hover,
body.dark-mode .nav-link:hover,
body.dark-mode .nav-drop-btn:hover {
  background: rgba(91, 145, 112, 0.16) !important;
  color: #ffffff !important;
}

body.dark-mode .layout-main-wrapper,
body.dark-mode .main-content,
body.dark-mode .main-content__container,
body.dark-mode .layout-main {
  background: var(--asti-page-bg) !important;
  color: var(--asti-text) !important;
}

/* ==========================================================
   Responsive
========================================================== */

@media (min-width: 1024px) {
  #mobileMenu.mobile-menu {
    display: none !important;
  }

  .menu-toggle {
    display: none !important;
  }
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 0 !important;
  }

  .nav-link,
  .nav-drop-btn {
    padding-inline: 7px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 1023px) {
  .desktop-nav {
    display: none !important;
  }

  .menu-toggle {
    display: inline-flex !important;
  }

  .asti-header > div:first-child {
    min-height: 82px;
  }

  .asti-header > div:first-child > a:first-child {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px;
  }
}

@media (max-width: 767px) {
  .top-bar {
    min-height: auto;
    flex-direction: column;
    gap: 8px;
    padding: 9px 14px !important;
    text-align: center;
  }

  .topbar-location,
  .topbar-divider {
    display: none !important;
  }

  .top-extra {
    justify-content: center;
  }

  .asti-header > div:first-child {
    padding: 10px 14px !important;
  }

  .asti-header > div:first-child > div:last-child > a {
    display: none !important;
  }

  .footer-b > div {
    padding: 40px 16px 20px !important;
  }

  .footer-b > div > div:first-child {
    flex-direction: column !important;
    text-align: center;
  }

  .footer-b > div > div:first-child > div {
    text-align: center !important;
  }

  .footer-b .contact-map iframe {
    height: 270px !important;
  }
}

@media (max-width: 480px) {
  .top-bar > div:first-child {
    font-size: 13px;
  }

  .footer-b > div > div:nth-child(2) {
    gap: 10px 16px !important;
  }
}






/* ==========================================================
   GLOBAL CHATBOT
========================================================== */

#chatFab.cfab {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  width: 62px !important;
  height: 62px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #173f2f, #28624a) !important;
  color: #ffffff !important;
  font-size: 25px !important;
  cursor: pointer !important;
  z-index: 99999 !important;
  box-shadow: 0 16px 38px rgba(23, 63, 47, 0.36) !important;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease !important;
}

#chatFab.cfab:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 20px 44px rgba(23, 63, 47, 0.43) !important;
}

#chatFab.cfab i {
  pointer-events: none;
}

#chatBadge.cbadge {
  position: absolute !important;
  top: -3px !important;
  left: -3px !important;
  min-width: 21px !important;
  height: 21px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #ffffff !important;
  border-radius: 999px !important;
  background: #c6a15b !important;
  color: #173f2f !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  pointer-events: none !important;
}

#chatWindow.cwin {
  position: fixed !important;
  right: 24px !important;
  bottom: 100px !important;
  width: 370px !important;
  max-width: calc(100vw - 32px) !important;
  height: 520px !important;
  max-height: calc(100vh - 130px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(23, 63, 47, 0.14) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(18px) scale(0.96) !important;
  z-index: 99998 !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.24) !important;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease !important;
}

#chatWindow.cwin.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

/* === رأس نافذة المحادثة === */
#chatWindow .chdr {
  min-height: 76px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  background: linear-gradient(135deg, #173f2f, #28624a) !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
}

#chatWindow .cavt {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
}

#chatWindow .cnm {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

#chatWindow .cst {
  font-size: 12px !important;
  opacity: 0.8 !important;
  margin-top: 2px !important;
}

#chatWindow .ccls {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
}

#chatWindow .ccls:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* === تبديل اللغة داخل المحادثة === */
body.en-body #chatWindow .la {
  display: none !important;
}

body.en-body #chatWindow .le {
  display: inline !important;
}

body:not(.en-body) #chatWindow .la {
  display: inline !important;
}

body:not(.en-body) #chatWindow .le {
  display: none !important;
}

/* === منطقة الرسائل === */
#chatWindow .cmsgs {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 15px !important;
  background: #f7f9f7 !important;
  scroll-behavior: smooth !important;
}

#chatWindow .cmsgs::-webkit-scrollbar {
  width: 5px;
}

#chatWindow .cmsgs::-webkit-scrollbar-track {
  background: transparent;
}

#chatWindow .cmsgs::-webkit-scrollbar-thumb {
  background: rgba(23, 63, 47, 0.2);
  border-radius: 10px;
}

/* === فقاعة الرسالة === */
#chatWindow .cmsg {
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
  animation: cmsgIn 0.3s ease !important;
}

@keyframes cmsgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#chatWindow .cmsg.bot {
  direction: rtl;
}

#chatWindow .cmsg.usr {
  direction: rtl;
  justify-content: flex-start;
  flex-direction: row-reverse;
}

#chatWindow .cma {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  flex-shrink: 0 !important;
}

#chatWindow .cmsg.bot .cma {
  background: linear-gradient(135deg, #173f2f, #28624a) !important;
  color: #ffffff !important;
  border: 2px solid rgba(23, 63, 47, 0.3) !important;
}

#chatWindow .cmsg.usr .cma {
  background: linear-gradient(135deg, #c9a227, #d4b44e) !important;
  color: #173f2f !important;
  border: 2px solid rgba(201, 162, 39, 0.3) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#chatWindow .cmb {
  max-width: 78% !important;
  padding: 11px 15px !important;
  border-radius: 16px !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

#chatWindow .cmsg.bot .cmb {
  background: #ffffff !important;
  color: #1a1a1a !important;
  border-bottom-right-radius: 6px !important;
  border: 1px solid #e8ece9 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

#chatWindow .cmsg.usr .cmb {
  background: linear-gradient(135deg, #173f2f, #28624a) !important;
  color: #ffffff !important;
  border-bottom-left-radius: 6px !important;
}

#chatWindow .cmb strong {
  font-weight: 700 !important;
  color: #173f2f !important;
}

#chatWindow .cmsg.usr .cmb strong {
  color: #ffffff !important;
}

/* === أزرار الأسئلة السريعة === */
#chatWindow .cqas {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  padding: 10px 12px !important;
  background: #ffffff !important;
  border-top: 1px solid #e8ece9 !important;
  flex-shrink: 0 !important;
}

#chatWindow .cqab {
  padding: 6px 14px !important;
  border: 1px solid rgba(23, 63, 47, 0.2) !important;
  border-radius: 20px !important;
  background: rgba(23, 63, 47, 0.04) !important;
  color: #173f2f !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  font-family: inherit !important;
}

#chatWindow .cqab:hover {
  background: #173f2f !important;
  color: #ffffff !important;
  border-color: #173f2f !important;
}

/* === حقل الإدخال === */
#chatWindow .cinpa {
  display: flex !important;
  gap: 8px !important;
  padding: 12px !important;
  background: #ffffff !important;
  border-top: 1px solid #e8ece9 !important;
  flex-shrink: 0 !important;
}

#chatWindow .cinp {
  flex: 1 !important;
  min-width: 0 !important;
  height: 44px !important;
  padding: 0 13px !important;
  border: 1px solid #dce3de !important;
  border-radius: 12px !important;
  outline: none !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: #1a1a1a !important;
  background: #f7f9f7 !important;
  transition: border-color 0.2s ease !important;
}

#chatWindow .cinp:focus {
  border-color: #173f2f !important;
}

#chatWindow .cinp::placeholder {
  color: #8a9a8e !important;
}

#chatWindow .csnd {
  width: 46px !important;
  height: 44px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #173f2f !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  transition: background 0.2s ease !important;
  flex-shrink: 0 !important;
}

#chatWindow .csnd:hover {
  background: #28624a !important;
}

/* === إشعار Toast === */
.toast {
  position: fixed !important;
  bottom: 100px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  background: #173f2f !important;
  color: #ffffff !important;
  padding: 10px 22px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  z-index: 999999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
}

.toast.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* === الوضع الليلي === */
body.dark-mode #chatWindow.cwin {
  background: #172019 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode #chatWindow .cmsgs {
  background: #101711 !important;
}

body.dark-mode #chatWindow .cqas,
body.dark-mode #chatWindow .cinpa {
  background: #172019 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode #chatWindow .cinp {
  background: #202b22 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

body.dark-mode #chatWindow .cinp::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

body.dark-mode #chatWindow .cmsg.bot .cmb {
  background: #1e2b21 !important;
  color: #e0e8e2 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #chatWindow .cmb strong {
  color: #7fc98a !important;
}

body.dark-mode #chatWindow .cmsg.usr .cmb strong {
  color: #ffffff !important;
}

body.dark-mode #chatWindow .cqab {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #b8ccba !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode #chatWindow .cqab:hover {
  background: #28624a !important;
  color: #ffffff !important;
  border-color: #28624a !important;
}

/* === التجاوب مع الشاشات الصغيرة === */
@media (max-width: 600px) {
  #chatFab.cfab {
    right: 16px !important;
    bottom: 18px !important;
    width: 58px !important;
    height: 58px !important;
    font-size: 22px !important;
  }

  #chatWindow.cwin {
    right: 12px !important;
    left: 12px !important;
    bottom: 88px !important;
    width: auto !important;
    height: min(500px, calc(100vh - 120px)) !important;
    border-radius: 18px !important;
  }

  #chatWindow .cmb {
    max-width: 85% !important;
    font-size: 13px !important;
  }

  #chatWindow .cavt {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 19px !important;
  }

  #chatWindow .cnm {
    font-size: 13px !important;
  }

  #chatWindow .cqab {
    font-size: 11px !important;
    padding: 5px 11px !important;
  }
}
/* =========================================
   Responsive Base
========================================= */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

iframe {
  display: block;
  width: 100%;
}

* {
  box-sizing: border-box;
}

.container,
.section-container,
.page-wrapper,
.content-wrapper {
  width: min(100%, 1200px);
  margin-inline: auto;
  padding-inline: 20px;
}
/* Tablet */
@media (max-width: 992px) {
  .desktop-nav {
    display: none;
  }

  #mobileToggle {
    display: inline-flex;
  }

  .hero-grid,
  .contact-page__grid,
  .about-college__story,
  .about-college__vision-grid,
  .certificate-layout,
  .overview-layout {
    grid-template-columns: 1fr !important;
  }

  .dp-grid,
  .courses-grid,
  .services-grid,
  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(30px, 9vw, 44px) !important;
  }

  h2 {
    font-size: clamp(24px, 7vw, 34px) !important;
  }

  .dp-grid,
  .courses-grid,
  .services-grid,
  .values-grid,
  .contact-options,
  .contact-shortcuts,
  .objectives-grid,
  .audience-grid,
  .conditions-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-metrics,
  .dp-stats,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px;
  }

  .contact-whatsapp,
  .about-college__cta {
    grid-template-columns: 1fr !important;
    flex-direction: column;
    text-align: center;
  }

  .contact-map-card__head,
  .contact-page__map-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-map-card__frame iframe,
  .contact-page__map-frame iframe,
  .footer-map iframe {
    height: 300px !important;
  }

  .site-footer,
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .btn,
  button,
  .company-btn,
  .contact-btn,
  .dp-btn-primary,
  .dp-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container,
  .section-container,
  .page-wrapper,
  .content-wrapper {
    padding-inline: 14px;
  }

  .hero-metrics,
  .dp-stats,
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .dp-card,
  .contact-card,
  .company-card {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}
/* ==========================================================
   Mobile navigation — single custom toggle
   ========================================================== */

/*
 * page.html.twig contains one custom button only: #menuToggle.
 * These selectors hide Olivero/Drupal navigation toggles that may still be
 * rendered by a header/menu block, preventing two hamburger buttons.
 */
.asti-header .mobile-nav-button,
.asti-header .mobile-menu-button,
.asti-header .site-header__initial,
.asti-header .site-header__fixable .mobile-nav-button,
.asti-header .primary-nav__button-toggle,
.asti-header .primary-nav__button-toggle--root,
.asti-header .nav-primary__button,
.asti-header [data-drupal-selector="mobile-nav-button"],
.asti-header button[aria-controls="header-nav"],
.asti-header button[aria-controls="primary-menu"] {
  display: none !important;
}

/* Keep our custom button visible on tablet/mobile only. */
#menuToggle.menu-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: none !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 !important;
  border: 1px solid rgba(16, 52, 38, 0.12) !important;
  border-radius: 12px !important;
  background: var(--asti-green-50) !important;
  color: var(--asti-green-900) !important;
  cursor: pointer;
}

#menuToggle .menu-toggle__icon,
#menuToggle .menu-toggle__icon::before,
#menuToggle .menu-toggle__icon::after {
  width: 22px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

#menuToggle .menu-toggle__icon {
  position: relative;
}

#menuToggle .menu-toggle__icon::before,
#menuToggle .menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

#menuToggle .menu-toggle__icon::before {
  top: -7px;
}

#menuToggle .menu-toggle__icon::after {
  top: 7px;
}

/* Hamburger becomes an X while the menu is open. */
#menuToggle[aria-expanded="true"] .menu-toggle__icon {
  background: transparent;
}

#menuToggle[aria-expanded="true"] .menu-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

#menuToggle[aria-expanded="true"] .menu-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

#mobileMenu.mobile-menu {
  display: none !important;
}

#mobileMenu.mobile-menu.open,
#mobileMenu.mobile-menu.is-open,
body.menu-open #mobileMenu.mobile-menu {
  display: block !important;
}

#mobileMenu .mobile-menu__inner {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 14px 20px 20px;
}

#mobileMenu .mob-link {
  display: flex !important;
  align-items: center;
  min-height: 46px;
  padding: 11px 12px !important;
  border-bottom: 1px solid var(--asti-border);
  border-radius: 9px;
}

#mobileMenu .mob-link--cta {
  justify-content: center;
  margin-top: 12px;
  border: 0;
  background:
    linear-gradient(
      135deg,
      var(--asti-green-800),
      var(--asti-green-600)
    );
  color: #ffffff !important;
}

body.en-body #mobileMenu {
  direction: ltr;
  text-align: left;
}

body:not(.en-body) #mobileMenu {
  direction: rtl;
  text-align: right;
}

body.dark-mode #menuToggle.menu-toggle {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

@media (max-width: 1023px) {
  #menuToggle.menu-toggle {
    display: inline-flex !important;
  }
}

@media (min-width: 1024px) {
  #menuToggle.menu-toggle,
  #mobileMenu.mobile-menu {
    display: none !important;
  }
}
/* ==========================================================
   FINAL MOBILE HEADER FIX
   يجب أن يكون آخر كود في page.css
========================================================== */

@media screen and (max-width: 1100px) {

  /* إخفاء شريط التنقل المكتبي نهائيًا */
  header#site-header.asti-header nav.desktop-nav,
  #site-header .desktop-nav,
  .asti-header .desktop-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  /* إظهار زر القائمة الخاص بنا فقط */
  header#site-header.asti-header #menuToggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ترتيب الهيدر في الجوال */
  header#site-header.asti-header > div:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 10px 16px !important;
  }

  /* منع تمدد منطقة الأزرار */
  header#site-header.asti-header
    > div:first-child
    > div:last-child {
    margin-inline-start: auto !important;
    flex-shrink: 0 !important;
  }
}

/* سطح المكتب */
@media screen and (min-width: 1101px) {

  header#site-header.asti-header nav.desktop-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  header#site-header.asti-header #menuToggle,
  header#site-header.asti-header #mobileMenu {
    display: none !important;
  }
}
.brand-logo {
  display: block !important;
  width: 95px !important;
  height: 95px !important;
  background: url("/themes/custom/asti_company/images/asti-logo.png?v=10")
    center / contain no-repeat !important;
}

.brand-logo img {
  display: none !important;
}
/* توسيع محتوى صفحات الموقع */
main,
main .layout-container,
main .region-content,
main .region-content-above,
main .region-content-below,
main .main-content,
main .main-content__container,
main .node,
main .node__content {
  width: 100%;
  max-width: none;
}

/* توسيع الحاوية الرئيسية مع ترك مسافة بسيطة من الطرفين */
main .layout-container,
main .main-content__container {
  width: calc(100% - 40px);
  margin-inline: auto;
}

/* إزالة القيود التي يضعها Olivero على عرض النص */
main .text-content,
main .cke-content,
main .field--name-body {
  max-width: none;
  width: 100%;
}
/* ==========================================
   Global Layout Width
========================================== */

.layout-main-wrapper.layout-container{
    width:100%;
    max-width:100% !important;
    padding:0 !important;
}

.main-content{
    width:100%;
}

.main-content__container.container{
    width:calc(100% - 40px);
    max-width:1600px !important;
    margin:auto;
    padding:0;
}

.layout-main{
    width:100%;
}

.node__content,
.field--name-body{
    width:100%;
    max-width:none;
}
/* =====================================
   Language Direction Fix
===================================== */

/* English */
body.en-body .top-bar,
body.en-body .asti-header,
body.en-body .footer-b {
  direction: ltr !important;
}

/* Arabic */
body:not(.en-body) .top-bar,
body:not(.en-body) .asti-header,
body:not(.en-body) .footer-b {
  direction: rtl !important;
}

/* Header navigation */
body.en-body .desktop-nav {
  flex-direction: row;
}

body:not(.en-body) .desktop-nav {
  flex-direction: row;
}

/* Footer links */
body.en-body .footer-b > div > div:nth-child(2) {
  direction: ltr;
}

body:not(.en-body) .footer-b > div > div:nth-child(2) {
  direction: rtl;
}
/* =====================================
   Back To Top Button
===================================== */

.back-to-top{
  position: fixed;
  left: 24px;
  bottom: 24px;

  width: 56px;
  height: 56px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;

  background:linear-gradient(
    135deg,
    #b88a37,
    #d1a952
  );

  color:#ffffff;
  text-decoration:none;

  box-shadow:
    0 12px 30px rgba(155, 120, 24, 0.703);

  opacity: 1;
  visibility: visible;
  transform: translateY(18px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;

  z-index:9998;
}

.back-to-top.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.back-to-top:hover{
  transform:translateY(-4px);
}

.back-to-top i{
  font-size:18px;
}

/* زر الادمن و المحرر للاطلاع على طلبات التسجيل*/
.header-admin-link a{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 18px;
  border-radius:12px;
  background:linear-gradient(135deg,#173f30,#245f47);
  color:#fff !important;
  font-weight:700;
  box-shadow:0 8px 18px rgba(23,63,48,.18);
  transition:.25s;
}

.header-admin-link a:hover{
  transform:translateY(-2px);
  background:linear-gradient(135deg,#245f47,#173f30);
}