/*
Theme Name: DooPlay Child
Theme URI: https://doothemes.com/items/dooplay/
Description: DooPlay Child Theme
Author: Doothemes
Author URI: https://doothemes.com/
Template: dooplay
Version: 2.2
*/

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Noto+Sans+Thai&display=swap');

body {
    font-family: 'Noto Sans Thai', sans-serif !important;
}



/* User Requested Layout Adjustments */
/* Adjusted Layout: Centered Container */
body.home #contenedor,
body.home .module,
body.home .content,
body.home .container,
body.home .adt {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Add padding only to the inner grid wrapper so edges aren't touching screen */
.custom-movie-grid {
    padding: 0 10px;
}

/* Custom Movie Grid Styles */
.custom-movie-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    /* Negative margin for wider spacing */
    justify-content: flex-start;
    /* Align left */
}

.movie-box-item {
    width: 25%;
    /* 4 items per row (User request) */
    padding: 10px;
    box-sizing: border-box;
}

@media (max-width: 1600px) {
    .movie-box-item {
        width: 25%;
    }

    /* Keep 4 items */
}

@media (max-width: 1024px) {
    .movie-box-item {
        width: 25%;
    }

    /* Force 4 items on Tablet */
}

@media (max-width: 768px) {
    .movie-box-item {
        width: 25%;
    }

    /* Force 4 items on Mobile Landscape */
}

@media (max-width: 480px) {
    .movie-box-item {
        width: 50%;
    }

    /* Keep 2 items on very small vertical phones for readability */
}

/* User Provided Box Style + Adjustments */
.movie-box {
    position: relative;
    width: 100%;
    /* Remove fixed height to allow aspect ratio */
    height: auto;
    background: rgb(36, 36, 36);
    margin: 0px;
    padding: 0;
    border: 1px solid rgb(68, 68, 68);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.movie-box:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    border-color: #007aff;
    transform: translateY(-4px);
    z-index: 5;
}

.movie-box-poster {
    width: 100%;
    height: 0;
    /* 150% = 2:3 Aspect Ratio (Vertical Poster) */
    padding-bottom: 150%;
    background-size: 100% 100%;
    /* Force Full Image Fit */
    background-position: center top;
    position: relative;
}

/* Badges */
.movie-quality-badge {
    position: absolute;
    top: 12px;
    right: -30px;
    background: #FF0000;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 30px;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    width: 90px;
    text-align: center;
}

.movie-rating-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.movie-box-content {
    background: rgb(36, 36, 36);
    padding: 8px 5px;
    text-align: center;
    min-height: 55px;
    /* Ensure consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #333;
}

.movie-title {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

.movie-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s;
}

.movie-title a:hover {
    color: #007aff;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-box:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s;
}

/* Pagination Styles */
.pagination {
    margin: 40px 0;
    text-align: center;
    width: 100%;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    justify-content: center;
    gap: 8px;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span.current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #242424;
    border: 1px solid #444;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #007aff;
    border-color: #007aff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.pagination span.current {
    background: #007aff;
    border-color: #007aff;
    color: #fff;
    cursor: default;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.pagination i {
    font-size: 12px;
}