/* ---------------------------------------------------------------
   Al Salama Group - UI/UX polish layer
   Hand-written. Loads after site-theme.css (which recolours the
   template). Everything here is additive: sizing, spacing, motion,
   focus states and mobile fixes. Works for both LTR and RTL pages.
   --------------------------------------------------------------- */

:root {
  --brand-navy: #1E3A8A;
  --brand-navy-deep: #12275C;
  --brand-gold: #B45309;
  --brand-gold-soft: #D9A441;
  /* gold is too dark to read on navy - this one clears 4.5:1 there */
  --brand-gold-on-dark: #E7B85C;
  --ink: #0F172A;
  --ink-muted: #475569;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --line: #E2E8F0;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, .12);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --speed: 240ms;
}

/* ---------- 1. Page-level guards ------------------------------- */

html,
body {
  overflow-x: clip;
  max-width: 100%;
}

body {
  color: var(--ink-muted);
  background: var(--surface);
}

img {
  max-width: 100%;
}

/* The template appends a floating light/dark switch. It ships a second
   colour scheme that fights the brand palette - keep it out of sight. */
.switch-box {
  display: none !important;
}

/* ---------- 2. Accessibility ----------------------------------- */

a,
button,
.default-btn,
.btn,
[role="button"] {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.default-btn:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--brand-gold-soft);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.page-title .title-text h2,
.banner-slider .banner-item .banner-text h1 {
  text-wrap: balance;
}

/* ---------- 3. Partner logos ----------------------------------- */
/* One box for every logo regardless of the source image's aspect
   ratio, so a square academy crest and a wide wordmark read as equals. */

.company-section .company-slider .company-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  padding: 16px;
}

.company-section .company-slider .company-logo img,
.company-slider .company-logo img {
  width: auto !important;
  height: auto !important;
  max-height: 84px;
  max-width: 180px;
  object-fit: contain;
  margin: auto;
  /* a light desaturation unifies three very different logos without
     washing out the fine lettering inside them */
  filter: grayscale(.2);
  opacity: .9;
  transition: filter var(--speed) var(--ease), opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}

/* Replaces the template's brightness(.5) + scale(.8) shrink-on-hover */
.company-section .company-slider .company-logo img:hover,
.company-slider .company-logo a:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.04);
}

/* The template pulls this section up by -100px so the white card overlaps
   whatever sits above it. Keep the overlap, just add breathing room below;
   a background colour here would clip the section above. */
.company-section {
  padding-bottom: 60px;
  background: transparent;
}

/* ---------- 4. Partner cards ----------------------------------- */

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px !important;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #C7D2E6 !important;
}

.partner-card img {
  height: 92px;
  max-height: 92px !important;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 18px !important;
}

.partner-card h5 {
  color: var(--brand-navy);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.partner-card p {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 18px;
  flex-grow: 1;
}

.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.partner-actions .btn {
  margin: 0 !important;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--speed) var(--ease);
}

.partner-actions .btn-primary {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}

.partner-actions .btn-primary:hover {
  background: var(--brand-navy-deep);
  border-color: var(--brand-navy-deep);
  transform: translateY(-2px);
}

.partner-actions .btn-outline-primary {
  color: var(--brand-navy);
  border-color: #C7D2E6;
}

