/* Box sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/*Body*/

body {
    background-color: #1a1a1a;
    margin: 0;
    padding: 0;
    /* font-family: 'Open Sans', 'Segoe UI', 'Trebuchet MS', sans-serif; */
    font-family: Helvetica, Roboto;
    font-size: 16px;
    color: #e0e0e0;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* html {
    scroll-snap-type: y mandatory;
} */

.backgroundslides {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: backgroundSlide 20s infinite;
    background-image: url('../img/background/MURB_Space-20190511-0076-HQ-sRGB-1920x1080.jpg');
    z-index: -3;
    opacity: 1;
}

.backgroundblack {
    background-color: #000000;
    opacity: 0.7;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/*Headers*/
h1,h2 {
    color: #dddddd;
    font-weight: 200;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

p {
    color: #d6d6d6;
    line-height: 1.6em;
    font-size: 1.15em;
    font-weight: 100;
}

/*Links*/
a {
    color: #d6d6d6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #bbbbbb;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/*Menu*/
.menu {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1200px;
    min-width: unset;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    z-index: 1000;
    opacity: 1;
    animation-name: fadeIn;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 5s;
}

.menu a {
    margin: 0 10px;
    color: #bbbbbb;
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.1em;
    font-weight: 500;
    border: solid;
    border-color: rgba(44, 44, 44, 0);
    border-width: 1px;
    backdrop-filter: blur(5px);
    min-width: 100px;
    text-align: center;
}

.menu a:hover {
    border: solid;
    border-color: rgba(255, 255, 255, 0.5);
    border-width: 1px;
    text-decoration: none;
    animation: borderFadeIn 0.2s ease-out forwards;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    padding: 15px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.submenu a {
    text-align: left;
    border: none;
    font-size: 1.1em;
    min-width: 110px;
    line-height: 1.4em;
}

.submenu-wrapper:hover .submenu {
    opacity: 1;
    visibility: visible;
}

/*Wrapper*/
.wrapper {
    max-width: 1200px;
    margin: 100px auto 50px auto; /*top right bottom left*/
    padding: 0 20px;
}

.wrapper-inner {
    animation-name: fadeIn;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 5s;
    animation-fill-mode: forwards;
}

.submenu-wrapper {
    position: relative;
}

/*Sections*/
.header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    /* margin-top: 0; */
    margin: 0 0 50px 0;
}

.header img {
    max-width: 600px;
    opacity: 1;
    animation-name: fadeIn;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 4s;
    animation-fill-mode: forwards;
}

.header h2 {
    opacity: 1;
    animation-name: fadeIn;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 4s;
    animation-fill-mode: forwards;
}

.header-wrapper {
    margin-top: -20%;
}

.separator {
    height: 70px;
}

.About, .Legacy, .LegacySub {
    display: flex;
    flex-direction: column;
    padding: 10px 30px 30px 30px;
    /*top right bottom left*/
    min-height: auto;
    background-color: rgba(44, 44, 44, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    /* scroll-snap-align: start;
    scroll-snap-stop: always; */
}

.LegacySub p {
    display: block;
}

.Contact {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 30px 30px 30px;
    /*top right bottom left*/
    min-height: auto;
    background-color: rgba(44, 44, 44, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    /* scroll-snap-align: start;
    scroll-snap-stop: always; */
}

.Contact .social-media img {
    max-height: 40px;
    max-width: 40px;
    display: inline-block;
    /* padding: 10px 10px 30px 0px; */
    /*top right bottom left*/
    margin: 10px 10px 20px 0px;
    transition: transform 0.3s ease;
}

.Contact .social-media a:hover img {
    transform: scale(1.2);
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    margin-top: 20px;
    z-index: 999;
}

.footer p {
    font-size: 1em;
    color: #717171;
    opacity: 0.5;
    z-index: 999;
}

.legacythumbnails {
    display: flex;
    margin-bottom: 1.5em;
    gap: 5em;
    justify-content: center;
}

.legacythumbnails img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.legacythumbnails img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0,0,0,0.85);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5em;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

video {
    max-width: 100%;
    display: block;
}

/*Keyframe Animations*/
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes backgroundSlide {
    0% {
        background-image: url('../img/background/MURB_Space-20190511-0076-HQ-sRGB-1920x1080.jpg');
    }

    50% {
        background-image: url('../img/background/MURB_Space-20190606-0035-HQ-sRGB-1920x1080.jpg');
    }
}

@keyframes borderFadeIn {
    0% {
        border-color: rgba(255, 255, 255, 0);
    }

    100% {
        border-color: rgba(255, 255, 255, 0.5);
    }
}

/*Responsive Design*/
@media (max-width: 768px) {

    /* Hamburger menu */
    .hamburger {
        display: flex;
        position: fixed;
        top: 18px;
        right: 18px;
    }

    .menu {
        flex-direction: column;
        align-items: flex-start;
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 70px 20px 20px 20px;
        background: rgba(15, 15, 15, 0.97);
        backdrop-filter: blur(12px);
        /* hidden by default, toggled by JS */
        display: none;
        z-index: 1050;
        /* Cancel inherited fadeIn animation so menu appears instantly */
        animation: none;
        opacity: 1;
    }

    .menu.open {
        display: flex;
    }

    .menu a {
        width: 100%;
        text-align: left;
        margin: 4px 0;
        padding: 12px 16px;
        font-size: 1.1em;
        min-width: unset;
        border-color: rgba(255,255,255,0.08);
    }

    /* Submenu on mobile */
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        padding: 0 0 0 20px;
        display: none; /* toggled by JS tap */
    }

    .submenu.open {
        display: block;
    }

    .submenu a {
        font-size: 1em;
        padding: 8px 16px;
        display: block;
        width: 100%;
    }

    /* Header wrapper */
    .header-wrapper {
        margin-top: 0;
    }

    .wrapper {
        margin: 80px auto 30px auto;
    }

    .header img {
        max-width: 90%;
    }

    /* Thumbnails */
    .legacythumbnails {
        gap: 1.5em;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {

    /* Font sizes */
    h2 {
        font-size: 1.5em;
    }

    p {
        font-size: 1em;
    }

    /* Section padding */
    .About,
    .Legacy,
    .LegacySub,
    .Contact {
        padding: 10px 15px 20px 15px;
    }

    /* Thumbnails */
    .legacythumbnails {
        gap: 1em;
    }

    .legacythumbnails img {
        max-width: 130px;
        max-height: 130px;
    }
}