/*
Theme Name: RoboNIT Theme
Theme URI: https://robonit.ir
Author: RoboNIT Core Dev
Description: High-performance, dark/neon theme for Robot Combat Events.
Version: 1.0.0
Text Domain: robonit-theme
*/

:root {
    /* Brand Colors */
    --color-bg-dark: #0a0a0a;
    --color-surface: #1a1a1a;
    --color-accent-red: #ff2e2e;
    --color-accent-blue: #00f0ff;
    --color-text-dim: #b0b0b0;

    /* Typography */
    --font-main: 'Chakra Petch', 'Segoe UI', Roboto, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-dark);
    color: #ffffff;
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s;
}

.btn-neon {
    border: 2px solid var(--color-accent-red);
    padding: 10px 20px;
    color: var(--color-accent-red);
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 46, 46, 0.3);
}

.btn-neon:hover {
    background: var(--color-accent-red);
    color: #fff;
    box-shadow: 0 0 20px var(--color-accent-red);
}





/* --- 404 Error Page Styles --- */
.error-404-container {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px;
    background: radial-gradient(circle, #1a1a1a 0%, #0a0a0a 100%);
}

.error-message {
    color: var(--color-text-dim);
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-wrap {
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Glitch Effect Animation */
.glitch {
    font-size: 5rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: #fff;
    text-shadow: 0.05em 0 0 var(--color-accent-red),
        -0.025em -0.05em 0 var(--color-accent-blue);
    animation: glitch 1s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(-3px, -3px);
    }

    60% {
        transform: translate(3px, 3px);
    }

    80% {
        transform: translate(3px, -3px);
    }

    100% {
        transform: translate(0);
    }
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}



/* Hero Section Layout */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Parallax Effect via fixed attachment simulated */
    position: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--color-bg-dark) 100%);
    z-index: 0;
}

/* Typography & Content */
.hero-content {
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 46, 46, 0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-dim);
    margin-bottom: 40px;
}

/* Button Group */
.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 15px 30px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.4s;
}

.btn-red {
    background: var(--color-accent-red);
    color: #fff;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-blue {
    background: var(--color-accent-blue);
    color: #000;
    border: none;
}

.btn-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Responsive Performance */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .hero-mobile-bg {
        width: 100%;
        height: 100%;
        background: url('assets/img/hero-poster.jpg') center/cover no-repeat;
    }

    .hero-video {
        position: absolute;
    }

    /* Disable fixed on mobile for performance */
}

/* Modal Styling */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 800px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}







/* --- Active Events Section --- */
.active-events-section {
    background: #050505;
    border-top: 1px solid #222;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #fff;
    letter-spacing: 5px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 5%;
}

/* Event Card */
.event-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    padding: 25px;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}

