/*
Theme Name: LD2 classic
Theme URI: https://wordpress.org/themes/twentytwenty/
Author: Karl Wolf
Author URI: https://wordpress.org/
Description: Custom Theme for Landesberufsschule Dornbirn zwei
Version: 1.0
Text Domain: ld2
*/



body {
    font-family: "Work Sans", sans-serif;
    font-size: 18px;
    font-optical-sizing: auto;
    padding: 0;
    margin: 0;

    /* make sure footer is at the bottom */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


main {
  flex: 1;
  word-wrap: break-word;
  hyphens: auto;
}


.container {
    margin: 0 auto;
    max-width: 1024px;
}




/* MOBILE RESPONSIVE */


body {
    --main-acccent-color: black;
    --background-accent-color: white;
}

body.page-spedlog {
    --main-acccent-color: #8ac6ce;
    --background-accent-color: #8ac6ce;
}


body.page-buero {
    --main-acccent-color: #e78248;
    --background-accent-color: #e78248;
}

body.page-gesundheitsberufe {
    --main-acccent-color: #7ed27c;
    --background-accent-color: #7ed27c;
}

body.page-sparakademie {
    --main-acccent-color: #4c9170;
    --background-accent-color: #4c9170;
}

body.page-vertrieb-handel{
    --main-acccent-color: #e5cd75;
    --background-accent-color: #e5cd75;
}

body.page-technik-textil {
    --main-acccent-color: #4063e0;
    --background-accent-color: #4063e0;
}

h1, h2, h3 {
    color: var(--main-acccent-color);
}



/* COMPARTMENT */

.compartment {
    /* border-top: 1px solid black; */
    border-bottom: 1px solid black;
    padding: 36px;
    /* box-sizing: border-box; */
    /* margin-top: -1px; */
    background-size: cover;
}

.comp-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
}

.comp-image {
    max-width: 100%;
    margin: 10px;
    margin-left: 30px;
    background-size: cover;
}




/* FRONTPAGE MENU */

.frontpage-menu {
    text-align: center;
}

.frontpage-menu ul {
    margin: 0;
    padding: 0;
}

.frontpage-menu li {
    list-style: none;
    display: inline-block;
    padding: 1em;
}

.frontpage-menu a {
    /* font-size: 32px; */
    text-decoration: none;
    color: black;
}

.hero {
    /* text-align: right; */
    background-position: center center;
    height: 72vh;

    /* float: right; */
}

h1 {
    /* font-size: 80px; */
    font-size: 7vh;
    font-weight: 300;
    /* color: white; */
}

.hero strong {
    font-weight: 600;
}

/* .hero .wp-block-buttons {
    float: right;
} */

h2 {
    font-weight: 400;
    /* font-size: 42px; */
}


@media (max-width: 1200px) {

    body {
        font-size: 16px;
    }

    h1 {
       word-wrap: break-word;
       font-size: 7vh;
       /* hyphens: auto; */
    }

    .compartment {
        padding-left: 1em;
        padding-right: 1em;
    }

}


.departments {
    display: grid;
    /* grid-template-columns: repeat(6, 1fr);  */

    /* flex-wrap: wrap;
    align-content: space-evenly;
    justify-content: space-evenly; */
    /* grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; */
    /* grid-template-columns: repeat(auto-fit, minmax(170px, 2fr)); */
    padding-top: 2em;
    padding-bottom: 2em;

    /* prevent hidden background elements from destroing mobile layout */
    /* overflow: hidden; */

}

@media (max-width: 600px) { .departments {overflow: hidden;  }}


/* overflow fix for mobile safar
html, body {
    position:relative;
    overflow-x:hidden;
} */

@media (min-width: 1200px) { .departments { grid-template-columns: repeat(6, 1fr);  }}
@media (max-width: 1199px) { .departments { grid-template-columns: repeat(3, 1fr);  }}
@media (max-width: 600px) { .departments { grid-template-columns: repeat(2, 1fr);  }}


.department {
    display: inline-block;
/* 
    flex-basis: auto;
    flex-shrink: 0;
    flex-grow: 1;
    width: 120px; */

    background-position: center center;
    background-repeat: no-repeat;
    background-size: 80px;
    padding-top: 120px;
    /* width: 120px; */
    text-align: center;
    color: black;
    text-decoration: none;

    font-size: 18px;
    font-style: italic;

}

.department {
  position: relative;
  /* your normal styles */
}

.department::before {
  content: '';
  position: absolute;
  top: 66%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200%; /* or any size larger than the department */
  height: 150%;
  /* background-image: url(assets/buero_swirl.png); */
  background-size: fit;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  pointer-events: none; /* prevents interfering with hover */
  transition: opacity 0.2s ease;
  z-index: 2; /* keeps it behind the content */
}

.department-sparakademie::before { background-image: url(assets/sparakademie_swirl.png); }
.department-spedlog::before { background-image: url(assets/spedlog_swirl.png); }
.department-buero::before { background-image: url(assets/buero_swirl.png); }
.department-technik-textil::before { background-image: url(assets/technik-textil_swirl.png); }
.department-vertrieb-handel::before { background-image: url(assets/vertrieb-handel_swirl.png); }
.department-gesundheitsberufe::before { background-image: url(assets/gesundheitsberufe_swirl.png); }

