/* Coral Reef Restoration — How It Works page styles
   Mirrors strongher-sustainable-farm.css (same sf-/cc-/system-/journey-/donation- vocabulary).
   Uses the YF gold accent (#BE9A78 / #d4b896) throughout — no blue or teal accents,
   matching StrongHER's brand palette. */

:root {
  --crr-accent: #BE9A78;
  --crr-accent-light: #d4b896;
}

/* ===================================
   HERO SECTION
   =================================== */
.sf-hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Arial', sans-serif;
  color: white;
  background: black;
}

.sf-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.sf-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgb(0 0 0 / 0%) 0%, rgb(0 0 0 / 65%) 40%, rgb(0 0 0 / 65%) 60%, rgb(0 0 0 / 0%) 100%);
  z-index: 1;
}

.sf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.sf-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  text-align: center;
}

.sf-hero-text {
  color: white;
  text-align: center;
}

.sf-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.sf-hero-badge a,
.sf-hero-badge a:hover,
.sf-hero-badge a:visited,
.sf-hero-badge a:active {
  color: #ffffff;
  text-decoration: none;
}

.sf-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: white;
}

.sf-hero-description {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: white;
}

.sf-hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.sf-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sf-btn-primary {
  background: linear-gradient(135deg, var(--crr-accent), var(--crr-accent-light));
  color: white;
  box-shadow: 0 8px 32px rgba(190, 154, 120, 0.3);
}

.sf-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(190, 154, 120, 0.4);
  color: white;
  text-decoration: none;
}

.sf-btn-primary svg {
  transition: transform 0.3s ease;
}

.sf-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.sf-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

@media (max-width: 768px) {
  .sf-hero {
    min-height: 0;
    padding: 40px 0px;
  }

  .sf-hero-content {
    padding: 3rem 0;
  }

  .sf-hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .sf-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .sf-hero-title {
    font-size: 2.5rem;
  }

  .sf-hero-description {
    line-height: 1.5;
  }
}

/* ===================================
   CC TABBED SECTION (Restoration Techniques)
   =================================== */
.cc-section {
  padding: 100px 0;
  background-color: #f8f9fb;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.cc-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(190, 154, 120, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(54, 82, 127, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.cc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.cc-header {
  text-align: center;
  margin-bottom: 40px;
}

.cc-garden-images {
  font-size: 0px;
  margin-bottom: 60px;
  position: relative;
}

