/* ============================================================
   Helsingin Meriveneilijät ry — Main Stylesheet
   ============================================================ */

:root {
  --navy:       #1B3A5C;
  --navy-dark:  #122840;
  --blue:       #2875B8;
  --blue-light: #EEF6FB;
  --gold:       #C9921A;
  --gold-light: #F5E6C8;
  --white:      #FFFFFF;
  --gray-100:   #F7F9FB;
  --gray-200:   #E8EDF2;
  --gray-400:   #A0AEBA;
  --gray-700:   #4A5568;
  --text:       #1A2B3C;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(27,58,92,0.10);
  --shadow-md:  0 4px 24px rgba(27,58,92,0.14);
  --transition: 0.22s ease;
  --max-width:  1140px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }
ul { list-style: none; }

/* ── Container ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Top Bar ────────────────────────────────────────────── */
.top-bar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  padding: 7px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a { color: rgba(255,255,255,0.75); }
.top-bar a:hover { color: var(--white); }
.top-bar-links { display: flex; gap: 20px; align-items: center; }
.top-bar-links a { display: flex; align-items: center; gap: 5px; }

/* ── Header / Navbar ─────────────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  flex-shrink: 0;
}
.logo-mark {
  width: 34px;
  height: 38px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
}
.logo-text {
  display: grid;
  gap: 1px;
  line-height: 1;
}
.logo-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0;
}
.logo-subtitle {
  color: rgba(255,255,255,0.78);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.logo:hover { color: var(--gold-light); }

/* Main nav */
.main-nav { display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block;
  color: rgba(255,255,255,0.88);
  padding: 8px 13px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li > a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.nav-list > li > a.active {
  background: var(--blue);
}

/* Dropdown */
.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7rem;
  opacity: 0.7;
}
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 190px;
  overflow: hidden;
  z-index: 200;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--blue-light); color: var(--navy); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e4d7b 60%, #1a6fa8 100%);
  color: var(--white);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(40,117,184,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 680px; }
.hero-label {
  display: inline-block;
  background: rgba(201,146,26,0.25);
  color: var(--gold-light);
  border: 1px solid rgba(201,146,26,0.4);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1.12rem;
  color: rgba(255,255,255,0.82);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: #b5820f;
  border-color: #b5820f;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201,146,26,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover {
  background: #1e60a0;
  border-color: #1e60a0;
  color: var(--white);
  transform: translateY(-1px);
}
.btn-sm { padding: 9px 18px; font-size: 0.875rem; }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.stat-item { text-align: left; }
.stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Section headings ────────────────────────────────────── */
.section { padding: 64px 0; }
.section-alt { background: var(--gray-100); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.25;
}
.section-subtitle {
  color: var(--gray-700);
  font-size: 1.05rem;
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.65;
}
.section-header { margin-bottom: 40px; }
.section-header .section-subtitle { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── Cards ───────────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--white);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  background: var(--blue-light);
  padding: 28px 28px 20px;
  font-size: 2.2rem;
}
.card-body { padding: 20px 28px 28px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card p { color: var(--gray-700); font-size: 0.93rem; line-height: 1.65; flex: 1; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}
.card-link:hover { color: var(--navy); }
.fuel-mini-prices {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--gray-700);
}
.fuel-mini-prices span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--blue-light);
}
.fuel-mini-prices strong { color: var(--navy); }
.fuel-mini-prices small {
  color: var(--gray-500);
  font-size: 0.78rem;
}

/* ── Benefits list ─────────────────────────────────────── */
.benefits-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
}
.benefit-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.benefit-text h4 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.benefit-text p { font-size: 0.87rem; color: var(--gray-700); }

/* ── News cards ─────────────────────────────────────────── */
.news-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.news-card {
  background: var(--white);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.4);
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-card-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.news-meta { font-size: 0.78rem; color: var(--gray-400); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.news-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.35; }
.news-card p { font-size: 0.9rem; color: var(--gray-700); flex: 1; line-height: 1.6; }
.news-card-link { margin-top: 16px; font-weight: 600; font-size: 0.875rem; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; }