.event-card:hover {
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.event-card.status-live {
    border-color: var(--color-accent-red);
    box-shadow: 0 0 15px rgba(255, 46, 46, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.event-title {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.status-badge {
    background: #222;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    color: var(--color-text-dim);
}

.status-badge.live-pulse {
    background: var(--color-accent-red);
    color: #fff;
    animation: pulse-red 1.5s infinite;
}

/* Timers */
.timers-container {
    margin-bottom: 25px;
    display: grid;
    gap: 15px;
}

.timer-box {
    background: #000;
    padding: 15px;
    border-left: 3px solid var(--color-accent-blue);
}

.timer-box.phase-timer {
    border-left-color: #ffcc00;
    /* Yellow for warning/phases */
    opacity: 0.8;
}

.timer-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-dim);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.countdown-digits {
    font-family: 'Courier New', monospace;
    /* Fallback */
    font-weight: bold;
    color: #fff;
    /* Responsive Font Sizing using Clamp */
    font-size: clamp(18px, 2.5vw, 28px);
    letter-spacing: 1px;
}

.countdown-digits.small {
    font-size: clamp(14px, 2vw, 20px);
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-block {
    display: inline-block;
    text-align: center;
}

.text-accent {
    color: #ffcc00;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 46, 46, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 46, 46, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 46, 46, 0);
    }
}




/* --- RoboNIT TV Section (Netflix Style) --- */
.tv-section {
    background-color: #111;
    /* Slightly lighter than pure black */
    padding: 60px 0;
    border-top: 1px solid #222;
    overflow: hidden;
    /* Prevent horizontal scroll on body */
}

.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5% 30px;
}

.tv-title {
    margin: 0;
    font-size: 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tv-view-all {
    color: var(--color-accent-blue);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Scroll Wrapper (The Magic Part) */
.tv-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* Forces items to snap into place */
    gap: 20px;
    padding: 20px 5% 50px;
    /* Extra bottom padding for hover scaling */

    /* Hide Scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.tv-scroll-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* TV Card Styles */
.tv-card {
    flex: 0 0 auto;
    /* Prevent shrinking */
    width: 280px;
    scroll-snap-align: start;
    /* Snap alignment */
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.tv-card:hover {
    transform: scale(1.05);
    z-index: 2;
}

/* Thumbnail Area */
.tv-thumb-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #222;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.tv-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.tv-card:hover .tv-thumb {
    filter: brightness(0.7);
}

/* Overlay & Play Icon */
.tv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.tv-card:hover .tv-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 50px;
    color: #fff;
    text-shadow: 0 0 20px var(--color-accent-red);
}

/* Duration Badge */
.tv-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* Info Area */
.tv-info {
    padding-top: 15px;
}

.tv-card-title {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-meta {
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.season-badge {
    color: var(--color-accent-blue);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tv-card {
        width: 220px;
    }

    .tv-title {
        font-size: 1.5rem;
    }
}





/* --- News Section (System Intel) --- */
.news-section {
    background-color: #0f0f0f;
    /* Slightly lighter than main bg */
    padding: 80px 5%;
    border-top: 1px solid #222;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

.news-title {
    font-size: 1.8rem;
    color: #fff;
    margin: 0;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* News Card */
.news-card {
    background: var(--color-surface);
    border-left: 2px solid transparent;
    /* Hidden border for hover effect */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    border-left-color: var(--color-accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Thumbnail & Overlay */
.news-thumb-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #222;
}

.news-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 240, 255, 0.15);
    /* Cyber Blue Tint */
    transition: 0.3s;
}

.news-card:hover .news-overlay {
    background: transparent;
    /* Vanish on hover */
}

.news-card:hover .news-thumb-wrapper img {
    transform: scale(1.05);
}

/* Content */
.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    font-family: 'Courier New', Courier, monospace;
    /* Monospace for tech vibe */
    color: var(--color-accent-blue);
    font-size: 0.85rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.news-card-title {
    margin: 0 0 15px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.news-card-title a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.news-card-title a:hover {
    color: var(--color-accent-red);
}

.news-excerpt {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.news-cta {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    align-self: flex-start;
}

.news-cta:hover {
    color: var(--color-accent-blue);
    padding-left: 5px;
    /* Subtle movement */
}






/* --- Archive Filter Bar --- */
.archive-header {
    text-align: center;
    padding: 60px 0;
    background: #0a0a0a;
}

.filter-bar {
    background: #151515;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 20px 5%;
    margin-bottom: 40px;
}

#filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.filter-group select {
    appearance: none;
    /* Remove default browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: #050505;
    color: #fff;
    border: 1px solid #333;
    border-radius: 0;
    /* Sharp edges for industrial feel */
    padding: 12px 15px;
    padding-left: 40px;
    /* Space for arrow in RTL */
    font-family: var(--font-main);
    font-size: 0.9rem;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;

    /* Custom Arrow using SVG encoded data */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300f0ff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    /* Arrow on left for RTL */
    background-size: 10px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.filter-group select:hover {
    border-color: #555;
}

/* Toggle Switch CSS */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-accent-blue);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.toggle-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* Archive Grid Adjustments */
.archive-grid {
    min-height: 400px;
}

.status-badge.status-open {
    background: #00c851;
    color: #fff;
}

.status-badge.status-closed {
    background: #ff4444;
    color: #fff;
}

.status-badge.status-soon {
    background: #ffbb33;
    color: #000;
}

.archive-card {
    /* Use Flexbox column to organize header, content, and footer */
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background: #111;
    border: 1px solid #222;
    min-height: 220px;
    /* Fixed height for consistency */
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

/* Hover Effect */
.archive-card:hover {
    border-color: var(--color-accent-red);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

/* Card Header: Badge (Left) vs Title (Right) */
.archive-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 15px;
}

.archive-card .event-title {
    font-size: 1.1rem;
    margin: 0;
    text-align: right;
    /* Ensure Persian title aligns right */
    line-height: 1.4;
    order: 2;
    /* In RTL flex, usually visual order matches DOM, but let's be safe */
    flex-grow: 1;
}

.archive-card .status-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 2px;
    letter-spacing: 1px;
    height: fit-content;
    white-space: nowrap;
    margin-right: 10px;
    /* Space between title and badge */
    order: 1;
}

/* Card Meta (Date) */
.archive-card .card-meta {
    text-align: right;
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-family: monospace;
    /* Tech vibe for date */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align to right */
    gap: 8px;
}

/* Action Button - Pushed to bottom */
.archive-card .btn-neon {
    margin-top: auto;
    /* Pushes button to the very bottom */
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 0.9rem;

    /* Fix specific to your image issue */
    background: transparent;
    border: 1px solid var(--color-accent-red);
    color: var(--color-accent-red);
}

.archive-card .btn-neon:hover {
    background: var(--color-accent-red);
    color: #fff;
    box-shadow: 0 0 15px var(--color-accent-red);
}

.card-poster-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    /* Standard Poster Ratio */
    background: #000;
    overflow: hidden;
}

.event-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.archive-card:hover .event-poster {
    transform: scale(1.05);
    opacity: 0.8;
}

.card-poster-wrapper .status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    /* Left for RTL visual balance or Right based on preference */
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.poster-placeholder .dashicons {
    font-size: 40px;
    color: #333;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.archive-card .card-header {
    margin-bottom: 10px;
    display: block;
    /* Remove flex here, badge is moved */
}

/* اصلاح استایل دکمه داخل کارت جدید */
.card-body .btn-neon {
    margin-top: 15px;
}






/* --- Single Competition Hero --- */
.comp-hero {
    height: 60vh;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.comp-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 5% 50px;
    width: 100%;
    background: linear-gradient(to top, #0a0a0a 0%, transparent 100%);
}

.comp-title {
    font-size: 3rem;
    margin: 10px 0;
}

.comp-meta-row {
    display: flex;
    gap: 20px;
    color: var(--color-text-dim);
}

/* --- Sticky Tabs --- */
.comp-nav-wrapper {
    position: sticky;
    top: 0;
    /* Adjust if you have a sticky header */
    background: #0a0a0a;
    border-bottom: 1px solid #333;
    z-index: 50;
    padding: 0 5%;
}

.comp-nav {
    display: flex;
    gap: 30px;
}

.tab-link {
    background: none;
    border: none;
    color: #888;
    padding: 20px 0;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    font-family: var(--font-main);
}

.tab-link.active {
    color: #fff;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent-blue);
    box-shadow: 0 -2px 10px var(--color-accent-blue);
}

/* --- Tab Content --- */
.comp-content-area {
    padding: 40px 5%;
    min-height: 400px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.team-mini-card {
    background: #151515;
    border: 1px solid #333;
    padding: 15px;
    text-align: center;
}

.robot-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

/* Matches List */
.match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #222;
}

.team-name.winner {
    color: var(--color-accent-blue);
    font-weight: bold;
}

.vs {
    margin: 0 15px;
    color: #555;
    font-size: 0.8rem;
}

/* --- Timeline / Roadmap Styles --- */
.timeline-wrapper {
    position: relative;
    padding: 20px 0;
    /* ایجاد خط عمودی در سمت راست */
    border-right: 2px solid #333;
    margin-right: 20px;
    /* فاصله از لبه راست کانتینر */
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-right: 40px;
    /* فاصله محتوا از خط عمودی */
    opacity: 0.4;
    /* حالت پیش‌فرض: کمرنگ (رویدادهای آینده) */
    transition: all 0.3s ease;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* نقطه اتصال (Node) روی خط */
.timeline-dot {
    position: absolute;
    top: 5px;
    right: -8px;
    /* تنظیم دقیق برای قرارگیری روی خط 2 پیکسلی */
    width: 14px;
    height: 14px;
    background-color: #0a0a0a;
    /* رنگ زمینه دایره */
    border: 2px solid #555;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}

/* استایل مراحل انجام شده (Passed/Active) */
.timeline-item.passed {
    opacity: 1;
    /* پررنگ شدن متن */
}

.timeline-item.passed .timeline-dot {
    background-color: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 15px var(--color-accent-blue);
    /* درخشش نئونی */
    transform: scale(1.2);
    /* کمی بزرگتر شدن */
}

/* تایپوگرافی محتوا */
.timeline-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* ترازبندی متن‌ها */
}

.phase-date {
    font-family: 'Courier New', monospace;
    /* فونت مونواسپیس برای تاریخ */
    font-size: 0.85rem;
    color: var(--color-accent-red);
    /* رنگ متمایز برای تاریخ */
    margin-bottom: 8px;
    background: rgba(255, 46, 46, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.phase-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.4;
}

/* هاور افکت برای آیتم‌ها */
.timeline-item:hover {
    opacity: 1;
}

.timeline-item:hover .timeline-dot {
    border-color: #fff;
}

.overview-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    /* جلوگیری از کشیده شدن ارتفاع */
    flex-wrap: wrap;
}

.comp-poster-single {
    flex: 0 0 300px;
    /* عرض ثابت برای دسکتاپ */
    max-width: 100%;
    position: relative;
}

.poster-img {
    width: 100%;
    height: auto;
    /* حفظ نسبت تصویر */
    max-height: 450px;
    /* محدودیت ارتفاع */
    object-fit: cover;
    /* برش هوشمندانه اضافات */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
}

/* ریسپانسیو پوستر */
@media (max-width: 768px) {
    .overview-layout {
        flex-direction: column;
    }

    .comp-poster-single {
        flex: 1 1 100%;
        width: 100%;
        max-width: 350px;
        /* محدودیت عرض در موبایل */
        margin: 0 auto 30px;
    }
}





/* --- Magazine Archive Layout --- */
.mag-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* 70% Content - 30% Sidebar */
    gap: 40px;
    padding: 0 5% 60px;
}

.mag-main {
    min-width: 0;
    /* Fixes grid overflow issues */
}

/* Filter Bar Adjustments */
.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-item {
    position: relative;
    flex-grow: 1;
}

#mag-search {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    padding: 12px 15px;
    padding-left: 40px;
    /* Space for icon */
    color: #fff;
    font-family: var(--font-main);
}

.search-item .dashicons {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-select {
    /* Reusing dropdown style from previous step */
    background-color: #050505;
    color: #fff;
    border: 1px solid #333;
    padding: 12px;
}

/* Load More Button */
.btn-wide {
    width: 100%;
    display: block;
    margin-top: 40px;
    background: transparent;
    transition: 0.3s;
}

.btn-wide:hover {
    background: var(--color-accent-red);
    color: #fff;
    border-color: var(--color-accent-red);
}

/* Sidebar Styling */
.widget-area {
    border-left: 1px solid #222;
    padding-left: 30px;
}

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.2rem;
    color: var(--color-accent-blue);
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
    color: var(--color-text-dim);
}

.widget li a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .mag-layout {
        grid-template-columns: 1fr;
    }

    .widget-area {
        border-left: none;
        border-top: 1px solid #222;
        padding-left: 0;
        padding-top: 40px;
    }
}

.news-grid-archive {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (max-width: 600px) {
    .news-grid-archive {
        grid-template-columns: 1fr;
    }
}




/* --- Single Post Layout --- */
.single-hero {
    height: 50vh;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 50px;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 50px;
}

.single-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 15px 0;
    line-height: 1.2;
}

.single-meta {
    display: flex;
    gap: 20px;
    color: #ccc;
    font-size: 0.9rem;
}

.category-badge {
    background: var(--color-accent-blue);
    color: #000;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 2px;
}

/* Flex Container */
.single-container {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.site-content {
    flex: 3;
    min-width: 0;
    /* Prevent flex item overflow */
}

.site-sidebar {
    flex: 1;
}

/* Typography & Content */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-accent-red);
    /* Right border in RTL automatically? Check browser behavior, usually start-border */
    margin: 30px 0;
    padding: 10px 20px;
    background: #111;
    font-style: italic;
    color: #fff;
}

/* RTL specific fix for border if needed, but 'border-inline-start' is better modern CSS */
html[dir="rtl"] .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--color-accent-red);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    /* RTL: In LTR logic it starts from left. For RTL logic, we might want it right. Or just left:0 width: % works visually fine for progress */
    height: 4px;
    background: var(--color-accent-red);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--color-accent-red);
}

/* Post Footer Box */
.post-footer-box {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.related-event-card {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--color-accent-blue);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 8px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.event-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--color-accent-blue);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #111;
    padding: 20px;
    border: 1px solid #222;
}

