:root {
  --alx-navy: #12181f;
  --alx-charcoal: #1a1f27;
  --alx-charcoal-light: #232a34;
  --alx-silver: #c9cdd3;
  --alx-silver-dark: #8b9096;
  --alx-white: #ffffff;
  --alx-red: #a70800;
  --alx-red-dark: #7e0600;
  --alx-gold: #fbbd08;
  --alx-gold-dark: #d9a100;

  --font-ar: 'Tajawal', 'Readex Pro', sans-serif;
  --font-en: 'Inter', 'Montserrat', sans-serif;

  --header-height: 128px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  background-color: var(--alx-white);
  color: var(--alx-charcoal);
  font-family: var(--font-en);
}

html[lang="ar"] body {
  font-family: var(--font-ar);
}

a {
  text-decoration: none;
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background-color: #f4f5f6;
}

.section-dark {
  background-color: var(--alx-navy);
  color: var(--alx-white);
}

.section-heading {
  margin-bottom: 3rem;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  color: var(--alx-red);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: #5b6470;
  max-width: 680px;
  margin: 0.75rem auto 0;
}

.section-dark .section-subtitle {
  color: var(--alx-silver);
}

/* Buttons */
.btn-alx-gold {
  background-color: var(--alx-gold);
  border-color: var(--alx-gold);
  color: var(--alx-navy);
  font-weight: 700;
}

.btn-alx-gold:hover,
.btn-alx-gold:focus {
  background-color: var(--alx-gold-dark);
  border-color: var(--alx-gold-dark);
  color: var(--alx-navy);
}

.btn-alx-outline-light {
  background-color: transparent;
  border-color: var(--alx-white);
  color: var(--alx-white);
  font-weight: 700;
}

.btn-alx-outline-light:hover,
.btn-alx-outline-light:focus {
  background-color: var(--alx-white);
  color: var(--alx-navy);
}

.btn-alx-red {
  background-color: var(--alx-red);
  border-color: var(--alx-red);
  color: var(--alx-white);
  font-weight: 700;
}

.btn-alx-red:hover,
.btn-alx-red:focus {
  background-color: var(--alx-red-dark);
  border-color: var(--alx-red-dark);
  color: var(--alx-white);
}

/* Header / Nav */
.alx-header {
  background-color: var(--alx-navy);
  min-height: var(--header-height);
}

.alx-header .navbar-brand img {
  height: 128px;
  width: auto;
}

.alx-header .nav-link {
  color: var(--alx-silver);
  font-weight: 600;
  margin-inline: 0.35rem;
}

.alx-header .nav-link:hover,
.alx-header .nav-link.active {
  color: var(--alx-white);
}

.alx-lang-switch a {
  color: var(--alx-silver);
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--alx-silver-dark);
  border-radius: 4px;
}

.alx-lang-switch a:hover,
.alx-lang-switch a.active {
  color: var(--alx-navy);
  background-color: var(--alx-gold);
  border-color: var(--alx-gold);
}

/* Placeholder panel */
.alx-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--alx-navy) 0%, var(--alx-charcoal-light) 55%, var(--alx-silver-dark) 130%);
  color: var(--alx-silver);
  min-height: 220px;
}

.alx-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 2px, transparent 2px, transparent 14px);
}

.alx-placeholder .alx-placeholder-inner {
  position: relative;
  text-align: center;
  padding: 1.5rem;
}

.alx-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--alx-gold);
  margin-bottom: 0.75rem;
}

.alx-placeholder-label {
  margin-top: 0.6rem;
  text-align: center;
  font-weight: 700;
  color: var(--alx-navy);
}

.alx-placeholder-photo {
  position: absolute;
  inset: 8%;
  /* A positioned <img> with only inset set keeps its own intrinsic pixel
     size instead of stretching to fill that box — explicit width/height
     are required before object-fit has a box to actually fit itself into. */
  width: 84%;
  height: 84%;
  object-fit: contain;
}

.alx-lightbox-trigger {
  cursor: zoom-in;
}

/* Shared "click a product photo to view it full-size" modal (#alxLightbox
   in layouts/app.blade.php), opened by the click handler in app.js. */
.alx-lightbox-dialog {
  max-width: 95vw;
  margin: 2.5vh auto;
}

.alx-lightbox-content {
  background: transparent;
  border: none;
  align-items: center;
}

/* Shrink-wraps to the photo's own rendered size (Bootstrap's .modal-content
   is a flex column stretched to the dialog's full width, so the close
   button can't be positioned against the photo's corner without this
   inner wrapper — positioning it directly on .modal-content placed it at
   the edge of that full-width invisible box instead). */
.alx-lightbox-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.alx-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 8px;
}

.alx-lightbox-close {
  position: absolute;
  top: -1rem;
  inset-inline-end: -1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--alx-navy);
  color: var(--alx-white);
  border: none;
  border-radius: 50%;
  padding: 0;
  z-index: 10;
}

.alx-lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* Hero
   The carousel and overlay are absolutely-positioned backgrounds; the
   text content stays in normal flow so it — not a fixed image height —
   drives .alx-hero's actual height. On mobile the wrapped headline and
   two buttons often need more than 78vh, and without this the text
   would overflow past the image and overlap the carousel controls. */
.alx-hero {
  position: relative;
}

/* Hero background is a single full-bleed photo (not several side by side).
   When photos are dropped into public/images/hero/, that one photo silently
   rotates through them (see .alx-hero-tile-img below and the rotator in
   app.js); with no hero photos uploaded yet it falls back to a product
   category photo, and finally to the plain SVG placeholder if none exist. */
.alx-hero-media,
.alx-hero-overlay {
  position: absolute;
  inset: 0;
  height: 100%;
}