.department:hover::before {
  opacity: 1;
}


.wp-element-button {
    background-color: black;
    font-weight: 500;
    font-style: italic;
}



/* SIDEBAR */




.logo {

    display: inline-block;

    width: 438px;
    height: 48px;
    
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    
    background-image: url(assets/lbsdo_wordmark_black.png);
    background-position: left left;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 620px) {
    .logo {
        width: 110px;
    }
}




.sidebar {

    z-index: 50;
    background-color: var(--background-accent-color);

    text-transform: uppercase;
    font-weight: 300;

    transition: all 0.1s;
}

.sidebar-toggle {
    background-color: var(--background-accent-color);
}

@media (min-width: 1200px) {

    .sidebar {

        height: 100%;
        position: fixed;
        /* background-color: red; */
        left: 88px;
        top: 0px;
        padding: 2em 0;
        overflow: hidden;

        border-right: 1px solid black;

        width: 0;
    }

    .sidebar-toggle {
        z-index: 100;
        position: fixed;
        width: 88px;
        height: 100%;
        left: 0px;
        top: 0px;
        /* padding: 10px; */
        margin: 0;

        /* background-color: yellow; */
    }

    .sidebar-toggle-inner {
        transform: rotate(-90deg);
        transform-origin: top left;
        margin-top: 99vh;
        /* padding: 10px; */
        height: 88px;
        width: 90vh;
        padding: 20px;
        /* background-color: red; */
        display: block;
        /* text-align: right; */
        position: relative;
    }

    .sidebar .logo {
        height: 48px;
        left: 0;
        position: absolute;
    }

    .sidebar-open {
        width: 400px !important;
    }        

}

@media (max-width: 1199px) {

    .sidebar {
        height: 0px !important;
        overflow: hidden;
        transition: height 0.2s ease-out;
        position: fixed;
        top: 92px;
        width: 100%;
        border-bottom: 1px solid black;
    }

    .sidebar-open {
        height: 100% !important;

    }

    body {
        padding-top: 92px;
    }

    .sidebar-toggle {

        z-index: 100;
        position: fixed;
        width: 100%;
        height: 92px;
        /* height: 100%; */
        left: 0px;
        top: 0px;
        /* padding: 10px; */
        margin: 0;

    }

    .admin-bar .sidebar {
        margin-top: var(--wp-admin--admin-bar--height) !important;
    }

    .admin-bar .sidebar-toggle {
        top: var(--wp-admin--admin-bar--height) !important;
    }

    .sidebar-toggle-inner {

        /* padding: 10px; */

        padding: 20px;
        /* background-color: red; */
        display: block;
        /* text-align: right; */
        position: relative;
    }

    .sidebar .logo {
        height: 48px;
        left: 0;
        position: absolute;
    }

}


.sidebar-toggle .sidebar-title {
    margin-right: 20vh;
}


.sidebar-toggle-inner a.sidebar-menu {
    font-size: 32px;
    /* background-image: url(assets/menu.png);
    background-repeat: no-repeat; */
    padding-left: 32px;
    cursor: pointer;
    float: right;
    background-position: center left;
    margin-top: 8px;
}

.sidebar-menu {
    display: flex;
}

.hamburger {
    padding: 8px;
}

.sidebar li {
    list-style: none;
    padding: 1em;
}

.sidebar a,
.sidebar a:hover,
.sidebar a:visited {
    text-decoration: none;
    color: black;

}




/* FOOTER */

footer {
    background-color: rgb(51, 51, 51);
    padding: 2em 1em;
    color: #eee;

}

footer a {
    color: white;
    font-size: 14px;
}

footer ul {
    padding: 0;
    margin: 0;
    list-style: none;

}

.footer-cols {
    display: grid;
    /* grid-template-columns: repeat(6, 1fr); */
   grid-auto-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.footer-col {
    padding: 0.25rem 0.5rem;
    grid-row: 1;
}



body .is-layout-flex, .wp-block-gallery {
	display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

figure.wp-block-gallery.has-nested-images {
	align-items: normal;
}

.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a, .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
	flex: 1 0 0%;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

/* @media (max-width: 900px) {
    .footer-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-cols {
        grid-template-columns: 1fr;
    }
} */

details {
    margin-bottom: 1em;
}



/* NAV Toggle https://stackoverflow.com/a/70704320/2907027 */

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 22px;
  width: 22px;
}

.hamburger .bar {
  height: 3px;
  width: 100%;
  background-color: black;
  transition: all 100ms ease-in-out;
}

.hamburger:hover {
  cursor: pointer;
}

.x:nth-of-type(1) {
  transition: all 100ms ease-in-out;
  transform: rotate(45deg);
  transform-origin: top left;
  width: 28px;
}

.x:nth-of-type(2) {
  transition: all 100ms ease-in-out;
  transform-origin: center;
  width: 0;
}

.x:nth-of-type(3) {
  transition: all 100ms ease-in-out;
  transform: rotate(-45deg);
  transform-origin: bottom left;
  width: 28px;
}