.author-avatar img {
    border-radius: 50%;
    border: 2px solid #333;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.comment-list {
    padding: 0;
    list-style: none;
}

.comment-body {
    background: #0f0f0f;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
}

.comment-form textarea,
.comment-form input {
    width: 100%;
    background: #000;
    border: none;
    border-bottom: 2px solid #333;
    padding: 15px;
    color: #fff;
    margin-bottom: 20px;
    transition: 0.3s;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--color-accent-blue);
    outline: none;
}

/* Mobile */
@media (max-width: 900px) {
    .single-container {
        flex-direction: column;
    }

    .site-sidebar {
        order: 2;
    }

    /* Content first */
}


/* --- Single Post Layout --- */
.single-hero {
    height: 50vh;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 50px;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 50px;
}

.single-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 15px 0;
    line-height: 1.2;
}

.single-meta {
    display: flex;
    gap: 20px;
    color: #ccc;
    font-size: 0.9rem;
}

.category-badge {
    background: var(--color-accent-blue);
    color: #000;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 2px;
}

/* Flex Container */
.single-container {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.site-content {
    flex: 3;
    min-width: 0;
    /* Prevent flex item overflow */
}

.site-sidebar {
    flex: 1;
}

/* Typography & Content */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-accent-red);
    /* Right border in RTL automatically? Check browser behavior, usually start-border */
    margin: 30px 0;
    padding: 10px 20px;
    background: #111;
    font-style: italic;
    color: #fff;
}

/* RTL specific fix for border if needed, but 'border-inline-start' is better modern CSS */
html[dir="rtl"] .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--color-accent-red);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    /* RTL: In LTR logic it starts from left. For RTL logic, we might want it right. Or just left:0 width: % works visually fine for progress */
    height: 4px;
    background: var(--color-accent-red);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--color-accent-red);
}

/* Post Footer Box */
.post-footer-box {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.related-event-card {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--color-accent-blue);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 8px;
}

.event-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--color-accent-blue);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #111;
    padding: 20px;
    border: 1px solid #222;
}

.author-avatar img {
    border-radius: 50%;
    border: 2px solid #333;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.comment-list {
    padding: 0;
    list-style: none;
}

.comment-body {
    background: #0f0f0f;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
}

.comment-form textarea,
.comment-form input {
    width: 100%;
    background: #000;
    border: none;
    border-bottom: 2px solid #333;
    padding: 15px;
    color: #fff;
    margin-bottom: 20px;
    transition: 0.3s;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--color-accent-blue);
    outline: none;
}

/* Mobile */
@media (max-width: 900px) {
    .single-container {
        flex-direction: column;
    }

    .site-sidebar {
        order: 2;
    }

    /* Content first */
}

/* --- Single Post Layout --- */
.single-hero {
    height: 50vh;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 50px;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 50px;
}

.single-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 15px 0;
    line-height: 1.2;
}

.single-meta {
    display: flex;
    gap: 20px;
    color: #ccc;
    font-size: 0.9rem;
}

.category-badge {
    background: var(--color-accent-blue);
    color: #000;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 2px;
}

/* Flex Container */
.single-container {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.site-content {
    flex: 3;
    min-width: 0;
    /* Prevent flex item overflow */
}

.site-sidebar {
    flex: 1;
}

/* Typography & Content */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-accent-red);
    /* Right border in RTL automatically? Check browser behavior, usually start-border */
    margin: 30px 0;
    padding: 10px 20px;
    background: #111;
    font-style: italic;
    color: #fff;
}

