$primary: #7a4b20;
$primary-dark: #5e3817;
$primary-soft: rgba(122, 75, 32, 0.08);

$text-dark: #1a1a1a;
$text-light: #5f5f5f;

$border: rgba(122, 75, 32, 0.15);

/* ================= BASE ================= */
.page {
  background: #ffffff;
  font-family: "Figtree", sans-serif;
  color: $text-dark;
}

/* ================= LAYOUT ================= */
.section {
  padding: 4rem 1.5rem;
}

.container {
  max-width: 1150px;
  margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;

  @media (max-width: 900px) {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ================= HERO ================= */
.hero {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;

  h2 {
    font-size: 2rem;
    color: $primary;
    font-weight: 700;
  }

  p {
    color: #6b7280;
    line-height: 1.6;
  }
}

.meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  color: #6b7280;

  svg {
    color: $primary;
  }
}

/* ================= FUNDING ================= */
.fundingCard {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid $border;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.fundingTop {
  display: flex;
  justify-content: space-between;

  h3 {
    color: $primary;
  }

  span {
    font-weight: 600;
  }
}

.progressBar {
  height: 8px;
  background: #f3f4f6;
  border-radius: 20px;
  margin: 0.8rem 0;

  div {
    height: 100%;
    background: linear-gradient(135deg, $primary, #b08968);
  }
}

.fundingStats {
  display: flex;
  justify-content: space-between;

  span {
    font-size: 0.75rem;
    color: #9ca3af;
  }

  h4 {
    font-size: 0.9rem;
    color: $text-dark;
  }

  @media (max-width: 768px) {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ================= TIMELINE ================= */
.timeline {
  margin-top: 2.5rem;

  h3 {
    color: $primary;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
  }
}

.timelineItem {
  position: relative;
  padding-left: 48px; /* FIXED */
  margin-bottom: 28px;

  @media (max-width: 768px) {
    padding-left: 38px;
  }
}

/* LINE */
.line {
  position: absolute;
  left: 18px;
  top: 22px;
  bottom: -28px;
  width: 2px;

  background: linear-gradient(
    to bottom,
    rgba(122, 75, 32, 0.6),
    rgba(122, 75, 32, 0.2),
    transparent
  );
}

/* NODE */
.circle {
  position: absolute;
  left: 8px;
  top: 6px;

  width: 20px;
  height: 20px;
  border-radius: 50%;

  background: $primary;

  border: 3px solid #fff;

  box-shadow:
    0 0 0 4px rgba(122, 75, 32, 0.15),
    0 6px 14px rgba(0,0,0,0.12);
}

/* CARD */
.timelineCard {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid $border;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;

  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  }
}

.timelineHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;

  h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: $text-dark;
  }
}

.timelineCard p {
  margin-top: 6px;
  font-size: 0.85rem;
  color: $text-light;
}

/* STATUS */
.status {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.current {
  background: rgba(122, 75, 32, 0.12);
  color: $primary;
}

.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

/* ================= STICKY PAYMENT ================= */
.sideWrapper {
  position: relative;
}

.side {
  position: sticky;
  top: 120px;
  align-self: start;

  max-height: calc(100vh - 140px);
  overflow-y: auto;

  @media (max-width: 900px) {
    position: relative;
    max-height: none;
    overflow: visible;
  }
}

/* ================= DONATION ================= */
.donationCard {
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid $border;
  background: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.06);

  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
  }

  h3 {
    color: $primary;
  }

  p {
    color: #6b7280;
    font-size: 0.85rem;
  }
}

/* ================= TABS ================= */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tab {
  flex: 1;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid $border;
  cursor: pointer;

  font-size: 0.8rem;
  font-weight: 600;

  &.active {
    background: $primary;
    color: #fff;
  }
}

/* ================= ACCOUNT ================= */
.account {
  margin-top: 1rem;
}

.bank {
  display: flex;
  align-items: center;
  gap: 8px;

  img {
    width: 30px;
  }
}

.row {
  margin-top: 1rem;

  label {
    font-size: 0.7rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 4px;
  }

  div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    background: #f9fafb;
    padding: 0.7rem;
    border-radius: 10px;

    flex-wrap: wrap; /* FIX */
  }

  p {
    font-size: 0.85rem;
    font-weight: 600;
    word-break: break-all; /* FIX */
  }

  svg {
    cursor: pointer;
    color: $primary;
  }
}

/* ================= SLIDER ================= */
.sliderWrapper {
  position: relative;
  max-width: 1150px;
  margin: auto;
  margin-bottom: 6rem;
}

.carouselContainer {
  max-width: 1150px;
  margin: auto;
}

.carouselHeadText {
  font-size: clamp(2rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0.8rem 0;
  color: $primary;
  margin-bottom: 2.5rem;
}

.scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
}

.cardWrap {
  min-width: 260px;
}

/* CONTROLS */
.control {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 20;

  width: 46px;
  height: 46px;
  border-radius: 50%;

  background: #fff;
  border: 1px solid rgba(122, 75, 32, 0.2);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.1rem;
  font-weight: bold;

  cursor: pointer;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

  transition: all 0.25s ease;

  &:hover {
    background: $primary;
    color: #fff;
    transform: translateY(-50%) scale(1.05);
  }
}

.left {
  left: -20px;
}

.right {
  right: -20px;
}

.left {
  left: -20px;
}

.right {
  right: -20px;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .control {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .left {
    left: -15px;
  }

  .right {
    right: -15px;
  }

  .fade {
    display: none;
  }

.carouselContainer {
  max-width: 1150px;
  margin: auto 1.3rem;
  // background: red !important;
}

  .section {
    padding: 2rem 1rem;
  }

  .sideWrapper {
    order: 1; /* payment first */
  }

  .side {
    top: -20px;
  }

  // .donationCard {
  //   position: sticky;
  //   top: 80px;
  //   z-index: 5;
  // }
}