body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

header {
    background: linear-gradient(90deg, #1a1919, #2b2a2a);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 2rem; /* Increased font-size to use rem */
    font-weight: bold;
    text-shadow: 0.1rem 0.1rem 0.25rem rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 1rem 0;
    position: relative;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 1.25rem; /* Convert 20px to rem */
}

nav a {
    padding: 0.625rem 1rem; /* Convert px to rem */
    text-decoration: none;
    color: white;
    font-size: 1rem;
    display: inline-block;
    vertical-align: middle; /* Align vertically */
}

nav a:hover {
    text-decoration: underline;
}

/* Original styles */
h1 {
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.625rem 0;
    position: relative;
    top: 0;
    left: 30%;
    width: 38vw;
    z-index: 4;
    border-radius: 1.25rem; /* Convert 20px to rem */
    font-size: 3rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15vw, 1fr)); /* Convert 250px to vw */
    gap: 1rem; /* Convert 16px to rem */
    padding: 2rem;
    max-width: 75rem; /* Convert 1200px to rem */
    margin: auto;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    border-radius: 0.625rem; /* Convert 10px to rem */
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 0.75rem rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.625rem; /* Convert 10px to rem */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem; /* Adjusted font size for better readability */
    font-weight: bold;
    text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s;
    border-radius: 0.625rem; /* Convert 10px to rem */
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.dropdown {
    position: relative; /* Enables dropdown-menu to position relative to parent */
}

.dropdown-menu {
    display: none; /* Initially hidden */
    position: relative;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 0.625rem;
    border-radius: 0.3125rem; /* Convert 5px to rem */
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.2);
    margin-top: 0.3125rem; /* Convert 5px to rem */
    z-index: 1000;
    width: 9.375rem; /* Convert 150px to rem */
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 0.3125rem 0; /* Convert 5px to rem */
    font-size: 0.9rem;
    padding: 0.3125rem 0.625rem; /* Convert 5px and 10px to rem */
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.3125rem; /* Convert 5px to rem */
}

/* Display dropdown menu when hovering over parent .dropdown */
.dropdown:hover .dropdown-menu {
    display: block;
}

.content {
    position: relative; /* This allows the image to float relative to this container */
    padding: 1.25rem; /* Convert 20px to rem */
}

.floating-image {
    position: relative;
    bottom: 18vh; /* Using vh for vertical positioning */
    left: 2.5vw; /* Using vw for left positioning */
    width: 10vw; /* Using vw for responsive width */
    height: auto;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

header {
    background: linear-gradient(90deg, #1a1919, #2b2a2a);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 2rem; /* Increased font-size to use rem */
    font-weight: bold;
    text-shadow: 0.1rem 0.1rem 0.25rem rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 1rem 0;
    position: relative;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 1.25rem; /* Convert 20px to rem */
}

nav a {
    padding: 0.625rem 1rem; /* Convert px to rem */
    text-decoration: none;
    color: white;
    font-size: 1rem;
    display: inline-block;
    vertical-align: middle; /* Align vertically */
}

nav a:hover {
    text-decoration: underline;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15vw, 1fr)); /* Convert 250px to vw */
    gap: 1rem; /* Convert 16px to rem */
    padding: 2rem;
    max-width: 75rem; /* Convert 1200px to rem */
    margin: auto;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    border-radius: 0.625rem; /* Convert 10px to rem */
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 0.75rem rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.625rem; /* Convert 10px to rem */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem; /* Adjusted font size for better readability */
    font-weight: bold;
    text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s;
    border-radius: 0.625rem; /* Convert 10px to rem */
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.dropdown {
    position: relative; /* Enables dropdown-menu to position relative to parent */
}

.dropdown-menu {
    display: none; /* Initially hidden */
    position: relative;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 0.625rem;
    border-radius: 0.3125rem; /* Convert 5px to rem */
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.2);
    margin-top: 0.3125rem; /* Convert 5px to rem */
    z-index: 1000;
    width: 9.375rem; /* Convert 150px to rem */
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 0.3125rem 0; /* Convert 5px to rem */
    font-size: 0.9rem;
    padding: 0.3125rem 0.625rem; /* Convert 5px and 10px to rem */
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.3125rem; /* Convert 5px to rem */
}

/* Display dropdown menu when hovering over parent .dropdown */
.dropdown:hover .dropdown-menu {
    display: block;
}

