/**
 * TLN-Theme - استایل‌های قالب
 */

/* ============================================
   عدم نمایش هدر و منوی موبایل در حالت دسکتاپ
   ============================================ */
.tlvn-header-desktop { display: block; }
.tlvn-header-mobile { display: none; }
.tlvn-mobile-nav { display: none; }

/* ============================================
   هدر طلاویژن
   ============================================ */

.tlvn-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.tlvn-header-container {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 8px 15px;
    height: 56px;
    justify-content: space-between;
}

.tlvn-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.tlvn-logo-text {
    font-size: 1.1em;
    font-weight: 700;
    color: #800301;
    white-space: nowrap;
}

.tlvn-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85em;
    color: #333;
    white-space: nowrap;
    transition: all 0.2s;
}

.tlvn-header-btn:hover {
    background: #fdf2f2;
    border-color: #800301;
    color: #800301;
}

.tlvn-header-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
    min-width: 150px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 0 12px;
    transition: all 0.2s;
}

.tlvn-header-search:focus-within {
    border-color: #800301;
    background: #fff;
}

.tlvn-header-search .tlvn-icon {
    color: #999;
    flex-shrink: 0;
    font-size: 20px;
}

.tlvn-header-search input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.85em;
    outline: none;
    color: #333;
}

.tlvn-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.tlvn-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    fill: #666;
    font-size: 22px;
    transition: all 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.tlvn-header-icon:hover {
    background: #f7f7f7;
    color: #800301;
}

.tlvn-login-btn {
    font-size: 0.8em;
    gap: 4px;
    padding: 8px 12px;
}

/* منوی کشویی دسکتاپ */
.tlvn-desktop-menu {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tlvn-desktop-menu-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tlvn-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: all 0.2s;
}

.tlvn-menu-item:hover {
    background: #fdf2f2;
    color: #800301;
}

@media (max-width: 768px) {
    .tlvn-header-desktop { display: none; }
    .tlvn-header-mobile { display: block; }
    
    .tlvn-mobile-nav {
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 6px 0;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }
    
    .tlvn-mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 0.7em;
        color: #666;
        text-decoration: none;
        border: none;
        background: none;
        cursor: pointer;
        font-family: inherit;
        padding: 4px 8px;
        transition: color 0.2s;
    }

    .tlvn-mobile-nav-item svg {
        width: 25px;
        height: 25px;
    }

    .tlvn-header-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .tlvn-mobile-nav-item:hover,
    .tlvn-mobile-nav-item:active {
        color: #800301;
    }
    
    .tlvn-mobile-nav-logo {
        margin-top: -18px;
    }
    
    .tlvn-mobile-favicon {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #800301;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 20px;
        box-shadow: 0 2px 8px rgba(128,3,1,0.3);
    }
    
    .tlvn-mobile-favicon img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }
    
    /* آیتم‌های منوی موبایل */
    .tlvn-mobile-menu-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: #333;
        font-size: 0.95em;
        transition: background 0.15s;
    }
    
    .tlvn-mobile-menu-item:hover {
        background: #fafafa;
    }
    
    .tlvn-mobile-menu-item .tlvn-icon {
        font-size: 20px;
        color: #800301;
    }
    
    body {
        padding-bottom: 70px;
    }
}

/* ============================================
   دکمه برگشت به بالا
   ============================================ */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #800301;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.3em;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

#back-to-top:hover {
    background: #660201;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ============================================
   منوی اصلی (حالت پیش‌فرض)
   ============================================ */
.primary-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.primary-menu > li > a {
    display: block;
    padding: 14px 22px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.primary-menu > li > a:hover {
    color: #800301;
    background: rgba(128,3,1,0.03);
    border-bottom-color: #800301;
}

/* ============================================
   ویجت‌های فوتر
   ============================================ */
.footer-widgets .widget {
    margin-bottom: 20px;
}

.footer-widgets .widget-title {
    color: #800301;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dfd8ab;
}

.footer-widgets a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-widgets a:hover {
    color: #800301;
}

.footer-widgets .textwidget p {
    margin-bottom: 8px;
    line-height: 1.8;
}

/* ============================================
   کامنت‌ها (برای صفحات وبلاگ)
   ============================================ */
.comments-area {
    margin-top: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.comment-author img {
    border-radius: 50%;
    margin-left: 10px;
}

.comment-meta {
    font-size: 0.85em;
    color: #999;
}

.comment-content {
    margin-top: 10px;
    color: #444;
    line-height: 1.8;
}

/* ============================================
   ویجت‌های سایدبار
   ============================================ */
.widget {
    margin-bottom: 25px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget ul li a {
    color: #333;
    text-decoration: none;
}

.widget ul li a:hover {
    color: #800301;
}

/* ============================================
   رسپانسیو
   ============================================ */
@media (max-width: 768px) {
    .primary-menu {
        flex-direction: column;
    }
    
    .primary-menu > li > a {
        padding: 10px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
}