/* z-index here (rather than "auto") gives .alx-hero-media its own stacking
   context, so the photos' own z-index (used for the slide transition) stays
   contained inside it instead of leaking out and painting above the
   overlay/text that come after it in the DOM. */
.alx-hero-media {
  z-index: 0;
}

.alx-hero-overlay {
  z-index: 1;
}

.alx-hero-media .alx-placeholder,
.alx-hero-tile {
  height: 100%;
  min-height: 480px;
  width: 100%;
}

/* The hero background should stay full-bleed even after a photo replaces the
   placeholder — unlike the smaller "framed" thumbnails elsewhere (product
   cards, about page), which shrink the photo to fit fully inside its frame. */
.alx-hero-media .alx-placeholder-photo {
  inset: 0;
  object-fit: cover;
}

/* Darker than a single hero photo needs at rest, because the rotation can
   land on a much brighter photo than the last — the headline/tagline/body
   text must stay readable over any of them. */
.alx-hero-overlay {
  background: linear-gradient(180deg, rgba(18, 24, 31, 0.62) 0%, rgba(18, 24, 31, 0.85) 85%);
}

/* The hero already overlays a headline/CTA on top of the photo, so the
   placeholder's own icon/caption is redundant clutter that visually clashes
   with that text. */
.alx-hero-media .alx-placeholder-inner {
  display: none;
}

/* The rotating hero photo: every image is stacked full-bleed in the same
   spot; app.js slides the front one out to the (visual) right to reveal the
   next one already waiting underneath. */
.alx-hero-tile {
  position: relative;
  overflow: hidden;
}

.alx-hero-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.alx-hero-tile-img.is-active {
  z-index: 2;
}

.alx-hero-tile-img.is-leaving {
  z-index: 3;
  transition: transform 1s ease;
  transform: translateX(100%);
}

.alx-hero-content {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  z-index: 2;
  color: var(--alx-white);
  padding-block: 3rem;
  /* Extra insurance for legibility over the tiled product photos: the
     overlay alone can't guarantee contrast against every photo's bright
     spots, so every text node in the hero gets a soft dark shadow too. */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.alx-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
}

.alx-hero-tagline {
  color: var(--alx-gold);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

/* Core strength / value cards */
.alx-pillar-card {
  height: 100%;
  padding: 2rem 1.5rem;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: var(--alx-white);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.alx-pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(18, 24, 31, 0.1);
  border-color: var(--alx-gold);
}

.alx-pillar-icon {
  width: 52px;
  height: 52px;
  color: var(--alx-red);
  margin-bottom: 1rem;
}

.alx-value-card {
  height: 100%;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  background-color: var(--alx-charcoal-light);
  border-top: 3px solid var(--alx-gold);
}

.alx-value-icon {
  width: 44px;
  height: 44px;
  color: var(--alx-gold);
  margin-bottom: 1rem;
}

/* Product cards */
.alx-product-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 340px;
  display: block;
  color: var(--alx-white);
}

.alx-product-card .alx-placeholder {
  height: 100%;
  min-height: unset;
}

.alx-product-card[role="button"] {
  cursor: pointer;
}

.alx-product-card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 24, 31, 0.92) 75%);
  transition: padding-bottom 0.25s ease;
}

.alx-product-card:hover .alx-product-card-body {
  padding-bottom: 2.25rem;
}

.alx-product-card-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--alx-white);
}

.alx-product-card-desc {
  font-size: 0.9rem;
  color: var(--alx-silver);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

.alx-product-card:hover .alx-product-card-desc {
  max-height: 100px;
  opacity: 1;
}

/* Touch devices have no hover state, so give clickable product cards a
   persistent "tap" badge instead of relying on the hover reveal above. */
.alx-product-card-tap {
  display: none;
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 0.75rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 31, 0.55);
  color: var(--alx-white);
}

.alx-product-card-tap-icon {
  width: 16px;
  height: 16px;
}

@media (hover: none) {
  .alx-product-card-tap {
    display: flex;
  }
}

/* Suppliers */
.alx-supplier-tile {
  height: 110px;
  border-radius: 8px;
  border: 1px solid #e6e8eb;
  background: var(--alx-white);
  padding: 1rem;
}

.alx-supplier-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Forms */
.alx-form-card {
  background: var(--alx-white);
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  padding: 2.5rem;
}

.alx-form-label {
  font-weight: 600;
}

.alx-urgency-group .btn-check:checked + .btn-outline-danger {
  background-color: var(--alx-red);
  border-color: var(--alx-red);
  color: var(--alx-white);
}

/* Footer */
.alx-footer {
  background-color: var(--alx-navy);
  color: var(--alx-silver);
}

.alx-footer a {
  color: var(--alx-silver);
}

.alx-footer a:hover {
  color: var(--alx-gold);
}

.alx-footer-hotline {
  background-color: var(--alx-red);
  color: var(--alx-white);
}

.alx-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--alx-silver-dark);
  margin-inline-end: 0.5rem;
}

.alx-footer-social a:hover {
  background-color: var(--alx-gold);
  border-color: var(--alx-gold);
  color: var(--alx-navy);
}

/* Copyright / credits / contact row: grid (not flex justify-between) so the
   middle "credits" item sits at the row's true center regardless of how
   wide the copyright and contact-info sides are. */
.alx-footer-bottom-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 1rem;
}

.alx-footer-bottom-end {
  display: flex;
  gap: 1rem;
  justify-self: end;
}

@media (max-width: 767.98px) {
  .alx-footer-bottom-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .alx-footer-bottom-end {
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
  }
}

.alx-map-frame {
  border: 0;
  width: 100%;
  height: 340px;
  border-radius: 8px;
}

/* Company profile */
.alx-profile-cover {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(18, 24, 31, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.alx-profile-cover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(18, 24, 31, 0.3);
}
