/* ============================================================
   Finnish Sauna - Design System (tier-2)
   Visual reference: homeindepth.com/build-your-own-sauna
   Palette: very light blue-gray bg, dark slate text,
            blue accent, white article cards. Poppins font.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
  --bg:        #f7fafc;
  --white:     #ffffff;
  --ink:       #2d3748;
  --ink-head:  #1a202c;
  --muted:     #666666;
  --accent:    #008dff;
  --accent-dk: #0071d2;
  --border:    #e4eaf0;
  --card-bg:   #ffffff;
  --footer-bg: #1a202c;
  --footer-text: #e8edf2;
  --max-w:     730px;
  --sidebar-w: 300px;
  --gutter:    32px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-dk); }

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

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.3;
  color: var(--ink-head);
  font-weight: 700;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin: 40px 0 16px; }
h3 { font-size: 1.25rem; margin: 26px 0 10px; color: var(--ink-head); }

p { margin-bottom: 1.2em; color: var(--ink); }
ul, ol { padding-left: 1.5em; margin-bottom: 1.2em; }
li { margin-bottom: .45em; }

/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.header-inner {
  max-width: calc(var(--max-w) + var(--sidebar-w) + 80px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.logo a {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink-head);
  line-height: 1.2;
  letter-spacing: -.4px;
  text-decoration: none;
}
.logo a:hover { text-decoration: none; }
.logo .logo-main { color: var(--ink-head); }
.logo .logo-main span { color: var(--accent); }
.logo .tagline {
  display: block;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Navigation --- */
.main-nav { display: flex; align-items: center; gap: 18px; }

.main-nav > a {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-head);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
}
.main-nav > a:hover { color: var(--accent); text-decoration: none; }
.main-nav > a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
}

/* --- Dropdown Menu --- */
.dropdown { position: relative; }

.dropdown-toggle {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-head);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.dropdown-toggle:hover { color: var(--accent); }
.dropdown-toggle .arrow { font-size: .62rem; transition: transform 0.2s; }
.dropdown:hover .dropdown-toggle .arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 260px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: .9rem;
  color: var(--ink);
  transition: all 0.2s;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.dropdown-menu a:hover {
  background: var(--bg);
  color: var(--accent-dk);
  border-left-color: var(--accent);
  text-decoration: none;
}

/* --- Mobile Toggle --- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--ink-head);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ============================================================
   PAGE HERO
   ============================================================ */

.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 36px 24px 20px;
}
.hero-inner {
  max-width: calc(var(--max-w) + var(--sidebar-w) + 80px);
  margin: 0 auto;
}
.hero-category {
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-head);
  max-width: 820px;
}
.hero-description {
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 760px;
}
.page-hero .hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
  max-width: calc(var(--max-w) + var(--sidebar-w) + 80px);
  margin: 16px auto 0;
  padding: 0 40px;
  font-size: .8rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-dk); }
.breadcrumb span { margin: 0 6px; }

/* ============================================================
   MAIN LAYOUT (two columns)
   ============================================================ */

.layout {
  max-width: calc(var(--max-w) + var(--sidebar-w) + 80px);
  margin: 24px auto 80px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 44px;
  align-items: start;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.content-main { background: transparent; }

.content-main h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.content-main h2:first-child { margin-top: 0; }
.content-main strong { font-weight: 600; color: var(--ink-head); }

.content-main blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.6rem 0;
  padding: .8rem 1.4rem;
  background: var(--white);
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-size: 1rem;
}

/* --- Card (key takeaways / study style) --- */
.study-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 22px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.study-card h3 { margin: 0 0 8px; color: var(--ink-head); font-size: 1.15rem; }
.study-card h3 a { color: var(--ink-head); }
.study-card h3 a:hover { color: var(--accent); text-decoration: none; }
.study-card p { margin-bottom: 0; color: var(--ink); font-size: .95rem; }

/* --- Key takeaways box --- */
.takeaways {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 24px 0;
}
.takeaways h3 { margin: 0 0 10px; font-size: 1.1rem; }
.takeaways ul { margin-bottom: 0; }
.takeaways li { margin-bottom: .4em; }

/* --- Topic Grid (home cards) --- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0;
}
.topic-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: var(--ink-head);
  display: block;
}
.topic-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); text-decoration: none; }
.topic-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.topic-card-body { padding: 14px 16px; }
.topic-card-body h3 { font-size: 1.02rem; margin: 0 0 6px; color: var(--ink-head); }
.topic-card-body p { font-size: .85rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* --- Note box --- */
.note-box {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 5px 5px 0;
  padding: 14px 18px;
  margin: 22px 0;
  font-size: .94rem;
}

/* --- Featured image (mid-article) --- */
.featured-image {
  width: 100%;
  border-radius: 8px;
  margin: 20px 0;
  aspect-ratio: 16/9;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.image-caption {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  margin-top: -14px;
  margin-bottom: 18px;
}

/* --- CTA Box --- */
.cta-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  padding: 26px 30px;
  margin: 30px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.cta-box h3 { font-size: 1.3rem; margin: 0 0 10px; color: var(--ink-head); }
.cta-box p { font-size: .95rem; color: var(--muted); margin-bottom: 16px; }

.cta-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-btn:hover { background: var(--accent-dk); color: #fff; text-decoration: none; }

/* --- Video embed --- */
.video-embed { margin: 24px 0; }
.video-embed iframe { width: 100%; border: 0; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* --- Social embed (sidebar) --- */
.social-embed .embed-wrap { position: relative; margin-bottom: 8px; }
.social-embed iframe { width: 100%; border: 0; border-radius: 6px; }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin: 0 0 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.sidebar-card h4 {
  font-size: .98rem;
  font-weight: 600;
  color: var(--ink-head);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.category-list { list-style: none; padding-left: 0; }
.category-list li { margin-bottom: .5rem; }
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: .9rem;
}
.category-list a:hover { color: var(--accent); text-decoration: none; }
.category-list .count {
  font-size: .68rem;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

.sidebar-mini-links { display: flex; flex-direction: column; gap: 5px; }
.sidebar-mini-links a { font-size: .88rem; color: var(--ink); }
.sidebar-mini-links a:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 24px 26px;
}
.footer-grid {
  max-width: calc(var(--max-w) + var(--sidebar-w) + 80px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-size: 1rem;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: .02em;
}
.footer-col p { font-size: .9rem; color: var(--footer-text); line-height: 1.6; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding-left: 0; }
.footer-col ul li { margin-bottom: .45rem; }
.footer-col ul a {
  color: var(--footer-text);
  font-size: .9rem;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-col ul a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  max-width: calc(var(--max-w) + var(--sidebar-w) + 80px);
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
  text-align: center;
  font-size: .84rem;
  color: var(--footer-text);
}
.footer-bottom p { margin-bottom: 0; }
.footer-bottom .footer-location { margin-top: 6px; font-size: .78rem; opacity: .8; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-header { height: auto; }
  .header-inner { height: 60px; }
  .mobile-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav > a { width: 100%; }
  .dropdown { width: 100%; }
  .dropdown-toggle { width: 100%; justify-content: space-between; }
  .dropdown-menu { position: static; transform: none; width: 100%; min-width: 0; opacity: 1; visibility: hidden; }
  .dropdown.active .dropdown-menu { visibility: visible; }

  .layout { grid-template-columns: 1fr; gap: 28px; padding: 0 16px; }
  .breadcrumb { padding: 0 16px; }
  .topic-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
