* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0D6B63;
    --primary-dark: #074D47;
    --primary-light: #DCF2EF;
    --gold: #C9A03D;
    --gold-light: #F8F0E0;
    --gray-dark: #2C3E40;
    --gray: #5A6E70;
    --gray-light: #F5F7F6;
    --white: #FFFFFF;
    --shadow: 0 20px 35px -15px rgba(0,0,0,0.12);
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-hover: 0 30px 40px -20px rgba(0,0,0,0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://tabrizdentist.ir/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://tabrizdentist.ir/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://tabrizdentist.ir/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://tabrizdentist.ir/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 12px 0;
    border-bottom: 1px solid rgba(13,107,99,0.12);
    transition: var(--transition-smooth);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.logo h2 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.3;
}
.logo p {
    font-size: 0.65rem;
    color: var(--gold);
    font-weight: 500;
}
.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.nav a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}
.nav a:hover {
    color: var(--gold);
}
.btn-appoint {
    background: linear-gradient(135deg, #C9A03D, #b08a2e);
    color: white !important;
    padding: 10px 22px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(201,160,61,0.4);
    transition: var(--transition-smooth);
}
.btn-appoint:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(201,160,61,0.5);
    background: linear-gradient(135deg, #b08a2e, #8a6a1e);
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(125deg, #F8FCFB 0%, #FFFFFF 50%, #F0F6F4 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(201,160,61,0.03) 0%, transparent 70%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero-badge {
    background: var(--gold-light);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 60px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 15px;
}
.hero h1 span {
    color: var(--gold);
    border-bottom: 3px solid var(--gold);
    display: inline-block;
}
.hero-stats {
    display: flex;
    gap: 25px;
    margin: 25px 0;
    flex-wrap: wrap;
}
.stat {
    text-align: center;
    background: rgba(255,255,255,0.85);
    padding: 18px 28px;
    border-radius: 32px;
    min-width: 130px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(201,160,61,0.25);
    transition: transform 0.3s ease;
    overflow: hidden;
}
.stat:hover {
    transform: translateY(-5px);
    background: white;
}
.stat-number {
    font-size: 2.8rem !important;
    font-weight: 900 !important;
    color: var(--primary);
    line-height: 1.1;
    display: block;
}
.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-top: 8px;
    display: block;
}
.hero-video {
    border-radius: 38px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Sections */
section {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 16px;
}
.section-title span {
    color: var(--gold);
}
.section-sub {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 40px;
    color: var(--gray);
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}
.step-card {
    background: var(--white);
    padding: 25px 15px;
    border-radius: 28px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(201,160,61,0.15);
    transition: var(--transition-smooth);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
}
.step-num {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

/* Benefits */
.benefits {
    background: var(--gray-light);
    border-radius: 50px;
    margin: 20px;
}
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}
.benefit-card {
    background: var(--white);
    padding: 28px 20px;
    border-radius: 28px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}
.benefit-icon {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 15px;
}

/* Doctor Bio */
.doctor-bio {
    background: linear-gradient(125deg, var(--primary-dark), var(--primary));
    border-radius: 40px;
    overflow: hidden;
    margin: 40px 0;
}
.doctor-inner {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 25px;
    align-items: center;
}
.doctor-img {
    background: #E8DDCB;
    min-height: 350px;
    background-image: url('/pic/dr2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.doctor-info {
    padding: 40px 35px 40px 20px;
    color: white;
}
.doctor-code {
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Gallery */
/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-height: 450px;
    overflow-y: auto;
    padding: 5px;
}
.gallery-grid::-webkit-scrollbar {
    width: 6px;
}
.gallery-grid::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}
.gallery-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
.gallery-item {
    height: 200px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow);
}

/* Articles */
.articles-section {
    padding: 60px 0;
    background: var(--gray-light);
    border-radius: 50px;
    margin: 20px;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    padding: 0 20px;
}
.article-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #0D6B63, #074D47);
}
.article-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.article-card-category {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-block;
    margin-bottom: 10px;
    width: fit-content;
    font-weight: 600;
}
.article-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}
.article-card-excerpt {
    font-size: 0.82rem;
    color: var(--gray);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 12px;
}
.article-card-date {
    font-size: 0.7rem;
    color: #999;
    margin-top: auto;
}
.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.articles-loading, .articles-empty {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}
.articles-empty {
    color: #999;
}
.articles-loading {
    color: var(--primary);
    font-size: 1rem;
}
.articles-show-all {
    text-align: center;
    margin-top: 30px;
}
.articles-show-all a {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 10px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}
.articles-show-all a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13,107,99,0.4);
}

