/* Small compatibility layer between the Umbraco 17 Razor output and the original Malmegårds theme. */
.site-skip {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    padding: 10px 16px;
    color: #fff;
    background: #004477;
    transform: translateY(-150%);
}
.site-skip:focus { transform: none; }

.navbar { position: relative; z-index: 90; background: #fff; }
.navbar-brand img { display: block; }
.navbar-links { align-items: stretch; }
.btn-search, .sidebar-button, .close-button, .sidebar-menu-arrow { padding: 0; border: 0; border-radius: 0; }
.close-button { appearance: none; background: transparent; }
.sidebar-button .menu-bar {
    left: 50%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: translateX(-50%);
}
.sidebar-button .menu-bar-top { top: 24px; }
.sidebar-button .menu-bar-middle { top: 37px; }
.sidebar-button .menu-bar-bottom { top: 50px; }
@media (max-width: 767.98px) {
    .sidebar-button .menu-bar-top { top: 20px; }
    .sidebar-button .menu-bar-middle { top: 31px; }
    .sidebar-button .menu-bar-bottom { top: 42px; }
}
.btn-search { flex: 0 0 auto; }
.sidebar-button { display: block; }
.sidebar-menu-arrow { background: transparent; }
.menu-wrap[aria-hidden="false"] { visibility: visible; }
body.menu-open { overflow: hidden; }
.menu-sidebar .expanded > .sub-menu { display: block; }
.menu-sidebar li.active > a { font-weight: 600; }
.umb-block-list { display: block; }
.umb-block-list > section { margin: 0; }

.hero-video { position: relative; height: 65vh; min-height: 500px; max-height: 700px; overflow: hidden; }
.hero-video .video-content { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video .container { position: relative; z-index: 2; }

/* The migrated page templates are semantic; give them the original container rhythm until each template is ported. */
main > article,
main > nav[aria-label="Undersidor"] {
    width: 100%;
    max-width: 1600px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 130px;
    padding-left: 130px;
}
main > article { padding-top: 80px; padding-bottom: 80px; }
main > article > header { margin-bottom: 60px; }
main > article > header > p { max-width: 850px; font-size: 1.4rem; }
main > article > header > img { width: 100%; max-height: 700px; margin-top: 35px; object-fit: cover; }
main > article > section { margin-bottom: 70px; }
main > article > aside { margin: 50px 0; padding: 40px; background: #d5eaee; }
main > nav[aria-label="Undersidor"] { padding-bottom: 80px; }

section[aria-label="Nyheter"],
section[aria-label="Projekt"],
section[aria-label="Lediga lokaler"],
#real-estate-list,
section[aria-label="Medarbetare"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 35px;
}
section[aria-label="Nyheter"] > article,
section[aria-label="Projekt"] > article,
.premise-card,
.real-estate-card,
.contact-card { background: #d5eaee; }
section[aria-label="Nyheter"] article img,
section[aria-label="Projekt"] article img,
.premise-card img,
.real-estate-card img,
.contact-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
section[aria-label="Nyheter"] article > :not(img),
section[aria-label="Projekt"] article > :not(img),
.premise-card > :not(img),
.real-estate-card > :not(img),
.contact-card > :not(img) { margin-right: 30px; margin-left: 30px; }
.premise-filter, .property-filter { display: flex; gap: 30px; margin-bottom: 50px; padding: 35px; background: #d5eaee; }
.premise-filter label, .property-filter label { flex: 1; }
.premise-filter select, .property-filter select { display: block; width: 100%; height: 46px; margin-top: 8px; border: 0; background: #fff; }
.property-gallery, .premise-gallery, section[aria-label="Bildgalleri"] { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.property-gallery img, .premise-gallery img, section[aria-label="Bildgalleri"] img { width: 100%; height: 100%; min-height: 250px; object-fit: cover; }
.premise-hero .buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.premise-hero .buttons .btn { margin-right: 0; }
.premise-documents .btn-link { display: block; margin-bottom: 12px; }
.premise-contact-image { width: 100%; }
.premise-page .property-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.premise-page [hidden] { display: none !important; }
#map-section { width: 100%; height: 600px; margin-bottom: 30px; }
#premises-map { width: 100%; height: 100%; border: 0; }
.premise-map-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 60px; }
.premise-map-link { padding: 10px 18px; border-radius: 24px; color: #fff; background: #2d4f82; }
.premise-map-link:hover { color: #fff; }
.real-estate-list-page .property-filter {
    display: block;
    margin: -60px 0 60px;
    padding: 40px 30px;
    background-color: rgba(141, 200, 153, 0.4);
}
.real-estate-list-page .property-filter select { margin-top: 0; }
.real-estate-list-page #real-estate-list { display: block; }
.real-estate-list-page [hidden] { display: none !important; }
.real-estate-list-page .property-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.real-estate-list-page .property-group { margin: 0; }
.real-estate-list-page .property-group + .property-group { margin-top: 10px; }
.real-estate-list-page .property-map-link { background: #e38a25; }
.real-estate-page .property-facts { margin-bottom: 80px; }
.project-map iframe { display: block; width: 100%; height: 600px; border: 0; }
.project-list-page .current-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.news-list-page .current-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.news-page #galleryUnite { margin-top: 30px; }
.faq-card summary { padding: 20px 40px 20px 0; font-family: "Gilroy-Black"; font-size: 1.25rem; cursor: pointer; }

/* The former site used AOS to reveal the project title card after the hero loads. */
.project-hero-card-animate {
    animation: project-hero-card-reveal 1s ease-out .2s both;
}
@keyframes project-hero-card-reveal {
    from { opacity: 0; transform: translate3d(0, 100px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .project-hero-card-animate { animation: none; }
}

@media (max-width: 1439.98px) {
    main > article, main > nav[aria-label="Undersidor"] { padding-right: 80px; padding-left: 80px; }
}
@media (max-width: 1199.98px) {
    main > article, main > nav[aria-label="Undersidor"] { padding-right: 40px; padding-left: 40px; }
    section[aria-label="Nyheter"], section[aria-label="Projekt"], section[aria-label="Lediga lokaler"], #real-estate-list, section[aria-label="Medarbetare"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    main > article, main > nav[aria-label="Undersidor"] { padding-right: 20px; padding-left: 20px; }
    main > article { padding-top: 50px; padding-bottom: 50px; }
    main > article > header { margin-bottom: 40px; }
    section[aria-label="Nyheter"], section[aria-label="Projekt"], section[aria-label="Lediga lokaler"], #real-estate-list, section[aria-label="Medarbetare"] { grid-template-columns: 1fr; }
    .premise-filter, .property-filter { display: block; padding: 25px; }
    .premise-filter label + label, .property-filter label + label { display: block; margin-top: 20px; }
    .property-gallery, .premise-gallery, section[aria-label="Bildgalleri"] { grid-template-columns: 1fr; }
    .premise-hero .buttons { right: 0; left: 0; padding: 0 15px; }
    .premise-hero .buttons .btn { width: 100%; }
    .real-estate-list-page .property-filter { margin: -40px 0 20px; padding: 30px 0; }
    .real-estate-list-page .property-filter label + label { margin-top: 0; }
    .real-estate-page .property-facts { margin-bottom: 20px; }
    .project-map iframe { height: 420px; }
    #map-section { height: 420px; }
}
.faq-card[hidden],
.faq-bg[hidden] {
    display: none !important;
}

.faq-card__inner:focus-visible {
    outline: 0;
    transform: scale(1.05);
}

.faq-card.is-expanded .faq-card__inner:focus-visible {
    transform: scale(1);
}

@media screen and (min-width: 992px) {
    .faq-bg.is-filtering .faq-card .faq-card__expander {
        margin-left: 0 !important;
    }

    .faq-bg.is-filtering .faq-card.faq-filter-column-3-2 .faq-card__expander {
        margin-left: calc(-100% - 30px) !important;
    }

    .faq-bg.is-filtering .faq-card.faq-filter-column-3-3 .faq-card__expander {
        margin-left: calc(-200% - 60px) !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .faq-bg.is-filtering .faq-card .faq-card__expander {
        margin-left: 0 !important;
    }

    .faq-bg.is-filtering .faq-card.faq-filter-column-2-2 .faq-card__expander {
        margin-left: calc(-100% - 30px) !important;
    }
}

.faq-card-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    border: 0;
    background: transparent;
    color: #12120d;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.faq-card-close:hover,
.faq-card-close:focus-visible {
    opacity: .65;
}
