* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: "Byekan";
    src: url("/static/public/fonts/BYekan.ttf") format("woff2"),
        url("/static/public/fonts/BYekan.ttf") format("woff");
}

body,
input,
button,
textarea {
    font-family: Byekan, tahoma;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    background: #f2f2f2;
    display: flex;
    justify-content: center;

    user-select: none;
    -webkit-user-select: none;
    /* Chrome / Safari / Android */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Edge */
}

/* ✅ جلوگیری از tap highlight / رفتار زوم شبیه اپ */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

a,
button,
.service,
.bottom-item,
.grid-item {
    -webkit-tap-highlight-color: transparent;
}

a,
button {
    touch-action: manipulation;
}

a {
    -webkit-touch-callout: none;
}

.app {
    width: 390px;
    height: 100dvh;
    background: #fff;
    position: relative;
    /* ← fixed حذف شد */
    margin: 0 auto;
    /* ← به جای left + transform */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}



.content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 120px;
}

/* مقدار مخصوص iPhone / iOS */
@supports (-webkit-touch-callout: none) {
    .content {
        padding-bottom: 60px;
    }
}


.content::-webkit-scrollbar {
    display: none;
}

.content_second {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content::-webkit-scrollbar {
    display: none;
}

.top-fixed {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

.header {
    background: linear-gradient(135deg, #0d7743, #2842a9);
    color: white;
    text-align: center;
    padding: calc(24px + env(safe-area-inset-top)) 15px 48px 15px;
    font-size: 19px;
    font-weight: bold;
}


.header_link {
    background: linear-gradient(135deg, #0d7743, #2842a9);
    color: white;
    padding: calc(24px + env(safe-area-inset-top)) 15px 48px 15px;
    text-align: center;
    font-size: 19px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
}


.header span {
    display: inline-block;
    transition: opacity .5s ease, transform .5s ease;
}

.header span.hide {
    opacity: 0;
    transform: translateY(-6px);
}

.header span.show {
    opacity: 1;
    transform: translateY(0);
}


.back-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    padding: calc(24px + env(safe-area-inset-top)) 15px 48px 15px;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
    text-decoration: none;
}

/* top services */
.top-services {
    display: flex;
    gap: 10px;
    padding: 0 15px;
    margin-top: -24px;
}

.service {
    flex: 1;
    background: white;
    border-radius: 14px;
    text-align: center;
    padding: 13px 6px;
    font-size: 12px;
    position: relative;
    text-decoration: none;
    color: #333;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.service i {
    font-size: 18px;
    margin-bottom: 6px;
    display: block;
    color: #28a965;
}

.coming {
    position: absolute;
    top: -6px;
    left: -6px;
    background: #f00;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
}

/* banner slider */
.banner-slider {
    margin: 15px;
    overflow: hidden;
    border-radius: 14px;
    position: relative;
}

.banner-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    direction: ltr;
}


.banner-track::-webkit-scrollbar {
    display: none;
}

.banner {
    flex: 0 0 100%;
    height: 115px;
    position: relative;
}

.banner img {
    width: 100%;
    height: 115px;
    display: block;
    border-radius: 14px;
}


.banner-tag {
    position: absolute;
    top: 8px;
    right: 8px;

    background: rgba(0, 0, 0, .7);
    color: #fff;

    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
    direction: rtl;

    backdrop-filter: blur(4px);
}

/* .banner:nth-child(1) {
    background: linear-gradient(135deg, #ffb199, #ff7e5f);
}

.banner:nth-child(2) {
    background: linear-gradient(135deg, #36d1dc, #5b86e5);
}

.banner:nth-child(3) {
    background: linear-gradient(135deg, #11998e, #38ef7d);
} */

/* dots */
.dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .6);
}

.dot.active {
    background: white;
}

/* sections */
.section {
    margin: 15px;
    padding: 14px;
    background: #f8fffb;
    border: 1px solid #d7f3e6;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.section-popular {
    margin: 15px;
    border: 1px solid #d7f3e6;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title {
    font-size: 14px;
    color: #2bb673;
    font-weight: bold;
}