/* RTL specific fix for border if needed, but 'border-inline-start' is better modern CSS */
html[dir="rtl"] .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--color-accent-red);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    /* RTL: In LTR logic it starts from left. For RTL logic, we might want it right. Or just left:0 width: % works visually fine for progress */
    height: 4px;
    background: var(--color-accent-red);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--color-accent-red);
}

/* Post Footer Box */
.post-footer-box {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.related-event-card {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--color-accent-blue);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 8px;
}

.event-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--color-accent-blue);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #111;
    padding: 20px;
    border: 1px solid #222;
}

.author-avatar img {
    border-radius: 50%;
    border: 2px solid #333;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.comment-list {
    padding: 0;
    list-style: none;
}

.comment-body {
    background: #0f0f0f;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
}

.comment-form textarea,
.comment-form input {
    width: 100%;
    background: #000;
    border: none;
    border-bottom: 2px solid #333;
    padding: 15px;
    color: #fff;
    margin-bottom: 20px;
    transition: 0.3s;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--color-accent-blue);
    outline: none;
}

/* Mobile */
@media (max-width: 900px) {
    .single-container {
        flex-direction: column;
    }

    .site-sidebar {
        order: 2;
    }

    /* Content first */
}


/* --- Single Post Layout --- */
.single-hero {
    height: 50vh;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 50px;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 50px;
}

.single-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 15px 0;
    line-height: 1.2;
}

.single-meta {
    display: flex;
    gap: 20px;
    color: #ccc;
    font-size: 0.9rem;
}

.category-badge {
    background: var(--color-accent-blue);
    color: #000;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 2px;
}

/* Flex Container */
.single-container {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.site-content {
    flex: 3;
    min-width: 0;
    /* Prevent flex item overflow */
}

.site-sidebar {
    flex: 1;
}

/* Typography & Content */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-accent-red);
    /* Right border in RTL automatically? Check browser behavior, usually start-border */
    margin: 30px 0;
    padding: 10px 20px;
    background: #111;
    font-style: italic;
    color: #fff;
}

/* RTL specific fix for border if needed, but 'border-inline-start' is better modern CSS */
html[dir="rtl"] .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--color-accent-red);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    /* RTL: In LTR logic it starts from left. For RTL logic, we might want it right. Or just left:0 width: % works visually fine for progress */
    height: 4px;
    background: var(--color-accent-red);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--color-accent-red);
}

/* Post Footer Box */
.post-footer-box {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.related-event-card {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--color-accent-blue);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 8px;
}

.event-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--color-accent-blue);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #111;
    padding: 20px;
    border: 1px solid #222;
}

.author-avatar img {
    border-radius: 50%;
    border: 2px solid #333;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.comment-list {
    padding: 0;
    list-style: none;
}

.comment-body {
    background: #0f0f0f;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
}

.comment-form textarea,
.comment-form input {
    width: 100%;
    background: #000;
    border: none;
    border-bottom: 2px solid #333;
    padding: 15px;
    color: #fff;
    margin-bottom: 20px;
    transition: 0.3s;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--color-accent-blue);
    outline: none;
}

/* Mobile */
@media (max-width: 900px) {
    .single-container {
        flex-direction: column;
    }

    .site-sidebar {
        order: 2;
    }
}

.container {
    margin: 0 auto;
    padding: 0 5%;
    /* حاشیه امن از چپ و راست */
}

.event-icon {
    flex: 0 0 50px;
    /* عرض ثابت */
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-info {
    flex-grow: 1;
    /* پر کردن فضای خالی وسط */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-info h4 {
    margin: 0 0 5px 0;
    color: var(--color-accent-blue);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-info p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ddd;
}

.event-info a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}

.related-event-card .btn-neon {
    flex-shrink: 0;
    /* جلوگیری از جمع شدن دکمه */
    white-space: nowrap;
    /* جلوگیری از شکستن متن دکمه */
    margin-right: auto;
    /* در RTL دکمه را به سمت چپ هل می‌دهد (اگر نیاز باشد) */
}

/* حالت موبایل برای باکس اطلاعیه */
@media (max-width: 768px) {
    .related-event-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .event-info {
        width: 100%;
    }

    .related-event-card .btn-neon {
        width: 100%;
        margin-right: 0;
    }
}








/* --- Sponsorship Page --- */
.stats-bar-section {
    background: #111;
    padding: 60px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--color-accent-blue);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.stat-label {
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Z-Pattern Opps */
.opp-row {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-top: 80px;
}

.opp-row.reverse {
    flex-direction: row-reverse;
}

.opp-text {
    flex: 1;
}

.opp-text h3 {
    color: var(--color-accent-red);
    font-size: 2rem;
}

.opp-image {
    flex: 1;
    height: 350px;
}

.opp-img-box {
    width: 100%;
    height: 100%;
    border: 2px solid #222;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

/* Gravity Forms Dark Overrides */
.gf-dark-wrapper {
    background: #0a0a0a;
    padding: 40px;
    border: 1px solid #222;
}

.gf-dark-wrapper input,
.gf-dark-wrapper textarea {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding: 15px !important;
}

.gform_button {
    background: var(--color-accent-red) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 30px !important;
    cursor: pointer;
}






/* --- Masonry Gallery Layout --- */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
    padding: 40px 0;
}

.gallery-card {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid #222;
}

.gallery-thumb-wrap {
    position: relative;
    line-height: 0;
    /* Remove gap under image */
}

.gallery-thumb-wrap img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: 0.3s;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}



/* --- Gallery Filter Refactor --- */
.gallery-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

/* Season Dropdown */
.filter-dropdown {
    background: #050505;
    color: #fff;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-main);
}

/* Media Type Tabs */
.mtype-tabs {
    display: flex;
    gap: 5px;
}

.mtype-tab {
    padding: 10px 20px;
    color: var(--color-text-dim);
    border-bottom: 2px solid transparent;
    transition: 0.3s;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.mtype-tab:hover {
    color: #fff;
}

.mtype-tab.active {
    color: #fff;
    border-bottom-color: var(--color-accent-blue);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Gallery Overlay Updates */
.overlay-content {
    width: 100%;
}

.gallery-sub-title {
    display: block;
    font-size: 0.75rem;
    color: var(--color-accent-blue);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-sub-title .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}


/* --- Media Masonry Grid --- */
.media-masonry {
    column-count: 4;
    /* تعداد ستون‌ها */
    column-gap: 15px;
}

.media-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #222;
    background: #000;
}

.media-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.media-item:hover img {
    transform: scale(1.05);
}

/* Video Item Styles */
.video-placeholder-bg {
    width: 100%;
    height: 150px;
    /* حداقل ارتفاع برای ویدیوها */
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumb-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: radial-gradient(circle, #222 0%, #000 100%);
}

.media-item .play-icon {
    font-size: 40px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 10px red;
    z-index: 2;
}

/* Hover Overlay for Images */
.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.media-overlay .dashicons {
    color: #fff;
    font-size: 30px;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

/* --- Lightbox Styles --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

#lightboxImg {
    max-width: 100%;
    max-height: 90vh;
    border: 2px solid #333;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.video-wrapper {
    width: 80vw;
    height: 45vw;
    /* 16:9 Aspect Ratio */
    max-width: 1000px;
    max-height: 560px;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .media-masonry {
        column-count: 3;
    }
}

@media (max-width: 600px) {
    .media-masonry {
        column-count: 2;
    }
}




/* --- Single Gallery Styles --- */
.gallery-hero {
    height: 50vh;
    min-height: 400px;
}

.gallery-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.gallery-description {
    margin: 40px 0;
    padding-bottom: 40px;
    border-bottom: 1px solid #222;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

/* Video Grid */
.video-section {
    margin-bottom: 60px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-card {
    position: relative;
    aspect-ratio: 16/9;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-blue);
}

.video-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #222 0%, #000 100%);
}

.video-thumb-placeholder .dashicons {
    font-size: 40px;
    color: #444;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    font-size: 50px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    opacity: 0.8;
    transition: 0.3s;
}

.video-card:hover .play-icon {
    transform: scale(1.2);
    opacity: 1;
    color: var(--color-accent-red);
}

/* --- Gallery Masonry & Hover Fix --- */
.gallery-masonry {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item-card {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    /* مهم */
}

.gallery-thumb-wrap {
    position: relative;
    /* حیاتی برای قرارگیری Overlay */
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
}

.gallery-thumb-wrap img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

/* Overlay Styling */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* پس‌زمینه تاریک */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* مخفی در حالت عادی */
    transition: all 0.3s ease;
    z-index: 10;
}

.overlay-actions {
    display: flex;
    gap: 15px;
    transform: translateY(20px);
    /* افکت حرکت از پایین */
    transition: all 0.3s ease;
}

/* Hover Effects */
.gallery-thumb-wrap:hover .gallery-overlay {
    opacity: 1;
    /* نمایش در حالت هاور */
}

.gallery-thumb-wrap:hover .overlay-actions {
    transform: translateY(0);
}

.gallery-thumb-wrap:hover img {
    transform: scale(1.1);
    /* زوم شدن تصویر */
}

/* Action Buttons */
.action-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 15px var(--color-accent-blue);
    color: #000;
}

.action-btn .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}


/* --- GLightbox Iframe Fix --- */
.gslide-iframe iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 300px;
    /* حداقل ارتفاع برای جلوگیری از مخفی شدن */
    border: none;
}



