/* ==========================================================================
   Radioduo Oppaat – yhteinen CSS
   Päivitetty 27.9.2026

   Sisältää:
   1) Oppaat ja vinkit -etusivun tyylit (.rd-oppaat)
   2) Yhteisen opassivupohjan tyylit (.rd-guide)

   Huom:
   - Punainen on pieni korostusväri.
   - Toimintopainikkeet käyttävät Radioduon sinistä.
   - Opassivun hero-kuva annetaan sivukohtaisesti CSS-muuttujalla:
     style="--rd-hero-image:url('/editor_files/Oppaat/kuva.webp')"
   ========================================================================== */


/* ==========================================================================
   1. Oppaat ja vinkit -etusivu
   ========================================================================== */

.rd-oppaat,
.rd-oppaat * {
  box-sizing: border-box;
}

.rd-oppaat {
  --rd-navy: #071a37;
  --rd-navy-light: #123566;
  --rd-blue: #0876b9;
  --rd-blue-hover: #056298;
  --rd-red: #e52329;
  --rd-text: #172033;
  --rd-muted: #5d6675;
  --rd-border: #dfe4eb;
  --rd-soft: #f6f7f9;
  --rd-white: #ffffff;

  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 20px 52px;
  color: var(--rd-text);
  font-family: inherit;
  line-height: 1.5;
}

.rd-oppaat a {
  color: inherit;
  text-decoration: none;
}

.rd-oppaat__hero {
  position: relative;
  overflow: hidden;
  padding: 46px 28px 42px;
  text-align: center;
  background:
    radial-gradient(circle at 10% 0, rgba(229, 35, 41, .08), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(7, 26, 55, .08), transparent 34%),
    var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: 18px;
}

.rd-oppaat__eyebrow {
  margin: 0 0 10px;
  color: var(--rd-red);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.rd-oppaat__title {
  margin: 0;
  color: var(--rd-navy);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.rd-oppaat__intro {
  max-width: 850px;
  margin: 18px auto 0;
  color: var(--rd-muted);
  font-size: clamp(17px, 2vw, 21px);
}

.rd-oppaat__tools {
  margin-top: 26px;
  padding: 22px;
  background: var(--rd-soft);
  border: 1px solid var(--rd-border);
  border-radius: 14px;
}

.rd-oppaat__search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--rd-navy);
  font-size: 15px;
  font-weight: 800;
}

.rd-oppaat__search-wrap {
  position: relative;
}

.rd-oppaat__search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--rd-muted);
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.rd-oppaat__search {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 48px;
  color: var(--rd-text);
  background: var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: 9px;
  font: inherit;
  font-size: 16px;
}

.rd-oppaat__search:focus {
  border-color: var(--rd-navy-light);
  box-shadow: 0 0 0 3px rgba(18, 53, 102, .14);
  outline: 0;
}

.rd-oppaat__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.rd-oppaat__filter {
  padding: 9px 14px;
  color: var(--rd-navy);
  background: var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rd-oppaat__filter:hover {
  border-color: var(--rd-navy-light);
}

.rd-oppaat__filter[aria-pressed="true"] {
  color: var(--rd-white);
  background: var(--rd-navy);
  border-color: var(--rd-navy);
}

.rd-oppaat__filter:focus-visible,
.rd-oppaat__card:focus-visible,
.rd-oppaat__button:focus-visible {
  outline: 3px solid rgba(8, 118, 185, .30);
  outline-offset: 3px;
}

.rd-oppaat__status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--rd-muted);
  font-size: 14px;
}

.rd-oppaat__section {
  margin-top: 34px;
}

.rd-oppaat__section-title {
  position: relative;
  margin: 0 0 18px;
  padding-bottom: 11px;
  color: var(--rd-navy);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.rd-oppaat__section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 46px;
  height: 4px;
  background: var(--rd-red);
  border-radius: 99px;
}

.rd-oppaat__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.rd-oppaat__card {
  grid-column: span 4;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--rd-white);
  border: 1px solid var(--rd-border);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(7, 26, 55, .07);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.rd-oppaat__card:hover {
  border-color: rgba(229, 35, 41, .35);
  box-shadow: 0 16px 34px rgba(7, 26, 55, .14);
  transform: translateY(-5px);
}

