/* Base sidebar styles - will be overridden by responsive styles below */

.navbar{
    display: flex;
    flex-direction: column !important;
    flex-wrap: wrap!important;
} 
.movieCategory{
      display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}
.nav-link:hover {
    color: #ff655c!important;
    transition: all 0.5s;
}

.toggle {
    transition: all 1s;
}
.logo img{
    width: 70%;
    padding-top: 15px;
}
ul{
    padding: 0px;
}
ul li a i{
    font-size: 20px;
}


.movie img{
    width: 100%;
    border-radius: 5px;
}

.form-control{
    border: none;
    
}
.layer{
    position: absolute;
    top:100%;
    left: 0;
    background-color: rgb(255, 255, 255, 0.7);
    color: #000;
    transition: all 1s;
overflow: hidden;
}
.movie:hover .layer {
    top: 0;
    bottom: 0;
    left: 0;

  
}

.form-control {
    color: #aaa !important;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #aaa;
    text-align: center;
}

.form-control::placeholder {
    padding: 3px;
    text-align: center;
    color: #999;
}
.footerIcons ul li a i:hover{
    color: #ff655c!important;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Mobile First Approach - Base styles for mobile */
.sideBar_content {
    width: 100vw;
    height: 100vh;
    top: 0;
    left: -100vw;
    transition: left 0.3s ease;
    z-index: 1050;
}

.movieCategory {
    width: 80vw;
    max-width: 300px;
}

.Icons {
    width: 20vw;
    max-width: 60px;
    min-width: 50px;
}

/* Mobile Navigation */
.toggle {
    cursor: pointer;
    padding: 10px;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Movie Cards */
.movie {
    margin-bottom: 1rem;
}

.layer h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.layer p {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

/* Mobile Form Improvements */
.form-control {
    padding: 12px 8px;
    font-size: 16px; /* Prevents zoom on iOS */
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .sideBar_content {
        width: 350px;
        left: -350px;
    }
    
    .movieCategory {
        width: 280px;
    }
    
    .Icons {
        width: 70px;
    }
    
    .layer h2 {
        font-size: 1.1rem;
    }
    
    .layer p {
        font-size: 0.85rem;
    }
    
    .search {
        gap: 1rem !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .sideBar_content {
        width: 380px;
        left: -380px;
    }
    
    .movieCategory {
        width: 300px;
    }
    
    .Icons {
        width: 80px;
    }
    
    .layer h2 {
        font-size: 1.25rem;
    }
    
    .layer p {
        font-size: 0.9rem;
    }
    
    /* Show overview on tablets and up */
    .layer .d-none.d-md-block {
        display: block !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .sideBar_content {
        width: 400px;
        left: -400px;
    }
    
    .movieCategory {
        width: 320px;
    }
    
    .Icons {
        width: 80px;
    }
    
    .layer h2 {
        font-size: 1.5rem;
    }
    
    .layer p {
        font-size: 1rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .sideBar_content {
        width: 420px;
        left: -420px;
    }
    
    .movieCategory {
        width: 340px;
    }
}

/* Mobile Overlay */
@media (max-width: 991.98px) {
    .sideBar_content.show {
        left: 0 !important;
    }
    
    .sideBar_content::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
}

/* Touch-friendly improvements */
@media (max-width: 767.98px) {
    .nav-link {
        padding: 15px 20px !important;
        font-size: 1.1rem;
    }
    
    .footerIcons ul li {
        padding: 15px !important;
    }
    
    .footerIcons ul li a i {
        font-size: 24px !important;
    }
    
    /* Improve search inputs on mobile */
    .search input {
        margin-bottom: 10px;
    }
    
    /* Better spacing for contact form */
    #contactUs {
        padding: 2rem 1rem !important;
    }
    
    .alert {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 575.98px) {
    /* Stack search inputs vertically on very small screens */
    .search {
        flex-direction: column !important;
    }
    
    .search .form-control {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    /* Optimize movie card text for mobile */
    .layer {
        padding: 10px !important;
    }
    
    .layer h2 {
        font-size: 0.9rem !important;
        line-height: 1.2;
    }
    
    .layer p {
        font-size: 0.75rem !important;
        line-height: 1.3;
    }
    
    /* Better button styling for mobile */
    #submitBtn {
        padding: 12px 24px;
        margin-top: 20px;
    }
}

/* Accessibility improvements */
.toggle:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid #ff655c;
    outline-offset: 2px;
}

/* Smooth transitions for better UX */
.movie,
.layer,
.nav-link,
.form-control {
    transition: all 0.3s ease;
}

/* Loading states and animations */
.movie img {
    transition: transform 0.3s ease;
}

.movie:hover img {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    .sideBar_content,
    .toggle {
        display: none !important;
    }
    
    .container {
        margin-left: 0 !important;
    }
    
    .movie .layer {
        position: static !important;
        background: white !important;
        color: black !important;
    }
}