/* GLightbox Aparat Fix */
.gslide-iframe iframe,
.gslide-iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
    /* ارتفاع اجباری */
}

/* موبایل */
@media (max-width: 768px) {

    .gslide-iframe iframe,
    .gslide-iframe {
        min-height: 250px !important;
    }
}





/* --- اصلاح کامل لایت‌باکس برای آپارات (Inline Fix) --- */

/* 1. حذف کامل استایل‌های باکس سفید پیش‌فرض */
.glightbox-clean .gslide-inline {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    /* حذف اسکرول‌بار داخلی */
    width: 100% !important;
    max-width: 900px !important;
    /* محدودیت عرض برای زیبایی */
}

/* 2. حذف اسکرول‌بار از کانتینرهای والد */
.glightbox-clean .ginner-container,
.glightbox-clean .gslide-inner-content {
    overflow: hidden !important;
    /* جلوگیری از اسکرول کلی */
    padding: 0 !important;
}

/* 3. فیکس کردن کانتینر ویدیو */
.aparat-iframe-wrapper {
    position: relative;
    width: 100%;
    /* نسبت تصویر 16:9 */
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
    margin: 0 auto;
    /* وسط‌چین کردن */
}

/* 4. فیکس کردن Iframe برای جلوگیری از لقی */
.aparat-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block;
    /* حذف فاصله خطی زیر iframe */
}

/* 5. رفع مشکل اسکرول در حالت RTL (اسکرول سمت چپ) */
.glightbox-container {
    direction: ltr;
    /* موقتاً LTR کردن کانتینر لایت‌باکس برای جلوگیری از باگ اسکرول چپ */
}

/* اما محتوای متنی اگر داشتیم دوباره RTL شود (برای ویدیو نیازی نیست) */
.glightbox-desc {
    direction: rtl;
}

/* --- THE PITS (Backstage) Template --- */
:root {
    --color-pits-amber: #ffcc00;
    --color-pits-dark: #111;
}

.pits-container {
    background-color: #050505;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjMjIyIiAvPgo8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMzMzIiAvPgo8L3N2Zz4=');
    /* Carbon fiber pattern */
    min-height: 100vh;
    padding: 100px 0;
    overflow: hidden;
}

.pits-header {
    text-align: center;
    margin-bottom: 50px;
}

.pits-title {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 5px;
    font-family: var(--font-header, sans-serif);
}

.pits-subtitle {
    font-family: 'Courier New', monospace;
    color: var(--color-pits-amber);
    font-size: 1.2rem;
    letter-spacing: 2px;
    border: 1px solid var(--color-pits-amber);
    display: inline-block;
    padding: 5px 20px;
    background: rgba(0, 0, 0, 0.5);
}

/* Horizontal Scroll Container */
.pits-scroll-wrapper {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 5%;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--color-pits-amber) #222;
    padding-bottom: 60px;
    /* Space for scrollbar */
}

/* Custom Scrollbar for Webkit */
.pits-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.pits-scroll-wrapper::-webkit-scrollbar-track {
    background: #222;
}

.pits-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--color-pits-amber);
    border-radius: 4px;
}

/* Card Design */
.pits-card {
    flex: 0 0 300px;
    /* Fixed Width */
    height: 500px;
    scroll-snap-align: center;
    border: 2px solid #333;
    transition: 0.3s;
    background: #000;
    position: relative;
}

.pits-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
}

.pits-card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.2);
    transition: all 0.4s ease;
    position: relative;
}

/* Hover Effects */
.pits-card:hover {
    border-color: var(--color-pits-amber);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
    z-index: 2;
}

.pits-card:hover .pits-card-image {
    filter: grayscale(0%) contrast(1);
}

/* Overlay & Metadata */
.pits-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 40%, rgba(0, 0, 0, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.pits-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-pits-amber);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
}

.log-title {
    color: #fff;
    font-family: 'Meem', 'Courier New', monospace;
    text-transform: uppercase;
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px #000;
    line-height: 1.2;
}

/* Hazard Strip (Construction Tape Effect) */
.hazard-strip {
    height: 10px;
    width: 100%;
    background: repeating-linear-gradient(45deg,
            #000,
            #000 10px,
            var(--color-pits-amber) 10px,
            var(--color-pits-amber) 20px);
    opacity: 0.7;
    border-top: 1px solid #000;
}

