:root {
  --bg-color: #f8fffe;       /* vaalea, raikas tausta */
  --main-color: #2d7d8a;     /* syvempi turkoosi, tyypillinen wellness-väri */
  --secondary-color: #4a9ba8; /* vaaleampi turkoosi */
  --accent-color: #7fb069;   /* raikas vihreä aksentti */
  --warm-accent: #f4a261;    /* lämmin oranssi aksentti */
  --dark-text: #2c3e50;      /* syvempi tummansininen teksti */
  --light-text: #5a6c7d;     /* pehmeä siniharmaa teksti */
  --container-bg: #ffffff;   /* puhdas valkoinen laatikko */
  --hero-bg: #e8f6f8;       /* hyvin vaalea turkoosi hero-alueelle */
  --font-size-base: 18px;    
  --line-height-base: 1.6;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-text);
  line-height: var(--line-height-base);
  background: 
    linear-gradient(
      rgba(248, 255, 254, 0.9),
      rgba(248, 255, 254, 0.9)
    ),
    url('images/bg.png') center / cover no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Top navigation header */
.top-navigation {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  gap: 20px;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--dark-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--main-color);
}

.top-nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-register {
  display: inline-block;
  background-color: transparent;
  color: var(--main-color);
  padding: 8px 18px;
  border: 2px solid var(--main-color);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.btn-register:hover {
  background-color: var(--main-color);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Hero-osio */
 .hero-section {
  text-align: center;
  padding: 40px 20px;
  background-color: var(--hero-bg);
}
.header-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

/* Logo-kuva */
.logo-img {
  max-width: 220px; 
  height: auto;
}


.btn-login {
  display: inline-block;
  background-color: var(--main-color);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-login:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* Sidebar layout for dashboards */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  max-width: 140px;
  height: auto;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.sidebar-menu li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu .nav-link {
  display: block;
  padding: 14px 20px;
  color: var(--dark-text);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.sidebar-menu .nav-link:hover {
  background-color: var(--hero-bg);
  color: var(--main-color);
}

.sidebar-menu .nav-link.active {
  background-color: var(--main-color);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
}

.btn-logout {
  width: 100%;
  background-color: var(--warm-accent);
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.btn-logout:hover {
  background-color: #e67e22;
  transform: translateY(-2px);
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark-text);
}

.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background-color: var(--main-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: none;
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

.main-content {
  margin-left: 0;
  padding-top: 80px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

@media (min-width: 1024px) {
  .sidebar {
    left: 0;
  }
  .main-content {
    margin-left: 260px;
    padding-top: 40px;
  }
  .menu-toggle {
    display: none;
  }
  .sidebar-overlay {
    display: none !important;
  }
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.dashboard-section {
  margin: 30px 0;
  padding: 24px;
  background-color: #fafafa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.dashboard-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--main-color);
}

/* Checkbox group - checkboxit päällekkäin */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.checkbox-label:hover {
  background-color: #f0f0f0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label span {
  font-weight: normal;
  color: var(--dark-text);
  text-align: left;
  line-height: 1.5;
}

.form-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 15px;
  text-align: center;
}

.form-message.success {
  background-color: #e8fbe8;
  color: #207520;
  border: 1px solid #b6e3b6;
}

.form-message.error {
  background-color: #fde8e8;
  color: #a72020;
  border: 1px solid #f1b6b6;
}

.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.admin-table thead {
  background-color: var(--main-color);
  color: #fff;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  font-size: 0.95rem;
}

.admin-table tbody tr:hover {
  background-color: #f7f7f7;
}

.admin-pref-cell {
  vertical-align: top;
}

.admin-pref-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-pref-block {
  background: #f7fbfb;
  border: 1px solid #e4f0f1;
  border-radius: 6px;
  padding: 8px 10px;
}

.admin-pref-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark-text);
}

.admin-pref-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loading-message {
  text-align: center;
  padding: 24px;
  color: var(--light-text);
}

.hero-text {
  max-width: 100%;
  width: 95%;
  margin: 0 auto;
  color: var(--light-text);
  font-size: 1.25rem;
  text-align: center;
  line-height: 1.6;
  padding: 0 10px;
}

/* Kontaineri sivun sisällölle */
.container {
  max-width: 1200px;
  background-color: var(--container-bg);
  margin: -30px auto 30px auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
}

/* Main heading wrapper (mobiilissa ensin) */
.main-heading-wrapper {
  text-align: center;
  margin-bottom: 40px;
}

/* Main content grid: kuva + lomake */
.main-content-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: stretch;
}

/* Kuva-wrapper */
.content-image-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  order: 1; /* Mobiilissa toisena (after heading) */
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

/* Heading */
.content-heading {
  font-size: 1.8rem;
  line-height: 1.3;
  color: var(--dark-text);
  margin: 0 0 20px 0;
  font-weight: 700;
}

/* Lead text */
.content-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--light-text);
  margin: 0 0 24px 0;
}

/* Trust bullets */
.content-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.content-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--dark-text);
  font-weight: 500;
}

