/* CSR hero styles: using Figma components - separate background and gradient images */
.hero-csr {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #fff;
}

/* Background image layer (raw-csr.jpg) - using raw unprocessed image with grayscale filter */
.hero-csr::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/cfind/source/thumb/images/csr/raw-csr-2.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Gradient overlay layer (csr-gradient.png) */
.hero-csr::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/cfind/source/thumb/images/csr/csr-gradient.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1;
  /* Create a smooth transition from the gradient overlay (left) to transparency (right)
     using a mask. This reveals the raw background image on the right side. */
  -webkit-mask-image: linear-gradient(to right, black 40%, transparent 100%);
  mask-image: linear-gradient(to right, black 40%, transparent 100%);
  mix-blend-mode: multiply;
}

/* Content layer */
.hero-csr .hero-content {
  max-width: 1000px;
  margin-bottom: 100px;
  padding: 120px 15px 120px 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

/* Ensure Inter font is used across all CSR page sections */
.hero-csr,
.section-sustain,
.csr-initiatives,
.csr-initiatives *,
.section-sustain *,
.hero-csr * {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

.hero-csr .hero-content {
  max-width: 1000px;
  padding: 120px 15px 120px 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}
.hero-title {
  font-size: 80px;
  line-height: 1;
  font-weight: 800;
  margin: 0;
  margin-bottom: 30px;
  /* Use a very faint text color instead of element opacity.
     This keeps the element and any children fully opaque while
     making the glyphs themselves nearly invisible. */
  opacity: 1;
  color: rgb(255 255 255 / 28%); /* very faint white text */
  letter-spacing: 10px;
  text-transform: uppercase;
  /* make sure title doesn't introduce extra horizontal offset */
  display: block;
  /* Constrain title width so its right edge lines up with subtitle and CTA */
  max-width: 680px;
  align-self: flex-start;
}
.hero-sub {
  /* Keep subtitle max width which the title and CTA will match */
  max-width: 680px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  /* ensure sub aligns to the same left edge as title */
  align-self: flex-start;
}
@media (max-width: 992px) {
  .hero-title {
    font-size: 96px;
  }
  /* Keep hero filling the viewport on medium+ small screens too */
  .hero-csr {
    min-height: 100vh;
    height: 100vh;
  }
  /* Reduce left offset on medium screens (move a bit more to the left) */
  .hero-content {
    padding: 80px 15px 80px 40px;
  }
}
@media (max-width: 480px) {
  .hero-title {
    font-size: 56px;
    letter-spacing: 4px;
  }
  .hero-sub {
    font-size: 14px;
  }
  /* Tighter padding for small screens */
  .hero-content {
    padding: 60px 15px 60px 16px;
  }
}

/* Center the hero block on mobile, then nudge slightly to the left */
@media (max-width: 576px) {
  .hero-csr .hero-content {
    width: 90%;
    /* Base is centered (5%/5%); shift 16px to the left */
    margin-left: calc(5% - 25px);
    margin-right: calc(5% + 25px);
    text-align: left; /* keep inner text/elements left-aligned */
  }
}

/* Additional styles moved from CSR blade */
/* Inter font family for hero title and subtitle */
.hero-title,
.hero-sub {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

/* Sustain section styles: background + centered image */
.section-sustain {
  background-image: url("/cfind/source/images/sustain-bg.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  /* reduced vertical spacing to minimize gap between sections */
  padding: 60px 0; /* desktop: smaller top/bottom spacing */
  min-height: auto; /* let content determine height */
  position: relative;
  overflow: hidden;
}

.section-sustain .sustain-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
}

/* Add a smooth bottom gradient overlay to blend into the next section.
   The overlay fades to white so the seam between sections becomes invisible.
   We keep the image/content above the overlay by raising its z-index. */
.section-sustain {
  position: relative; /* already set, but ensure present for pseudo-element */
}
.section-sustain .sustain-inner {
  position: relative;
  z-index: 2;
}
.section-sustain::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px; /* height of the fade area on desktop */
  pointer-events: none;
  z-index: 1;
  /* fade from transparent (top of overlay) to solid white (bottom),
     adjust colors if page background is not pure white */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 80%
  );
}

@media (max-width: 992px) {
  .section-sustain::after {
    height: 120px;
  }
}

@media (max-width: 576px) {
  .section-sustain::after {
    height: 80px;
  }
}

.section-sustain img {
  max-width: 100%;
  height: auto;
  width: min(1100px, 100%); /* constrain max width to match design */
  display: block;
}

/* Responsive adjustments: maintain compact spacing on smaller screens */
@media (max-width: 992px) {
  .section-sustain {
    padding: 50px 0;
  }
}

@media (max-width: 576px) {
  .section-sustain {
    padding: 40px 0;
  }
}

/* Fade-in animation for images and elements */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 1s ease-out;
  opacity: 0; /* start invisible */
  animation-fill-mode: forwards; /* stay visible after animation */
}

