/*
Theme Name: MusicViral Theme
Theme URI: https://musicviral.ir
Author: MusicViral Team
Author URI: https://musicviral.ir
Description: قالب اختصاصی، پرسرعت و واکنش‌گرای رسانه موزیک ویرال بر پایه حالت روشن (Light Mode) با هماهنگی کامل با Tailwind CSS v3، فونت وزیرمتن (Vazirmatn) و تمامی استایل‌های پیش‌نمایش.
Version: 1.3.0
Text Domain: music-viral
Tags: music, rtl, light-theme, responsive, custom-css, tailwind, vazirmatn
*/

/* Import Vazirmatn Font via CDN (Google Fonts & jsDelivr for Iran fallback) */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. CSS VARIABLES & LIGHT THEME SETUP
   ========================================================================== */
:root {
    --mv-bg-light: #f8fafc;
    --mv-card-bg: #ffffff;
    --mv-card-border: #e2e8f0;
    --mv-card-border-hover: rgba(49, 134, 255, 0.4);
    
    --mv-primary: #3186ff;
    --mv-primary-hover: #256fe0;
    --mv-secondary: #0ea5e9;
    
    --mv-text-main: #0f172a;
    --mv-text-muted: #64748b;
    --mv-text-dim: #94a3b8;
    
    --mv-font: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mv-radius-lg: 1.5rem;
    --mv-radius-md: 1rem;
    --mv-radius-sm: 0.75rem;
}

/* Reset & Global Font Rules */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body, button, input, textarea, select, h1, h2, h3, h4, h5, h6, p, a, span, div, .font-sans {
    font-family: var(--mv-font) !important;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

body {
    direction: rtl;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* Custom Light Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #3186ff;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #256fe0;
}

/* Glassmorphism Utilities (Light Mode) */
.glass-panel,
.glass-panel-light {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Equalizer Animated Bars */
@keyframes eqBar {
    0%, 100% { height: 4px; }
    50% { height: 20px; }
}

.eq-bar-1 { animation: eqBar 0.8s ease-in-out infinite; }
.eq-bar-2 { animation: eqBar 0.6s ease-in-out infinite 0.2s; }
.eq-bar-3 { animation: eqBar 1.0s ease-in-out infinite 0.1s; }
.eq-bar-4 { animation: eqBar 0.7s ease-in-out infinite 0.3s; }

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   2. HEADER, NAVIGATION & MOBILE DRAWER (LIGHT MODE)
   ========================================================================== */
header {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
    color: #0f172a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04) !important;
}

footer {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

header nav ul,
header nav .menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li,
header nav .menu-item {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li a,
header nav .menu-item a,
header nav a.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.2s ease;
    color: #334155 !important;
    text-decoration: none;
    white-space: nowrap;
}

header nav ul li a:hover,
header nav .menu-item a:hover,
header nav a.nav-link:hover {
    color: #3186ff !important;
    background-color: #f1f5f9 !important;
}

/* Active Menu Item Styling */
header nav ul li.current-menu-item a,
header nav ul li.current_page_item a,
header nav ul li.current-menu-ancestor a,
header nav .menu-item.active a,
header nav a.nav-link.active {
    background-color: #3186ff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(49, 134, 255, 0.25) !important;
}

/* Mobile Drawer Styling */
#mv-mobile-menu {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
}

#mv-mobile-menu a:not(.bg-rose-600):not(.bg-\[\#3186ff\]),
#mv-mobile-menu button:not(.bg-rose-600):not(.bg-\[\#3186ff\]) {
    color: #334155 !important;
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

#mv-mobile-menu a.bg-rose-600,
#mv-mobile-menu button.bg-rose-600,
#mv-mobile-menu a.bg-\[\#3186ff\],
#mv-mobile-menu button.bg-\[\#3186ff\] {
    color: #ffffff !important;
    background-color: #3186ff !important;
    box-shadow: 0 4px 12px rgba(49, 134, 255, 0.25) !important;
}

#mv-mobile-menu a:not(.bg-rose-600):not(.bg-\[\#3186ff\]):hover,
#mv-mobile-menu button:not(.bg-rose-600):not(.bg-\[\#3186ff\]):hover {
    color: #3186ff !important;
    background-color: #ebf3ff !important;
}

