/**
 * Al Wa'i Brand Font Override
 * Load this AFTER style.css to replace Manrope with Madani Arabic / Outfit
 */

/* Arabic: Madani Arabic - Apply to all Arabic pages */
html[lang="ar"],
html[dir="rtl"],
html[lang="ar"] body,
html[dir="rtl"] body,
body[lang="ar"],
body[dir="rtl"] {
  --body-font: 'Madani Arabic', Arial, sans-serif !important;
  --heading-font: 'Madani Arabic', Arial, sans-serif !important;
  --main-font: 'Madani Arabic', Arial, sans-serif !important;
  --mainmenu-font: 'Madani Arabic', Arial, sans-serif !important;
}

/* English: Outfit - Apply to all English pages */
html[lang="en"],
html[dir="ltr"],
html[lang="en"] body,
html[dir="ltr"] body,
body[lang="en"],
body[dir="ltr"] {
  --body-font: 'Outfit', Arial, sans-serif !important;
  --heading-font: 'Outfit', Arial, sans-serif !important;
  --main-font: 'Outfit', Arial, sans-serif !important;
  --mainmenu-font: 'Outfit', Arial, sans-serif !important;
}

/* Force fonts on body and all text elements for Arabic pages */
html[lang="ar"],
html[dir="rtl"] {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

html[lang="ar"] body,
html[dir="rtl"] body,
body[lang="ar"],
body[dir="rtl"] {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[lang="ar"] .h1, html[lang="ar"] .h2, html[lang="ar"] .h3, html[lang="ar"] .h4, html[lang="ar"] .h5, html[lang="ar"] .h6,
html[dir="rtl"] .h1, html[dir="rtl"] .h2, html[dir="rtl"] .h3, html[dir="rtl"] .h4, html[dir="rtl"] .h5, html[dir="rtl"] .h6,
body[lang="ar"] h1, body[lang="ar"] h2, body[lang="ar"] h3, body[lang="ar"] h4, body[lang="ar"] h5, body[lang="ar"] h6,
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3, body[dir="rtl"] h4, body[dir="rtl"] h5, body[dir="rtl"] h6 {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

html[lang="ar"] #mainmenu .menu-item,
html[dir="rtl"] #mainmenu .menu-item,
html[lang="ar"] .mainmenu a,
html[dir="rtl"] .mainmenu a,
body[lang="ar"] #mainmenu .menu-item,
body[dir="rtl"] #mainmenu .menu-item {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

html[lang="ar"] .subtitle,
html[dir="rtl"] .subtitle,
html[lang="ar"] .lead,
html[dir="rtl"] .lead,
html[lang="ar"] p,
html[dir="rtl"] p,
html[lang="ar"] span,
html[dir="rtl"] span,
html[lang="ar"] div,
html[dir="rtl"] div,
body[lang="ar"] .subtitle,
body[dir="rtl"] .subtitle,
body[lang="ar"] .lead,
body[dir="rtl"] .lead,
body[lang="ar"] p,
body[dir="rtl"] p {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

html[lang="ar"] .btn-main,
html[dir="rtl"] .btn-main,
html[lang="ar"] .btn-line,
html[dir="rtl"] .btn-line,
html[lang="ar"] input,
html[dir="rtl"] input,
html[lang="ar"] select,
html[dir="rtl"] select,
html[lang="ar"] textarea,
html[dir="rtl"] textarea,
html[lang="ar"] button,
html[dir="rtl"] button,
body[lang="ar"] .btn-main,
body[dir="rtl"] .btn-main {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

html[lang="ar"] .de_count h2,
html[dir="rtl"] .de_count h2,
html[lang="ar"] .de_count div,
html[dir="rtl"] .de_count div,
html[lang="ar"] .accordion-section-title,
html[dir="rtl"] .accordion-section-title {
  font-family: 'Madani Arabic', Arial, sans-serif !important;
}

/* Force fonts for English pages */
html[lang="en"] body,
html[dir="ltr"] body,
body[lang="en"],
body[dir="ltr"] {
  font-family: 'Outfit', Arial, sans-serif !important;
}

html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4, html[lang="en"] h5, html[lang="en"] h6,
html[dir="ltr"] h1, html[dir="ltr"] h2, html[dir="ltr"] h3, html[dir="ltr"] h4, html[dir="ltr"] h5, html[dir="ltr"] h6 {
  font-family: 'Outfit', Arial, sans-serif !important;
}

/* ========== Floating Header (Lovable-style) ========== */

/* Base header override for floating style */
header.header-floating {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: none !important;
  padding: 0 !important;
  width: 100%;
}

header.header-floating.smaller {
  background: none !important;
}

/* Padding wrapper */
.header-floating-pad {
  padding: 16px 16px 0 16px;
}

/* Inner floating nav bar */
.header-floating-inner {
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 16px;
  background: rgba(28, 46, 62, 0.90);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  padding: 0 24px;
}

/* Scrolled state: more shadow, more opacity, stronger blur */
header.header-floating.smaller .header-floating-inner {
  background: rgba(28, 46, 62, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

/* Fix de-flex inside floating header */
header.header-floating .de-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

/* Logo adjustments */
header.header-floating #logo {
  display: flex;
  align-items: center;
}

header.header-floating #logo img {
  max-width: 70px;
  height: auto;
  filter: brightness(0) invert(1);
}

header.header-floating .logo-scroll,
header.header-floating .logo-mobile {
  display: none !important;
}

header.header-floating .logo-main {
  display: block !important;
}

header.header-floating.smaller .logo-main {
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

header.header-floating.smaller .logo-scroll {
  display: none !important;
}

/* Navigation links styling */
header.header-floating #mainmenu > li > a {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 14px !important;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 8px 0 !important;
}

header.header-floating #mainmenu > li > a:hover,
header.header-floating #mainmenu > li > a.active {
  color: #ffffff !important;
}

header.header-floating #mainmenu > li {
  margin: 0 16px;
}

header.header-floating.smaller #mainmenu > li > a {
  color: rgba(255, 255, 255, 0.7) !important;
}

header.header-floating.smaller #mainmenu > li > a:hover,
header.header-floating.smaller #mainmenu > li > a.active {
  color: #ffffff !important;
}

/* Header actions (language switch + CTA) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language switch button */
.btn-lang-switch {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.btn-lang-switch:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

/* CTA button in header */
.btn-cta-header {
  padding: 8px 20px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  background: #ffffff !important;
  color: var(--bg-dark-1) !important;
  border: none !important;
  transition: all 0.2s ease !important;
}

.btn-cta-header span {
  color: var(--bg-dark-1) !important;
}

.btn-cta-header:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: none !important;
}

/* Hide header-actions on mobile, show hamburger */
@media only screen and (max-width: 991px) {
  .header-actions {
    display: none !important;
  }
}

/* Mobile bottom action bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: rgba(28, 46, 62, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  gap: 8px;
}

@media only screen and (max-width: 991px) {
  .mobile-bottom-bar {
    display: flex !important;
  }
}

.mobile-bottom-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mobile-bottom-whatsapp {
  background: hsl(142, 70%, 40%);
  color: #ffffff !important;
}

.mobile-bottom-whatsapp:hover {
  background: hsl(142, 70%, 35%);
  color: #ffffff !important;
}

.mobile-bottom-whatsapp i {
  font-size: 18px;
}

.mobile-bottom-cta {
  background: #ffffff;
  color: var(--bg-dark-1) !important;
}

.mobile-bottom-cta:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--bg-dark-1) !important;
}

.mobile-bottom-cta i {
  font-size: 16px;
  color: var(--bg-dark-1) !important;
}

/* Add bottom padding to body to avoid content behind mobile bar */
@media only screen and (max-width: 991px) {
  body.page-home {
    padding-bottom: 70px;
  }
}

/* Floating header: ensure transparent on initial (hero visible behind) */
header.header-floating:not(.smaller) {
  background: none !important;
}

/* Mobile adjustments for floating header */
@media only screen and (max-width: 991px) {
  .header-floating-pad {
    padding: 8px 8px 0 8px;
  }

  .header-floating-inner {
    padding: 0 16px;
    border-radius: 12px;
  }

  header.header-floating .de-flex {
    height: 56px;
  }

  header.header-floating #logo img {
    max-width: 60px;
  }
}

