/* ============================================
   Kehonhuolto Tasot – Moderni ulkoasu
   Värimaailma logon mukaan: violetti → limenvihreä
   ============================================ */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --purple-dark: #1a0a2e;
  --purple: #2d1b4e;
  --purple-mid: #4a2c7a;
  --purple-light: #6b4a9e;
  --lime: #c8e600;
  --lime-dark: #a8c000;
  --lime-soft: #e8f5a0;
  --bg: #f7f6f9;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a5a6e;
  --border: #e8e6ef;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(45, 27, 78, 0.08);
  --shadow-lg: 0 12px 40px rgba(45, 27, 78, 0.12);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--lime-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--lime); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header: logo-palkki + valikko ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--purple-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

/* Koko levyinen logo – venyy ikkunan leveyden mukaan */
.logo-bar {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  background: #ffffff;
  position: relative;
  line-height: 0;
  transition: filter 0.2s ease;
}

.logo-bar:hover {
  filter: brightness(0.97);
}

.logo-bar:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}

/* SVG venyy vaakasuunnassa koko leveyteen – muoto saa muuttua */
.logo-bar-img {
  display: block;
  width: 100%;
  height: 48px;
  object-fit: fill; /* venyttää leveyden mukaan, ei säilytä mittasuhteita */
  object-position: center;
}

@media (min-width: 640px) {
  .logo-bar-img {
    height: 56px;
  }
}

@media (min-width: 1024px) {
  .logo-bar-img {
    height: 64px;
  }
}

/* Pienet “palkki”-viivat oikealla vihjeenä valikosta */
.logo-bar-hint {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
  pointer-events: none;
}

.logo-bar-hint .hint-line {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--purple-mid);
  border-radius: 1px;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-bar[aria-expanded="true"] .hint-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.logo-bar[aria-expanded="true"] .hint-line:nth-child(2) {
  opacity: 0;
}
.logo-bar[aria-expanded="true"] .hint-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Pudotusvalikko logon alla */
.nav {
  display: none;
  background: rgba(26, 10, 46, 0.98);
  border-top: 1px solid rgba(200, 230, 0, 0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav.is-open {
  display: block;
  max-height: 540px;
}

.nav[hidden] {
  display: none !important;
}

.nav.is-open[hidden] {
  display: block !important;
}

.nav-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0 0.75rem;
  gap: 0.15rem;
}

@media (min-width: 640px) {
  .nav-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.65rem 1rem 0.85rem;
  }
}

.nav a {
  color: #ffffff;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  opacity: 1;
}

.nav .btn-nav {
  background: var(--lime);
  color: var(--purple-dark) !important;
  font-weight: 600;
  opacity: 1;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .nav .btn-nav {
    margin-top: 0;
    margin-left: 0.35rem;
  }
}

.nav .btn-nav:hover {
  background: var(--lime-dark);
}

/* Vanha nav-toggle piilotettu (korvattu logo-palkilla) */
.nav-toggle { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--lime);
  color: var(--purple-dark);
}

.btn-primary:hover {
  background: var(--lime-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 230, 0, 0.4);
}

.btn-secondary {
  background: var(--purple-mid);
  color: white;
}

.btn-secondary:hover {
  background: var(--purple);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--purple-mid);
  color: var(--purple-mid);
}

.btn-outline:hover {
  background: var(--purple-mid);
  color: white;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}

.btn-block { width: 100%; }

.map-link {
  color: var(--purple-mid);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.map-link:hover {
  color: var(--purple);
}

.contact-card .btn-outline {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 55%, var(--purple-mid) 100%);
  color: #ffffff;
  padding: 2.5rem 0 3.25rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--bg);
  clip-path: ellipse(75% 100% at 50% 100%);
  z-index: 2;
}

/* Taustakuva + tummaoverlay */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/tommi_retki.jpg');
  background-size: cover;
  background-position: center 60%;
  opacity: 0.55;
  transform: scale(1.05);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(26, 10, 46, 0.96) 0%, rgba(45, 27, 78, 0.9) 45%, rgba(74, 44, 122, 0.55) 100%);
}

@media (max-width: 780px) {
  .hero-bg::before {
    background-position: 50% 55%;
    opacity: 0.35;
  }
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(26, 10, 46, 0.94) 0%, rgba(45, 27, 78, 0.9) 55%, rgba(74, 44, 122, 0.78) 100%);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    gap: 3rem;
  }
}

.hero-copy { max-width: 620px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* Uusi logo: ei valkoista levyä, vaan pehmeä valoheijastus taustan päällä */
.hero-logo-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 0.5rem;
}

