/**********************************************************
    All pages - body, header, main and nav section styling
**********************************************************/
* {
    font-family: sans-serif;
}

body {
    margin: 0em;
    overflow-x: hidden;
}

a {
    text-decoration: none; /* get rid off the link decoration (underlines, etc.) */
}

header {
    display: grid;
    grid-template-columns: auto 5em;
    /* border: 1px solid blue; */
}

header a.logo-td {
    /* border: 1px solid maroon; */
    margin-left: calc((100% / 2) - 3.5em);
    margin-right: auto;
}

header a.logo-td img {
    width: 12em;
    padding-top: 0.2em;
    /* padding-left: 0.5em; */
}

header a.logo-ecovadis {
    display: none;
    margin-right: 0.1em;
    /* border: 1px solid red; */
}

header a.logo-ecovadis img {
    width: 5em;
    height: 5em;
    margin-top: 0.2em;
}

header svg {
    width: 2rem;
    cursor: pointer;
    margin: auto;
}

header svg path {
    fill: rgb(124, 123, 114);
}

header svg.close {
    display: none;
}

main div.wrapper {
    position: relative;
}

.side-switcher {
    position: absolute;
    width: 2.5em;
    height: 5em;
    background-color: rgba(3, 31, 71, 0.8);
    color: #fff;
    /* top: 17.25em; */
    top: 0;
    bottom: 0;
    /* margin: auto; */
    line-height: 5em;
    text-align: center;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
}

nav label.side-switcher div.arrow {
    font-size: 1.5em;
    color: white;
    transform: rotate(180deg);
}

/* nav.hover-class label.side-switcher {
    border-radius: 10px 0 0 10px;
    left: -2.5em;
} */

nav.hover-class label.side-switcher div.arrow {
    transform: rotate(0deg);
}

nav {
    background-color: rgba(55, 111, 190, 0.8);
    position: absolute;
    right: 0;
    height: 100%;
    width: 5em;
    display: none;
    transition: width 0.5s;
    z-index: 2;
}

nav ul.main-menu-items {
    list-style-type: none; /* to get rid off the bullets */
    padding: 0;
    margin-top: 8em;
}

nav ul a {
    display: block; /* padding wan't work without block */ 
    width: 100%;
    border-top: 1px solid rgb(32, 74, 133);
    height: 3em;
    transition: background-color 0.5s;
}

nav svg {
    width: 1.5rem;
    margin: 0.75em 0 0.75em 1.5em;
}

nav svg path {
    fill: white;
}

nav span {
    opacity: 0;
    color: white;
    font-size: 1rem;
    display: none;
}

nav.hover-class {
    width: 12em;
}

nav.hover-class svg {
    margin-left: 0.3em;
}

nav.hover-class span {
    position: absolute;
    opacity: 1;
    margin: 1.1em 0 1em 0.7em;
    display: inline;
}

nav ul a:hover {
    background-color: rgb(124, 123, 114);
}

nav ul.main-menu-items div.nav-placeholder {
    height: 5em;
    border-top: 1px solid rgb(32, 74, 133);
}

nav ul.sub-menu-items {
    list-style-type: none; /* to get rid off the bullets */
    padding: 0;
    display: none;
    transition: display 0.5s;
}
nav ul.sub-menu-items.collapsed {
    display: block;
}
nav ul label.sub-menu-arrow {
    position: absolute;
    box-sizing: border-box;
    height: 2.3em;
    width: 2.3em;
    top: 18.7em;
    right: 0.2em;
    padding-left: 0.9em;
    padding-top: 0.6em;
    color: white;
    background-color: rgba(3, 31, 71, 0.8);
    font-weight: bold;
    font-size: 1.2em;
    border-radius: 50%;
    transform: rotate(90deg);
    display: none;
    cursor: pointer;
    /* border: 1px solid maroon; */
}
nav.hover-class ul label.sub-menu-arrow {
    display: block;
}

nav ul label.sub-menu-arrow.hover-class {
    padding-left: 0.9em;
    padding-top: 0.6em;
    transform: rotate(270deg);
}

main section.hero .hero-img {
    background-color: #5d55d5;
    width: 100%;
    height: 30vh; /* 'vh' means viewport height */
    z-index: -1; /* level on screen --> behind other elements; can only be used with position: absolute or fixed */
}

main section.hero .hero-card {
    color: white;
    background-color: rgba(124, 123, 114, 0.5);
    animation: slideInSlideOut 10s ease-in-out forwards;
    opacity: 1;
    height: 10em;
    width: 20em;
    position: absolute;
    top: 0;
    margin: calc((30vh - 10em) / 2) calc((100% - 20em - 3em) / 2);
    text-align: center;
}

main section.hero .hero-card svg {
    width: 2em;
    animation: moveArrow 5s ease-in-out 1.5s forwards;
}

main section.services {
    margin: 1em;
    width: calc(100% - 2em); 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
    gap: 2.5em;
}

main section.services .service-card {
    background-color: #fff;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
}

