/* =========================================================================
   SHIPYARD PAGE — page-specific styles only (shipyard.css)
   Global rules (reset, colors, fonts, .container, .btn, .card, .hero,
   .section, .section-head, .grid, navbar, footer) live in /style.css.
   Colors/fonts come only from the §6/§7 variables — no new colors.
   Scroll/load reveals are AOS (data-aos in the HTML); hovers are pure CSS.
   The flow-diagram line "draws" off AOS's own .aos-animate class — no second
   animation system. This exact file is shared by EN + AR.
   ========================================================================= */

#areas,
#flow,
#glance,
#visit {
  scroll-margin-top: calc(var(--navbar-height) + 1.5rem);
}

/* Small uppercase label with an optional leading icon */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.6rem;
}
.label svg { width: 16px; height: 16px; }
html[lang="ar"] .label {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.9rem;
}

/* Arrow link (arrow flips in RTL) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--color-secondary);
  transition: all 0.25s ease;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.link-arrow:hover { color: var(--color-primary); }
.link-arrow:hover svg { transform: translateX(4px); }
html[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }
html[dir="rtl"] .link-arrow:hover svg { transform: scaleX(-1) translateX(4px); }

.ltr { direction: ltr; unicode-bidi: isolate; }

/* Unconfirmed figures — bracketed placeholders read as deliberately pending */
.tbc { color: var(--color-accent); }

/* ------------------------------------------------------------------ 1 · HERO */
.page-hero { min-height: 86vh; }
.page-hero .container { padding-bottom: 5rem; }

/* ------------------------------------------------------------- 2 · STATS BAR */
.stats-wrap {
  position: relative;
  z-index: 3;
  margin-top: -4.5rem;
}
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(36, 58, 94, 0.28);
}
@media (min-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
}
.stat-item {
  position: relative;
  background: var(--color-primary);
  padding: 2.25rem 1.25rem;
  text-align: center;
  transition: all 0.25s ease;
}
.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.stat-item:hover::before { transform: scaleX(1); }
.stat-num {
  display: block;
  font-family: var(--font-heading-en);
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-text-invert);
}
.stat-num small {
  font-size: 0.45em;
  font-weight: 500;
  color: var(--color-accent);
  vertical-align: 0.35em;
}
.stat-num.tbc { color: var(--color-accent); }
html[lang="ar"] .stat-num { font-family: var(--font-heading-ar); }
.stat-label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-surface-alt);
}
html[lang="ar"] .stat-label {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------- 3 · INTRO */
.intro-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
}
.intro-grid .lead { font-size: 1.15rem; }
html[lang="ar"] .intro-grid .lead { font-size: 1.25rem; }
.intro-grid .support { color: var(--color-secondary); }

/* ------------------------------------------------------- 4 · FACILITY AREAS */
.area-clusters {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}
.area-cluster {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .area-cluster {
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .cluster-head {
    position: sticky;
    top: calc(var(--navbar-height) + 1.5rem);
  }
}
.cluster-head {
  border-inline-start: 3px solid var(--color-secondary);
  padding-inline-start: 1rem;
}
.cluster-count {
  display: block;
  font-family: var(--font-heading-en);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-surface-alt);
  margin-bottom: 0.4rem;
}
html[lang="ar"] .cluster-count { font-family: var(--font-heading-ar); }
.cluster-head h3 { font-size: 1.4rem; margin-bottom: 0.35rem; }
html[lang="ar"] .cluster-head h3 { font-size: 1.75rem; }
.cluster-head p { color: var(--color-secondary); font-size: 0.92rem; }
html[lang="ar"] .cluster-head p { font-size: 1.02rem; }

.area-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .area-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .area-grid { grid-template-columns: repeat(3, 1fr); } }

