@media (max-width: 1024px) {
  /* Hide pipes and hand image on medium screens */
  .pipe-h,
  .pipe-v,
  .pipe-corner,
  .hand-img-wrap {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Hide pipes and hand image on small screens */
  .pipe-h,
  .pipe-v,
  .pipe-corner,
  .hand-img-wrap {
    display: none !important;
  }
}
/* ══════════════════════════════════════
   PIPE INFRASTRUCTURE SECTION STYLES
══════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ══════════════════════════════════════
   PIPE VARIABLES
══════════════════════════════════════ */
:root {
  --pipe-d: 52px;
  --pipe-bg: #1c1c1e;
  --pipe-hi: #4a4a4e;
  --pipe-sh: #0a0a0b;
  --clamp-bg: #252528;
  --red: #c0281e;
  --gold: #c9a84c;
  --gold-lt: #e5c36a;
  --navy: #07162b;
  --card-bg: #0b1e38;
  --card-bd: rgba(201, 168, 76, 0.22);
}

/* ══════════════════════════════════════
   SECTIONS WRAPPER
   Wraps BOTH .pipe-section-wrap and
   .education-wrap so the hand image
   can be positioned relative to both
══════════════════════════════════════ */
.pipe-edu-wrapper {
  position: relative; /* anchor for the hand image */
}

/* ══════════════════════════════════════
   OUTER WRAPPER — clips the pipes
══════════════════════════════════════ */
.pipe-section-wrap {
  position: relative;
  background: var(--navy);
  overflow: visible; /* allow hand to overflow into education section */
}

/* ══════════════════════════════════════
   HORIZONTAL PIPE — full width at top
══════════════════════════════════════ */
.pipe-h {
  position: relative;
  width: 100%;
  height: var(--pipe-d);
  background: linear-gradient(
    180deg,
    var(--pipe-hi) 0%,
    var(--pipe-bg) 30%,
    var(--pipe-sh) 60%,
    var(--pipe-bg) 80%,
    var(--pipe-hi) 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.7),
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}

/* Clamps on horizontal pipe */
.pipe-h .clamp {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: calc(var(--pipe-d) + 14px);
  background: linear-gradient(90deg, #2a2a2e, #3e3e42, #2a2a2e);
  border-radius: 4px;
  box-shadow:
    2px 0 6px rgba(0, 0, 0, 0.6),
    -2px 0 6px rgba(0, 0, 0, 0.6);
}

.pipe-h .clamp::before,
.pipe-h .clamp::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.pipe-h .clamp::before {
  top: 4px;
}
.pipe-h .clamp::after {
  bottom: 4px;
}

/* Drop-down vertical stubs from horizontal pipe */
.pipe-h .drop {
  position: absolute;
  top: 100%;
  width: var(--pipe-d);
  height: 110px;
  background: linear-gradient(
    90deg,
    var(--pipe-hi) 0%,
    var(--pipe-bg) 25%,
    var(--pipe-sh) 55%,
    var(--pipe-bg) 80%,
    var(--pipe-hi) 100%
  );
  box-shadow:
    4px 0 8px rgba(0, 0, 0, 0.6),
    -4px 0 8px rgba(0, 0, 0, 0.6),
    inset 2px 0 4px rgba(255, 255, 255, 0.05);
  z-index: 3;
}

/* Red valve cap at bottom of drops */
.pipe-h .drop::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--pipe-d) + 12px);
  height: 20px;
  background: linear-gradient(180deg, #e03020, var(--red), #8b1a10);
  border-radius: 3px;
  box-shadow:
    0 4px 10px rgba(192, 40, 30, 0.5),
    inset 0 2px 4px rgba(255, 100, 80, 0.3);
}

/* Red cap top ring */
.pipe-h .drop::before {
  content: "";
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--pipe-d) + 8px);
  height: 8px;
  background: linear-gradient(180deg, #c83828, #8b1a10);
  border-radius: 2px;
}

