@media (max-width: 512px) {
    /* :root {
        --step-xs: clamp(1.09rem, calc(0.92rem + 1.13vw), 1.20rem);
        --step-s: clamp(1.31rem, calc(1.00rem + 2.00vw), 1.50rem);
        --step-m: clamp(1.58rem, calc(1.08rem + 3.20vw), 1.88rem);
        --step-l: clamp(1.89rem, calc(1.13rem + 4.84vw), 2.34rem);
        --step-xl: clamp(2.27rem, calc(1.16rem + 7.06vw), 2.93rem);
        --step-xxl: clamp(2.72rem, calc(1.16rem + 10.03vw), 3.66rem);
    } */
    .wrapper {
        transform-style: flat;
        perspective: none;
    }


    .hero-icon {
        transform-style: flat;
        margin-inline: auto;
        width: 90vw;
        top: 0;
    }





    .section-2 {
        margin-top: 100px;
    }

    .header-icon-light,
    .header-icon-dark {
        display: none;
    }
    .small-icon {
        display: block;
    }
    .section-2-container {
        flex-direction: column;
    }
    .cards {
        width: 80vw;
        height: fit-content;
    }

    .section-3-background,
    .section-4-background {
        width: calc(80vw - 10px);
        margin-inline: auto;
        transform: none;
    }

    .m-contents,
    .section-4-container {
        transform: none;
    }

    .m-subtitle,
    .s4-subtitle {
        font-size: var(--step-s);
    }

    .m-quote {
        display: none;
    }

    .m-link {
        font-size: var(--step-s);
        bottom: 4px;
    }

    .m-body,
    .s4-body {
        padding: 0;
        border: none;
        font-size: var(--step-s);
        line-height: 150%;
    }

    .m-body::before {
        content: "";
        margin-right: 10px;
        width: var(--step-xxl);
        height: var(--step-xxl);
        position: relative;
        display: inline-block;
        background-image: url('./assets/icons/quote.svg');
        background-repeat: no-repeat;
        background-size: contain;
        vertical-align: middle;
    }
    .m-img-container,
    .section-4-img-container {
        right: 0;
        left: 0;
        margin: 0;
        bottom: 0;
    }
    .section-4-img-container {
        bottom: -10px;
        left: 25px;
    }
    .m-img {
        position: relative !important;
    }
    
    .m-img img {
        width: clamp(200px, 70vw, 300px);
        position: absolute !important;
        left: 0;
    }
    .section-4-image img {
        width: clamp(100px, 50vw, 200px);
    }

    .section-p {
        margin-top: 300px;
    }

    .footer-logo {
        display: none;
    }

    .footer-navigation {
        display: flex;
        flex-direction: column;
        align-items: center;
        align-self: center;
        justify-content: center; 
        text-align: center;
        margin: 0;
    }

    .footer-container {
        margin: 0;
        justify-content: center;
    }

    .primary-links ul,
    .secondary-links ul {
        display: block !important;
        padding: 0;
        width: fit-content;
    }

    .primary-links ul li a {
        border-bottom: 2px solid var(--pink);
        font-size: var(--step-s);
    }

    .secondary-links ul li a {
        font-size: var(--step-xs);
    }
    
    .footer-img-desktop {
        display: none;
    }
    .footer-img-mobile {
        display: block;
    }

    .footer-img {
        margin-top: -50px;
    }
    .u-nav-menu,
    .d-nav-menu {
        display: none;
    }
    .u-nav,
    .d-nav {
        display: block;
    }
    .section-u,
    .section-d {
        display: block;
        width: 100vw;
    }
    .u-content,
    .d-content {
        background-color: var(--bg2);
        padding: 20px;
        border-radius: 24px;
    }
    .u-content-title {
        transform: none;
        left: 0 !important;
        top: 0 !important;
    }

    .d-content-title {
        transform: none;
        left: 0 !important;
        top: 0 !important;
        margin-left: auto;
    }
    .u-img,
    .d-img {
        display: none;
    }
    .img-divider {
        transform: none;
        margin: 0;
    }

    .cta-container {
        display: flex;
        flex-direction: column;
    }
    .cta-container a h1,
    .cta-container a h2 {
        padding: 0;
        text-align: center;
    }
    .cta-container a {
        align-self: center;
    }

    .rc-btn p {
        color: var(--blue);
    }

    .i4-content h1 {
        font-size: var(--step-xxl) !important;
    }
    .contact-images {
        flex-direction: column;
    }
    .contact-images img {
        width: 90vw !important;
    }
    .contact {
        margin: 12rem auto 6rem;
    }
}

