/* ============================================
   O NÁS – About page specific styles
   Uses design tokens from style.css
   ============================================ */

/* ============================================
   HERO – ABOUT
   ============================================ */
/* Transparent dark header bar on about page before scroll */
.header:not(.header--scrolled) {
  background: rgba(14, 28, 57, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.about-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.about-hero__image {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.about-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.about-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 28, 57, 0.92) 0%,
    rgba(14, 28, 57, 0.5) 50%,
    rgba(14, 28, 57, 0.2) 100%
  );
}

.about-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 12rem var(--gutter) var(--section-space-m);
  width: 100%;
}

.about-hero__label {
  display: inline-block;
  font-size: var(--text-s);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  margin-bottom: 1.6rem;
}

.about-hero__title {
  font-size: clamp(3.6rem, 1.4rem + 3vw, 6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-m);
  max-width: 72rem;
  text-wrap: balance;
}
.about-hero__title em { font-style: normal; color: var(--secondary); font-weight: 700; }

.about-hero__subtitle {
  font-size: var(--text-l);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--base-text-lh);
  max-width: 64rem;
}

/* ============================================
   TEAM FILTERS
   ============================================ */
.team__filters {
  display: flex;
  gap: 0.8rem;
  margin-bottom: var(--section-space-m);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1.2rem 0;
  position: sticky;
  top: var(--filters-sticky-offset, 8rem);
  /* slide synchronizovaný s header --hidden animací (0.32s ease) */
  transition: top 0.32s ease;
  z-index: 5;
  background: var(--white);
  /* posun pozadí na hrany sekce (kompenzace section__inner padding) */
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  box-shadow: 0 6px 14px -10px rgba(14, 28, 57, 0.18);
}

.team__filters::-webkit-scrollbar {
  display: none;
}

.team__filter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid var(--cream);
  border-radius: 10rem;
  background: var(--white);
  font-family: inherit;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--base);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
}

.team__filter:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.team__filter--active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}


/* ============================================
   TEAM SECTION
   ============================================ */
.team__department {
  margin-bottom: var(--section-space-m);
}

.team__department:last-child {
  margin-bottom: 0;
}

.team__department-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-xxl);
  font-weight: 700;
  color: var(--base);
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-s);
  border-bottom: 2px solid var(--cream);
}

.team__member-count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-m);
  font-weight: 600;
  color: var(--primary);
}

.team__member-count-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.team__department-desc {
  font-size: var(--text-s);
  color: rgba(14, 28, 57, 0.6);
  line-height: var(--base-text-lh);
  margin-top: -1.2rem;
  margin-bottom: var(--space-l);
  max-width: 64rem;
}

/* Grid – default 2 columns on mobile, 4 on desktop */
.team__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}

.team__grid--founders {
  grid-template-columns: repeat(2, 1fr);
  max-width: 56rem;
}

/* ============================================
   FLIP CARD
   ============================================ */
.team__card {
  perspective: 800px;
  cursor: pointer;
}

.team__card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.team__card:hover .team__card-inner,
.team__card--flipped .team__card-inner {
  transform: rotateY(180deg);
}

.team__card-front,
.team__card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0.8rem 4rem 0.8rem 0.8rem;
  overflow: hidden;
}