.content {
    position: relative; /* This allows the image to float relative to this container */
    padding: 1.25rem; /* Convert 20px to rem */
}

/* For screens with a maximum width of 800px */
@media (max-width: 800px) {
    body {
        font-size: 1rem;
    }

    header {
        font-size: 1.8rem; /* Slightly smaller than default */
    }

    nav {
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
        width: 70vw;
        left: 15%;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(25vw, 1fr)); /* Adjust gallery grid */
    }
}

/* For screens with a maximum width of 1024px */
@media (max-width: 1024px) {
    body {
        font-size: 1.1rem;
    }

    header {
        font-size: 2rem; /* Default header size */
    }

    nav {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2.5rem;
        width: 60vw;
        left: 20%;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(20vw, 1fr)); /* Adjust gallery grid */
    }
}

/* For screens with a maximum width of 1280px and a max height of 720px */
@media (max-width: 1280px) and (max-height: 720px) {
    body {
        font-size: 1.2rem;
    }

    header {
        font-size: 2rem; /* Maintain standard size for medium screens */
    }

    nav {
        font-size: 1.2rem;
    }

    h1 {
        font-size: 2.5rem;
        width: 55vw;
        left: 22%;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(18vw, 1fr)); /* Adjust for larger small screens */
    }
}

/* For screens with a width of 1280px and above */
@media (min-width: 1281px) {
    body {
        font-size: 1.2rem;
    }

    header {
        font-size: 2rem; /* Default large header font-size */
    }

    nav {
        font-size: 1.2rem;
    }

    h1 {
        font-size: 3rem; /* Default h1 size */
        width: 38vw;
        left: 30%;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(15vw, 1fr)); /* Gallery grid remains responsive */
    }
}

/* Hamburger icon styles */
#hamburger-menu {
    display: none;  /* Hide the hamburger by default */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    position: relative; /* Ensure it's not hidden behind other elements */
    z-index: 10; /* Ensure it stays on top */
}

#hamburger-menu div {
    background-color: white;
    height: 4px;
    width: 100%;
    border-radius: 2px;
}

@media (max-width: 768px) {
    #hamburger-menu {
        display: flex;
        position: absolute;
        top: 5vh; /* Adjust if needed */
        right: 2vw; /* Adjust if needed */
        z-index: 1000;
    }

    .dropdown-menu {
        display: none; /* Hide by default */
        position: absolute; /* Position relative to the parent */
        top: 5vh; /* Adjust this to move the dropdown below the hamburger button */
        left: 35vw;
        background-color: rgba(0, 0, 0, 0.8); /* Dark background for contrast */
        padding: 10px;
        width: 100px; /* Set a fixed width for the dropdown menu */
        border-radius: 5px; /* Rounded corners */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Slight shadow for depth */
        z-index: 5; /* Make sure it's below the hamburger button */
    }

    .dropdown-menu a {
        color: white;
        text-decoration: none;
        display: block;
        margin: 0.3125rem 0; /* Convert 5px to rem */
        font-size: 0.9rem;
        padding: 0.3125rem 0.625rem; /* Convert 5px and 10px to rem */
        z-index: 6;
    }

    /* Make sure dropdown content is not stretched too much */
    .dropdown-menu ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 0.3125rem; /* Convert 5px to rem */
    }
    
    /* Display dropdown menu when hovering over parent .dropdown */
    .dropdown:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        padding: 8px;
        text-align: center;
    }

    .dropdown-menu li:hover {
        background-color: rgba(255, 255, 255, 0.2); /* Light hover effect */
    }

    .floating-image {
        position: relative;
        bottom: 17vh;
        left: -2vw;
        width: 10vw;
        height: 4.5vh;
        width: 20vw;
    }
}

/* For screens with a maximum width of 640px */
@media (max-width: 640px) {
    body {
        font-size: 0.875rem; /* Smaller font size for mobile devices */
    }

    header {
        font-size: 1.5rem; /* Smaller font-size in header */
    }

    nav {
        font-size: 0.9rem; /* Adjust nav font size */
    }

    h1 {
        font-size: 1.5rem; /* Reduce size of h1 */
        width: 80vw; /* Use 80% of viewport width */
        left: 1%; /* Align h1 more to the center */
    }
    .mobile {
        font-size: 0.7rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(30vw, 1fr)); /* Adjust for small screens */
    }

    .floating-image {
        position: relative;
        bottom: 0vh;
        left: 25vw;
        height: 9vh;
        width: 40vw;
    }
}
