/* Fonts */
/* roboto-serif-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto Serif';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-serif-v17-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('../fonts/roboto-serif-v17-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

/* roboto-serif-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto Serif';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/roboto-serif-v17-latin-500.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('../fonts/roboto-serif-v17-latin-500.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
/* roboto-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-v51-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('../fonts/roboto-v51-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

/* roboto-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/roboto-v51-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('../fonts/roboto-v51-latin-700.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

/* Variables */
:root{
    --font-family-accent: 'Roboto Serif', 'Times', 'Times New Roman', serif;
    --font-family-base: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --color-background: #FFF8E8;
    --color-text: #293133;
    --color-accent: #008444;
    --border-radius-large: 1.111rem;
}

/* Basics */
html {
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.4;
    font-family: var(--font-family-base, 'sans-serif');
    background-color: var(--color-background);
    color: var(--color-text);
}

*, *:before, *:after {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 0;
}
img {
    max-width: 100%;
    height: auto;
}
hr{
    border: none;
    border-top: 1px solid var(--color-text);
    margin: 2rem 0;
}
h1{
    font-family: var(--font-family-accent, 'serif');
    font-weight: 500;
    font-size: 1.8rem;
    line-height: 1.2;
    margin: 0 0 0.5em 0;
}
h1 span{
    color: var(--color-accent);
}
h2{
    font-size: 1.6rem;
}
h3{
    font-size: 1.4rem;
}
h2,h3{
    font-weight: normal;
    margin-bottom: 0.5em;
    line-height: 1.2;
}
h2.divider{
    overflow: hidden;
}
h2.divider span{
    display: inline-block;
    position: relative;
    padding-right: 0.7em;
}
h2.divider span::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 9999px;
    height: 1px;
    background-color: var(--color-text);
}
p{
    margin: 1em 0;
}
p.intro{
    font-size: 1.2rem;
    line-height: 1.4;
    margin: 0;
}
a{
    color: var(--color-accent);
    text-decoration: none;
}
a:hover,a:focus{
    text-decoration: underline;
    text-decoration-thickness: 2px;
}
.background-accent a{
    color: var(--color-background);
}
.sectionmargin{
    margin: 3rem 0;
}

.outer-container {
    max-width: 1470px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}
.container{
    max-width: 1196px;
    margin: 0 auto;
    padding: 0 15px;
}
.page{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-between;
}

.page{
    background-image: url('../images/coat-bg-base.svg');
    background-repeat: no-repeat;
    background-position: -100px 200px;
    background-size: 220px auto;
}