/* Ensure floating header doesn't conflict with scroll-light */
header.header-floating.smaller.scroll-light {
  background: none !important;
}

header.header-floating.smaller.scroll-light .header-floating-inner {
  background: rgba(28, 46, 62, 0.95);
}

header.header-floating.smaller.scroll-light #mainmenu li a {
  color: rgba(255, 255, 255, 0.7) !important;
}

header.header-floating.smaller.scroll-light #mainmenu li a:hover,
header.header-floating.smaller.scroll-light #mainmenu li a.active {
  color: #ffffff !important;
}

header.header-floating.smaller.scroll-light .logo-main {
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

header.header-floating.smaller.scroll-light .logo-scroll {
  display: none !important;
}

/* Space below header for content positioning (h-24 = 96px) */
header.header-floating + section,
header.header-floating + .mobile-bottom-bar + section {
  /* Hero section already has no-top, so no extra space needed */
}

/* ========== End Floating Header ========== */

/* Floating header: mobile menu open state */
header.header-floating.menu-open {
  background: none !important;
}

header.header-floating.menu-open .header-floating-inner {
  background: rgba(28, 46, 62, 0.98) !important;
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

header.header-floating.header-mobile .header-floating-inner {
  overflow: hidden;
}

/* Floating header: mainmenu override in mobile */
header.header-floating.header-mobile #mainmenu {
  background: none;
  border: none;
}

header.header-floating.header-mobile #mainmenu > li > a {
  color: rgba(255, 255, 255, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0 !important;
}

header.header-floating.header-mobile #mainmenu > li > a:hover,
header.header-floating.header-mobile #mainmenu > li > a.active {
  color: #ffffff !important;
}