/* Testimonials */
.testimonials {
    background: var(--gold-light);
    border-radius: 50px;
    padding: 45px 30px;
}
.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.testi-grid::-webkit-scrollbar {
    width: 6px;
}
.testi-grid::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}
.testi-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
.testi-card {
    background: white;
    padding: 25px;
    border-radius: 28px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.testi-card:hover {
    transform: translateY(-4px);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 35px;
}
.contact-info {
    background: var(--primary-light);
    padding: 30px;
    border-radius: 32px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.contact-form input, 
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    border: 1px solid #E0E8E6;
    border-radius: 25px;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition-smooth);
}
.contact-form input:focus, 
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--gold);
}

/* ========== استایل نوبت‌دهی ========== */
.date-slots-container {
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e0e8e6;
}
.date-slots-title {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

/* کارت تاریخ */
.date-slots-container .dates-list .date-card {
    background: #f8fdfb;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 85px;
    position: relative;
}
.date-slots-container .dates-list .date-card:hover {
    border-color: #0D6B63;
    background: #e8f5f2;
    transform: translateY(-2px);
}
.date-slots-container .dates-list .date-card.selected {
    background: #0D6B63;
    border-color: #074D47;
    color: white;
}
.date-slots-container .dates-list .date-card.selected .weekday,
.date-slots-container .dates-list .date-card.selected .day,
.date-slots-container .dates-list .date-card.selected .month {
    color: white;
}
.date-slots-container .dates-list .date-card .weekday {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}
.date-slots-container .dates-list .date-card .day {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0D6B63;
}
.date-slots-container .dates-list .date-card.selected .day {
    color: #C9A03D;
}
.date-slots-container .dates-list .date-card .month {
    font-size: 0.7rem;
    color: #666;
    margin-top: 3px;
}

/* تاریخ پر شده */
.date-slots-container .dates-list .date-card.date-full {
    opacity: 0.5;
    cursor: not-allowed;
}
.date-slots-container .dates-list .date-card.date-full:hover {
    transform: none;
    border-color: #e0e0e0;
    background: #f8fdfb;
}
.date-slots-container .dates-list .date-card .full-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ccc;
    color: #666;
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
}