/* Connector T-joint where drop meets horizontal pipe */
.pipe-h .drop-joint {
  position: absolute;
  top: calc(-1 * var(--pipe-d) / 2 + var(--pipe-d) / 2 - 4px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--pipe-d) + 16px);
  height: calc(var(--pipe-d) + 8px);
  background: linear-gradient(180deg, #3a3a3e, #252528, #3a3a3e);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

/* Clamp positions on horizontal pipe */
.c1 {
  left: 8%;
}
.c2 {
  left: 32%;
}
.c3 {
  left: 56%;
}
.c4 {
  left: 80%;
}
.c5 {
  left: 93%;
}
.c6 {
  left: 18%;
}
.c7 {
  left: 44%;
}
.c8 {
  left: 68%;
}

/* Drop positions */
.d1 {
  left: calc(8% + 15px);
}
.d2 {
  left: calc(56% + 15px);
}

/* ══════════════════════════════════════
   VERTICAL PIPE — left edge
══════════════════════════════════════ */
.pipe-v {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pipe-d);
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--pipe-hi) 0%,
    var(--pipe-bg) 25%,
    var(--pipe-sh) 55%,
    var(--pipe-bg) 80%,
    var(--pipe-hi) 100%
  );
  box-shadow:
    4px 0 16px rgba(0, 0, 0, 0.7),
    inset 2px 0 4px rgba(255, 255, 255, 0.06),
    inset -2px 0 4px rgba(0, 0, 0, 0.4);
  z-index: 4;
}

/* Horizontal clamps on vertical pipe */
.pipe-v .v-clamp {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--pipe-d) + 14px);
  height: 20px;
  background: linear-gradient(180deg, #2a2a2e, #3e3e42, #2a2a2e);
  border-radius: 4px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.6),
    0 -2px 6px rgba(0, 0, 0, 0.6);
}

.pipe-v .v-clamp::before,
.pipe-v .v-clamp::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.pipe-v .v-clamp::before {
  left: 4px;
}
.pipe-v .v-clamp::after {
  right: 4px;
}

.vc1 {
  top: 18%;
}
.vc2 {
  top: 42%;
}
.vc3 {
  top: 68%;
}

/* Red wheel valve on left pipe */
.pipe-v .valve {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

/* Valve stem */
.valve-stem {
  width: 12px;
  height: 28px;
  background: linear-gradient(90deg, #3a3a3e, #555, #3a3a3e);
  border-radius: 2px;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.5);
}

/* Valve body */
.valve-body {
  width: calc(var(--pipe-d) + 14px);
  height: 32px;
  background: linear-gradient(180deg, #d83828, var(--red), #8b1a10);
  border-radius: 4px;
  box-shadow:
    0 4px 12px rgba(192, 40, 30, 0.6),
    inset 0 2px 4px rgba(255, 100, 80, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Valve wheel spokes */
.valve-wheel {
  position: relative;
  width: 40px;
  height: 40px;
  margin-top: 4px;
}

.valve-wheel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--red);
  box-shadow: 0 0 8px rgba(192, 40, 30, 0.5);
}

.valve-wheel::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 3px;
  background: var(--red);
  box-shadow:
    0 -12px 0 3px var(--red),
    0 12px 0 3px var(--red);
}

.valve-spoke {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--red);
  transform-origin: left center;
}

.valve-spoke:nth-child(1) {
  transform: translate(-50%, -50%) rotate(0deg);
}
.valve-spoke:nth-child(2) {
  transform: translate(-50%, -50%) rotate(60deg);
}
.valve-spoke:nth-child(3) {
  transform: translate(-50%, -50%) rotate(120deg);
}

/* Pipe connector where vertical meets horizontal */
.pipe-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--pipe-d);
  height: var(--pipe-d);
  background: linear-gradient(135deg, #3a3a3e, #1c1c1e);
  z-index: 5;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
}

/* ══════════════════════════════════════
   CONTENT AREA
══════════════════════════════════════ */
.infra-content {
  position: relative;
  z-index: 3;
  padding: 70px 60px 80px calc(var(--pipe-d) + 40px);
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 5%;
}

/* ── SECTION HEADER ── */
.ps-label {
  display: block;
  color: var(--gold-lt);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-align: center;
}

.ps-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  line-height: 1.15;
}

.ps-desc {
  font-size: 0.86rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 50px;
  line-height: 1.75;
}

/* ── INFRA GRID 2×3 ── */
.infra-grid-custom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 80px;
}

.infra-box {
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: 10px;
  padding: 34px 24px 28px;
  text-align: center;
  cursor: default;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.infra-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.infra-box:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
}