/* ========== End Floating Header Mobile ========== */

/* Floating header: hamburger button styling */
header.header-floating #menu-btn {
  color: #ffffff !important;
  margin-left: 0;
}

header.header-floating.header-mobile #menu-btn {
  color: #ffffff !important;
}

/* Floating header: remove container padding from existing structure */
header.header-floating .container {
  max-width: none;
  padding: 0;
}

/* Hero Background - Cover Image */
.hero-background {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1;
}

.mh-800 {
  position: relative;
  min-height: 800px;
  height: 100vh;
  max-height: 1000px;
}

/* حلول قانونية متكاملة - strip layout (no cards) */
.services-strip .services-strip-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.services-strip .services-strip-img img {
  max-height: 180px;
  object-fit: cover;
}

/* مسار واضح من الفهم إلى النتيجة - numbers white */
#section-methodology .de_count,
#section-methodology-services .de_count,
#section-methodology-practice .de_count {
  color: #fff !important;
}

/* شريكك القانوني الموثوق - visible selectable tabs (better UX) */
.tabs-intro-enhanced .tabs-intro-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.tabs-intro-enhanced .tabs-intro-nav li {
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--rounded-1);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, opacity 0.25s;
  opacity: 0.75;
}
.tabs-intro-enhanced .tabs-intro-nav li:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}
.tabs-intro-enhanced .tabs-intro-nav .active-tab {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff !important;
  opacity: 1;
}
.tabs-intro-enhanced .tab-label {
  font-weight: 600;
  font-size: 1rem;
}

/* Fix white space at end of AR home page */
body.page-home {
  min-height: auto !important;
  overflow-x: hidden;
}
body.page-home #wrapper {
  min-height: 0 !important;
}
body.page-home footer,
body.page-home .subfooter {
  margin-bottom: 0 !important;
}
body.page-home #section-contact-form {
  padding-bottom: 3rem;
}

/* Mobile: use same logo as large screen (logo-main) */
@media only screen and (max-width: 767px) {
  header .logo-main {
    display: block !important;
  }
  header .logo-mobile {
    display: none !important;
  }
}

/* RTL: float-text & scrollbar-v "العودة للأعلى" on right side (AR pages) */
html[dir="rtl"] .float-text,
body[dir="rtl"] .float-text {
  left: auto;
  right: 16px;
  transform: translate(50%, -50%);
}
html[dir="rtl"] .scrollbar-v,
body[dir="rtl"] .scrollbar-v {
  left: auto;
  right: 43px;
}

/* ========== AR Client Updates: remove brackets, larger subtitles, CTA ========== */
/* Remove bracket/parentheses styling from subtitles on AR pages */
html[lang="ar"] .subtitle::before,
html[lang="ar"] .subtitle::after,
html[dir="rtl"] .subtitle::before,
html[dir="rtl"] .subtitle::after {
  content: none !important;
  display: none !important;
}

/* Larger subtitle font on AR (عن الوعي للمحاماة، منهجيتنا في العمل، قيمنا، etc.) */
html[lang="ar"] .subtitle,
html[dir="rtl"] .subtitle {
  font-size: 1.2rem !important;
  font-weight: 600;
}
html[lang="ar"] #section-intro .subtitle.s2,
html[dir="rtl"] #section-intro .subtitle.s2 {
  font-size: 1.35rem !important;
}
html[lang="ar"] #section-methodology .subtitle,
html[dir="rtl"] #section-methodology .subtitle,
html[lang="ar"] #section-commitment .subtitle,
html[dir="rtl"] #section-commitment .subtitle {
  font-size: 1.3rem !important;
}

