/*
Theme Name: CutScene - Netflix Style Persian
Theme URI: https://cutscene.top
Description: Netflix-style dark theme optimized for Persian/Farsi users with RTL support
Version: 1.0.0
Author: CutScene Team
Author URI: https://cutscene.top
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cutscene
Domain Path: /languages
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazir', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* Support for LTR elements if needed */
body.ltr,
body.en-US {
    direction: ltr;
    text-align: left;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: #e50914;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #f5051e;
}

button, .button {
    background-color: #e50914;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

button:hover, .button:hover {
    background-color: #f5051e;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    background-color: #000000;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    color: #e50914;
    margin: 0;
}

.site-title span {
    color: #ffffff;
    margin-right: 0.5rem;
}

/* Persian text in title */
.site-title-fa {
    font-size: 1.5rem;
    color: #e0e0e0;
    margin-right: 1rem;
}

/* Navigation Menu */
.main-navigation {
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: #e0e0e0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #e50914;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background-color: #e50914;
    border: none;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 4px;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-container {
    display: flex;
    align-items: center;
    background-color: #222;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: 2rem;
}

.search-container input {
    background-color: #222;
    color: #e0e0e0;
    border: none;
    outline: none;
    width: 300px;
    padding: 8px;
    font-size: 0.95rem;
}

.search-container input::placeholder {
    color: #888;
}

.search-container button {
    background-color: transparent;
    color: #e50914;
    border: none;
    cursor: pointer;
    padding: 0 10px;
}

/* ============================================
   FEATURED CAROUSEL
   ============================================ */
.featured-carousel {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    overflow: hidden;
    margin-bottom: 3rem;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.carousel-content {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    max-width: 600px;
    z-index: 10;
}

.carousel-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.carousel-content p {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.carousel-buttons {
    display: flex;
    gap: 1rem;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background-color: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: #e50914;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #ffffff;
    border-right: 4px solid #e50914;
    padding-right: 1rem;
}

/* ============================================
   GRID LAYOUT
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 300px;
}

.post-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.3);
}

.post-card-image {
    width: 100%;
    height: 70%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card:hover .post-card-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

.play-button {
    width: 60px;
    height: 60px;
    background-color: #e50914;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .play-button {
    opacity: 1;
}

.post-card-meta {
    padding: 1rem;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-card-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-rating-stars {
    color: #ffd700;
    font-size: 0.85rem;
}

.post-year {
    color: #888;
    font-size: 0.8rem;
}

/* ============================================
   LIST VIEW
   ============================================ */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.post-list-item {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 1.5rem;
    transition: background-color 0.3s ease;
}

.post-list-item:hover {
    background-color: #222;
}

.post-list-image {
    width: 150px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.post-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-list-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.post-list-description {
    color: #b0b0b0;
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* ============================================
   VIEW TOGGLE
   ============================================ */
.view-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: flex-end;
}

.view-toggle button {
    background-color: #222;
    color: #e0e0e0;
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle button.active {
    background-color: #e50914;
    color: white;
    border-color: #e50914;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background-color: #000000;
    color: #888;
    padding: 3rem 2rem;
    margin-top: 3rem;
    border-top: 1px solid #222;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #888;
}

.footer-section a:hover {
    color: #e50914;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 2rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #222;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #e50914;
    color: white;
}

/* ============================================
   CATEGORIES
   ============================================ */
.category-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.category-btn {
    background-color: #222;
    color: #e0e0e0;
    border: 2px solid #333;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background-color: #e50914;
    color: white;
    border-color: #e50914;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    border-bottom: 2px solid #e50914;
    padding-bottom: 1rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    background-color: #222;
    color: #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #e50914;
    color: white;
}

.pagination .current {
    background-color: #e50914;
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .main-navigation.active {
        display: flex;
    }

    .search-container {
        margin-left: 0;
        width: 100%;
    }

    .search-container input {
        width: 100%;
    }

    .featured-carousel {
        height: 300px;
    }

    .carousel-content {
        bottom: 1rem;
        right: 1rem;
        max-width: 100%;
    }

    .carousel-content h2 {
        font-size: 1.5rem;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .post-list-item {
        flex-direction: column;
    }

    .post-list-image {
        width: 100%;
        height: 200px;
    }

    main {
        padding: 1rem;
    }

    .category-filter {
        justify-content: flex-start;
    }

    .view-toggle {
        justify-content: flex-start;
    }

    .section-title {
        border-right: 4px solid #e50914;
        padding-right: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }

    .site-title {
        font-size: 1.5rem;
    }

    header {
        padding: 0.5rem 1rem;
    }

    .featured-carousel {
        height: 200px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    main {
        padding: 0.5rem;
    }

    .carousel-buttons {
        flex-direction: column;
    }

    button, .button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ============================================
   VISIBILITY OVERRIDES - ENSURE CONTENT SHOWS
   ============================================ */
body,
html,
main,
.site-main,
.container,
.featured-carousel,
.posts-grid,
.post-card,
.carousel-slide,
header,
footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

main {
    width: 100%;
    background-color: #0f0f0f;
    color: #e0e0e0;
}

.featured-carousel {
    background-color: #1a1a1a;
}

.posts-grid {
    display: grid !important;
}

.post-card {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

header {
    background-color: #000000;
    border-bottom: 1px solid #222;
}

.site-title {
    color: #e50914 !important;
}
