/* ==========================================================
   نقشه نمایشگاه بین‌المللی چاپ و بسته‌بندی تهران
   style.css - نسخه کامل
   ========================================================== */

/* ---------- ریست پایه ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: Tahoma, "Segoe UI", sans-serif;
    background: #eef2f7;
    color: #2c3e50;
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
}

/* ---------- هدر ---------- */
.header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.header h1 {
    font-size: 22px;
    margin-bottom: 8px;
    line-height: 1.5;
    word-break: break-word;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

/* ---------- فیلترها ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
}

.filters input,
.filters select {
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    min-width: 200px;
    background: #fff;
    color: #2c3e50;
    max-width: 100%;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.filters input {
    flex: 1 1 280px;
}

.btn-reset {
    padding: 10px 16px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-reset:hover {
    background: #c0392b;
}

/* ---------- آمار ---------- */
.stats {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    padding: 0 15px;
}

/* ---------- کانتینر نقشه ---------- */
#mapContainer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ---------- سالن ---------- */
.hall {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.hall-title {
    font-size: 17px;
    color: #1e3c72;
    border-bottom: 2px solid #2a5298;
    padding-bottom: 8px;
    margin-bottom: 15px;
    word-break: break-word;
}

.hall-title .count {
    font-size: 12px;
    color: #888;
    font-weight: normal;
}

/* ---------- گرید غرفه‌ها ---------- */
.booths {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    min-width: 0;
}

/* ---------- کارت غرفه ---------- */
.booth-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #3498db;
    border-radius: 8px;
    padding: 12px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    font-size: 13px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.booth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.booth-card * {
    max-width: 100%;
}

/* شماره غرفه */
.booth-number {
    display: inline-block;
    align-self: flex-start;
    background: #3498db;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 6px;
    white-space: nowrap;
}

/* نام فارسی شرکت */
.company-name-fa {
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* نام انگلیسی شرکت */
.company-name-en {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    direction: ltr;
    text-align: right;
    unicode-bidi: plaintext;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* برچسب دسته‌بندی */
.category-badge {
    display: inline-block;
    align-self: flex-start;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 4px;
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
}

/* ---------- لینک وب‌سایت (نمایش آدرس) ---------- */
.website {
    display: inline-block;
    align-self: flex-start;
    margin-top: 8px;
    padding: 5px 10px;
    background: #eaf4fc;
    color: #2a5298;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    transition: background 0.2s, color 0.2s;
}

.website:hover {
    background: #d0e7fb;
    color: #1e3c72;
    text-decoration: underline;
}

/* لینک پیش‌فرض (شرکت‌های بدون سایت) */
.website.website-default {
    background: #f0f0f0;
    color: #888;
    font-style: italic;
}

.website.website-default:hover {
    background: #e0e0e0;
    color: #666;
}

/* ---------- حالت‌های خالی / بدون نتیجه ---------- */
.empty-state,
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    background: #fff;
    border-radius: 12px;
    font-size: 14px;
}

.empty-state h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.empty-state a {
    color: #2a5298;
    text-decoration: none;
    font-weight: bold;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* ---------- فوتر امضا ---------- */
.footer {
    text-align: center;
    padding: 25px 15px 35px;
    font-size: 13px;
    direction: ltr;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: #8a99ad;
    border-top: 1px solid #e2e8f0;
    margin-top: 30px;
    letter-spacing: 0.5px;
}

.footer p {
    margin: 0;
    display: inline-block;
    padding: 6px 14px;
    background: #f8fafc;
    border-radius: 20px;
}

.footer a {
    color: #2a5298;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.footer a:hover {
    color: #1e3c72;
    text-decoration: underline;
}

/* ==========================================================
   تبلت
   ========================================================== */
@media (max-width: 768px) {
    .booths {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* ==========================================================
   موبایل
   ========================================================== */
@media (max-width: 600px) {
    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 15px;
        line-height: 1.6;
    }

    .header p {
        font-size: 12px;
    }

    .filters {
        padding: 12px;
        gap: 8px;
    }

    .filters input,
    .filters select,
    .btn-reset {
        min-width: 100%;
        width: 100%;
        font-size: 13px;
        padding: 10px;
    }

    #mapContainer {
        padding: 0 10px 30px;
    }

    .hall {
        padding: 14px 12px;
        border-radius: 10px;
    }

    .hall-title {
        font-size: 14px;
    }

    .booths {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .booth-card {
        padding: 14px;
        font-size: 14px;
        border-right-width: 5px;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .booth-number {
        font-size: 12px;
        padding: 3px 10px;
        margin-bottom: 8px;
    }

    .company-name-fa {
        font-size: 15px;
        line-height: 1.5;
        word-break: break-word;
    }

    .company-name-en {
        font-size: 12px;
        line-height: 1.4;
        word-break: break-word;
    }

    .category-badge {
        font-size: 11px;
        padding: 3px 8px;
        white-space: normal;
        word-break: break-word;
    }

    .website {
        font-size: 13px;
        padding: 8px 12px;
        word-break: break-all;
        align-self: stretch;
        text-align: center;
    }

    .footer {
        padding: 20px 15px 25px;
        font-size: 12px;
    }
}

/* ==========================================================
   موبایل‌های خیلی کوچک
   ========================================================== */
@media (max-width: 360px) {
    .company-name-fa {
        font-size: 14px;
    }

    .booth-card {
        padding: 12px;
    }

    .hall-title {
        font-size: 13px;
    }
}