/*
Theme Name: Hafiz
Theme URI: https://alhafizconsult.com.sa
Author: Al-Hafiz Consult
Description: Bilingual (Arabic RTL / English) WordPress theme for Al-Hafiz Consult — Zakat and tax advisory. Carbon Fields page builder, Polylang-ready pretty EN URLs, Media Library–driven imagery, dark/light UI, and conversion-focused home, about, services, team, and contact layouts.
Version: 1.5.5
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hafiz
*/

/* Styles load from assets/css — see functions.php */

/* Service cards — titles stay on one line (legacy d-block spans in stored HTML) */
.feature-box-items h3 a .d-block {
  display: inline !important;
}

.feature-box-items h3 a {
  display: inline;
}

/* English — Source Code Variable across UI (Font Awesome keeps its own faces) */
body.hafiz-lang-en {
  --font-body: "Source Code Variable", monospace;
  --font-heading: "Source Code Variable", monospace;
  --font-en: "Source Code Variable", monospace;
  font-family: "Source Code Variable", monospace !important;
}

body.hafiz-lang-en :where(
  h1, h2, h3, h4, h5, h6,
  p, a, li, td, th, label, button, input, textarea, select,
  .theme-btn, .btn_text, .btn_inner, .sub-title, .sec_title, .tx-title,
  .mean-container .mean-nav ul li a, .offcanvas__info, .breadcrumb,
  .hafiz-pre-footer-consult, .footer-widgets, .header-1, .hero-content
):not([class^="fa-"]):not([class*=" fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands) {
  font-family: "Source Code Variable", monospace;
}

body.hafiz-lang-ar,
body.rtl.hafiz-lang-ar,
body.hafiz-lang-ar .mean-container .mean-nav ul li a {
  font-family: "DIN Next LT W23", sans-serif;
}

/* Arabic offcanvas: + toggle pinned to physical left (overrides meanmenu absolute right) */
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > a.mean-expand,
body.rtl.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > a.mean-expand {
  left: auto !important;
  right: auto !important;
  position: static !important;
}

/* Mobile menu toggle — visible icon (requires assets/css/webfonts/) */
.header-1 .header__hamburger {
  flex-shrink: 0;
  z-index: 2;
}

.header-1 .sidebar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  margin: 0;
  background-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.header-1 .sidebar__toggle .fa-bars {
  display: inline-block;
  font-size: 1.15rem;
  line-height: 1;
}

/* شاشة التحميل — كلمة عربية واحدة (بدون تقطيع / ::before لكل حرف) */
.preloader .animation-preloader .txt-loading.txt-loading--word {
  direction: rtl;
  unicode-bidi: isolate;
}

.preloader .animation-preloader .txt-loading.txt-loading--word .preloader-brand {
  display: inline-block;
  color: var(--theme);
  font-family: var(--font-body);
  font-weight: 700;
  font-synthesis: none;
  font-variant-ligatures: common-ligatures contextual;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
  animation: hafiz-preloader-brand 2.2s ease-in-out infinite;
}

.preloader .animation-preloader .txt-loading.txt-loading--word .preloader-brand::before {
  content: none;
  display: none;
}

.preloader.color-2 .txt-loading--word .preloader-brand {
  color: var(--theme2);
}
.preloader.color-3 .txt-loading--word .preloader-brand {
  color: var(--theme3);
}
.preloader.color-4 .txt-loading--word .preloader-brand {
  color: var(--theme4);
}
.preloader.color-5 .txt-loading--word .preloader-brand {
  color: var(--theme5);
}

@keyframes hafiz-preloader-brand {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.015);
  }
}

/* سطر «جاري التحميل» — بدون letter-spacing الكبير الذي يفرّغ العربية */
.preloader .animation-preloader > p {
  text-transform: none;
  letter-spacing: 0.06em;
}

/* About highlight block — space below hero */
.about-section.section-bg {
  padding-top: 50px;
}

