/* ==================================================
   FOOTER BASE (Reviewed 2026-02-04)
================================================== */
footer {
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(56, 94, 148, 0.24) 0%, rgba(56, 94, 148, 0) 55%),
    linear-gradient(165deg, #0f223d 0%, #0a182b 52%, #050b14 100%);
  color: #eee;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1rem;
  background-color: transparent;
  color: #fff;
  align-items: center;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

/* ==================================================
   LOGO + CHARACTERS
================================================== */
.footer-logo-characters {
  flex: 1 1 90px;
  text-align: center;
}

.footer-logo img {
  width: 180px;}

.footer-characters {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 auto;
}


.footer-characters img {
  width: 48px;
  height: auto;
  flex: 0 0 auto;
}

/* ==================================================
   SOCIAL MEDIA ICONS
================================================== */
.socialmedias {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 1.5rem 0;
}

.socialmedias img {
  height: 18px;
  transition: transform 0.3s ease;
}

.socialmedias img:hover {
  transform: scale(1.15);
}

/* ==================================================
   FOOTER NAVIGATION
================================================== */
.footer-navigation-columns {
  display: flex;
  flex: 2.2 1 0;
  gap: 1rem;
  flex-direction: row;
}

.footer-nav-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.footer-nav-column h3 {
  margin-bottom: 0.3rem;
}

.footer-nav-column .line {
  width: 50px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8fd2ff, #5fb5ff);
  box-shadow: 0 0 10px rgba(95, 181, 255, 0.35);
  margin-bottom: 0.5rem;
}

.footer-menu {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  padding: 0;
  list-style: none;
}

.footer-nav-column ul {
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 1.7rem;
}

.footer-nav-column .sub-menu {
  padding-left: 1rem;
  list-style: circle;
}

.footer-nav-column ul li a {
  color: #fff;
  text-decoration: none;
}

.footer-nav-column ul li a:hover,
.footer-nav-column li.current-menu-item a {
  color: var(--accent-color);
}

.footer-nav-column li.is-current a {
  color: var(--accent-color);
  font-weight: 700;
}

.footer-menu .footer-subitem {
  margin-left: 0.9rem;
}

.footer-menu .footer-subitem a {
  font-size: 0.95rem;
  opacity: 0.92;
}

/* ==================================================
   FOOTER BOTTOM
================================================== */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(4, 10, 20, 0) 0%, rgba(4, 10, 20, 0.72) 100%);
  border-top: 1px solid rgba(163, 194, 232, 0.16);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0.3rem 0;
}

.footer-legal-links {
  font-size: 0.84rem;
  margin: 0.2rem 0 0.45rem;
  color: rgba(235, 243, 255, 0.56);
}

.footer-legal-links span {
  opacity: 0.48;
  margin: 0 0.35rem;
}

.footer-bottom a {
  color: rgba(235, 243, 255, 0.82);
  text-decoration: underline;
}

.footer-bottom .footer-legal-links a {
  color: rgba(235, 243, 255, 0.58);
}

.footer-copyright {
  margin-top: 3px;
  font-size:12px;
}

.footer-bottom a:hover {
  color: var(--accent-color);
}

/* Confirmation: keep legal/footer-bottom visible, hide upper footer content. */
.pmpro-checkout .footer-top,
.pmpro-confirmation .footer-top {
  display: none;
}

.footer-legal-links a.is-current {
  color: var(--accent-color);
  font-weight: 700;
}

/* Touch-laitteilla estetään "jumiin" jäävä hover/active-värinvaihto skrollatessa */
@media (hover: none) and (pointer: coarse) {
  .footer-nav-column ul li a,
  .footer-bottom a {
    -webkit-tap-highlight-color: transparent;
  }

  .footer-nav-column ul li a:hover,
  .footer-nav-column ul li a:active,
  .footer-nav-column ul li a:focus,
  .footer-nav-column ul li a:focus-visible {
    color: #fff;
  }

  .footer-bottom a:hover,
  .footer-bottom a:active,
  .footer-bottom a:focus,
  .footer-bottom a:focus-visible {
    color: rgba(235, 243, 255, 0.82);
  }
}

