/*
Theme Name: alan
Theme URI:  https://example.com/alan
Author: Generated by ChatGPT
Author URI: https://example.com
Description: Alan — قالب وردپرس فارسی با قابلیت دو‌زبانه (Polylang-ready)
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alan
Tags: custom-logo, responsive, rtl, translation-ready
*/

/* در پایین استایل‌های اصلی خودت را بگذار */


/* تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

/* هدر (Main Header) - تغییر: ثابت شدن هدر */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px; 
    
    /* === ثابت کردن هدر در بالای صفحه === */
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* پس‌زمینه شفاف یا نیمه‌شفاف برای ثابت شدن */
    background-color: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(4px); /* (اختیاری) افکت مات‌شدگی */
    /* =================================== */
    
    z-index: 1000; 
    color: #fff; 
    height: 80px; /* ارتفاع هدر را ثابت می‌کنیم */
}

.logo {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.company-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

.tagline {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 3px;
    margin-top: -3px; 
}

/* منوی ناوبری */
.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: #c0c0c0;
}

/* عنصر پرکننده (Placeholder) - برای جلوگیری از همپوشانی محتوا */
.header-placeholder {
    height: 80px; /* ارتفاعی برابر با هدر ثابت شده */
    width: 100%;
}

/* بخش اصلی (Hero Section) */
.hero-section {
    position: relative;
    height: 90vh; 
    /* **توجه:** آدرس تصویر پس‌زمینه را اینجا قرار دهید */
    background-image: url('bg.webp'); 
    background-size: cover;
    background-position: center;
    
    /* === تغییر: استفاده از Flexbox برای قرارگیری در وسط مطلق === */
    display: flex;
    justify-content: center; /* مرکز افقی */
    align-items: center; /* مرکز عمودی */
    /* ========================================================= */
    
    color: #fff;
}

/* یک لایه تیره برای بهبود خوانایی متن روی تصویر */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7); 
}

.hero-section2 {
    position: relative;
    height: 45vh; 
    /* **توجه:** آدرس تصویر پس‌زمینه را اینجا قرار دهید */
    background-image: url('bg.webp'); 
    background-size: cover;
    background-position: center;
    
    /* === تغییر: استفاده از Flexbox برای قرارگیری در وسط مطلق === */
    display: flex;
    justify-content: center; /* مرکز افقی */
    align-items: center; /* مرکز عمودی */
    /* ========================================================= */
    
    color: #fff;
}

/* یک لایه تیره برای بهبود خوانایی متن روی تصویر */
.hero-section2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7); 
}

/* محتوای Hero - تغییر: حذف موقعیت‌دهی مطلق برای مرکز شدن با Flexbox */
.hero-content {
    position: relative; 
    z-index: 100;
    text-align: center; /* متن را وسط چین می‌کند */
}

.hero-content .subtitle {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.hero-content .title {
    font-size: 60px;
    font-weight: 700;
    letter-spacing: 3px;
}

/* بخش محتوا (Content Section) - موقعیت‌دهی قبلی را حفظ می‌کنیم */
.content-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 40px;
    gap: 50px; 
    background-color: #fff; 
	min-height: 50vh;
	height: auto;
	overflow: hidden;
}

.card-image-wrapper {
    flex: 0 0 40%; 
    position: relative;
    z-index: 50; 

	height: auto; 
    
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.stone-samples-img {
    width: 30vh;
    height: auto;
	object-fit: contain;
    display: block;
    margin-bottom: 0px;
    /* **توجه:** آدرس تصویر نمونه سنگ‌ها را اینجا قرار دهید */
}

.text-block {
    flex: 0 0 40%; 
    padding: 20px;
}

.text-block h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}

.text-block p {
    font-size: 16px;
    color: #666;
}

.two-column-cards {
    display: flex;
    width: 100%;
    height: 60vh; /* ارتفاع تقریبی برای این بخش */
}

