/* =============================
   RESET & ROOT
   ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --heading-font: "Montserrat", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #121212;
    overflow-x: hidden;
}

main {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

h1 {
    font-family: var(--heading-font);
    text-align: center;
    margin-top: 150px;
    color: aliceblue;
}

/* =============================
   HEADER & NAVIGATION
   ============================= */
header {
    height: 125px;
    width: 100%;
    position: fixed;
    display: flex;
    align-items: center;
    z-index: 100;
    background-image: linear-gradient(to bottom, black, transparent);
}

#header-logo-div {
    display: flex;
    align-items: center;
    width: 100px;
}

#header-logo {
    height: 75px;
    margin-left: 25px;
}

#nav-header {
    color: aliceblue;
    display: flex;
    justify-content: center;
    width: calc(100% - 75px);
    margin-right: 20px;
}

#nav-ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 50px;
    width: 100%;
    font-family: var(--heading-font);
}

.nav-li {
    font-weight: 500;
    color: aliceblue;
}

.navigation {
    position: relative;
}

.navigation::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.1s ease-in-out;
}

.navigation:hover::after {
    transform: scaleX(1);
}

#nav-button {
    display: none;
}

#nav-sidebar {
    display: none;
}

#sidebar-overlay {
    display: none;
}

/* =============================
   HERO
   ============================= */
#hero {
    position: relative;
    width: 100%;
    height: 625px;
    overflow: hidden;
    background: #1a0000;
}

#hero-message {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 0 20px;
    margin-top: 200px;
    color: white;
    font-family: var(--heading-font);
    font-size: 1.5rem;
}

#hero-slides {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease;
    font-family: var(--heading-font);
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
    padding: 0 80px;
    background: linear-gradient(to right, #000 40%, transparent);
}

.hero-slide img {
    height: 380px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.hero-info {
    color: white;
}

.hero-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-info .genre {
    color: #aaa;
    margin-bottom: 6px;
}

.hero-info .runtime {
    color: #aaa;
    margin-bottom: 16px;
}

.hero-info .next {
    color: #e50914;
    font-weight: 600;
    margin-bottom: 20px;
}

#hero-prev,
#hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 4px;
}

#hero-prev {
    left: 16px;
}

#hero-next {
    right: 16px;
}

#hero-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.hero-dot.active {
    background: #e50914;
}

/* =============================
   MOVIE CARDS
   ============================= */
#current-movies-anchor {
    color: aliceblue;
}

#current-movies-container {
    display: flex;
    width: 95%;
    margin-left: 2.5%;
    justify-content: space-evenly;
    flex-wrap: wrap;
    margin-top: 50px;
    gap: 20px;
    padding-bottom: 40px;
}

#no-movies-message {
    color: #9f9f9f;
    margin-bottom: 20px;
    font-family: var(--heading-font);
    text-align: center;
    width: 100%;
}

.current-movie {
    display: flex;
    flex-direction: column;
    width: 300px;
    background: #1c1c1c;
    color: white;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.12);
    font-family: var(--heading-font);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.current-movie:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 35px rgba(255, 0, 0, 0.2);
}

.movie-poster {
    width: calc(100% - 2rem);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 5px;
    margin: 1rem;
}

.movie-name {
    font-size: 1.5rem;
    font-weight: 500;
    min-height: 60px;
    margin: 0 1rem;
}

.movie-genre {
    font-size: 1rem;
    min-height: 3rem;
    color: #9f9f9f;
    margin: 0 1rem;
}

.movie-runtime {
    color: #ffffff;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
    margin: 0 1rem 0.5rem 1rem;
}

.movie-next-time-text {
    color: #9f9f9f;
    margin: 0 0 0.5rem 1rem;
}

.movie-next-time-date {
    font-size: 1.25rem;
    color: red;
    margin: 0 0 1rem 1rem;
}

.movie-booking-link {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: auto;
}

.movie-booking {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    background-color: red;
    border-radius: 5px;
    margin: 0 1rem 1rem 1rem;
}

.movie-info {
    width: 100%;
    text-align: center;
    color: red;
    margin-bottom: 1rem;
    cursor: pointer;
}

/* =============================
   MODAL
   ============================= */
#modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

#modal-overlay.active {
    display: flex;
}

