/* تنظیمات فونت و ریست */
:root {
    --primary-color: #c20b0b;
    --text-color: #555;
    --dark-bg: #222;
    --light-bg: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: 'Vazirmatn FD', Tahoma, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- هدر (Header) --- */
.main-header {
    width: 100%;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    z-index: 999;
}

/* نوار بالا */
.top-bar {
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    padding: 8px 0;
    color: #666;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-group, .address-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon {
    font-style: normal;
}

/* نوار منو */
.nav-bar-wrapper {
    padding: 15px 0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    height: 55px;
    width: auto;
}

.desktop-menu ul {
    display: flex;
    gap: 25px;
}

.desktop-menu a {
    font-weight: 500;
    font-size: 15px;
    color: #333;
    padding-bottom: 5px;
    position: relative;
}

.desktop-menu a:hover, .desktop-menu a.active {
    color: var(--primary-color);
}

.desktop-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.desktop-menu a:hover::after, .desktop-menu a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-login {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #a00909;
}

.btn-cart {
    font-size: 18px;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -10px;
    background: #333;
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* دکمه موبایل */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #333;
}

/* منوی موبایل */
.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
    overflow-y: auto;
}

.mobile-menu-sidebar.open {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.close-menu {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

.mobile-links li {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.mobile-links a {
    font-size: 16px;
    color: #333;
}

.mobile-links a:hover {
    color: var(--primary-color);
}

/* --- اسلایدر --- */
.slider-wrapper {
    margin-top: 20px;
}

.swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.swiper-button-next, .swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.4);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    transition: background 0.3s;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: rgba(0,0,0,0.7);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 20px !important;
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

/* --- ویژگی‌ها --- */
.section {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.feature-item {
    background: #fff;
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.feature-item img {
    width: 90px;
    height: auto;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.feature-item:hover img {
    transform: scale(1.1);
}

.feature-item h3 {
    font-size: 19px;
    margin-bottom: 12px;
    color: #333;
}

.feature-item p {
    margin-bottom: 15px;
    font-size: 14px;
}

.read-more {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 13px;
}

.read-more:hover {
    text-decoration: underline;
}

/* --- درباره ما --- */
.about-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-img-col {
    flex: 1;
}

.about-img-col img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 10px 10px 0 var(--primary-color);
    transition: transform 0.3s;
}

.about-img-col img:hover {
    transform: scale(1.03);
}

.about-txt-col {
    flex: 1;
}

.sub-heading {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.about-txt-col h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.divider {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 25px 0;
}

.stats-box {
    display: inline-flex;
    align-items: center;
    background: #f8f8f8;
    padding: 20px 30px;
    border-right: 5px solid var(--primary-color);
    border-radius: 8px;
}

.stat-num {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
    margin-left: 15px;
}

.stat-desc {
    font-size: 16px;
    color: #555;
}

/* --- فوتر --- */
.main-footer {
    background: #1a1a1a;
    color: #aaa;
    padding-top: 60px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-logo {
    width: 130px;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
}

.footer-col h3 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 19px;
    position: relative;
    padding-right: 20px;
}

.footer-col h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 5px;
    height: 22px;
    background: var(--primary-color);
}

.footer-contact li {
    margin-bottom: 18px;
    font-size: 14px;
}

.socials {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.socials a {
    font-size: 20px;
    color: #aaa;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 25px 0;
    font-size: 13px;
}

/* --- ریسپانسیو --- */
@media (max-width: 1024px) {
    .about-grid {
        flex-direction: column;
        gap: 40px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .desktop-menu, .header-actions {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .top-bar {
        font-size: 12px;
        padding: 10px 0;
    }

    .top-bar-content {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .section {
        padding: 40px 0;
    }

    .about-txt-col h2 {
        font-size: 24px;
    }

    .stats-box {
        padding: 15px 20px;
    }

    .stat-num {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .feature-item {
        padding: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* فونت‌ها */
body {
    font-family: 'Vazirmatn FD', Tahoma, sans-serif; /* وزیر برای متن */
}

h1, h2, h3, .section-title, .sub-heading, .btn-login, .read-more {
    font-family: 'Doran', 'Vazirmatn FD', sans-serif; /* دوران برای تیترها */
    font-weight: bold;
}

/* انیمیشن reveal در موبایل و دسکتاپ */
.reveal-item, .reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-item.visible, .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item:nth-child(2) { transition-delay: 0.2s; }
.reveal-item:nth-child(3) { transition-delay: 0.4s; }
.reveal-item:nth-child(4) { transition-delay: 0.6s; }

/* هدر sticky و hide top bar */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#topBar {
    transition: transform 0.4s ease;
}

#topBar.hide {
    transform: translateY(-100%);
}

/* دکمه بازگشت به بالا */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(194,11,11,0.4);
    animation: pulse 2s infinite;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* اسلایدر رتبه‌ها */
.ranks-section {
    background: #f9f9f9;
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #333;
}

.ranksSwiper .swiper-slide img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* لینک‌های تماس */
.icon-link {
    margin-left: 5px;
}

/* موبایل بیشتر ریسپانسیو */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .reveal-item {
        transition-delay: 0s !important; /* در موبایل همزمان‌تر */
    }
}