.benefit-icon {
  font-size: 1.2rem;
}
/*:root {
  --bg-color: #f8fffe;   
  --main-color: #2d7d8a;     
  --secondary-color: #4a9ba8; 
  --accent-color: #7fb069;   
  --warm-accent: #f4a261;    
  --dark-text: #2c3e50;     
  --light-text: #5a6c7d;     
  --container-bg: #ffffff;  
  --hero-bg: #e8f6f8;       
  --font-size-base: 18px;    
  --line-height-base: 1.6;
}*/
/* CTA button wrapper */
.cta-button-wrapper {
  text-align: center;
  margin: 30px 0;
}

.btn-cta-main {
  display: inline-block;
  background: var(--main-color);
  color: #ffffff;
  padding: 16px 40px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 6px 20px rgba(127, 176, 105, 0.4);
}

.btn-cta-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(127, 176, 105, 0.5);
}

.btn-cta-main:active {
  transform: translateY(-1px);
}

/* Testaus box - highlighted section */
.testaus-box {
  background: linear-gradient(135deg, rgba(232, 246, 248, 0.6), rgba(232, 246, 248, 0.9));
  border: 2px solid var(--secondary-color);
  border-radius: 16px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 4px 15px rgba(127, 176, 105, 0.15);
}

.testaus-image {
  display: none; /* Hidden on mobile */
}

.testaus-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.testaus-cta {
  margin-top: 24px;
}

.btn-testaus {
  display: inline-block;
  background-color: var(--main-color);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-testaus:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-testaus:active {
  transform: translateY(0);
}

/* Subheading */
.content-subheading {
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--main-color);
  margin: 0 0 20px 0;
  font-weight: 600;
}

/* Paragraph text */
.content-paragraph {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--dark-text);
  margin: 0 0 16px 0;
}

.content-paragraph.highlight {
  font-weight: 600;
  color: var(--main-color);
}

/* Description text (legacy) */
.content-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--light-text);
  margin: 0;
}

/* Desktop layout (≥1024px) */
@media (min-width: 1024px) {
  .main-heading-wrapper {
    text-align: center;
    margin-bottom: 50px;
  }
  
  /* Testaus box stays left-aligned on desktop and becomes grid */
  .testaus-box {
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
  }
  
  .testaus-image {
    display: block; /* Show on desktop */
  }
  
  .main-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
  }
  
  .content-image-wrapper {
    order: 1; /* Desktopissa vasemmalla */
    max-width: 100%;
  }
  
  .survey-section {
    order: 2; /* Desktopissa oikealla */
  }
  
  .content-heading {
    font-size: 2.2rem;
  }
  
  .content-subheading {
    font-size: 1.5rem;
  }
  
  .content-benefits {
    justify-content: center;
  }
}

/* Larger desktop (≥1280px) */
@media (min-width: 1280px) {
  .content-heading {
    font-size: 2.5rem;
  }
  
  .content-lead {
    font-size: 1.15rem;
  }
  
  .hero-text {
    font-size: 1.35rem;
  }
}

.intro-text {
  text-align: center; /* Keskitetään otsikko ja alempi teksti */
}

.intro-text h2 {
  margin-bottom: 20px;
}

h3 {
  font-size: 1.2rem;
  color: var(--main-color);
}

/* Emme tasaa näitä justify-muotoon, jotta teksti keskittyy nätisti */
.intro-text p {
  margin-bottom: 20px;
}

/* Rakenne kolmen p-lauseen ympärille */


/* Erotinviiva */
hr {
  margin: 30px 0;
  border: none;
  border-top: 2px solid #eee;
}

/* Kyselyosion keskitys */
.survey-section {
  text-align: center;
  padding: 0;
  order: 2; /* Mobiilissa kolmantena (after image) */
}