/* FRONT */
.team__card-front {
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.team__photo {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.team__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team__card-front .team__name,
.team__card-front .team__role {
  padding: 0 1.2rem;
}

.team__card-front .team__name {
  font-size: var(--text-m);
  font-weight: 700;
  color: var(--base);
  margin-top: 1rem;
  margin-bottom: 0.2rem;
}

.team__card-front .team__role {
  font-size: var(--text-s);
  color: rgba(14, 28, 57, 0.55);
  font-weight: 500;
  padding-bottom: 1.2rem;
}

@media (max-width: 639px) {
  .team__card-front .team__name,
  .team__card-front .team__role {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .team__card-front .team__name {
    font-size: 1.3rem;
    line-height: 1.2;
    margin-top: 0.4rem;
    margin-bottom: 0.1rem;
  }

  .team__card-front .team__role {
    font-size: 1.05rem;
    line-height: 1.25;
    padding-bottom: 0.6rem;
  }
}

/* BACK */
.team__card-back {
  transform: rotateY(180deg);
  background: var(--base);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.6rem;
}

.team__card-back .team__name {
  font-size: var(--text-m);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.team__card-back .team__role {
  font-size: var(--text-s);
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.team__bio {
  font-size: var(--text-s);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--base-text-lh);
}

.team__interview-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.team__interview-link:hover {
  opacity: 0.7;
  color: var(--secondary);
}

@media (max-width: 639px) {
  .team__card-back {
    padding: 1.2rem 1rem;
    justify-content: flex-start;
  }

  .team__card-back .team__name {
    font-size: 1.3rem;
    margin-bottom: 0.15rem;
  }

  .team__card-back .team__role {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }

  .team__bio {
    font-size: 1.05rem;
    line-height: 1.3;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
  }

  .team__interview-link {
    flex-shrink: 0;
    margin-top: 0.5rem;
    font-size: 1.05rem;
  }
}

/* ============================================
   MEDIA / PODCAST SECTION
   ============================================ */
.media__heading {
  font-size: var(--text-xxl);
  font-weight: 700;
  color: var(--base);
  margin-bottom: var(--space-l);
}

.media__heading--podcast {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.media__podcast-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.8rem;
  margin-top: var(--section-space-m);
  margin-bottom: 2.8rem;
}

.media__podcast-copy {
  max-width: 72rem;
}

.media__podcast-lead {
  font-size: var(--text-m);
  line-height: var(--base-text-lh);
  color: rgba(14, 28, 57, 0.72);
  margin: 0;
}

.media__podcast-platforms {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.4rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(14, 28, 57, 0.1);
  border-radius: 10rem;
  flex-wrap: wrap;
}

.media__podcast-platforms-label {
  font-size: 1.3rem;
  font-weight: 600;
  color: rgba(14, 28, 57, 0.7);
}

.media__podcast-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  color: var(--base);
  background: var(--white);
  border: 1px solid rgba(14, 28, 57, 0.1);
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease;
}

.media__podcast-platform:hover {
  transform: scale(1.08);
  color: var(--primary);
}

.media__grid {
  display: grid;
  gap: var(--space-l);
}

.media__grid--2 {
  grid-template-columns: repeat(2, max-content);
  justify-content: start;
}

.media__grid--4 {
  grid-template-columns: 1fr;
}

.media__item {
  min-width: 0;
}

.media__video-wrap {
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
  background: var(--base);
}

.media__video-wrap video {
  display: block;
  width: 100%;
  height: auto;
}

.media__video-wrap--portrait {
  aspect-ratio: 9 / 16;
  max-width: 28rem;
}

.media__video-wrap--portrait video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__video-wrap--yt {
  aspect-ratio: 16 / 9;
}

.media__video-wrap--yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media__title {
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--base);
  margin-top: 0.8rem;
  line-height: var(--base-text-lh);
}

.media__podcast-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
}

.media__podcast-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(14, 28, 57, 0.1);
  border-radius: 1.8rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media__podcast-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(14, 28, 57, 0.12);
}

.media__podcast-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse at center, #2a3a5a 0%, #0E1C39 70%),
    linear-gradient(135deg, #3564F2 0%, #0E1C39 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  text-decoration: none;
  overflow: hidden;
}

.media__podcast-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 50%, transparent 50%),
    linear-gradient(0deg, rgba(53, 100, 242, 0.15) 0%, transparent 40%);
  background-size: 16px 16px, 100% 100%;
  opacity: 0.6;
}

.media__podcast-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
  z-index: 1;
}

.media__podcast-card:hover .media__podcast-play {
  transform: translate(-50%, -50%) scale(1.1);
}

.media__podcast-duration {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  padding: 0.3rem 0.8rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 0.4rem;
  z-index: 1;
}

.media__podcast-body {
  padding: 2rem 2rem 2.2rem;
}

.media__podcast-tag {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.media__podcast-body h3 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--base);
}

.media__podcast-body p {
  margin: 1rem 0 0;
  font-size: 1.5rem;
  line-height: 1.6;
  color: rgba(14, 28, 57, 0.72);
}

.media__podcast-card--channel {
  background: linear-gradient(180deg, rgba(14, 28, 57, 0.03) 0%, rgba(53, 100, 242, 0.08) 100%);
}

.media__podcast-thumb--channel {
  background:
    radial-gradient(circle at 20% 20%, rgba(206, 170, 98, 0.4) 0%, rgba(206, 170, 98, 0) 34%),
    linear-gradient(135deg, #0E1C39 0%, #18305F 55%, #3564F2 100%);
}

.media__podcast-play--channel {
  color: #ff0000;
}

.media__podcast-channel-label {
  position: absolute;
  left: 1.4rem;
  bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 10rem;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.media__podcast-card--empty {
  max-width: 44rem;
}

@media (min-width: 640px) {
  .media__grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .media__podcast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .media__grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .media__podcast-head {
    gap: 2.2rem;
  }

  .media__podcast-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================
   CTA SECTION
   ============================================ */
.team-cta__title {
  font-size: clamp(2.8rem, 3.5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-s);
}

.team-cta__text {
  font-size: var(--text-l);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-l);
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   RESPONSIVE – TABLET (>= 640px)
   ============================================ */
@media (min-width: 640px) {
  .team__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   RESPONSIVE – DESKTOP (>= 960px)
   ============================================ */
@media (min-width: 960px) {
  .about-hero {
    min-height: 75vh;
  }

  .team__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .team__grid--founders {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   RESPONSIVE – WIDE (>= 1280px)
   ============================================ */
@media (min-width: 1280px) {
  .team__grid:not(.team__grid--founders) {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Vypnutí globální scroll fade-in animace pro tým a CTA na O nás */
.team.section--animate,
.team-cta.section--animate {
  opacity: 1;
  transform: none;
  transition: none;
}
