/* ============================================================
   Edenred Yritysmaratonviesti – tapahtumavalintasivu
   Mobile-first. Palette: white top bar, blue + yellow.
   ============================================================ */

:root {
  --ymv-blue: #0a4ea2;
  --ymv-blue-dark: #073a7c;
  --ymv-blue-darker: #052c5e;
  --ymv-yellow: #fcb031;
  --ymv-yellow-soft: #ffd075;
  --ymv-dark: #1a1a1a;
  --ymv-text: #1f2937;
  --ymv-muted: #f3f4f6;
  --ymv-border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  /* Prevent horizontal scroll from any wide child */
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ymv-text);
  background-color: #fff;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Belt-and-braces: long Finnish compound words shouldn't blow the layout */
h1, h2, h3, h4, p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

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

/* ---------- Top bar ---------- */
.ymv-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--ymv-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 0.5rem 0;
}

.ymv-topbar .navbar-brand {
  color: var(--ymv-blue);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.ymv-topbar .navbar-toggler {
  border-color: var(--ymv-blue);
  padding: 0.3rem 0.55rem;
}

.ymv-topbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(10, 78, 162, 0.25);
}

.ymv-topbar .nav-link {
  color: var(--ymv-blue-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

.ymv-topbar .nav-link:hover,
.ymv-topbar .nav-link:focus {
  color: var(--ymv-yellow);
}

/* ---------- Hero ---------- */
.ymv-hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10, 78, 162, 0.88), rgba(7, 58, 124, 0.94)),
    url("img/section-bg.jpg") center/cover no-repeat;
  color: #fff;
  padding: 2rem 0 2.5rem;
  overflow: hidden;
}

.ymv-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--ymv-yellow);
}

.ymv-hero-logo {
  height: 120px;
  width: auto;
  max-width: 70%;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.25));
}

.ymv-eyebrow {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--ymv-yellow);
}

.ymv-hero-title {
  /* tight letter-spacing + clamp keeps "YRITYSLIIKUNTATAPAHTUMA" on screen */
  font-size: clamp(1.4rem, 5.5vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.ymv-hero .lead {
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  opacity: 0.95;
}

/* ---------- Main ---------- */
.ymv-main {
  background: #fff;
}

.section-heading h2 {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  color: var(--ymv-text);
  position: relative;
  display: inline-block;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--ymv-yellow);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.section-heading .ymv-eyebrow {
  color: var(--ymv-blue);
}

/* ---------- Event cards ---------- */
.ymv-event-card {
  background: var(--ymv-blue);
  color: #fff;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ymv-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(10, 78, 162, 0.28) !important;
}

.ymv-event-card .card-header {
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 0;
  color: #fff;
}

.ymv-event-card .event-name {
  letter-spacing: 0.08em;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  margin: 0;
}

.ymv-event-card .ymv-date {
  color: #fff;
  letter-spacing: 0;
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  margin: 0.25rem 0 0.25rem;
}

.ymv-event-card .ymv-place {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(0.8rem, 2.4vw, 0.95rem);
}

.ymv-event-card .btn-light {
  background: var(--ymv-yellow);
  border-color: var(--ymv-yellow);
  color: var(--ymv-blue-darker);
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  white-space: normal;
}

.ymv-event-card .btn-light:hover,
.ymv-event-card .btn-light:focus {
  background: #fff;
  border-color: #fff;
  color: var(--ymv-blue-dark);
}

/* ---------- Footer ---------- */
.ymv-footer {
  background: var(--ymv-blue-darker);
  border-top: 4px solid var(--ymv-yellow);
}

.ymv-footer a:hover {
  color: var(--ymv-yellow) !important;
}

/* ---------- Small-screen tightening ---------- */
@media (max-width: 575.98px) {
  .ymv-hero {
    padding: 1.5rem 0 2rem;
  }
  .ymv-hero-logo {
    height: 90px;
  }
  .ymv-hero-title br {
    display: none; /* let the title wrap naturally on phones */
  }
  #events {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  .section-heading {
    margin-bottom: 1.75rem !important;
  }
  .ymv-event-card .card-body {
    padding: 1.25rem 1rem 1.5rem;
  }
}

/* Tablet and up — keep things comfortable */
@media (min-width: 768px) {
  .ymv-hero {
    padding: 3rem 0 3.5rem;
  }
  .ymv-hero-logo {
    height: 160px;
  }
}

/* Desktop */
@media (min-width: 992px) {
  .ymv-hero-logo {
    height: 180px;
  }
}