.infra-box h4 {
  color: var(--gold-lt);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.infra-box p {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

/* Stagger delays */
.infra-box:nth-child(1) {
  transition-delay: 0.05s;
}
.infra-box:nth-child(2) {
  transition-delay: 0.15s;
}
.infra-box:nth-child(3) {
  transition-delay: 0.25s;
}
.infra-box:nth-child(4) {
  transition-delay: 0.35s;
}
.infra-box:nth-child(5) {
  transition-delay: 0.45s;
}
.infra-box:nth-child(6) {
  transition-delay: 0.55s;
}

/* ══════════════════════════════════════
   HAND IMAGE
   Positioned on the .pipe-edu-wrapper
   so it sits at the RIGHT EDGE straddling
   the boundary between both sections —
   bottom of pipe-section-wrap, top of education-wrap
══════════════════════════════════════ */
.hand-img-wrap {
  position: absolute;

  /* Horizontally: flush to the right edge */
  right: -380px;
  right: -380px; /* start off-screen */

  /* Vertically: calculated so the hand straddles
     the section boundary.
     pipe-section-wrap height is roughly 700px,
     so bottom: ~40% of total wrapper height centres
     the image at that junction */
  bottom: 36%;

  width: 400px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;

  /* Slide in from right */
  transition:
    right 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
    opacity 1s ease 0.2s;
}

/* Triggered by JS adding .visible to .pipe-edu-wrapper */
.pipe-edu-wrapper.visible .hand-img-wrap {
  right: -20px; /* land near right edge, hand/city partially visible */
  opacity: 1;
}

.hand-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.65));

  transform: scaleX(-1); /* 🔥 flips the hand */
}
/* ══════════════════════════════════════
   EDUCATION SECTION
══════════════════════════════════════ */
.education-wrap {
  position: relative;
  background: #050e1c;
  padding: 80px 60px 80px calc(var(--pipe-d) + 229px);
  overflow: hidden;
}

.education-section {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1100px;
}

/* LEFT */
.edu-label {
  display: block;
  color: var(--gold-lt);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.edu-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  line-height: 1.2;
}

.edu-intro {
  font-size: 0.84rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
  margin-bottom: 26px;
}

.edu-group-label {
  display: block;
  color: var(--gold-lt);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}

.edu-list {
  list-style: none;
  margin-bottom: 24px;
}

.edu-list li {
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
  padding: 4px 0;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.edu-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* RIGHT */
.edu-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edu-card {
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: 10px;
  padding: 28px 26px;
  transition: border-color 0.3s;
}

.edu-card:hover {
  border-color: var(--gold);
}

.edu-card h4 {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.edu-card ul {
  list-style: none;
}

.edu-card ul li {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.68);
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.edu-card ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* ── VERTICAL PIPE IN EDUCATION WRAP ── */
.education-wrap .pipe-v-edu {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pipe-d);
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--pipe-hi) 0%,
    var(--pipe-bg) 25%,
    var(--pipe-sh) 55%,
    var(--pipe-bg) 80%,
    var(--pipe-hi) 100%
  );
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.7);
  z-index: 4;
}

/* ══════════════════════════════════════
   SCROLL ANIMATIONS
══════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .infra-content,
  .education-wrap {
    padding-left: calc(var(--pipe-d) + 24px);
    padding-right: 32px;
  }

  .hand-img-wrap {
    width: 320px;
  }
}

@media (max-width: 768px) {
  :root {
    --pipe-d: 36px;
  }

  .infra-content {
    padding: 50px 20px 60px calc(var(--pipe-d) + -22px);
  }

  .infra-grid-custom {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .education-wrap {
    padding: 60px 20px 60px calc(var(--pipe-d) + 20px);
  }

  .education-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

.hand-img-wrap {
  position: absolute;

  right: -260px;   /* less outside */
  bottom: 120px;   /* anchor near education section */

  width: 480px;    /* bigger like reference */

  z-index: 10;
  opacity: 0;

  transition:
    right 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1s ease;
}

.pipe-edu-wrapper.visible .hand-img-wrap {
  right: -40px;   /* visible position */
  opacity: 1;
}
}

@media (max-width: 480px) {
  .infra-grid-custom {
    grid-template-columns: 1fr;
  }

  .ps-title {
    font-size: 1.4rem;
  }

  .hand-img-wrap {
    width: 90%;
  }
}