.cc-garden-images img {
  width: 45%;
  margin-left: 2.5%;
  margin-right: 2.5%;
  display: inline-block;
  border-radius: 24px;
  height: auto;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

@media screen and (max-width: 768px) {
  .cc-section {
    padding: 60px 0;
  }

  .cc-header {
    margin-bottom: 60px;
  }

  .cc-garden-images {
    position: relative;
    overflow: hidden;
    margin-bottom: 0px;
    padding-bottom: 45px;
  }

  .cc-garden-images .slider-container {
    display: flex;
    transition: transform 0.3s ease-in-out;
    width: 100%;
  }

  .cc-garden-images img {
    width: 100%;
    margin: 0;
    flex-shrink: 0;
    box-shadow: none;
  }

  .slider-dots {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .slider-dot.active {
    background: #BE9A78;
    transform: scale(1.2);
  }
}

.cc-title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: #333333;
  margin-bottom: 24px;
  margin-top: 0px;
}

.cc-subtitle {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a5568;
  max-width: 800px;
  margin: 0 auto;
}

.cc-tabs-wrapper {
  position: relative;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.cc-tabs {
  display: flex;
  min-width: 0; /* allow .cc-tabs to fit its parent so overflow-x can trigger */
  margin: 0;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cc-tabs::-webkit-scrollbar {
  display: none;
}

/* Edge-fade scroll indicators — real buttons (so they're clickable),
   positioned absolutely over the wrapper edges. The .is-overflowing /
   .is-at-start / .is-at-end classes on .cc-tabs-wrapper are toggled by
   the script in how-it-works.html based on the scroll state of .cc-tabs. */
.cc-tab-nav {
  position: absolute;
  top: 0;
  bottom: 1px; /* sit above the border-bottom line */
  width: 48px;
  display: flex;
  align-items: center;
  border: 0;
  margin: 0;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4a5568;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.cc-tab-nav:hover {
  color: #1a2435;
}

.cc-tab-nav:focus-visible {
  outline: 2px solid var(--crr-accent);
  outline-offset: -6px;
  border-radius: 6px;
}

.cc-tab-nav-prev {
  left: 0;
  justify-content: flex-start;
  padding: 0 8px 0 14px;
  background: linear-gradient(to left, rgba(248, 249, 251, 0) 0%, rgba(248, 249, 251, 0.95) 55%);
}

.cc-tab-nav-next {
  right: 0;
  justify-content: flex-end;
  padding: 0 14px 0 8px;
  background: linear-gradient(to right, rgba(248, 249, 251, 0) 0%, rgba(248, 249, 251, 0.95) 55%);
}

.cc-tabs-wrapper.is-overflowing:not(.is-at-start) .cc-tab-nav-prev,
.cc-tabs-wrapper.is-overflowing:not(.is-at-end) .cc-tab-nav-next {
  opacity: 1;
  pointer-events: auto;
}

/* Chevrons are mobile-only — never show on desktop, even if a narrow
   desktop window momentarily triggers the overflow detection. */
@media (min-width: 769px) {
  .cc-tab-nav {
    display: none;
  }
}

.cc-tab {
  flex: 1;
  min-width: max-content;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cc-tab:hover {
  color: var(--crr-accent);
}

.cc-tab.active {
  color: var(--crr-accent);
  border-bottom-color: var(--crr-accent);
}

.cc-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(190, 154, 120, 0.12);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(54, 82, 127, 0.1);
  display: none;
}

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

.cc-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.cc-content__title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 16px;
}

.cc-content__description {
  font-size: 1.125rem;
  color: #4a5568;
  margin-bottom: 2rem;
}

.cc-features {
  display: grid;
  gap: 1rem;
}

.cc-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cc-feature__bullet {
  width: 1.5rem;
  height: 1.5rem;
  background-color: rgba(190, 154, 120, 0.15);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.25rem;
  position: relative;
}

.cc-feature__bullet::after {
  content: "";
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--crr-accent);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cc-feature p {
  color: #4a5568;
  margin: 0;
  line-height: 1.5;
}

.cc-image {
  width: 100%;
  height: auto;
  border-radius: 24px;
  object-fit: cover;
}

@media (max-width: 768px) {
  /* Stack tabs vertically on narrow screens so long labels like
     "Monitoring & Maintenance" don't clip or require horizontal scroll. */
  .cc-tabs {
    flex-direction: column;
    border-bottom: none;
  }

  .cc-tabs-wrapper {
    border-bottom: none;
  }

  .cc-tab {
    flex: 1 1 auto;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: normal;
  }

  .cc-tab.active {
    border-bottom-color: var(--crr-accent);
  }

  .cc-content {
    padding: 32px;
  }

  .cc-content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cc-content__title {
    font-size: 1.5rem;
  }

  .cc-content-right {
    order: -1;
  }

  .cc-image {
    max-height: 300px;
    width: 100%;
    object-fit: cover;
  }

  .cc-subtitle {
    line-height: 1.5;
  }

  .cc-feature p {
    font-size: 1rem;
  }
}

/* ===================================
   GROWING-SYSTEM SECTION (Why It Matters / Where the science lives)
   =================================== */
.growing-system {
  background-color: #fff;
  padding: 100px 0;
  position: relative;
}

.growing-system::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(190, 154, 120, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(54, 82, 127, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.system-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.system-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(190, 154, 120, 0.12), rgba(190, 154, 120, 0.05));
  border: 1px solid rgba(190, 154, 120, 0.3);
  color: var(--crr-accent);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.system-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: #333333;
  margin-bottom: 24px;
  margin-top: 0px;
}

.system-header p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a5568;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.system-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(54, 82, 127, 0.1);
  border-radius: 24px;
  padding: 40px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(54, 82, 127, 0.08);
}

.number {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--crr-accent);
  opacity: 0.3;
  font-family: monospace;
}

.accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(135deg, var(--crr-accent), var(--crr-accent-light));
  margin-bottom: 24px;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.system-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 16px;
}