/* —— Arabic calligraphy pattern (homepage, selected sections only) —— */
body.hafiz-page--home .hafiz-pattern-section {
  position: relative;
  isolation: isolate;
}

body.hafiz-page--home .hafiz-pattern-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--hafiz-pattern-url);
  background-repeat: repeat;
  background-size: 280px auto;
  background-position: center;
  opacity: 0.09;
}

body.hafiz-page--home .hafiz-pattern-section > .container,
body.hafiz-page--home .hafiz-pattern-section > .about-wrapper {
  position: relative;
  z-index: 1;
}

/* FAQ side image — stretch to match accordion column height */
.faq-section > .row {
  align-items: stretch;
}

.faq-section > .row > .col-lg-6:first-child {
  display: flex;
}

.faq-section .faq-image-1 {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 720px;
  max-height: none;
}

@media (max-width: 1899px) {
  .faq-section .faq-image-1 {
    height: 100%;
    min-height: 720px;
    max-height: none;
  }
}

@media (max-width: 991px) {
  .faq-section > .row > .col-lg-6:first-child {
    display: block;
  }

  .faq-section .faq-image-1 {
    height: auto;
    min-height: 420px;
    max-height: 520px;
  }
}

.faq-section .faq-image-1 > img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
}

/* Home about image — shorter crop (landscape source, fixed max height) */
.about-section .about-wrapper .about-image {
  max-height: 420px;
}

.about-section .about-wrapper .about-image img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 1199px) {
  .about-section .about-wrapper .about-image,
  .about-section .about-wrapper .about-image img {
    max-height: 340px;
  }
}

@media (max-width: 767px) {
  .about-section .about-wrapper .about-image,
  .about-section .about-wrapper .about-image img {
    max-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.hafiz-page--home .hafiz-pattern-section::before {
    opacity: 0.03;
  }
}

/* Testimonial avatars — fixed size (Bootstrap img max-width otherwise blows up size) */
.testimonial-box-items-3 .client-info .thumb {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  overflow: hidden;
  border-radius: 50%;
}

.testimonial-box-items-3 .client-info .thumb img {
  width: 100px !important;
  height: 100px !important;
  max-width: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--white);
}

.testimonial-box-items-3 .client-info .info-content h5,
.testimonial-box-items-3 .client-info .inffo-content h5 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.testimonial-box-items-3 .client-info .info-content span,
.testimonial-box-items-3 .client-info .inffo-content span {
  color: var(--header3);
}

/* About — mission / vision: readable body text (not oversized h2) */
.about-text-inner.about-mv-split {
  padding-top: 80px;
  padding-bottom: 80px;
}

.about-text-inner.about-mv-split .about-mv-text {
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--header3);
  opacity: 0.88;
  max-width: 36rem;
}

@media (max-width: 991px) {
  .about-text-inner.about-mv-split {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .about-text-inner.about-mv-split .about-mv-text {
    font-size: 16px;
    max-width: none;
  }
}

/* FAQ section — image scrolls with content (no ScrollSmoother parallax lag) */
.faq-section .faq-image-1 img {
  transform: none !important;
  will-change: auto;
}

.faq-content-1 {
  border-radius: 0;
}

/* Inner-page intro — RTL: text right, CTA left (matches about-inner-section flex) */
.hafiz-page-intro .section-title-area {
  gap: 2rem;
}

.hafiz-page-intro .section-title {
  flex: 1 1 0;
  min-width: 0;
  text-align: start;
}

.hafiz-page-intro .section-title h2 {
  max-width: 36rem;
  margin-inline: 0;
  color: var(--header);
}

.hafiz-page-intro .section-title h2 span {
  color: var(--theme);
}

.hafiz-page-intro .hafiz-page-intro__lead {
  max-width: 36rem;
  margin-inline: 0;
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--header3);
  opacity: 0.88;
}

.hafiz-page-intro .about-content.hafiz-page-intro__actions {
  flex: 0 0 auto;
  max-width: none;
  margin-inline-start: auto;
  margin-inline-end: 0;
  align-self: flex-end;
}

