/* =============================================================
   ARAFA CNC — ABOUT PAGE
   01. Hero cover
   02. Company introduction
   03. Company statistics
   04. Vision / Mission / Partnership
   05. Legacy certificates grid (if used)
   06. Partners & certifications slider
   07. Responsive rules
   ============================================================= */

/* =============================================================
   01 — ABOUT HERO COVER
   ============================================================= */
.about-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 310px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(rgba(5, 24, 37, .58), rgba(5, 24, 37, .58)),
              url('../images/about/cover.png') center / cover no-repeat;
}

.about-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 24, 37, .20), rgba(5, 24, 37, .35) 40%, rgba(5, 24, 37, .55));
}

.about-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
  margin-inline-start: auto;
  padding: 60px 0;
  text-align: start;
}

.about-hero__content h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(42px, 5vw, 78px);
  font-weight: 800;
  line-height: 1;
}

.about-hero__content p {
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font-size: 24px;
  line-height: 1.8;
}

html[dir='ltr'] .about-hero__content {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

/* =============================================================
   02 — COMPANY INTRODUCTION
   ============================================================= */
.about-intro {
  display: flex;
  align-items: center;
  gap: 48px;
}

.about-intro > * {
  flex: 1 1 0;
  min-width: 0;
}

.about-intro__content {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-intro__content .section-title,
.about-intro__content .section-lead,
.about-intro__content p {
  margin: 0;
}

.about-intro__image {
  order: 1;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg, 18px);
  background: #dfe5ea;
  box-shadow: 0 18px 38px rgba(9, 32, 51, .10);
}

.about-intro__image img {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

/* =============================================================
   03 — COMPANY STATISTICS
   ============================================================= */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.about-stat {
  padding: 25px;
  text-align: center;
  background: var(--bg-soft, #f7f9fc);
  border: 1px solid #e5e9ed;
  border-radius: var(--radius-md, 12px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.about-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 92, 0, .35);
  box-shadow: 0 12px 28px rgba(5, 24, 37, .08);
}

.about-stat strong {
  display: block;
  margin-bottom: 5px;
  color: var(--primary, #f58220);
  font-size: 34px;
  font-weight: 800;
}

/* =============================================================
   04 — VISION / MISSION / PARTNERSHIP
   ============================================================= */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.value-card {
  min-height: 220px;
  padding: 30px;
}

.value-card i {
  margin-bottom: 18px;
  color: var(--primary, #f58220);
  font-size: 34px;
}

/* =============================================================
   05 — LEGACY CERTIFICATES GRID
   Kept for compatibility if .cert-grid is used elsewhere.
   ============================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-top: 28px;
}

.cert-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 285px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dfe5ea;
  border-radius: 16px;
  cursor: zoom-in;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.cert-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .28s ease;
}

.cert-card:hover {
  z-index: 2;
  transform: scale(1.08);
  border-color: var(--primary, #f58220);
  box-shadow: 0 22px 50px rgba(5, 24, 37, .22);
}

.cert-card:hover img { transform: scale(1.02); }

/* =============================================================
   06 — PARTNERS & CERTIFICATIONS SLIDER
   Works with .ara-partner-top / .ara-partner-content HTML.
   4 cards on desktop, 2 on tablet, 1 on mobile.
   ============================================================= */
.ara-partners {
  --ap-navy: #0d2444;
  --ap-orange: #ff841d;
  --ap-orange-dark: #df6d0d;
  --ap-text: #69758d;
  --ap-border: #e2e9f0;
  --partners-visible: 4;
  --partners-gap: 12px;
  position: relative;
  isolation: isolate;
  padding: 64px 0 56px;
  overflow: hidden;
  background: linear-gradient(112deg, #f7faff 0%, #edf5fc 100%);
}

/* Decorative world-map overlay removed: its image (images/partners/world-map.png)
   never existed in the original site either, so it only produced a 404.
   Re-add the ::before rule here if an approved map asset is supplied. */

.ara-partners .ara-partners-container {
  position: relative;
  width: min(calc(100% - 48px), 1440px);
  max-width: 1440px;
  margin-inline: auto;
}

/* 06.1 — Section heading */
.ara-partners-header {
  max-width: 850px;
  margin-bottom: 26px;
  text-align: start;
}

.ara-partners-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
  color: var(--ap-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.ara-partners-eyebrow i {
  display: block;
  width: 58px;
  height: 2px;
  background: var(--ap-orange);
  border-radius: 4px;
}

.ara-partners-header .section-title {
  margin: 0 0 15px;
  color: var(--ap-navy);
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.7px;
  text-align: start;
}

.ara-partners-header p {
  max-width: 770px;
  margin: 0;
  color: var(--ap-text);
  font-size: 14px;
  line-height: 1.8;
}

/* 06.2 — Slider layout */
.ara-partners-slider {
  position: relative;
  min-width: 0;
  width: 100%;
}

.ara-partners-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--partners-gap);
  width: 100%;
  padding: 4px 1px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  direction: ltr;
}

.ara-partners-track::-webkit-scrollbar { display: none; }
html[dir='rtl'] .ara-partners-track { direction: rtl; }

/* 06.3 — Card */
.ara-partners .ara-partner-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (var(--partners-visible) - 1) * var(--partners-gap)) / var(--partners-visible));
  min-width: 0;
  padding: 13px 12px 12px;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  text-align: start;
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 13px;
  box-shadow: 0 5px 18px rgba(12, 36, 66, .04);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.ara-partners .ara-partner-card:hover {
  transform: translateY(-3px);
  border-color: #f5b27b;
  box-shadow: 0 12px 28px rgba(245, 130, 32, .11);
}

/* 06.4 — Logo & accreditation badge */
.ara-partner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 38px;
  margin-bottom: 10px;
}

.ara-partner-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
}

.ara-partner-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 38px;
  object-fit: contain;
}

