@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --var-red-color: rgb(180, 3, 3);
    --var-blue-color: #004AAD;
    --var-light-blue-bg: rgb(245, 255, 255);
    --var-blue-secondary: #c3ddff;
    --var-blue-inside-seconday: #03387e;
}

body {
    font-family: 'Open Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
}

h1 {
    font-size: 52px;
    font-weight: 600;
}

h2 {
    font-size: 36px;
    font-weight: 500;
}

h3 {
    font-size: 28px;
    font-weight: 500;
}

.italic {
    font-style: italic;
}
p,
a,
span {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 16px;
}
.flex {
    display: flex;
}
.row {
    flex-direction: row;
}
.col {
    flex-direction: column;
}
.gap-10 {
    gap: 10px;
}
.gap-20 {
    gap: 20px;
}
.gap-40 {
    gap: 40px;
}
.gap-60 {
    gap: 60px;
}
.padding-20 {
    padding: 20px;
}
.padding-40 {
    padding: 40px;
}
.padding-t-20 {
    padding-top: 20px;
}
.padding-t-40 {
    padding-top: 40px;
}
.padding-b-20 {
    padding-bottom: 20px;
}
.border-1-blue {
    border: 1px solid var(--var-blue-color);
}
.height-main {
    height: 450px;
}
.height-undersites {
    height: 700px;
}
.text-center {
    text-align: center;
}
.gap-80 {
    gap: 80px;
}
.align-end {
    align-items: flex-end;
}
.grid {
    display: grid;
}
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.font-weight-500 {
    font-weight: 500;
}
.font-weight-600 {
    font-weight: 600;
}
.font-weight-700 {
    font-weight: 700;
}

@media only screen and (max-width: 1100px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .row.stack-mobile {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media only screen and (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   Mobile typography - one consistent type scale on phones/tablets.
   ONLY font sizes. Scoped to page content (<section>), so the navbar,
   footer and cookie banner keep their own sizes. !important is needed
   because several sections set desktop sizes with more specific
   selectors (and h1/h2/h3 above would otherwise override the mobile
   rules in home.css, which loads before this file).
   =================================================================== */
@media only screen and (max-width: 768px) {
    section h1,
    section .main-h1 {
        font-size: 32px !important;
    }
    section h2,
    section .marked-text {
        font-size: 26px !important;
    }
    section h3 {
        font-size: 21px !important;
    }
    section h4 {
        font-size: 18px !important;
    }
    section p,
    section .main-h-text,
    section .section-text,
    section .small-section-text {
        font-size: 16px !important;
    }

    /* Homepage "Tjänstemän | Kollektivanställda": the two halves (with a fixed
       100px text-to-arrow gap) can't fit side by side on a phone - stack them. */
    .candidate-type .row {
        flex-wrap: wrap;
    }
    .candidate-type .col-50 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .candidate-type .col-50 + .col-50 {
        margin-top: 16px;
    }
    .candidate-type .type-header {
        flex: 1;
        gap: 12px;
        justify-content: space-between;
    }

    /* Cookie banner link: the global "a { font-size: 16px }" above made it larger
       than the banner text around it - match the surrounding text. */
    .cookie-popup a {
        font-size: inherit !important;
    }

    /* Mobile layout: hero text column uses the full width instead of 80%. */
    .col-80 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Mobile layout: heroes on Start, Tjänstemän, Kollektivanställda,
       Om Rekmatch and Kontakta oss are at least 400px tall. */
    section.main-hero,
    section.servicemen-hero,
    section.collective-hero,
    section.about-hero,
    section.contactus-hero {
        min-height: 400px;
    }

    /* Start page hero on mobile: rekmatch-bakgrund.webp covering the whole hero
       (faint, opacity 0.2) - same look as section.servicemen-hero::before. Also undoes
       the 250px top-right square that home.css applies to this ::before on mobile. */
    section.main-hero::before {
        background: url(../images/rekmatch-bakgrund.webp) no-repeat center center/cover;
        top: 0;
        left: 0;
        right: auto;
        bottom: auto;
        width: 100%;
        height: 100%;
        opacity: 0.2;
    }
}

@media only screen and (max-width: 480px) {
    section h1,
    section .main-h1 {
        font-size: 28px !important;
    }
    section h2,
    section .marked-text {
        font-size: 23px !important;
    }
    section h3 {
        font-size: 20px !important;
    }
    section h4 {
        font-size: 17px !important;
    }
}