main section.services .service-image-section {
    height: 15.5em;
    background-color: #5d55d5;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

main section.services .service-card .service-text-section {
    text-align: center;
    padding: 0.5em 0.6em;
}

main section.services .service-card .service-text-section h2 {
    color: #11387f;
    margin: 0.4em 0;
    font-size: 1.3em;
}

main section.services .service-card .service-text-section p {
    margin: 0.5em 0;
    text-align: left;
}

main section.services .service-card .service-link:link {
    color: black;
    background-color: transparent;
}
    
main section.services .service-card .service-link:visited {
    color: black;
    background-color: transparent;
}
    
main section.services .service-card .service-link:hover {
    color: black;
    background-color: transparent;
}

/**********************************************************
    All pages - Footer styling
 *********************************************************/
footer {
    background-color: rgb(55, 111, 190); /* light blue=rgb(55, 111, 190), dark-blue=rgb(67, 84, 172) */
    color: white;
    display: grid;
    grid-template-columns: 3fr 1fr;
    height: 10em;
}

footer div.grid {
    display: grid;
}
footer div.grid div {
    display: grid;
    align-content: center;
}
footer div.grid span {
    display: block;
}

footer div.grid div.copyright-container {
    font-weight: bold;
}

footer div.grid div.copyright-container span {
    margin: 5px 0 0 1em;
}

footer div.grid div.link-container span {
    margin: 5px 0 5px 1em;
}

footer div.grid div.link-container a {
    color: black;
    background-color: yellow;
}

footer div.grid div.credit-container {
    padding-left: 1em;
    font-size: 0.8rem;
}
footer div.grid div.credit-container a {
    margin-right: 0.3em;
    color: white;
} 

footer div.logo-container {
    height: 5em;
    width: 5em;
    margin: auto 0 auto calc(100% - 5.5em);
}

footer div.logo-container a.logo-ecovadis img {
    width: 5em;
    height: 5em;
}

/*-----------------------------------------------------------------------------------------------------------------------------*/

/**********************************************************
    All pages - No script styling (if JavaScript is off)
 *********************************************************/
noscript {
    position: absolute;
    top: 5em;
    width: 100%;
    text-align: center;
    background-color: orangered;
    color: white;
    padding: 0 0 0.5em 0.5em;
    display: block;
    z-index: 2;
}

noscript br {
    margin: 0.5em 0;
}

/*-----------------------------------------------------------------------------------------------------------------------------*/

/**********************************************************
    All pages - externally controlled styles 
    (Either manually or through JavaScript)
 *********************************************************/
.box {
    border: 1px solid black;
}

.selected-menu {
    background-color: rgb(124, 123, 114);
}

.hidden {
    display: none;
}

/*-----------------------------------------------------------------------------------------------------------------------------*/

/**********************************************************
    All pages - Screen format depending styling
 *********************************************************/
@media only screen and (max-width: 1100px) {
    .text-list li:nth-child(2) {
        word-break: break-all;
    }
}

@media only screen and (min-width: 680px) {
    
    header a.logo-td img {
        width: 12.3em;
        padding-top: 0.3em;
    }

    noscript {
        top: 5.2em;
    }
}

@media only screen and (min-width: 920px) {

    header a.logo-td {
        margin-left: calc((100% / 2) - 6.3em);
    }

    header a.logo-td img {
        width: 12.6em;
        padding-top: 0.4em;
    }

    header a.logo-ecovadis {
        display: inline;
    }

    footer {
        display: block;
    }

    footer div.grid {
        grid-template-columns: 1fr 1fr 1fr;
        height: 5em;
    }

    footer div.logo-container {
        display: none;
    }

    header svg.menu, header svg.close {
        display: none;
    }

    nav {
        display: block;
        background-color: rgba(55, 111, 190);
    }

    nav.hover-class {
        background-color: rgba(55, 111, 190, 0.8);
    }

    main section.hero .hero-img {
        width: calc(100% - 5em); 
    }

    main section.services {
        width: calc(100% - 7em);
    }

    main section.services .service-card .service-text-section h2 {
        color: #11387f;
        margin: 0.4em 0;
        font-size: 1.4em;
    }

    main section.services div.map-section iframe {
        height: 100%;
    }

    main section.services div.map-section a {
        margin-top: 2em;
    }

    footer {
        grid-template-columns: repeat(3, 1fr);
        height: 5em;
    }

    footer div.credit-container {
        justify-content: end;
        padding-right: 1em;
    }

    noscript {
        top: 5.5em;
    }
    
}

@media only screen and (min-width: 1200px) {
    
    header, .wrapper, footer {
        max-width: 1440px;
        margin: 0 auto;
    }

    header a.logo-td img {
        width: 13em;
        padding-top: 0.5em;
    }

    noscript {
        top: 5.75em;
    }

}

@media only screen and (min-width: 1440px) {

    header a.logo-td img {
        width: 12.8em;
        padding-top: 0.5em;
        padding-left: 0;
    }

    noscript {
        top: 5.9em;
    }
}

/* @media only screen and (min-height: 1400px) {
    .side-switcher {
        top: 0;
        margin: auto;
    }
} */

/*-----------------------------------------------------------------------------------------------------------------------------*/

/**********************************************************
    All pages - css based animation code
 *********************************************************/
@keyframes slideInSlideOut {

    0% {
        transform: translateY(-25em);
        opacity: 0;
    }
    5% {
        opacity: 0;
    }
    20% {
        transform: translateY(-5);
        opacity: 0.6;
    }
    30% {
        transform: translateY(0);
        opacity: 1;
    }
    85% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(20em);
        opacity: 0;
    }
}
