/* Al Nour — section-level layout overrides (grids + small typography tweaks). Load AFTER alnour-pages.css */

/* ========================================================
   Clients — static logo grid (replaces the old marquee)
   Scoped to #clients so other pages/sections are unaffected.
   ======================================================== */
#clients .aq-clients-grid {
   --bs-gutter-x: 1.5rem;
   --bs-gutter-y: 1.5rem;
}

#clients .aq-clients-grid .aq-clients-card {
   flex: 1 1 auto;
   width: 100%;
   max-width: 100%;
   min-width: 0;
   height: 130px;
   padding: 16px 20px;
}

/* Text fallback when a client has no uploaded logo */
#clients .aq-clients-grid .aq-clients-card__name {
   font-size: 15px;
   font-weight: 700;
   line-height: 1.3;
   letter-spacing: .01em;
   text-align: center;
   color: var(--color-deepblue, #273169);
   overflow-wrap: anywhere;
}

#clients .aq-clients-grid .aq-clients-card img {
   max-width: 90%;
   max-height: 70px;
   width: auto;
   height: auto;
   object-fit: contain;
   opacity: 0.85;
   filter: grayscale(100%);
   transition: all 0.3s ease;
}

#clients .aq-clients-grid .aq-clients-card:hover {
   border-color: rgba(39, 49, 105, 0.08);
   transform: translateY(-2px);
}

#clients .aq-clients-grid .aq-clients-card:hover img {
   opacity: 1;
   filter: grayscale(0%);
}

/* Neutralize legacy marquee rules if old markup ever renders inside #clients */
#clients .aq-clients-marquee-wrap,
#clients .aq-clients-marquee,
#clients .aq-clients-marquee-track,
#clients .aq-clients-marquee-group {
   display: block;
   width: 100%;
   max-width: 100%;
   padding: 0;
   mask-image: none;
   -webkit-mask-image: none;
   animation: none !important;
   transform: none !important;
   will-change: auto;
}

@media (max-width: 991.98px) {
   #clients .aq-clients-grid .aq-clients-card {
      height: 110px;
      padding: 14px 16px;
   }

   #clients .aq-clients-grid .aq-clients-card img {
      max-height: 58px;
   }
}

@media (max-width: 575.98px) {
   #clients .aq-clients-grid {
      --bs-gutter-x: 0.75rem;
      --bs-gutter-y: 0.75rem;
   }

   #clients .aq-clients-grid .aq-clients-card {
      height: 92px;
      padding: 10px 12px;
   }

   #clients .aq-clients-grid .aq-clients-card img {
      max-height: 46px;
   }
}

/* ========================================================
   News article — excerpt highlight
   Brand yellow from the global constant, applied as a soft translucent fill.
   ======================================================== */
