:root {
    box-sizing: border-box;
    --color-white: #f9f7f6;
    --color-black: #312f2e;
    --color-bg-gray: rgba(49, 47, 46, .85);
    --color-bg-white: rgba(249, 247, 246, .85);

    --color-bg:rgba(249, 247, 246); /**/
    --color-bg-not-transparent:rgba(249, 247, 246); /**/
    --color-bgopacity:rgba(249, 247, 246, .85); /**/

    background-color: var(--color-bg);
}

*,

::before,

::after {
    box-sizing: inherit;
}

body { 
    margin: 0; padding: 0; 
    font-family: adobe-caslon-pro, serif;
    font-weight: 400;
}

h1 {
    font-weight: 400;
    font-family: minion-pro,serif;
}
h2 {
    font-weight: 400;
    font-family: minion-pro,serif;
}

@media (min-width: 1025px) { /*desktop*/
    #page-container {
        position: relative;
        min-height: 100vh;
        /* border: 1px solid blue; */
    }

    #content-wrap {
        padding-bottom: 3.5rem;    /* Footer height */
    }

    #bottom-wrap {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 3.0rem;            /* Footer height */
    }

    a {
        color: inherit;
        text-decoration: none;
      }    
      a:visited {
        color: inherit;
        text-decoration: none;
      }    
}

.no-visual-search {
    pointer-events: none;
}

/* img { img:hover vil ikke virke med denne
    pointer-events: none;
} */

img { /*selectDisable */
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* HEADER start */
header {
    display: flex;
    justify-content: center;
    align-items: baseline;
    text-transform: uppercase;
    white-space: nowrap;
}

.header {
    grid-area: 1 / 2 / 3 / 3;
    display: grid;
    grid-template-columns: 7fr 0fr 4fr;
    grid-template-rows: auto;
    grid-template-areas: 'venstretop toptext meny';
}

.header > h1 {
    text-align: center;
    grid-area: venstretop;
    padding-bottom: 0px;
    padding-right: 55%;
    margin-bottom: 0px;
    margin-top: 50px;

    font-family: nimbus-roman, serif;
    font-weight: 400;
    font-size: 1.3em;
    font-style: normal;
    letter-spacing: 0.08em;
}

.header > nav {
    font-family: nimbus-roman, serif;
    font-size: 0.8em;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.08em;
}

@media (max-width: 1024px) { /*mobile*/
    .header > h1 {
        text-align: left;
        margin-left: 14px;
        margin-top: 26px;
        font-size: 1.2rem;
    }

    .top {
        position: sticky;
        top: 0;
        z-index: 999;
        background: var(--color-bg-not-transparent);
    }
}

.header > h1 > a {
    text-decoration:none;
    color:black;
}

.header .sidebar {
    grid-area: meny;
    text-align: right;
    /* border: 1px solid red; */
    padding-right: 30px;
}

.header .sidebar ul {
    list-style: none;
}

.header .sidebar > ul li {
    text-transform: uppercase;
    display: inline;
    margin-left: 0;
    margin-right: 0.4em;
}

.header .sidebar > ul li a {
    text-decoration:none;
}

.sidebarvalgt {
    text-decoration: overline;
    text-decoration-thickness: 2px;
}

hr {
    border: none;
    height: 1px;
    /* Set the hr color */
    color: #333; /* old IE */
    background-color: #333; /* Modern Browsers */
}

@media (min-width: 1025px) { /*desktop*/
    .top > div > hr {
        border: none;               /* Remove any default borders */
        border-top: 1px solid #333; /* Define a 1px top border as the line */
        height: 0;                  /* Ensure no extra height is added */
        margin: 0;                  /* Reset margins */
        position: relative;
        top: -10px;                 /* Your desired upward shift */
    }
}

/* HEADER end */

.bottom > div > hr {
    opacity: 0.3;
}

/* MAINGRID */

@media (min-width: 1025px) { /*desktop*/
    maincontact.main {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr) 100px;
        grid-template-rows: auto;
        grid-template-areas: 'mainvenstre mainbilder mainhoyre';
    }
    mainalbums.main {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr) 100px;
        grid-template-rows: auto;
        grid-template-areas: 'mainvenstre mainbilder mainhoyre';
    }
    maingallery.main {
        display: grid;
        grid-template-columns: 0px minmax(0, 1fr) 0px;
        grid-template-rows: auto;
        grid-template-areas: 'mainvenstre mainbilder mainhoyre';
    }
}