.fade-in:nth-child(1) {
  animation-delay: 0.1s;
}
.fade-in:nth-child(2) {
  animation-delay: 0.2s;
}
.fade-in:nth-child(3) {
  animation-delay: 0.3s;
}
.fade-in:nth-child(4) {
  animation-delay: 0.4s;
}
.fade-in:nth-child(5) {
  animation-delay: 0.5s;
}

/* CSR Initiatives tab section styles */
.csr-initiatives {
  /* reduced vertical padding to make the section more compact */
  padding: 80px 15px 120px;
  min-height: 760px;
  position: relative; /* needed for bottom gradient overlay */
}
.csr-initiatives-title {
  text-align: center;
  font-size: 60px; /* increased for higher prominence */
  font-weight: 700;
  /* increased bottom spacing to separate title from content below */
  margin-bottom: 100px;
  /* gradient text using provided colors: #513670 -> #A78DB3 */
  background: linear-gradient(90deg, #513670 0%, #a78db3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Year content sections */
.year-content {
  display: none;
}

.year-content.active {
  display: block;
}

/* Hide program list by default */
.year-programs {
  display: none;
}

/* Show only for active year */
.year-category.active .year-programs {
  display: block;
}

.csr-initiatives-grid {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.csr-initiatives .initiatives-tabs {
  width: 30%;
  /* Make the tab column a vertical flex container so its children
     start from the very top — keeps alignment predictable with
     the content column. Add a small top-offset so the first tab
     visually lines up with the pane title on the right. */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 12px; /* tweak this value if you want to nudge alignment */
  padding-right: 24px; /* give extra breathing room between tab text and right column */
}
.csr-initiatives .initiatives-tabs ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Year category styles */
.csr-initiatives .year-category {
  margin-bottom: 32px;
}

.csr-initiatives .year-category .year-title {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #5b2f78;
  margin-bottom: 16px;
  padding-left: 20px;
  border-left: 4px solid transparent;
  transition: all 180ms ease;
}

.csr-initiatives .year-category.active .year-title {
  border-left-color: #5b2f78;
  color: #5b2f78;
}

.csr-initiatives .year-category:not(.active) .year-title {
  color: #8a8a8a;
}

.csr-initiatives .year-category .year-programs {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 20px;
}

.csr-initiatives .tab-item {
  padding-left: 20px;
  border-left: 4px solid transparent;
  margin-bottom: 20px;
  cursor: pointer;
  margin-left: 0;
}

.csr-initiatives .tab-item .tab-title {
  display: block;
  color: #8a8a8a;
  font-weight: 600;
  margin-bottom: 6px;
  transition: color 180ms ease;
  /* limit width so long titles wrap instead of visually colliding
     with the right-side content; adjust value as needed */
  max-width: 300px;
  display: inline-block; /* allow max-width to apply while preserving block-like behavior */
  white-space: normal; /* allow wrapping */
  overflow-wrap: anywhere; /* break long words if necessary */
  word-break: break-word;
  font-size: 15px;
}
.csr-initiatives .tab-item .tab-desc {
  color: #8a8a8a;
  font-size: 14px;
  margin: 0;
}
.csr-initiatives .tab-item.active {
  border-left-color: #5b2f78;
}

.csr-initiatives .tab-item.active .tab-title {
  color: #5b2f78;
  font-weight: 700;
}

.csr-initiatives .initiatives-content {
  width: 70%;
  /* Ensure the content column also behaves as a column flexbox so
     its inner content starts at the same top baseline as the tabs. */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative; /* raise content above overlay */
  z-index: 2;
}

/* Smooth bottom gradient overlay so the initiatives section blends into the CTA below */
/* .csr-initiatives::after {
  content: '';
  position: absolute;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  height: 180px; 
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.28) 85%, rgb(150, 152, 158) 100%);
} */
.csr-initiatives .tab-pane {
  display: none;
}
.csr-initiatives .tab-pane.active {
  display: block;
}
.csr-initiatives .pane-title {
  font-size: 32px;
  font-weight: 700;
  color: #616161;
  margin-top: 0;
  margin-bottom: 20px; /* increased and enforced for reliable spacing */
  display: block; /* ensure margins apply as block-level spacing */
}
.csr-initiatives .pane-icons {
  /* remove top margin so spacing is controlled by .pane-title margin-bottom */
  margin: 0 0 14px 0;
}
.csr-initiatives .icon-small {
  height: 70px; /* increased from 34px */
  width: auto;
  margin-right: 12px;
}
.csr-initiatives .pane-intro {
  color: #666;
  max-width: 720px;
}
.csr-initiatives .pane-subtitle {
  margin-top: 18px;
  color: #616161;
  font-weight: 600;
}
.csr-initiatives .pane-list {
  color: #444;
  margin-top: 12px;
  margin-bottom: 18px;
  list-style: none; /* remove default bullets */
  padding-left: 0; /* we'll position custom bullets so list start aligns with title */
}

.csr-initiatives .pane-list li {
  position: relative;
  padding-left: 28px; /* space for custom bullet */
  margin-bottom: 10px;
  color: #513670; /* use primary purple for list text */
  line-height: 1.4;
}

.csr-initiatives .pane-list li::before {
  content: "";
  position: absolute;
  left: 4px; /* aligns bullet with start of title text */
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #513670; /* dot color */
  border-radius: 50%;
}

/* Slightly reduce sizes on small screens */
@media (max-width: 576px) {
  .csr-initiatives .pane-list li {
    font-size: 16px;
    padding-left: 24px;
  }
  .csr-initiatives .pane-list li::before {
    width: 10px;
    height: 10px;
    left: 4px;
  }
}
.csr-initiatives .pane-image img {
  width: 100%;
  max-width: 920px; /* increase main image max width for higher fidelity */
  filter: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  display: block;
}

@media (max-width: 992px) {
  .csr-initiatives-grid {
    flex-direction: column;
  }
  .csr-initiatives::after {
    height: 120px;
  }
  .csr-initiatives .initiatives-tabs,
  .csr-initiatives .initiatives-content {
    width: 100%;
  }
  /* reduce icon size on tablet */
  .csr-initiatives .icon-small {
    height: 44px;
    margin-right: 10px;
  }
  .csr-initiatives .pane-image img {
    max-width: 720px;
  }
}

@media (max-width: 576px) {
  /* mobile: make icons and images smaller to fit viewport */
  .csr-initiatives .icon-small {
    height: 36px;
    margin-right: 8px;
  }
  .csr-initiatives .pane-image img {
    max-width: 100%;
    height: auto;
  }
  .csr-initiatives::after {
    height: 80px;
  }
}

/* Improve CSR initiatives layout on small screens and match hero width */
@media (max-width: 576px) {
  .csr-initiatives.container {
    width: 90%;
    max-width: none;
    /* match the same left bias used by .hero-content on mobile */
    margin-left: calc(5% - 25px);
    margin-right: calc(5% + 25px);
    padding: 40px 0 60px;
    min-height: auto;
    /* ensure inner content does not touch screen edges (match sustain image) */
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
  }

  .csr-initiatives-grid {
    gap: 16px;
  }

  /* Tabs should be stacked and take full width for easier tap targets */
  .csr-initiatives .initiatives-tabs {
    width: 100%;
    padding-right: 0;
    padding-top: 0;
    margin-bottom: 12px;
  }
  .csr-initiatives .initiatives-tabs ul {
    padding-left: 0;
  }
  .csr-initiatives .tab-item {
    padding-left: 0;
    border-left: none;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 10px;
  }
  .csr-initiatives .tab-item .tab-title {
    max-width: 100%;
    font-size: 16px;
    color: #5b2f78;
  }

  .csr-initiatives .initiatives-content {
    width: 100%;
    padding-left: 0;
  }

  .csr-initiatives .pane-title {
    font-size: 22px;
  }
  .csr-initiatives .pane-intro,
  .csr-initiatives .pane-subtitle,
  .csr-initiatives .pane-list li {
    font-size: 15px;
  }

  /* make images responsive and avoid large shadows on tiny screens */
  .csr-initiatives .pane-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    filter: none;
    border-radius: 6px;
  }
}

/* Ensure explicit horizontal padding for very small screens (<=575px)
   so CSR initiatives content never touches the screen edge.
   Stronger overrides (use !important) to beat bootstrap .container. */
@media (max-width: 575px) {
  /* Make the CSR container full-bleed but with internal horizontal padding */
  .csr-initiatives.container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Ensure the section wrapper doesn't add extra negative offsets */
  .csr-initiatives {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Grid and columns should respect container padding and not overflow */
  .csr-initiatives .csr-initiatives-grid {
    gap: 12px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .csr-initiatives .initiatives-tabs,
  .csr-initiatives .initiatives-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Ensure images don't extend to the viewport edge */
  .csr-initiatives .pane-image,
  .csr-initiatives .pane-image img {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
}

/* Responsive scaling for the gradient section title */
@media (max-width: 992px) {
  .csr-initiatives-title {
    font-size: 36px;
  }
}

@media (max-width: 576px) {
  .csr-initiatives-title {
    font-size: 26px;
  }
  .csr-initiatives .year-category .year-title {
    font-size: 20px;
    margin-bottom: 12px;
  }
  .csr-initiatives .tab-item .tab-title {
    font-size: 14px;
  }
}

/* Adjust spacing under the title for smaller screens */
@media (max-width: 992px) {
  .csr-initiatives-title {
    margin-bottom: 48px;
  }
}

@media (max-width: 576px) {
  .csr-initiatives-title {
    margin-bottom: 32px;
  }
}

/* small JS-free accessibility: allow keyboard focus highlight */
.csr-initiatives .tab-item:focus {
  /* remove the faded purple ring for mouse clicks (no visual border on click) */
  outline: none;
  box-shadow: none;
}

/* show a visible focus ring only for keyboard users */
.csr-initiatives .tab-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 47, 120, 0.12);
}

/* inactive tab title color */
.csr-initiatives .tab-item:not(.active) .tab-title {
  color: #8a8a8a; /* gray for inactive tabs */
}

/* ensure active tab title keeps the purple */
.csr-initiatives .tab-item.active .tab-title {
  color: #5b2f78;
}

/* CTA section styles */
.section-cta {
  position: relative;
  /* background image (kapal-gradien.png) */
  background-image: url("/cfind/source/images/kapal-gradien.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 80px 15px;
  overflow: hidden;
}
.section-cta,
.section-cta * {
  /* Ensure CTA uses Inter font everywhere */
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}
.section-cta::before {
  /* slight dark overlay so white text has contrast */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28));
  z-index: 0;
}
.section-cta .cta-inner {
  position: relative;
  z-index: 2;
}
.section-cta .cta-content {
  max-width: 550px;
  padding: 40px 20px;
}
.section-cta .cta-title {
  font-size: 64px;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: #fff;
}
.section-cta .cta-sub {
  margin: 0 0 22px 0;
  color: rgba(255, 255, 255, 0.92);
  max-width: 780px;
  font-size: 16px;
}
.btn.btn-cta {
  /* Make CTA button align and match width of title/subtitle */
  display: block;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box; /* ensure padding included in width */
  padding: 12px 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  text-decoration: none;
  background: transparent;
  font-weight: 600;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 120ms ease;
  align-self: flex-start; /* ensure it starts at same left baseline */
}
.btn.btn-cta:hover,
.btn.btn-cta:focus {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

@media (max-width: 992px) {
  .section-cta .cta-title {
    font-size: 48px;
  }
  .section-cta {
    padding: 60px 15px;
  }
}

@media (max-width: 576px) {
  .section-cta .cta-title {
    font-size: 32px;
  }
  .section-cta .cta-content {
    padding: 22px 12px;
  }
  .btn.btn-cta {
    padding: 10px 18px;
  }
}