/* Header CTA button: floating header style */
html[lang="ar"] header.header-floating .btn-cta-header,
html[dir="rtl"] header.header-floating .btn-cta-header {
  padding: 8px 20px !important;
  font-size: 14px !important;
}

/* FAQ: question titles styled as h1 but look like questions */
html[lang="ar"] .accordion.s2 .accordion-section-title.faq-question,
html[dir="rtl"] .accordion.s2 .accordion-section-title.faq-question {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

/* About page: team section button larger */
#section-team-intro .btn-main.btn-lg {
  padding: 0.75rem 1.5rem !important;
  font-size: 1.1rem !important;
}

/* About page: subtle color scheme variation (secondary accent) */
body.page-about .bg-color,
body.page-about .bg-color-2 {
  background: var(--secondary-color) !important;
}
body.page-about #section-story,
body.page-about #section-licenses,
body.page-about #section-team-intro {
  background: var(--primary-color) !important;
}

/* ========== Lovable-style Footer ========== */
footer.footer-lovable {
  background: #1c2e3e;
  padding: 0;
  border-top: 1px solid #26333f;
}

/* Footer CTA Section */
.footer-cta {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid #26333f;
}
.footer-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #f7f9fb;
  margin-bottom: 1rem;
}
.footer-cta p {
  font-size: 1.1rem;
  color: rgba(247, 249, 251, 0.6);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.footer-cta .btn-main {
  padding: 12px 32px !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  background: #f7f9fb !important;
  color: #1c2e3e !important;
  border: none !important;
}
.footer-cta .btn-main span {
  color: #1c2e3e !important;
}
.footer-cta .btn-main:hover {
  background: rgba(247, 249, 251, 0.9) !important;
  transform: translateY(-1px);
}

/* Footer Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

.footer-col-brand .footer-logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 1rem;
}

.footer-col-brand p {
  color: rgba(247, 249, 251, 0.5);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f7f9fb;
  margin-bottom: 1.25rem;
}

/* Footer Links */
.footer-lovable .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-lovable .footer-links li {
  margin-bottom: 0.6rem;
}
.footer-lovable .footer-links a {
  color: rgba(247, 249, 251, 0.5);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-lovable .footer-links a:hover {
  color: #f7f9fb;
}

/* Footer Contact List */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.footer-contact-list li i {
  color: rgba(247, 249, 251, 0.4);
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}
.footer-contact-list li a {
  color: rgba(247, 249, 251, 0.5);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-contact-list li a:hover {
  color: #f7f9fb;
}

/* Footer Social */
.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(247, 249, 251, 0.06);
  border: 1px solid rgba(247, 249, 251, 0.1);
  color: rgba(247, 249, 251, 0.5);
  font-size: 1.1rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.footer-social a:hover {
  background: rgba(247, 249, 251, 0.12);
  border-color: rgba(247, 249, 251, 0.2);
  color: #f7f9fb;
}

/* Subfooter */
footer.footer-lovable .subfooter {
  border-top: 1px solid #26333f;
  padding: 1.25rem 0;
  margin-top: 0;
  background: transparent;
}
.subfooter-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.subfooter-inner > span {
  color: rgba(247, 249, 251, 0.4);
}
.subfooter-links {
  display: flex;
  gap: 1.5rem;
}
.subfooter-links a {
  color: rgba(247, 249, 251, 0.4);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.subfooter-links a:hover {
  color: #f7f9fb;
}

/* Footer Responsive */
@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-cta h2 {
    font-size: 1.5rem;
  }
}
@media (max-width: 575px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .footer-col-brand p {
    max-width: none;
  }
  .footer-social {
    justify-content: center;
  }
  .footer-contact-list li {
    justify-content: center;
  }
  .subfooter-inner {
    flex-direction: column;
    text-align: center;
  }
  .subfooter-links {
    justify-content: center;
  }
}

/* ========== End Lovable-style Footer ========== */

/* ========== Hero Section CTA Buttons ========== */
#section-hero .btn-main {
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 8px;
  min-width: 200px;
  text-align: center;
}

#section-hero .btn-main.btn-line {
  padding: 16px 38px;
  border-width: 2px;
}

@media (max-width: 768px) {
  #section-hero .btn-main {
    padding: 14px 28px;
    font-size: 16px;
    min-width: 160px;
    margin-bottom: 12px;
  }
}
/* ========== End Hero CTA Buttons ========== */
