@import url('https://use.fontawesome.com/releases/v6.2.0/css/all.css');

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: rgb(250, 250, 250);
  font-family: var(--wp--preset--font-family--primary);
  margin: 0;
  padding: 0;
  color: black;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--wp--preset--font-family--header);
  text-transform: uppercase;
  margin-top: 50px;
}

.top_bar {
  height: 100px;
  background-color: #f7f7f7;
  display: flex;
  padding: 0 20px 0 20px;
  align-items: center;
}

.top_bar #left {
  width: 20%;
}

.top_bar #center {
  width: 60%;
}

.top_bar #right {
  width: 20%;
}

.top_bar #right .wp-block-button {
  float: right;
}

.top_img {
  width: 100%;
  height: 700px;
  object-position: center center;
  position: relative;
}

.top_img #bgimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top_img #overlay {
  width: 600px;
  height: auto;
  object-fit: cover;
  position: absolute;
  bottom: 0px;
  left: 0px;
  opacity: 0.75;
}

.top_img h1,
.top_img .top-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 200;
  color: rgb(0, 0, 0);
  letter-spacing: 10px;
  font-size: 50px;
  text-align: center;
}

@media (max-width: 600px) {
  .top_img h1,
  .top_img .top-title {
    font-size: 32px;
  }
}

.main {
  width: 90%;
  margin: auto;
  margin-top: 50px;
  max-width: 1500px;
  min-height: 300px;
}

.editor-styles-wrapper {
  padding: 70px;
}

.actions .wp-block-column {
  height: 250px;
  align-content: center;
  padding: 20px;
  word-break: keep-all;
  min-width: 300px;
}

.actions .wp-block-column h2 {
  font-size: 20px!important;
}

/* SISÄLTÖSIVUJEN TYYLIT */

.top_banner {
  width: 100%;
  height: 300px;
  position: relative;
}

.top_banner #overlay {
  opacity: 0.1;
  height: 200px;
  width: auto;
  position: absolute;
  bottom: 0px;
  left: 0px;
}

.top_banner #texts {
  margin-left: 10%;
  width: 60%;
  height: 100%;
  align-content: center;
  z-index: 100;
  position: relative;
  color: white!important;
}

.sitecontent {
  display: flex;
  width: 90%;
}

.sitecontent #nav {
  width: 20%;
  padding: 40px;
}

.sitecontent #nav #pagelist li {
  list-style: none;
  padding: 5px 0 5px 0;
  font-weight: 500;
  font-size: 15px;
}

.sitecontent #nav #pagelist li a {
  color: black;
  text-decoration: none;
}

.sitecontent #content {
  width: 80%;
  padding: 40px;
}

/* BLOKKITYYLIT */

.wp-block-cover__inner-container {
  padding: 40px !important;
}

.wp-site-blocks > * {
  margin-bottom: var(--wp--style--block-gap);
}
.wp-site-blocks > *:last-child {
  margin-bottom: 0;
}

.wp-site-blocks .wp-block-columns {
  gap: var(--wp--style--block-gap);
}

.wp-element-button {
  border-radius: 5px;
  background-color: var(--wp--preset--color--primary) !important;
  font-family: var(--wp--preset--font-family--header);
  text-transform: uppercase;
}

:where(.wp-block-columns) {
  margin-bottom: 0 !important;
}

.wp-site-blocks>.wp-block-cover {
  margin-block-start: 0;
}

.wp-block-details summary {
  background-color: var(--momentum-sitecolor, var(--wp--preset--color--primary));
  background-color: color-mix(in srgb, var(--momentum-sitecolor, var(--wp--preset--color--primary)) 80%, transparent);
  color: white;
  font-family: var(--wp--preset--font-family--header);
  text-transform: uppercase;
  padding: 15px;
  border-radius: 5px;
}

.wp-block-details > :not(summary) {
  background-color: #f7f7f7;
  margin-top: 0;
  padding: 10px 20px 10px 20px;
}

.wp-block-details ul {
  padding-left: 40px;
}

/* FOOTER */

footer {
  background-color: #f7f7f7;
  width: 100dvw;
  padding: 0 0 50px 0;
}

.footercontent {
  width: 90%;
  margin: auto;
  margin-top: 50px;
  max-width: 1500px;
  min-height: 300px;
  display: flex;
  padding: 80px 50px 50px 50px;
  gap: 30px;
}

.footercontent #left {
  width: 33.33%;
  text-wrap: nowrap;
}

.footercontent #center {
  width: 33.33%;
  text-wrap: nowrap;
}

.footercontent #right {
  width: 33.33%;
  text-wrap: nowrap;
}

.footernav, .footernav a {
    list-style: none!important;
    padding: 0;
    text-decoration: none!important;
    color: black!important;
}

.footercontent #right #social i {
  font-size: 40px;
  margin-right: 10px;
  color: black;
}

.footerlogos {
  display: flex;
  justify-content: center;
  gap: 50px;
}

@media only screen and (max-width: 1420px) {
  .actions {
    flex-direction: column;
    width: 70%;
    margin-left: 15%;
  }

  .actions .wp-block-column {
    min-width: 0!important;
  }
}

@media only screen and (max-width: 1140px) {
  .top_bar #right {
    display: none;
  }
  
  .top_bar #center {
    width: 60%;
  }

  .top_bar #left {
    width: 40%;
  }

  .sitecontent {
    flex-wrap: wrap;
    flex-direction: column;
    width: 100%;
  }

  .sitecontent #nav {
    width: 100%;
  }

  .sitecontent #content {
    width: 100%;
    padding-top: 0;
  }

  .top_banner #texts {
    width: 80%;
  }
}

@media only screen and (max-width: 1000px) {
  .footercontent {
    flex-direction: column;
      padding: 60px 30px 30px 30px;
  }
}

@media only screen and (max-width: 800px) {
  .top_img #overlay {
    width: 400px;
  }

  .top_banner #overlay {
    height: auto;
    width: 90%;
  }
}

@media only screen and (max-width: 600px) {
  .wp-block-media-text__content {
    margin-top: 50px;
  }
}

@media only screen and (max-width: 425px) {
  .top_img #overlay {
    width: 300px;
  }

  .footerlogos {
    flex-direction: column;
  }
}

/* AJANKOHTAISTA section styles */
.ajankohtaista.wrap {
  width: 90%;
  max-width: 1400px;
  margin: 60px auto;
}
.ajankohtaista .section-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
}
.articles-grid {
  display: grid;
  /* Let grid create as many columns as fit, but each column stays at least 260px */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
  justify-content: center; /* center the grid when columns don't fill the row */
  margin: 0 auto;
}
.article-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
  height: 100%; /* make grid items fill the row height */
  min-height: 0;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.12);
}
.article-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1 1 auto; /* ensure link stretches to fill card */
}
.article-image {
  flex: 0 0 auto; /* image keeps its fixed height */
}
.article-image img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.article-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0; /* allow contents to shrink inside flex container */
}
.article-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}
.article-excerpt {
  color: #333;
  font-size: 14px;
  line-height: 1.45;
  flex: 1 1 auto;
  min-height: 0; /* important for Firefox/Chrome to allow proper overflow */
  overflow: hidden;
}
.article-cta {
  margin-top: 8px;
}
.article-cta .wp-block-button__link {
  background-color: var(--wp--preset--color--primary) !important;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}

/* Responsive */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-image img {
    height: 200px;
  }
}

/*
Theme Name: Momentum 2026
Theme Slug: momentum
Author: Leevi Halminen
*/