/* Inputs in Header, Main, Forms */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

input::placeholder,
textarea::placeholder {
    color: #64748b !important;
}

/* ==========================================================================
   3. SONG CARD & CONTENT STYLING (LIGHT MODE)
   ========================================================================== */
.music-card,
article.music-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-card:hover,
article.music-card:hover {
    transform: translateY(-4px);
    border-color: rgba(49, 134, 255, 0.5) !important;
    box-shadow: 0 12px 25px -5px rgba(49, 134, 255, 0.15) !important;
}

.single-post-box,
.sidebar-widget,
.download-box {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem;
    padding: 1.5rem;
    color: #0f172a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04) !important;
}

.lyrics-box {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: #334155 !important;
    line-height: 2;
    font-size: 0.875rem;
}

/* Sticky Audio Player Bar */
#mv-sticky-player {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.08) !important;
}

#mv-player-title,
#mv-player-artist {
    color: #0f172a !important;
}

#mv-player-seek {
    background-color: #cbd5e1 !important;
}

/* Body Bottom Padding for Sticky Player */
body.pb-28 {
    padding-bottom: 7rem !important;
}

/* ==========================================================================
   4. WORDPRESS PAGINATION & NAVIGATION
   ========================================================================== */
.pagination, .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.pagination .screen-reader-text {
    display: none;
}

.pagination .page-numbers, .nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 0.75rem;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next,
.nav-links .page-numbers.prev,
.nav-links .page-numbers.next {
    width: auto;
    padding: 0 0.75rem;
}

.pagination .page-numbers.current, .nav-links .page-numbers.current {
    background-color: #3186ff !important;
    border-color: #3186ff !important;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(49, 134, 255, 0.3) !important;
    transform: scale(1.05);
}

.pagination .page-numbers:hover:not(.current):not(.dots), 
.nav-links .page-numbers:hover:not(.current):not(.dots) {
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
}

.pagination .page-numbers.prev:hover,
.pagination .page-numbers.next:hover,
.nav-links .page-numbers.prev:hover,
.nav-links .page-numbers.next:hover {
    border-color: #3186ff !important;
    color: #3186ff !important;
}

.pagination .page-numbers.dots, .nav-links .page-numbers.dots {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #64748b !important;
    width: 1.75rem;
}

/* ==========================================================================
   5. WORDPRESS DEFAULT CLASSES & GUTENBERG
   ========================================================================== */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}