.ara-partner-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 20px;
  white-space: nowrap;
  color: #f47419;
  background: #fff0e6;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
}

.ara-partner-badge--orange { color: #f47419; background: #fff0e6; }
.ara-partner-badge--blue   { color: #1186d6; background: #e8f5ff; }
.ara-partner-badge--red    { color: #ef5066; background: #fff0f1; }
.ara-partner-badge--green  { color: #03a66a; background: #e9fff4; }

/* 06.5 — Certificate image: FULL WIDTH, NO GRAY BACKGROUND */
.ara-partner-cert {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 174px;
  min-height: 0;
  padding: 0;
  margin: 0 0 10px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 8px;
}

.ara-partner-cert img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain; /* show complete certificate without cropping text */
  object-position: center;
  background: #fff;
}

/* 06.6 — Company name, credential, description */
.ara-partner-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 0 3px 8px;
}

.ara-partner-content h3 {
  direction: ltr;
  margin: 0 0 2px;
  color: var(--ap-navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.33;
  letter-spacing: -.4px;
  text-align: left;
}

.ara-partner-content h4 {
  margin: 0 0 6px;
  color: var(--ap-navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-align: start;
}

.ara-partner-content p {
  margin: 0;
  color: var(--ap-text);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.65;
  text-align: start;
}

/* 06.7 — Certificate CTA */
.ara-partner-link {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 39px;
  margin-top: auto;
  padding: 7px 9px;
  color: #f16b19;
  background: #fff1e9;
  border: 0;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.ara-partner-link:hover { color: #d7580e; background: #ffe3d3; }
.ara-partner-link-arrow { flex: 0 0 auto; font-size: 12px; }
.ara-partner-link-file {
  display: grid;
  flex: 0 0 31px;
  place-items: center;
  height: 30px;
  color: #f16b19;
  background: #ffe6d7;
  border-radius: 8px;
  font-size: 16px;
}
html[dir='ltr'] .ara-partner-link-arrow { transform: rotate(180deg); }

/* Optional compatibility for older section markup */
.ara-partner-type { color: var(--ap-orange-dark); font-size: 12px; font-weight: 700; }
.ara-partner-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding: 16px 18px;
  background: #fff8f1;
  border-inline-start: 3px solid var(--ap-orange);
  border-radius: 6px;
}
.ara-partner-detail-label { color: #a66a36; font-size: 11px; font-weight: 700; }
.ara-partner-details strong { color: var(--ap-navy); font-size: 15px; font-weight: 800; }
.ara-partner-no-cert { color: #8796a9; font-size: 14px; font-weight: 700; }

/* 06.8 — Slider arrows */
.ara-partners-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  background: var(--ap-orange);
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 8px 14px rgba(255, 132, 29, .20);
  transition: background .25s ease, box-shadow .25s ease;
}

.ara-partners-arrow:hover { background: var(--ap-orange-dark); }
.ara-partners-arrow:disabled { opacity: .4; cursor: default; }
.ara-partners-prev { right: -52px; left: auto; }
.ara-partners-next { left: -52px; right: auto; }
html[dir='ltr'] .ara-partners-prev { left: -52px; right: auto; }
html[dir='ltr'] .ara-partners-next { right: -52px; left: auto; }

/* 06.9 — Pagination */
.ara-partners-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.ara-partners-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  background: #d9e1ed;
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.ara-partners-dots button.is-active { width: 35px; background: var(--ap-orange); }
.ara-partners-dots[hidden] { display: none; }

/* =============================================================
   07 — RESPONSIVE
   ============================================================= */
@media (max-width: 1199px) {
  .ara-partners-prev { right: -24px; }
  .ara-partners-next { left: -24px; }
  html[dir='ltr'] .ara-partners-prev { left: -24px; }
  html[dir='ltr'] .ara-partners-next { right: -24px; }
}

@media (max-width: 991px) {
  .about-hero { min-height: 260px; }
  .about-hero__content { max-width: 100%; padding: 50px 0; }
  .about-hero__content h1 { font-size: clamp(34px, 7vw, 54px); }
  .about-hero__content p { font-size: 18px; line-height: 1.7; }

  .about-intro { flex-direction: column; gap: 30px; }
  .about-intro__image { order: 1; flex: none; width: 100%; }
  .about-intro__content { order: 2; flex: none; width: 100%; }
  .about-intro__image img { height: auto; aspect-ratio: 16 / 10; }

  .values-grid, .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .ara-partners { --partners-visible: 2; }
  .ara-partner-cert { height: 192px; }
}

@media (max-width: 600px) {
  .about-hero { min-height: 220px; }
  .about-hero__content,
  html[dir='ltr'] .about-hero__content { margin-inline: auto; padding: 40px 0; text-align: center; }
  .about-hero__content p { font-size: 16px; }

  .about-intro { gap: 24px; }
  .about-intro__image { border-radius: 16px; }
  .about-intro__image img { aspect-ratio: 4 / 3; }
  .about-stats { gap: 10px; }
  .about-stat { padding: 18px 8px; }
  .about-stat strong { font-size: 26px; }
  .values-grid { grid-template-columns: 1fr; gap: 15px; }
  .section-title { font-size: 30px; line-height: 1.25; }

  .cert-grid {
    display: flex;
    gap: 14px;
    margin: 20px -16px 0;
    padding: 8px 16px 28px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .cert-grid::-webkit-scrollbar { display: none; }
  .cert-card {
    flex: 0 0 82%;
    max-width: 310px;
    height: 390px;
    scroll-snap-align: center;
    cursor: default;
  }
  .cert-card:hover { transform: none; border-color: #dfe5ea; box-shadow: none; }
  .cert-card:hover img { transform: none; }
}

@media (max-width: 560px) {
  .ara-partners { --partners-visible: 1; padding: 42px 0 35px; }
  .ara-partners .ara-partners-container { width: min(calc(100% - 32px), 1440px); }
  .ara-partners-header { margin-bottom: 23px; }
  .ara-partners-header .section-title { font-size: 29px; }
  .ara-partners-header p { font-size: 13px; }
  .ara-partner-cert { height: 205px; }
  .ara-partner-content h3 { font-size: 19px; }
  .ara-partner-content h4 { font-size: 15px; }
  .ara-partner-content p { font-size: 12px; }
  .ara-partners-arrow { width: 33px; height: 33px; font-size: 13px; }
  .ara-partners-prev { right: -10px; }
  .ara-partners-next { left: -10px; }
  html[dir='ltr'] .ara-partners-prev { left: -10px; }
  html[dir='ltr'] .ara-partners-next { right: -10px; }
  .ara-partners::before { width: 420px; height: 420px; top: -160px; right: -180px; opacity: .20; }
}

@media (prefers-reduced-motion: reduce) {
  .ara-partners-track { scroll-behavior: auto; }
  .ara-partner-card, .ara-partner-logo img, .ara-partner-cert img,
  .ara-partners-arrow, .ara-partner-link { transition: none; }
}