.pits-card:hover .hazard-strip {
    opacity: 1;
    animation: hazard-move 2s linear infinite;
}

@keyframes hazard-move {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 56px 0;
    }

    /* Matches gradient size roughly */
}

/* Mobile */
@media (max-width: 768px) {
    .pits-card {
        flex: 0 0 260px;
        height: 400px;
    }

    .pits-title {
        font-size: 2.5rem;
    }

    .pits-scroll-wrapper {
        padding: 20px 20px;
    }
}






/* --- Pits Grid Refactor --- */

/* Grid Container */
.pits-grid-wrapper {
    display: grid;
    /* گرید ریسپانسیو: کارت‌ها حداقل 300 پیکسل و حداکثر پر کردن فضا */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* Card Updates for Grid */
.pits-card {
    height: 450px;
    /* ارتفاع ثابت برای نظم گرید */
    border: 1px solid #333;
    background: #000;
    transition: 0.3s;
    position: relative;
}

/* Asset Type Label Styling */
.asset-type {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--color-pits-amber);
    color: var(--color-pits-amber);
    padding: 3px 8px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 2px;
}

.asset-type .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Hover Effect Enhancement */
.pits-card:hover {
    border-color: var(--color-pits-amber);
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.15);
    transform: translateY(-5px);
    z-index: 2;
}

/* Typography Update */
.log-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .pits-grid-wrapper {
        grid-template-columns: 1fr;
        /* تک ستونه در موبایل */
        gap: 20px;
    }

    .pits-card {
        height: 350px;
        /* ارتفاع کمتر در موبایل */
    }
}

.pits-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Industrial Select Dropdown */
.industrial-select {
    background: #000;
    color: var(--color-pits-amber);
    border: 1px solid var(--color-pits-amber);
    padding: 10px 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.1);
    transition: 0.3s;
    appearance: none;
    /* Remove default arrow */
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFCC00%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    padding-right: 30px;
    min-width: 250px;
}

.industrial-select:hover,
.industrial-select:focus {
    background-color: #111;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}









/* --- TV Show Cinematic Template --- */

/* 1. Hero Section */
.tv-hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.hero-bg-video,
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.6;
    /* Darken for readability */
}

.tv-hero-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(to top, #050505 0%, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
}

.hero-content {
    text-align: left;
    /* Netflix style align */
    max-width: 800px;
}

.show-logo-img {
    max-width: 400px;
    margin-bottom: 20px;
    display: block;
}

.show-title-text {
    font-size: 5rem;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 20px;
}

.show-slogan {
    font-size: 1.5rem;
    color: #ddd;
    margin-bottom: 40px;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* 2. Broadcast Bar */
.broadcast-bar {
    background: #000;
    border-bottom: 1px solid #222;
    padding: 20px 0;
}

.broadcast-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.broadcast-label {
    color: #666;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.network-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.network-item img {
    height: 40px;
    width: auto;
    filter: grayscale(100%) brightness(0.7);
    transition: 0.3s;
}

.network-item:hover img {
    filter: grayscale(0%) brightness(1);
}

.air-time {
    color: var(--color-accent-blue);
    font-size: 0.85rem;
    font-family: monospace;
}

/* 3. Layout */
.tv-main-content {
    padding: 80px 0;
    background: #050505;
}

.tv-split-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.tv-desc-col .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background: #111;
    border: 1px solid #333;
    padding: 30px 20px;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-accent-blue);
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* 4. Cast Grid */
.tv-cast-section {
    margin-bottom: 80px;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cast-card {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 4px;
}

.cast-img-wrap {
    width: 100%;
    height: 100%;
}

.cast-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cast-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: 0.3s;
}

.cast-card:hover .cast-overlay {
    transform: translateY(0);
}

.cast-card:hover img {
    transform: scale(1.1);
}

.cast-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.cast-info span {
    font-size: 0.9rem;
    color: var(--color-accent-blue);
}

/* 5. Inline Trailer */
.tv-trailer-section {
    padding-top: 40px;
    border-top: 1px solid #222;
}

.inline-player-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border: 1px solid #333;
}

.inline-player-wrapper iframe,
.inline-player-wrapper video {
    width: 100%;
    height: 100%;
}

/* Mobile */
@media (max-width: 900px) {
    .tv-split-section {
        grid-template-columns: 1fr;
    }

    .show-title-text {
        font-size: 3rem;
    }
}








/* --- Header Redesign --- */

/* Base Floating State */
.site-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    background: rgba(10, 10, 10, 0.6);
    /* Semi-transparent dark */
    backdrop-filter: blur(12px);
    /* Glassmorphism */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 0;
}

/* Sticky Scrolled State */
.site-header.is-sticky {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: rgba(5, 5, 5, 0.95);
    /* More solid */
    border: none;
    border-bottom: 1px solid #222;
    padding: 5px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Branding */
.site-branding img {
    height: 40px;
    width: auto;
    transition: 0.3s;
}

/* --- Navigation Fix for Dropdowns --- */

/* 1. Reset & Top Level */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* فقط سطح اول منو افقی باشد */
.main-navigation>div>ul,
/* برای حالت استاندارد WP */
.main-navigation>ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* آیتم‌های لیست */
.main-navigation li {
    position: relative;
    /* مهم برای پوزیشن‌دهی زیرمنو */
}

/* لینک‌ها */
.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
    display: block;
    padding: 10px 0;
    /* ناحیه کلیک بهتر */
}

.main-navigation a:hover {
    color: var(--color-accent-blue);
    text-shadow: 0 0 8px var(--color-accent-blue);
}

/* 2. Sub-Menus (Dropdowns) */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    /* در فارسی راست‌چین */
    background: rgba(10, 10, 10, 0.95);
    /* پس‌زمینه تیره */
    border: 1px solid #333;
    border-top: 2px solid var(--color-accent-blue);
    /* نوار رنگی بالا */
    min-width: 200px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 8px 8px;

    /* مخفی سازی اولیه */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;

    /* ریست کردن استایل فلکس والد */
    display: block;
    padding: 10px 0;
}

/* نمایش زیرمنو هنگام هاور */
.main-navigation li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* آیتم‌های زیرمنو */
.main-navigation ul ul li {
    display: block;
    margin: 0;
}

.main-navigation ul ul a {
    padding: 8px 20px;
    font-size: 0.9rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

.main-navigation ul ul a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-right: 25px;
    /* افکت حرکت ریز */
}

/* 3. Dropdown Indicator (Arrow) */
.menu-item-has-children>a::after {
    content: '\f347';
    /* Dashicons Arrow Down */
    font-family: 'dashicons';
    font-size: 12px;
    margin-right: 5px;
    vertical-align: middle;
    opacity: 0.7;
}