.partner-actions .btn-outline-primary:hover {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- 5. Content cards ----------------------------------- */

.transport-section .transport-card,
.features-section .feature-card,
.contact-card-section .contact-card {
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.transport-section .transport-card:hover,
.features-section .feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.transport-section .transport-card .transport-img img {
  transition: transform 450ms var(--ease);
}

.transport-section .transport-card:hover .transport-img img {
  transform: scale(1.05);
}

.contact-card-section .contact-card {
  border-radius: var(--radius);
  overflow: hidden;
}

/* These cards sit on navy: the template leaves the label and the value in
   dark ink, which is unreadable against it. */
.contact-card-section .contact-card h5 {
  color: var(--brand-gold-on-dark);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-card-section .contact-card p,
.contact-card-section .contact-card a {
  color: #F1F5F9;
  font-size: 16px;
  word-break: break-word;
}

.contact-card-section .contact-card a:hover,
.contact-card-section .contact-card a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.contact-card-section .contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ---------- 6. Buttons ----------------------------------------- */

.theme-btn .default-btn,
.banner-slider .banner-item .banner-text .banner-btn .default-btn {
  border-radius: var(--radius-sm);
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease),
    transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.theme-btn .default-btn:hover,
.banner-slider .banner-item .banner-text .banner-btn .default-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- 7. Section rhythm ---------------------------------- */

.section-title h2 {
  line-height: 1.3;
  text-wrap: balance;
}

.section-title span {
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
}

/* Arabic does not use letter-spacing or caps */
[dir="rtl"] .section-title span {
  letter-spacing: normal;
  text-transform: none;
}

.page-title {
  padding-top: 120px;
  padding-bottom: 120px;
}

/* ---------- 8. Scroll reveal ----------------------------------- */
/* Only applies when JS is running (html.js) so no-JS users and
   crawlers always see the content. Elements already handled by the
   template's WOW.js are excluded in site.js. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---------- 9. Back-to-top ------------------------------------- */

.top-btn {
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.top-btn:hover {
  transform: translateY(-3px);
}

/* ---------- 10. Footer ----------------------------------------- */

/* No page uses the template's footer widget columns, so the reserved
   space renders as a large empty band above the copyright line. */
.footer-area {
  padding-top: 0;
}

.footer-area .copyright-area {
  margin-top: 0;
  padding: 22px 0;
}

.footer-area .copyright-area p {
  margin-bottom: 0;
  font-size: 15px;
}

footer.footer-area {
  background: var(--brand-navy);
  color: #E2E8F0;
}

footer.footer-area p {
  color: #E2E8F0;
}

/* ---------- 11. Mobile ----------------------------------------- */

@media (max-width: 991px) {
  /* hamburger + drawer links follow the brand navy */
  .navbar-area .mean-container a.meanmenu-reveal span {
    background: var(--brand-navy);
  }

  .navbar-area .mobile-nav nav .navbar-nav .nav-item a {
    color: var(--brand-navy);
  }

  .navbar-area .mean-container .mean-bar {
    background-color: #fff;
  }

  /* the logo carries inline width/height from the template and overflows the
     55px mobile bar, spilling onto the banner below */
  .navbar-area .mobile-nav .logo img {
    width: auto !important;
    height: 40px !important;
    object-fit: contain;
  }

  .navbar-area .mobile-nav .logo {
    top: 8px;
  }
}

@media (max-width: 767px) {
  .banner-slider .banner-item {
    padding: 120px 0;
  }

  .banner-slider .banner-item .banner-text {
    padding-inline: 4px;
  }

  .banner-slider .banner-item .banner-text h1 {
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.25;
  }

  .banner-slider .banner-item .banner-text p {
    font-size: 15px;
    line-height: 1.75;
  }

  .banner-slider .banner-item .banner-text .banner-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .banner-slider .banner-item .banner-text .banner-btn .default-btn {
    margin: 0 !important;
  }

  .page-title {
    padding-top: 90px;
    padding-bottom: 90px;
  }

  .page-title .title-text h2 {
    font-size: clamp(24px, 6.5vw, 32px);
  }

  .section-title h2 {
    font-size: clamp(22px, 6vw, 30px);
  }

  .company-section .company-slider .company-logo {
    height: 100px;
  }

  .partner-card {
    padding: 24px 18px !important;
  }

  /* touch targets stay at 44px minimum */
  .partner-actions .btn,
  .theme-btn .default-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ---------- 12. Decorative frame animation --------------------- */
/* The template cycles the two squares behind the about image through
   its old purple/orange. Re-point the keyframes at the brand palette. */

@-webkit-keyframes bg-cng {
  0% { background: #E9EEF5; }
  35% { background: var(--brand-gold-soft); -webkit-transform: translateY(10px); transform: translateY(10px); }
  70% { background: var(--brand-navy); -webkit-transform: translateY(0px); transform: translateY(0px); }
  100% { background: #E9EEF5; }
}

@keyframes bg-cng {
  0% { background: #E9EEF5; }
  35% { background: var(--brand-gold-soft); -webkit-transform: translateY(10px); transform: translateY(10px); }
  70% { background: var(--brand-navy); -webkit-transform: translateY(0px); transform: translateY(0px); }
  100% { background: #E9EEF5; }
}

/* ---------- 13. Reduced motion --------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