.wp-caption {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.wp-caption-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* ==========================================================================
   6. COMMENTS SECTION STYLES
   ========================================================================== */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-body {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    color: #0f172a !important;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b !important;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 0.5rem;
}

.comment-author .fn {
    font-weight: 800;
    color: #0f172a !important;
}

.comment-content {
    font-size: 0.875rem;
    color: #334155 !important;
    line-height: 1.7;
}

.comment-respond {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
    color: #0f172a !important;
}

.comment-reply-title {
    font-size: 1rem;
    font-weight: 900;
    color: #0f172a !important;
    margin-bottom: 1rem;
}

.comment-form textarea, 
.comment-form input[type="text"], 
.comment-form input[type="email"] {
    width: 100%;
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #0f172a !important;
    font-size: 0.875rem;
    outline: none;
    margin-bottom: 1rem;
}

.comment-form textarea:focus, .comment-form input:focus {
    border-color: #3186ff !important;
}

.comment-form input[type="submit"] {
    background: linear-gradient(135deg, #3186ff, #0ea5e9) !important;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(49, 134, 255, 0.3) !important;
    transition: all 0.2s ease;
}

.comment-form input[type="submit"]:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Line Clamp & Aspect Ratio Utilities */
.aspect-video {
    aspect-ratio: 16 / 9;
}
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   7. MOBILE MEDIA QUERIES (< 640px)
   ========================================================================== */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    /* Mobile Header Layout */
    header .h-16, 
    header .h-20 {
        height: 4rem !important; /* 64px */
    }

    header .max-w-7xl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    header h1 {
        font-size: 1.125rem !important; /* 18px */
    }

    /* Mobile Navigation Drawer */
    #mv-mobile-menu {
        border-radius: 1.25rem !important;
        padding: 0.75rem !important;
        margin-top: 0.5rem !important;
    }

    #mv-mobile-menu.hidden {
        display: none !important;
    }

    #mv-mobile-menu .grid-cols-2 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
    }

    /* Main Container Padding */
    main.max-w-7xl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* Main Layout Grid Stacking on Mobile */
    .lg\:grid-cols-12,
    main .grid-cols-1.lg\:grid-cols-12 {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .lg\:col-span-8,
    .lg\:col-span-4 {
        width: 100% !important;
    }

    /* Music Track Cards on Mobile */
    .music-card,
    article.music-card {
        border-radius: 1.25rem !important;
        padding: 0.875rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .music-card .w-24, 
    .music-card .h-24,
    .music-card .sm\:w-28,
    .music-card .sm\:h-28 {
        width: 4.5rem !important;
        height: 4.5rem !important;
        border-radius: 0.875rem !important;
        flex-shrink: 0 !important;
    }

    .music-card h3,
    .music-card .text-base {
        font-size: 0.875rem !important; /* 14px */
        line-height: 1.35 !important;
    }

    .music-card p,
    .music-card .text-xs {
        font-size: 0.75rem !important; /* 12px */
    }

    .music-card button,
    .music-card .w-11,
    .music-card .h-11 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        flex-shrink: 0 !important;
    }

    /* Single Post Layout on Mobile */
    .single-post-box,
    main .p-6,
    main .p-10 {
        padding: 1rem !important;
        border-radius: 1.25rem !important;
    }

    main .w-48,
    main .h-48,
    main .sm\:w-56,
    main .sm\:h-56 {
        width: 10rem !important;
        height: 10rem !important;
        margin: 0 auto !important;
        border-radius: 1.25rem !important;
    }

    main h2.text-xl,
    main h2.sm\:text-2xl,
    main h2.lg\:text-3xl {
        font-size: 1.125rem !important; /* 18px */
        line-height: 1.4 !important;
        text-align: center !important;
    }

    /* Download Buttons Box on Mobile */
    .download-box {
        padding: 1rem !important;
        border-radius: 1.25rem !important;
    }

    .download-box a {
        padding: 0.75rem 1rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.875rem !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* Sticky Player Bar on Mobile */
    #mv-sticky-player {
        padding: 0.625rem 0.75rem !important;
    }

    #mv-sticky-player #mv-player-cover {
        width: 2.5rem !important;
        height: 2.5rem !important;
        border-radius: 0.625rem !important;
    }

    #mv-sticky-player #mv-player-title {
        font-size: 0.6875rem !important; /* 11px */
        line-height: 1.3 !important;
        max-width: 110px !important;
    }

    #mv-sticky-player #mv-player-canvas {
        width: 32px !important;
        height: 18px !important;
    }

    #mv-sticky-player #mv-player-playtoggle {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }

    #mv-sticky-player #mv-player-prev,
    #mv-sticky-player #mv-player-next {
        padding: 0.25rem !important;
    }

    /* Comments Section on Mobile */
    .comment-body {
        padding: 0.875rem !important;
        border-radius: 1rem !important;
    }

    .comment-respond {
        padding: 1rem !important;
        border-radius: 1rem !important;
    }

    .comment-form textarea,
    .comment-form input[type="text"],
    .comment-form input[type="email"] {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.75rem !important;
    }
}

/* Tablet / Medium Screen Media Query (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    main.max-w-7xl {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .lg\:grid-cols-12 {
        display: grid !important;
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }

    .lg\:col-span-8,
    .lg\:col-span-4 {
        width: 100% !important;
    }
}
