@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 900;
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Black.eot');
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Black.eot?#iefix') format('embedded-opentype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: bold;
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Bold.eot');
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Bold.eot?#iefix') format('embedded-opentype'),
        url('assets/fonts/ttf/IRANSansWeb(FaNum)_Bold.ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 500;
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Medium.eot');
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Medium.eot?#iefix') format('embedded-opentype'),
        url('assets/fonts/ttf/IRANSansWeb(FaNum)_Medium.ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 300;
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Light.eot');
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_Light.eot?#iefix') format('embedded-opentype'),
        url('assets/fonts/ttf/IRANSansWeb(FaNum)_Light.ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 200;
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_UltraLight.eot');
    src: url('assets/fonts/eot/IRANSansWeb(FaNum)_UltraLight.eot?#iefix') format('embedded-opentype'),
        url('assets/fonts/ttf/IRANSansWeb(FaNum)_UltraLight.ttf') format('truetype');
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: normal;
    src: url('assets/fonts/eot/IRANSansWeb(FaNum).eot');
    src: url('assets/fonts/eot/IRANSansWeb(FaNum).eot?#iefix') format('embedded-opentype'),
        url('assets/fonts/ttf/IRANSansWeb(FaNum).ttf') format('truetype');
}

html,
body {
    font-family: 'IRANSans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sticky-header {
    background-color: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top);
}

.header {
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.header h1 {
    font-weight: 900;
    font-size: 24px;
    margin: 0 0 7px 0;
}

.header h2 {
    font-size: 12px;
    font-weight: normal;
    margin: 0 0 5px 0;
}

.header p {
    font-size: 14px;
    margin: 0;
}

.header-logo {
    width: 180px;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto 5px auto;
}

.tabs {
    display: flex;
    justify-content: flex-start;
    background-color: #f9f9f9;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 0;
}

.tab {
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 20px;
    margin: 0 5px;
    font-size: 12px;
    flex-shrink: 0;
    color: #333;
}

.tab:hover {
    background-color: #e9e9e9;
}

.tab.active {
    background-color: #007bff;
    color: white;
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: 200px;
    box-sizing: border-box;
    overflow: hidden;
    padding-bottom: 127px;
}

.weather-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 3px 0;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
}

.weather-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f8ff;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.weather-widget h3 {
    font-size: 12px;
    margin: 0 5px;
    color: #333;
}

.weather-icon {
    font-size: 16px;
    margin: 0 3px;
}

.weather-details {
    display: flex;
    gap: 8px;
}

.weather-details p {
    margin: 0;
    font-size: 11px;
    color: #555;
}

.weather-details i {
    margin-left: 3px;
    font-size: 10px;
}

.path-messages {
    width: 100%;
    max-width: 80%;
    margin: 0 auto 5px auto;
    box-sizing: border-box;
    display: block;
}

.path-message {
    width: 100%;
    background-color: #f8f9fa;
    padding: 2px 5px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    font-size: 0.9em;
    text-align: center;
    box-sizing: border-box;
    display: block;
}

.path-message.smart-weather {
    background-color: #e6f3ff;
    color: #1e88e5;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #bbdefb;
}

.path-message.closed {
    background-color: #ffe5e5;
    border-color: #d63031;
    color: #d63031;
}

.path-message p {
    margin: 0;
    line-height: 1.4;
}

.path-message.closed p.status {
    font-weight: bold;
}

.no-data-message {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.cards-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.card-grid.hidden {
    display: none;
}

.card {
    background: linear-gradient(135deg, #ffffff, #f0f4f8);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.card.boarding {
    border: 2px solid #28a745;
}

.card h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.card p {
    margin: 6px 0;
    font-size: 14px;
    color: #555;
}

.card-info {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.status-مسافرگیری {
    background-color: #e6f7e6;
    color: #28a745;
    animation: blink 1s infinite;
}

.status-در-سفر {
    background-color: #e6f0ff;
    color: #007bff;
}

.status-لغو-شده {
    background-color: #ffebee;
    color: #dc3545;
}

.status-آماده-مسافرگیری {
    background-color: #f5e6ff;
    color: #8500ff;
}

.status-ثبت-اولیه {
    background-color: #e6f0ff;
    color: #7785c9;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.icon {
    margin-left: 5px;
}

.footer {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 3px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    font-size: 0.75em;
    color: #333;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.footer-menu {
    margin-bottom: 8px;
}

.footer-menu a {
    display: inline-block;
    margin: 0 15px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}

.footer-menu a:hover {
    color: #0056b3;
}

.social-share a {
    display: inline-block;
    margin: 0 8px;
    font-size: 1.5em;
    color: #007bff;
    transition: transform 0.2s, color 0.2s;
    text-decoration: none;
}

.social-share a:hover {
    transform: scale(1.2);
    color: #0056b3;
}

.stats-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.85em;
    color: #333;
}

.fixed-copyright {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 2px 0 18px 0;
    text-align: center;
    font-size: 0.9em;
    color: #333;
    border-top: 1px solid #e0e0e0;
    z-index: 1000;
}

.fixed-copyright p {
    margin: 0;
    font-size: 0.9em;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    max-width: 500px;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    direction: rtl;
    text-align: right;
}

.modal-content .close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

.modal-content h2 {
    margin-top: 0;
    color: #007bff;
    padding: 0 10px;
}

.modal-content p {
    margin: 10px 0;
    line-height: 1.5;
    text-align: justify;
    padding: 10px 10px;
}

.modal-content button {
    padding: 10px 20px;
    margin: 10px 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
    font-family: IRANSans;
}

.modal-content button:first-of-type {
    background-color: #007bff;
    color: #fff;
}

.modal-content button:first-of-type:hover {
    background-color: #0056b3;
}

.modal-content button:last-of-type {
    background-color: #dc3545;
    color: #fff;
}

.modal-content button:last-of-type:hover {
    background-color: #c82333;
}

.stats-popup {
    text-align: center;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    width: 120px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 24px;
    color: #007bff;
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 14px;
    margin: 0 0 10px;
    color: #333;
}

.stat-card p {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    margin: 0;
}

/* تنظیمات PWA تمام‌صفحه */
@media (display-mode: standalone) {

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

    .sticky-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding-top: env(safe-area-inset-top);
    }

    .content {
        padding-bottom: 130px;
    }

    .cards-container {
        padding-bottom: 10px;
    }

    .fixed-copyright {
        bottom: env(safe-area-inset-bottom);
    }
}

/* تنظیمات برای دسکتاپ */
@media screen and (min-width: 768px) {
    .content {
        padding-top: 200px;
        padding-bottom: 127px;
    }

    .weather-container {
        margin: 5px 0 0;
    }

    .weather-widget {
        min-width: 200px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .footer {
        margin-bottom: 40px;
        padding: 15px;
    }

    .stats-display {
        display: flex;
    }
}

/* تنظیمات برای موبایل */
@media screen and (max-width: 767px) {
    .header {
        padding: 5px;
        text-align: right;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .header-logo {
        width: 100px;
        max-width: 150px;
        margin: 0 10px 2px 0;
        display: inline-block;
        padding-left: 10px;
        padding-top: 4px;
    }

    .header h2 {
        display: none;
    }

    .header p {
        font-size: 12px;
        margin: 0 10px;
        order: 2;
    }

    .ad-badge {
        margin: 2px 10px;
        order: 1;
    }

    .tabs {
        padding: 3px 0;
    }

    .tab {
        padding: 6px 12px;
        font-size: 11px;
        margin: 0 3px;
    }

    .content {
        padding-top: 122px;
        padding-bottom: 109px;
    }

    .path-messages {
        padding: 0;
        max-width: 90%;
    }

    .path-message {
        margin: 3px auto;
        padding: 2px 4px;
        font-size: 0.8em;
    }

    .weather-container {
        margin: 5px 0 0;
        flex-wrap: nowrap;
        gap: 5px;
        padding: 3px;
    }

    .weather-widget {
        min-width: 100px;
        padding: 3px 5px;
        font-size: 10px;
    }

    .weather-widget h3 {
        font-size: 10px;
        margin: 0 3px;
    }

    .weather-icon {
        font-size: 14px;
        margin: 0 2px;
    }

    .weather-details p {
        font-size: 9px;
    }

    .weather-details i {
        font-size: 8px;
    }

    .weather-link {
        font-size: 0.7em !important;
        padding: 3px 6px !important;
        margin: 0 !important;
    }

    .footer {
        padding: 6px;
        margin-bottom: 30px;
        font-size: 0.7em;
    }

    .footer-menu {
        margin-bottom: 4px;
    }

    .footer-menu a {
        margin: 0 8px;
        font-size: 0.9em;
    }

    .social-share a {
        margin: 0 5px;
        font-size: 1.3em;
    }

    .fixed-copyright {
        padding: 2px 0 15px 0;
        font-size: 0.85em;
    }

    .fixed-copyright p {
        font-size: 0.85em;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 5px;
    }

    .card {
        padding: 10px;
    }

    .card h3 {
        font-size: 13px;
        margin: 0 0 8px 0;
    }

    .card p {
        font-size: 11px;
        margin: 4px 0;
    }

    .status {
        font-size: 10px;
        padding: 3px 8px;
        margin-top: 8px;
    }
}