:root {
    /* --- Brand Colors --- */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-fade: #e0e7ff;
    --accent: #f43f5e;

    /* --- Status Tones --- */
    --bg-current: #eef2ff;
    --border-current: #10b981;
    --text-current: #2b2d30;

    --bg-future: #f8fafc;
    --border-future: #4f46e5;
    --text-future: #2b2d30;

    --bg-past: #f1f5f9;
    --border-past: #cbd5e1;
    --text-past: #94a3b8;

    --bg-page: #f3f4f6;

    /* --- Text Colors --- */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* --- Font Sizes --- */
    --font-xs: clamp(10px, 0.8vw, 11px);
    --font-sm: clamp(11px, 0.9vw, 12px);
    --font-base: clamp(13px, 1.0vw, 14px);
    --font-md: clamp(12px, 1.2vw, 14px);
    --font-h1: clamp(15px, 1.3vw, 16px);
    --font-h2: clamp(14px, 1.1vw, 15px);
    --font-h3: clamp(13px, 1.0vw, 14px);

    --border-radius-lg: 20px;
    --border-radius-md: 14px;
    --border-radius-sm: 8px;
    --border-radius-box: 8px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-float: 0 10px 25px -5px rgba(79, 70, 229, 0.1);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    font-family: Vazirmatn, sans-serif;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
/* اضافه کردن فونت وزیرمتن با قابلیت Swap */
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.0.3/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.0.3/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
body {
    margin: 0;
    height: 100vh;
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-main);
}

/* ===== Top Bar ===== */
.top-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-xs);
    color: var(--text-muted);
    z-index: 20;
    flex-shrink: 0;
}

.top-bar .addr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.top-bar .addr i {
    font-size: 10px;
    color: var(--primary);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar a,
.top-bar button {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    background: transparent;
    padding: 5px 10px;
    border-radius: 20px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-xs);
    white-space: nowrap;
}

.top-bar a:hover,
.top-bar button:hover {
    background: var(--primary-fade);
    color: var(--primary);
    border-color: var(--primary-fade);
}

/* ===== Header ===== */
header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: 76px;
    z-index: 15;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    gap: 24px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.brand-logo-box {
    width: 46px;
    height: 46px;
    background: linear-gradient(27deg, #4655ff 0%, #4b43cd 50%, #7a00ff 100%);
    border: none;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo-box:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
}

.brand-info h1 {
    margin: 0;
    font-size: var(--font-h1);
    color: #0f172a;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.brand-info p {
    margin: 4px 0 0 0;
    font-size: var(--font-xs);
    color: #64748b;
    font-weight: 500;
}

.header-tools {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

/* City Selector */
.city-selector-wrapper {
    position: relative;
}

.city-select {
    appearance: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 36px 10px 14px;
    font-family: inherit;
    font-size: var(--font-sm);
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    min-width: 110px;
    text-align: center;
    text-align-last: center;
    direction: rtl;
}

.city-select:hover {
    border-color: #c7d2fe;
    background: #fff;
}

.city-select:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgb(12 0 255 / 10%);
    outline: none;
}

.city-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 10px;
    pointer-events: none;
}

/* Search */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    z-index: 1;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.search-wrapper:hover {
    background: #fff;
    border: 1px solid #c7d2fe;
}

.search-wrapper:focus-within {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgb(12 0 255 / 10%);
    width: 100%;
}

.search-wrapper input {
    background: transparent;
    border: none;
    color: #0f172a;
    width: 100%;
    font-size: var(--font-sm);
    padding: 0 12px;
    height: 100%;
    font-weight: 500;
    text-align: right; /* راست‌چین کردن متن Placeholder */
}

.search-wrapper input::placeholder {
    color: #94a3b8;
    text-align: right; /* راست‌چین کردن Placeholder */
}

.search-wrapper i {
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.2s ease;
}

.search-wrapper:hover i,
.search-wrapper:focus-within i {
    color: var(--primary);
}

/* ===== Layout (Desktop) ===== */
main {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    flex: 1;
    overflow: hidden;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* سه ستون در حالت عادی */
.columns-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* نتایج جستجو: بدون ستون، فقط کارت‌ها */
.search-results-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.search-results-header {
    padding: 14px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-h2);
    font-weight: 700;
    color: var(--text-main);
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--shadow-sm);
}

.search-results-header i {
    color: var(--primary);
}

/* کارت‌های جستجو: موبایل زیر هم، دسکتاپ در کنار هم */
.search-results-cards,
.search-results-wrap .search-results-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    flex: 1;
    align-content: start;
}

.search-results-cards .card,
.search-results-wrap .search-results-cards .card {
    align-self: start;
}

