/* ============================================================
   styles.css – kiintea-sahkosopimus.fi
   Dark Electric Premium -teema
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --bg:           #090d1a;
  --bg-2:         #0e1422;
  --surface:      #121929;
  --surface-2:    #1a2235;
  --border:       #1e2d47;
  --border-light: #263450;

  --accent:       #00d4ff;
  --accent-dim:   rgba(0, 212, 255, 0.12);
  --accent-glow:  0 0 24px rgba(0, 212, 255, 0.25);
  --purple:       #7c3aed;
  --purple-dim:   rgba(124, 58, 237, 0.15);

  --green:        #10b981;
  --green-dim:    rgba(16, 185, 129, 0.12);
  --gold:         #f59e0b;
  --gold-dim:     rgba(245, 158, 11, 0.12);
  --red:          #ef4444;

  --text:         #e2e8f0;
  --text-muted:   #64748b;
  --text-subtle:  #94a3b8;

  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    18px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --transition:   0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:        68px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient glow background pattern */
body::before {
  content: '';
  position: fixed;
  top: -30vh;
  left: -20vw;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(0,212,255,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -20vh;
  right: -20vw;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.5em; }
h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
h4 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
     text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

p { color: var(--text-subtle); margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

strong { color: var(--text); font-weight: 600; }

ul, ol { padding-left: 1.4em; color: var(--text-subtle); }
li { margin-bottom: 0.35em; }

/* ── Utility ───────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }

/* ── Navbar ────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(9, 13, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .logo-bolt {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text-subtle);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-cta {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-sm) !important;
}
.nav-cta:hover { background: #fff !important; color: #000 !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* ── Hero ──────────────────────────────────────────────────── */
#hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-subtle);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 36px;
}

.hero-stat {
  text-align: left;
}

.hero-stat .val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1;
  display: block;
}

.hero-stat .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  display: block;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Best Deal Card (hero oikea puoli) ─────────────────────── */
#best-deal-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

#best-deal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

.best-deal-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.best-deal-label .icon {
  font-size: 1rem;
}

#best-deal-card .bd-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

#best-deal-card .bd-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 20px;
}

.bd-price-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.bd-kwh {
  line-height: 1;
}

.bd-kwh .num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
}

.bd-kwh .unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.bd-kk {
  font-size: 0.85rem;
  color: var(--text-subtle);
  padding-bottom: 4px;
}

.bd-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 20px rgba(0,212,255,0.35);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-subtle);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface);
}

.btn-full { width: 100%; justify-content: center; }

.btn-pulse {
  animation: btn-pulse 2.5s ease-in-out infinite;
}
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0,212,255,0); }
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-kesto {
  background: var(--surface-2);
  color: var(--text-subtle);
  border: 1px solid var(--border);
}

.badge-tarjous {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(245,158,11,0.3);
}

.badge-vihrea {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.3);
}

.badge-ad {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.65rem;
}

/* ── Laskuri ───────────────────────────────────────────────── */
#laskuri-section {
  margin: 60px 0;
}

.laskuri-inner {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
}

.laskuri-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--accent));
}

.laskuri-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.laskuri-left h2 { margin-bottom: 8px; }

.laskuri-input-wrap {
  margin-top: 24px;
}

.laskuri-input-wrap label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit input[type=range] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  outline: none;
  cursor: pointer;
}

.input-with-unit input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 10px rgba(0,212,255,0.5);
  transition: transform var(--transition);
}

.input-with-unit input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.range-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent);
  text-align: center;
  margin-top: 16px;
}

.range-value span { font-size: 1rem; color: var(--text-muted); }

.laskuri-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.laskuri-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color var(--transition);
}

.laskuri-result-item:first-child {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.lri-name { font-size: 0.82rem; color: var(--text-subtle); }
.lri-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}
.lri-price.best { color: var(--accent); }

/* ── Filtterit ─────────────────────────────────────────────── */
#filter-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: rgba(9,13,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  margin-bottom: 32px;
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-subtle);
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.vihrea-btn.active {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
}

.filter-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 6px 14px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.sort-select:hover,
.sort-select:focus { border-color: var(--accent); }

.filter-count {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Sopimuskortit ─────────────────────────────────────────── */
#sopimukset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.sopimus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateY(16px);
  animation: card-in 0.4s ease forwards;
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.sopimus-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), var(--accent-glow);
  transform: translateY(-3px);
}

/* Top-viiva per tyyppi */
.sopimus-card.card-vihrea {
  border-top: 2px solid var(--green);
}
.sopimus-card.card-tarjous {
  border-top: 2px solid var(--gold);
}
.sopimus-card:not(.card-vihrea):not(.card-tarjous) {
  border-top: 2px solid transparent;
}