@media (max-width: 768px) {

    [class*="hero-element"] {
        transform: none;
        width: 90vw;
        height: 200px;
    }

    .hamburger-content {
        flex-direction: column;
    }

    .hero-sequence {
        flex-direction: column-reverse;
        align-items: center;
    }
    .rotation-content {
        margin: 0;
        align-items: center;
    }
    .rotation-element {
        align-self: center;
    }
    .rc-btn:hover p {
        transform: none;
    }

    .rc-btn:hover .rc-svg {
        transform: none;
    }

    .rotation-title {
        text-align: center;
        margin: 0.5rem;
    }

    .rotation-element canvas {
        width: 100vw;
    }

    #artifactCanvas {
        width: 18rem;
        height: auto;
    }
    .hamburger-content nav {
        margin-left: 0;
        margin-top: 2rem;
    }

    .ui-content p {
        font-size: var(--step-m);
    }
    .i4-img {
        width: calc(100% - 2rem) !important;
        margin: 1rem;
    }
    .h-img-container {
        grid-template-columns: 1fr;
    }
    .h-img-content {
        align-self: center;
    }
    .the-magazine .tm-container {
        margin: 0 !important;
        width: 80vw;
        display: flex;
        flex-direction: column !important;
    }
    .tm-content {
        opacity: 1;
        margin: 0;
        position: relative;
    }
    .tm-content h1,
    .tm-content p {
        margin: 0.5rem;
    }
    .tmp2 {
        display: none;
    }
}

@media (max-width: 774px) {
    .primary-links ul,
    .secondary-links ul {
        display: grid;
        grid-template-columns: 50% 50%;
    }
    .section-r {
        display: block;
    }
    .r-img {
        display: none;
    }
}

@media (max-width: 1024px) {
    .hero-icon {
        margin-inline: auto;
        width: 90vw;
    }

    [class*="hero-element"] {
        width: 90vw;
        height: 50vh;
        background-position-x: center;
    }  
    .section-3-background,
    .section-4-background {
        margin-inline: auto;
        width:auto;
        margin: 10px;
    }
    .section-3-title {
        background-image: url('./assets/banners/redaktionen_mobile.svg');
        background-position-x: center;
        top: calc(80vw/-10);
        width: 80vw !important;
        margin-inline: auto;
    }
    .section-4-title {
        background-image: url('./assets/banners/skoltidningen_mobile.svg');
        background-position-x: center;
        width: 80vw !important;
    }
    .u-content-title {
        background-image: url('./assets/banners/redaktionen_mobile.svg');
        background-position-x: left;
        width: max(100px, 80%);
        top: 0;
        left: 10vw;
    }
    .d-content-title {
        background-image: url('./assets/banners/skoltidningen_mobile.svg');
        background-position-x: right;
        width: max(100px, 80%);
        top: 15px;
    }
    .footer-icon-dark a img,
    .footer-icon-light a img {
        width: clamp(150px, 25vw, 225px);
    }

    .i4-content {
        transform: none;
        height: auto;
    }
    .fouri {
        flex-direction: column-reverse;
    }
    .i4-img {
        width: calc(100% - 10rem);
    }
}

@media (max-width: 1000px) and (min-width: 774px) {
    .primary-links ul,
    .secondary-links ul {
        display: grid;
        grid-template-columns: 33% 33% 33%;
    }
}

@media (max-width: 1140px) {
    .primary-links ul li a {
        font-size: var(--step-s);
    }
    .secondary-links ul li a {
        font-size: var(--step-xs);
    }
    .u-nav {
        width: 95vw;
    }
    .u-img img {
        height: clamp(870px, 90vw, 1500px);
    }
}

@media (max-height: 596px) {
    #artifactCanvas {
        display: none;
    }
}