.rd-oppaat__image-wrap {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #17191d;
}

.rd-oppaat__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 350ms ease,
    filter 350ms ease;
}

.rd-oppaat__card:hover .rd-oppaat__image {
  filter: brightness(.92);
  transform: scale(1.035);
}

.rd-oppaat__card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 19px;
}

.rd-oppaat__card-title {
  margin: 0;
  color: var(--rd-navy);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.015em;
}

.rd-oppaat__card-text {
  margin: 9px 0 0;
  color: var(--rd-muted);
  font-size: 15px;
}

.rd-oppaat__card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 16px;
}

.rd-oppaat__arrow {
  color: var(--rd-red);
  font-size: 29px;
  line-height: 1;
  transition: transform 180ms ease;
}

.rd-oppaat__card:hover .rd-oppaat__arrow {
  transform: translateX(5px);
}

.rd-oppaat__empty,
.rd-oppaat__notice {
  margin: 28px 0 0;
  padding: 22px;
  text-align: center;
  background: var(--rd-soft);
  border: 1px solid var(--rd-border);
  border-radius: 12px;
}

.rd-oppaat__footer {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 50px;
  padding: 28px 30px;
  background: var(--rd-soft);
  border: 1px solid var(--rd-border);
  border-radius: 16px;
}

.rd-oppaat__footer-title {
  margin: 0;
  color: var(--rd-navy);
  font-size: 24px;
  font-weight: 800;
}

.rd-oppaat__footer-text {
  margin: 6px 0 0;
  color: var(--rd-muted);
}

/* Toimintopainike: Radioduon sininen. Punainen jätetään korostusväriksi. */
.rd-oppaat__button {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 9px;
  align-items: center;
  padding: 12px 17px;
  color: var(--rd-white) !important;
  background: var(--rd-blue);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 7px 16px rgba(8, 118, 185, .18);
}

.rd-oppaat__button:hover {
  background: var(--rd-blue-hover);
}


/* ==========================================================================
   2. Yhteinen opassivupohja
   ========================================================================== */

.rd-guide,
.rd-guide * {
  box-sizing: border-box;
}

.rd-guide {
  --rd-navy: #071a37;
  --rd-navy-light: #123566;
  --rd-blue: #0876b9;
  --rd-blue-hover: #056298;
  --rd-red: #e52329;
  --rd-text: #33465a;
  --rd-muted: #617184;
  --rd-border: #dfe4eb;
  --rd-soft: #f6f7f9;
  --rd-blue-soft: #eef7fc;
  --rd-white: #ffffff;
  --rd-shadow: 0 14px 38px rgba(7, 26, 55, .09);

  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  color: var(--rd-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.68;
}

.rd-guide a {
  color: var(--rd-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.rd-guide a:hover {
  color: var(--rd-blue-hover);
}

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


/* Hero
   Sivukohtainen kuva annetaan .rd-guide-elementille:
   style="--rd-hero-image:url('/editor_files/Oppaat/kuva.webp');"
*/
.rd-guide__hero {
  position: relative;
  min-height: 430px;
  margin: 0 0 32px;
  overflow: hidden;
  border-radius: 18px;
  background-color: #0b1725;
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 18, 35, .95) 0%,
      rgba(4, 18, 35, .80) 37%,
      rgba(4, 18, 35, .26) 66%,
      rgba(4, 18, 35, .08) 100%
    ),
    var(--rd-hero-image, none);
  background-position: center center;
  background-size: cover;
  box-shadow: var(--rd-shadow);
}

.rd-guide__hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(640px, 58%);
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: 48px 46px;
  color: #fff;
}

.rd-guide__hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.03em;
}

.rd-guide__accent {
  display: block;
  width: 58px;
  height: 5px;
  margin: 18px 0 20px;
  border-radius: 999px;
  background: var(--rd-red);
}

.rd-guide__hero p {
  margin: 0;
  color: rgba(255, 255, 255, .95);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.52;
}


/* Pääsisältö + sivupalkki */
.rd-guide__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

.rd-guide__main {
  min-width: 0;
}

