/*
Theme Name: Cinema Dark - Vietnamese
Theme URI: https://example.com/cinema-dark
Author: Abdo Hassn
Description: Theme rạp phim tối - Phiên bản tiếng Việt
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cinema-dark
Tags: dark, movies, film, membership, custom-post-type, rtl-language-support
*/

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

:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --primary-light: #ff1a24;
    --bg-main: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1c1c1c;
    --bg-overlay: rgba(0,0,0,0.85);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --border-color: #2a2a2a;
    --border-light: #333333;
    --shadow-card: 0 4px 20px rgba(0,0,0,0.6);
    --shadow-hover: 0 8px 40px rgba(229,9,20,0.3);
    --radius: 8px;
    --radius-sm: 4px;
    --font-main: 'Cairo', 'Segoe UI', Arial, sans-serif;
    --transition: all 0.3s ease;
}

html {
    direction: rtl;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(to bottom, #000000 0%, rgba(0,0,0,0.95) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.site-logo span {
    color: var(--text-primary);
}


.main-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(229,9,20,0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.btn-danger {
    background-color: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background-color: #a93226;
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 13px 30px;
    font-size: 1rem;
}

/* ===== MOVIES GRID ===== */
.movies-section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* ===== MOVIE CARD ===== */
.movie-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-thumbnail {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-card-hover);
}

.movie-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.movie-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 15px;
}

