/* *********************************************************************
 *  کارت‌های دانلود اپلیکیشن - App Download Cards
 * *********************************************************************/

/* ----- بخش اپلیکیشن‌ها ----- */
.apps-section {
    padding: 70px 0 80px;
    background: #f8f9fc;
    direction: rtl;
}

.apps-section .section-title {
    text-align: center;
    margin-bottom: 50px;
}

.apps-section .section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: #010483;
    margin-bottom: 12px;
    font-family: "main", sans-serif;
}

.apps-section .section-title p {
    font-size: 16px;
    color: #858a99;
    font-family: "main", sans-serif;
}

/* ----- کارت اصلی ----- */
.app-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 20px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f0f2f7;
    position: relative;
    overflow: hidden;
}

/* خط رنگی بالای کارت */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1acc8d, #2be4a2);
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(26, 204, 141, 0.13);
    border-color: rgba(26, 204, 141, 0.15);
}

/* ----- آیکون اپلیکیشن ----- */
.app-card .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    margin-bottom: 16px;
    object-fit: contain;
    border: 1px solid #f0f2f7;
    padding: 4px;
    transition: transform 0.3s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.08);
}

.app-icon-placeholder {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: linear-gradient(135deg, #e8faf3, #d4f5e8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 28px;
    color: #1acc8d;
    flex-shrink: 0;
}

/* ----- متن‌های کارت ----- */
.app-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #010483;
    margin-bottom: 4px;
    font-family: "main", sans-serif;
    line-height: 1.6;
}

.app-card .app-subtitle {
    font-size: 13px;
    color: #1acc8d;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-family: "main", sans-serif;
}

.app-card .app-desc {
    font-size: 13px;
    color: #858a99;
    line-height: 1.9;
    margin-bottom: 20px;
    flex-grow: 1;
    padding: 0 5px;
    font-family: "main", sans-serif;
}

/* ----- دکمه دانلود ----- */
.app-card .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 30px;
    border-radius: 50px;
    background: linear-gradient(135deg, #1acc8d, #15a871);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: "main", sans-serif;
    letter-spacing: 0.3px;
}

.app-card .btn-download i,
.app-card .btn-download svg {
    font-size: 16px;
}

