/*
Theme Name: Jippi Event
Description: A flexible child theme template for Flatsome
Author: Your Company Name
Template: flatsome
Version: 3.0.0
*/

/*************** Imports  ***************/
@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo_wght.woff2") format("woff2");
    font-display: swap;
}
.grecaptcha-badge {
    visibility: hidden;
}

:root {
    --size-sm: 60px;
    --size-md: 90px;
    --size-lg: 120px;
    --size-xlg: 180px;

    /* Margin scale — values from jippievent.se (fluid: min(rem, vw)) */
    --mg-xs: 1rem; /* 16px */
    --mg-sm: min(2rem, 5vw); /* ≤ 32px */
    --mg-md: min(3rem, 6vw); /* ≤ 48px */
    --mg-lg: min(4rem, 7vw); /* ≤ 64px */
    --mg-xl: min(6rem, 8vw); /* ≤ 96px */
    --mg-2xl: min(7rem, 10vw); /* ≤ 112px */
    --mg-3xl: min(8rem, 12vw); /* ≤ 128px */
    --mg-block: var(--mg-sm); /* default rytm mellan block/rubriker */

    /* Fluid type scale — matches jippievent.se (Archivo, 320→1280px viewport) */
    --text-sm: clamp(
        0.78rem,
        calc(0.78rem + ((1vw - 0.2rem) * 0.158)),
        0.875rem
    ) !important; /* 12.5 → 14px */
    --text-md: clamp(
        0.875rem,
        calc(0.875rem + ((1vw - 0.2rem) * 0.417)),
        1.125rem
    ) !important; /* 14 → 18px */
    --text-lg: clamp(
        1rem,
        calc(1rem + ((1vw - 0.2rem) * 0.417)),
        1.25rem
    ) !important; /* 16 → 20px */
    --h1: clamp(
        2.25rem,
        calc(2.25rem + ((1vw - 0.2rem) * 2.5)),
        3.75rem
    ) !important; /* 36 → 60px */
    --h2: clamp(
        1.85rem,
        calc(1.85rem + ((1vw - 0.2rem) * 1.917)),
        3rem
    ) !important; /* 29.6 → 48px */
    --h3: clamp(
        1.39rem,
        calc(1.39rem + ((1vw - 0.2rem) * 1.433)),
        2.25rem
    ) !important; /* 22.2 → 36px */
    --h4: clamp(
        1.5rem,
        calc(1.5rem + ((1vw - 0.2rem) * 0.5)),
        1.8rem
    ) !important; /* 24 → 28.8px */
    --h5: clamp(
        1.25rem,
        calc(1.25rem + ((1vw - 0.2rem) * 0.417)),
        1.5rem
    ) !important; /* 20 → 24px */
    --h6: clamp(
        0.875rem,
        calc(0.875rem + ((1vw - 0.2rem) * 0.417)),
        1.125rem
    ) !important; /* 14 → 18px */
    --btn-sm: 0.5rem 1rem !important;
    --btn-md: 0.75rem 1.5rem !important;
    --btn-lg: 1rem 2rem !important;

    --body-font-family: "Archivo", sans-serif !important;
    --medium-font-family: "Archivo", sans-serif !important;
    --heading-font-family: "Archivo", sans-serif !important;
    --fw-normal: 400 !important;
    --fw-heading: 500 !important;
    --lh-body: 1.6 !important;
    --lh-heading: 1.15 !important;
}

@media only screen and (max-width: 849px) {
    :root {
        /* Layout spacing only — type scale is fluid (see clamp() above) */
        --size-sm: 30px !important;
        --size-md: 30px !important;
        --size-lg: 30px !important;
        --size-xlg: 30px !important;
    }
}

/*************** Typograhy  ***************/
body {
    font-family: var(--body-font-family);
    font-size: var(--text-md);
    font-weight: var(--fw-normal);
    line-height: var(--lh-body);
}

body p a,
body span a,
body li:not([class^="menu-item-"]) a {
    text-decoration: underline !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font-family);
    font-weight: var(--fw-heading);
    line-height: var(--lh-heading);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--h1);
}
h2,
.h2,
h3.h2 {
    font-size: var(--h2);
}
h3,
.h3,
h2.h3 {
    font-size: var(--h3);
}
h4 {
    font-size: var(--h4);
    letter-spacing: normal;
}
h5 {
    font-size: var(--h5);
    line-height: var(--lh-body);
    letter-spacing: normal;
}
h6 {
    font-size: var(--h6);
    line-height: var(--lh-body);
    letter-spacing: 0.03em;
}

.sr-only {
    display: none;
}