@media (min-width: 768px) {
    .search-results-cards,
    .search-results-wrap .search-results-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1100px) {
    .search-results-cards,
    .search-results-wrap .search-results-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Column Styles ===== */
.column {
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.col-current {
    border-top: 4px solid var(--border-current);
}

.col-future {
    border-top: 4px solid var(--border-future);
}

.col-past {
    border-top: 4px solid var(--border-past);
    opacity: 0.8;
}

.column-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    justify-content: space-between;
    flex-shrink: 0;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.ch-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-h2);
    color: var(--text-main);
}

.ch-badge {
    font-size: var(--font-xs);
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.column-header i.icon-main {
    font-size: 14px;
    color: var(--text-light);
    transition: 0.2s;
}

.column:hover i.icon-main {
    color: var(--text-main);
}

.column-header i.arrow {
    display: none;
    transition: transform 0.3s;
}

.column-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== Special Highlight Slider (رویداد ویژه) ===== */
.highlight-slider {
    margin: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.highlight-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: auto;
    min-height: 200px;
}

.highlight-slide {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(30deg, #4f46e5 3%, #000000 30%, #4f46e5 80%);
    overflow: hidden;
    cursor: pointer;
    display: none;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-slide.active {
    display: flex;
    animation: slideInHighlight 0.5s ease-out;
}

@keyframes slideInHighlight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight-bg-effect {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: radial-gradient(ellipse 100% 80% at 100% 50%, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.highlight-slide .highlight-bg-effect {
    background: radial-gradient(ellipse 100% 80% at 100% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

.highlight-content {
    position: relative;
    z-index: 1;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.highlight-badge {
    align-self: flex-start;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
    color: #1e293b;
    font-size: 11px;
    padding: 8px 16px;
    border-radius: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-text-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.highlight-slide h2,
.current-highlight-card h2 {
    margin: 0;
    font-size: var(--font-base);
    font-weight: 800;
    color: #fff;
    line-height: 1.55;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.highlight-meta-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: rgba(255, 255, 255, 0.7);
}

.highlight-progress {
    width: 100%;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.highlight-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
}

.highlight-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 999px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0%; /* Start from 0 for animation */
}

.progress-fill.progress-striped {
    background: repeating-linear-gradient(
        -45deg,
        #f59e0b,
        #f59e0b 6px,
        #fbbf24 6px,
        #fbbf24 12px
    );
}

.progress-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.highlight-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.highlight-actions .highlight-nav-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.highlight-actions .highlight-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.highlight-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 8px;
}

.highlight-slider-nav .highlight-nav-btn {
    display: none;
}

@keyframes pulseBar {
    0%, 100% {
        width: 70%;
        opacity: 0.9;
    }
    50% {
        width: 85%;
        opacity: 1;
    }
}

/* Removed highlight-btn from actions as per request */

.highlight-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(79, 70, 229, 0.2);
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.highlight-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.highlight-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.highlight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
}

.highlight-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}


/* ===== Cards ===== */
.cards {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: none;
}

.cards .card {
    flex-shrink: 0;
}

.cards::-webkit-scrollbar {
    display: none;
}

.card {
    background: #fff;
    border-radius: var(--border-radius-md);
    padding: 14px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 0;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-fade);
    box-shadow: var(--shadow-float);
}

.card.card-soon {
    border-right: 4px solid #f59e0b;
    background: linear-gradient(to left, rgba(245, 158, 11, 0.06) 0%, #fff 24px);
}

.card.card-imminent {
    border-right: 4px solid #f97316;
    background: linear-gradient(to left, rgba(249, 115, 22, 0.08) 0%, #fff 24px);
}

.card.card-critical {
    border-right: 4px solid #dc2626;
    background: linear-gradient(to left, rgba(220, 38, 38, 0.06) 0%, #fff 24px);
}

.card-badge-row {
    flex-shrink: 0;
    margin-bottom: 4px;
}

.card-badge.card-badge-soon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.card.disabled {
    background: #fafafa;
    border: 1px dashed #e2e8f0;
    box-shadow: none;
    opacity: 0.75;
    filter: grayscale(0.6);
    cursor: default;
}

.card.disabled:hover {
    transform: none;
}

.col-past .cards {
    gap: 14px;
}

.col-past .card {
    padding: 14px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.card h3 {
    margin: 0;
    font-size: var(--font-h3);
    line-height: 1.5;
    font-weight: 600;
    color: var(--text-main);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* مخفی کردن متن اضافه */
.card h3 span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    white-space: normal;
}

/* --- Pulsing LED Indicator --- */
.led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 0 0 2px #fff;
    position: relative;
}

/* LED Colors */
.current-led {
    background: var(--primary);
}

.future-led {
    background: var(--border-future);
}

.past-led {
    background: var(--border-past);
}

.led-soon {
    background: #fbbf24;
}

.led-imminent {
    background: #f97316;
}

.led-critical {
    background: #ef4444;
}

/* تغییر انیمیشن به Pulse (پالس) */
.led::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.6;
    animation: softPulse var(--blink-speed, 2s) infinite cubic-bezier(0.4, 0, 0.6, 1);
    z-index: -1;
}

@keyframes softPulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }

    50% {
        width: 220%;
        height: 220%;
        opacity: 0;
    }

    100% {
        width: 100%;
        height: 100%;
        opacity: 0;
    }
}

.card-meta {
    font-size: var(--font-xs);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 4px;
}

.card-meta i {
    color: var(--text-light);
    margin-left: 4px;
}

/* رنگ‌های هوشمند متا */
.card-meta .urgency-soon {
    color: #f59e0b;
    font-weight: 600;
}

.card-meta .urgency-imminent {
    color: #f97316;
    font-weight: 700;
}

.card-meta .urgency-critical {
    color: #ef4444;
    font-weight: 800;
}

/* Accordion Details */
.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-top: 1px dashed #e2e8f0;
    margin-top: 4px;
}

.card-details-inner {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.detail-row i {
    width: 14px;
    text-align: center;
    margin-top: 3px;
    color: var(--primary-light);
}

.card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.btn-card {
    flex: 1;
    padding: 6px 8px;
    border-radius: 8px;
    text-align: center;
    font-size: var(--font-xs);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-details {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
}

.btn-details:hover {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: #cbd5e1;
}

.btn-call {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.btn-call:hover {
    background: #dcfce7;
}

.btn-website {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.btn-website:hover {
    background: #dbeafe;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 0;
}

.modal.open {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: #fff;
    width: 100%;
    height: 100vh;
    max-width: 800px;
    max-height: 100vh;
    min-height: 0;
    border-radius: 0;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.98);
    transition: transform 0.2s ease-out;
}

@media (min-width: 901px) {
    .modal {
        padding: 20px;
    }

    .modal-box {
        height: 90vh;
        min-height: 400px;
        max-height: 90vh;
        border-radius: 20px;
        border: 1px solid #e5e7eb;
    }
}

.modal.open .modal-box {
    transform: scale(1);
}

.modal-header {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.modal-title {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--text-main);
    text-wrap: balance;
}

.close-btn {
    background: #f1f5f9;
    color: var(--text-muted);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--font-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-btn:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* --- Ad Box (خدمات غرفه‌سازی) — ظاهر بهبود یافته --- */
.ad-box {
    background: linear-gradient(135deg, #000000 0%, #4f46e5 50%, #000000 100%);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-box:hover {
    transform: translateY(-1px);
    box-shadow: 0px 5px 20px 0px rgb(79 70 229);
}

.ad-content {
    padding: 24px 28px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* افکت نورپردازی پس‌زمینه */
.ad-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgb(58 51 175) 0%, transparent 60%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ad-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ad-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgb(79 70 229 / 32%);
    backdrop-filter: blur(5px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    border: 1px solid rgb(79 70 229 / 50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-box h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ad-box p {
    margin: 0;
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    font-weight: 500;
    max-width: 100%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ad-actions {
    padding: 0 28px 26px 28px;
    display: flex;
    justify-content: flex-end;
    z-index: 2;
}

.ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 700;
    background: #fff;
    color: #4f46e5;
    border: none;
    transition: 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.ad-btn:hover {
    background: #f8fafc;
    color: #4f46e5;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- Dashed Borders Utility --- */
.box-dashed {
    border-style: dashed !important;
    border-width: 1px !important;
    border-color: rgba(79, 70, 229, 0.3) !important;
}

/* Accordion */
.accordion {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    background: #f8fafc;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-sm);
    color: var(--text-main);
    font-weight: 600;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
}

.accordion-content ul {
    margin: 0;
    padding: 16px;
    list-style: none;
}

.accordion-content li {
    position: relative;
    padding-right: 24px;
    margin-bottom: 12px;
    font-size: var(--font-sm);
    color: var(--text-main);
    line-height: 1.75;
}

.accordion-content li strong {
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.accordion-content li:last-child {
    margin-bottom: 0;
}

.accordion-content li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 2px;
    color: var(--primary);
    font-weight: bold;
}

.accordion.active .accordion-content {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s;
    font-size: 10px;
    color: var(--text-light);
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section h4 {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h4 i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.section h4 i.fa-chart-pie {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.section h4 i.fa-circle-info {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.section h4 i.fa-calendar-days {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.section h4 i.fa-list-check {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal .grid {
    grid-template-columns: 1fr;
}

.modal .grid-contact {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .modal .grid-contact {
        grid-template-columns: 1fr 1fr;
    }
    .modal .grid-contact .box-address {
        grid-column: span 2;
    }
}

.modal .section-dates .grid {
    grid-template-columns: 1fr 1fr;
}

.box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: var(--font-sm);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: 0.2s;
}

.box:hover {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

/* --- آیکون‌های باکس‌ها (رنگ بهتر) --- */
.box i {
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-box);
    /* تغییر رنگ پس زمینه آیکون‌ها به بنفش/آبی روشن */
    background: #e0e7ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-sm);
    flex-shrink: 0;
    border: none;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.1);
}

.box span {
    font-weight: 500;
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.box a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
}

.box-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.box-title {
    font-weight: 600;
}

.box-value {
    flex: 1;
    text-align: right;
    font-weight: 600;
    color: var(--text-main);
    font-size: var(--font-sm);
}

/* --- Redesigned Status Box (Modal) --- */
.status-box-redesigned {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: right;
    padding: 20px;
    gap: 14px;
}

.status-led-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-led-ring {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-sizing: border-box;
}

.status-led {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

@keyframes statusRingPulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

.status-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.box-address {
    grid-column: span 2;
    flex-wrap: wrap;
}

/* Modal Footer */
.modal-footer {
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.modal-footer .btn-modal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.modal-footer .btn-primary {
    background: #1e293b;
    color: #fff;
}

.modal-footer .btn-primary:hover {
    background: #334155;
}

.modal-footer .btn-success {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
}

.modal-footer .btn-success:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(0deg, #f8fafc 0%, #fff 100%);
    border-top: 1px solid rgba(79, 70, 229, 0.08);
    padding: 16px 28px;
    flex-shrink: 0;
    margin-top: auto;
    box-shadow: 0 -1px 3px rgba(79, 70, 229, 0.03);
}

.footer-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-icon {
    color: var(--primary);
    font-size: 15px;
    opacity: 0.9;
}

.footer-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.footer-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.designer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-xs);
    color: var(--text-muted);
    background: #fff;
    padding: 6px 14px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.designer-name {
    color: var(--primary);
    font-weight: 700;
}

/* ================= Responsive Styles ================= */
@media (max-width: 900px) {
    body {
        overflow: auto;
        height: auto;
    }

    /* Top Bar */
    .top-bar {
        flex-wrap: wrap;
        padding: 8px 16px;
        justify-content: center;
    }

    .top-bar-actions {
        flex-wrap: wrap;
        justify-content: space-around;
        width: 100%;
        margin-top: 6px;
    }

    .top-bar a,
    .top-bar button {
        margin-bottom: 4px;
    }

    /* Header */
    header {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 10px;
        align-items: flex-start;
    }

    .header-tools {
        width: 100%;
        order: 3;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .search-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .city-selector-wrapper {
        width: 100%;
    }

    .city-select {
        width: 100%;
        padding: 8px 12px;
    }

    /* Main Layout */
    main {
        display: flex;
        flex-direction: column;
        padding: 12px;
        gap: 16px;
        overflow: visible;
    }

    .columns-wrap {
        display: flex !important; /* Force Flex to override Grid */
        flex-direction: column !important; /* Stack vertically */
        gap: 16px;
    }

    .column {
        border-radius: 12px;
        min-height: auto;
        height: auto;
    }

    /* Header arrows & Accordion behavior */
    .column-header i.arrow {
        display: inline-block;
        font-size: 10px;
        color: var(--text-light);
    }

    .column.active .column-header i.arrow {
        transform: rotate(180deg);
    }

    .column .column-content {
        max-height: 0;
        padding: 0 12px;
        opacity: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .column.active .column-content {
        max-height: 4000px;
        padding: 5px;
        opacity: 1;
        overflow: visible;
    }

    /* Card Text Adjustment on Mobile */
    .card-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-meta span {
        width: 100%;
    }

    /* Inner grids fix */
    .grid {
        grid-template-columns: 1fr;
    }

    .box-address {
        grid-column: span 1;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Search results on mobile */
    .search-results-wrap {
        flex-direction: column;
        min-height: 0;
        overflow: visible;
    }

    .search-results-header {
        margin-bottom: 12px;
        flex-shrink: 0;
    }

    .search-results-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: visible;
    }

    .search-results-cards .card {
        flex-shrink: 0;
    }

    .highlight-slider {
        margin: 12px;
    }

    .highlight-slider-nav {
        padding: 8px;
    }
}

/* رفع باگ اسکرول افقی موبایل در مودال */
.modal-box {
    border-radius: 15px !important;
    overflow-x: hidden;
}

@media (max-width: 900px) {
    .modal {
        padding: 0;
        align-items: stretch;
    }
    .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
    }
}

/* جلوگیری از اسکرول افقی در باکس‌های داخلی */
.modal-body,
.ad-box,
.accordion,
.box {
    overflow-x: hidden;
}