.hafiz-page-intro .hafiz-page-intro__actions .theme-btn {
  display: inline-flex;
  margin-top: 0;
  white-space: nowrap;
}

@media (max-width: 991px) {
  .hafiz-page-intro .section-title-area {
    flex-direction: column;
    align-items: stretch !important;
  }

  .hafiz-page-intro .about-content.hafiz-page-intro__actions {
    margin-inline-start: 0;
    align-self: flex-start;
  }

  .hafiz-page-intro .hafiz-page-intro__lead {
    font-size: 16px;
    max-width: none;
  }
}

/* Service / project sidebar promo card — center logo, text, and CTA */
.service-details-wrapper .service-details-sidebar .sidebar-widget-image .content,
.project-details-wrapper .project-details-sidebar .sidebar-widget-image .content {
  text-align: center;
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image .content .theme-btn,
.project-details-wrapper .project-details-sidebar .sidebar-widget-image .content .theme-btn {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}

.feature-box-items .feature-info-box {
  gap: 16px;
}

.feature-box-items .feature-info-box ul {
  flex: 1 1 auto;
  min-width: 0;
}

.feature-box-items .feature-info-box .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  min-width: 43px;
  min-height: 43px;
  max-width: 43px;
  max-height: 43px;
  line-height: 1;
  padding: 0;
  overflow: hidden;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.back-to-top svg.hafiz-back-top-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.feature-box-items .feature-info-box .icon svg.hafiz-arrow-icon {
  display: block;
  width: 12px !important;
  height: 12px !important;
  max-width: 12px;
  max-height: 12px;
  flex-shrink: 0;
}

.feature-box-items .feature-info-box .icon svg.hafiz-btn-arrow {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.pricing-btn svg.hafiz-arrow-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.theme-btn .btn_icon > span svg.hafiz-btn-arrow {
  display: block;
  width: 1em;
  height: 1em;
  transition: transform 0.4s ease-in-out 0s;
}

.theme-btn .btn_icon > span svg.hafiz-btn-arrow:last-child {
  position: absolute;
  transform: translateX(-150%);
}

.theme-btn:hover .btn_icon > span svg.hafiz-btn-arrow:first-child {
  transform: translateX(150%);
}

.theme-btn:hover .btn_icon > span svg.hafiz-btn-arrow:last-child {
  transform: translateX(0);
}

body.rtl .theme-btn .btn_icon > span svg.hafiz-btn-arrow:first-child,
html[dir="rtl"] .theme-btn .btn_icon > span svg.hafiz-btn-arrow:first-child {
  transform: scaleX(-1);
}

body.rtl .theme-btn:hover .btn_icon > span svg.hafiz-btn-arrow:first-child,
html[dir="rtl"] .theme-btn:hover .btn_icon > span svg.hafiz-btn-arrow:first-child {
  transform: scaleX(-1) translateX(-150%);
}

body.rtl .theme-btn .btn_icon > span svg.hafiz-btn-arrow:last-child,
html[dir="rtl"] .theme-btn .btn_icon > span svg.hafiz-btn-arrow:last-child {
  transform: scaleX(-1) translateX(150%);
}

body.rtl .theme-btn:hover .btn_icon > span svg.hafiz-btn-arrow:last-child,
html[dir="rtl"] .theme-btn:hover .btn_icon > span svg.hafiz-btn-arrow:last-child {
  transform: scaleX(-1) translateX(0);
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image .white-logo,
.project-details-wrapper .project-details-sidebar .sidebar-widget-image .white-logo {
  position: absolute;
  top: 28px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  text-align: center;
  width: calc(100% - 48px);
  max-width: 100%;
  box-sizing: border-box;
  z-index: 2;
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image .white-logo img,
.project-details-wrapper .project-details-sidebar .sidebar-widget-image .white-logo img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: min(100%, 220px);
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}

/* Service detail — sidebar links, checklist icons, promo image */
.service-details-wrapper .service-details-sidebar .sidebar-widget .sideber-title h4 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--theme);
  color: var(--white);
  font-size: 14px;
  margin-inline-end: 10px;
  vertical-align: middle;
}

.service-details-wrapper .service-details-sidebar .service-list-item li a span:last-child {
  flex-shrink: 0;
}

.service-details-wrapper .service-details-sidebar .service-list-item li a span:last-child i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--theme);
  color: var(--white);
  font-size: 12px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.service-details-wrapper .service-details-sidebar .service-list-item li a:hover span:last-child i,
