/*
Theme Name: Ski-surf
Theme URI: 
Author: Samantha Brouwer
Author URI: https://samantha-online.nl
Description: Child Theme of Minimalistix
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 5.7
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: minimalistix
Text Domain: ski-surf
Tags: 
*/

/* Language specific styling */
html[lang="nl-NL"] {
  bdo[lang="en"], bdo[lang="de"], bdo[lang="pt"] {
    display: none;
    + br {
      display: none;
    }
  }
}

html[lang="en-US"] {
  bdo[lang="nl"], bdo[lang="de"], bdo[lang="pt"] {
    display: none;
    + br {
      display: none;
    }
  }
}

html[lang="de-DE"] {
  bdo[lang="en"], bdo[lang="nl"], bdo[lang="pt"] {
    display: none;
    + br {
      display: none;
    }
  }
}

html[lang="pt-PT"] {
  bdo[lang="en"], bdo[lang="de"], bdo[lang="nl"] {
    display: none;
    + br {
      display: none;
    }
  }
}


/* Default body background - Surf */
body { 
  background-image: url('https://www.ski-surf.eu/wp-content/uploads/2024/05/background-image.jpg'); 
  background-size: cover; 
  background-repeat: no-repeat; 
  background-attachment: fixed;
}

/* Body background - Ski */
body {
  &.page-template-wp-custom-template-pagina-s-winter-duits,
  &.page-template-wp-custom-template-pagina-s-winter-english,
  &.page-template-wp-custom-template-pagina-s-winter-nederlands,
  &.page-template-wp-custom-template-pagina-s-winter-portugees {
    background-image: url('https://www.ski-surf.eu/wp-content/uploads/2024/06/background-ski.jpg'); 
  }
}

/* Homepage slider */
.homepage-slider-columns {
  background: #fff;
}

.homepage-slider-columns > .wp-block-column {
  position: relative;
}

.homepage-slider-columns > .wp-block-column:first-child {
  margin-right: -24rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 25rem) 100%, 0% 100%);
}

.homepage-slider-columns > .wp-block-column:last-child {
  clip-path: polygon(25rem 0, 100% 0, 100% 100%, 0% 100%);
}

.homepage-slider-columns .slider-overlay {
  left: 6vw;
  max-width: calc(100% - 12vw);
  position: absolute;
  top: 6vw;
  width: 350px;
  z-index: 100;
}

.homepage-slider-columns .slider-overlay.slider-overlay-winter {
  bottom: 6vw;
  left: revert;
  right: 6vw;
  top: revert;
}

@media screen and (min-width: 781px) {
  .homepage-slider-columns .metaslider .slides img {
    max-height: 100vh !important;
    object-fit: cover;
  }
}

@media screen and (max-width: 780px) {
  .homepage-slider-columns .metaslider .flexslider .slides > li {
    max-height: 56vh;
  }

  .homepage-slider-columns > .wp-block-column:first-child {
    margin-right: revert;
    margin-bottom: -13rem;
    clip-path: polygon(0 0, 100% 0, 100% 60%, 0% 100%);
  }

  .homepage-slider-columns > .wp-block-column:last-child {
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0% 100%);
  }

  .homepage-slider-columns .slider-overlay {
    left: 3vw;
    max-width: calc(100% - 6vw);
    top: 3vw;
    width: auto;
  }
  
  .homepage-slider-columns .slider-overlay.slider-overlay-winter {
    bottom: 3vw;
    right: 3vw;
  }
}

@media screen and (max-width: 514px) {
  .homepage-slider-columns > .wp-block-column:first-child {
    margin-bottom: -41%;
  }

  .homepage-slider-columns .slider-overlay {
    font-size: 80%;
  }

  .homepage-slider-columns .slider-overlay > * {
    margin-block-start: 0.5rem;
  }

  /* Removing intro text on mobile */
  .homepage-slider-columns .slider-overlay > p {
    display: none;
  }

  .home .wp-container-core-columns-is-layout-1 {
    gap: 1rem;
  }
}

/* Weird body padding */
.wp-site-blocks {
  --wp--style--root--padding-bottom: 0;
  --wp--style--root--padding-top: 0;
}

/* Langugage menu */
.polylang_langswitcher {
  display: flex;
  flex-direction: column;
  list-style: none;
  min-width: 155px;
  padding-left: 0;
  position: absolute;
  transform: translateY(-1.1rem);
}

.polylang_langswitcher .lang-item {
  background: white;
  padding: 0.25rem 1rem 0.25rem 1.75rem;
  order: 2;
  position: relative;
}

.polylang_langswitcher .lang-item.current-lang {
  order: 1;
}

.polylang_langswitcher .lang-item.current-lang::after {
  content: '▼';
  padding-left: 15px;
  font-size: 10px;
  display: inline-block;
  vertical-align: middle;
}

.polylang_langswitcher .lang-item:not(.current-lang) {
  display: none;
  border-top: 1px solid gray;
}

.polylang_langswitcher .lang-item::before {
  width: 16px;
  height: 11px;
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 50%;
  margin-top: -5px;
}

.polylang_langswitcher .lang-item.lang-item-5::before {
  background: url('https://www.ski-surf.eu/wp-content/plugins/polylang/flags/de.png') no-repeat;
}
.polylang_langswitcher .lang-item.lang-item-8::before {
  background: url('https://www.ski-surf.eu/wp-content/plugins/polylang/flags/us.png') no-repeat;
}
.polylang_langswitcher .lang-item.lang-item-13::before {
  background: url('https://www.ski-surf.eu/wp-content/plugins/polylang/flags/nl.png') no-repeat;
}
.polylang_langswitcher .lang-item.lang-item-18::before {
  background: url('https://www.ski-surf.eu/wp-content/plugins/polylang/flags/pt.png') no-repeat;
}

.polylang_langswitcher:hover .lang-item:not(.current-lang) {
  display: block;
}



/* Forms */
.wpcf7-form-control {
  border: 1px solid var(--wp--preset--color--primary);
  padding: 0.5rem;
}

.wpcf7-submit {
  background: var(--wp--preset--color--secondary);
  border-radius: 1.25rem;
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  transition: 0.2s ease-in-out;
}

.wpcf7-submit:hover {
  background: var(--wp--preset--color--tertiary);
  color: #fff;
}