/* CONTACT */

/* ABOUT */

@media (min-width: 1025px) {
    .main .contact {
        grid-area: mainbilder;
        margin-top: 70px;
    }

    .contact {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 20px;
    }
    .main > div.contact > div.bilde {
        /* border: 1px solid blue; */
        text-align: right;
    }

    .main > div.contact > div.bilde > img {
        object-fit: scale-down;
        aspect-ratio: 1;
        height: calc(100vh - 18rem);
        padding-left: 100px;
    }

    .main > div.contact > .tekst {
        display: flex; 
        align-items: center; 
        letter-spacing: 0.08em;
        padding-right: 100px;
        /* justify-content: center;  optional */
    }
}

@media (max-width: 1024px) {

    .contact {
        margin: 20px 13px 10px 13px;

        display: flex;
        flex-direction: column;

        font-family: nimbus-roman, serif;
        font-weight: 400;
        font-style: normal;
        letter-spacing: 0.08em;
        /* background-color: aquamarine; */
    }

    .contact .bilde {
        order: 1;
    }
    .contact .tekst {
        order: 0;
        letter-spacing: 0.08em;
        /* font-family: "minion-pro",serif; */
    }

    .main > div.contact > div.bilde > img {
        width: 100%;
    }

    .main > div.contact > .tekst {
        padding-right: 100px;
    }

    /* .contact  {
        font-family: "minion-pro",serif;
        background-color: aqua;
        height: 1000px;
    } */

}

/* ALBUMS start */

@media (min-width: 1025px) {
    .main .albums {
        grid-area: mainbilder;

        margin-top: 40px;
        margin-bottom: 40px;
        margin-left: 5%;
        margin-right: 5%;
        --grid-layout-gap: 55px;
        --grid-column-count: 3;
        --grid-item--min-width: 150px;

        display: grid;
        /* Calculated values. */
        --gap-count: calc(var(--grid-column-count) - 1);
        --total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));
        --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));
        grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr));
        grid-gap: var(--grid-layout-gap);
        row-gap: 10px;
    }

    .main > .albums .albumbilde {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 150px;

        /* background: lightblue; */
        font-size: 13px;
        aspect-ratio: 1;

        /* outline: 1px solid blue; */
    }

    .albumbilde img {
        object-fit: scale-down;
        width: 100%;
        height: auto;
        transition: transform 0.3s ease; /* Smooth transition for scaling */
    }

    .albumbilde img:hover {
        transform: scale(1.05); /* Slightly enlarge the image on hover */
        width: 100%;
    }

    .albumbildetekst {
        font-family: "adobe-caslon-pro", serif;
        font-weight: 600;
        font-size: 11px;
        letter-spacing: 0.10em;
        font-style: normal;
        text-align: left;
        width: 100%;
        margin-top: 10px; /* Add space between the image and the text */        
      }    

}

@media (max-width: 1024px) {

    .main .albums {
        margin: 30px 13px 10px 13px;
    }

    .main > .albums .albumbilde {
        /* outline: 1px solid blue; */
        margin-bottom: 25px;
    }

    .main .albumbilde img {
         width: 100%;
    }

    .hovercap {
        text-transform: uppercase;
        margin-left: 6px;
    
        font-family: nimbus-roman, serif;
        font-weight: 400;
        font-style: normal;
        font-size: 12px;
        letter-spacing: 0.08em;
        text-align: center;

    }

    .main > .albums a {
        text-decoration:none;
        color:black;
    }

}
/* ALBUMS end */

/* GALLERY start */

