/* ========================================
   ABOUT US PAGE STYLES
   
   Apple-like history timeline.
   Calm, stable, no animations.
   8pt spacing system only.
   
   @package GodsGift
   @since 1.8.0
   ======================================== */

/* ========================================
   ABOUT PAGE CONTAINER
   ======================================== */

.about-page {
  background: var(--color-white);
  min-height: 60vh;
}

.about-page__header {
  text-align: center;
  padding: var(--space-12) var(--space-8) var(--space-8);
  max-width: 1100px;
  margin: 0 auto;
}

.about-page__title {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-black);
  margin: 0;
  line-height: var(--line-height-tight);
}

.about-page__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-8) var(--space-16);
}

/* ========================================
   ABOUT TIMELINE SECTION
   
   Two-column layout:
   - Left: timeline content (scrollable)
   - Right: sticky navigation
   ======================================== */

.about-timeline {
  padding: var(--space-8) 0 var(--space-16);
}

.about-timeline__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--space-8);  /* 32px */
  padding-right: var(--space-8); /* 32px */
}

/* Two-column grid */
.about-timeline__grid {
  display: grid;
  /* Right column wide enough for long labels like "2025 — настоящее время" */
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: var(--space-12); /* 48px */
  align-items: start;
}

/* ========================================
   TIMELINE CONTENT (LEFT COLUMN)
   ======================================== */

.about-timeline__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-12); /* 48px between items */
}

/* ========================================
   TIMELINE ITEM
   
   Individual timeline entry.
   Contains: month, period (year range), body text.
   
   GEOMETRY:
   - border-left: 3px (the vertical timeline line)
   - Dot is centered on this line using transform
   - Works for any number of items
   ======================================== */

.timeline-item {
  position: relative;
  padding-left: var(--space-8); /* 32px for timeline line space */
  border-left: 3px solid var(--color-gray-200);
}

/* Timeline dot marker - geometrically centered on the vertical line */
.timeline-item::before {
  content: '';
  position: absolute;
  /*
   * GEOMETRY:
   * - border-left is 3px, so its center is at 1.5px from left edge
   * - left: 0 positions the dot's left edge at the border's left edge
   * - translateX(-50%) shifts the dot left by half its width
   * - This centers the dot exactly on the 3px line
   */
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--color-white);
  border: 3px solid var(--color-primary);
  border-radius: 50%;
  /* Center the dot on the line: shift left by (dot-width/2 - line-width/2) */
  transform: translateX(calc(-50% - 1.5px));
  /* Ensure dot appears above content */
  z-index: 1;
  /* Prevent content from pushing the dot */
  box-sizing: border-box;
}

/* Item header */
.timeline-item__header {
  margin-bottom: var(--space-6); /* 24px */
}

/* Month - small, muted, uppercase (secondary label) */
.timeline-item__month {
  display: block;
  color: var(--color-gray-500);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1); /* 4px - tight coupling to period */
}

/* Period (year range) - NOT orange */
.timeline-item__period {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-black);
  margin: 0;
  line-height: var(--line-height-tight);
}

/* Item body text */
.timeline-item__body {
  max-width: 640px;
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-700);
}

.timeline-item__body p {
  margin: 0 0 var(--space-4) 0;
}

.timeline-item__body p:last-child {
  margin-bottom: 0;
}

/* Images in timeline body */
.timeline-item__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

/* ========================================
   TIMELINE NAVIGATION (RIGHT COLUMN)
   
   Sticky sidebar with anchor links.
   Native CSS scroll behavior.
   NO JavaScript required.
   ======================================== */

.about-timeline__nav {
  position: sticky;
  top: calc(var(--site-header-height, 72px) + var(--space-8));
  align-self: start;
  /* Ensure nav doesn't shrink */
  flex-shrink: 0;
}

/* Navigation heading (optional) */
.about-timeline__nav-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--space-4) var(--space-3);
}

/* Navigation list */
.timeline-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3); /* 12px - slightly tighter for vertical list */
}

.timeline-nav li {
  margin: 0;
  padding: 0;
}

/* Navigation links */
.timeline-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-sm);
  /* Allow natural text wrapping, no clipping */
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Prevent breaking numbers like "2015–2024" or "2025" */
  word-break: keep-all;
  hyphens: none;
  /* No text overflow - full labels always visible */
  text-overflow: clip;
  overflow: visible;
  /* Subtle hover effect only */
  transition: color 0.15s ease, background 0.15s ease;
}

.timeline-nav a:hover,
.timeline-nav a:focus {
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.08);
  outline: none;
}

.timeline-nav a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================
   ANCHOR SCROLL BEHAVIOR
   
   Native anchor scrolling with proper offset.
   Accounts for fixed header height.
   ======================================== */

/* All timeline items need scroll offset for anchor navigation */
.timeline-item {
  scroll-margin-top: calc(var(--site-header-height, 72px) + var(--space-6));
}

/* Visual indicator when item is targeted via anchor */
.timeline-item:target::before {
  background: var(--color-primary);
}

/* ========================================
   INTRO SECTION (optional, before timeline)
   ======================================== */

.about-intro {
  padding: var(--space-12) 0;
  background: var(--color-gray-50);
  text-align: center;
}

.about-intro__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.about-intro p {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-600);
  margin: 0;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 960px) {
  .about-timeline__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  /* Navigation moves BELOW content on mobile */
  .about-timeline__nav {
    position: static;
    order: 2;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
  }
  
  .about-timeline__content {
    order: 1;
  }
  
  /* Horizontal nav on tablet */
  .timeline-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .timeline-nav a {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
  }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
  .about-page__header {
    padding: var(--space-8) var(--space-4) var(--space-6);
  }
  
  .about-page__title {
    font-size: var(--font-size-3xl);
  }
  
  .about-page__content {
    padding: 0 var(--space-4) var(--space-12);
  }
  
  .about-timeline__inner {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  .about-timeline__content {
    gap: var(--space-8);
  }
  
  .timeline-item {
    padding-left: var(--space-6);
  }
  
  .timeline-item__period {
    font-size: var(--font-size-xl);
  }
  
  .timeline-item__body {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 480px) {
  .about-page__header {
    padding: var(--space-6) var(--space-3) var(--space-4);
  }
  
  .about-page__title {
    font-size: var(--font-size-2xl);
  }
  
  .about-page__content {
    padding: 0 var(--space-3) var(--space-8);
  }
  
  .about-timeline__inner {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
  
  .timeline-item {
    padding-left: var(--space-4);
    border-left-width: 2px;
  }
  
  /* Timeline dot - geometrically centered on 2px line */
  .timeline-item::before {
    left: 0;
    top: 4px;
    width: 10px;
    height: 10px;
    border-width: 2px;
    /* Center on 2px line: shift by (dot-width/2 - line-width/2) */
    transform: translateX(calc(-50% - 1px));
  }
  
  .timeline-nav a {
    padding: var(--space-1) var(--space-3);
  }
}

/* ========================================
   SMOOTH SCROLL BEHAVIOR
   (CSS-only, no JavaScript)
   ======================================== */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ========================================
   NO ANIMATIONS
   
   All content is visible immediately.
   No opacity transitions, no reveal effects.
   Calm, stable, Apple-like UX.
   ======================================== */
