/* FORCE REMOVE ANY GREY BACKGROUNDS */
.nms-slider-item,
.nms-slider-item *,
.nms-slider-content,
.nms-slider-content * {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* Netflix Movie Slider - Main Styles */
.netflix-movie-slider {
    margin: 40px 0;
    position: relative;
}

.nms-slider-section {
    margin-bottom: 60px;
    position: relative;
    height: 350px; /* SET ENTIRE SLIDER BLOCK HEIGHT */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Background overlay */
.nms-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
    border-radius: 8px;
}

.nms-slider-inner {
    position: relative;
    z-index: 2;
    /* Contain the background within this element */
    border-radius: 8px;
    overflow: hidden;
    height: 100%; /* Fill parent height */
}

/* Apply background styles to .nms-slider-inner instead of .nms-slider-section */
.nms-slider-section[style*="background-image"] .nms-slider-inner,
.nms-slider-section[style*="background-color"] .nms-slider-inner {
    padding: 20px 0; /* Reduced padding since title is removed */
    margin: 0;
}

/* REMOVED TITLE HEADER STYLES */
.nms-slider-header {
    display: none; /* COMPLETELY REMOVE TITLE */
}

.nms-slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 60px; /* Removed top/bottom padding since title is gone */
    height: 100%; /* Fill available height */
    display: flex;
    align-items: center; /* Vertically center slider content */
}

@media (max-width: 768px) {
    .nms-slider-container {
        padding: 0 50px; /* Adjusted for mobile */
    }
}

.nms-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.nms-slider-track {
    display: flex;
    transition: transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 4px;
    will-change: transform;
    width: max-content; /* Important for slider calculation */
    align-items: center; /* Vertically center items */
}

/* Arrow Styling - Positioned on edges */
.nms-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    width: 50px;
    height: 100px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 0.9;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Shadow effect */
    /* No hover effects as requested */
}

.nms-slider-btn:hover {
    opacity: 1;
    /* No transform scale as requested */
}

.nms-slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nms-prev-btn {
    left: 10px;
}

.nms-next-btn {
    right: 10px;
}

.nms-slider-btn i {
    font-size: 24px;
}

@media (max-width: 768px) {
    .nms-slider-btn {
        width: 40px;
        height: 80px;
    }
    .nms-slider-btn i {
        font-size: 20px;
    }
    .nms-prev-btn {
        left: 5px;
    }
    .nms-next-btn {
        right: 5px;
    }
}

/* FIXED TILE STYLING - PROPER ASPECT RATIO (2:3 width:height) */
.nms-slider-item {
    flex: 0 0 auto; /* Don't use flex basis */
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s ease, z-index 0.4s;
    position: relative;
    z-index: 1;
    background: #2f2b2b; /* Dark background to match gradient */
    flex-shrink: 0; /* Prevent items from shrinking */
    height: 300px; /* FIXED HEIGHT */
    width: 200px; /* FIXED WIDTH - 2:3 aspect ratio (200/300 = 0.666) */
    min-width: 200px; /* Ensure minimum width */
}

/* Standard movie poster aspect ratio is typically 2:3 (width:height) */
/* For 300px height, width should be: 300 * (2/3) = 200px */

/* Make all tile sizes use the same fixed width */
.nms-slider-item.visible-4,
.nms-slider-item.visible-5,
.nms-slider-item.visible-6,
.nms-slider-item.visible-7,
.nms-slider-item.visible-8,
.nms-slider-item.visible-9,
.nms-slider-item.visible-10 {
    /* Already using fixed dimensions */
}

/* Responsive fixed dimensions - MAINTAIN ASPECT RATIO */
@media (max-width: 1400px) {
    .nms-slider-item {
        height: 270px; /* Reduced height */
        width: 180px; /* Maintain 2:3 ratio (270 * 2/3 = 180) */
    }
    
    .nms-slider-section {
        height: 320px; /* Slightly reduced overall height */
    }
}

@media (max-width: 1200px) {
    .nms-slider-item {
        height: 240px;
        width: 160px; /* 240 * 2/3 = 160 */
    }
    
    .nms-slider-section {
        height: 290px;
    }
}

@media (max-width: 992px) {
    .nms-slider-item {
        height: 210px;
        width: 140px; /* 210 * 2/3 = 140 */
    }
    
    .nms-slider-section {
        height: 260px;
    }
}

@media (max-width: 768px) {
    .nms-slider-item {
        height: 300px !important; /* Fixed height for mobile */
        width: 200px !important; /* Fixed width for mobile - maintain ratio */
        margin: 0 auto; /* Center the tile */
    }
    
    .nms-slider-section {
        height: 350px; /* Reset to full height on mobile */
    }
}

/* Mobile - Single Tile Centered */
@media (max-width: 768px) {
    .nms-slider-item {
        flex: 0 0 auto !important; /* Remove flex basis */
    }
    
    .nms-slider-track {
        justify-content: center; /* Center single item */
    }
}

/* Hover Effects */
.nms-slider-item:hover {
    transform: scale(1.2);
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* FIXED IMAGE DIMENSIONS - Maintain aspect ratio */
.nms-slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.nms-slider-item:hover .nms-slider-img {
    transform: scale(1.05);
}

.nms-placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #2b2b2b, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    position: relative;
    z-index: 1;
}

