/* ============================================
   O NAS – o-nas.css
   ============================================ */

/* ---------- PAGE HERO ---------- */
.page-hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--gray-200);
}

.page-hero .section-label {
  margin-bottom: 10px;
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--gray-900);
  margin-bottom: 14px;
}

.page-hero p {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 580px;
  line-height: 1.7;
}

/* ---------- ACTIVE NAV ---------- */
.navbar-links a.active {
  color: var(--teal);
  font-weight: 600;
}

/* ---------- SECTION BG ---------- */
.section-bg {
  background: var(--gray-50);
}

/* ---------- ABOUT INTRO ---------- */
.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-intro-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-600);
}

.about-stats {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  background: var(--teal);
  border-radius: 20px;
  overflow: hidden;
  padding: 40px 32px;
}

.about-stats-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.about-stats-deco::before,
.about-stats-deco::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.about-stats-deco::before {
  width: 280px;
  height: 280px;
  top: -80px;
  left: -60px;
}

.about-stats-deco::after {
  width: 200px;
  height: 200px;
  bottom: -60px;
  right: -40px;
}

.about-stat {
  flex: 1;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.about-stat + .about-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255,255,255,0.2);
}

.about-stat-num {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.about-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* ---------- SECTION IMAGES ---------- */
.section-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  display: block;
}

.cert-img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 24px 20px;
  background: #fff;
  transition: transform 0.3s ease;
}

.cert-card:hover .cert-img {
  transform: scale(1.04);
}

/* ---------- IMG PLACEHOLDER ---------- */
.img-placeholder {
  background: var(--gray-100);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.04em;
  text-align: center;
}

.img-placeholder.large {
  height: 320px;
}

/* ---------- HISTORIA ---------- */
.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.history-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-600);
}

.timeline {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--teal-light));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0 0 28px 36px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal);
  box-shadow: 0 0 0 4px rgba(29,145,154,0.12);
  transition: background 0.2s, box-shadow 0.2s;
  z-index: 1;
}

.timeline-item:hover::before {
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(29,145,154,0.18);
}

.timeline-year {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--teal);
  border-radius: 20px;
  padding: 3px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
  letter-spacing: 0.03em;
}

.timeline-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.5;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  flex: 1;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.timeline-item:hover .timeline-desc {
  border-color: var(--teal-light);
  box-shadow: 0 4px 16px rgba(29,145,154,0.1);
}

/* ---------- HORIZONTAL TIMELINE ---------- */
.timeline-h {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: minmax(130px, auto) 44px minmax(130px, auto);
  margin-top: 56px;
  position: relative;
}

.th-line {
  grid-row: 2;
  grid-column: 1 / -1;
  align-self: center;
  height: 2px;
  background: linear-gradient(to right, var(--teal), var(--teal-light));
  position: relative;
  z-index: 0;
}

.th-dot {
  grid-row: 2;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal);
  align-self: center;
  justify-self: center;
  z-index: 1;
  position: relative;
  box-shadow: 0 0 0 4px rgba(29,145,154,0.12);
}

.th-top {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 8px 16px;
}

.th-bottom {
  grid-row: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px 0;
}

.th-year {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--teal);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 8px;
  white-space: nowrap;
}

.th-desc {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.55;
}

/* ---------- CERTYFIKATY ---------- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.cert-card {
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(29,145,154,0.15);
}

.cert-img-placeholder {
  height: 200px;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-align: center;
  line-height: 1.6;
}

.cert-label {
  padding: 14px 16px 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-dark);
  border-top: 1px solid var(--gray-100);
  white-space: nowrap;
}

/* ---------- ZESPÓŁ ---------- */
.section--team {
  background: linear-gradient(160deg, #f0fdfd 0%, #ffffff 60%);
}

.team-slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.team-slider-viewport {
  overflow: hidden;
  flex: 1;
}

.team-slider-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.team-slider-track .team-card {
  flex-shrink: 0;
}

.team-slider-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--teal-light);
  background: #fff;
  color: var(--teal);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.team-slider-btn:hover:not(:disabled) {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.team-slider-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.team-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.team-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  padding: 0;
}

.team-slider-dot.active {
  background: var(--teal);
  width: 24px;
  border-radius: 4px;
}

.team-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(29,145,154,0.07), 0 1px 4px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(29,145,154,0.14), 0 4px 10px rgba(0,0,0,0.06);
}

.team-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.team-card:hover .team-card-photo img {
  transform: scale(1.05);
}

.team-card-body {
  padding: 16px 16px 20px;
}

.team-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.team-prezentacja-btn {
  display: inline-block;
  border: 2px solid var(--teal);
  color: var(--teal);
  background: transparent;
  border-radius: 24px;
  padding: 7px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.team-prezentacja-btn:hover {
  background: var(--teal);
  color: #fff;
}

/* ---------- TEAM MODAL ---------- */
.team-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.team-modal.open {
  display: flex;
}

.team-modal-box {
  background: #fff;
  border-radius: 20px;
  max-width: 360px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3);
  cursor: default;
  position: relative;
}

.team-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(0,0,0,0.35);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.2s;
}

.team-modal-close:hover { background: rgba(0,0,0,0.6); }

.team-modal-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  display: block;
}

.team-modal-info {
  padding: 20px 24px 28px;
  text-align: center;
}

.team-modal-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.team-modal-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.team-modal-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-light);
  border-radius: 20px;
  padding: 4px 12px;
}

.team-modal-location {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.team-modal-location::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .about-intro-grid,
  .history-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .history-img { order: -1; }

  .certs-grid { grid-template-columns: 1fr 1fr; }

  .timeline-h {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 32px;
    padding-left: 28px;
    border-left: 2px solid var(--teal-light);
    position: relative;
  }

  .th-top,
  .th-bottom {
    order: var(--order);
    position: relative;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding: 0 0 24px;
    gap: 10px;
  }

  .th-top::before,
  .th-bottom::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--teal);
    flex-shrink: 0;
  }

  .th-top .th-year,
  .th-bottom .th-year {
    margin-bottom: 0;
    flex-shrink: 0;
    margin-top: 0;
  }

  .th-dot,
  .th-line {
    display: none;
  }
}

@media (max-width: 600px) {
  .certs-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: column; padding: 32px 24px; }
  .about-stat { padding: 20px 0; }
  .about-stat + .about-stat::before { left: 10%; top: 0; width: 80%; height: 1px; }
  .about-stat-num { font-size: 44px; }

  .timeline {
    padding-left: 0;
    align-items: center;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
  }

  .timeline-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0 32px 0;
    width: 100%;
  }

  .timeline-item::before {
    position: relative;
    left: auto;
    top: auto;
    margin-bottom: 10px;
    flex-shrink: 0;
  }

  .timeline-desc {
    width: 100%;
  }
}
