/*
Theme Name: Pylväs.fi Teema
Theme URI: https://pylväs.fi/
Author: Pylväs.fi
Author URI: https://pylväs.fi/
Description: Pylväs.fi:n luoma Child-teema Hello Elementor -teemasta. Mukautettu vesiosuuskunnan verkkosivustoa varten.
Template: hello-elementor
Version: 1.0
*/

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
  }
  
  .site,
  .elementor-location-single,
  .elementor-location-archive,
  .elementor-section-wrap,
  .elementor {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
  }
  
  footer,
  #colophon,
  .site-footer {
    margin-top: auto;
  }
  /* Google Fonts -linkkaus (jos ei Elementor lataa niitä automaattisesti) */
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@500;700&display=swap');
  
  /* Otsikot: Poppins */
  h1, h2, h3, h4, h5, h6,
  .elementor-heading-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.8;
  }
  
  /* Leipäteksti: Inter */
  body, p, li, a,
  .elementor-widget-text-editor,
  .elementor-icon-box-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.2px;
       font-size: 16px;
  }
  
  /* Painikkeet, linkit ja korostukset: Poppins */
  button, .button, input[type="submit"], a.button,
  .elementor-button {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  /* Tasoitetaan kaikki infoboxit saman korkuisiksi */
  /* Vain etusivun infoboxit */
  .etusivu-infoboxit .elementskit-infobox {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
    /* Mobiilinäkymän järjestys*/
  @media (max-width: 768px) {
		.page-layout {
			flex-direction: column;
		}
		.page-content {
			order: 1;
		}
		.sidebar {
			order: 2;
		}
	}

.menu-item-has-children:last-child > .sub-menu {
    right:0;
    left:auto;
}

.elementor-widget-icon-box .elementor-icon-box-description {
    margin-top: -5px !important;
    padding: 0 !important;
}

  /* Laajennetaan body täyttämään korkeus */
  .etusivu-infoboxit .elementskit-infobox .box-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  /* Alatunniste alas */
  .etusivu-infoboxit .elementskit-infobox .box-footer {
    margin-top: auto;
  }
  ul.sub-menu.wpr-sub-menu {
    min-width: 250px;
  }
  .hfe-nav-menu.hfe-layout-vertical > nav > ul.hfe-nav-menu > li:not(:last-child) {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    padding-bottom: 10px;
  }.page-cover-image {
      position: relative;
      width: 100%;
      height: auto;
      overflow: hidden;
  }
  
  .page-cover-image {
      position: relative;
      width: 100%;
      height: 500px; /* kiinteä korkeus */
      overflow: hidden;
  }
  
  .page-cover-image .cover-image {
      width: 100%;
      height: 100%;            /* täyttää kontainerin */
      object-fit: cover;       /* peittää nätisti leikkaamalla reunat */
      display: block;
      position: relative;
      z-index: 0;
  }
  
  .page-cover-image .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 115, 170, 0.3));
      z-index: 1;
      pointer-events: none;
  }
  .sidebar,
  .page-content {
      margin-top: 40px;
  }
  .elementor-widget-wp-widget-recent-posts ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.elementor-widget-wp-widget-recent-posts ul > li:not(:last-child) {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    padding-bottom: 10px;
}
.elementor-widget-wp-widget-recent-posts a {
    color: var(--e-global-color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.elementor-widget-wp-widget-recent-posts a:hover {
    color: var(--e-global-color-primary);
    text-decoration: underline;
}