/***********************
  KERHO – KOKONAISUUS
************************/
.kerho-hero-section {
  --kerho-hero-bg-height: clamp(380px, 58vh, 640px);
  position: relative;
  display: grid;
  align-content: center;
  overflow: hidden;
  min-height: 800px;
  padding: 0 1.5rem 4.5rem;
  color: #fff;
  background-image:
    var(--kerho-hero-overlay, linear-gradient(
      160deg,
      rgba(8, 20, 40, 0.52),
      rgba(15, 45, 70, 0.3)
    )),
    var(--bombo-kerho-hero-bg, none);
  background-size: cover;
  background-position: var(--kerho-hero-bg-position, center bottom);
  background-repeat: no-repeat;
}

.kerho-hero-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    rgba(14, 40, 63, 0),
    rgba(14, 40, 63, 0.72) 60%,
    rgba(14, 40, 63, 0.96)
  );
  pointer-events: none;
  z-index: 1;
}

.kerho-hero-section > * {
  position: relative;
  z-index: 2;
}

.kerho-tiers-section {
  position: relative;
  margin-top: -1px;
  padding: 4.75rem 1.5rem 5rem;
  background: var(--gradient-bg);
  color: #fff;
}

.kerho-tiers-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 72px;
  background: linear-gradient(
    180deg,
    rgba(14, 40, 63, 0.92),
    rgba(14, 40, 63, 0)
  );
  pointer-events: none;
  z-index: 1;
}

.kerho-tiers-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 20, 40, 0.68),
    rgba(15, 45, 70, 0.56)
  );
  z-index: 0;
}

.kerho-tiers-section > * {
  position: relative;
  z-index: 2;
}

/***********************
  HERO
************************/
.kerho-hero {
  max-width: 700px;
  padding-top: clamp(0.5rem, 2vh, 1.5rem);
  margin: 0 auto;
  text-align: center;
}

.kerho-hero-text {
  text-shadow: 0 2px 10px rgba(6, 14, 28, 0.6);
}

.kerho-hero-image {
  max-width: 180px;
  margin-bottom: 0;
}

.kerho-hero .character-icon {
  max-width: 80px;
  margin-bottom: -9px;
}

.kerho-cta-footer .character-icon--footer {
  max-width: 111px;
  margin-bottom: -9px;
}

.kerho-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.65rem;
}

.kerho-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.01em;
}

.kerho-scroll-arrow {
  position: absolute;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  display: inline-block;
  padding: 0.1rem 0.35rem;
  color: #fff;
  text-decoration: none;
  font-size: 2.15rem;
  line-height: 1;
  z-index: 3;
  opacity: 0.84;
  text-shadow: 0 2px 10px rgba(6, 14, 28, 0.65);
  transition: opacity 0.2s ease;
  animation: kerho-scroll-bob 1.9s ease-in-out infinite;
}

.kerho-scroll-arrow:hover {
  opacity: 1;
  animation-play-state: paused;
}

.kerho-scroll-arrow:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
  animation-play-state: paused;
}

@keyframes kerho-scroll-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kerho-scroll-arrow {
    animation: none;
    transition: none;
  }
}

.kerho-micro {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0.5rem 0 0;
  color: #fff;
}

.kerho-micro-price {
  margin-top: 0.3rem;
}

.kerho-micro-link {
  margin: 0.2rem 0 0;
}