.hero-logo-card::before {
  content: '';
  position: absolute;
  inset: -22% -14%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 74%);
  pointer-events: none;
}

.hero-logo {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45));
}

.hero-link {
  color: #e8f5a0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.hero-link:hover { color: #ffffff; }

.hero-badge {
  display: inline-block;
  background: rgba(200, 230, 0, 0.25);
  color: #e8f5a0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.65rem;
  color: #ffffff;
}

.hero p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.25rem;
  max-width: 500px;
}

/* ---------- Sections ---------- */
.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ---------- Tekstipalstat ja sivupalkki ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.split-aside {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.split-aside h3 {
  font-size: 1.1rem;
  color: var(--purple);
  margin-bottom: 0.75rem;
}

.split > div > p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ---------- Listat ---------- */
.check-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--lime-dark);
  font-weight: 700;
}

.edu-list {
  list-style: none;
}

.edu-list li {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.edu-list li:last-child { border-bottom: none; }

.edu-list .osp {
  color: var(--purple-mid);
  font-weight: 600;
  white-space: nowrap;
}

.aside-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Vaiheet ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ---------- Usein kysyttyä ---------- */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--purple);
}

.faq-item p {
  margin-top: 0.65rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Lopputyö ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
  color: #ffffff;
}

.cta-band .section-title { color: #ffffff; }
.cta-band .section-subtitle { color: rgba(255, 255, 255, 0.88); }

/* ---------- Omat kuvat (Tommi) ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 860px) {
  .about-layout {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.about-photo { margin: 0; }

.about-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Leikattu (läpinäkyvä tausta) versio: kuva violetin panelin päällä */
.about-photo-cutout {
  padding: 1.25rem 1rem 0.75rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--purple-mid) 0%, var(--purple-dark) 70%);
  box-shadow: var(--shadow-lg);
}

.about-photo-cutout img {
  border-radius: 0;
  box-shadow: none;
  mix-blend-mode: normal;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.about-photo-cutout figcaption {
  color: rgba(255, 255, 255, 0.85);
}

.about-photo figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.about-text > p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-block {
  margin-top: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.about-block h3 {
  font-size: 1.05rem;
  color: var(--purple);
  margin-bottom: 0.75rem;
}

/* Kontaktikortti + kuva */
.contact-photo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (min-width: 720px) {
  .contact-photo { grid-template-columns: 220px minmax(0, 1fr); }
}

.contact-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Retkikuva yhteystiedoissa */
.contact-gallery {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
}

.contact-gallery img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center 62%;
}

@media (max-width: 720px) {
  .contact-gallery img { height: 260px; }
}

.contact-gallery figcaption {
  padding: 0.9rem 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  background: var(--bg-card);
}

/* ---------- Footer-logo (ilman valkoista levyä) ---------- */
.footer-logo-plate {
  display: inline-block;
  position: relative;
  margin-bottom: 0.6rem;
  padding: 0.35rem 0.5rem;
}

.footer-logo-plate::before {
  content: '';
  position: absolute;
  inset: -20% -16%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 76%);
  pointer-events: none;
}

.footer-logo {
  position: relative;
  display: block;
  width: 130px;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  font-size: 1.15rem;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--purple-mid);
  margin-bottom: 1rem;
}

.card-meta .price {
  color: var(--lime-dark);
  font-size: 1.2rem;
}

/* ---------- Booking form ---------- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .booking-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.booking-steps {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.step {
  margin-bottom: 1.75rem;
}

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

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--purple-mid);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.step h3 {
  display: inline;
  font-size: 1.05rem;
  color: var(--purple);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0.9rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: white;
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(74, 44, 122, 0.15);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a2c7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Location buttons */
.location-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.location-btn {
  flex: 1;
  min-width: 140px;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: all var(--transition);
}

.location-btn:hover {
  border-color: var(--purple-light);
}

.location-btn.active {
  border-color: var(--purple-mid);
  background: rgba(74, 44, 122, 0.06);
  color: var(--purple);
}

.location-btn.next-free {
  border-style: dashed;
  color: var(--lime-dark);
}

.location-btn.next-free.active {
  border-color: var(--lime);
  background: rgba(200, 230, 0, 0.12);
  color: var(--purple-dark);
}

/* Calendar */
.calendar-wrap {
  margin-top: 0.75rem;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-nav h4 {
  font-size: 1rem;
  color: var(--purple);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0;
}

.cal-day {
  min-height: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: default;
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0;
  line-height: 1.1;
}

.cal-day.available {
  background: white;
  border: 1.5px solid var(--border);
  cursor: pointer;
  color: var(--text);
}

.cal-day.available:hover {
  border-color: var(--purple-mid);
  background: rgba(74, 44, 122, 0.08);
}

.cal-day.selected {
  background: var(--purple-mid);
  color: #ffffff;
  border-color: var(--purple-mid);
}

.cal-day.other-month { opacity: 0.3; }
.cal-day.past { opacity: 0.35; pointer-events: none; }

.cal-day .loc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 1px;
}