.movie-overlay-btn {
    background: var(--primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.movie-thumbnail-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge-views,
.badge-duration {
    background: var(--bg-overlay);
    color: var(--text-primary);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.badge-duration {
    background: rgba(229,9,20,0.85);
}

.movie-info {
    padding: 12px;
}

.movie-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.movie-category {
    background: rgba(229,9,20,0.15);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.movie-rating {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rating-like, .rating-dislike {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
}

.rating-like { color: #2ecc71; }
.rating-dislike { color: #e74c3c; }

/* ===== NO THUMBNAIL ===== */
.movie-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== SINGLE MOVIE ===== */
.single-movie-hero {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), var(--bg-main));
    padding: 40px 0 20px;
}

.movie-player-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}

.movie-player-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.movie-details-section {
    padding: 30px 0;
}

.movie-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.movie-main-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.movie-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-item .icon {
    font-size: 1rem;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.movie-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.movie-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== RATING SECTION ===== */
.rating-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.rating-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.rating-buttons {
    display: flex;
    gap: 12px;
}

.btn-like, .btn-dislike {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid;
    transition: var(--transition);
    background: transparent;
    font-family: var(--font-main);
}

.btn-like {
    border-color: #2ecc71;
    color: #2ecc71;
}

.btn-like:hover, .btn-like.active {
    background: #2ecc71;
    color: #fff;
}

.btn-dislike {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-dislike:hover, .btn-dislike.active {
    background: #e74c3c;
    color: #fff;
}

.rating-bar {
    flex: 1;
    min-width: 150px;
}

.rating-bar-track {
    height: 6px;
    background: var(--bg-card-hover);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(to left, #2ecc71, #e74c3c);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ===== SIMILAR MOVIES ===== */
.similar-section {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

/* ===== FORMS (Auth, Publish) ===== */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-card);
}

.auth-logo {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.auth-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-main);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* Captcha */
.captcha-box {
    background: #1e1e1e;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}

.captcha-input {
    width: 80px;
    text-align: center;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-links a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(46,204,113,0.1);
    border: 1px solid rgba(46,204,113,0.3);
    color: #2ecc71;
}

.alert-error {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    color: #e74c3c;
}

.alert-info {
    background: rgba(52,152,219,0.1);
    border: 1px solid rgba(52,152,219,0.3);
    color: #3498db;
}

.alert-warning {
    background: rgba(241,196,15,0.1);
    border: 1px solid rgba(241,196,15,0.3);
    color: #f1c40f;
}

/* ===== PUBLISH FORM ===== */
.publish-page {
    padding: 50px 0;
    min-height: 80vh;
}

.publish-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 35px;
    max-width: 700px;
    margin: 0 auto;
}

.publish-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-upload-area {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(229,9,20,0.05);
}

.image-upload-area .upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.image-upload-area p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.image-preview {
    margin-top: 15px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 200px;
}

.image-preview img {
    width: 100%;
    object-fit: cover;
}

/* ===== DASHBOARD ===== */
.dashboard-page {
    padding: 50px 0;
}

.dashboard-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.dashboard-user-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.dashboard-user-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.dashboard-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== MY POSTS TABLE ===== */
.posts-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.posts-table th {
    background: var(--bg-card-hover);
    padding: 14px 16px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.posts-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.posts-table tr:last-child td {
    border-bottom: none;
}

.posts-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.post-thumb-mini {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(241,196,15,0.15);
    color: #f1c40f;
    border: 1px solid rgba(241,196,15,0.3);
}

.status-published {
    background: rgba(46,204,113,0.15);
    color: #2ecc71;
    border: 1px solid rgba(46,204,113,0.3);
}

.status-rejected {
    background: rgba(231,76,60,0.15);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.3);
}

/* ===== PROFILE PAGE ===== */
.profile-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 35px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ADMIN PANEL ===== */
.admin-queue {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-queue-header {
    background: var(--primary);
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 700;
}

.admin-movie-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.admin-movie-item:hover {
    background: rgba(255,255,255,0.02);
}

.admin-movie-item:last-child {
    border-bottom: none;
}

.admin-movie-actions {
    margin-right: auto;
    display: flex;
    gap: 8px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #080808;
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== MOBILE MENU ===== */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.15);
}

.search-bar input {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.875rem;
    outline: none;
    flex: 1;
    min-width: 0;
}

.search-bar button {
    background: var(--primary);
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

/* ===== CATEGORIES FILTER ===== */
.categories-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.category-pill {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    font-family: var(--font-main);
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== LOADING ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hamburger {
        display: none;
    }

    .movie-main-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .auth-box, .publish-box, .profile-box {
        padding: 25px 20px;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .posts-table {
        display: block;
        overflow-x: auto;
    }

    .header-inner {
        padding: 12px 15px;
    }

    .site-logo {
        font-size: 1.4rem;
    }

    .rating-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== محتوى المقالات (post-content) ===== */
.post-content {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 2;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
    color: #fff;
    font-weight: 800;
    margin: 28px 0 12px;
    line-height: 1.3;
}

.post-content h2 { font-size: 1.4rem; border-bottom: 2px solid var(--primary); padding-bottom: 8px; display: inline-block; }
.post-content h3 { font-size: 1.15rem; }
.post-content h4 { font-size: 1rem; color: #ddd; }

.post-content p {
    margin-bottom: 18px;
    color: #bbb;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

.post-content ul,
.post-content ol {
    padding-right: 24px;
    margin-bottom: 18px;
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: 8px;
    color: #bbb;
}

.post-content blockquote {
    border-right: 4px solid var(--primary);
    background: rgba(229,9,20,0.06);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #aaa;
}

.post-content pre,
.post-content code {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #e0e0e0;
}

.post-content code { padding: 2px 7px; }
.post-content pre  { padding: 15px 18px; overflow-x: auto; margin: 15px 0; }

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.post-content th,
.post-content td {
    padding: 10px 14px;
    border: 1px solid #2a2a2a;
    text-align: right;
    font-size: 0.875rem;
}

.post-content th {
    background: #1a1a1a;
    color: #fff;
    font-weight: 700;
}

.post-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.post-content hr {
    border: none;
    border-top: 1px solid #1e1e1e;
    margin: 28px 0;
}

/* ===== تحسين صفحة البحث ===== */
.search-highlight {
    background: rgba(229,9,20,0.2);
    color: var(--primary);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ===== أنيميشن لخريطة الموقع ===== */
@keyframes sitemap-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}


/* ===== إخفاء عنوان "المقالات / الأفلام" من أعلى صفحة المدونة ===== */
.page-header,
.page-title,
h1.page-title,
.archive-title,
.blog-title,
.posts-page-title,
.entry-header .entry-title,
body.home .page-header,
body.blog .page-header {
    display: none !important;
}

/* إخفاء الرابط من شريط أدوات الأدمن */
#wp-admin-bar-new-post > .ab-item::before { display: none; }

/* ===== شعار الموقع — صورة + نص ===== */
.site-logo-img {
    height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

/* إخفاء زر الإغلاق على الشاشات الكبيرة */
.nav-close-btn {
    display: none;
}

/* إخفاء طبقة التعتيم على الشاشات الكبيرة */
.mobile-nav-overlay {
    display: none;
}

/* ===== تحسين الهامبرغر عند فتح القائمة ===== */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