/* RTL Support Override (اگر قالب کلاس rtl دارد) */
body.rtl .main-navigation ul ul {
    right: 0;
    left: auto;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* User Auth */
.user-auth-wrap {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
    font-size: 0.9rem;
}

.user-profile-trigger img {
    border-radius: 50%;
    border: 2px solid var(--color-accent-blue);
}

/* Dropdown */
.user-dropdown-menu {
    position: absolute;
    top: 150%;
    right: 0;
    /* Left in RTL automatically handled if direction is set */
    background: #111;
    border: 1px solid #333;
    list-style: none;
    padding: 10px;
    width: 180px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu li {
    margin-bottom: 5px;
}

.user-dropdown-menu a {
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    transition: 0.2s;
}

.user-dropdown-menu a:hover {
    background: #222;
    color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* Off-Canvas Menu */
.mobile-offcanvas {
    position: fixed;
    top: 0;
    right: -300px;
    /* Hidden */
    width: 300px;
    height: 100vh;
    background: #000;
    border-left: 1px solid #333;
    z-index: 10000;
    transition: right 0.4s ease;
    /* Use right property for slide */
    padding: 20px;
}

.menu-open .mobile-offcanvas {
    right: 0;
    /* Visible */
}

/* Backdrop for mobile menu */
.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    backdrop-filter: blur(5px);
}

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.close-offcanvas {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid #222;
}

.mobile-menu-list a {
    display: block;
    padding: 15px 0;
    color: #fff;
    font-size: 1.1rem;
}

/* RTL Support Logic (WordPress adds .rtl to body) */
body.rtl .user-dropdown-menu {
    right: auto;
    left: 0;
}

body.rtl .mobile-offcanvas {
    right: auto;
    left: -300px;
    border-left: none;
    border-right: 1px solid #333;
    transition: left 0.4s ease;
}

body.rtl.menu-open .mobile-offcanvas {
    left: 0;
}

/* Responsiveness */
.mobile-only {
    display: none;
}

@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex;
    }

    .site-header {
        width: 95%;
        top: 10px;
    }
}






/* --- Command Deck Footer --- */
.glass-footer {
    position: relative;
    background-color: #050505;
    color: #ccc;
    padding-top: 80px;
    margin-top: 50px;
    overflow: hidden;
    border-top: 2px solid var(--color-accent-blue);
    font-size: 0.95rem;
}

/* Background Pattern */
.footer-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Circuit board-like grid pattern */
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(10, 20, 30, 0.8), #000 80%);
    z-index: 2;
}

.footer-content-wrapper {
    position: relative;
    z-index: 3;
}

/* Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Column Styling */
.footer-heading {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
    text-transform: uppercase;
    border-left: 3px solid var(--color-accent-blue);
    padding-left: 10px;
}

.footer-logo img {
    max-width: 150px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3));
}

.footer-desc {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #aaa;
}

/* Menus */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #bbb;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--color-accent-blue);
    transform: translateX(5px);
    /* Arrow effect */
    text-shadow: 0 0 8px var(--color-accent-blue);
}

/* Trust Widgets */
.trust-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.trust-item img {
    max-width: 80px;
    filter: grayscale(100%) opacity(0.7);
    transition: 0.4s;
}

.trust-item:hover img {
    filter: grayscale(0%) opacity(1);
}

/* Socials */
.footer-socials {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    background: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 15px var(--color-accent-blue);
}

/* Bottom Bar */
.footer-bottom {
    border-top: 1px solid #222;
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #666;
}

.legal-links {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
}

.legal-links a {
    color: #666;
    text-decoration: none;
    transition: 0.3s;
}

.legal-links a:hover {
    color: #fff;
}

.system-status {
    color: #0f0;
    /* Terminal Green */
    text-shadow: 0 0 5px #0f0;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}


/* --- Custom Font: Meem --- */

@font-face {
    font-family: 'Meem';
    src: url('assets/fonts/Meem-Regular.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Meem';
    src: url('assets/fonts/Meem-Bold.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Meem';
    src: url('assets/fonts/Meem-ExtraBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Update Typography Variables */
:root {
    --font-main: 'Meem', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-header: 'Meem', sans-serif;
}

body {
    font-family: var(--font-main);
    font-weight: 300;
    /* Default weight */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-header);
    font-weight: 700;
}





/* --- Academy Archive Layout --- */
.academy-header {
    padding: 60px 0 40px;
    background: #050505;
    border-bottom: 1px solid #111;
    margin-bottom: 40px;
}

.academy-subtitle {
    color: var(--color-accent-blue);
    font-family: monospace;
    letter-spacing: 1px;
}

.academy-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 80px;
}

/* Sidebar */
.academy-sidebar {
    width: 25%;
    flex-shrink: 0;
}

.sidebar-inner {
    background: #080808;
    border: 1px solid #222;
    padding: 25px;
    border-radius: 8px;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-accent-blue);
    padding-bottom: 10px;
    display: inline-block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #888;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
}

/* Main Grid */
.academy-grid {
    width: 75%;
}

.course-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Course Card */
.course-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--color-accent-blue);
}

/* Thumbnail & Badge */
.course-thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
}

.course-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.level-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    color: #000;
}

.lvl-low {
    background: #00ffaa;
    box-shadow: 0 0 10px #00ffaa;
}

/* Beginner */
.lvl-mid {
    background: #ffcc00;
    box-shadow: 0 0 10px #ffcc00;
}

/* Intermediate */
.lvl-high {
    background: #ff3333;
    color: #fff;
    box-shadow: 0 0 10px #ff3333;
}

/* Advanced */

/* Body */
.course-body {
    padding: 20px;
    flex-grow: 1;
}

