:root {
    --primary: #2e8b57;
    --primary-dark: #1e6b47;
    --primary-light: #3a9b67;
    --white: #f9f9f9;
    --off-white: #f5f5f5;
    --black: #222222;
    --gray: #666666;
    --light-gray: #e0e0e0;
    --text: #333333;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
    --scrollbar-track: #f1f1f1;
    --scrollbar-thumb: #c1c1c1;
    --scrollbar-thumb-hover: #a8a8a8;
}

/* استایل زیبای اسکرول‌بار */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    border: 3px solid var(--scrollbar-track);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(46, 139, 87, 0.3);
}

::-webkit-scrollbar-corner {
    background: var(--scrollbar-track);
}

/* فونت وزیر */
@font-face {
  font-family: 'Vazir';
  src: url('https://bayanbox.ir/download/7174184060226950256/Vazir.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*{margin:0;padding:0;box-sizing:border-box}
body{
    font-family:'Vazir', 'Yekan','Segoe UI',Tahoma,sans-serif;
    background:var(--white);
    color:var(--text);
    direction:rtl;
    line-height:1.7;
    scroll-behavior: smooth;
    overflow-x: hidden;
}
a{text-decoration:none;color:inherit;transition:all 0.3s ease}
img{max-width:100%;height:auto}

/* پاپ آپ اطلاع رسانی */
.popup-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.popup-overlay.active {
    display: flex;
}

.popup-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: white;
}

.popup-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url(https://s8.uupload.ir/files/islamic-pattern-28_e6mw.png);
    background-size: 300px;
    opacity: 0.2;
    border-radius: 13px;
    pointer-events: none;
}

.close-popup {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-content {
    font-size: 1.3rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.popup-content strong {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 10px;
    margin-top: 10px;
    direction: ltr;
    font-family: monospace;
}

/* هدر - حالت عادی (غیر چسبان) */
.site-header{
    background: url(https://s8.uupload.ir/files/islamic-pattern-28_e6mw.png), linear-gradient(135deg, var(--primary), var(--primary-dark));
    background-size: 500px, cover;
    color: white;
    padding: 40px 0;
    position: relative;
    transition: all 0.3s ease;
}

/* هدر چسبان هنگام اسکرول */
.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background: linear-gradient(135deg, 
        rgba(46, 139, 87, 0.95), 
        rgba(30, 107, 71, 0.95)
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.3s ease;
}

.site-header.sticky::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(https://s8.uupload.ir/files/islamic-pattern-28_e6mw.png);
    background-size: 500px;
    opacity: 0.3;
    z-index: -1;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-container{
    max-width:1200px;
    margin:0 auto;
    padding:0 20px;
}

.header-content{
    display:flex;
    justify-content:space-between;
    align-items:center;
    position: relative;
}

/* بخش سمت راست هدر - لوگو */
.header-right {
    display: flex;
    align-items: center;
}

.blog-name a{
    color:white;
    font-size:2.5rem;
    font-weight:800;
    transition: all 0.3s ease;
}

.site-header.sticky .blog-name a {
    font-size: 1.8rem;
}

.blog-tagline h2{
    color:rgba(255,255,255,0.9);
    font-size:1.2rem;
    font-weight:300;
    margin-top: 5px;
}

.site-header.sticky .blog-tagline h2 {
    font-size: 1rem;
}

/* بخش سمت چپ هدر - منو و آیکون‌ها */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* آیکون‌های جدید خانه و RSS */
.blog-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-home img, .icon-rss img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.icon-home:hover, .icon-rss:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(15deg) scale(1.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.icon-home img, .icon-rss img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.icon-home:hover img, .icon-rss:hover img {
    transform: scale(1.1);
}

/* منوی هدر که موقع چسبان شدن ظاهر میشود */
.header-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-menu-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

/* انیمیشن هاور سفید */
.header-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: white;
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.header-menu-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.header-menu-link:hover::before {
    opacity: 1;
}

.header-menu-link.selected {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.header-menu-link.selected:hover::before {
    opacity: 0;
}

/* در حالت عادی منوی هدر مخفی است */
.header-menu {
    display: none;
}

.site-header.sticky .header-menu {
    display: flex;
}

/* دکمه برگشت به بالا */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(46, 139, 87, 0.4);
    z-index: 100;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(46, 139, 87, 0.6);
}

.back-to-top:hover::before {
    opacity: 1;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.4s ease;
}

.back-to-top:hover svg {
    transform: translateY(-5px);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
    transition: all 0.1s ease;
}

/* ناوبری اصلی - منظم و مرتب */
.main-navigation{
    background:white;
    box-shadow:var(--shadow);
    margin:20px auto;
    max-width:1200px;
    border-radius:10px;
    transition: all 0.3s ease;
}

/* وقتی هدر چسبان است، منوی اصلی مخفی شود */
.site-header.sticky ~ .main-navigation {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0 auto;
    overflow: hidden;
}

.nav-container{padding:0 20px}
.nav-menu{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;padding:15px 0}
.nav-item{display:flex;align-items:center}
.nav-link{
    padding:14px 28px;
    border-radius:25px;
    color:var(--text);
    font-weight:600;
    font-size:1.1rem;
    position:relative;
    transition:all 0.3s ease;
    display:flex;
    align-items:center;
    gap:8px;
}
.nav-link:hover{
    background:var(--primary);
    color:white;
    transform:translateY(-3px);
    box-shadow:0 5px 15px rgba(46,139,87,0.3);
}
.nav-link.selected{
    background:var(--primary);
    color:white;
    box-shadow:0 4px 15px rgba(46,139,87,0.3);
}

/* محتوا - ستون‌بندی معکوس */
.content-wrapper{
    display:flex;
    flex-direction:row;
    gap:30px;
    max-width:1200px;
    margin:30px auto;
    padding:0 20px;
    transition: margin-top 0.3s ease;
}

/* وقتی هدر چسبان است، فاصله بالای محتوا کم شود */
.site-header.sticky ~ .content-wrapper {
    margin-top: 70px;
}

.sidebar{
    flex:1;
    min-width:280px;
    order: 2;
}
.content-area{
    flex:3;
    min-width:300px;
    order: 1;
}

/* ویجت‌ها */
.sidebar-widget{
    background:white;
    border-radius:12px;
    box-shadow:var(--shadow);
    margin-bottom:25px;
    overflow:hidden;
    transition: none;
}
.widget-title{
    background: url(https://s8.uupload.ir/files/islamic-pattern-28_e6mw.png), linear-gradient(135deg, var(--primary), var(--primary-dark));
    background-size: 500px, cover;
    color:white;
    padding:18px 25px;
    font-size:1.3rem;
}

.blog-avatar-link {
    display: block;
    margin: 0 auto 20px;
    max-width: 150px;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 5px 15px rgba(46, 139, 87, 0.2);
}

.blog-avatar-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(46, 139, 87, 0.3);
    border-color: var(--primary-light);
}

.blog-avatar-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.blog-avatar-link:hover .blog-avatar-img {
    transform: scale(1.05);
} 																																																			
.widget-content{padding:25px}
.blog-avatar{width:120px;height:120px;border-radius:50%;overflow:hidden;margin:0 auto 20px}
.blog-avatar img{width:100%;height:100%;object-fit:cover}
.blog-description p{color:var(--gray);line-height:1.8}

/* لیست‌ها */
.message-list,.post-list,.category-list,.archive-list{border-top:1px solid var(--light-gray)}
.message-item,.post-item,.category-item,.archive-item{
    padding:15px 0;
    border-bottom:1px solid var(--light-gray);
    transition: none;
}
.message-time,.post-date{color:var(--gray);font-size:0.9rem;margin-bottom:5px}
.message-link,.post-link,.category-link,.archive-link{color:var(--text);font-weight:600}
.message-link:hover,.post-link:hover,.category-link:hover,.archive-link:hover{color:var(--primary)}
.category-count,.archive-count{background:var(--primary-light);color:white;padding:3px 10px;border-radius:15px;font-size:0.9rem}
.sub-categories{margin-right:20px;margin-top:10px}

/* برچسب‌ها */
.tag-cloud{display:flex;flex-wrap:wrap;gap:10px}
.tag-item{background:var(--off-white);color:var(--gray);padding:8px 16px;border-radius:20px;font-size:0.95rem}
.tag-item:hover{background:var(--primary);color:white;transform:translateY(-3px)}

/* مطالب */
.post-full,.page-full{background:white;border-radius:15px;box-shadow:var(--shadow);padding:40px;margin-bottom:30px}
.post-full:hover,.page-full:hover{box-shadow:var(--shadow-hover);transform:translateY(-8px)}
.post-title,.page-title{font-size:2rem;color:var(--black);margin-bottom:20px;line-height:1.4}
.post-meta{display:flex;gap:20px;color:var(--gray);margin-bottom:25px}
.post-content,.page-content{font-size:1.1rem;line-height:1.9;color:var(--text)}
.post-image{margin:25px 0;border-radius:10px;overflow:hidden}
.post-image img{width:100%;height:400px;object-fit:cover}

.post-footer{margin-top:30px;padding-top:25px;border-top:2px solid var(--light-gray)}
.post-tags{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:20px}
.tags-label{color:var(--gray);font-weight:600}
.tags-list{display:flex;flex-wrap:wrap;gap:10px}
.tag{background:var(--off-white);color:var(--gray);padding:6px 14px;border-radius:20px;font-size:0.95rem}
.tag:hover{background:var(--primary);color:white}

/* مرتب کردن فاصله بین دکمه‌های لایک و دیسلایک */
.post-stats{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.post-rating {
    display: flex;
    gap: 15px;
    align-items: center;
}

.rate-up,.rate-down{
    padding: 10px 25px;
    border-radius: 25px;
    font-weight:600;
    font-size: 1rem;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
}

.rate-up{
    background:#4CAF50;
    color:white;
}

.rate-up:hover {
    background: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.rate-down{
    background:#f44336;
    color:white;
}

.rate-down:hover {
    background: #e53935;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.comments-link{color:var(--gray);font-weight:600}
.comments-link:hover{color:var(--primary)}

/* بخش نظرات */
.comments-section{
    margin: 50px 0 30px;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-gray);
    position: relative;
}

.comments-section::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    width: 20px;
    height: 20px;
    background: white;
    border-left: 1px solid var(--light-gray);
    border-top: 1px solid var(--light-gray);
    transform: rotate(45deg);
}

.comments-title{
    color: var(--black);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}
.total-comments{
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* فرم نظرات */
.comment-form {
    margin-top: 40px;
    padding: 30px;
    background: var(--off-white);
    border-radius: 12px;
    border: 1px solid var(--light-gray);
}

.form-title {
    font-size: 1.3rem;
    color: var(--black);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-family: 'Vazir', 'Yekan', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* دکمه ارسال نظر */
.submit-comment {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 8px;
    font-family: 'Vazir', 'Yekan', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
}

.submit-comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 139, 87, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.comments-list{
    margin-top: 40px;
}
.comment{
    padding: 25px;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    margin-bottom: 20px;
    background: white;
    transition: all 0.3s ease;
}

.comment:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.comment-header{
    margin-bottom: 15px;
}
.comment-author{
    display:flex;
    align-items:center;
    gap:15px;
}
.comment-avatar{
    width:50px;
    height:50px;
    border-radius:50%;
    border:3px solid var(--primary);
}
.author-name{
    font-weight:700;
    color:var(--black);
}
.comment-date{
    color:var(--gray);
    font-size:0.9rem;
}
.comment-body{
    line-height:1.8;
    color:var(--text);
}

/* کارت‌های مطالب */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(350px,1fr));gap:30px;margin:30px 0}
.post-card{background:white;border-radius:15px;box-shadow:var(--shadow);overflow:hidden;transition:all 0.3s ease}
.post-card:hover{box-shadow:var(--shadow-hover);transform:translateY(-10px)}
.post-thumbnail{height:200px;overflow:hidden}
.post-thumbnail img{width:100%;height:100%;object-fit:cover;transition:transform 0.5s}
.post-card:hover .post-thumbnail img{transform:scale(1.1)}
.post-card-content{padding:25px}
.post-card-title{margin-bottom:15px;font-size:1.4rem}
.post-card-title a:hover{color:var(--primary)}
.post-card-meta{display:flex;gap:15px;color:var(--gray);margin-bottom:15px;font-size:0.9rem}
.post-card-excerpt{color:var(--text);line-height:1.7;margin-bottom:20px}
.read-more{display:inline-block;background:var(--primary);color:white;padding:10px 25px;border-radius:25px;font-weight:600}
.read-more:hover{background:var(--primary-dark);transform:translateY(-3px)}

/* صفحه‌بندی */
.pagination{margin:40px 0}
.pagination-links{display:flex;justify-content:center;gap:20px}
.prev-page,.next-page{background:var(--primary);color:white;padding:12px 30px;border-radius:25px;font-weight:600}
.prev-page:hover,.next-page:hover{background:var(--primary-dark);transform:translateY(-3px)}

/* فوتر */
.site-footer{background:linear-gradient(135deg,var(--black),#111);color:white;margin-top:60px;padding:40px 0}
.footer-content{max-width:1200px;margin:0 auto;padding:0 20px}
.footer-section{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:20px}
.copyright{color:rgba(255,255,255,0.8)}
.footer-links a{color:var(--primary);font-weight:600}
.footer-links a:hover{color:var(--primary-light)}

/* رسپانسیو */
@media (max-width: 992px) {
    .content-wrapper{
        flex-direction:column;
    }
    .sidebar,
    .content-area{
        order: unset;
        width: 100%;
    }
    .posts-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
    .blog-name a{font-size:2rem}
    .site-header.sticky .blog-name a {
        font-size: 1.6rem;
    }
    .nav-menu{
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .nav-link{
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    .back-to-top {
        left: 20px;
        bottom: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-right, .header-left {
        width: 100%;
        justify-content: center;
    }
    
    .blog-icons {
        justify-content: center;
        margin-top: 10px;
    }
    
    .site-header.sticky .header-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .header-menu-link {
        padding: 8px 20px;
        font-size: 0.95rem;
    }
    
    .popup-box {
        padding: 30px 20px;
    }
    
    .popup-content {
        font-size: 1.1rem;
    }
    
    .post-full,.page-full{padding:25px}
    .post-title,.page-title{font-size:1.6rem}
    .posts-grid{grid-template-columns:1fr}
    .footer-section{flex-direction:column;text-align:center}
    
    .post-rating {
        flex-direction: column;
        gap: 10px;
    }
    
    .rate-up, .rate-down {
        width: 100%;
    }
    
    .post-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .comments-section {
        padding: 20px;
    }
    
    .submit-comment {
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        left: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .site-header.sticky .header-menu {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-menu-link {
        width: 100%;
        text-align: center;
    }
    
    .blog-icons {
        gap: 10px;
    }
    
    .icon-home, .icon-rss {
        width: 40px;
        height: 40px;
    }
    
    .icon-home img, .icon-rss img {
        width: 50px;
        height: 50px;
    }
}
									
/* استایل کلی و حاشیه سبز */
.slider-container {
    max-width: 1000px;
    margin: 30px auto;
    border: 5px solid #007052;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 112, 82, 0.3);
}

/* قاب اسلایدر - ریسپانسیو */
.slider {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* نسبت 16:9 */
}

/* استایل هر اسلاید */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: slide-fade 12s infinite;
}

/* زمان‌بندی انیمیشن با همپوشانی کامل */
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 4s; } /* بعد از 4 ثانیه شروع شود */
.slide:nth-child(3) { animation-delay: 8s; } /* بعد از 8 ثانیه شروع شود */

/* انیمیشن محو شدن کاملاً پیوسته */
@keyframes slide-fade {
    0% {
        opacity: 0;
        z-index: 1;
    }
    5% {
        opacity: 1; /* سریع وارد شود */
        z-index: 1;
    }
    30% {
        opacity: 1; /* نمایش کامل */
        z-index: 1;
    }
    35% {
        opacity: 0; /* محو شود در حالی که اسلاید بعدی در حال ظاهر شدن است */
        z-index: 0;
    }
    36% {
        opacity: 0;
        z-index: -1; /* از ترتیب رندر خارج شود */
    }
    100% {
        opacity: 0;
        z-index: -1;
    }
}

/* تصویر */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* گرادینت (حالت اول) */
.caption-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 60px 20px 30px;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%,      /* تیره */
        rgba(0, 0, 0, 0.7) 30%,     /* نیمه تیره */
        rgba(0, 0, 0, 0) 100%      /* کاملا شفاف */
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

/* عنوان (بدون font-family، سایز همان) */
.slide-title {
    color: white;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 500;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.4;
    padding: 0 15px;
}

/* ریسپانسیو برای تبلت */
@media (max-width: 768px) {
    .slider-container {
        margin: 20px 15px;
        border-width: 4px;
    }
    
    .caption-overlay {
        padding: 40px 15px 20px;
    }
    
    .slide-title {
        font-size: clamp(1.1rem, 2.8vw, 1.6rem);
    }
}

/* ریسپانسیو برای موبایل */
@media (max-width: 480px) {
    .slider-container {
        margin: 15px 10px;
        border-width: 3px;
    }
    
    .caption-overlay {
        padding: 30px 10px 15px;
    }
    
    .slider {
        padding-bottom: 75%;
    }
    
    .slide-title {
        font-size: clamp(1rem, 2.5vw, 1.4rem);
    }
}