.upper p,
.upper {
    font-family: var(--medium-font-family);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

@media only screen and (max-width: 849px) {
    .text-right {
        text-align: left;
    }
}

.text-color-black {
    color: black !important;
}
.text-color-white {
    color: white !important;
}
/*************** Global paddings  ***************/
.py-sm {
    padding: var(--size-sm) 0px !important;
}
.py {
    padding: var(--size-md) 0px !important;
}
.py-lg {
    padding: var(--size-lg) 0px !important;
}
.py-xlg {
    padding: var(--size-lg) 0px !important;
}
.pt {
    padding-top: var(--size-md) !important;
}
.pt-lg {
    padding-top: var(--size-lg) !important;
}
.pt-xlg {
    padding-top: var(--size-xlg) !important;
}
.pl {
    padding-left: var(--size-md) !important;
}
.pt {
    padding-top: var(--size-md) !important;
}
.pb {
    padding-bottom: var(--size-md) !important;
}
.pb-lg {
    padding-bottom: var(--size-lg) !important;
}
.pb-xlg {
    padding-bottom: var(--size-xlg) !important;
}
.mb-0,
.mb-0 p {
    margin-bottom: 0 !important;
}
.m-0,
.m-0 p {
    margin: 0 !important;
}

/*************** Buttons  ***************/
.button:not(.icon, .back-to-top),
.wpcf7-submit {
    padding: var(--btn-md);
    font-size: var(--text-md);
    font-weight: var(--fw-normal);
    line-height: 1;
    min-height: unset;
    color: #000 !important;
    text-transform: none !important;
    font-weight: normal !important;

    & span {
        line-height: 1;
    }
}

.button:not(.icon).primary {
    & span {
        color: #000;
    }
}

.button:not(.icon).secondary {
    & span {
    }
}

.button:not(.icon).is-link {
    padding-left: 0;
    padding-right: 0;
    & span {
    }
}

.button:not(.icon, .back-to-top).is-outline {
    & span {
    }
}

/*************** Header & Navigation  ***************/
.nav {
    & li {
        & a {
            font-size: var(--text-md);
        }
    }
}

.header.transparent {
    & .nav {
        & li {
            & a {
            }
        }
    }
}

.header-main {
    height: 160px !important;
    background: #f3b20a;
    .header_logo.header-logo {
        padding: 15px 0px;
    }
    & .menu-item .nav-top-link {
        color: #000;
        opacity: 1;
        font-weight: normal;
        text-transform: none;
        text-decoration: none !important;
        &:hover {
            opacity: 0.6;
        }
    }
}

/*********** Generell layout *************/
main {
    margin-top: 30px;
}

section {
    padding: var(--mg-sm) !important;
    padding-top: var(--mg-xl) !important;
}

/*************** Frontpage  ***************/
.frontpage-hero {
    min-height: 385px;
}

@media only screen and (max-width: 1400px) {
}

@media only screen and (max-width: 849px) {
    .frontpage-hero {
        height: auto;
    }
}

@media only screen and (max-width: 48em) {
}

.event-title {
    & h3 {
        font-size: var(--h4);
    }
}

/*************** Sections  ***************/
.half-bg-left {
    & .section-bg {
        width: calc(50% - 60px);
        height: auto;
    }
}

.half-bg-right {
    & .section-bg {
        left: calc(50% + 60px);
        width: calc(50% - 60px);
        height: auto;
    }
}

@media only screen and (max-width: 849px) {
    .half-bg-right,
    .half-bg-left {
        flex-direction: column;
        padding-top: 0 !important;
        & .section-bg {
            flex-basis: 100%;
            width: 100%;
            position: relative;
            left: unset;
            aspect-ratio: 16 / 10;
            margin-bottom: var(--size-sm);
            transform: none !important;
        }
    }
}

/*************** Rows & Columns  ***************/
.row.align-equal .fh-banner {
    min-height: 100%;
}

/*************** Boxes ***************/
.box {
    & .box-image {
    }

    & .box-text {
    }
}

/*************** Accordions  ***************/
.accordion {
    .accordion-title {
        border-top: none;
    }

    .accordion-title.active {
    }

    .toggle {
        left: auto;
        right: 0;
    }
}

/*************** Subpage  ***************/
.subpage-title {
    min-height: 385px;
}

@media only screen and (max-width: 1400px) {
}

@media only screen and (max-width: 849px) {
}

@media only screen and (max-width: 48em) {
}

/*************** Footer  ***************/
.absolute-footer {
    display: none;
}

/* Neutralisera Flatsomes clearfix-pseudo i footer-row så den inte räknas
   som ett barn av space-between. */
.footer-wrapper .row.footer-row::after,
.footer-wrapper .row.footer-row::before {
    display: none;
}
.footer-section {
    .footer-row {
        justify-content: space-between;
    }
    .follow-icons.social-icons {
        padding-right: 20px;
        .is-outline {
            color: #000;
            &:hover {
                color: #000 !important;
                background-color: #000 !important;
            }
        }
    }
}

.footer-logo {
    max-width: 120px;
}

@media only screen and (max-width: 1400px) {
}

@media only screen and (max-width: 849px) {
}

@media only screen and (max-width: 48em) {
}

/*************** Contact page ***************/
.contacts-row {
    & img {
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }
}

/*************** Forms ***************/
input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    box-shadow: none !important;
    padding: var(--btn-md);
    height: unset;
}

input[type="number"] {
    height: unset;
    padding: var(--btn-md);
    padding-left: 0;
    padding-right: 0;
    width: 5ch !important; /* Wide enough for 3-digit numbers + spinner */
    max-width: unset !important;
    flex-grow: 0;
}

input:focus,
textarea:focus {
    box-shadow: none !important;
}

textarea {
    resize: none !important;
}