.system-content p {
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
  font-size: 1.125rem;
}

@media (max-width: 768px) {
  .growing-system {
    padding: 60px 0;
  }

  .system-header {
    margin-bottom: 60px;
  }

  .system-header h2 {
    font-size: 2rem;
  }

  .system-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .system-card {
    padding: 32px;
  }
}

/* ===================================
   PHASE TIMELINE SECTION (4-Phase Project)
   =================================== */
.phase-timeline {
  padding: 100px 0;
  background-color: #f8f9fb;
  position: relative;
}

.phase-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(190, 154, 120, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(54, 82, 127, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.journey-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 80px;
  position: relative;
  z-index: 2;
}

.journey-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: #333333;
  margin-bottom: 24px;
  margin-top: 0px;
}

.journey-header p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a5568;
}

.journey-cards {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.journey-card {
  width: 100%;
  transition: all 0.3s ease;
}

.journey-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(190, 154, 120, 0.1);
  border-radius: 24px;
  padding: 40px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(54, 82, 127, 0.08);
}

.journey-badge {
  display: inline-block;
  background: linear-gradient(135deg, #BE9A78, #d4b896);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(190, 154, 120, 0.25);
  transform: translateY(0);
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.journey-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 16px;
}

.journey-content p {
  color: #4a5568;
  margin-bottom: 24px;
  line-height: 1.6;
  font-size: 1.125rem;
}

.journey-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.journey-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4a5568;
  margin-bottom: 12px;
  font-size: 1rem;
}

.journey-features li:last-child {
  margin-bottom: 0;
}

.journey-features li svg {
  color: var(--crr-accent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .phase-timeline {
    padding: 60px 0;
  }

  .journey-header {
    margin-bottom: 60px;
  }

  .journey-header h2 {
    font-size: 2rem;
  }

  .journey-content {
    padding: 32px;
  }

  .journey-header p {
    line-height: 1.5;
  }

  .journey-content p {
    font-size: 1.125rem;
  }

  .journey-cards {
    gap: 30px;
  }
}

/* ===================================
   DONATION SECTION
   =================================== */
.donation-section {
  background: linear-gradient(135deg, #BE9A78 0%, #d4b896 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.donation-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.donation-text h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  color: white;
  margin-bottom: 40px;
}

.donation-text p {
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1.75;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.impact-metrics {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 48px;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 200px;
  text-align: center;
}

.metric-number {
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1;
}

.metric-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
}

.donate-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 160px;
  justify-content: center;
  background: #ffffff;
  color: var(--crr-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.donate-button:hover {
  transform: translateY(-2px);
  color: var(--crr-accent);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  text-decoration: none;
}

.donate-button svg {
  stroke: var(--crr-accent);
}

@media (max-width: 768px) {
  .donation-section {
    padding: 60px 0;
  }

  .donation-text h2 {
    font-size: 2rem;
  }

  .donation-text p {
    font-size: 1.125rem;
    padding: 0 1rem;
  }

  .impact-metrics {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    padding: 0 1rem;
  }

  .metric {
    max-width: 250px;
  }

  .metric-number {
    font-size: 2rem;
  }
}

/* Let CTA titles flow to full viewport width on mobile rather than
   forcing the desktop <br> line break. */
@media (max-width: 768px) {
  .yf-cta-title br {
    display: none;
  }
}
