﻿/* history.php */
  /* ============================================================
     HISTORY PAGE
     ============================================================ */

  .breadcrumb {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 1.25rem;
  }
  .breadcrumb a {
    color: rgba(255,255,255,.5);
    transition: color .2s;
  }
  .breadcrumb a:hover { color: rgba(255,255,255,.85); }
  .breadcrumb-sep { opacity: .4; }

  .history-hero {
    position: relative;
    overflow: hidden;
    padding-top: 68px;
    background: var(--navy-700);
    min-height: 420px;
    display: flex;
    align-items: flex-end;
  }
  .history-hero__bg {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(120deg, rgba(9,16,31,.45) 0%, rgba(9,16,31,.18) 100%),
      url('../img/solar-panel2.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 1;
  }
  .history-hero__overlay {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(120deg, rgba(30,33,70,.96) 0%, rgba(53,57,104,.84) 52%, rgba(20,24,40,.74) 100%),
      repeating-linear-gradient(
        0deg,
        transparent,
        transparent 62px,
        rgba(255,255,255,.028) 62px,
        rgba(255,255,255,.028) 63px
      ),
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 62px,
        rgba(255,255,255,.022) 62px,
        rgba(255,255,255,.022) 63px
      );
  }
  .history-hero__accent {
    position: absolute;
    right: 8%;
    top: 52%;
    width: 34vw;
    height: 34vw;
    min-width: 280px;
    min-height: 280px;
    max-width: 520px;
    max-height: 520px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243,115,33,.12) 0%, rgba(243,115,33,.02) 42%, transparent 72%);
    pointer-events: none;
  }
  .history-hero__content {
    position: relative;
    z-index: 2;
    padding: var(--sp-2xl) 0 var(--sp-xl);
    width: 100%;
  }
  .history-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--orange-500);
    margin-bottom: 1.25rem;
  }
  .history-hero__eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--orange-500);
  }
  .history-hero__heading {
    color: var(--white);
    max-width: 760px;
  }
  .history-hero__heading em {
    font-style: normal;
    color: var(--orange-500);
  }
  .history-hero__sub {
    margin-top: 1.25rem;
    font-size: 1.05rem;
    font-weight: 300;
    color: rgba(255,255,255,.68);
    max-width: 620px;
    line-height: 1.6;
  }

  .history-nav {
    position: sticky;
    top: 68px;
    z-index: 900;
    background: var(--white);
    border-bottom: 1px solid var(--sand);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
  }
  .history-nav__inner {
    display: flex;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2.5rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .history-nav__inner::-webkit-scrollbar { display: none; }
  .history-nav__link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .95rem 1.2rem;
    font-size: .825rem;
    font-weight: 700;
    color: var(--grey-500);
    letter-spacing: .02em;
    border: 0;
    border-bottom: 2.5px solid transparent;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
  }
  .history-nav__link:hover { color: var(--grey-800); }
  .history-nav__link.is-active {
    color: var(--orange-500);
    border-bottom-color: var(--orange-500);
  }

  .history-timeline {
    position: relative;
    background:
      linear-gradient(rgba(9,16,31,.74), rgba(9,16,31,.74)),
      url('../img/solar.webp') no-repeat center center / cover;
    background-attachment: fixed;
    padding: 20px 0 100px;
  }
  .history-timeline::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
  }

  .timeline-phase {
    position: relative;
    padding: 30px 0 26px;
    background: transparent;
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity .8s ease,
      transform .8s ease;
  }
  .timeline-phase.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .timeline-phase__inner {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
  }
  .timeline-phase__range {
    margin: 0;
    font-size: clamp(64px, 10vw, 86px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .95;
    color: rgba(255,255,255,.12);
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity .9s ease .08s,
      transform .9s ease .08s;
  }
  .timeline-phase__summary {
    margin: 12px 0 0;
    font-size: .95rem;
    line-height: 1.7;
    color: rgba(255,255,255,.62);
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity .9s ease .22s,
      transform .9s ease .22s;
  }
  .timeline-phase.is-visible .timeline-phase__range,
  .timeline-phase.is-visible .timeline-phase__summary {
    opacity: 1;
    transform: translateY(0);
  }

  .timeline-track {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 40px 12px;
  }
  .timeline-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(223,230,236,.55) 0%, rgba(205,215,223,.38) 100%);
    transform: translateX(-50%);
  }

  .timeline-item {
    position: relative;
    width: 100%;
    min-height: 150px;
    margin-bottom: 42px;
    opacity: 0;
    transform: translateY(26px);
    transition:
      opacity .55s ease .12s,
      transform .55s ease .12s;
  }
  .timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .timeline-card {
    width: 45%;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.22);
    border-left: 3px solid var(--orange-500);
    padding: 22px 26px 24px;
    position: relative;
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
  }
  .timeline-item--left .timeline-card {
    margin-right: auto;
    margin-left: 0;
  }
  .timeline-item--right .timeline-card {
    margin-left: auto;
    margin-right: 0;
    border-left: 1px solid rgba(255,255,255,.22);
    border-right: 3px solid var(--orange-500);
  }
  .timeline-item.is-visible .timeline-card {
    box-shadow: 0 14px 32px rgba(0,0,0,.26);
  }

  .timeline-item__dot {
    position: absolute;
    top: 26px;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.7);
    border: 2px solid rgba(255,255,255,.95);
    box-shadow: 0 0 0 2px rgba(243,115,33,.65);
    transform: translateX(-50%);
    transition: background .3s ease, box-shadow .3s ease;
    z-index: 3;
  }
  .timeline-item.is-visible .timeline-item__dot {
    background: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(243,115,33,.20);
  }

  .timeline-item__connector {
    position: absolute;
    top: 31px;
    height: 1px;
    background: rgba(223,230,236,.45);
    z-index: 1;
  }
  .timeline-item--left .timeline-item__connector {
    left: 45%;
    width: 5%;
  }
  .timeline-item--right .timeline-item__connector {
    left: 50%;
    width: 5%;
  }

  .timeline-card__year {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--orange-500);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .timeline-card__year::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--orange-500);
    flex-shrink: 0;
  }

  .timeline-card__events {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .timeline-card__events li {
    font-size: 13.5px;
    color: rgba(255,255,255,.92);
    line-height: 1.65;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  .timeline-card__events li:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .timeline-card__events li::before {
    content: '—';
    color: rgba(255,255,255,.45);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  @media (max-width: 1024px) {
    .history-nav__inner {
      padding: 0 1.5rem;
    }
    .timeline-phase__inner {
      padding: 0 28px;
    }
    .timeline-track {
      padding: 14px 28px 12px;
    }
  }

  @media (max-width: 768px) {
    .history-hero {
      min-height: 360px;
    }
    .history-hero__accent {
      width: 56vw;
      height: 56vw;
      right: -6vw;
      top: 44%;
    }

    .history-nav__link {
      padding: .9rem .95rem;
      font-size: .78rem;
    }

    .history-timeline {
      background-attachment: scroll;
      padding: 18px 0 80px;
    }

    .timeline-phase {
      padding: 24px 0 20px;
    }
    .timeline-phase__inner {
      padding: 0 24px;
    }
    .timeline-phase__range {
      font-size: clamp(42px, 14vw, 64px);
    }
    .timeline-phase__summary {
      font-size: .9rem;
      margin-top: 10px;
    }

    .timeline-track {
      padding: 18px 24px 0;
    }
    .timeline-track::before {
      left: 16px;
      transform: none;
    }
    .timeline-item {
      width: 100%;
      min-height: auto;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: 42px;
    }
    .timeline-card {
      width: 100%;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
    .timeline-item__dot {
      left: 10px !important;
      right: auto !important;
      transform: none !important;
      top: 22px;
    }
    .timeline-item__connector {
      display: none;
    }
    .timeline-item--right .timeline-card {
      border-right: 1px solid rgba(255,255,255,.22);
      border-left: 3px solid var(--orange-500);
    }
  }

  @media (max-width: 480px) {
    .history-nav {
      overflow-x: auto;
    }
    .history-nav__inner {
      width: max-content;
      min-width: 100%;
      padding: 0 16px;
    }
    .timeline-phase {
      padding: 20px 0 18px;
    }
    .timeline-card {
      padding: 18px 18px 20px;
    }
  }