/* Yrityslogo + nimi */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-logo {
  height: 28px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.75;
}

/* Sopimuksen nimi + kesto-badge */
.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.card-nimi {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.2;
}

/* Päähinnat */
.card-price-block {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.price-kwh {
  line-height: 1;
}

.price-kwh .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
}

.price-kwh .unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.price-kk {
  text-align: right;
}

.price-kk .num {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-subtle);
  line-height: 1;
}

.price-kk .unit {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: block;
}

/* Arvoindeksi (pisteet) */
.card-score {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.score-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.score-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple), var(--accent));
  transition: width 0.6s ease;
}

.score-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 32px;
  text-align: right;
}

/* Tagit (vihreä, tarjous, huomio) */
.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  min-height: 24px;
}

/* Vuosikustannus (laskurin tulos) */
.card-vuosi {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  min-height: 18px;
}

.card-vuosi strong {
  color: var(--text-subtle);
  font-weight: 500;
}

/* Huomio-teksti (esim. kulutusvaikutus) */
.card-huomio {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
}

/* AD-merkki + CTA */
.card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.card-ad-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ── Sisältösektiot ─────────────────────────────────────────── */
.content-section {
  padding: 60px 0;
}

.content-section + .content-section {
  border-top: 1px solid var(--border);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* ── Info-kortit (tyyppi-esittelyt) ────────────────────────── */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}

.info-card:hover {
  border-color: var(--border-light);
}

.info-card .ic-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
}

.info-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

/* ── Alasivulinkit ─────────────────────────────────────────── */
.sub-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.sub-link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text) !important;
  transition: all var(--transition);
  gap: 12px;
}

.sub-link-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent) !important;
  transform: translateX(4px);
}

.sub-link-card .slc-kesto {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
}

.sub-link-card .slc-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.sub-link-card .arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform var(--transition);
}

.sub-link-card:hover .arrow { transform: translateX(4px); }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-list { list-style: none; padding: 0; margin: 0; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  padding: 18px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color var(--transition);
}

.faq-q:hover { color: var(--accent); }

.faq-q .chevron {
  font-size: 0.75rem;
  transition: transform 0.25s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.open .faq-q .chevron { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 0.9rem;
  color: var(--text-subtle);
  padding-bottom: 0;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 18px;
}

/* ── Vinkkaa kaverille ─────────────────────────────────────── */
#share-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin: 60px 0;
  text-align: center;
}

#share-section h2 { margin-bottom: 8px; }
#share-section p  { margin-bottom: 24px; }

.share-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
}

.share-btn-fb  { background: #1877f2; color: #fff; }
.share-btn-fb:hover { background: #0d6de0; color: #fff; }
.share-btn-wa  { background: #25d366; color: #000; }
.share-btn-wa:hover { background: #1db954; color: #000; }
.share-btn-x   { background: #000; color: #fff; border: 1px solid #333; }
.share-btn-x:hover { background: #111; color: #fff; }
.share-btn-copy { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-light); }
.share-btn-copy:hover { border-color: var(--accent); color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul a {
  font-size: 0.85rem;
  color: var(--text-subtle);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-affiliate {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
  text-align: right;
}

/* ── Evästebanneri ─────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: slide-up 0.4s ease;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

#cookie-banner p { font-size: 0.82rem; margin-bottom: 14px; }

.cookie-btns {
  display: flex;
  gap: 10px;
}

/* ── Animaatiot ────────────────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobiili ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #sopimukset-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  #best-deal-card { max-width: 480px; }
  .laskuri-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .sub-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  #sopimukset-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .three-col { grid-template-columns: 1fr; }
  .sub-links-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-links { display: none; flex-direction: column; position: absolute;
               top: var(--nav-h); left: 0; right: 0; background: var(--bg-2);
               border-bottom: 1px solid var(--border); padding: 12px 20px 20px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .laskuri-inner { padding: 24px 20px; }
  #share-section { padding: 28px 20px; }

  .hero-stats { gap: 20px; }
  .filter-inner { gap: 8px; }
  .filter-count { display: none; }

  #cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}

@media (max-width: 480px) {
  .sub-links-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .share-btns { gap: 8px; }
  .bd-kwh .num { font-size: 2.4rem; }
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 16px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border-light); }
.breadcrumb .current { color: var(--text-subtle); }

/* ── Tyhjä tila (ei tuloksia) ──────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; display: block; margin-bottom: 12px; }