@media (min-width: 1024px) {
  .survey-section {
    padding: 20px 0;
  }
}

/* Tyylitelty painike (kyselylinkki) */
.survey-link {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: #ffffff;
  /* Liukuvärjätty tausta */
  background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
  padding: 14px 24px;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.survey-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.survey-link:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  text-align: center;
  padding: 15px 15px 40px 15px;
  font-size: 0.9rem;
  color: var(--light-text);
}

/* Lomakeosio */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 25px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.forgot-password-link {
  font-size: 0.85rem;
  color: var(--main-color);
  text-decoration: none;
  margin-top: 4px;
  align-self: flex-end;
  transition: color 0.3s, text-decoration 0.3s;
}

.forgot-password-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.reset-password-section {
  margin-top: 30px;
  padding: 25px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.btn-cancel {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: transparent;
  color: var(--dark-text);
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.btn-cancel:hover {
  background-color: #f0f0f0;
  border-color: var(--light-text);
}

/* Make the phone field sit closer to the email field */
.form-group.tight-top {
  margin-top: -20px; /* cancel the parent form gap */
}

label {
  font-weight: 600;
  color: var(--dark-text);
  font-size: 0.95rem;
}

.field-explanation {
  font-size: 0.8rem;
  color: var(--light-text);
  font-style: italic;
  margin-top: -4px;
  margin-bottom: 8px;
  display: block;
  line-height: 1.3;
}

input, select, textarea {
  padding: 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: #fff;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.25);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
}

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

input::placeholder, textarea::placeholder {
  color: #999;
  opacity: 1;
}

.ilmo {
  padding: 14px;
  background-color: var(--main-color);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.ilmo:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.ilmo:active {
  transform: translateY(0);
}

/* Responsiivinen säätö */
@media (max-width: 600px) {
  .top-nav-container {
    padding: 10px 15px;
    flex-wrap: wrap;
  }
  
  .top-nav-links {
    order: 2;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
  
  .top-nav-auth {
    order: 1;
    gap: 8px;
  }
  
  .btn-login,
  .btn-register {
    font-size: 0.85rem;
    padding: 6px 14px;
  }
  
  .logo-img {
    max-width: 180px;
  }
  
  .hero-text {
    font-size: 1.05rem;
    width: 100%;
    padding: 0 5px;
  }

  .header-bar {
    gap: 10px;
  }

  .main-content-grid {
    gap: 30px;
  }
  
  .main-heading-wrapper {
    margin-bottom: 30px;
  }
  
  .content-heading {
    font-size: 1.6rem;
  }
  
  .content-subheading {
    font-size: 1.2rem;
  }
  
  .content-lead {
    font-size: 1rem;
  }
  
  .content-paragraph {
    font-size: 1rem;
  }

  .what-we-do {
    gap: 10px;
  }
  
  .container {
    padding: 30px 20px;
  }
  
  .testaus-box {
    padding: 20px;
    margin-top: 20px;
  }
  
  .btn-cta-main {
    font-size: 1.05rem;
    padding: 14px 32px;
  }
}

/* Kiitosviesti: animaatio + ulkoasu säilyttää alkuperäisen väriteeman */
.success-message {
  display: none;
  text-align: center;
  padding: 30px;
  background-color: var(--hero-bg); /* Sama turkoosi kuin yläosan hero-alueella */
  color: var(--dark-text);
  border-radius: 10px;
  animation: fadeIn 0.4s ease-out;
  margin-top: 20px;
  border: 2px solid var(--main-color);
  box-shadow: 0 4px 15px rgba(45, 125, 138, 0.2);
}

.success-message.visible {
  display: block;
}

.success-message h3 {
  color: var(--main-color) !important;
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
}

.success-message p {
  color: var(--dark-text) !important;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Keskitetään selkeyttävästi tietyt tekstialueet */
.intro-text,
.what-we-do,
form,
.privacy-link,
#success-message {
  text-align: center;
}

ul.what-we-do {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.what-we-do {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.what-we-do li {
  list-style-type: none !important;
  padding-left: 0;
  list-style-type: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: var(--dark-text);
  line-height: 1.5;
  text-align: left;
  max-width: 600px;
  justify-content: center; /* Tässä taika: keskittää emoji + tekstin yhdessä */
}

.what-we-do .emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 1.6em;
  text-align: center;
}

.what-we-do .text {
  flex: 1;
  text-align: left;
}




