/* ==========================================================================
   responsive.css — layout polish, RTL spacing fixes, mobile tuning.
   Loaded last on every page so it wins the cascade.
   RTL-only rules are scoped with [dir="rtl"] so this one file serves
   both the Arabic (root) and English (/en/) pages.
   ========================================================================== */

/* --- Global --- */
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }

/* ==========================================================================
   Performance / no-JS-flash layer
   The template hides every Owl carousel (display:none) and every WOW element
   (visibility:hidden) until JavaScript runs, which tanks LCP + CLS. We no
   longer load GSAP ScrollSmoother or WOW.js, so free all of that here and
   let the first hero slide paint immediately.
   ========================================================================== */

/* ScrollSmoother is gone — the page scrolls natively */
html, body { height: auto; min-height: 100%; }
#smooth-wrapper, #smooth-content { overflow: visible; transform: none; height: auto; }

/* WOW.js and custom-animation.css are gone — make sure the reveal classes
   they used never leave content invisible. (Scoped away from .owl-item so
   Owl's own fadeIn transition still works.) */
.wow:not(.owl-item *),
.animated:not(.owl-item):not(.owl-item *) {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hero carousel: show the first slide before Owl initialises, at its real
   height, so it is the LCP element and nothing shifts when Owl takes over. */
#home-2 .single-slide-item { background-image: none; background-color: #1c1c1c; }
.homepage-slides { display: block; }
.homepage-slides:not(.owl-loaded) { position: relative; overflow: hidden; }
.homepage-slides:not(.owl-loaded) .single-slide-item { display: none; }
.homepage-slides:not(.owl-loaded) .single-slide-item:first-child { display: flex; }

/* Same idea for the other two carousels (below the fold, but still shifts) */
.project-slider:not(.owl-loaded) .single-project-item:not(:first-child),
.clients-inner:not(.owl-loaded) .single-client:nth-child(n + 5) { display: none; }

/* Hero height — reduced from the template's 800px / 700px, at every breakpoint.
   `height:auto` frees the template's fixed height; min-height keeps it stable
   and the flex centring still works. */
#home-2 .single-slide-item { height: auto !important; min-height: 540px; }
@media (min-width: 768px) { #home-2 .single-slide-item { min-height: 580px; } }
@media (min-width: 992px)  { #home-2 .single-slide-item { min-height: 660px; } }

/* Inline SVG icons that replaced Line Awesome */
.ico {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}
.action-bar a .ico { margin-inline-end: 8px; }
.section-link .ico { margin-inline-start: 6px; vertical-align: -0.15em; }
#hamburger .ico, .close-nav .ico { width: 1em; height: 1em; }

/* --- Header: keep the logo and the menu / hamburger clear of the edges --- */
.header-area .header-inner-box { align-items: center; }
.header-area .navigation .container { padding-left: 24px; padding-right: 24px; }

/* The template's logo (110px wide + a hard-coded height="96" attr) is taller
   than the 80px bar and spills onto the page below it. Pin it to a height
   that fits, keeping the real aspect ratio. */
.header-area .header-inner-box .logo,
.header-area .header-inner-box .logo a { display: inline-flex; align-items: center; line-height: 0; }
.header-area .header-inner-box .logo img {
  width: auto;
  height: 56px;
  max-height: 56px;
}

@media (max-width: 991px) {
  .header-area .mobile-nav-bar { flex: 0 0 auto; width: auto; max-width: none; }
  .header-area #hamburger {
    width: auto; display: inline-flex; align-items: center;
    font-size: 30px; line-height: 1; cursor: pointer;
  }
  .header-area .header-inner-box .logo img { height: 46px; max-height: 46px; }
}

/* --- RTL: the template pads content on the LEFT; mirror it to the RIGHT --- */
[dir="rtl"] #home-2 .hero-area-content { padding-left: 0; padding-right: 80px; }
@media only screen and (min-width: 768px) and (max-width: 991px) {
  [dir="rtl"] #home-2 .hero-area-content { padding-right: 40px; }
}
@media (max-width: 767px) {
  [dir="rtl"] #home-2 .hero-area-content { padding-right: 0; }
}

/* Hero copy always sits comfortably inside the viewport */
#home-2 .hero-area-content .container { padding-left: 24px; padding-right: 24px; }

[dir="rtl"] .about-content-wrap,
[dir="rtl"] .about-middle-wrap,
[dir="rtl"] .service-left,
[dir="rtl"] .process-left,
[dir="rtl"] .project-content-wrap,
[dir="rtl"] .footer-content-wrap,
[dir="rtl"] .breadcrumb-title,
[dir="rtl"] .contact-info-wrap { text-align: right; }

/* --- Breadcrumb heading: large Arabic type needs room, not tight tracking --- */
[dir="rtl"] .breadcrumb-bg .breadcrumb-title h1 { letter-spacing: 0; line-height: 1.15; }
.breadcrumb-bg .container { padding-left: 24px; padding-right: 24px; }
@media (max-width: 991px) {
  .breadcrumb-bg { height: auto; min-height: 340px; padding-top: 130px; padding-bottom: 44px; }
  .breadcrumb-bg .breadcrumb-title h1 { font-size: 64px; }
}
@media (max-width: 767px) {
  .breadcrumb-bg { min-height: 300px; padding-top: 120px; }
  .breadcrumb-bg .breadcrumb-title h1 { font-size: 44px; }
  .breadcrumb-tagline { margin-top: 16px; }
}

/* --- Tame the very large vertical rhythm on smaller screens --- */
@media (max-width: 991px) {
  .section-padding { padding-top: 80px; padding-bottom: 80px; }
  .section-padding.pt-0 { padding-top: 0; }
  .pt-100 { padding-top: 70px !important; }
  .pt-80  { padding-top: 60px !important; }
}
@media (max-width: 767px) {
  .section-padding { padding-top: 56px; padding-bottom: 56px; }
}

/* --- Hero on phones: readable heading, sensible height --- */
@media (max-width: 767px) {
  #home-2 .single-slide-item { min-height: 580px; }
  .hero-area-content .section-title h1 { font-size: 38px; line-height: 1.2; }
  .hero-area-content p { font-size: 16px; }
  .hero-area-content .theme-btn { margin-top: 24px; }
}

/* --- Body copy: the RTL sheet sets line-height:2 which is airy on phones --- */
@media (max-width: 767px) {
  [dir="rtl"] .about-content-wrap p,
  [dir="rtl"] .service-left p,
  [dir="rtl"] .project-content-wrap p,
  [dir="rtl"] p { line-height: 1.9; }
  .about-content-wrap p,
  .service-left p,
  .project-content-wrap p { font-size: 15px; }
}

/* --- Home sections: stack cleanly and keep side padding on mobile --- */
@media (max-width: 991px) {
  .about-inner,
  .service-inner { flex-direction: column; }
  .about-inner > *,
  .service-inner > * { width: 100% !important; max-width: 100% !important; }
  .about-content-wrap,
  .about-middle-wrap,
  .service-left { padding-left: 24px !important; padding-right: 24px !important; }
  .service-right .service-item { min-height: 320px; }
}

/* --- Process / project / footer blocks --- */
@media (max-width: 991px) {
  .process-left,
  .project-content-wrap,
  .footer-content-wrap { padding-left: 0; padding-right: 0; }
}

/* --- Mobile slide-in menu ---------------------------------------------------
   The template slides the panel with a `right` offset that stalls under the
   smooth-scroll wrapper; drive it with a transform instead. --- */
.mobile-nav {
  right: 0 !important;
  left: auto !important;
  width: min(84vw, 340px) !important;
  transform: translateX(110%);
  transition: transform 0.25s ease-out;
  padding: 26px 22px;
  overflow-y: auto;
}
.mobile-nav.show { transform: translateX(0) !important; }

.mobile-nav .sidebar-nav { margin-top: 56px; }
.mobile-nav .sidebar-nav .metismenu a { padding: 14px 8px; font-size: 14px; }
[dir="rtl"] .mobile-nav .sidebar-nav .metismenu a { text-align: right; }
.mobile-nav .action-bar { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
[dir="rtl"] .mobile-nav .action-bar { align-items: flex-end; text-align: right; }

/* backdrop sits above the page but below the panel */
.overlay.active { z-index: 998 !important; }
.mobile-nav { z-index: 999 !important; }

/* --- Services / projects grid pages --- */
@media (max-width: 991px) {
  #service-4 .container { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 575px) {
  #service-4 .service-item { min-height: 280px; }
}

/* --- Headings: the template's display sizes are huge on small screens --- */
@media (max-width: 991px) {
  .section-title h1,
  #service-4 .section-title h1,
  #home-2 .section-title h1 { font-size: 46px; line-height: 1.15; }
  .section-title h2, .section-top h2, .about-content-wrap h2 { font-size: 34px; line-height: 1.2; }
  #footer-2 .footer-content-wrap h1,
  .footer-content-wrap h1 { font-size: 40px; line-height: 1.15; }
}
@media (max-width: 767px) {
  .section-title h1,
  #service-4 .section-title h1,
  #home-2 .section-title h1 { font-size: 33px; }
  .section-title h2, .section-top h2, .about-content-wrap h2 { font-size: 26px; }
  #footer-2 .footer-content-wrap h1,
  .footer-content-wrap h1 { font-size: 29px; line-height: 1.4; }
  #footer-2 .footer-content-wrap h1 span { line-height: 1.4; }
  .contact-num span.num { font-size: 19px; line-height: 1.5; word-break: break-word; }
  .contact-num span.num.ltr { font-size: 21px; }
  .single-contact-info .p-xl { font-size: 20px; }
  /* the template's tight negative tracking swallows word gaps at small sizes */
  h1, h2, .section-title h1,
  #footer-2 .footer-content-wrap h1,
  #footer-2 .footer-content-wrap h1 span,
  #service-4 .section-title h1,
  .breadcrumb-bg .breadcrumb-title h1,
  #home-2 .hero-area-content h1 { letter-spacing: normal; }
}

/* --- Contact form: full width & spacing on mobile --- */
@media (max-width: 991px) {
  .contact-section .container { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 767px) {
  .contact-form-wrap input,
  .contact-form-wrap textarea,
  .contact-form-wrap button { width: 100%; }
  .contact-section .row > [class*="col-"] + [class*="col-"] { margin-top: 28px; }
  .contact-num { margin-top: 34px; }
  .contact-num span.title { margin-bottom: 10px; }
}

/* --- Footer contact block ------------------------------------------------
   The template leaves the label <span> and value <p> inline, so the phone ran
   into its label — force the stacked layout. And the background photo has
   bright patches (sunlit lawn) that wash out white text, so drop the photo
   for a flat dark panel: guaranteed legibility everywhere. */
#footer-2,
#footer-2.footer-section {
  background-image: none !important;
  background-color: #141414 !important;
}

#footer-2 .section-title .subtitle,
#footer-2 .footer-content-wrap p,
#footer-2 .single-contact-info span {
  color: #ffffff !important;
  opacity: 1 !important;
}
#footer-2 .single-contact-info span {
  display: block;
  opacity: 0.65 !important;
  font-size: 14px !important;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
#footer-2 .single-contact-info p,
#footer-2 .single-contact-info p.p-xl,
#footer-2 .single-contact-info p.ltr {
  display: block;
  color: #ffffff !important;
  opacity: 1 !important;
  line-height: 1.55;
}
/* Bigger phone / e-mail / address values in the footer */
#footer-2 .single-contact-info p,
#footer-2 .single-contact-info p.p-xl,
#footer-2 .single-contact-info p.ltr { font-size: 25px !important; }
#footer-2 .single-contact-info p.p-xl { font-size: 30px !important; }
#footer-2 .single-contact-info:last-child p { font-size: 21px !important; line-height: 1.8; }
[dir="rtl"] #footer-2 .single-contact-info p.ltr,
[dir="rtl"] #footer-2 .single-contact-info span { text-align: right; }

/* Safari (esp. iOS) auto-links the bare phone number into an <a> and paints it
   with the UA link colour (-apple-system-blue) — invisible on the dark panel.
   Force every link inside the footer contact block back to white. Chrome
   doesn't auto-detect, which is why it only showed there. */
#footer-2 .contact-info-wrap a,
#footer-2 .single-contact-info a,
#footer-2 .single-contact-info p a,
#footer-2 a[href^="tel:"],
#footer-2 a[href^="mailto:"] {
  color: #ffffff !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #ffffff !important;
  font: inherit;          /* the template's a{font-size:12px} was shrinking these */
  letter-spacing: inherit;
  transition: opacity 0.25s ease;
}
#footer-2 .single-contact-info p a:hover,
#footer-2 .single-contact-info p a:focus-visible { opacity: 0.65; }

