/* =========================
   CAREER HERO
========================= */
#career-hero{
  position:relative;
  height:60vh;
  min-height:520px;
  overflow:hidden;
  transition:height 700ms ease;
  background-image:url("/asseets/img/career.jpg");
  background-size:cover;
  background-position:top 65% right 0;
}
#career-hero::before{
  content:"";
  position:absolute; inset:0;
  background-image:inherit;
  background-size:inherit;
  background-position:inherit;
  transform:scale(1.08);
  filter:blur(0);
  transition:transform 700ms ease, filter 700ms ease;
  will-change:transform, filter;
  z-index:0;
}
#career-hero::after{
  content:"";
  position:absolute; inset:0;
  background:rgba(0,0,0,0);
  transition:background 700ms ease;
  z-index:1;
}
.career-hero-text{
  position:absolute;
  left:5%;
  bottom:18%;
  z-index:2;
  opacity:0;
  transform:translateY(12px);
  transition:opacity 400ms ease, transform 400ms ease;
  pointer-events:none;
}
.career-hero-text h1{
  margin:0;
  padding:20px 28px;
  border-radius:12px;
  background:rgba(10,25,50,.75);
  color:#fff;
  font-size:clamp(48px, 6vw, 92px);
  font-weight:800;
}
#career-hero.is-locked{
  height:35vh;
  min-height:420px;
}
#career-hero.is-locked::before{
  transform:scale(1);
  filter:blur(7px);
}
#career-hero.is-locked::after{ background:rgba(0,0,0,.18); }
#career-hero.is-locked .career-hero-text{
  opacity:1;
  transform:translateY(0);
}
@media (prefers-reduced-motion:reduce){
  #career-hero,
  #career-hero::before,
  #career-hero::after,
  .career-hero-text{ transition:none; }
}

/* =========================
   CAREER CONTENT – BASE
========================= */
#career-content{
  background:var(--bg2--);
  color:#0f172a;
  position:relative;
  z-index:2;
  margin-top:-30px;
  padding-top:140px;
  border-radius:38px 38px 0 0;
}
#career-content h4{
  color:var(--text-dark--);
  font-size:20px;
  font-weight:500;
  margin-bottom:10px;
}

/* (oli CSS:ssäsi erillinen kortti “containers”) */
.containers{
  width:min(360px, 90vw);
  background:#fff;
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
  border:1px solid rgba(0,0,0,.06);
  display:grid;
  place-items:center;
}

/* =========================
   SECTIONS & TITLES
========================= */
.career-section{
  padding:110px 0;
  background-color:var(--bg2--);
}
.section-title{
  font-size:clamp(28px, 3vw, 42px);
  margin:0 0 42px;
  letter-spacing:.2px;
}

/* =========================
   HIGHLIGHTS
========================= */
.highlights{ padding-top:40px; }
.highlight-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:22px;
}
.highlight-card{
  background:#fff;
  border-radius:26px;
  padding:28px;
  text-align:center;
  box-shadow:0 14px 34px rgba(15,23,42,.08);
  transition:transform 260ms ease, box-shadow 260ms ease;
  will-change:transform;
}
.highlight-card h3{ margin:14px 0 6px; }
.highlight-card p{ margin:0; color:#475569; }
.badge{ font-size:30px; }
.highlight-card.gold{ outline:2px solid rgba(230,184,0,.35); }
.highlight-card.silver{ outline:2px solid rgba(160,160,160,.35); }

/* =========================
   TIMELINE / SEASONS
========================= */
.timeline{ display:grid; gap:60px; }
.season{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:32px;
  padding:36px 36px 40px;
  background:#fff;
  border-radius:32px;
  box-shadow:0 18px 44px rgba(15,23,42,.10);
  transition:transform 260ms ease, box-shadow 260ms ease;
  will-change:transform;
}
.season-year{
  font-size:24px;
  font-weight:700;
  color:#475569;
}

/* RESULTS */
.results{ list-style:none; padding:0; margin:0; }
.results li{
  display:grid;
  grid-template-columns:72px 1.3fr 1fr;
  padding:16px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  transition:background 180ms ease;
}
.results li:last-child{ border-bottom:none; }
.results li:hover{ background:rgba(79,124,255,.06); }
.place{ font-weight:800; }

.results li.podium{
  background:linear-gradient(90deg, rgba(230,184,0,.18), transparent);
}
.results li.top10{
  background:linear-gradient(90deg, rgba(79,124,255,.18), transparent);
}

/* =========================
   STATS
========================= */
.career-stats{ background:var(--bg2--); }
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:24px;
}
.stat{
  padding:28px 20px;
  border-radius:24px;
  background:#fff;
  text-align:center;
  box-shadow:0 14px 34px rgba(15,23,42,.08);
  transition:transform 260ms ease, box-shadow 260ms ease;
  will-change:transform;
}
.stat-v{ font-size:38px; font-weight:800; }
.stat-k{ margin-top:6px; color:#475569; }

/* =========================
   GALLERY
========================= */
.career-gallery{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:18px;
}
.gallery-item{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  background:#fff;
}
.gallery-item img{
  width:100%;
  height:260px;
  object-fit:cover;
  display:block;
  transform:scale(1);
  transition:transform 420ms ease;
  will-change:transform;
}
.gallery-item:hover img{ transform:scale(1.08); }

/* Hover zoom for cards */
.highlight-card:hover,
.season:hover,
.stat:hover{
  transform:translateY(-4px) scale(1.03);
  box-shadow:0 22px 52px rgba(15,23,42,.14);
}
@media (prefers-reduced-motion:reduce){
  .highlight-card,
  .season,
  .stat,
  .gallery-item img{
    transition:none;
    transform:none;
  }
}

/* =========================
   FEATURES PANEL (scoped)
========================= */
#features-panel{
  background:transparent;
  padding:80px 0;
  display:flex;
  justify-content:center;
}
#features-panel .features-panel__box{
  width:min(1100px, calc(100% - 120px));
  background:#fff;
  border-radius:28px;
  padding:64px 72px;
  box-shadow:0 20px 60px rgba(0,0,0,.10);
}
#features-panel .features-panel__row{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:64px;
  align-items:center;
}
#features-panel .features-panel__row + .features-panel__row{ margin-top:56px; }
#features-panel .features-panel__media{
  width:100%;
  aspect-ratio:1/1;
  border-radius:18px;
  background:#f3f5f7;
  border:2px dashed #d7dde3;
}
#features-panel .features-panel__title{
  margin:0 0 10px;
  font-size:28px;
  line-height:1.15;
  color:#0b1527;
  font-family:'Space Grotesk',sans-serif;
}
#features-panel .features-panel__desc{
  margin:0;
  font-size:18px;
  line-height:1.7;
  color:rgba(11,21,39,.72);
  max-width:75ch;
}