.card {
    flex: 1; /* هر کارت نصف عرض را می‌گیرد */
    position: relative;
    overflow: hidden;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* لایه تاریک برای خوانایی متن */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.see-all-button {
    text-decoration: none;
    color: #fff;
    border: 2px solid #fff;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s, color 0.3s;
}

.see-all-button:hover {
    background-color: #fff;
    color: #000;
}


/* ---------------------------------------------------------------------- */
/* استایل‌های بخش کامیونیتی (Community Section) */
/* ---------------------------------------------------------------------- */

.community-section {
    background-color: #000; /* رنگ پس‌زمینه سیاه */
    color: #fff;
    padding: 40px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.community-content p {
    font-size: 18px;
    margin: 0;
    line-height: 1.5;
}

.community-group-name {
    /* استایل مشابه عکس، با فونت کوچک‌تر و رنگ خاکستری روشن */
    font-size: 14px !important; 
    color: #ccc;
    margin-top: -5px !important;
}

.register-button {
    text-decoration: none;
    color: #fff;
    border: 2px solid #fff;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s, color 0.3s;
}

.register-button:hover {
    background-color: #fff;
    color: #000;
}

/* ---------------------------------------------------------------------- */
/* استایل‌های بخش فوتر (Footer) */
/* ---------------------------------------------------------------------- */

.main-footer {
    background-color: #fff;
    color: #333;
    padding: 60px 80px 20px 80px; /* فضای داخلی */
    border-top: 1px solid #eee; /* خط جداکننده از بخش بالا */
    font-size: 14px;
}

.footer-columns-container {
    display: flex;
    justify-content: space-between;
    padding-bottom: 50px;
    border-bottom: 1px solid #eee;
}

.footer-column {
    flex: 1; /* ستون‌ها به طور مساوی فضا را پر می‌کنند */
    margin-right: 40px;
    min-width: 180px; /* حداقل عرض برای جلوگیری از فشرده شدن بیش از حد */
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
    margin-bottom: 30px;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #000;
}

/* استایل‌های بخش Follow us */
.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-icons a {
    color: #333;
    font-size: 18px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-icons a:hover {
    color: #fff;
    background-color: #333;
    border-color: #333;
}

/* استایل‌های بخش پایین فوتر (Copyright) */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
}

.footer-bottom p {
    color: #666;
    margin: 0;
}

.footer-links-bottom a {
    text-decoration: none;
    color: #666;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #ccc;
    transition: color 0.3s;
}

.footer-links-bottom a:first-child {
    border-left: none; /* حذف خط جداکننده از اولین لینک */
    padding-left: 0;
}

.footer-links-bottom a:hover {
    color: #000;
}
.language-switcher {
    /* موقعیت‌دهی در دسکتاپ: در هدر قرار می‌گیرد اما کمی استایل خاص دارد */
    position: relative; /* موقعیت‌دهی عادی در جریان هدر */
    display: flex;
    align-items: center;
    /* این عنصر را از سمت راست هدر، کنار منو یا هر جای دیگری که می‌خواهید، قرار دهید */
    margin-left: 20px; 
}

.lang-switch-btn {
    /* شبیه دکمه‌های ساده و مدرن */
    text-decoration: none;
    color: #fff; /* رنگ متن سفید برای هدر تیره */
    font-size: 14px;
    font-weight: 500; /* کمی پررنگ‌تر از لینک‌های منو */
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.5); /* یک حاشیه بسیار ظریف سفید */
    border-radius: 3px;
    transition: all 0.3s ease;
}

.lang-switch-btn:hover {
    background-color: rgba(255, 255, 255, 0.1); /* پس‌زمینه بسیار روشن هنگام هاور */
    border-color: #fff; /* حاشیه پررنگ‌تر */
}

/* ---------------------------------------------------------------------- */
/* استایل‌های بخش محتوای مطلب تکی (Single Post Content) */
/* ---------------------------------------------------------------------- */

/* کانتینر برای محدود کردن عرض محتوا و وسط‌چین کردن آن */
.content-section .container {
    max-width: 900px; /* عرض حداکثری برای خوانایی بهتر متن */
    margin: 0 auto; /* وسط‌چین کردن در عرض */
    padding: 0 20px; /* فضای داخلی در کناره‌ها */
}

/* استایل متادیتاهای مطلب (تاریخ، نویسنده، دسته‌بندی) */
.entry-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee; /* جداکننده ظریف */
    padding-bottom: 15px;
    display: flex;
    flex-wrap: wrap; /* برای موبایل */
    gap: 15px; /* فاصله بین آیتم‌های متادیتا */
}