/* Helper Classes */
.border-radius-large {
    border-radius: var(--border-radius-large);
    overflow: hidden;
}
.border-radius-large--remove-bottom {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.border-radius-large--remove-top {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.background-accent {
    background-color: var(--color-accent);
    color: var(--color-background);
}

/* Header */
.header__image img,
.header__image picture{
    width: 100%;
    height: auto;
    display: block;
}
.header__decor{
    display: flex;
    justify-content: center;
    margin-top: -45px;
}
.header__coatofarms{
    position: relative;
    display: inline-block;
    background-color: var(--color-background);
    padding: var(--border-radius-large);
    height: 90px;
    width: auto;
    padding-bottom: 0;
    overflow: visible;
}
.header__coatofarms img{
    height: 100%;
    width: auto;
}
/*
 Before and after pseudo elements
 for inverted rounded corners.
 See https://codepen.io/digitalbricks/pen/MYJGjgQ
*/
.header__coatofarms:before,
.header__coatofarms:after{
  position: absolute;
  content: "";
  display: block;
  width: var(--border-radius-large);
  height: var(--border-radius-large);
  top: 50%;
  background-image: radial-gradient(
    circle at 100% 100%,
    transparent var(--border-radius-large),
    var(--color-background) calc(var(--border-radius-large) + 1px)
  );
}
.header__coatofarms:before{
  left: calc(var(--border-radius-large) * -1);
  transform: translateY(100%);
  rotate: 180deg;
}
.header__coatofarms:after{
  right: calc(var(--border-radius-large) * -1);
  transform: translateX(100%); /*x transform because of rotation*/
  rotate: -90deg;
}

/* Services */
ul.services{
    margin-top: 2rem;
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
ul.services h3{
    font-family: var(--font-family-accent, 'serif');
    font-weight: 500;
    margin-top: 0.6em;
    margin-bottom: 0;
}
.services__icon img{
    width: 5rem;
    height: auto;
}

/* Footer */
footer h2{
    font-family: var(--font-family-accent, 'serif');
    font-size: 1.7rem;
}
.footer__col{
    padding: 1em 0;
}
.officetimes{
    border-collapse: collapse;
    width: 100%;
}
.officetimes th,
.officetimes td{
    padding: 0.2em 0;
    border-bottom: 1px solid var(--color-background);
}
.officetimes tr:last-child th,
.officetimes tr:last-child td{
    border-bottom: none;
    padding-bottom: 0;
}
.officetimes tr:first-child th,
.officetimes tr:first-child td{
    padding-top: 0;
}
.officetimes th{
    text-align: left;
    padding-right: 1em;
}
.footer__upper{
    background-image: url('../images/coat-bg-footer.svg');
    background-repeat: no-repeat;
    background-position: 180% 0;
    border-bottom: 1px solid var(--color-background);
}
.footer__lower{
    padding: .6rem 0;
}
.footernav ul{
    list-style: none;
    padding: 0;
}


/*------ MEDIA QUERIES ---------------------------*/
@media only screen and (min-width: 480px){
    /* Footer */
    .footer__upper{
        background-position: 130% 0;
    }
}


@media only screen and (min-width: 640px){
    h1{
        font-size: 2.2rem;
    }
    h2{
        font-size: 2rem;
    }
    h3{
        font-size: 1.7rem;
    }
    p.intro{
        font-size: 1.4rem;
    }
    .sectionmargin{
        margin: 4rem 0;
    }
    .header__coatofarms{
        height: 120px;
    }
    .header__decor{
        margin-top: -60px;
    }
    .footernav ul{
        display: flex;
        gap: 2rem;
    }
    .page{
        background-position: -100px 200px;
        background-size: 350px auto;
    }
    .footer__upper{
        background-position: 110% 0;
    }
}


@media only screen and (min-width: 768px){
    ul.services{
        grid-template-columns: 1fr 1fr;
    }
    .footer__upper .container{
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem
    }
    .footer__col--col1{
        grid-column: 1 / span 2;
    }
    .page{
        background-position: -150px 50px;
        background-size: 450px auto;
    }
    .footer__upper{
        background-position: calc(100% + 50px) center;
    }
}

@media only screen and (min-width: 960px){
    html{
        font-size: 18px;
    }
    h1{
        font-size: 3.2rem;
    }
    h2{
        font-size: 2.2rem;
    }
    .page{
        background-position: -150px 50px;
        background-size: 500px auto;
    }
    .sectionmargin{
        margin: 5rem 0;
    }
    .auto-columns{
        column-count: 2;
        gap: 2rem;
    }
    .auto-columns>*:first-child{
        margin-top: 0;
    }
    .auto-columns p,
    .auto-columns li{
        break-inside: avoid;
    }
}

@media only screen and (min-width: 1200px){
     ul.services{
        grid-template-columns: 1fr 1fr 1fr;
    }
    .footer__upper .container{
        grid-template-columns: 1fr 1fr 1fr;
    }
    .footer__col--col1{
        grid-column: 1 / span 1;
    }
     .page{
        background-position: -150px 0;
        background-size: 590px auto;
    }
    .footer__upper{
        background-size: 200px auto;
    }
}

@media only screen and (min-width: 2100px){
    .page{
        max-width: 2400px;
        margin: 0 auto;
        background-position: 0 0;
        background-size: 700px auto;
    }
}