.section-title-dark {
    font-size: 14px;
    color: #7c827c;
    font-weight: bold;
    margin: 20px 0 12px;
}

.section-more {
    font-size: 12px;
    color: #28a965;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.today-date {
    font-size: 12px;
    color: #666;
}

/* events */
.events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    border: 1px solid #e7f5ee;
}

.event-item i {
    color: #28a965;
    font-size: 10px;
    margin-left: 6px;
}

/* grid services */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.grid-item {
    text-align: center;
    font-size: 12px;
    text-decoration: none;
    color: #333;
}

.grid-item-no-loader {
    text-align: center;
    font-size: 12px;
    text-decoration: none;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

.grid-icon {
    width: 46px;
    height: 46px;
    background: #f1f1f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    margin-bottom: 6px;
    transition: .2s;
}

.grid-icon i {
    font-size: 18px;
    color: #555;
}


/* فقط PWA در آیفون */
.ios-pwa .bottom-nav {
    padding-bottom: 10px !important;
}

/* bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0px;
    width: 390px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.08);
    gap: 8px;
    z-index: 2000;
}


.fix-android-width {
    width: 360px !important;
}



.bottom-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid transparent;
}

.bottom-item.active {
    border: 2px solid #28a965;
    color: #28a965;
    background: #f3fbf7;
}


.menu-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    padding: calc(24px + env(safe-area-inset-top)) 15px 48px 15px;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
}

/* dropdown menu */

.header-menu {
    position: absolute;
    top: 70px;
    left: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    width: 180px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 200;
}

.header-menu a {
    padding: 12px 14px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f2f2f2;
}

.header-menu a:last-child {
    border-bottom: none;
}

.header-menu a:hover {
    background: #f7f7f7;
}

.desc {
    margin: 15px;
    background: #f8fffb;
    padding: 14px;
    border: 1px solid #d7f3e6;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}


.empty-box {
    margin: 40px 15px;
    padding: 30px 20px;
    text-align: center;
    background: #f8fffb;
    border: 1px solid #d7f3e6;
    border-radius: 12px;
}

.empty-icon {
    font-size: 48px;
    color: #28a965;
    display: block;
    margin-bottom: 12px;
}

.empty-box p {
    font-size: 14px;
    color: #666;
}








/* مرجع برای قرار گرفتن تگ */
.grid-icon {
    position: relative;
}

/* تگ به زودی */
.soon-badge {
    position: absolute;
    top: -6px;
    left: -8px;
    background: #f00;
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    z-index: 2;
}


.intro-badge {
    position: absolute;
    top: -6px;
    left: -8px;
    background: #3b5aba;
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    z-index: 2;
}


.support-box {
    margin-top: 20px;
    padding: 12px;
    background: #f5f5f5;
    /* border-radius: 10px; */
    text-align: center;
    font-size: 13px;
    color: #555;
}

.support-box i {
    margin-left: 6px;
    color: #28a965;
}

.support-box span {
    display: block;
    margin-top: 5px;
    font-weight: bold;
    color: #333;
}



.list-more {
    text-align: center;
    padding: 20px 0;
}

.list-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    transition: all .2s ease;
}

.list-more-btn:hover {
    background: #e0e0e0;
}

.list-more-btn i {
    font-size: 13px;
}



#pwa-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.pwa-loader-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}

.pwa-loader-card {
    position: relative;
    background: #fff;
    padding: 20px 26px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 12px;
    min-width: 210px;
}

.pwa-loader-dots {
    display: flex;
    gap: 7px;
}

.pwa-loader-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #28a965;
    animation: pwaLoaderBounce 0.9s infinite ease-in-out;
}

.pwa-loader-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.pwa-loader-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes pwaLoaderBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: .4;
    }

    40% {
        transform: translateY(-7px);
        opacity: 1;
    }
}

.pwa-loader-text {
    font-size: 13px;
    color: #444;
}