.entry-meta span {
    display: inline-block;
    padding-right: 15px;
    border-right: 1px solid #ddd;
}

/* حذف خط جداکننده از اولین آیتم */
.entry-meta span:first-child {
    border-right: none;
    padding-right: 0;
}

.entry-meta a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.entry-meta a:hover {
    color: #000;
}

/* استایل تصویر شاخص */
.post-thumbnail {
    margin-bottom: 40px;
    overflow: hidden; /* مطمئن شدن از عدم سرریز تصویر */
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 5px; /* گوشه‌های گرد */
    display: block;
}

/* استایل محتوای اصلی مطلب */
.entry-content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #000;
}

.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 22px; }
.entry-content h4 { font-size: 18px; }

.entry-content p {
    margin-bottom: 20px;
}

.entry-content a {
    color: #000;
    text-decoration: underline;
    transition: color 0.3s;
}

.entry-content a:hover {
    color: #666;
}

.entry-content ul,
.entry-content ol {
    margin: 20px 0 20px 20px;
    padding-right: 20px; /* برای راست‌چین */
    list-style-position: inside;
}

.entry-content li {
    margin-bottom: 10px;
}

/* استایل pagination برای پست‌های چندصفحه‌ای */
.page-links {
    margin-top: 30px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.page-links a {
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

/* استایل بخش تگ‌ها */
.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.post-tags strong {
    color: #000;
    font-weight: 700;
    margin-left: 10px;
}

.post-tags a {
    display: inline-block;
    background-color: #eee;
    color: #666;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 3px;
    margin-left: 8px;
    margin-top: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.post-tags a:hover {
    background-color: #333;
    color: #fff;
}


/* استایل ناوبری بین مطالب (قبلی/بعدی) */
.post-navigation {
    display: flex;
    justify-content: space-between;
    padding: 40px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-top: 50px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous {
    text-align: right; /* برای RTL */
}

.nav-next {
    text-align: left; /* برای RTL */
}

.post-navigation a {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.post-navigation a:hover {
    color: #666;
}

.nav-previous a {
    /* آیکون فلش برای مطلب قبلی */
}

.nav-next a {
    /* آیکون فلش برای مطلب بعدی */
}


/* ---------------------------------------------------------------------- */
/* استایل‌های بخش نظرات (Comments Section) */
/* ---------------------------------------------------------------------- */

/* کانتینر اصلی نظرات */
#comments {
    padding: 40px 0;
    margin-top: 30px;
}

/* تیتر بخش نظرات */
.comments-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* لیست نظرات */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* هر آیتم نظر */
.comment {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fff;
    position: relative;
}

/* نظرات پاسخ داده شده (فرزندان) */
.children {
    list-style: none;
    margin: 20px 0 0 40px; /* تورفتگی برای پاسخ‌ها */
    padding: 0;
    border-right: 2px solid #f0f0f0; /* خط جداکننده عمودی برای تورفتگی */
}

/* هدر نظر (نویسنده و زمان) */
.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    border-radius: 50%; /* آواتار گرد */
    margin-left: 15px;
}

.fn {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}

.comment-meta a {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin-right: 10px;
}

/* محتوای متن نظر */
.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

/* دکمه پاسخ */
.comment-reply-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    transition: all 0.3s;
}

.comment-reply-link:hover {
    background-color: #000;
    color: #fff;
}


/* استایل فرم نظرات (Comment Form) */
#respond {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fcfcfc;
}

#reply-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
}

/* فیلدهای فرم */
.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

textarea#comment {
    min-height: 150px;
    resize: vertical;
}

/* دکمه ارسال (Submit Button) */
.form-submit input[type="submit"] {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-submit input[type="submit"]:hover {
    background-color: #333;
}

a {
	text-decoration: none;
}


/* استایل‌های بخش توضیحات محصول */
.product-details {
    padding: 0 10px; /* فضای داخلی برای متن و دکمه */
}

.product-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-top: 5px;
    margin-bottom: 15px; /* فاصله بین توضیحات و دکمه */
    min-height: 42px; /* ارتفاع ثابت برای جلوگیری از پرش چیدمان */
}

