/*
 * Responsive styles and mobile menu overlay
 *
 * This file contains styles to adapt the grid and navigation menu
 * for small screens.  It introduces a mobile menu overlay that
 * appears when the hamburger button is tapped, and defines flexible
 * widths for the movie cards so that archive and search grids remain
 * readable on phones.  The overlay uses a dark backdrop and slides
 * the menu in from the left.
 */

/* Mobile menu overlay hidden by default */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    display: block;
}

/*
 * The mobile menu panel slides in from the left.  Set a transform to move it
 * completely off screen when the overlay is hidden.  When the overlay
 * gains the 'active' class (set by our JS), the panel animates back to
 * its natural position.  The transition ensures a smooth slide.
 */
.mobile-menu-inner {
    width: 80%;
    max-width: 300px;
    background-color: #111;
    height: 100%;
    padding: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

/* When the overlay is active, slide the menu into view */
.mobile-menu-overlay.active .mobile-menu-inner {
    transform: translateX(0);
}

/* Close button inside the mobile menu */
.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

/* Ensure menu items stack vertically on mobile */
.mobile-menu-inner .primary-menu,
.mobile-menu-inner .primary-menu ul {
    display: block;
    margin: 0;
    padding: 0;
}

.mobile-menu-inner .primary-menu li {
    list-style: none;
    margin-bottom: 12px;
}

.mobile-menu-inner .primary-menu a {
    display: block;
    padding: 8px 12px;
    color: #ffffff;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.mobile-menu-inner .primary-menu a:hover,
.mobile-menu-inner .primary-menu .current-menu-item > a {
    background-color: rgba(220, 38, 38, 0.15);
    color: #ffffff;
}

/* Hide the desktop menu on small screens */
@media (max-width: 767px) {
    .navbar .nav-actions .primary-menu {
        display: none;
    }
}

/* Responsive grid for movie cards */
.section-title {
    font-size: 18px;
  font-weight: 600;
    margin: 10px 0px;

}

.movie-container {
    max-width: 1200px;
    margin: 10px auto;

}
section{margin-bottom :1rem;
    max-width: 100%;}
.nav-actions a{white-space:nowrap;}
.nav-actions{max-width:500px;overflow:auto}
.nav-actions {
    margin: 0;
    display: flex;
}
nav .h-scroll-container{padding-bottom :0!important ;}
.nav-links{display:flex; gap:11px}