.nms-placeholder-img i {
    font-size: 40px;
    opacity: 0.3;
}

/* FIXED: Make content container transparent when not hovered */
.nms-slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent !important; /* TRANSPARENT BY DEFAULT */
    padding: 10px 15px 15px; /* Adjusted padding */
    transform: translateY(100%);
    transition: all 0.4s ease; /* Transition all properties */
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* KEEP CONTENT AT BOTTOM */
    align-items: center; /* CENTER ALL CONTENT HORIZONTALLY */
    height: auto; /* Auto height based on content */
    min-height: 0; /* No minimum height */
    text-align: center !important; /* CENTER ALIGN ALL TEXT */
    z-index: 2; /* Above image */
}

/* ONLY SHOW GRADIENT ON HOVER */
.nms-slider-item:hover .nms-slider-content {
    transform: translateY(0);
    opacity: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 70%, #000 100%) !important;
}

/* Changed from h3 to h5 with white color - FORCE WHITE NO MATTER WHAT */
.nms-content-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px !important; /* Added spacing below title */
    color: #ffffff !important; /* FORCE WHITE - !important to override any template styles */
    line-height: 1.2;
    text-align: center !important; /* CENTER ALIGN */
    width: 100%; /* Ensure full width for centering */
    order: 1; /* Title first */
}

/* MOVED METADATA TO BELOW BUTTON */
.nms-content-meta {
    font-size: 11px; /* Slightly smaller */
    color: #d2d2d2;
    display: flex;
    align-items: center;
    justify-content: center; /* CENTER ALIGN METADATA */
    gap: 10px; /* Slightly more gap for readability */
    margin-top: 8px !important; /* Moved to top margin (now below button) */
    margin-bottom: 5px !important; /* Small bottom margin */
    flex-wrap: wrap;
    order: 4; /* Move to position 4 (LAST - after button) */
    width: 100%; /* Ensure full width for centering */
}

.nms-content-year {
    color: #46d369;
    font-weight: 500;
}

.nms-content-rating {
    color: #f5c518;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px; /* Reduced gap */
}

.nms-content-rating i {
    font-size: 10px; /* Slightly smaller */
}

.nms-content-duration {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 5px; /* Reduced padding */
    border-radius: 2px;
    font-size: 10px; /* Smaller font */
}

.nms-content-description {
    font-size: 12px; /* Slightly smaller */
    line-height: 1.4;
    color: #ffffff !important; /* FORCE WHITE - !important to override any template styles */
    margin-bottom: 12px !important; /* Spacing above button */
    margin-top: 0 !important; /* Remove top margin */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show fewer lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center !important; /* CENTER ALIGN */
    order: 2; /* Position 2 (after title, before button) */
    width: 100%; /* Ensure full width for centering */
}

.nms-content-buttons {
    display: flex;
    justify-content: center; /* Center the play button */
    gap: 8px; /* Reduced gap */
    margin: 0 !important; /* Remove all margins */
    padding: 0 !important; /* Remove padding */
    order: 3; /* Position 3 (after description, before metadata) */
    width: 100%; /* Ensure full width for centering */
}

.nms-content-btn {
    padding: 8px 20px !important; /* Slightly wider for better appearance */
    border-radius: 3px;
    font-size: 12px !important; /* Ensure proper font size */
    font-weight: 600;
    cursor: pointer;
    display: inline-flex !important; /* Force display */
    align-items: center;
    justify-content: center; /* Center button content */
    gap: 5px; /* Reduced gap */
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.3px; /* Reduced letter spacing */
    width: auto !important; /* Ensure button doesn't get cut off */
    min-width: 120px; /* Minimum width to prevent cutting */
    box-sizing: border-box !important; /* Include padding in width calculation */
}

/* Only Play Button */
.nms-play-btn {
    background-color: #e50914 !important; /* Force color */
    color: white !important; /* Force white text */
    border: 1px solid #e50914 !important;
    display: inline-flex !important; /* Force display */
    visibility: visible !important; /* Force visibility */
    opacity: 1 !important; /* Force opacity */
    position: relative !important; /* Ensure proper positioning */
    z-index: 10 !important; /* Ensure above other elements */
}

.nms-play-btn:hover {
    background-color: #f40612 !important;
    color: white !important;
    transform: scale(1.05);
}

/* FIX FOR FIRST SLIDE CENTERING - Ensure proper alignment */
.nms-slider-content > * {
    text-align: center !important;
    align-self: center !important; /* Force center alignment for all children */
}

/* REMOVE PROGRESS BAR SINCE NO TITLE */
.nms-slider-progress {
    display: none; /* Remove progress bar */
}

.nms-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.nms-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #e50914;
    transition: width 0.3s ease;
}

.nms-no-movies {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Loading Animation */
.nms-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.nms-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(229, 9, 20, 0.3);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: nms-spin 1s linear infinite;
}

@keyframes nms-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade In Animation */
@keyframes nms-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nms-slider-section {
    animation: nms-fadeIn 0.8s ease-out;
}