.footer-hard-refresh-btn {
  margin-top: 0.75rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid rgba(143, 210, 255, 0.75);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(95, 181, 255, 0.28), rgba(95, 181, 255, 0.14));
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(49, 113, 181, 0.28);
}

.footer-hard-refresh-btn:hover {
  border-color: rgba(143, 210, 255, 0.95);
  color: #ffffff;
}

.footer-hard-refresh-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* ==================================================
   MOBILE
================================================== */
@media (max-width: 768px) {
  /* Focused flows on mobile: hide character strip + socials (logo stays) */
  .pmpro-levels .footer-logo-characters .footer-characters,
  .pmpro-checkout .footer-logo-characters .footer-characters,
  .pmpro-login .footer-logo-characters .footer-characters,
  .pmpro-confirmation .footer-logo-characters .footer-characters,
  .pmpro-account .footer-logo-characters .footer-characters,
  .page-template-template-account .footer-logo-characters .footer-characters,
  .pmpro-levels .footer-logo-characters .socialmedias,
  .pmpro-checkout .footer-logo-characters .socialmedias,
  .pmpro-login .footer-logo-characters .socialmedias,
  .pmpro-confirmation .footer-logo-characters .socialmedias,
  .pmpro-account .footer-logo-characters .socialmedias,
  .page-template-template-account .footer-logo-characters .socialmedias {
    display: none !important;
  }

  .footer-top {
    flex-direction: column;
    padding: 2rem 1rem 0;
  }

  .footer-navigation-columns {
    order: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1rem;
    width: 100%;
    text-align: left;
  }

  .footer-logo img {
    width: 145px;
  }

  .footer-logo-characters {
    order: 2;
    flex: 0 1 auto;
  }

  .footer-nav-column .line {
    margin-left: 0;
    margin-right: 0;
  }

  .footer-menu .footer-subitem {
    margin-left: 0;
  }

  .footer-nav-column:last-child {
    grid-column: 1 / -1;
  }

  .footer-nav-column ul li a {
    display: block;
    padding: 0.5rem 0;
    line-height: 1.35;
  }

  body.account-subpage .footer-navigation-columns {
    display: none;
  }

  body.account-subpage .footer-top {
    padding-top: 1.35rem;
    padding-bottom: 0;
  }

  /* Legal pages on mobile: keep only logo + legal links for easier switching
     between policy pages without the full footer navigation in between. */
  .page-tietosuojaseloste .footer-characters,
  .page-tietosuoja .footer-characters,
  .page-kayttoehdot .footer-characters,
  .page-evastekaytanto .footer-characters,
  .page-legal.page-legal-privacy .footer-characters,
  .page-tietosuojaseloste .socialmedias,
  .page-tietosuoja .socialmedias,
  .page-kayttoehdot .socialmedias,
  .page-evastekaytanto .socialmedias,
  .page-legal.page-legal-privacy .socialmedias,
  .page-tietosuojaseloste .footer-navigation-columns,
  .page-tietosuoja .footer-navigation-columns,
  .page-kayttoehdot .footer-navigation-columns,
  .page-evastekaytanto .footer-navigation-columns,
  .page-legal.page-legal-privacy .footer-navigation-columns {
    display: none !important;
  }

  .page-tietosuojaseloste .footer-top,
  .page-tietosuoja .footer-top,
  .page-kayttoehdot .footer-top,
  .page-evastekaytanto .footer-top,
  .page-legal.page-legal-privacy .footer-top {
    padding-top: 1.35rem;
    padding-bottom: 0;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .footer-top {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 640px) and (max-width: 768px) {
  .footer-top {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}