@media (min-width: 1025px) { /*desktop*/
    .main .gallery {
        grid-area: mainbilder;
        margin-top: 5%;
    }

    .gallery {
        position: relative;
        width: 100%;
        padding: 0 20px;
        overflow-x: hidden;
    }

    .gallery {
        display: flex; /* Use flexbox layout */
        flex-direction: column; /* Stack children vertically */
        align-items: center; /* Center children horizontally */
        width: 90%; /* Adjust based on preference */
        margin: auto;
        overflow: hidden; /* Keep everything neat */
    }
    
    .galleryitems {
        height: 67vh; /* Adjust based on preference */
        width: 100%; /* Take full width of the gallery */
        position: relative; /* Positioned context for images */
        display: flex; /* Flex container for centering images */
        justify-content: center; /* Center images horizontally */
        align-items: center; /* Center images vertically */
    }
    
}

@media (max-width: 1024px) { /*mobile*/

    .gallery {
        display: flex; /* Use flexbox layout */
        flex-direction: column; /* Stack children vertically */
        align-items: center; /* Center children horizontally */
        width: 90%; /* Adjust based on preference */
        margin: auto;
        overflow: hidden; /* Keep everything neat */
    }
    
    .galleryitems {
        height: 60vh; /* Adjust based on preference */
        width: 100%; /* Take full width of the gallery */
        position: relative; /* Positioned context for images */
        display: flex; /* Flex container for centering images */
        justify-content: center; /* Center images horizontally */
        align-items: center; /* Center images vertically */
    }
    
}

.galleryitems .galleryitem {
    position: absolute; /* Absolute positioning to stack images */
    width: 100%; /* Full width of parent */
    height: 100%; /* Full height of parent */
    opacity: 0;
    transition: opacity 0.9s ease;
    display: flex; /* Flexbox for centering image */
    flex-direction: column;  /* Stack children vertically */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

/* Ensure the image doesn’t take up all the space, leaving room for text */
.galleryitems .galleryitem img {
    max-width: 100%;
    /* 
       Reduce max-height to leave space for the text.
       Adjust the subtraction (e.g. 40px) as needed.
    */
    max-height: calc(100% - 40px);
    object-fit: contain;
}

/* Style the new text container; adjust margin, font, etc., as desired */
.galleryitems .galleryitem > div {
    margin-top: 10px;  /* Spacing between the image and the text */
    text-align: center;
    font-family: nimbus-roman, serif;
    font-size: 16px;  /* Adjust font-size as needed */
    color: #333;      /* Adjust text color as needed */
}

.galleryitems .galleryitem div {
    /* You can style the text container as needed */
    margin-top: 5px; /* Optional spacing between image and text */
    text-align: center; /* Optional centering */
}

.galleryitems .galleryitem.active {
    opacity: 1;
}

.galleryitems .galleryitem img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure images fit without distortion */
}

.gallery-text-wrapper {
    display: flex;
    justify-content: space-between; /* Adjust to spread children apart */
    width: 100%;
    padding: 5px 0; /* Add some padding above and below the text */
}

@media (min-width: 1025px) { /*desktop*/
    .gallery-text-wrapper {
        justify-content: flex-start; /* Med denne kommer sidenummerering rett etter tekst */
    }
}

/* Style text elements without absolute positioning to ensure visibility */
.galleryinfo, .gallerypagenumber {
    padding: 5px;
    text-align: center; /* Center text */
    font-family: nimbus-roman, serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
}

/* Use flexbox utilities to position text elements on either end */
.galleryinfo {
    align-self: flex-start; /* Align to the start (left) */
    text-align: left; /* Left align text */
}

.gallerypagenumber {
    align-self: flex-start; /* Align to the end (right) */
    text-align: right; /* Right align text */
}

/* GALLERY end */

/* FOOTER */
footer {
    grid-area: footer;
}

footer > p {
    text-align: center;
    opacity: 0.3;
    margin-top: -3px;
}


/* HAMBURGER MENU start */
.menu {
    grid-area: meny; /*1 / 3 / 2 / 4;*/
    display: flex;
    justify-content:flex-start;
    align-items: center;
    height: 50px;
    padding: 0 20px;
}

.menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li {
    margin-left: 20px;
}

.menu a {
    text-decoration: none;
    color: #333;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 25px;
    background-color: #333;
    margin-bottom: 5px;
}

.hamburger span:nth-child(3) {
    width: 20px;
    margin-left: 5px;
}

@media (max-width: 1024px) {
    .menu {
        justify-content: space-between;
    }

    .menu ul {
        display: none;
        position: absolute;
        top: 64px;
        right: 0;
        background-color: #f2f2f2;
        width: 100%;
        text-align: center;
    }

    .menu ul.active {
        display: flex;
        flex-direction: column;
    }

    .menu li {
        margin: 10px 0;
    }

    .hamburger {
        display: block;
        position: absolute; 
        right: 20px;
        top: 32px;
        transform: none;
    }

}

.hamburger span {
  position: relative; /*unødvendig*/
  width: 25px; /* Ensure this matches your existing bar width for consistency */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Reset transformations when not active to ensure smooth animation */
.hamburger span:nth-child(1) {
    transform: rotate(0) translateY(0) translateX(0);
}

.hamburger span:nth-child(2) {
    transform: rotate(0) translateY(0) translateX(0);
}

.hamburger span:nth-child(3) {
    opacity: 1; /* Ensure full opacity when not active */
}

/* Transformation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(5px) translateX(5px);
}

.hamburger.active span:nth-child(2) {
    transform: rotate(-45deg);
}

.hamburger.active span:nth-child(3) {
  opacity: 0;
}


/* HAMBURGER MENU end */

  /*FONT*/
  /*
 * The Typekit service used to deliver this font or fonts for use on websites
 * is provided by Adobe and is subject to these Terms of Use
 * http://www.adobe.com/products/eulas/tou_typekit. For font license
 * information, see the list below.
 *
 * adobe-caslon-pro:
 *   - http://typekit.com/eulas/000000000000000000012d68
 *   - http://typekit.com/eulas/000000000000000000012d67
 * minion-pro:
 *   - http://typekit.com/eulas/0000000000000000000151d6
 * nimbus-roman:
 *   - http://typekit.com/eulas/000000000000000077359eed
 *
 * © 2009-2022 Adobe Systems Incorporated. All Rights Reserved.
 */
/*{"last_published":"2022-12-09 18:01:59 UTC"}*/

@import url("https://use.typekit.net/luh1fgy.css");

@import url("https://p.typekit.net/p.css?s=1&k=awb8pie&ht=tk&f=8482.8483.6817.12289&a=4500287&app=typekit&e=css");

@font-face {
font-family:"adobe-caslon-pro";
src:url("https://use.typekit.net/af/3cbd9b/000000000000000000012d68/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/3cbd9b/000000000000000000012d68/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/3cbd9b/000000000000000000012d68/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:400;font-stretch:normal;
}

@font-face {
font-family:"adobe-caslon-pro";
src:url("https://use.typekit.net/af/200aad/000000000000000000012d67/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),url("https://use.typekit.net/af/200aad/000000000000000000012d67/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),url("https://use.typekit.net/af/200aad/000000000000000000012d67/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
font-display:auto;font-style:italic;font-weight:400;font-stretch:normal;
}

@font-face {
font-family:"minion-pro";
src:url("https://use.typekit.net/af/1286c7/0000000000000000000151d6/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/1286c7/0000000000000000000151d6/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/1286c7/0000000000000000000151d6/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:400;font-stretch:normal;
}

@font-face {
font-family:"nimbus-roman";
src:url("https://use.typekit.net/af/019711/000000000000000077359eed/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/019711/000000000000000077359eed/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/019711/000000000000000077359eed/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:400;font-stretch:normal;
}

.tk-adobe-caslon-pro { font-family: "adobe-caslon-pro",serif; }
.tk-minion-pro { font-family: "minion-pro",serif; }
.tk-nimbus-roman { font-family: "nimbus-roman",serif; }