.rd-guide__intro {
  padding: 0 0 4px;
  font-size: 17px;
}

.rd-guide__intro p:first-child {
  margin-top: 0;
}

.rd-guide p {
  margin: 0 0 17px;
}

.rd-guide strong {
  color: var(--rd-navy);
}


/* Otsikot */
.rd-guide h2,
.rd-guide h3 {
  color: var(--rd-navy);
  letter-spacing: -.018em;
}

.rd-guide h2 {
  position: relative;
  margin: 40px 0 20px;
  padding-bottom: 13px;
  font-size: clamp(27px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.18;
}

.rd-guide h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 4px;
  border-radius: 999px;
  background: var(--rd-red);
}

.rd-guide h3 {
  margin: 31px 0 11px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}


/* Sivupalkki */
.rd-guide__sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 18px;
}

.rd-guide__sidebox {
  padding: 21px 22px;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fafc, #f1f5f8);
}

.rd-guide__sidebox h3 {
  position: relative;
  margin: 0 0 17px;
  padding-bottom: 10px;
  font-size: 20px;
}

.rd-guide__sidebox h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: var(--rd-red);
}

.rd-guide__sidebox p {
  margin: 0 0 14px;
  color: var(--rd-muted);
  line-height: 1.5;
}

.rd-guide__toc,
.rd-guide__related {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-guide__toc li + li,
.rd-guide__related li + li {
  border-top: 1px solid var(--rd-border);
}

.rd-guide__toc a,
.rd-guide__related a {
  position: relative;
  display: block;
  padding: 9px 26px 9px 0;
  font-weight: 700;
  line-height: 1.34;
  text-decoration: underline;
}

.rd-guide__toc a::after,
.rd-guide__related a::after {
  content: "→";
  position: absolute;
  top: 8px;
  right: 0;
  color: var(--rd-red);
  font-size: 21px;
  font-weight: 700;
}


/* Painikkeet */
.rd-guide__button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  color: #fff !important;
  background: var(--rd-blue);
  border-radius: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 7px 16px rgba(8, 118, 185, .18);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.rd-guide__sidebox .rd-guide__button {
  width: 100%;
}

.rd-guide__button::after {
  content: "→";
  font-size: 20px;
}

.rd-guide__button:hover {
  color: #fff !important;
  background: var(--rd-blue-hover);
  transform: translateY(-1px);
}

.rd-guide__button:focus-visible,
.rd-guide a:focus-visible,
.rd-guide summary:focus-visible {
  outline: 3px solid rgba(8, 118, 185, .30);
  outline-offset: 3px;
}


/* Taulukot */
.rd-guide__table-wrap {
  width: 100%;
  margin: 20px 0 25px;
  overflow-x: auto;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.rd-guide table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--rd-text);
}

.rd-guide th,
.rd-guide td {
  padding: 13px 15px;
  border-right: 1px solid var(--rd-border);
  border-bottom: 1px solid var(--rd-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.rd-guide th:last-child,
.rd-guide td:last-child {
  border-right: 0;
}

.rd-guide tr:last-child td {
  border-bottom: 0;
}

.rd-guide th {
  color: var(--rd-navy);
  background: #edf2f6;
  font-size: 14px;
  font-weight: 800;
}


/* Tieto- ja varoituslaatikot */
.rd-guide__note,
.rd-guide__warning {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 11px;
}

.rd-guide__note {
  border: 1px solid #d9eaf6;
  background: var(--rd-blue-soft);
}

.rd-guide__warning {
  border-left: 4px solid #d79523;
  background: #fff8e9;
}

.rd-guide__note strong,
.rd-guide__warning strong {
  display: inline-block;
  margin-right: 4px;
}


/* Numeroidut vaiheet */
.rd-guide__steps {
  display: grid;
  gap: 14px;
  counter-reset: rdstep;
}

.rd-guide__step {
  position: relative;
  padding: 21px 22px 20px 70px;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  background: #fff;
}

.rd-guide__step::before {
  counter-increment: rdstep;
  content: counter(rdstep);
  position: absolute;
  top: 19px;
  left: 19px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--rd-blue);
  color: #fff;
  font-weight: 800;
}

.rd-guide__step h3 {
  margin-top: 0;
}


/* Koodi */
.rd-guide code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
}

