@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
    font-style: italic;
    font-display: swap;
}

body {
    @media screen {
        background-color: #f5f5f0; 
        a:hover {
            cursor: pointer;
            
        }
    }
}

main {
    * { font-family: Inter, Helvetica, Arial, sans-serif;
        color: #111; 
        line-height: 1.5;
        overflow-wrap: break-word;
        /* text-wrap-mode: wrap; */
        /* text-wrap-style: balance; */
        word-break: normal;
        hyphens: auto;
        -webkit-hyphens: auto;
        hyphenate-character: "-";
        -webkit-hyphenate-character: "-";
        hyphenate-limit-chars: 6 3 2;
    }

    *, *::before, *::after {
        box-sizing: border-box;
    }
    
    h1 {
        
        font-family: Inter, Helvetica, sans-serif;
        font-weight: 900; 
        margin-top: 0.5em; 
        margin-bottom: calc(0.2em + 0.15 *clamp(2.5rem, 6vw, 4.5rem));
        
        font-size: calc(0.9 * clamp(2.5rem, 6vw, 4.5rem));
        line-height: 1.1;
        
        text-transform: uppercase;
        text-decoration-line: underline; 
        text-decoration-color: #af985d;
        text-decoration-thickness: calc(0.15 * clamp(2.5rem, 6vw, 4.5rem));
        text-decoration-inset: 0 calc(0.5 * clamp(2.5rem, 6vw, 4.5rem));
        article:first-child & {
            font-size: calc(1.2 * clamp(2.5rem, 6vw, 4.5rem));
        }
    }
    
    
    h2 {
        font-family: Inter, sans-serif;
        font-weight: 700;
        margin-top: 2em;
        margin-bottom: 0.8em;
        
        font-size: clamp(1.8rem, 4vw, 3rem);
        line-height: 1.2;
        text-decoration-line: underline; 
        text-decoration-color: #af985d;
        text-decoration-thickness: calc(0.15 * clamp(1.8rem, 4vw, 3rem));
        text-decoration-inset: 0 calc(1.5 * clamp(1.8rem, 4vw, 3rem));
    }
    
    
    h3 {
        font-family: Inter, sans-serif;
        font-weight: 600;
        margin-top: 1.5em;
        margin-bottom: 0.5em;
        
        font-size: clamp(1.3rem, 2.5vw, 1.8rem);
        line-height: 1.4;
    }
    
    
    
    
    
    p {
        
        font-size: clamp(1rem, 1.1vw, 1.15rem);
        margin-bottom: 1.5em; 
        text-align: left; 
        
        line-height: 1.6;
        text-indent: 0;
        &:has(+ ul) {
            margin-bottom: 0;
        }
    }

    a {
        color: #99002d;
        text-decoration: underline;
        &:hover {
            color: #af985d;
            text-decoration: none;
        }
        @media screen {
            &[href$=".pdf"]::before {
                background-image: url("icons/pdf.svg");
                display: inline-block;
                content: "";
                height: clamp(1rem, 1.1vw, 1.15rem);
                width: clamp(1rem, 1.1vw, 1.15rem);
                background-size: calc(0.8 * clamp(1rem, 1.1vw, 1.15rem));
                background-position: bottom;
                background-repeat: no-repeat;
                margin-right: calc(0.3 * clamp(1rem, 1.1vw, 1.15rem));
            }
            &[href$=".pdf"]:hover::before {
                background-image: url("icons/pdf_link.svg");
            }
        }
    }
    /* &[href$=".pdf"]:hover::before { */
        /* background-image: url("icons/pdf_link.svg"); */
    /* } */
    
    
    ul {
        margin: 1.5em 0 1.5em 40px; 
        p + & {
            margin-top: 0;
        }
    }
    
    
    li {
        
        font-size: clamp(1rem, 1.1vw, 1.15rem);
        margin-bottom: 0.6em;
        list-style-type: none; 
        list-style-position: inside;
        list-style-image: none;
        &::before {
            content: "–  "
        }

    }
    
    
    
    
    figure {
        
        margin: 4em 0 2em;
        text-align: left; 
    }
    
    figcaption {
        
        font-family: Inter, sans-serif;
        font-weight: 400;
        color: #666;
        font-size: clamp(0.9rem, 1.5vw, 1rem);
        margin-top: 0.3em;
        display: block;
        padding-left: 0.5rem; 
    }

    @media screen and (width >= 1200px) {
        article {
            &:first-child {
                figure, figcaption {
                    text-align: center;
            }
        }
    }

    }
    
    table {
        width: 100%;
        border-collapse: collapse;
        margin: 3em 0;
        border: none; 
    }
    
    
    th, td {
        padding: 10px 15px;
        text-align: left;
        
        border-bottom: 1px solid #ddd;
    }
    
    
    thead th {
        font-weight: 700;
        color: #111;
        text-transform: uppercase;
        letter-spacing: 0.1em; 
        border-bottom: 2px solid #111; 
    }
        
    
    tbody tr:nth-child(even) {
        background-color: transparent; 
    }
}

@page {
    size: a4;
    margin-left: 2.5cm;
    margin-top: 2cm;
    margin-bottom: 2cm;
    marign-right: 2.0cm;
}

@media print {
    
    header {
        float: left;
        text-align: left;
        width: 100%;
        padding-bottom: calc(0.9 * clamp(2.5rem, 6vw, 4.5rem));
        a, img {
            width: 30%;
        }
    }
    main {
        a[href]::after {
            content: " (" attr(href) ")";
            font-size: 0.8em;
        }

      Hide internal links' URL display
      a[href^="#"]::after,
      a[href^="https://www.hof-eigental.ch"]::after,
      a[href^="http://127.0.0.1"]::after {
        content: "";
      }

      Avoid page breaks inside paragraphs
      p, figure, pre {
        page-break-inside: avoid;
        break-inside: avoid;
      }

      article:nth-child(n + 2) {
        page-break-before: always;
        break-before: page;
      }

      Images should not overflow
      img {
        max-width: 100%;
        page-break-inside: avoid;
        break-inside: avoid;
      }
  }
}
