/* ─── Hero ──────────────────────────────────────────────────── */

.hero {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.40) 100%),
    url('../../img/about/hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-dark-1);
  min-height: calc(100svh - var(--top-bar-height) - var(--header-height));
  display: flex;
  align-items: center;
}

.hero .container {
  max-width: 1240px;
}

.hero__wrp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 60px 0;
}

.hero__title {
  font-family: var(--font-base);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-medium);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.hero__desc {
  font-family: var(--font-base);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: var(--lh-base);
}

/* ─── About Company ─────────────────────────────────────────── */

.about-company {
  padding: 120px 0;
}

.about-company__wrp {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.about-company__media {
  flex-shrink: 0;
  width: 515px;
}

.about-company__img {
  width: 100%;
  height: 514px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
}

.about-company__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
  min-width: 0;
}

.about-company__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-company__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.about-company__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  line-height: var(--lh-loose);
}

.about-company__accent {
  font-weight: var(--fw-bold);
  color: var(--color-red);
}

/* ─── History ───────────────────────────────────────────────── */

.history {
  padding: 120px 0;
  background-color: var(--color-bg-light);
}

.history__wrp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.history__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  text-align: center;
}

/* timeline */
.history__timeline {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.history__line {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 1px;
  transform: translateX(-50%);
  background-color: var(--color-border);
  pointer-events: none;
}

.history__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--color-red);
  will-change: height;
}

/* rows */
.history__row {
  display: flex;
  align-items: flex-start;
}

.history__cell {
  flex: 1;
  min-width: 0;
  padding: 0 40px 90px;
}

.history__cell--left {
  text-align: right;
}

.history__cell--empty {
  pointer-events: none;
}

.history__cell--center {
  flex: 0 0 52px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  padding-bottom: 90px;
}

.history__row--last .history__cell,
.history__row--last .history__cell--center {
  padding-bottom: 0;
}

/* dot */
.history__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-border);
  flex-shrink: 0;
  transition: background-color var(--transition-base);
}

.history__dot.active {
  background-color: var(--color-red);
}

/* entry */
.history__entry {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history__year {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: var(--fw-bold);
  color: var(--color-red);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
}

.history__text {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-gray);
  line-height: var(--lh-loose);
}

/* note */
.history__note {
  width: 100%;
  background-color: var(--color-gray);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.history__note p {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: var(--lh-loose);
}

/* ─── Directions ────────────────────────────────────────────── */

.directions {
  padding: 120px 0 60px;
  background-color: var(--color-white);
}

.directions__wrp {
  display: flex;
  flex-direction: column;
  gap: 50px;
  align-items: center;
}

.directions__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  text-align: center;
}

.directions__cards {
  display: flex;
  gap: 10px;
  height: 550px;
  width: 100%;
}

.directions__card {
  position: relative;
  flex: 0 0 230px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: flex-grow var(--transition-slow);
}

.directions__card--active {
  flex: 1 0 230px;
}

/* body: title + desc (активна картка) */
.directions__card-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.directions__card--active .directions__card-body {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 250ms ease 200ms;
}

.directions__card-title {
  font-family: var(--font-base);
  font-size: 26px;
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: var(--lh-tight);
  margin-bottom: 16px;
}

.directions__card-desc {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: var(--lh-base);
}

/* label: вертикальний заголовок (стиснута картка) */
.directions__card-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: opacity 150ms ease;
}

.directions__card-label span {
  display: block;
  white-space: nowrap;
  transform: rotate(-90deg);
  font-family: var(--font-base);
  font-size: 20px;
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: var(--lh-tight);
}

.directions__card--active .directions__card-label {
  opacity: 0;
  pointer-events: none;
}

/* ─── Safety ────────────────────────────────────────────────── */

.safety {
  padding: 60px 0 100px;
  background-color: var(--color-white);
}

.safety__wrp {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.safety__head {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}

.safety__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.safety__text {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  line-height: var(--lh-loose);
}

.safety__stats {
  display: flex;
  gap: 60px;
  align-items: stretch;
}

.safety__stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 10px;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-lg);
  min-height: 358px;
  text-align: center;
}

.safety__stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  background-color: var(--color-red-muted);
  border-radius: var(--radius-full);
}

.safety__stat-number {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: var(--fw-bold);
  color: var(--color-red);
  line-height: 1;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.safety__stat-label {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  line-height: var(--lh-base);
}


/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 1299px) {
  .safety__stats {
    gap: 30px;
  }

  .safety__stat-number {
    font-size: 48px;
  }
}

/* Tablet: 2×2 grid */
@media (max-width: 1024px) {
  .directions {
    padding: 60px 0 40px;
  }

  .safety {
    padding: 40px 0 60px;
  }

  .directions__cards {
    flex-wrap: wrap;
    height: auto;
  }

  .directions__card,
  .directions__card.directions__card--active {
    flex: 0 0 calc(50% - 5px);
    min-height: 300px;
    transition: none;
  }

  .directions__card-label {
    display: none;
  }

  .directions__card-body {
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }

  .directions__card--active .directions__card-body {
    transition: none;
  }

  .safety__stat-number {
    font-size: var(--fs-3xl);
  }

  .cta {
    padding: 100px 0;
  }

  .cta__title {
    font-size: var(--fs-2xl);
  }
}

/* Mobile: single column */
@media (max-width: 767px) {
  .directions {
    padding: 40px 0 20px;
  }

  .directions__title {
    font-size: var(--fs-2xl);
  }

  .directions__cards {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .directions__card,
  .directions__card.directions__card--active {
    flex: 0 0 auto;
    min-height: 320px;
  }
}

@media (max-width: 1024px) {
  .hero__title {
    font-size: var(--fs-3xl);
  }

  .about-company {
    padding: 60px 0;
  }

  .about-company__wrp {
    flex-direction: column;
    gap: 40px;
  }

  .about-company__media {
    width: 100%;
  }

  .about-company__img {
    height: 340px;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 520px;
    align-items: flex-end;
  }

  .hero__wrp {
    padding-bottom: 60px;
  }

  .hero__title {
    font-size: var(--fs-2xl);
  }

  .hero__desc {
    font-size: var(--fs-base);
  }

  .about-company {
    padding: 40px 0;
  }

  .about-company__title {
    font-size: var(--fs-2xl);
  }

  .safety {
    padding: 20px 0 40px;
  }

  .safety__title {
    font-size: var(--fs-2xl);
  }

  .safety__stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .safety__stat {
    flex: 1 1 calc(50% - 8px);
    min-height: 280px;
  }

  .safety__stat-number {
    font-size: var(--fs-4xl);
  }

  .hero__wrp .btn {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    font-size: var(--fs-base);
  }

  .history {
    padding: 40px 0;
  }

  .history__title {
    font-size: var(--fs-2xl);
  }

  .history__cell,
  .history__cell--center {
    padding-bottom: 50px;
  }

  .history__cell {
    padding-left: 20px;
    padding-right: 20px;
  }

  .history__cell--empty {
    display: none;
  }

  .history__line {
    left: 26px;
    transform: none;
  }

  .history__row--left .history__cell--left {
    order: 3;
    text-align: left;
  }

  .history__row--left .history__cell--center {
    order: 2;
  }

  .history__row--left .history__cell--empty {
    order: 1;
  }

  .cta {
    padding: 60px 0;
  }

  .cta__title {
    font-size: var(--fs-xl);
  }

  .cta__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