.kerho-micro-link a {
  color: rgba(231, 247, 255, 0.96);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kerho-micro-link a:hover {
  color: #ffffff;
}

.kerho-vat-note {
  max-width: 780px;
  margin: 1.35rem auto 0;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  color: rgba(231, 247, 255, 0.82);
  font-style: italic;
}

@media (max-width: 768px) {
  .kerho-subtitle {
    font-size: 1.25rem;
  }

  .kerho-micro {
    font-size: 0.8rem;
  }

  .kerho-vat-note {
    font-size: 0.78rem;
  }

  .kerho-scroll-arrow {
    bottom: 0.95rem;
    font-size: 1.95rem;
  }
}

/***********************
  TIERS
************************/
.kerho-tiers {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
}

.kerho-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 330px;
  width: 100%;
  padding: 2.5rem 2.2rem;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kerho-tier.is-current {
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(111, 227, 193, 0.45);
}

.kerho-tier-intro,
.kerho-features,
.kerho-lead {
  color: rgba(255, 255, 255, 0.88);
}

.kerho-tier--free {
  background: radial-gradient(
    ellipse at top,
    rgba(120, 170, 255, 0.35),
    rgba(43, 90, 160, 0.75),
    rgba(20, 35, 70, 0.9)
  );
}

.kerho-tier--plus {
  background: radial-gradient(
    ellipse at top,
    rgba(111, 227, 193, 0.35),
    rgba(43, 179, 192, 0.25),
    rgba(11, 28, 45, 0.95)
  );
  outline: 2px solid rgba(255, 255, 255, 0.12);
  outline-offset: -2px;
}

@media (min-width: 1024px) {
  .kerho-tier--plus {
    transform: none;
    box-shadow:
      0 28px 60px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

.kerho-tier--daycare {
  background: radial-gradient(
    ellipse at top,
    rgba(255, 255, 255, 0.15),
    rgba(240, 240, 240, 0.12),
    rgba(20, 35, 70, 0.85)
  );
  color: #fff;
}

.kerho-tier--daycare .kerho-cta {
  background: rgba(255, 255, 255, 0.18);
}

/***********************
  BADGE
************************/
.kerho-badge {
  position: absolute;
  top: 36px;
  right: -57px;
  background: var(--kerho-color-main);
  padding: 6px 48px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  transform: rotate(45deg);
}

.kerho-badge--current {
  background: #6fe3c1;
  color: #0d2335;
}

/***********************
  TEKSTIT
************************/
.kerho-price {
  font-size: 1.48rem;
  line-height: 1.28;
  margin: 0.3rem 0 0.45rem;
}

.kerho-note {
  font-size: 0.9rem;
  opacity: 0.85;
}

.kerho-tier-intro {
  font-size: 0.9rem;
  margin-bottom: 0rem;
  opacity: 0.95;
}

.kerho-features {
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  min-height: 0;
  flex: 0 0 auto;
  padding-left: 1.25rem;
  margin-left: 0;
  list-style-position: outside !important;
}

.kerho-features li {
  margin-bottom: 0.24rem;
}

.kerho-tier--free .kerho-features li {
  font-weight: 600;
}

.kerho-features li.plus-feature {
  font-weight: bold;
}

.kerho-features--included .plus-feature {
  position: relative;
  font-weight: 600;
  padding-bottom: 6px;
  text-decoration: underline;
  text-decoration-color: color-mix(
    in srgb,
    var(--kerho-color-main) 50%,
    transparent
  );
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/***********************
  CTA
************************/
.kerho-cta {
  display: inline-block;
  align-self: center;
  margin-top: auto;
  padding: 14px 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.kerho-cta--primary {
  background: linear-gradient(
    135deg,
    var(--kerho-color-start),
    var(--kerho-color-mid),
    var(--kerho-color-end)
  );
  background-size: 200% 200%;
  font-size: 1.05rem;
}

.kerho-gift-link {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.85;
  text-decoration: underline;
}

/***********************
  MOBIILI
************************/
@media (max-width: 768px) {
  .kerho-hero-section {
    min-height: clamp(510px, 76vh, 650px);
    min-height: clamp(510px, 76svh, 650px);
    padding: 0 1.2rem 2.8rem;
  }

  .kerho-tiers-section {
    padding: 3.8rem 0.5rem 4.2rem;
  }

  .kerho-hero h1 {
    font-size: 2.1rem;
  }

  .kerho-tiers {
    gap: 1rem;
  }

  .kerho-tier {
    max-width: 300px;
    padding: 2.3rem 1.4rem 2rem;
  }

  .kerho-features {
    padding-left: 1.1rem;
  }

  .kerho-badge {
    top: 30px;
    right: -56px;
    padding: 5px 46px;
    font-size: 0.62rem;
  }
}

@media (max-width: 700px) {
  .kerho-tiers {
    gap: 0.75rem;
  }

  .kerho-tier {
    width: calc(50% - 0.6rem);
    max-width: 300px;
  }
}

@media (max-width: 560px) {
  .kerho-tier {
    width: min(88vw, 300px);
    max-width: 300px;
    padding: 2.1rem 1.25rem 1.85rem;
  }
}

/***********************
  BENEFITS
************************/
.kerho-benefits {
  position: relative;
  color: #fff;
  padding: 90px;
  background: var(--gradient-bg);
  text-align: center;
}

.kerho-benefits::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 20, 40, 0.68),
    rgba(15, 45, 70, 0.56)
  );
  z-index: 0;
}

.kerho-benefits > * {
  position: relative;
  z-index: 1;
}

.benefit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1220px;
  margin: 2rem auto 0;
}

.benefit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(
      ellipse at top,
      rgba(120, 170, 255, 0.35),
      rgba(43, 90, 160, 0.75),
      rgba(20, 35, 70, 0.9)
    );
  width: 280px;
  color: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  font-size: 0.9rem;
  text-align: center;
}

.benefit:hover {
  transform: translateY(0);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.benefit .emoji {
  font-size: 2.5rem;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto ;
}

.benefit-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
}

.benefit h4 {
  margin: 0.15rem 0 0.45rem;
}

.benefit p {
  margin: 0;
}

.corner-badge {
  position: absolute;
  top: 20px;
  right: -42px;
  background: var(--kerho-color-mid);
  color: #fff;
  padding: 4px 48px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

/***********************
  KERHO FAQ
************************/
.kerho-faq {
  position: relative;
  padding: 90px 24px;
  background: var(--gradient-bg);
  color: #fff;
  overflow: hidden;
}

.kerho-faq::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 20, 40, 0.64),
    rgba(15, 45, 70, 0.52)
  );
  z-index: 0;
}

.kerho-faq > * {
  position: relative;
  z-index: 1;
}

