/*
Theme Name: Tahere Hezave
Description: Custom theme for Tahere Hezave
Version: 1.0
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 80px;
    font-family: 'Khand', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #EEEEEE;
    color: #222;
    direction: ltr;
    text-align: left;
}

.site-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header Styles */
header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    font-size: 20px;
    font-weight: 500;
    background: #EEEEEE;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-family: 'Khand', sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: #222;
    text-align: left;
}

/* Main Content Area */
main {
    flex: 1;
    display: flex;
    padding: 20px 40px;
    gap: 60px;
    min-height: calc(100vh - 140px);
}

/* Sidebar Styles */
#sidebar {
    width: 160px;
    padding-top: 20px;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#sidebar li {
    margin: 14px 0;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Khand', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #222;
    text-align: left;
   width: fit-content;
}

#sidebar li:hover {
    opacity: 0.6;
    border-bottom: 1px solid #333;
    
}

/* Content Area Styles */
#content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#submenu-container {
    min-height: 60px;
}

#items-container {
    flex: 1;
}

/* Submenu Styles - SIMPLIFIED */
.submenu {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.submenu-item {
    cursor: pointer;
    color: #444;
    transition: opacity 0.2s;
    font-weight: 500;
    font-family: 'Khand', sans-serif;
    font-size: 16px;
    text-align: left;
    /* حذف تمام استایل‌های باکس */
    padding: 0;
    border: none;
    background: none;
    border-radius: 0;
}

.submenu-item:hover {
    opacity: 0.7;
    /* حذف تغییر background در هاور */
    background: none;
}



/* استایل مخصوص زیرمنوهای سطح سوم - عمودی */
.subsubmenu {
    margin-top: 0;
    display: flex;
    flex-direction: column; /* تغییر به عمودی */
    gap: 10px; /* فاصله کمتر برای نمایش عمودی */
    align-items: flex-start; /* تراز به چپ */
}

.subsubmenu-title {
    color: #333;
    font-size: 18px;
    margin: 0;
    margin-bottom: 20px;
    font-weight: bold;
    font-family: 'Khand', sans-serif;
    width: 100%;
    text-align: left;
}

.subsubmenu-item {
    /* حذف استایل‌های باکس برای زیرمنوهای سطح سوم */
    background: none;
    border: none;
    color: #444;
    /* استایل برای نمایش عمودی */
    width: 100%;
    padding: 5px 0; /* padding عمودی */
}

/* Back Button */
.back-button {
    cursor: pointer;
    color: #333;
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
    display: inline-block;
    transition: background 0.2s;
    font-family: 'Khand', sans-serif;
    text-align: left;
}

.back-button:hover {
    background: #e0e0e0;
}

/* Post Items */
.post-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: left;
}

.post-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-family: 'Khand', sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    font-family: 'Khand', sans-serif;
    margin-bottom: 10px;
    text-align: left;
}

.read-more-link {
    color: #0073aa;
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    cursor: pointer;
    font-family: 'Khand', sans-serif;
    font-weight: 500;
    text-align: left;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Full Post Content */
.full-post-content {
    padding: 20px 0;
    text-align: left;
}

.full-post-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-family: 'Khand', sans-serif;
    font-size: 22px;
    font-weight: 500;
    text-align: left;
}

.post-content {
    color: #333;
    line-height: 1.8;
    font-size: 16px;
    font-family: 'Khand', sans-serif;
    text-align: left;
}

.post-content p {
    text-align: left;
    margin-bottom: 1em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    text-align: left;
}

/* Gallery Styles */
#gallery-container {
    margin-top: 20px;
    text-align: left;
}

.gallery-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.gallery-item {
    text-align: center;
    cursor: pointer;
}

.gallery-item img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #ccc;
    transition: all 0.3s ease;

}

img{
    filter: grayscale(100%); /* تبدیل به سیاه و سفید */
}

img:hover{
    filter: grayscale(0%); /* بازگشت به رنگ اصلی */
}
    
   
.gallery-item img:hover {
    transform: scale(1.05);
    
}

.gallery-item p {
    color: #333;
    margin: 10px 0 0 0;
    font-size: 14px;
    font-family: 'Khand', sans-serif;
}

/* Scene Content */
.scene-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
    text-align: left;
}

.scene-content h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-family: 'Khand', sans-serif;
    text-align: left;
}

.scene-content div {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    font-family: 'Khand', sans-serif;
    margin-bottom: 25px;
    text-align: left;
}

.scene-content img {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
}

/* Page Content */
.page-content {
    padding: 20px 0;
    text-align: left;
}

.page-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-family: 'Khand', sans-serif;
    font-size: 22px;
    font-weight: 500;
    text-align: left;
}

.page-content p {
    text-align: left;
}

/* Static List Styles */
.static-list {
    margin-top: 20px;
    text-align: left;
}

.static-list div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.static-list div div {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #333;
    font-family: 'Khand', sans-serif;
    font-size: 16px;
    transition: background-color 0.2s;
    text-align: left;
}

.static-list div div:hover {
    background: #e9ecef;
}

/* Additional LTR fixes */
h1, h2, h3, h4, h5, h6 {
    text-align: left;
}

p {
    text-align: left;
}

div {
    text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }
    
    main {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
    }
    
    #sidebar {
        width: 100%;
        padding-top: 0;
    }
    
    #sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: flex-start;
    }
    
    #sidebar li {
        margin: 5px 0;
    }
.submenu {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

   .gallery-item img {
        width: 150px;
        height: 150px;
    }
}