.an-article-excerpt {
   line-height: 1.7;
   background: rgba(240, 149, 58, 0.16);
   background: color-mix(in srgb, var(--color-yellow, #f0953a) 16%, transparent);
   border-left: 4px solid var(--color-yellow, #f0953a);
}

/* The same excerpt appears in the article banner — tint it with the brand yellow. */
.an-news-article-banner .an-page-banner__sub {
   color: rgba(240, 149, 58, 0.9) !important;
   color: color-mix(in srgb, var(--color-yellow, #f0953a) 90%, transparent) !important;
}

/* ========================================================
   Contact — factory visit heading (smaller than section titles)
   ======================================================== */
.aq-section-title.aq-contact-visit-title {
   font-size: 26px;
}

@media (max-width: 767.98px) {
   .aq-section-title.aq-contact-visit-title {
      font-size: 23px;
   }
}

@media (max-width: 575.98px) {
   .aq-section-title.aq-contact-visit-title {
      font-size: 21px;
   }
}

/* ========================================================
   Testimonials — dotted world-map backdrop + white cards
   Scoped to #testimonials so no other section/page changes.
   The map SVG is used as an alpha mask, so the dots themselves
   form the continents (not a square grid).
   ======================================================== */
#testimonials.aqf-testimonial-area {
   position: relative;
   isolation: isolate;
   overflow: hidden;
   background-color: #fff;
}

/* Layer 1: brand-blue dotted world map, centered and clipped. */
#testimonials.aqf-testimonial-area::before {
   content: "";
   position: absolute;
   inset: 0;
   z-index: 0;
   pointer-events: none;
   background-color: #273169;
   -webkit-mask-image: url("../img/bg/testimonials-dot-map.svg");
   mask-image: url("../img/bg/testimonials-dot-map.svg");
   -webkit-mask-repeat: no-repeat;
   mask-repeat: no-repeat;
   -webkit-mask-position: 50% 50%;
   mask-position: 50% 50%;
   -webkit-mask-size: 116% auto;
   mask-size: 116% auto;
   opacity: 0.11;
}

/* Layer 2: faint warm halo so the section does not feel flat. */
#testimonials.aqf-testimonial-area::after {
   content: "";
   position: absolute;
   inset: 0;
   z-index: 0;
   pointer-events: none;
   background: radial-gradient(58% 52% at 50% 46%,
      rgba(240, 149, 58, 0.07) 0%,
      rgba(240, 149, 58, 0) 72%);
}

#testimonials.aqf-testimonial-area > .container {
   position: relative;
   z-index: 1;
}

/* Equal-height slides: a single-row grid stretches every card to the
   tallest testimonial. Slide widths, x-positions and Swiper's transform
   math stay identical to its native flex layout. */
#testimonials .aqf-testimonial-active .swiper-wrapper {
   display: grid;
   grid-auto-flow: column;
   align-items: stretch;
}

#testimonials .aqf-testimonial-active .swiper-slide {
   height: auto;
   display: flex;
}

/* The testimonial itself is the shared card: white, #E6E6E6 border,
   8px radius, no shadow. Fills the full slide height. */
#testimonials .aqf-testimonial-item {
   width: 100%;
   height: 100%;
   display: flex;
   flex-direction: column;
   align-items: center;
   padding: 46px 44px 40px;
   background-color: #fff;
   border: 1px solid #E6E6E6;
   border-radius: 8px;
   box-shadow: none;
   transition: border-color 0.3s ease;
}

#testimonials .aqf-testimonial-item:hover {
   border-color: #E6E6E6;
   box-shadow: none;
}

/* Keep the quote text comfortable inside the narrower card. */
#testimonials .aqf-testimonial-text {
   flex: 1 1 auto;
   margin-bottom: 26px;
}

#testimonials .aqf-testimonial-text p {
   font-size: 26px;
   line-height: 1.6;
   max-width: 640px;
   margin-inline: auto;
}

#testimonials .aqf-testimonial-quote {
   margin-bottom: 24px;
}

#testimonials .aqf-testimonial-quote svg path {
   stroke: #273169;
}

#testimonials .aqf-testimonial-ratting {
   margin-bottom: 10px;
}

#testimonials .aqf-testimonial-info {
   margin-top: auto;
}

/* Arrows stay centered on the card, not on the wrapper's text. */
#testimonials .aqf-testimonial-arrow button {
   top: 50%;
   transform: translateY(-50%);
}

@media (max-width: 1199.98px) {
   #testimonials.aqf-testimonial-area::before {
      -webkit-mask-size: 168% auto;
      mask-size: 168% auto;
   }

   #testimonials .aqf-testimonial-item {
      padding: 40px 32px 34px;
   }

   #testimonials .aqf-testimonial-text p {
      font-size: 23px;
   }
}

@media (max-width: 991.98px) {
   #testimonials.aqf-testimonial-area::before {
      -webkit-mask-size: 190% auto;
      mask-size: 190% auto;
   }

   #testimonials .aqf-testimonial-item {
      padding: 34px 28px 30px;
   }

   #testimonials .aqf-testimonial-text p {
      font-size: 21px;
   }

   #testimonials .aqf-testimonial-quote {
      margin-bottom: 20px;
   }
}