.kerho-faq h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.faq-item {
  background: rgba(25, 54, 88, 0.88);
  border: 1px solid rgba(161, 211, 255, 0.22);
  color: #eef6ff;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(4, 12, 24, 0.2);
  overflow: hidden;
  align-self: start;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 12px 26px rgba(4, 12, 24, 0.28);
}

.faq-item[open] {
  transform: translateY(-1px);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 2.3rem 0.95rem 1rem;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.92;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

.faq-item p {
  margin: 0;
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  color: rgba(233, 243, 255, 0.95);
  animation: faqReveal 0.2s ease;
}

@keyframes faqReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .kerho-faq {
    padding: 64px 20px;
  }

  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/***********************
  GIFTS – LAHJATILAUKSET
************************/
.kerho-gifts {
  padding: 6rem 1.5rem;
  background-color: #0c1c30;
  background-size: cover;
  background-position: var(--kerho-gifts-bg-position, center);
  background-repeat: no-repeat;
  position: relative;
  color: #fff;
}

.kerho-gifts::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 20, 40, 0.68),
    rgba(15, 45, 70, 0.56)
  );
  z-index: 0;
}

.kerho-gifts > * {
  position: relative;
  z-index: 1;
}

.kerho-gifts h2 {
  text-align: center;
  margin-bottom: 0.75rem;
}

.kerho-gifts .intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  opacity: 0.9;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.gift-card {
  position: relative;
  padding: 1.5rem 2rem;
  border-radius: 18px;
  text-align: center;
  background:
    radial-gradient(
      ellipse at top,
      rgba(130, 210, 185, 0.33),
      rgba(41, 126, 113, 0.62),
      rgba(16, 52, 64, 0.92)
    );
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  max-width: 280px;
  margin: auto;
}

/* Gift cards theme A: vihreansavyinen */
.kerho-gifts.gift-theme-a .gift-card {
  background:
    radial-gradient(
      ellipse at top,
      rgba(130, 210, 185, 0.33),
      rgba(41, 126, 113, 0.62),
      rgba(16, 52, 64, 0.92)
    );
}

.gift-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.35);
}

.gift-card .emoji {
  font-size: 2.2rem;
  margin-bottom: 0.05rem;
}

.gift-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  line-height: 1;
  color: #fff;
}

.gift-card h4 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: 0;
  margin-top: 0;
  display: inline-block;
  vertical-align: baseline;
}

.gift-price {
  font-size: 1.1rem;
  display: inline-block;
  vertical-align: baseline;
  margin: 0 0 0 0.45rem;
  opacity: 0.9;
}

.gift-price::before {
  content: "/";
  margin-right: 0.35rem;
}

.old-price {
  text-decoration: line-through;
  opacity: 0.6;
  margin-right: 0.4rem;
}

.new-price {
  font-size: 1.3rem;
  font-weight: 700;
}

.gift-card p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 0;
}

.gift-card p:not(.gift-price) {
  margin-top: 0.7rem;
  margin-bottom: 1.05rem;
}

.gift-card .btn {
  display: inline-block;
  padding: 12px 21px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--kerho-color-start),
    var(--kerho-color-mid),
    var(--kerho-color-end)
  );
  background-size: 200% 200%;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gift-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(43, 179, 192, 0.45);
}

/***********************
  FOOTER CTA – VIIMEINEN ASKEL
************************/
.kerho-cta-footer {
  position: relative;
  padding: 4rem 1.5rem;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: var(--kerho-cta-bg-position, center);
  overflow: hidden;
  min-height: 600px;
  align-content: center;
}

.kerho-cta-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--kerho-cta-overlay, linear-gradient(
    135deg,
    rgba(8, 20, 40, 0.73),
    rgba(15, 45, 70, 0.61)
  ));
  z-index: 0;
}

.kerho-cta-footer > * {
  position: relative;
  z-index: 1;
}

.kerho-cta-footer h3 {
  font-size: clamp(1.9rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.kerho-cta-text {
  color: #f0f0f0;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.kerho-cta-footer .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Footer CTA buttons: keep both buttons vertically centered and same baseline. */
.kerho-cta-footer .cta-buttons > .btn {
  align-self: center;
}

@media (max-width: 1024px) {
  .kerho-cta-footer {
    min-height: clamp(460px, 64vh, 600px);
  }
}

@media (max-width: 600px) {
  .kerho-cta-footer h3 {
    font-size: 1.5rem;
  }

  .kerho-cta-footer .cta-buttons {
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  .kerho-cta-footer {
    min-height: clamp(400px, 60vh, 500px);
  }

  .kerho-cta-footer .character-icon--footer {
    max-width: 92px;
  }
}

/***********************
  RESPONSIVE (GRIDS)
************************/
@media (max-width: 600px) {
  .benefit-grid,
  .gift-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Kerho mobile: kevennä sivupaddingia benefits-osiossa */
@media (max-width: 768px) {
  .kerho-benefits {
    padding: 64px 20px;
  }

  .benefit {
    width: 260px;
    padding: 1.2rem;
  }
}

@media (max-width: 560px) {
  .benefit {
    width: min(86vw, 260px);
    padding: 1.05rem;
  }
}
