/* Reset some default styles */
body, h1, h2, h3, p, ul {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Set font and base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    overflow: unset;
    flex-direction: column;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #444 #e7e7e7; /* Firefox */
}

/* Custom scrollbar styles for Webkit browsers */
::-webkit-scrollbar {
    width: 12px; /* Width of the scrollbar */
}

::-webkit-scrollbar-thumb {
    background-color: #444; /* Scrollbar color */
}

::-webkit-scrollbar-track {
    background: transparent; /* Background of the scrollbar */
}

::-webkit-scrollbar-button {
    width: 0;
    height: 0;
    display: none; /* Hide the scrollbar arrows */
}

/* Ensure the scrollbar is always visible */
body {
    scrollbar-gutter: stable;
}

header {
    background: #222;
    color: white;
    padding: 1em 0;
    text-align: center;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav {
    position: sticky;
    background: #222;
    z-index: 100;
    padding: 10px;
    top: 0;
}

/* Navigation styles */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li {
    position: relative;
    background: none;
    border-radius: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5em 1em;
    display: block;
    transition: background 0.3s, color 0.3s;
    font-weight: bold;
}

.sub-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #444;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sub-nav li {
    display: block;
    margin: 0;
}

.sub-nav li a {
    padding: 0.5em 1em;
    white-space: nowrap;
    width: 100%;
    display: block;
    transition: background 0.3s, color 0.3s;
    font-weight: bold;
    background: white;
    color: #333;
    text-align: left;
}

.sub-nav li a:hover {
    background: #333;
    color: white;
}

/* Show the submenu when hovering over the parent menu item */
nav ul li:hover .sub-nav {
    display: block;
}

.nav-links.active {
    display: flex;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 2px 0;
    transform-origin: left;
    transition: width .1s ease, transform .1s ease;
}

/* Main content styles */
main {
    padding: 2em;
    background: white;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
}

h2 {
    margin-bottom: 1em;
    font-size: 2em;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
    line-height: 1.8;
}

ul {
    list-style-type: none;
}

ul li {
    margin: 0.5em 0;
    transition: background 0.3s;
}

main ul li a {
    display: block;
    padding: 1em;
    color: #333;
    background: #ddd;
    border-radius: 10px;
    text-decoration: none;
    transition: color 0.3s;
}

main ul li a:hover {
    background: #eee;
    color: #222;
}

/* Footer styles */
footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 1em 0;
    width: 100%;
    box-shadow: 0 -4px 2px -2px gray;
    margin-top: auto;
}

footer p {
    margin: 0;
}

/* Cards styling */
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 1em;
}

.card {
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: calc(33.333% - 40px);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.card h3 {
    margin-top: 0;
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5em;
    margin-bottom: 0.5em;
    color: #333;
}

.card p {
    margin-bottom: 0.5em;
    color: #666;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Buttons and form elements */
button, .button {
    background: #333;
    color: white;
    border: none;
    padding: 0.5em 1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}

button:hover, .button:hover {
    background: #555;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 1em;
}

form {
    max-width: 600px;
    margin: 0 auto;
}

/* Additional styles for overall site aesthetics */
header, footer {
    font-family: 'Montserrat', sans-serif;
}

h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    width: 100%;
}

p, ul li {
    font-family: 'Roboto', sans-serif;
}

/* Ensuring main content fills the width until max-width is reached */
main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    padding: 2em;
    box-sizing: border-box;
}

/* Media query for larger screens */
@media (min-width: 1200px) {
    main {
        margin: 20px auto;
    }
}

/* Large ad banner styles */
.banner {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    aspect-ratio: 5 / 1;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.mySlides {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 5 / 1;
}

.dots-container {
    text-align: center;
    position: absolute;
    bottom: 10px;
    width: 100%;
}

.dot {
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.active-dot {
    background-color: #717171;
}

.hero {
    background: linear-gradient(to bottom, rgba(10,10,10,.5), rgba(30,30,30,.5)), url(/images/sbhm_photo.jpg);
    color: white;
    padding: 100px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.hero .button {
    font-size: 1.2em;
    padding: 10px 20px;
    background: #0056b3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.hero .button:hover {
    background: #003f7f;
}

.movie-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
}

.movie-list-section {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
}

.movie {
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    max-width: 250px;
    width: 100%;
    box-sizing: border-box;
}

.movie img {
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
}

.movie.list h2 {
    font-size: 1.2em;
    margin: 10px 0;
}

.movie h2 {
    font-size: medium;
}

.movie p {
    text-overflow: ellipsis;
    max-height: 100px;
    overflow: hidden;
    text-align: justify;
    hyphens: auto;
    font-size: small;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.movie.highlight {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    background: #333;
    color: white;
    flex: unset;
}

.movie.highlight:nth-of-type(1) {
    max-width: 1000px;
}

div.page-hero {
    height: 300px;
    display: flex;
    align-items: flex-start;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    color: white;
    padding: 0;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 30px;
}

div.page-hero.cinema {
    background-image: url(/images/sbhm_cinema.jpg);
}

div.page-hero h2 {
    width: 100%;
    padding: 0;
    padding-left: 30px;
    margin: 0;
    background: rgba(20, 20, 20, .7);
}

div.page-hero p {
    padding-left: 30px;
    background: rgba(255, 255, 255, .7);
    width: 100%;
    color: #222;
}

/* Contact Form Styles */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #222;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.contact-form-container input,
.contact-form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.contact-form-container button {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.contact-form-container button:hover {
    background: #555;
}

#form-message {
    margin-top: 20px;
    font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav:has(.nav-links.active) {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }
    
    nav:has(.nav-links.active) .line:nth-of-type(1) { 
        transform-origin: left;
        transform: rotate(40deg);
    }
    
    nav:has(.nav-links.active) .line:nth-of-type(2) { 
        width: 0;
        transform-origin: center;
        transform: scaleX(0);
    }
    
    nav:has(.nav-links.active) .line:nth-of-type(3) { 
        transform-origin: left;
        transform: rotate(-40deg) translateY(2px);
    }
    
    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #222;
        flex-direction: column;
        align-items: center;
        display: none;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        overflow: scroll;
        bottom: 0;
        top: 40px;
        z-index: 200;
        height: calc(100vh - 40px);
        width: 100vw;
    }

    .nav-links li {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .nav-links a {
        padding: 1em 0;
        width: 100%;
    }
    
    .nav-links.active .sub-nav {
        position: relative;
        width: 100%;
        box-sizing: border-box;
        top: 0;
    }
    
    .nav-links.active .sub-nav a {
        padding: 1em 0;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }
    
    main {
        padding: 0;
    }
    
    .banner {
        border-radius: 0;
    }
    
    .hero {
        border-radius: 0;
    }
    
    p, h2 {
        padding: 10px;
    }
    
    div.page-hero {
        border-radius: 0;
    }
    
    .cards {
        flex-direction: column;
        align-items: stretch;
    }

    .card {
        width: 100%;
    }
}