.area-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border-bottom: 3px solid transparent;
  transition: all 0.25s ease;
}
.area-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-bottom-color: var(--color-secondary);
}
.area-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--midnight-blue), var(--dusty-denim));
}
.area-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
/* Shared cool grade so mixed stock photos read as one set (§12 mood-only) */
.area-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 58, 94, 0.1) 30%, rgba(27, 44, 71, 0.7));
  transition: background 0.25s ease;
}
.area-card:hover .area-media img { transform: scale(1.05); }
.area-card:hover .area-media::after {
  background: linear-gradient(180deg, rgba(36, 58, 94, 0.25) 0%, rgba(27, 44, 71, 0.8));
}
/* Icon + index sit INSIDE the frame — .area-media clips its overflow */
.area-icon {
  position: absolute;
  bottom: 1rem;
  inset-inline-start: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--color-text-invert);
  transition: background 0.25s ease;
}
.area-icon svg { width: 22px; height: 22px; }
.area-card:hover .area-icon { background: var(--color-secondary); }
.area-index {
  position: absolute;
  top: 0.9rem;
  inset-inline-end: 1rem;
  z-index: 1;
  font-family: var(--font-heading-en);
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}
.area-body { padding: 1.4rem 1.4rem 1.6rem; flex: 1; }
.area-body h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }
html[lang="ar"] .area-body h4 { font-size: 1.35rem; }
.area-body p { color: var(--color-secondary); font-size: 0.9rem; }
html[lang="ar"] .area-body p { font-size: 1rem; }

/* ------------------------------------------------ 5 · HOW A VESSEL MOVES */
.flow-band {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-space);
  color: var(--color-text-invert);
  background: var(--color-primary);
}
.flow-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.flow-band .flow-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.85), rgba(27, 44, 71, 0.93));
}
.flow-band .container { position: relative; z-index: 2; }
.flow-band .section-head h2 { color: var(--color-text-invert); }
.flow-band .section-head .eyebrow { color: var(--color-accent); }
.flow-band .section-head p { color: var(--color-surface-alt); }

.flow {
  position: relative;
  padding-inline-start: 3.25rem; /* room for the vertical line on mobile */
}
.flow-list {
  display: grid;
  gap: 1.5rem;
}
.flow-line {
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  inset-inline-start: 1.35rem;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-secondary));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s ease 0.2s;
}
.flow.aos-animate .flow-line { transform: scaleY(1); }
.flow-step {
  position: relative;
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
}
.flow-step:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--color-accent);
  transform: translateY(-4px);
}
.flow-num {
  position: absolute;
  top: 1.2rem;
  inset-inline-start: -3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-accent);
  color: var(--color-text-invert);
  font-family: var(--font-heading-en);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}
.flow-step:hover .flow-num { background: var(--color-accent); color: var(--color-primary); }
.flow-step .flow-icon { color: var(--color-accent); margin-bottom: 0.75rem; display: block; }
.flow-step .flow-icon svg { width: 26px; height: 26px; }
.flow-step h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
html[lang="ar"] .flow-step h3 { font-size: 1.45rem; }
.flow-step p { color: var(--color-surface-alt); font-size: 0.9rem; }
html[lang="ar"] .flow-step p { font-size: 1rem; }

/* Tablet: 3 × 2 grid, numbers on top of each card, no connector line */
@media (min-width: 768px) {
  .flow { padding-inline-start: 0; }
  .flow-list { grid-template-columns: repeat(3, 1fr); }
  .flow-line { display: none; }
  .flow-num { position: static; margin-bottom: 1rem; }
}
/* Desktop: one row of six, joined by a horizontal line through the numbers */
@media (min-width: 1100px) {
  .flow { padding-top: 4rem; }
  .flow-list {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }
  .flow-line {
    display: block;
    top: 1.35rem;
    bottom: auto;
    inset-inline: 8%;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: left;
  }
  html[dir="rtl"] .flow-line {
    background: linear-gradient(270deg, var(--color-accent), var(--color-secondary));
    transform-origin: right;
  }
  .flow.aos-animate .flow-line { transform: scaleX(1); }
  .flow-step { text-align: center; padding: 1.25rem 1rem 1.5rem; }
  .flow-num {
    position: absolute;
    top: -4rem;
    inset-inline-start: 50%;
    margin: 0;
    transform: translateX(-50%);
  }
  html[dir="rtl"] .flow-num { transform: translateX(50%); }
}

/* ---------------------------------------------------- 6 · AT A GLANCE */
.glance-grid { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .glance-grid { grid-template-columns: 1.25fr 1fr; align-items: stretch; } }
.glance-panel {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem;
}
@media (min-width: 768px) { .glance-panel { padding: 2.5rem; } }
.glance-panel h3 { margin-bottom: 1.25rem; }
.spec-list { display: flex; flex-direction: column; }
.spec-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(36, 58, 94, 0.08);
  transition: background 0.25s ease;
}
.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: var(--color-surface); }
.spec-row .spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-primary);
}
.spec-row .spec-icon svg { width: 20px; height: 20px; }
.spec-row dt { font-size: 0.92rem; color: var(--color-secondary); }
html[lang="ar"] .spec-row dt { font-size: 1.02rem; }
.spec-row dd {
  font-weight: 600;
  text-align: end;
  color: var(--color-primary);
}
.spec-row dd .spec-note {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
}