.app-card .btn-download:hover {
    background: linear-gradient(135deg, #15a871, #0f8c5f);
    color: #ffffff;
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(26, 204, 141, 0.35);
}

/* ----- ردیف دکمه‌های دانلود (هم‌سایز) ----- */
.app-card .app-downloads {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.app-card .app-downloads .btn-download,
.app-card .app-downloads .btn-store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: "main", sans-serif;
    cursor: pointer;
    border: none;
    min-height: 44px;
    justify-content: center;
    line-height: 1.3;
}

/* دکمه دانلود مستقیم (سبز) */
.app-card .app-downloads .btn-download {
    background: linear-gradient(135deg, #1acc8d, #15a871);
    color: #ffffff;
    flex: 1 1 auto;
    min-width: 0;
}

.app-card .app-downloads .btn-download i,
.app-card .app-downloads .btn-download svg {
    font-size: 16px;
}

.app-card .app-downloads .btn-download:hover {
    background: linear-gradient(135deg, #15a871, #0f8c5f);
    color: #ffffff;
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(26, 204, 141, 0.35);
}

/* دکمه فروشگاه (بازار/مایکت) — border style */
.app-card .app-downloads .btn-store {
    background: #ffffff;
    color: #57647a;
    border: 1.5px solid #e0e3eb;
    flex: 1 1 auto;
    min-width: 0;
}

.app-card .app-downloads .btn-store img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.app-card .app-downloads .btn-store:hover {
    border-color: #1acc8d;
    color: #1acc8d;
    background: #f0fdf7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 204, 141, 0.12);
}

/* ===== نوار تیکر متحرک (اسکرول افقی نامحدود) ===== */
.apps-ticker {
    overflow: hidden;
    position: relative;
    background: #ffffff;
    border-radius: 50px;
    margin-bottom: 30px;
    padding: 0;
    border: 1px solid #eef0f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    direction: ltr;
}

.apps-ticker::before,
.apps-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.apps-ticker::before {
    left: 0;
    background: linear-gradient(90deg, #fff, transparent);
}

.apps-ticker::after {
    right: 0;
    background: linear-gradient(270deg, #fff, transparent);
}

.apps-ticker-track {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker-scroll 35s linear infinite;
    padding: 14px 0;
}

.apps-ticker-track span {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    color: #57647a;
    font-family: "main", sans-serif;
    transition: all 0.2s ease;
    position: relative;
}

.apps-ticker-track span::after {
    content: '•';
    margin-right: 20px;
    color: #1acc8d;
    font-weight: 700;
}

.apps-ticker-track span:last-child::after {
    display: none;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ----- دکمه "نمایش همه" ----- */
.apps-show-all-wrap {
    text-align: center;
    margin-top: 25px;
}

.apps-show-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 38px;
    border-radius: 50px;
    background: transparent;
    color: #1acc8d;
    border: 2px solid #1acc8d;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: "main", sans-serif;
    cursor: pointer;
    background: rgba(26, 204, 141, 0.04);
}

.apps-show-all:hover {
    background: #1acc8d;
    color: #fff;
    box-shadow: 0 6px 20px rgba(26, 204, 141, 0.3);
}

.apps-show-all i {
    transition: transform 0.3s ease;
    font-size: 12px;
}

/* ----- باکس جستجو ----- */
.search-wrapper {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.search-wrapper .search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.search-wrapper input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border: 2px solid #e8ecf4;
    border-radius: 50px;
    font-size: 15px;
    font-family: "main", sans-serif;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-wrapper input:focus {
    border-color: #1acc8d;
    box-shadow: 0 4px 20px rgba(26, 204, 141, 0.12);
}

.search-wrapper input::placeholder {
    color: #b0b8c9;
    font-size: 14px;
}

/* دکمه پاک کردن جستجو */
.search-wrapper .search-clear {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #e8ecf4;
    color: #858a99;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.search-wrapper .search-clear:hover {
    background: #d1d6e3;
    color: #444;
}

.search-wrapper .search-clear.visible {
    display: flex;
}

/* شمارش نتایج */
.search-result-count {
    text-align: center;
    font-size: 14px;
    color: #858a99;
    margin: -25px 0 30px;
    font-family: "main", sans-serif;
    min-height: 22px;
    transition: all 0.3s ease;
}

.search-result-count span {
    font-weight: 700;
    color: #010483;
}

/* پیام "نتیجه‌ای پیدا نشد" */
.search-empty {
    text-align: center;
    padding: 60px 20px;
    display: none;
    color: #858a99;
}

.search-empty.visible {
    display: block;
}

.search-empty i {
    font-size: 48px;
    color: #d1d6e3;
    margin-bottom: 16px;
}

.search-empty p {
    font-size: 16px;
    margin: 0;
    font-family: "main", sans-serif;
}

/* استایل کارت هنگام فیلتر — JS مدیریت می‌کنه */

/* ----- واکنش‌گرایی (Responsive) ----- */
@media (max-width: 991px) {
    .apps-section {
        padding: 50px 0 60px;
    }

    .apps-section .section-title h2 {
        font-size: 26px;
    }

    .app-card {
        padding: 28px 16px 20px;
    }
}

@media (max-width: 575px) {
    .apps-section {
        padding: 40px 0 50px;
    }

    .apps-section .section-title h2 {
        font-size: 22px;
    }

    .app-card .app-icon {
        width: 64px;
        height: 64px;
    }

    .app-card h3 {
        font-size: 16px;
    }

    .app-card .btn-download {
        padding: 9px 24px;
        font-size: 13px;
    }
}