@media (max-width:1024px){
  #features-panel{ padding:64px 0; }
  #features-panel .features-panel__box{
    width:min(1000px, calc(100% - 56px));
    padding:44px 40px;
    border-radius:24px;
  }
  #features-panel .features-panel__row{
    grid-template-columns:260px 1fr;
    gap:36px;
  }
}
@media (max-width:768px){
  #features-panel .features-panel__box{ width:calc(100% - 32px); }
}

/* =========================
   FIS BADGE
========================= */
#fis-badge{
  padding:40px 0;
  display:flex;
  justify-content:center;
}
#fis-badge .fis-box{
  width:1100px;
  background:#fff;
  border-radius:20px;
  padding:28px 32px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
  gap:20px;
  position:relative;
  overflow:hidden;
}
#fis-badge .fis-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
#fis-badge .fis-title{
  display:flex;
  align-items:center;
  gap:14px;
}
#fis-badge .fis-title h2{ color:var(--text-dark--); }

#fis-badge .badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  font-weight:800;
  letter-spacing:.6px;
}
#fis-badge .fis-controls{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:14px;
  align-items:end;
}
#fis-badge label{
  font-size:12px;
  color:#6b7280;
  margin-bottom:6px;
  display:block;
}
#fis-badge select{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid #e5e7eb;
}
#fis-badge .pills{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
#fis-badge .pill{
  cursor:pointer;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  font-weight:600;
  background:#fff;
}
#fis-badge .pill.is-active{
  border-color:#111827;
  transform:translateY(-1px);
}
/* Pillit oikealle myös kun wrapataan */
#fis-badge .control.pills{
  justify-self: end;          /* tärkein */
  text-align: right;
}

#fis-badge .pills{
  justify-content: flex-end;  /* sinulla jo, pidä */
  width: max-content;         /* estää venymisen vasemmalle */
  margin-left: auto;          /* varmistaa oikeaan reunaan */
}

/* mobiilissa voidaan halutessa vasemmalle */
@media (max-width:700px){
  #fis-badge .control.pills{
    justify-self: start;
    text-align: left;
  }
  #fis-badge .pills{
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

#fis-badge .preview-card{
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
#fis-badge .preview-text h3{
  margin:0 0 4px;
  font-size:18px;
}
#fis-badge .chips{
  margin-top:8px;
  display:flex;
  gap:8px;
}
#fis-badge .chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e5e7eb;
}
#fis-badge .btn{
  padding:12px 16px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  text-decoration:none;
  font-weight:700;
}
#fis-badge .btn.primary{
  background:#111827;
  color:#fff;
  border-color:#111827;
}
#fis-badge .note{
  display:flex;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  background:#f9fafb;
  border:1px solid #eee;
}
#fis-badge .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#111827;
  margin-top:5px;
}
#fis-badge .preview-text p{
  margin:0;
  color:#4b5563;
  line-height:1.5;
}
@media (max-width:700px){
  #fis-badge .fis-controls{ grid-template-columns:1fr; }
  #fis-badge .pills{ justify-content:flex-start; }
  #fis-badge .preview-card{ flex-direction:column; align-items:flex-start; }
}

