/*
Theme Name: GeneratePress Alpola edition (GeneratePress Child theme)
Description: GeneratePress child theme for Alpola.fi
Author: Tommi Luostarinen
Template: generatepress
Version: 1.0.0
*/

/* Sticky/hide header*/
:root{
  --sticky-bg: rgb(213, 233, 237,0.4);
  --sticky-transition: 220ms;
}

body {
  padding-top: 0 !important;
  background-color: #fff8e6;
}


body, button, input, select, textarea { 
  font-family: "Bricolage Grotesque", sans-serif;
}

/* Kun admin bar on näkyvissä */
body.admin-bar #masthead.site-header.is-sticky-header {
  top: 32px;
}

/* Mobiili (admin bar on korkeampi) */
@media (max-width: 782px) {
  body.admin-bar #masthead.site-header.is-sticky-header {
    top: 46px;
  }
}

/* käyttää tyypillisesti #masthead.site-header */
#masthead.site-header.is-sticky-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  backdrop-filter: blur(2px);

  /* Alussa läpinäkyvä */
  background: transparent;

  /* Feidaus + liike */
  transition:
    background-color var(--sticky-transition) ease,
    transform 260ms ease,
    box-shadow var(--sticky-transition) ease;

  will-change: transform, background-color;
}

/* Nollaa oma header-tausta */
#masthead.site-header.is-sticky-header .main-header-bar {
  background-color: transparent;
  transition: background-color 220ms ease, box-shadow 220ms ease;
  border-bottom: none;
}

/* Kun ei olla ylhäällä */
#masthead.site-header.is-sticky-header.has-bg .main-header-bar {
  background-color: rgba(255,255,255,0.7);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* Kun ei olla ihan ylhäällä -> tausta päälle (feidaa transitionin avulla) */
#masthead.site-header.is-sticky-header.has-bg{
  background-color: var(--sticky-bg);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* Piilotus alas scrollatessa */
#masthead.site-header.is-sticky-header.is-hidden{
  transform: translateY(-110%);
}

/* Näkyvissä (varmistus) */
#masthead.site-header.is-sticky-header.is-visible{
  transform: translateY(0);
}

.mobile-menu-open #masthead.site-header.has-inline-mobile-toggle {
    background-color: rgb(255 255 255 / 90%);
    height: 100vh;
}

h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
}

h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
}

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0px 0px 10vh 0px ;
  align-items: center;
  background-position: top center;
  height: 100vh;
  color: #403d42;

  -webkit-mask-image: url('./img/hero-mask.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-position: bottom center;
  -webkit-mask-mode: alpha;

  mask-image: url('./img/hero-mask.svg');
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  mask-position: bottom center;
  mask-mode: alpha;
}

.masked-section {
  position: relative;
  margin-top: -300px;
  padding-top: 300px;
  padding-bottom: 130px;
  -webkit-mask-image: url('./img/hero-mask.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-position: bottom center;
  -webkit-mask-mode: alpha;

  mask-image: url('./img/hero-mask.svg');
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  mask-position: bottom center;
  mask-mode: alpha;
}

.z-index-10 {
  z-index: 10;
}
.z-index-9 {
  z-index: 9;
}
.z-index-8 {
  z-index: 8;
}
.z-index-7 {
  z-index: 7;
}
.z-index-6 {
  z-index: 6;
}
.z-index-5 {
  z-index: 5;
}
.z-index-4 {
  z-index: 4;
}
.z-index-3 {
  z-index: 3;
}
.z-index-2 {
  z-index: 2;
}
.z-index-1 {
  z-index: 1;
}


.hero-section h1, .hero-section h2 {
  /*text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3);*/
  /*text-shadow: 2px 2px 0px rgba(155, 114, 159, 0.5);*/
  font-weight: 600;
  line-height: 1;
}

.hero-section p {
    font-size: 22px;
}

.main-nav .current-menu-item a {
  font-weight: 800;
  text-decoration: underline;
}

.two-columns {
  gap: 50px;
}

.two-columns.align-top {
  align-items: flex-start;
}


.two-columns.title-left > div:first-child {
  flex: 2;
}

.two-columns.title-left > div:last-child {
  flex: 3;
}

.two-columns.cta-section > div:first-child {
  flex: 3;
}

.cta-section h3 {
    font-size: 24px;
}

.two-columns.cta-section > div:last-child {
  flex: 1;
  text-align: right;
}

.two-columns .wp-block-image img {
    max-height: 350px;
    width: auto;
    align-self: center;
}

.website-services-list {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  width: 100%;
  list-style: none;
  margin: 50px 0px 30px 0px;
}

.website-services-list li {
  margin-bottom: 20px;
  padding-left: 1em;
}

.website-services-list li::before {
    display: inline-block;
    content: "—";
    width: 1em;
    margin-left: -1em;
}

@media (max-width: 782px) { 
  .two-columns {
    flex-direction: column;
    gap: 30px;
  }

  . > div {
    text-align: center;
  }

  .contact-section .two-columns > div:first-child {
        display: none;
    }

  .hero-section h1 {
    font-size: 35px !important;
  }

  .hero-section p {
    font-size: 18px !important;
  }

  .hero-section h2 {
    font-size: 16px !important;
  }

}

.logo-inverse {
  filter: invert(1);
}

.two-columns > div {
  flex: 1;
  gap: 30px;
}

.contact-section img {
    max-width: 80%;
}

.contact-section .two-columns > div:first-child {
  text-align: center;
}

.wpcf7 form br{
  display:none !important;
}

.wpcf7 span.radio-title {
    margin: 30px 2px 10px;
    display: block;
}

.wpcf7-not-valid-tip {
   color: #bb5d6c;
}

.wpcf7 form label{
  display:block;
  position:relative;
  margin:0 0 10px;
  font-size:16px;
}

.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form input[type="url"]{
  width:100%;
  border:0;
  border-bottom:1px solid currentColor;
  background:transparent;
  padding:20px 2px 0px;
  font:inherit;
  outline:none;
  box-sizing:border-box;
}

.wpcf7 form textarea{
  width:100%;
  border:1px solid currentColor;
  background:transparent;
  padding:22px 10px 10px;
  font:inherit;
  outline:none;
  box-sizing:border-box;
  min-height:120px;
  height: 120px;
  resize:vertical;
}

.wpcf7 form .flabel{
  position:absolute;
  left:2px;
  top:20px;
  opacity:.65;
  pointer-events:none;
  transform-origin:left top;
  transition:transform .18s ease, top .18s ease, opacity .18s ease;
}
.wpcf7 form label:has(textarea) {
    margin: 30px 0px 20px 0px;
}

.wpcf7 form label:has(textarea) .flabel{
  left:10px;
  top:10px;
}

.wpcf7 form label:focus-within .flabel{
  top:4px;
  transform:scale(.75);
  opacity:1;
}

.wpcf7 form label:has(input:not(:placeholder-shown)) .flabel,
.wpcf7 form label:has(textarea:not(:placeholder-shown)) .flabel{
  top:4px;
  transform:scale(.75);
  opacity:1;
}

.wpcf7 form label:has(input:-webkit-autofill) .flabel{
  top:4px;
  transform:scale(.75);
  opacity:1;
}

.wpcf7 form .wpcf7-radio .wpcf7-list-item{
  display:block;
  margin:8px 0;
}

.wpcf7 form input[type="submit"]{
  border-radius: 5px;
  padding:10px 20px;
  cursor:pointer;
}

.wp-block-button__link {
  border-radius: 5px;
}

.footer-widgets {
    position: relative;
    margin-top: -300px;
    padding-top: 300px;
}