#modal {
    display: flex;
    gap: 30px;
    width: 90%;
    max-width: 700px;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 30px;
    font-family: var(--heading-font);
    position: relative;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#modal-poster {
    height: 300px;
    border-radius: 8px;
}

#modal-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    color: white;
}

#modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
}

#modal-handling {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 8px;
}

#modal-regissor,
#modal-skadespelare {
    color: #9f9f9f;
    font-size: 0.85rem;
}

#modal-book {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: calc(100% - 2rem);
    background-color: red;
    border-radius: 5px;
    margin: auto 1rem 1rem 1rem;
}

/* =============================
   FOOTER
   ============================= */
footer {
    display: grid;
    grid-template-rows: auto 1fr;
    background-color: #1c1c1c;
    margin-top: 50px;
}

#footer-first {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

#footer-second {
    text-align: center;
    color: #666;
    font-size: 0.75rem;
    padding: 10px 0;
}

#footer-logo {
    grid-column: 1/2;
}

#footer-logo>img {
    width: 150px;
    margin: 20px 0 0 20px;
}

#footer-nav {
    grid-column: 2/3;
    display: flex;
    justify-content: center;
    align-items: center;
}

#footer-nav>ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    font-family: var(--heading-font);
    font-weight: 500;
    color: white;
}

#footer-info {
    grid-column: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    font-family: var(--heading-font);
    font-weight: 500;
    color: aliceblue;
}

#footer-social-media {
    grid-column: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: aliceblue;
}

/* =============================
   MEDIA QUERIES
   ============================= */
@media (max-width: 750px) {
    header {
        justify-content: space-between;
    }

    #header-logo {
        height: 60px;
    }

    #nav-header {
        display: none;
    }

    #nav-button {
        display: none;
        color: white;
        font-size: 2.6rem;
        margin-right: 20px;
    }

    #nav-button.active {
        display: block;
    }

    #nav-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 60%;
        max-width: 225px;
        height: 100vh;
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: black;
        z-index: 999;
        animation: popIn 0.3s ease;
    }

    #nav-sidebar.active {
        display: flex;
    }

    #nav-sidebar>i {
        position: fixed;
        top: 16px;
        right: 175px;
        color: white;
        font-size: 1.75rem;
        cursor: pointer;
    }

    #nav-sidebar>ul {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 50px;
        width: 82%;
        height: 100vh;
        list-style: none;
        color: white;
    }

    #nav-sidebar>ul>li {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100px;
        font-size: 1.25rem;
        font-family: var(--heading-font);
        font-weight: 600;
        color: white;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(120, 0, 0, 0.4), rgba(40, 0, 0, 0.6));
        border: 1px solid rgba(220, 0, 0, 0.5);
        box-shadow: 0 0 12px rgba(200, 0, 0, 0.5), inset 0 0 12px rgba(180, 0, 0, 0.2);
    }

    #sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 10;
    }

    #sidebar-overlay.active {
        display: block;
        animation: popIn 0.3s ease;
    }

    .current-movie {
        width: 210px;
    }

    .movie-booking-link {
        font-size: 1.2rem;
    }
}

@media (max-width: 615px) {
    #current-movies-anchor {
        margin-top: 75px;
    }

    #hero {
        height: auto;
        min-height: 700px;
    }

    #hero-slides {
        align-items: flex-start;
    }

    .hero-slide {
        flex-direction: column;
        min-height: 700px;
        padding: 160px 20px 20px 20px;
        background: linear-gradient(to bottom, #000 40%, transparent);
    }

    .hero-slide img {
        height: 300px;
        width: auto;
    }

    .hero-info {
        text-align: center;
    }

    #modal {
        flex-direction: column;
        align-items: center;
        overflow-y: auto;
        max-height: 90vh;
    }

    #modal-poster {
        width: 100%;
        max-width: 250px;
        height: auto;
    }

    #footer-first {
        display: flex;
        flex-direction: column;
        gap: 50px;
    }

    #footer-logo {
        display: flex;
        justify-content: center;
        margin-top: 50px;
    }

    #footer-logo>img {
        margin: 0;
    }
}

@media (max-height: 675px) {
    #nav-sidebar>ul {
        margin-top: 20px;
        gap: 20px;
    }

    #nav-sidebar>ul>li {
        height: 15%;
    }
}