/* =========================
   RESPONSIVE (career)
========================= */
@media (max-width:900px){
  #career-content{
    margin-top:-80px;
    padding-top:100px;
    border-radius:40px 40px 0 0;
  }
  .career-section{ padding:90px 0; }

  .highlight-grid,
  .stats-grid,
  .career-gallery{
    grid-template-columns:repeat(2, 1fr);
  }
  .season{
    grid-template-columns:1fr;
    gap:20px;
  }
}
/* =========================
   RESPONSIVE (career) – add-on
========================= */

/* 1) Tablet <= 1024px: hero pehmennys + features-panel 1-col */
@media (max-width:1024px){
  #career-hero{
    height: 56vh;
    min-height: 460px;
    background-position: top 60% center;
  }
  #career-hero.is-locked{
    height: 34vh;
    min-height: 380px;
  }

  .career-hero-text{
    left: 24px;
    right: 24px;
    bottom: 16%;
    max-width: calc(100% - 48px);
  }
  .career-hero-text h1{
    max-width: 100%;
    width: fit-content;
    padding: 16px 20px;
    font-size: clamp(40px, 6.5vw, 74px);
  }

  /* Features panel: 2-col -> 1-col */
  #features-panel .features-panel__row{
    grid-template-columns: 1fr;
    gap: 26px;
  }
  #features-panel .features-panel__media{
    max-width: 420px;
  }
}

/* 2) Mobile <= 768px: kaikki gridit 1-col, paddingit alas */
@media (max-width:768px){
  #career-hero{
    height: 46vh;
    min-height: 360px;
    background-position: top 52% center;
  }
  #career-hero.is-locked{
    height: 30vh;
    min-height: 320px;
  }

  .career-hero-text{
    left: 16px;
    right: 16px;
    bottom: 14%;
    max-width: calc(100% - 32px);
  }
  .career-hero-text h1{
    padding: 14px 16px;
    font-size: clamp(30px, 8vw, 54px);
  }

  #career-content{
    margin-top: -22px;
    padding-top: 96px;
    border-radius: 28px 28px 0 0;
  }

  .career-section{
    padding: 72px 0;
  }

  /* Highlights / stats / gallery -> 1-col */
  .highlight-grid,
  .stats-grid,
  .career-gallery{
    grid-template-columns: 1fr;
  }

  .highlight-card,
  .stat{
    padding: 22px;
    border-radius: 22px;
  }

  /* Season kortti tiiviimmäksi */
  .season{
    padding: 22px;
    border-radius: 24px;
  }
  .season-year{
    font-size: 20px;
  }

  /* Results list: 3-col -> 2-col (place + teksti) */
  .results li{
    grid-template-columns: 62px 1fr;
    gap: 10px;
    padding: 14px 10px;
  }
  /* piilota kolmas sarake mobiilissa (esim. “event/location”) */
  .results li > :nth-child(3){
    display: none;
  }

  /* Gallery kuvien korkeus alas */
  .gallery-item img{
    height: 210px;
  }

  /* Features panel tiiviimmäksi */
  #features-panel{
    padding: 56px 0;
  }
  #features-panel .features-panel__box{
    width: calc(100% - 28px);
    padding: 28px;
    border-radius: 22px;
  }
  #features-panel .features-panel__title{
    font-size: 22px;
  }
  #features-panel .features-panel__desc{
    font-size: 16px;
  }
  #features-panel .features-panel__media{
    max-width: 320px;
    border-radius: 16px;
  }
}

/* 3) Small mobile <= 480px: vielä tiiviimpi + results 1-col */
@media (max-width:480px){
  #career-hero{
    height: 42vh;
    min-height: 320px;
    background-position: top 48% center;
  }
  #career-hero.is-locked{
    height: 28vh;
    min-height: 300px;
  }

  .career-hero-text h1{
    padding: 12px 14px;
    font-size: clamp(28px, 9vw, 44px);
  }

  #career-content{
    padding-top: 88px;
  }

  .career-section{ padding: 60px 0; }
  .section-title{ margin: 0 0 28px; }

  /* Results list: 2-col -> 1-col (kaikki allekkain) */
  .results li{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .place{
    font-size: 16px;
  }

  /* Gallery vielä pienemmäksi */
  .gallery-item img{
    height: 190px;
  }

  #features-panel .features-panel__box{
    padding: 22px;
  }
}

/* 4) Hover/zoom pois kosketuslaitteilla (ei hypi/”zoomaa”) */
@media (hover: none){
  .highlight-card:hover,
  .season:hover,
  .stat:hover{
    transform: none;
    box-shadow: 0 14px 34px rgba(15,23,42,.08);
  }
  .gallery-item:hover img{
    transform: none;
  }
}

/* 5) Turvaverkko: media ei koskaan yli career-osiossa */
#career-content img,
#career-content svg,
#career-content video,
#career-content iframe{
  max-width: 100%;
  height: auto;
  display: block;
}
