/* ===================================
   Story Section - Two-Column Layout
   =================================== */

#story {
  padding: var(--space-12) var(--space-4);
  background-color: var(--color-bg-subtle);
}

.story-container {
  max-width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.story-container.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: Stacked layout */
.story-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-bg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-content {
  width: 100%;
}

/* Story Header */
.story-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.story-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.story-title-group {
  flex: 1;
}

.story-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0 0 var(--space-1) 0;
  line-height: 1.2;
}

.story-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-lighter);
  margin: 0;
  line-height: 1.4;
}

/* Story Text Content */
.story-text {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-light);
}

.story-text p {
  margin-bottom: var(--space-4);
}

.story-text p:last-of-type {
  margin-bottom: var(--space-6);
}

/* Story CTA Button */
.story-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-bg);
  background-color: var(--color-primary);
  border-radius: var(--radius-base);
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.story-cta:hover {
  background-color: #005660;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.story-cta::after {
  content: '→';
  font-size: var(--text-lg);
  transition: transform var(--transition-fast);
}

.story-cta:hover::after {
  transform: translateX(4px);
}

/* Tablet: Two-column layout starts */
@media (min-width: 768px) {
  #story {
    padding: var(--space-16) var(--space-6);
  }

  .story-container {
    display: flex;
    flex-direction: row;
    max-width: var(--container-xl);
    margin: 0 auto;
    height: 75vh;
    min-height: 500px;
    max-height: 700px;
    gap: var(--space-8);
  }

  /* Image takes 40% width */
  .story-image {
    flex: 0 0 40%;
    height: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--color-bg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 0;
  }

  .story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Content takes 60% width */
  .story-content {
    flex: 0 0 60%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
  }

  .story-header {
    flex-shrink: 0;
    margin-bottom: var(--space-6);
  }

  .story-icon {
    width: 64px;
    height: 64px;
  }

  .story-title {
    font-size: var(--text-xl);
  }

  .story-tagline {
    font-size: var(--text-base);
  }

  /* Scrollable content area */
  .story-text {
    flex: 1;
    overflow-y: auto;
    padding-right: var(--space-4);
    font-size: var(--text-lg);
    line-height: 1.75;
  }

  /* Custom scrollbar styling */
  .story-text::-webkit-scrollbar {
    width: 6px;
  }

  .story-text::-webkit-scrollbar-track {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
  }

  .story-text::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-sm);
  }

  .story-text::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-lighter);
  }

  .story-text p:last-of-type {
    margin-bottom: var(--space-8);
  }

  .story-cta {
    font-size: var(--text-lg);
    padding: var(--space-4) var(--space-8);
  }
}

/* Desktop: Slightly larger */
@media (min-width: 1024px) {
  #story {
    padding: var(--space-24) var(--space-8);
  }

  .story-container {
    height: 75vh;
    min-height: 600px;
    max-height: 800px;
    gap: var(--space-12);
  }

  /* Adjust proportions slightly for desktop */
  .story-image {
    flex: 0 0 45%;
  }

  .story-content {
    flex: 0 0 55%;
    padding: var(--space-10);
  }

  .story-icon {
    width: 72px;
    height: 72px;
  }

  .story-title {
    font-size: var(--text-2xl);
  }

  .story-text {
    font-size: var(--text-xl);
    line-height: 1.8;
  }
}