/* Ensure all text elements are LTR */
input, textarea, select, button {
    text-align: left;
    direction: ltr;
}

/* Fix for WordPress admin bar */
html {
    margin-top: 0 !important;
}

.admin-bar .site-container {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-container {
        margin-top: 46px;
    }
}
/* استایل برای عنوان پست‌ها */
.post-title-item {
    cursor: pointer;
    color: #444;
    transition: opacity 0.2s;
    font-weight: 500;
    font-family: 'Khand', sans-serif;
    font-size: 16px;
    text-align: left;
    padding: 5px 0;
    width: 100%;
}

.post-title-item:hover {
    opacity: 0.7;
}
/* استایل برای آیتم فعال در منو */
.submenu-item.active {
    font-weight: 600;
    color: #000;
    position: relative;
}

.submenu-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #000;
}
/* استایل برای دکمه Back */
.back-button {
    font-size: 24px;
    cursor: pointer;
    margin-bottom: 15px;
    color: #333;
    display: inline-block;
    transition: color 0.3s ease;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
}

.back-button:hover {
    color: #666;
}

/* تنظیم موقعیت برای صفحه contact و سایر صفحات */
.page-content,
.full-post-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* اطمینان از اینکه محتوا از بالا شروع می‌شود */
#items-container > div {
    margin-top: 0;
    padding-top: 0;
}

/* حذف margin از تیترها در صفحات */
.page-content h2,
.full-post-content h2 {
    margin-top: 26px !important;
}

/* استایل برای ناحیه قرمز وقتی مخفی است */
#submenu-container {
    transition: all 0.3s ease;
}

/* استایل برای دکمه Back */
.back-button {
    font-size: 24px;
    cursor: pointer;
    margin-bottom: 15px;
    color: #333;
    display: inline-block;
    transition: color 0.3s ease;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
}

.back-button:hover {
    color: #666;
}

/* تنظیم موقعیت برای صفحه contact و سایر صفحات */
.page-content,
.full-post-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* اطمینان از اینکه محتوا از بالا شروع می‌شود */
#items-container > div {
    margin-top: 0;
    padding-top: 0;
}

/* حذف margin از تیترها در صفحات */
.page-content h2,
.full-post-content h2 {
    margin-top: 0 !important;
}

/* استایل برای ناحیه قرمز وقتی مخفی است */
#submenu-container {
    transition: all 0.3s ease;
}

/* استایل برای آیتم‌های عنوان پست انگلیسی */
.subsubmenu-item.post-title-item {
    white-space: pre-wrap;
    font-family: monospace;
    direction: ltr;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 12px;
}

/* حفظ فاصله‌ها در عناوین */
.subsubmenu-item.post-title-item {
    white-space: pre;
}

/* برای نمایش بهتر فاصله‌های اضافه شده */
.subsubmenu {
    font-family: 'Khand', sans-serif;
}

.subsubmenu-item.post-title-item {
    font-family: monospace, 'Khand', sans-serif;
    letter-spacing: 0.5px;
}
/* ==================== FOOTER STYLES ==================== */

/* فوتر اصلی */
.site-footer {
    font-family: 'Khand', sans-serif;
    position: relative;
    width: 100%;
    margin-top: auto;
}

.footer {
    font-family: 'Khand', sans-serif;
    width: 100%;
}

/* استایل دسکتاپ (پیش‌فرض) */
@media (min-width: 769px) {
    .footer-text {
        font-family: 'Khand', sans-serif;
        font-size: 14px;
        color: #666;
        font-weight: 400;
        letter-spacing: 0.5px;
        position: absolute; /* تغییر از fixed به absolute */
        bottom: 20px;
        left: 40px;
        z-index: 100;
        display: block;
    }
    
    /* تنظیم موقعیت container اصلی */
    .site-container {
        position: relative;
        min-height: 100vh;
        padding-bottom: 60px; /* فضای اضافه برای فوتر */
    }
    
    /* اطمینان از محتوای طولانی */
    main {
        min-height: auto;
        flex: 1;
    }
    
    #items-container {
        min-height: 300px; /* حداقل ارتفاع */
    }
}

/* استایل موبایل */
@media (max-width: 768px) {
    .footer-text {
        font-family: 'Khand', sans-serif;
        font-size: 14px;
        color: #666;
        font-weight: 400;
        /* بازنشانی استایل‌های دسکتاپ */
        position: relative;
        bottom: auto;
        left: auto;
        
        /* استایل باکس موبایل */
        display: block;
        width: calc(100% - 40px);
        margin: 30px auto 20px;
        padding: 20px;
        background: #c9c9c9b0; /* طوسی روشن */
        text-align: center;
        color: #333;
        font-weight: 400;
        border: 1px solid #ddd;
    }
    
    /* تنظیم موقعیت برای موبایل */
    main {
        min-height: auto;
    }
    
    .site-container {
        padding-bottom: 20px; /* فضای اضافه کمتر برای موبایل */
    }
}

/* تنظیم برای حالت‌های خاص */
.admin-bar .site-container {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-container {
        margin-top: 46px;
    }
}

/* جلوگیری از همپوشانی با محتوای طولانی */
#items-container {
    position: relative;
    z-index: 1;
}

/* اطمینان از اینکه فوتر در پایین قرار می‌گیرد */
.site-container {
    display: flex;
    flex-direction: column;
}

/* تنظیم برای صفحات خاص */
.page-content,
.full-post-content {
    position: relative;
    z-index: 1;
}