/* ── Info boxes ─────────────────────────────────────────── */
.info-box {
  background: var(--blue-light);
  border: 1px solid rgba(40,117,184,0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.info-box.warning {
  background: var(--gold-light);
  border-color: rgba(201,146,26,0.3);
}
.info-box h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.info-box p { font-size: 0.93rem; color: var(--gray-700); }

/* ── Price table ─────────────────────────────────────────── */
.price-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.price-table th {
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.price-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.92rem;
  color: var(--text);
}
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:nth-child(even) td { background: var(--gray-100); }
.price-table tr:hover td { background: var(--blue-light); }
.price-value { font-weight: 700; color: var(--navy); text-align: right; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.contact-card {
  background: var(--white);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.contact-card h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); margin-bottom: 6px; }
.contact-card p, .contact-card a { font-size: 0.95rem; color: var(--text); }

/* ── Calendar ────────────────────────────────────────────── */
.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  transition: transform var(--transition);
}
.event-item:hover { transform: translateX(4px); }
.event-date {
  text-align: center;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 58px;
  flex-shrink: 0;
}
.event-date .day { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.event-date .month { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; margin-top: 2px; }
.event-info h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.event-info p { font-size: 0.88rem; color: var(--gray-700); }
.event-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 50px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 6px;
}

/* ── Page hero (inner pages) ─────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e4d7b 100%);
  color: var(--white);
  padding: 52px 0 48px;
}
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; margin-top: 8px; }
.page-hero p { color: rgba(255,255,255,0.75); margin-top: 10px; font-size: 1.05rem; max-width: 520px; }

/* ── Prose content ────────────────────────────────────────── */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin: 32px 0 12px; }
.prose h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 24px 0 8px; }
.prose p { margin-bottom: 16px; color: var(--gray-700); line-height: 1.75; }
.prose ul { padding-left: 22px; margin-bottom: 16px; list-style: disc; }
.prose ul li { margin-bottom: 6px; color: var(--gray-700); font-size: 0.95rem; line-height: 1.65; }
.prose a { color: var(--blue); text-decoration: underline; }

/* ── Map embed ─────────────────────────────────────────── */
.map-container {
  border-radius: calc(var(--radius) * 1.5);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 360px;
  background: var(--gray-200);
}
.map-container iframe { width: 100%; height: 100%; border: none; }

/* ── Form ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(40,117,184,0.12);
}
.form-group textarea { min-height: 130px; resize: vertical; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
.footer-brand .logo { color: var(--white); margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; color: rgba(255,255,255,0.6); max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.65); font-size: 0.88rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.45); }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}
.social-links a:hover { background: var(--blue); color: var(--white); }

/* ── Dividers & helpers ──────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 32px 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.gap-top { padding-top: 40px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-gold { background: var(--gold-light); color: #8a6010; }
.badge-navy { background: var(--navy); color: var(--white); }

/* Fuel price highlight */
.fuel-price-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  border-radius: calc(var(--radius) * 2);
  padding: 36px 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.fuel-price-box .price-big { font-size: 3.5rem; font-weight: 900; color: var(--gold-light); line-height: 1; }
.fuel-price-box .price-unit { font-size: 1rem; color: rgba(255,255,255,0.7); margin-top: 6px; }
.fuel-price-box .price-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); margin-bottom: 12px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-list { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; width: 100%; background: var(--navy-dark); padding: 12px 0 20px; gap: 0; box-shadow: 0 8px 24px rgba(0,0,0,0.2); z-index: 99; }
  .nav-list.open { display: flex; }
  .nav-list > li > a { padding: 12px 24px; border-radius: 0; font-size: 1rem; }
  .nav-toggle { display: flex; }
  .dropdown { position: static; box-shadow: none; background: rgba(0,0,0,0.2); border-radius: 0; display: none; }
  .has-dropdown.open .dropdown { display: block; }
  .dropdown a { padding: 10px 36px; color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.1); }
  .dropdown a:hover { background: rgba(255,255,255,0.08); color: var(--white); }
  .site-header { position: relative; }
  .main-nav { position: static; }
}
@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .card-grid, .benefits-grid, .news-grid, .contact-grid { grid-template-columns: 1fr; }
  .price-table { font-size: 0.85rem; }
  .price-table th, .price-table td { padding: 10px 14px; }
  .event-item { flex-direction: column; gap: 12px; }
  .top-bar .top-bar-links { gap: 12px; }
}
