/* بارگذاری فونت */
@font-face {
    font-family: 'IRANSans';
    src: url('../../fonts/iransans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #ff6b35;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'IRANSans', 'Tahoma', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* هدر سایت */
.site-header {
    width: 100%;
    background: #fff;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.header-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

/* منوی اصلی */
.main-nav {
    background: var(--dark-color);
    padding: 15px 0;
    margin-bottom: 30px;
}

.main-nav .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 16px;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
}

/* بخش تب‌های اپراتورها */
.operators-section {
    margin-bottom: 30px;
}

.operators-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
}

.operator-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 30px;
    background: #fff;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    min-width: 150px;
    border: 3px solid transparent;
}

.operator-tab:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.operator-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.operator-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.operator-tab span {
    font-size: 18px;
    font-weight: bold;
}

/* محتوای اصلی */
.main-content {
    padding: 20px 0 50px;
}

/* گرید آگهی‌ها */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* کارت آگهی */
.ad-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.operator-badge {
    font-weight: bold;
    font-size: 16px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-new {
    background: var(--success-color);
    color: #fff;
}

.status-used {
    background: #ffc107;
    color: #000;
}

.ad-body {
    padding: 20px;
    flex-grow: 1;
}

.sim-number,
.price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.sim-number:last-child,
.price:last-child {
    border-bottom: none;
}

.label {
    color: #666;
    font-size: 14px;
}

.value {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-color);
}

.price .value {
    color: var(--secondary-color);
    font-size: 20px;
}

.ad-footer {
    padding: 15px 20px;
    background: var(--light-color);
}

.contact-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'IRANSans', sans-serif;
}

.contact-btn:hover {
    background: #0052a3;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.page-link {
    padding: 10px 15px;
    background: #fff;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    min-width: 45px;
    text-align: center;
}

.page-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.page-link.active {
    background: var(--primary-color);
    color: #fff;
}

.page-dots {
    padding: 10px 5px;
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.phone-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
    direction: ltr;
    display: inline-block;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.call-btn {
    padding: 12px 30px;
    background: var(--success-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s;
}

.call-btn:hover {
    background: #218838;
}

.close-btn {
    padding: 12px 30px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'IRANSans', sans-serif;
}

.close-btn:hover {
    background: #5a6268;
}

/* بلاگ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    margin-bottom: 10px;
}

.blog-card-title a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
}

.read-more:hover {
    text-decoration: underline;
}

.blog-single {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.post-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.post-featured-image {
    margin-bottom: 30px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-video {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.post-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-content {
    line-height: 2;
    margin-bottom: 30px;
}

.post-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

/* پیام‌های خالی */
.no-ads,
.no-content {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.no-ads p,
.no-content p {
    font-size: 18px;
    color: #666;
}

/* فوتر */
.site-footer {
    background: var(--dark-color);
    color: #fff;
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
}

/* طراحی ریسپانسیو - موبایل اول */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-image {
        max-height: 150px;
    }
    
    .main-nav .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .operators-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .operator-tab {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: 15px;
    }
    
    .operator-icon {
        width: 60px;
        height: 60px;
    }
    
    .ads-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-single {
        padding: 20px;
    }
    
    .post-title {
        font-size: 22px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 40px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .phone-number {
        font-size: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .call-btn,
    .close-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .operator-tab {
        padding: 12px;
    }
    
    .operator-icon {
        width: 50px;
        height: 50px;
    }
    
    .operator-tab span {
        font-size: 16px;
    }
    
    .ad-header {
        padding: 12px;
    }
    
    .ad-body {
        padding: 15px;
    }
    
    .sim-number,
    .price {
        padding: 10px 0;
    }
    
    .page-title {
        font-size: 24px;
    }
}