.course-cat {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.course-title {
    margin: 5px 0 15px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.course-title a {
    color: #fff;
    text-decoration: none;
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

.course-instructor img {
    border-radius: 50%;
}

/* Footer (Price) */
.course-footer {
    padding: 15px 20px;
    border-top: 1px solid #222;
    background: #0d0d0d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--color-accent-blue);
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

.price-free {
    color: #00ffaa;
    text-shadow: 0 0 5px rgba(0, 255, 170, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .academy-layout {
        flex-direction: column;
    }

    .academy-sidebar,
    .academy-grid {
        width: 100%;
    }
}





/* --- Udemy Layout Style --- */
.udemy-layout {
    display: flex;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Sidebar (Sticky) */
.course-sidebar {
    width: 360px;
    flex-shrink: 0;
}

.sidebar-inner.sticky-top {
    position: sticky;
    top: 100px;
    /* Adjust based on header height */
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.sidebar-media {
    position: relative;
    aspect-ratio: 16/9;
}

.sidebar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-overlay .dashicons {
    font-size: 60px;
    color: #fff;
    opacity: 0.8;
}

.sidebar-content {
    padding: 25px;
}

/* Price & Buy */
.price-tag {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    font-family: monospace;
}

.course-includes {
    margin-top: 25px;
}

.course-includes h4 {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.course-includes ul {
    list-style: none;
    padding: 0;
}

.course-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Main Content */
.course-main {
    flex: 1;
}

.course-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.course-excerpt {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

.course-meta-row {
    display: flex;
    gap: 20px;
    color: var(--color-accent-blue);
}

.course-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
}

/* Description Mask */
.course-description-wrapper {
    position: relative;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.course-description-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #050505);
    pointer-events: none;
}

.course-description-wrapper.expanded {
    max-height: none;
}

.course-description-wrapper.expanded::after {
    display: none;
}

.show-more-trigger {
    background: none;
    border: none;
    color: var(--color-accent-blue);
    cursor: pointer;
    padding: 10px 0;
    font-weight: bold;
}

/* Curriculum Accordion */
.curriculum-item {
    background: #0f0f0f;
    border: 1px solid #222;
    margin-bottom: 5px;
}

.curriculum-head {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}

.curriculum-head:hover {
    background: #1a1a1a;
}

.c-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.c-status-icon {
    color: #666;
    cursor: pointer;
}

.c-status-icon:hover {
    color: #fff;
}

.curriculum-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #0a0a0a;
    color: #888;
    font-size: 0.9rem;
}

.curriculum-head.active .toggle-icon {
    transform: rotate(180deg);
}

/* License Box */
.license-box {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 4px;
    border: 1px dashed #444;
}

.license-key {
    background: #000;
    color: #00ffaa;
    font-family: monospace;
    padding: 5px;
    text-align: center;
    margin: 5px 0;
    user-select: all;
}

/* Modal */
.robonit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.robonit-modal.open {
    display: flex;
}

.robonit-modal-content {
    background: #111;
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    border: 1px solid #333;
    position: relative;
    text-align: center;
}

.robonit-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #888;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .udemy-layout {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
    }

    .sidebar-inner.sticky-top {
        position: relative;
        top: 0;
    }
}

/* Pulse Animation for Buy Button */
.pulse-anim {
    animation: pulse-border 2s infinite;
}

.highlight-pulse {
    border-color: var(--color-accent-blue) !important;
    box-shadow: 0 0 20px var(--color-accent-blue) !important;
    transition: 0.3s;
}


/* --- Course Header Cover --- */
.course-header-cover {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 60px 0;
    margin-bottom: 40px;
    background-color: #111;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.cover-content {
    position: relative;
    z-index: 2;
}

.course-title-hero {
    font-size: 2.8rem;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.course-excerpt-hero {
    font-size: 1.2rem;
    max-width: 800px;
    color: #ddd;
    margin-bottom: 25px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-pill img {
    border-radius: 50%;
}

/* --- Sidebar Fixes --- */
.sidebar-media {
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
}

.promo-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 20px;
    flex-direction: row-reverse;
    /* For RTL currency alignment */
    justify-content: flex-end;
}

.price-display .amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.price-display .currency {
    font-size: 1rem;
    color: #aaa;
}

.price-display .free {
    color: #00ffaa;
}

.btn-xl {
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-red {
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 4px;
    transition: 0.3s;
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn-red:hover {
    background: #f40612;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
    color: #fff;
}

.guarantee-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
    display: block;
    text-align: center;
}

/* --- Instructor Card Fix --- */
.instructor-card {
    display: flex;
    gap: 20px;
    background: #111;
    border: 1px solid #222;
    padding: 25px;
    border-radius: 8px;
    align-items: flex-start;
}

.i-avatar img {
    border-radius: 50%;
    border: 2px solid var(--color-accent-blue);
    width: 80px;
    height: 80px;
}

.i-name {
    font-size: 1.3rem;
    margin: 0 0 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.i-website {
    color: #888;
    font-size: 1rem;
}

.i-bio {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.i-badges {
    display: flex;
    gap: 10px;
}

.badge-pill {
    font-size: 0.75rem;
    background: #222;
    color: #aaa;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RTL Adjustments */
body.rtl .cover-overlay {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
}

body.rtl .price-display {
    flex-direction: row;
    justify-content: flex-start;
}









/* --- Student Mode Sidebar Design --- */
.student-mode {
    background: linear-gradient(145deg, #111, #1a1a1a);
    border: 1px solid var(--color-accent-blue);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Background Glow Effect */
.student-mode::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.student-welcome {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--color-accent-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid rgba(0, 240, 255, 0.3);
    margin-bottom: 10px;
}

.welcome-text {
    color: #ccc;
    font-size: 0.95rem;
    margin: 0;
}

/* Progress Bar */
.course-progress-mini {
    position: relative;
    z-index: 1;
    margin-bottom: 25px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-accent-blue);
    box-shadow: 0 0 10px var(--color-accent-blue);
}

/* Button Update */
.btn-start-learning {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-accent-blue);
    color: #000 !important;
    text-shadow: none;
    font-weight: 800;
    transition: 0.3s;
}

.btn-start-learning:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-start-learning .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Quick Links */
.quick-links {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.q-link {
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.q-link:hover {
    color: #fff;
}



/* --- Course Card: Owned State --- */

/* 1. Owned Card Style */
.course-owned {
    border-color: var(--color-accent-blue);
    /* حاشیه آبی */
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    /* درخشش ملایم */
}

/* 2. Purchased Badge */
.card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-owned {
    background: var(--color-accent-blue);
    color: #000;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    box-shadow: 0 0 10px var(--color-accent-blue);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 3. Owned Footer Layout */
.owned-footer-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.owned-label {
    color: #00ffaa;
    /* سبز برای تایید */
    font-size: 0.85rem;
    font-weight: bold;
}

/* دکمه ورود به کلاس در کارت */
.owned-footer-content .btn-neon {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* تغییر رنگ هاور برای کارت‌های خریداری شده */
.course-owned:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
}






/* --- Author Profile Page --- */
.author-profile-page {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* 1. Hero Card */
.author-hero {
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 40px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.author-avatar-wrap img {
    border-radius: 50%;
    border: 3px solid var(--color-accent-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2rem;
    color: #fff;
}

.author-bio {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

.author-meta-badges {
    display: flex;
    gap: 10px;
}

.badge-role {
    background: #222;
    color: #aaa;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #333;
}

.badge-role.role-instructor {
    background: rgba(0, 240, 255, 0.1);
    color: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
}

/* 2. Sections */
.section-heading {
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-right: 15px;
    border-right: 4px solid var(--color-accent-blue);
    /* RTL styling */
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-courses-section,
.author-articles-section {
    margin-bottom: 60px;
}

/* Grid Helper (if not globally defined) */
.robonit-grid {
    display: grid;
    gap: 30px;
}

.grid-3-col {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Blog Card (Mini) */
.blog-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: #444;
}

.blog-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-date {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.blog-title {
    font-size: 1.1rem;
    margin: 0 0 10px;
    line-height: 1.4;
}

.blog-title a {
    color: #fff;
    text-decoration: none;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .author-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-meta-badges {
        justify-content: center;
    }
}