.service-details-wrapper .service-details-sidebar .service-list-item li a.is-active span:last-child i {
  background-color: var(--white);
  color: var(--theme);
}

.service-details-wrapper .service-details-sidebar .service-list-item li a.is-active {
  background-color: var(--theme);
  color: var(--white);
}

.service-details-wrapper .service-details-sidebar .service-list-item li a.is-active span:last-child i {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image {
  border-radius: 10px;
  overflow: hidden;
  min-height: 360px;
  background: linear-gradient(145deg, var(--theme2) 0%, var(--theme) 100%);
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.35) 45%,
    transparent 100%
  );
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image > img,
.project-details-wrapper .project-details-sidebar .sidebar-widget-image > img {
  width: 100%;
  height: auto;
  min-height: 360px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.service-details-wrapper .service-details-sidebar .sidebar-widget-image .content,
.service-details-wrapper .service-details-sidebar .sidebar-widget-image .white-logo {
  z-index: 2;
}

.service-details-wrapper .service-details-content ul.service-list-items {
  display: block;
  gap: 0;
  margin-top: 1rem;
}

.service-details-wrapper .service-details-content ul.service-list-items li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  line-height: 1.65;
}

.service-details-wrapper .service-details-content ul.service-list-items li i.fa-circle-check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background-color: var(--theme);
  color: var(--white);
  font-size: 11px;
}

body.rtl .service-details-wrapper .service-details-sidebar .service-list-item li a span:last-child i,
html[dir="rtl"] .service-details-wrapper .service-details-sidebar .service-list-item li a span:last-child i {
  transform: scaleX(-1);
}

/* Service detail pages — single column + sticky sidebar (681–685) */
.page-freeform-content--full {
  padding: 0;
  max-width: none;
}

