/* Align Bootstrap 5 tokens with Adel brand (used on index.html with app.min.rtl.css) */
:root {
  --bs-primary: #0f54a1;
  --bs-primary-rgb: 15, 84, 161;
}

/* Web3Forms feedback toast (RTL, Persian) */
.adel-form-toast {
  position: fixed;
  z-index: 99999;
  bottom: 1.25rem;
  left: 50%;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 84, 161, 0.22), 0 2px 12px rgba(0, 0, 0, 0.12);
  font-size: 0.9375rem;
  line-height: 1.55;
  direction: rtl;
  text-align: right;
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
  pointer-events: none;
}

.adel-form-toast.adel-form-toast--visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.adel-form-toast--success {
  background: #0f54a1;
  color: #fff;
}

.adel-form-toast--error {
  background: #9b1c1c;
  color: #fff;
}

.adel-form-toast__text {
  flex: 1;
  min-width: 0;
}

.adel-form-toast__close {
  flex-shrink: 0;
  margin: -0.1rem 0 0;
  padding: 0.15rem 0.35rem;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.88;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.adel-form-toast__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

/* Web3Forms submit button loading */
.th-btn.adel-form-submit--loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: wait;
  opacity: 0.92;
  pointer-events: none;
}

.adel-form-submit__spin {
  flex-shrink: 0;
}

/* EU cookie consent — full-width bar, slides up from bottom (not centered toast) */
.adel-cookie-banner {
  position: fixed;
  z-index: 100000;
  inset-inline: 0;
  bottom: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 1.15rem clamp(1rem, 4vw, 2.5rem);
  padding-bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  border-top: 1px solid rgba(15, 84, 161, 0.18);
  box-shadow: 0 -8px 40px rgba(15, 84, 161, 0.12), 0 -2px 24px rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #1a1a1a;
  font-size: 0.9375rem;
  line-height: 1.55;
  direction: rtl;
  text-align: right;
  transform: translateY(100%);
  opacity: 1;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  will-change: transform;
}

.adel-cookie-banner.adel-cookie-banner--visible {
  transform: translateY(0);
  pointer-events: auto;
}

.adel-cookie-banner.adel-cookie-banner--hiding {
  transform: translateY(100%);
  pointer-events: none;
}

.adel-cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 75rem;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .adel-cookie-banner__inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
  }
}

.adel-cookie-banner__content {
  flex: 1;
  min-width: 0;
}

.adel-cookie-banner__title {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f54a1;
}

.adel-cookie-banner__text {
  margin: 0 0 0.5rem;
  color: #333;
}

.adel-cookie-banner__privacy {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f54a1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.adel-cookie-banner__privacy:hover {
  color: #0a3d78;
}

.adel-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
  justify-content: flex-start;
}

.adel-cookie-banner__actions .th-btn {
  margin: 0;
  white-space: nowrap;
}

.adel-cookie-banner__btn-essential.th-btn.style4 {
  border-color: #0f54a1;
  color: #0f54a1;
}

.adel-cookie-banner__btn-essential.th-btn.style4:hover {
  background: rgba(15, 84, 161, 0.08);
  color: #0a3d78;
}

@media (prefers-reduced-motion: reduce) {
  .adel-cookie-banner {
    transition-duration: 0.2s;
    transition-timing-function: ease;
  }
}

/* Cookie preferences link in footer (visible after consent saved) */
.footer-links .adel-cookie-settings-footer {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links .adel-cookie-settings-footer:hover {
  color: var(--theme-color, #0f54a1);
}

.adel-cookie-settings-footer--hidden {
  display: none !important;
}

/* index CTA: .cta-tag nested in .scroll-text-ani — parent uses background-clip:text and
   transparent text-fill, which hid the pill label (looked like black on black). */
.cta-wrap5 .scroll-text-ani .cta-tag {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background-color: var(--bs-primary);
  background-image: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
}

.cta-wrap5 .scroll-text-ani .cta-tag::after {
  background: var(--bs-primary);
}

/* Preloader: white screen; dark/near-black SVG logotype → brand primary so it reads in color */
.preloader {
  background-color: #fff !important;
}

.preloader-inner img {
  max-width: min(520px, 92vw);
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
  /* Map single-color dark artwork to --bs-primary (~#0f54a1) */
  filter: brightness(0) saturate(100%) invert(14%) sepia(95%) saturate(4552%)
    hue-rotate(199deg) brightness(0.92) contrast(98%);
}

/* Shape mark only — wordmark uses .adel-header-logotype below */
.th-header .header-logo img:not(.adel-header-logotype),
.th-menu-wrapper .mobile-logo img:not(.adel-header-logotype) {
  max-height: 52px;
  width: auto;
  height: auto;
}

/* Header: keep shape + logotype next to each other */
.th-header .header-logo a.adel-header-logo-link,
.th-menu-wrapper .mobile-logo a.adel-header-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.th-menu-wrapper .mobile-logo a.adel-header-logo-link {
  justify-content: center;
}

/*
 * Wordmark: only .adel-header-logotype (not the shape). Load after style.rtl.css........
 */
.th-header .header-logo img.adel-header-logotype {
  max-height: 128px !important;
  height: 50px !important;
  width: auto !important;
  max-width: min(640px, 78vw);
}

.th-menu-wrapper .mobile-logo img.adel-header-logotype {
  max-height: 72px !important;
  width: auto !important;
  height: auto !important;
  max-width: min(380px, 82vw);
}

@media (max-width: 575.98px) {
  .th-header .header-logo img.adel-header-logotype {
    max-height: 88px !important;
    height: 56px !important;
    max-width: min(420px, 85vw);
  }

  .th-menu-wrapper .mobile-logo img.adel-header-logotype {
    max-height: 60px !important;
    max-width: min(300px, 85vw);
  }
}

.sidemenu-wrapper .about-logo img {
  max-height: 48px;
  width: auto;
}

.footer-wrapper .about-logo img {
  max-width: 220px;
  height: auto;
  /* Dark logotype SVG → white on footer (bg-title) */
  filter: brightness(0) invert(1);
}

/* Remove theme blue block behind header logo (.logo-bg uses var(--theme-color)) */
.th-header.header-layout1 .logo-bg {
  display: none !important;
}

/* service.html listing — same aspect for every card image */
#service-sec .service-style-1 .service-img {
  aspect-ratio: 4 / 3;
}

#service-sec .service-style-1 .service-img a {
  height: 100%;
}

#service-sec .service-style-1 .service-img a img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

