/* HERO */
.story-hero {
  text-align: center;
  padding: 40px 20px 20px;
}

.story-hero h1 { font-size: 36px; }

.story-hero p {
  color: #777;
  font-size: 15px;
}

/* WRAPPER */
.story-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* MAIN SECTION */
.story-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  gap: 30px;
  background: #f8fafc;
  border-radius: 20px;
  transition: transform 0.3s ease;   /* BUG FIX: was `0.3s` (all props) */
}

.story-section:hover { transform: translateY(-2px); }

/* TEXT */
.story-content { flex: 1; }

.story-content h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.story-content p {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
  text-align: justify;
}

/* IMAGE */
.story-image { flex: 1; }

.story-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: block;                    /* BUG FIX: removes whitespace gap */
}

/* STORY CARDS */
.story-cards {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.story-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* BUG FIX: scoped */
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* ============================================================
   CARD TOP — single definition
   BUG FIX: was declared twice with conflicting heights (100 + 140)
   ============================================================ */
.card-top {
  height: 140px;
  overflow: hidden;
}

.card-top.green  { background: linear-gradient(135deg, #6dd5ed, #2193b0); }
.card-top.blue   { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.card-top.orange { background: linear-gradient(135deg, #ff9966, #ff5e62); }

.card-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;                    /* BUG FIX: removes inline-image gap */
}

/* BODY */
.card-body { padding: 20px; }

.card-body h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.card-body p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  text-align: justify;
}

/* ============================================================
   TIMELINE SECTION
   ============================================================ */
.timeline {
  max-width: 1100px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}

.timeline h2 {
  font-size: 28px;
  margin-bottom: 40px;
}

.timeline-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;           /* BUG FIX: items start from top so line aligns */
  position: relative;
}

/* LINE */
.timeline-container::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 5%;
  width: 90%;
  height: 3px;
  background: #e5e7eb;
  z-index: 0;
  pointer-events: none;              /* BUG FIX: purely decorative */
}

/* CARD */
.timeline-card {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 30%;
}

/* YEAR CIRCLE */
.circle {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9966, #ff5e62);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover .circle {       /* BUG FIX: added subtle hover */
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(255, 94, 98, 0.35);
}

.timeline-card p {
  font-size: 14px;
  color: #555;
}

/* CTA */
.cta {
  position: relative;
  padding: 100px 20px;
  text-align: center;
  color: white;
  overflow: hidden;
  background: linear-gradient(135deg, #4a6741, #7ca982);
}

.cta-content {
  position: relative;
  z-index: 2;
  animation: fadeUp 1s ease;
}

.cta h2 { font-size: 36px; margin-bottom: 10px; }
.cta p  { font-size: 16px; margin-bottom: 25px; opacity: 0.9; }

/* BUTTON */
.cta a {
  display: inline-block;
  padding: 14px 30px;
  border: none;
  border-radius: 30px;
  background: white;
  color: #4a6741;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;             /* BUG FIX: strip anchor underline */
  transition: transform 0.3s ease, box-shadow 0.3s ease;  /* BUG FIX: scoped */
  position: relative;
  isolation: isolate;                /* BUG FIX: confine ::after behind text */
}

.cta a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* GLOW EFFECT — behind label */
.cta a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: rgba(255,255,255,0.4);
  opacity: 0;
  transition: opacity 0.3s ease;     /* BUG FIX: was `0.3s` */
  z-index: -1;                       /* BUG FIX: was covering button text */
}

.cta a:hover::after { opacity: 1; }

/* FLOATING SHAPES */
.cta-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  animation: floatUp 6s infinite ease-in-out;
  pointer-events: none;              /* BUG FIX: shouldn't block CTA clicks */
}

.shape1 {
  width: 120px; height: 120px;
  background: white;
  top: 20%; left: 10%;
}

.shape2 {
  width: 80px; height: 80px;
  background: white;
  bottom: 20%; right: 15%;
  animation-delay: 2s;
}

.shape3 {
  width: 150px; height: 150px;
  background: white;
  top: 10%; right: 5%;
  animation-delay: 4s;
}

/* ============================================================
   ANIMATIONS
   BUG FIX: `fadeUp` was used by .cta-content but was missing.
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-20px); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .story-hero h1 { font-size: 26px; }    /* BUG FIX: was 36px, overflowed phones */

  .story-section {
    flex-direction: column;
    padding: 20px;
  }

  /* .story-image img { 
    height: 320px;
    width: 540px;
  } */

  .timeline-container {
    flex-direction: column;
    gap: 30px;
  }

  .timeline-container::before { display: none; }

  .timeline-card { width: 100%; }

  .cta h2 { font-size: 26px; }
  .cta    { padding: 70px 20px; }
}

@media (min-width: 768px){

    .story-image img { 
    height: 320px;
    width: 540px;
  }

}

@media (max-width: 425px) {
  .story-image img { 
    height: 220px;
    width: 240px;
  }
}