/* large devices (992px and up) */
@media only screen and (max-width: 600px) {
    @import url('https://fonts.googleapis.com/css2?family=Poppins-thin:wght@100&display=swap');

    .hidden {
        opacity: 0;
        filter: blur(5px);
        transition: all .7s;
    }
    @media(prefers-reduced-motion) {
        .hidden {
            transition: none;
        }
    }
    .show {
        opacity: 1;
        filter: blur(0);
        transition: all .7s;
    }

    h1 {
        font-family: Poppins, Helvetica, sans-serif;
        font-weight: 800;
        font-size: 24pt;
    }
    p {
        font-family: Poppins, Helvetica, sans-serif;
        font-weight: 800;
        font-size: 16pt;
    }
    footer p {
        font-family: Poppins, Helvetica, sans-serif;
        font-weight: 400;
        font-size: 10pt;
    }

    body {
        margin: 0px;
    }

    header {
        background-color: initial; /* Ensures no background color is set */
        color: inherit;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 5px;
        top: 0;
        position: sticky;
        z-index: 1000;
        max-width: 100vw;
        overflow-x: hidden;
        transition: color 0.3s;
    }
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    body.light-mode header, body.dark-mode header {
        background-color: initial; /* Ensures no background color is set */
        color: inherit;
        transition: color 0.3s;
    }
    .menu-toggle:hover {
        color: #979797;
    }

    nav ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        position: fixed;
        top: 0;
        left: -100%; /* Initially hidden off the screen */
        z-index: 1000;
        justify-content: center;
        align-items: center;
        transition: left 0.3s; /* Transition for sliding effect */
    }
    body.iceland-dark-mode nav ul {
        background-color: #000;
    }
    nav ul li {
        display: inline-block;
        position: relative;
        margin: 15px 10px;
    }
    nav ul li a {
        color: #000;
        text-decoration: none;
        font-family: 'Poppins', Helvetica, sans-serif;
        font-weight: 400;
        font-size: 24px;
        display: block;
    }
    nav ul li a:hover {
        color: #979797;
        transition: all .3s;
    }

    .iceland-light-mode .close-menu {
        color: #000;
    }
    .iceland-dark-mode .close-menu {
        color: #fff;
    }
    .close-menu:hover {
        color: #979797;
    }
    body.iceland-dark-mode .close-menu:hover {
        color: #979797;
    }

    body.iceland-light-mode .menu-toggle {
        color: #000;
    }
    body.iceland-dark-mode .menu-toggle {
        color: #fff;
    }

    body.iceland-light-mode {
        background-color: #ffffff;
        color: #000000;
        transition: background-color 0.3s;
    }
    body.iceland-dark-mode {
        background-color: #000000; /* Dark background color */
        color: #ffffff;
        transition: background-color 0.3s;
    }

    .logo {
        width: 30px;
        height: auto;
    }
    .logo:hover path {
        fill: #979797;
    }
    .logo #top {
        fill: #000; /* Change the color */
        opacity: 0.75; /* Change the opacity */
        transition: fill 0.3s ease, opacity 0.3s ease;
    }
    .logo #bottom {
        fill: #000; /* Change the color */
        opacity: 0.25; /* Change the opacity */
        transition: fill 0.3s ease, opacity 0.3s ease;
    }
    body.iceland-dark-mode .logo #top {
        fill: #fff;
        opacity: 0.75;
    }   
    body.iceland-dark-mode .logo #bottom {
        fill: #fff;
        opacity: 0.25;
    }


    body.iceland-dark-mode nav ul li a {
        color: #ffffff;
    }
    body.iceland-dark-mode nav ul li a:hover {
        color: #979797;
    }

    .theme-toggle {
        order: 1;
        cursor: pointer;
        width: 17px;
        height: auto;
    }

    .theme-toggle #moon path {
        fill: #000;
        width: 100%;
        height: 17px;
        transition: fill 0.3s ease;
    }
    .theme-toggle:hover #moon path {
        fill: #979797; /* Change color on hover */
    }

    body.iceland-dark-mode .theme-toggle #moon path {
        fill: #fff;
    }
    body.iceland-dark-mode .theme-toggle:hover #moon path {
        fill: #979797;
    }

    main, main * {
        transition: color 0.3s;
    }


    body.iceland-dark-mode main, 
    body.iceland-dark-mode main * {
        color: #ffffff;
    }

    #iceland_intro {
        display: flex;
        flex-direction: column;
        place-content: center;
        text-align: center;
        color: #000;
        width: 70%;
        height: 100vh;
        margin: 0 auto;
    }
    
    #iceland {
        max-width: 100vw; /* Constrain turntable section width */
        height: auto;
        overflow-x: hidden; /* Prevent horizontal scrolling within turntable section */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    
    .iceland-grid {
        display: flex;
        flex-direction: row;
    }
    .iceland-grid img{
        width: 100%;
    }
    .iceland-item {
        width: 33%;
    }
    .iceland-item:nth-child(2) {
        transition-delay: 200ms;
    }
    .iceland-item:nth-child(3) {
        transition-delay: 400ms;
    }

    .medium-iceland-grid {
        display: flex;
        flex-direction: row;
        width: 100%;
        height: auto;
        margin-bottom: -8px;
        overflow: hidden;
    }
    .medium-iceland-grid img {
        width: 100%;
    }
    .medium-iceland-item {
        width: 50%;
        height: auto;
    }
    .medium-iceland-item:nth-child(2) {
        transition-delay: 200ms;
    }

    .big-iceland-grid {
        display: flex;
        width: 100%;
    }
    .big-iceland-grid img {
        width: 100%;
    }
    .division {
        padding: 10% 0;
    }

    .ttu {
        font-weight: 400;
        font-size: 16pt;
    }

    #iceland-logo {
        max-width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .iceland-logo-image {
        width: 70%;
        height: auto;
        display: block;
        margin: 0 auto; /* Center the logo horizontally */
        transition: opacity 0.5s ease-in-out, fill 0.5s ease-in-out;
    }
    .iceland-logo-image.hidden {
        opacity: 0;
    }
    #iceland-logo-svg path {
        transition: fill 0.5s ease-in-out;
    }

    /* ---------- FOOTER ---------- */

    footer {
        text-align: center;
        padding: 10px 0;
        max-width: 100vw; /* Constrain footer width */
        overflow-x: hidden; /* Prevent horizontal scrolling within footer */
        color: #000;
        transition: color 0.3s;
    }
    body.iceland-dark-mode footer {
        color: #fff;
    }

    .iceland_nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 25pt;
        max-width: 100vw; /* Constrain turntable navigation width */
        overflow-x: hidden; /* Prevent horizontal scrolling within turntable navigation */
    }
    
    .iceland_arrow {
        color: #000;
        text-decoration: none;
        transition: color 0.3s;
    }
    .iceland_arrow:hover {
        color: #979797;
    }
    body.iceland-dark-mode .iceland_arrow {
        color: #fff;
    }
    body.iceland-dark-mode .iceland_arrow:hover {
        color: #979797; /* Highlight color on hover in dark mode */
    }

    .copyright {
        font-family: Poppins, Helvetica, sans-serif;
        font-weight: 300;
        font-size: 8pt;
    }
}