.loc-dot.hakalanniemi { background: var(--purple-mid); }
.loc-dot.sporttimekka { background: var(--lime-dark); }

/* Time slots */
.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.time-slot {
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.time-slot:hover {
  border-color: var(--purple-mid);
}

.time-slot.selected {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--purple-dark);
  font-weight: 600;
}

.time-slot:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Summary panel */
.booking-summary {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky;
  top: 80px;
}

.booking-summary h3 {
  font-size: 1.15rem;
  color: var(--purple);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.summary-row .label { color: var(--text-muted); }
.summary-row .value { font-weight: 600; }

.summary-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 1.5rem 0;
}

/* ---------- Admin ---------- */
.admin-header {
  background: var(--purple-dark);
  color: white;
  padding: 1rem 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0 3rem;
}

@media (min-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr 340px;
  }
}

.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.admin-card h2 {
  font-size: 1.25rem;
  color: var(--purple);
  margin-bottom: 1rem;
}

.day-editor {
  display: none;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.day-editor.visible { display: block; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-hakalanniemi { background: rgba(74,44,122,0.15); color: var(--purple-mid); }
.badge-sporttimekka { background: rgba(200,230,0,0.25); color: #5a6a00; }
.badge-free { background: #eee; color: #888; }
.badge-past { background: #eee; color: #777; margin-left: 0.35rem; }

.table tr.row-past td { opacity: 0.6; }

/* ---------- Viikkoaikataulu ---------- */
.week-list {
  display: grid;
  gap: 0.6rem;
}

.week-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

@media (max-width: 720px) {
  .week-row { grid-template-columns: 1fr; }
}

.week-head strong {
  display: block;
  font-size: 0.9rem;
  color: var(--purple);
  margin-bottom: 0.3rem;
}

.week-periods {
  display: grid;
  gap: 0.4rem;
  transition: opacity var(--transition);
}

.week-period {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.week-dash { color: var(--text-muted); }

/* ---------- Modal (poistamisen valinta) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 200;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  font-size: 1.15rem;
  color: var(--purple);
  margin-bottom: 0.6rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th, .table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(200, 230, 0, 0.2);
  color: #3d4a00;
  border: 1px solid var(--lime);
}

.alert-error {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f5c2c2;
}

.alert-info {
  background: rgba(74, 44, 122, 0.08);
  color: var(--purple);
  border: 1px solid rgba(74, 44, 122, 0.2);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,0.8);
  padding: 2rem 0 1.25rem;
  margin-top: auto;
}

.site-footer a {
  color: var(--lime);
}

.site-footer a:hover {
  color: #e8f5a0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.footer-brand {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 0.9rem;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255,255,255,0.55);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 0.5rem 0;
  }
  .nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .nav .btn-nav { margin-left: 0; width: 100%; text-align: center; }
}
/* ============================================
   Liikekirjasto ja treeniohjelmat
   ============================================ */

.library-hero {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 55%, var(--purple-mid) 100%);
  color: #ffffff;
  padding: 2.5rem 0 2.75rem;
}

.library-hero h1 {
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0.75rem 0 0.75rem;
}

.library-lead {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
  line-height: 1.65;
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.library-hero .btn-outline {
  border-color: rgba(200, 230, 0, 0.65);
  color: var(--lime-soft);
}

.library-hero .btn-outline:hover {
  background: rgba(200, 230, 0, 0.12);
  color: #ffffff;
}

.library-source-note {
  max-width: 820px;
  margin-top: 1.1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.6;
}

.library-source-note a {
  color: var(--lime-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- PT-ohjeet ---------- */
.pt-guidance {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.pt-guidance h2 {
  font-size: 1.35rem;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.pt-guidance > div > p {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.65;
  max-width: 820px;
}

.pt-guidance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 700px) {
  .pt-guidance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .pt-guidance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pt-guidance-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--lime);
}

.pt-guidance-item strong {
  display: block;
  color: var(--purple);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.pt-guidance-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pt-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---------- Suodattimet ---------- */
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.filter-search { margin-bottom: 1rem; }

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 700px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.filter-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.filter-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.filter-input:focus {
  outline: 2px solid var(--purple-light);
  outline-offset: 1px;
  border-color: var(--purple-light);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.chip:hover {
  border-color: var(--purple-light);
  color: var(--purple);
}

.chip.is-active {
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}

.filter-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-count strong { color: var(--purple); }

.library-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- Liikekortit ---------- */
.exercise-grid,
.program-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .exercise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-grid { grid-template-columns: 1fr; }
}

.exercise-card,
.program-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.exercise-card[hidden],
.program-card[hidden] { display: none !important; }

.exercise-card summary,
.program-card summary {
  list-style: none;
  cursor: pointer;
}

.exercise-card summary::-webkit-details-marker,
.program-card summary::-webkit-details-marker { display: none; }

.exercise-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  transition: background var(--transition);
}

.exercise-summary:hover { background: rgba(200, 230, 0, 0.07); }

.exercise-summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.exercise-name {
  font-weight: 700;
  color: var(--purple);
  font-size: 1.05rem;
}

.exercise-name-en {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.exercise-summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.exercise-caret,
.program-caret {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--purple-mid);
  border-bottom: 2px solid var(--purple-mid);
  transform: rotate(45deg);
  transition: transform var(--transition);
  margin: 0.3rem 0.15rem 0 0.35rem;
}

.exercise-card[open] .exercise-caret,
.program-card[open] .program-caret {
  transform: rotate(-135deg);
}

.exercise-body,
.program-body {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  background: #fdfdff;
}

.exercise-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tag-category {
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}

.tag-gym {
  background: var(--purple-mid);
  border-color: var(--purple-mid);
  color: #ffffff;
}

.tag-home {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--purple-dark);
}

.tag-soft {
  background: rgba(74, 44, 122, 0.08);
  border-color: rgba(74, 44, 122, 0.15);
  color: var(--purple);
}

.tag-goal {
  background: rgba(200, 230, 0, 0.22);
  border-color: rgba(168, 192, 0, 0.4);
  color: #4c5a00;
}

.tag-source {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(74, 44, 122, 0.3);
  color: var(--purple-mid);
}

.exercise-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .exercise-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.exercise-facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.fact-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.fact-value {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.exercise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.exercise-section { margin-bottom: 1rem; }

.exercise-section h3 {
  font-size: 0.95rem;
  color: var(--purple);
  margin-bottom: 0.45rem;
}

.exercise-steps,
.exercise-list {
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.exercise-steps li,
.exercise-list li { margin-bottom: 0.3rem; }

.exercise-list-warn li::marker { color: #b45309; }

.exercise-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.5rem;
}

@media (min-width: 700px) {
  .exercise-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.caution-box {
  background: #fff8e6;
  border: 1px solid #f2d38b;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: #6b4a00;
  font-size: 0.88rem;
  line-height: 1.55;
}

.variation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 1rem 0;
}

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

.variation {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
}

.variation-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--purple-mid);
  margin-bottom: 0.25rem;
}

.variation p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.media-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.media-links-label {
  font-weight: 600;
  color: var(--text-muted);
}

.media-links a {
  color: var(--purple-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.media-links a:hover { color: var(--purple); }

.exercise-source {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.exercise-source a {
  color: var(--purple-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Ohjelmakortit ---------- */
.program-summary {
  display: block;
  padding: 1.25rem 1.4rem;
  transition: background var(--transition);
}

.program-summary:hover { background: rgba(200, 230, 0, 0.07); }

.program-summary-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.program-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--purple);
  flex: 1;
}

.program-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.program-lead {
  display: block;
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 900px;
}

.program-quickfacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.program-quickfacts strong {
  color: var(--purple);
  font-size: 1rem;
}

.program-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 800px) {
  .program-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.program-intro h3 {
  font-size: 0.95rem;
  color: var(--purple);
  margin-bottom: 0.3rem;
}

.program-intro p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.program-facts { margin-bottom: 1.25rem; }

.program-days {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.program-day {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.program-day h3 {
  background: var(--purple);
  color: #ffffff;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
}

.program-exercise-list {
  display: grid;
  gap: 0;
}

.program-exercise {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
}

.program-exercise:first-child { border-top: none; }

.program-exercise-name {
  font-weight: 600;
  color: var(--purple);
  font-size: 0.95rem;
}

.program-exercise-name a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(74, 44, 122, 0.3);
  text-underline-offset: 2px;
}

.program-exercise-name a:hover { text-decoration-color: var(--purple); }

.program-exercise-dose {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.15rem;
}

.program-rest { color: var(--text-muted); }

.program-exercise-tip {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.25rem;
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

@media (max-width: 640px) {
  .exercise-summary { flex-direction: column; }
  .exercise-summary-meta { justify-content: flex-start; }
  .program-summary-top { align-items: flex-start; }
  .library-hero { padding: 2rem 0 2.25rem; }
  .pt-guidance { padding: 1.25rem; }
}