@media (max-width: 767.98px) {
   #testimonials.aqf-testimonial-area::before {
      -webkit-mask-size: 230% auto;
      mask-size: 230% auto;
      opacity: 0.08;
   }

   #testimonials .aqf-testimonial-item {
      padding: 28px 22px 26px;
   }

   #testimonials .aqf-testimonial-text {
      margin-bottom: 20px;
   }

   #testimonials .aqf-testimonial-text p {
      font-size: 19px;
      line-height: 1.55;
   }

   #testimonials .aqf-testimonial-quote {
      margin-bottom: 16px;
   }

   #testimonials .aqf-testimonial-quote svg {
      width: 42px;
      height: auto;
   }
}

@media (prefers-reduced-motion: reduce) {
   #testimonials .aqf-testimonial-item {
      transition: none;
   }
}

/* ========================================================
   Mobile 2-Column Responsive Card System (< 576px)
   Balances layout, spacing, and typography for 2 cards per row.
   ======================================================== */
@media (max-width: 575.98px) {
   /* Grid card containers & equal height */
   .an-product-card-col,
   .an-category-card-col {
      display: flex !important;
   }

   .an-product-card-col > .an-card,
   .an-category-card-col > .an-card,
   .row > [class*="col-"] > .an-card {
      width: 100% !important;
      height: 100% !important;
   }

   /* Card structure & body */
   .an-card {
      border-radius: 6px !important;
      overflow: hidden !important;
      display: flex !important;
      flex-direction: column !important;
   }

   .an-card:hover {
      transform: none !important;
   }

   .an-card__body {
      padding: 10px 12px !important;
      flex: 1 1 auto !important;
      display: flex !important;
      flex-direction: column !important;
   }

   /* Card title - compact 13px - 14px, clamped to 2 lines */
   .an-card__title {
      font-size: 13.5px !important;
      line-height: 1.3 !important;
      margin: 0 0 4px !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
      word-break: break-word !important;
   }

   .an-card__title a {
      font-size: inherit !important;
      line-height: inherit !important;
   }

   /* Badges & Chips - compact 10px - 11px with slim padding */
   .an-chip {
      padding: 2px 6px !important;
      font-size: 10px !important;
      line-height: 1.2 !important;
      letter-spacing: 0.02em !important;
      border-radius: 2px !important;
   }

   .an-chip-overlay,
   .an-card .an-chip-overlay {
      margin: 6px 8px !important;
      max-width: calc(100% - 16px) !important;
   }

   /* Description & Excerpt - clamped to 1-2 lines on small screens */
   .an-card__body .an-clamp-2,
   .an-card__body p {
      font-size: 11.5px !important;
      line-height: 1.35 !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
      margin-bottom: 4px !important;
   }

   /* Meta details (SKU, MOQ, lead time, dates) */
   .an-card__meta {
      font-size: 11px !important;
      line-height: 1.3 !important;
      padding-top: 4px !important;
      margin-top: auto !important;
      display: flex !important;
      flex-wrap: wrap !important;
      gap: 3px 6px !important;
   }

   .an-card__meta span,
   .an-card__meta .an-meta-item {
      font-size: 11px !important;
      line-height: 1.25 !important;
   }

   .an-card__meta svg {
      width: 11px !important;
      height: 11px !important;
      margin-right: 2px !important;
   }

   /* Action link / Card Footer - compact size for 2-column fit */
   .an-card__footer {
      padding: 8px 10px !important;
      background: #fff !important;
   }

   .an-card__link {
      font-size: 11.5px !important;
      line-height: 1.2 !important;
      gap: 4px !important;
      letter-spacing: 0.01em !important;
   }

   .an-card__link svg {
      width: 12px !important;
      height: 12px !important;
      flex-shrink: 0 !important;
   }

   /* Media & clean aspect ratio scaling on mobile */
   .an-media {
      width: 100% !important;
      overflow: hidden !important;
   }

   .an-media.an-ratio-4x3,
   .an-ratio-4x3 {
      aspect-ratio: 4 / 3 !important;
   }

   .an-media.an-ratio-4x5,
   .an-ratio-4x5 {
      aspect-ratio: 4 / 5 !important;
   }

   .an-media.an-ratio-16x9,
   .an-ratio-16x9 {
      aspect-ratio: 16 / 9 !important;
   }

   .an-media img {
      width: 100% !important;
      height: 100% !important;
      object-fit: cover !important;
   }
}