/* Media Queries برای نمایش در دستگاه‌های کوچک‌تر (اختیاری اما توصیه شده) */
@media (max-width: 768px) {	
    .main-header {
        flex-direction: row; /* باید به صورت افقی باشد تا لوگو و دکمه کنار هم قرار گیرند */
        justify-content: space-between; /* پخش کردن عناصر در عرض */
        align-items: center; /* تراز کردن عمودی */
        padding: 15px 20px; /* کاهش padding برای فضای بیشتر */
        height: auto; 
        position: static; 
    }
	.logo {
        /* اگر لوگو در هدر به چپ یا راست متمایل است، آن را کنترل کنید */
        order: 1; 
    }
	.language-switcher {
        order: 2; /* مکان سوئیچر زبان را مشخص کنید */
        margin-right: 10px; /* فاصله از دکمه همبرگری */
    }
    .menu-toggle {
        display: block; /* نمایش دکمه در موبایل */
        order: 3; /* دکمه همبرگری در انتهای هدر قرار گیرد */
    }
    .header-placeholder {
        display: none; /* چون هدر دیگر ثابت نیست، نیازی به فضای خالی نداریم */
    }
	.main-nav {
        display: block; 
        position: absolute;
        top: 100%; /* شروع منو از زیر هدر */
        right: 0;
        width: 100%;
        
        /* حالت بسته: ارتفاع صفر برای فعال‌سازی انیمیشن */
        height: 0; 
        overflow: hidden; 
        
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: height 0.3s ease-out; 
        z-index: 999;
    }
	.main-nav.toggled {
        height: auto; 
        max-height: 80vh; /* ارتفاع کافی برای نمایش آیتم‌ها */
        overflow-y: auto;
    }
    .main-nav ul {
        flex-direction: column;
        display: block; /* لیست آیتم‌ها باید بلوکی شود */
        margin: 0;
        padding: 10px 0;
    }

    .main-nav ul li {
        display: block;
        margin: 0;
        border-bottom: 1px solid #eee; /* جداکننده آیتم‌ها */
    }

	.main-nav ul li a {
        padding: 12px 20px;
        display: block;
    }

    .content-section {
        flex-direction: column;
        padding: 50px 20px;
        gap: 20px;
    }

    .card-image-wrapper {
        flex: 1 1 100%;
        padding: 20px;
    }

    .text-block {
        flex: 1 1 100%;
        padding: 20px;
    }

    .two-column-cards {
        flex-direction: column;
        height: auto;
        margin-top: 0;
    }
    
    .card {
        height: 40vh; /* ارتفاع کافی برای هر کارت در موبایل */
    }

    .card-title {
        font-size: 28px;
    }
    
    .community-section {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
    }

    .community-content {
        margin-bottom: 20px;
    }
    
    .community-group-name {
        margin-top: 0 !important;
    }

    .main-footer {
        padding: 40px 20px 10px 20px;
    }
    
    .footer-columns-container {
        flex-direction: column;
        gap: 30px;
        padding-bottom: 30px;
    }
    
    .footer-column {
        margin-right: 0;
        min-width: 100%;
        margin-bottom: 0;
    }

    .footer-column h4 {
        margin-bottom: 10px;
    }
    
    .footer-column ul {
        margin-bottom: 15px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 15px;
    }

    .footer-bottom p {
        margin-bottom: 10px;
    }

    .footer-links-bottom {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .footer-links-bottom a {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
	
	    .children {
        margin-left: 15px; /* کاهش تورفتگی پاسخ‌ها در موبایل */
        border-right: none;
    }
    .comment {
        padding: 15px;
    }
    .comment-author {
        flex-direction: column;
        align-items: flex-start;
    }
    .avatar {
        margin-left: 0;
        margin-bottom: 10px;
    }
    .entry-meta {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 10px;
    }
    .entry-meta span {
        border-right: none;
        padding-right: 0;
    }
    .post-navigation {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
    }
    .nav-previous,
    .nav-next {
        text-align: center;
    }
}