.glance-location {
  display: flex;
  flex-direction: column;
  background: var(--color-primary);
  color: var(--color-text-invert);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(36, 58, 94, 0.22);
}
.glance-location .loc-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.glance-location .loc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.glance-location:hover .loc-media img { transform: scale(1.05); }
.loc-body { padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.loc-body .label { color: var(--color-accent); margin-bottom: 0; }
.loc-body address,
.loc-phones {
  display: flex;
  gap: 0.6rem;
  font-style: normal;
  color: var(--color-surface-alt);
}
.loc-body svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 0.2rem; color: var(--color-accent); }
.loc-phones a { color: var(--color-text-invert); font-weight: 500; }
.loc-phones a:hover { color: var(--color-accent); }
.loc-actions { margin-top: auto; padding-top: 0.5rem; }
.btn-icon { display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-icon svg { width: 18px; height: 18px; margin: 0; color: currentColor; }

/* ----------------------------------------------------- 7 · QUALITY & SAFETY */
.qs-banner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-card);
  background: var(--color-primary);
  color: var(--color-text-invert);
  box-shadow: 0 24px 50px rgba(36, 58, 94, 0.22);
}
@media (min-width: 900px) {
  .qs-banner { grid-template-columns: 0.8fr 1.2fr; gap: 3rem; padding: 3rem 3.25rem; }
}
.qs-head { display: flex; align-items: center; gap: 1rem; }
.qs-icons { display: flex; gap: 0.5rem; flex: 0 0 auto; }
.qs-icons span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}
.qs-icons svg { width: 24px; height: 24px; }
.qs-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
html[lang="ar"] .qs-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.qs-banner p { color: var(--color-surface-alt); }

/* ------------------------------------------------------ 8 · VISIT CALLOUT */
.visit-box {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
  border-inline-start: 4px solid var(--color-secondary);
  transition: all 0.25s ease;
}
.visit-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
@media (min-width: 900px) {
  .visit-box { grid-template-columns: auto 1fr auto; gap: 2.5rem; padding: 2.75rem 3rem; }
}
.visit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary);
}
.visit-icon svg { width: 32px; height: 32px; }
.visit-box h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 0.4rem; }
html[lang="ar"] .visit-box h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.visit-box p { color: var(--color-secondary); }

/* ------------------------------------------------------------- 9 · WHY */
.feature-card {
  height: 100%;
  border-top: 3px solid transparent;
  padding: 2.25rem 1.75rem;
}
.feature-card:hover { border-top-color: var(--color-secondary); }
.feature-card .card-icon { transition: all 0.25s ease; }
.feature-card:hover .card-icon {
  background: var(--color-primary);
  color: var(--color-text-invert);
}
.feature-card h3 { font-size: 1.2rem; }
html[lang="ar"] .feature-card h3 { font-size: 1.55rem; }

/* ----------------------------------------------------------- 10 · CLOSING CTA */
.cta-band {
  position: relative;
  padding-block: 7rem;
  text-align: center;
  color: var(--color-text-invert);
  overflow: hidden;
}
.cta-band .cta-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.2s ease;
}
.cta-band:hover .cta-media { transform: scale(1.04); }
.cta-band .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.65), rgba(27, 44, 71, 0.88));
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.cta-band p {
  max-width: 620px;
  margin: 1rem auto 2rem;
  color: rgba(255, 255, 255, 0.9);
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-band .btn-primary { background: #fff; color: var(--color-primary); }
.cta-band .btn-primary:hover {
  background: var(--color-surface-alt);
  color: var(--color-primary);
  transform: translateY(-2px);
}
.cta-band .btn-outline-light:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .area-card,
  .area-media img,
  .flow-step,
  .glance-location .loc-media img,
  .visit-box,
  .cta-band .cta-media { transition: none; }
  .area-card:hover,
  .flow-step:hover,
  .visit-box:hover { transform: none; }
  .area-card:hover .area-media img,
  .glance-location:hover .loc-media img,
  .cta-band:hover .cta-media { transform: none; }
  .flow-line { transition: none; transform: none !important; }
}