.service-details-wrapper .service-details-content .service-subsection {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.service-details-wrapper .service-details-content .service-subsection:first-of-type {
  margin-top: 2rem;
}

.service-details-wrapper .service-details-content .service-subsection.section-bg-2 {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  border-top: 0;
  border-radius: 12px;
  background-color: var(--bg);
}

.service-details-wrapper .service-details-sidebar {
  position: sticky;
  top: 110px;
}

@media (max-width: 991px) {
  .service-details-wrapper .service-details-sidebar {
    position: static;
    top: auto;
  }

  .service-details-wrapper .service-details-content .service-subsection.section-bg-2 {
    padding: 1.5rem 1rem;
  }
}

body.dark-mode .service-details-wrapper .service-details-content .service-subsection {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .service-details-wrapper .service-details-content .service-subsection.section-bg-2 {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Inner-page breadcrumb hero — dark fallback when image is loading or missing */
.breadcrumb-wrapper.bg-cover {
  background-color: var(--brand-navy);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

body:not(.home) .breadcrumb-wrapper.bg-cover::before {
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

body:not(.home) .breadcrumb-wrapper .page-heading {
  position: relative;
  z-index: 2;
}

/* Header language switcher — opposite language only, white text */
.header-1 .lang-switcher ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.header-1 .lang-switcher a {
  color: var(--brand-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.header-1 .lang-switcher a:hover {
  color: var(--brand-tan);
}

/* Mobile offcanvas: language row at end of menu — same look as meanmenu links */
.lang-switcher-mobile--menu-end ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.lang-switcher-mobile--menu-end li {
  margin: 0;
  padding: 0;
  width: 100%;
}

.offcanvas__info .lang-switcher-mobile--menu-end a {
  display: block;
  width: 100%;
  padding: 10px 0;
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 2;
  text-transform: capitalize;
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-navy) 20%, transparent);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.offcanvas__info .lang-switcher-mobile--menu-end a:hover {
  color: var(--brand-tan);
  background: transparent;
}

body.rtl .offcanvas__info .lang-switcher-mobile--menu-end a {
  text-align: right;
}

.hafiz-phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Footer bottom — centered copyright, no legal links */
.footer-bottom .footer-bottom-wrapper--centered {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-bottom .footer-bottom-wrapper--centered > p {
  width: 100%;
  margin: 0;
  text-align: center;
}

.footer-bottom .footer-bottom-wrapper--centered .social-icon {
  justify-content: center;
}

/* Pre-footer consultation CTA — white section above footer */
.hafiz-pre-footer-consult {
	background: #ffffff;
}

.hafiz-pre-footer-consult.section-bg {
	background: #ffffff;
}

.hafiz-pre-footer-consult__inner {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 16px;
	text-align: center;
}

.hafiz-pre-footer-consult .sub-title {
	justify-content: center;
	color: var(--header);
}

.hafiz-pre-footer-consult__title {
	margin-bottom: 0;
	color: var(--header);
}

.hafiz-pre-footer-consult__text {
	margin: 0 auto;
	max-width: 640px;
	color: #5a6578;
	font-size: 17px;
	line-height: 1.75;
	font-weight: 400;
}

.hafiz-pre-footer-consult__actions {
	margin-top: 32px;
}

.hafiz-pre-footer-consult__btn {
	display: inline-flex;
}

@media (max-width: 767px) {
	.hafiz-pre-footer-consult__text {
		font-size: 16px;
	}

	.hafiz-pre-footer-consult__actions {
		margin-top: 24px;
	}
}

body.dark-mode .hafiz-pre-footer-consult,
body.dark-mode .hafiz-pre-footer-consult.section-bg {
	background: #ffffff;
}

body.dark-mode .hafiz-pre-footer-consult .sub-title,
body.dark-mode .hafiz-pre-footer-consult__title {
	color: var(--header);
}

body.dark-mode .hafiz-pre-footer-consult__text {
	color: #5a6578;
}

/* Performance — faster preloader handoff */
.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/*
 * Section headers — one scale everywhere (default h2 48px is too large,
 * especially with English Source Code Variable on long titles).
 */
.section-title h2,
.section-title h2.tx-title,
.section-title h2.sec_title,
h2.tx-title.sec_title,
.hafiz-page-intro .section-title h2,
.hafiz-pre-footer-consult__title,
.about-wrapper .about-content p.hafiz-about-caption,
.about-wrapper .about-content h2.hafiz-about-caption {
	font-size: clamp(1.65rem, 3.2vw, 2.25rem);
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.about-wrapper .about-content p.hafiz-about-caption,
.about-wrapper .about-content h2.hafiz-about-caption {
	margin: 0;
	color: var(--header);
}

@media (max-width: 575px) {
	.section-title h2,
	.section-title h2.tx-title,
	.section-title h2.sec_title,
	h2.tx-title.sec_title,
	.hafiz-page-intro .section-title h2,
	.hafiz-pre-footer-consult__title,
	.about-wrapper .about-content p.hafiz-about-caption,
	.about-wrapper .about-content h2.hafiz-about-caption {
		font-size: 1.5rem;
	}
}

/* Main Al-Hafiz logo (vertical mark) — header / offcanvas / footer */
.header-1 .logo img,
.offcanvas__logo img,
.footer-logo img {
	max-height: 72px;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
}

@media (max-width: 991px) {
	.header-1 .logo img {
		max-height: 56px;
	}
}

.footer-logo img {
	max-height: 88px;
}

/* Team cards — same frame for every portrait */
.team-box-item-3 .thumb {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #ececec;
}

/* Team page cards — smaller, equal portraits */
.team-section .row.g-4.justify-content-center {
	margin-top: 30px;
	align-items: stretch;
}

.team-section .row.g-4.justify-content-center > [class*="col-"] {
	display: flex;
	justify-content: center;
}

.team-section .row.g-4.justify-content-center .team-box-item-3 {
	width: 100%;
	max-width: 280px;
}

.team-section .row.g-4.justify-content-center .team-box-item-3 .thumb {
	aspect-ratio: 4 / 5;
	width: 100%;
	height: auto;
	max-height: none;
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background: #ececec;
}

.team-box-item-3 .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 18%;
}

.team-box-item-3 .thumb img:nth-child(2) {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* Leadership / team profile rows — same crop as the cards */
.team-section .row.g-5 > [class*="col-"] > .thumb,
.team-section .row.g-5 .thumb {
	aspect-ratio: 4 / 5;
	max-height: 460px;
	overflow: hidden;
	border-radius: 10px;
	background: #ececec;
}

.team-section .row.g-5 .thumb img {
	width: 100%;
	height: 100%;
	max-height: 460px;
	object-fit: cover;
	object-position: center 18%;
	display: block;
}

@media (max-width: 991px) {
	.team-section .row.g-5 .thumb,
	.team-section .row.g-5 .thumb img {
		max-height: 360px;
	}
}

/* Team business cards — Arabic + English names side by side */
.hafiz-bilingual-name,
.team-box-item-3 .content h3.hafiz-bilingual-name,
.team-box-item-3 .content h3 a.hafiz-bilingual-name {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25em 0.45em;
	line-height: 1.35;
}

.hafiz-bilingual-name .hafiz-name-sep {
	opacity: 0.4;
	font-weight: 400;
	user-select: none;
}

.hafiz-bilingual-name .hafiz-name-en {
	font-weight: 500;
	opacity: 0.88;
	font-size: 0.92em;
	letter-spacing: 0.01em;
}

.hafiz-bilingual-name .hafiz-name-ar {
	font-weight: 600;
}

/* About — عملاؤنا / Our Clients */
.hafiz-clients-section {
	background: var(--bg, #f7f6f2);
}

.hafiz-clients-grid .hafiz-client-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 110px;
	padding: 1.25rem 1rem;
	border: 1px solid var(--border, #e5e2d8);
	border-radius: 10px;
	background: #fff;
	transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.hafiz-clients-grid .hafiz-client-logo img {
	max-width: 100%;
	max-height: 56px;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0.72;
	filter: grayscale(0.15);
	transition: opacity 0.35s ease, filter 0.35s ease;
}

.hafiz-clients-grid .hafiz-client-logo:hover {
	border-color: var(--theme, #bb8964);
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(15, 29, 55, 0.06);
}

.hafiz-clients-grid .hafiz-client-logo:hover img {
	opacity: 1;
	filter: none;
}

body.dark-mode .hafiz-clients-section {
	background: #141c2b;
}

body.dark-mode .hafiz-clients-grid .hafiz-client-logo {
	background: #1c2638;
	border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .hafiz-clients-grid .hafiz-client-logo img {
	filter: brightness(1.15) grayscale(0.1);
}

/* Dark mode: muted text + inline emails (Bootstrap .text-muted is dark + !important). */
.dark-body .page-wrapper .text-muted {
	color: rgb(255 255 255 / 72%) !important;
}

.dark-body .page-wrapper p a,
.dark-body .page-wrapper .text-muted a {
	color: var(--brand-tan, #bb8964);
}

.dark-body .page-wrapper p a:hover,
.dark-body .page-wrapper .text-muted a:hover {
	color: var(--brand-white, #fff);
}

/* Team intro — 20–30px space before member cards */
.about-text-inner.pt-4.pb-2 {
	padding-bottom: 24px !important;
}

.about-text-inner.pt-4.pb-2 .section-title {
	margin-bottom: 0 !important;
}