/* Contact page: the big phone / e-mail / address are now links too */
.contact-num span.num a {
  color: inherit;
  font: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease;
}
.contact-num span.num a:hover,
.contact-num span.num a:focus-visible { opacity: 0.6; }

@media (max-width: 767px) {
  #footer-2 { padding-top: 60px; }
  #footer-2 .footer-content-wrap { margin-bottom: 36px; }
  #footer-2 .contact-info-wrap { margin-top: 0 !important; }
  #footer-2 .single-contact-info { margin-bottom: 24px; }
  #footer-2 .single-contact-info span { font-size: 13px !important; margin-bottom: 7px; }
  #footer-2 .single-contact-info p,
  #footer-2 .single-contact-info p.p-xl,
  #footer-2 .single-contact-info p.ltr { font-size: 23px !important; line-height: 1.6; }
  #footer-2 .single-contact-info p.p-xl { font-size: 27px !important; }
  #footer-2 .single-contact-info:last-child p { font-size: 19px !important; line-height: 1.75; }
}

/* --- Footer bottom bar: stack + centre the icons and copyright on mobile --- */
@media (max-width: 767px) {
  .footer-bottom { padding-top: 22px; padding-bottom: 22px; }
  .footer-bottom .footer-bottom-content {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
  }
  .footer-bottom .social-wrap ul {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0;
  }
  .footer-bottom .social-wrap ul li { margin: 0 !important; }
  .footer-bottom .social-wrap ul li a { padding: 6px; }
  .footer-bottom .copyright-wrap { font-size: 12.5px; line-height: 1.5; }
}

/* --- WhatsApp floating button: sits just below the back-to-top arrow -------
   The arrow (.progress-wrap) only shows on scroll; this button is always
   visible. Nudge the arrow up so the two never touch. */
.whatsapp-float {
  position: fixed;
  right: 50px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover,
.whatsapp-float:focus {
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}
.whatsapp-float svg { display: block; }

.progress-wrap { bottom: 92px; }

@media only screen and (min-width: 768px) and (max-width: 991px) {
  .whatsapp-float { right: 20px; }
  .progress-wrap { right: 20px; bottom: 92px; }
}
@media (max-width: 767px) {
  .whatsapp-float { right: 20px; bottom: 24px; width: 50px; height: 50px; }
  .progress-wrap { right: 20px; bottom: 92px; }
}