.rd-guide pre {
  margin: 20px 0;
  padding: 22px 24px;
  overflow-x: auto;
  border: 1px solid #263b50;
  border-radius: 12px;
  background: #101c28;
  color: #f5f8fb;
  font-size: 14px;
  line-height: 1.62;
  -webkit-overflow-scrolling: touch;
}

.rd-guide pre code {
  color: inherit;
}


/* Jatkoaihekortit */
.rd-guide__next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 22px;
}

.rd-guide__next-card {
  padding: 18px 19px;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  background: var(--rd-soft);
}

.rd-guide__next-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rd-guide__next-card p {
  margin: 0;
}


/* UKK */
.rd-guide details {
  padding: 15px 0;
  border-top: 1px solid var(--rd-border);
}

.rd-guide details:last-of-type {
  border-bottom: 1px solid var(--rd-border);
}

.rd-guide summary {
  cursor: pointer;
  color: var(--rd-navy);
  font-size: 17px;
  font-weight: 800;
}

.rd-guide details p {
  margin: 12px 0 2px;
}


/* Lopun CTA */
.rd-guide__final {
  margin-top: 38px;
  padding: 28px 30px;
  border: 1px solid #d7e8f3;
  border-radius: 15px;
  background: linear-gradient(135deg, #f3f9fd, #eaf5fb);
}

.rd-guide__final h2 {
  margin-top: 0;
}

.rd-guide__final .rd-guide__button {
  width: auto;
  min-width: 270px;
  margin-top: 7px;
}


/* ==========================================================================
   3. Responsiivisuus
   ========================================================================== */

@media (max-width: 1000px) {
  .rd-oppaat__card {
    grid-column: span 6;
  }

  .rd-guide__layout {
    grid-template-columns: 1fr;
  }

  .rd-guide__sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: -1;
  }
}

@media (max-width: 680px) {
  .rd-oppaat {
    padding: 20px 12px 34px;
  }

  .rd-oppaat__hero {
    padding: 32px 17px 30px;
    border-radius: 13px;
  }

  .rd-oppaat__tools {
    padding: 16px;
  }

  .rd-oppaat__card {
    grid-column: 1 / -1;
  }

  .rd-oppaat__footer {
    display: block;
    padding: 23px 20px;
  }

  .rd-oppaat__button {
    margin-top: 18px;
  }

  .rd-guide {
    padding: 12px 12px 46px;
    font-size: 15.5px;
  }

  .rd-guide__hero {
    min-height: 455px;
    border-radius: 13px;
    background-image:
      linear-gradient(
        180deg,
        rgba(4, 18, 35, .18) 0%,
        rgba(4, 18, 35, .62) 48%,
        rgba(4, 18, 35, .96) 100%
      ),
      var(--rd-hero-image, none);
    background-position: 58% center;
  }

  .rd-guide__hero-inner {
    width: 100%;
    min-height: 455px;
    justify-content: flex-end;
    padding: 28px 24px 30px;
  }

  .rd-guide__hero h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .rd-guide__hero p {
    font-size: 17px;
  }

  .rd-guide__layout {
    gap: 22px;
  }

  .rd-guide__sidebar {
    grid-template-columns: 1fr;
  }

  .rd-guide__sidebox--related {
    display: none;
  }

  .rd-guide h2 {
    margin-top: 34px;
    font-size: 28px;
  }

  .rd-guide h3 {
    font-size: 20px;
  }

  .rd-guide__next-grid {
    grid-template-columns: 1fr;
  }

  .rd-guide__step {
    padding: 65px 18px 18px;
  }

  .rd-guide__step::before {
    top: 17px;
    left: 18px;
  }

  .rd-guide__final {
    padding: 23px 20px;
  }

  .rd-guide__final .rd-guide__button {
    width: 100%;
    min-width: 0;
  }
}


/* ==========================================================================
   4. Liikkeen vähentäminen
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .rd-oppaat *,
  .rd-oppaat *::before,
  .rd-oppaat *::after,
  .rd-guide *,
  .rd-guide *::before,
  .rd-guide *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