/* ساعت‌ها */
.hours-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.hour-badge {
    background: white;
    border: 2px solid #0D6B63;
    color: #0D6B63;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    user-select: none;
}
.hour-badge:hover {
    background: #e8f5f2;
    transform: translateY(-2px);
}
.hour-badge.selected {
    background: #0D6B63;
    color: white;
    border-color: #074D47;
    box-shadow: 0 4px 15px rgba(13,107,99,0.3);
}
.loading-slots {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* دکمه ثبت */
.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 40px;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-submit:hover {
    transform: translateY(-2px);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.map-container {
    margin-top: 25px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Toast */
.custom-toast {
    animation: fadeInUp 0.3s ease;
}

/* Float Contact Menu */
.float-contact-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.main-contact-btn {
    background: linear-gradient(135deg, #0D6B63, #0a8a7e);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 25px rgba(13,107,99,0.4);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
}

.main-contact-btn:hover {
    transform: scale(1.1);
}

.main-contact-btn.active {
    background: #e74c3c;
    transform: rotate(45deg);
}

.contact-menu {
    position: absolute;
    bottom: 65px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.contact-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-menu-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
}

.contact-menu-item:hover {
    transform: scale(1.15);
}

.contact-menu-item.ble-btn {
    background: linear-gradient(135deg, #3ACE9B, #2db882);
}

.contact-menu-item.rubika-btn {
    background: linear-gradient(135deg, #FF4B8C, #e63e78);
}

.contact-menu-item.call-btn {
    background: linear-gradient(135deg, #4A90E2, #357abd);
}

.contact-menu-tooltip {
    position: absolute;
    left: 55px;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Vazirmatn', sans-serif;
}

.contact-menu-item:hover .contact-menu-tooltip {
    opacity: 1;
    visibility: visible;
}

.contact-menu-item.ble-btn,
.contact-menu-item.rubika-btn {
    background: white !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

.contact-menu-item.ble-btn img {
    border: 2px solid #3ACE9B;
    border-radius: 50%;
}

.contact-menu-item.rubika-btn img {
    border: 2px solid #FF4B8C;
    border-radius: 50%;
}

/* Chat AI Float */
.chat-ai-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    z-index: 999;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

/* کلاس‌های افکت - با جاوااسکریپت اضافه میشن */
.chat-ai-float.attention {
    animation: chatPulse 2s ease-in-out infinite, chatGlow 2s ease-in-out infinite;
}

.chat-ai-float.attention::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--gold);
    animation: chatRing 2s ease-in-out infinite;
}

.chat-ai-float.attention::after {
    content: '💬 از من بپرس!';
    position: absolute;
    bottom: 65px;
    right: 0;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
    opacity: 1;
    animation: chatTooltip 3s ease-in-out infinite;
    pointer-events: none;
}

.chat-ai-float:hover {
    transform: scale(1.08);
    background: var(--primary-dark);
    animation: none;
}
.chat-ai-float:hover::before {
    animation: none;
    border-color: var(--primary-dark);
}
.chat-ai-float:hover::after {
    animation: none;
    opacity: 0;
}

/* انیمیشن‌ها */
@keyframes chatPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

@keyframes chatGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0,0,0,0.25); }
    50% { box-shadow: 0 0 30px rgba(201,160,61,0.6), 0 8px 25px rgba(13,107,99,0.5); }
}

@keyframes chatRing {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; }
}

@keyframes chatTooltip {
    0%, 100% { opacity: 0; transform: translateY(5px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
}

.chat-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition-smooth);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.chat-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header h4 i {
    font-size: 1.2rem;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: normal;
    opacity: 0.85;
    margin-right: 10px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.chat-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close:hover {
    background: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f5f7fb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}



@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message span {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 22px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user span {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.bot span {
    background: white;
    color: #333;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

/* ========== تایپینگ - نسخه مینیمال ========== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-radius: 22px;
    width: fit-content;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
    opacity: 0.4;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.typing-text {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.chat-input-area {
    display: flex;
    padding: 14px;
    background: white;
    border-top: 1px solid #e8e8e8;
    gap: 10px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
    background: #f8f8f8;
}

.chat-input-area input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(13,107,99,0.1);
}

.chat-input-area button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(13,107,99,0.3);
}

/* Footer */
.footer {
    background: #0A2F2B;
    color: #BEDAD5;
    padding: 45px 0 20px;
    text-align: center;
    margin-top: 50px;
    border-radius: 35px 35px 0 0;
}
.social-icons {
    margin: 18px 0;
}
.social-icons a {
    color: #BEDAD5;
    margin: 0 6px;
    font-size: 1.2rem;
    display: inline-block;
    transition: var(--transition-smooth);
}
.social-icons a:hover {
    color: var(--gold);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-up {
    animation: fadeInUp 0.7s ease forwards;
}

html {
    scroll-behavior: smooth;
}

.toast-message {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    z-index: 1001;
    animation: fadeInUp 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ========== MODAL APPOINTMENT ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;

}



.modal-dates-list .date-card.date-full .full-badge {
    background: #ccc !important;
    color: #666 !important;
}

.modal-dates-list .date-card.date-full .weekday,
.modal-dates-list .date-card.date-full .day,
.modal-dates-list .date-card.date-full .month {
    color: #aaa !important;
}

.modal-dates-list .date-card .full-badge {
    background: #ccc !important;
    color: #666 !important;
}

.modal-dates-list .date-card.date-full {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.modal-overlay.active {
    display: flex;
}

.modal-appointment {
    background: white;
    border-radius: 28px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-appointment-header {
    background: linear-gradient(135deg, #0D6B63, #074D47);
    color: white;
    padding: 18px 22px;
    border-radius: 28px 28px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-appointment-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

.modal-appointment-body {
    padding: 22px;
}

#appointmentModalForm input,
#appointmentModalForm select,
#appointmentModalForm textarea {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
}

#appointmentModalForm input:focus,
#appointmentModalForm select:focus,
#appointmentModalForm textarea:focus {
    outline: none;
    border-color: #C9A03D;
}

.modal-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #C9A03D, #b08a2e);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 30px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,160,61,0.4);
}

.modal-note {
    font-size: 0.7rem;
    color: #999;
    text-align: center;
    margin-top: 12px;
}

.modal-date-slots {
    background: #f8fdfb;
    border-radius: 16px;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid #e0e8e6;
}

.modal-date-title {
    font-weight: 700;
    color: #0D6B63;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.modal-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.modal-dates-list .date-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    text-align: center;
    min-width: 75px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.modal-dates-list .date-card:hover {
    border-color: #0D6B63;
}

.modal-dates-list .date-card.selected {
    background: #0D6B63;
    color: white;
    border-color: #074D47;
}

.modal-hours-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.modal-hours-list .hour-badge {
    background: white;
    border: 2px solid #0D6B63;
    color: #0D6B63;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: 0.3s;
}

.modal-hours-list .hour-badge:hover {
    background: #e8f5f2;
}

.modal-hours-list .hour-badge.selected {
    background: #0D6B63;
    color: white;
}

@media (max-width: 600px) {
    .modal-appointment {
        max-width: 95%;
        border-radius: 22px;
    }
    
    .modal-appointment-header h3 {
        font-size: 0.95rem;
    }
    
    .modal-appointment-body {
        padding: 15px;
    }
}

/* ========== ENAMAD PLACEHOLDER ========== */
.enamad-placeholder {
    text-align: center;
    margin: 15px 0;
}

.enamad-placeholder a {
    text-decoration: none;
    display: inline-block;
}

.enamad-badge {
    width: 125px;
    height: 136px;
    border: 2px dashed #e74c3c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: rgba(231, 76, 60, 0.05);
    color: #e74c3c;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.5;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: default;
}

.enamad-badge:hover {
    border-color: #c0392b;
    background: rgba(231, 76, 60, 0.1);
    transform: translateY(-2px);
}

.enamad-badge .badge-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.enamad-badge .badge-subtitle {
    font-size: 0.55rem;
    opacity: 0.7;
}

/* ========== BOT MESSAGE STRONG/EM ========== */
.message.bot span strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.message.bot span em {
    color: var(--gold);
    font-style: italic;
}

/* ========== QUICK REPLIES - هوشمند ========== */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    justify-content: flex-start;
    animation: quickSlideUp 0.3s ease;
    border-top: 1px dashed #e0e0e0;
    margin-top: 4px;
    position: relative;
}

@keyframes quickSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.quick-replies::before {
    content: '💬 می‌تونید هرچی خواستید تایپ کنید یا از دکمه‌ها استفاده کنید';
    display: block;
    width: 100%;
    font-size: 0.6rem;
    color: #999;
    margin-bottom: 6px;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
    opacity: 0.7;
}

.quick-replies button {
    background: var(--primary-light);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 7px 14px;
    border-radius: 22px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
    opacity: 0.92;
}

.quick-replies button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,107,99,0.3);
    opacity: 1;
}

.quick-replies button:active {
    transform: scale(0.95);
}

/* ========== MESSAGE TIME ========== */
/* ========== MESSAGE ========== */
.message {
    display: flex;
    flex-direction: column;
    animation: messageFadeIn 0.3s ease;
    margin-bottom: 4px;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message span {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.user span {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.bot span {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

/* ========== MESSAGE TIME ========== */
.message-time {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
    direction: ltr;
    padding: 0 4px;
}

.message.user .message-time {
    color: #888 !important;
    text-align: right;
}

.message.bot .message-time {
    color: #aaa;
    text-align: left;
}

/* ========== اسکلتون لودینگ ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 24px;
}

.skeleton-image-sm {
    width: 100%;
    height: 180px;
    border-radius: 24px;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    margin: 12px 0;
}

.skeleton-text {
    height: 14px;
    width: 90%;
    margin: 8px 0;
}

.skeleton-text-short {
    height: 14px;
    width: 50%;
    margin: 8px 0;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== انیمیشن اسکرول ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تأخیر برای المان‌های پشت سر هم */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #0D6B63, #074D47);
}

.article-card {
    text-decoration: none !important;
    color: inherit !important;
}
.article-card h3 {
    color: var(--primary-dark) !important;
}
.article-card p {
    color: var(--gray) !important;
}

.article-card {
    text-decoration: none !important;
    color: inherit !important;
}
.article-card h3 {
    color: var(--primary-dark) !important;
    font-size: 1rem !important;
    margin-bottom: 6px !important;
}
.article-card p {
    color: var(--gray) !important;
    font-size: 0.78rem !important;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
}
.article-card-date {
    font-size: 0.68rem !important;
    color: #999 !important;
    margin-top: 8px !important;
    display: block !important;
}