/* ===== فونت کلمه فنوم ===== */
@font-face {
    font-family: 'Kalameh Fanum';
    src: url('/fonts/kalameh-fanum/KalamehFanum-Regular.woff2') format('woff2'),
         url('/fonts/kalameh-fanum/KalamehFanum-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kalameh Fanum';
    src: url('/fonts/kalameh-fanum/KalamehFanum-Bold.woff2') format('woff2'),
         url('/fonts/kalameh-fanum/KalamehFanum-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ===== تنظیمات کلی و پالت رنگی ===== */
:root {
    --primary-color: #0E7A8C;
    --primary-dark: #0A5C6A;
    --primary-light: #E6F4F7;
    --secondary-color: #F0F9FA;
    --accent-color: #F4B942;
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    --shadow: 0 4px 6px rgba(14, 122, 140, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kalameh Fanum', sans-serif;
    line-height: 1.6;
    background-color: #F8FCFD;
    color: var(--text-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== هدر ===== */
.main-header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ===== دکمه همبرگری (آیکون ۳ خطی CSS) ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1100;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle .hamburger {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-light);
    border-radius: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.menu-toggle .hamburger:nth-child(1) { top: 12px; }
.menu-toggle .hamburger:nth-child(2) { top: 20px; width: 18px; }
.menu-toggle .hamburger:nth-child(3) { top: 28px; }

/* حالت باز — تبدیل به X */
.menu-toggle.active .hamburger:nth-child(1) {
    top: 20px;
    transform: translateX(-50%) rotate(45deg);
}
.menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
    width: 0;
}
.menu-toggle.active .hamburger:nth-child(3) {
    top: 20px;
    transform: translateX(-50%) rotate(-45deg);
}

nav {
    display: flex;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
}

.user-menu-item a {
    font-weight: bold;
    color: var(--accent-color) !important;
}

/* ===== منوی همبرگی (تبلت و موبایل) ===== */
@media (max-width: 992px) {
    .main-header .container {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.15rem;
    }
    .logo-icon {
        font-size: 1.6rem;
    }

    /* ترتیب: لوگو سمت راست ← دکمه همبرگی */
    .main-header .container {
        flex-direction: row;
    }

    /* دکمه همبرگی به‌صورت فیکس — می‌چسبه به لبه راست صفحه */
    .menu-toggle {
        display: block;
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 1200;
    }

    nav {
        order: 4;
        flex: 1 1 100%;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        opacity: 0;
    }

    nav.menu-open {
        max-height: 80vh;
        overflow-y: auto;
        opacity: 1;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        background: linear-gradient(180deg, var(--primary-dark) 0%, #063a45 100%);
        border-radius: 16px;
        padding: 0.5rem 0;
        gap: 0;
        width: 100%;
        margin-top: 0.8rem;
        box-shadow: 0 12px 40px rgba(0,0,0,0.25);
        animation: menuSlideDown 0.35s ease-out;
    }

    @keyframes menuSlideDown {
        from { transform: translateY(-15px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .nav-menu li {
        width: 100%;
        text-align: right;
        transition: background 0.2s;
    }

    .nav-menu a {
        display: block;
        padding: 0.9rem 1.4rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.95rem;
        border-radius: 8px;
        margin: 0 0.5rem;
        transition: all 0.25s;
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(244, 185, 66, 0.12);
        color: var(--accent-color);
        padding-right: 2rem;
    }

    /* آیتم‌های کاربر (ورود/خروج) */
    .nav-menu li.user-menu-item a {
        color: var(--accent-color);
        font-weight: bold;
    }
}

/* ===== بخش‌های عمومی ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #16A5B8);
    color: var(--text-light);
    padding: 4rem 0;
    text-align: left;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color);
    color: var(--primary-dark);
    border: none;
    border-radius: 50px;
    font-family: 'Kalameh Fanum', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn:hover {
    background: #E5A832;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--primary-color);
}

.btn-emergency {
    background: #E74C3C;
    color: white;
}

.btn-emergency:hover {
    background: #C0392B;
}

/* فوتر */
.main-footer {
    background: #0A4D5E;
    color: var(--text-light);
    padding: 2rem 0 0;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li, .footer-col p {
    margin-bottom: 0.8rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

.footer-col a {
    color: #DDD;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.8rem;
    margin-left: 1rem;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ===== صفحه اصلی ===== */
.medical-hero .container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.medical-abstract {
    position: relative;
    width: 250px;
    height: 250px;
}

.pulse-circle {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    position: absolute;
    top: 25px;
    left: 25px;
    animation: pulse 2s infinite;
    border: 2px solid var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-logo-inside {
    width: 80%;
    height: 80%;
    object-fit: cover;
    filter: brightness(0) invert(1);
}

.ecg-line {
    width: 180px;
    height: 80px;
    border-bottom: 3px solid var(--text-light);
    position: absolute;
    bottom: 40px;
    left: 35px;
}

.ecg-line::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 50px;
    background: url('data:image/svg+xml;utf8,<svg width="180" height="50" viewBox="0 0 180 50" xmlns="http://www.w3.org/2000/svg"><polyline points="0,25 10,25 15,5 20,45 25,25 35,25 40,15 45,35 50,25 180,25" fill="none" stroke="%23FFFFFF" stroke-width="2"/></svg>') no-repeat;
    bottom: -15px;
    left: 0;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.5; }
}

.badge {
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--accent-color);
    border-bottom: 3px solid white;
}

.services-preview, .team-highlight {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid #e0f0f3;
    transition: all 0.3s;
    text-align: center;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(14, 122, 140, 0.1);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
}

.team-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.team-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    min-width: 200px;
    border: 1px solid #e0f0f3;
}

.doc-avatar {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.emergency-banner {
    background: var(--primary-dark);
    color: white;
    padding: 2rem 0;
    margin: 2rem 0;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.emergency-icon {
    font-size: 3rem;
}

/* ===== دکمه شناور ===== */
.chat-float-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 999;
    border: 2px solid var(--accent-color);
}

.chat-float-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: var(--accent-color);
}

/* ===== صفحات احراز هویت ===== */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e0f0f3;
}

.auth-container h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: 'Kalameh Fanum', sans-serif;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Kalameh Fanum', sans-serif;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.error-message {
    background: #FEE;
    color: #C00;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ===== پروفایل ===== */
.profile-container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-group {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--primary-light);
    border-radius: 10px;
}

.info-label {
    font-weight: bold;
    color: var(--primary-dark);
    margin-left: 10px;
}
/* ===== دارک مود — کامل و سراسری ===== */
body.dark-mode {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
}

/* هدر و فوتر — آبی بمونن */
body.dark-mode .main-header {
    background-color: #0E7A8C !important;
}
body.dark-mode .main-footer {
    background-color: #0A4D5E !important;
}

/* بخش hero */
body.dark-mode .home-hero {
    background: linear-gradient(135deg, #0a5c6a 0%, #0e7a8c 100%) !important;
}

/* کارت‌های محتوایی */
body.dark-mode .section-box,
body.dark-mode .service-card,
body.dark-mode .team-card,
body.dark-mode .mini-card,
body.dark-mode .auth-container,
body.dark-mode .profile-container,
body.dark-mode .dashboard-container,
body.dark-mode .chat-container,
body.dark-mode .poster-card,
body.dark-mode .admin-main,
body.dark-mode .info-item,
body.dark-mode .map-placeholder,
body.dark-mode .video-card,
body.dark-mode .search-container,
body.dark-mode .search-section,
body.dark-mode .main-sections,
body.dark-mode .quick-links,
body.dark-mode .product-card,
body.dark-mode .article-card,
body.dark-mode .result-item,
body.dark-mode .user-info-card,
body.dark-mode .auth-message,
body.dark-mode .article-container,
body.dark-mode .poster-contact-section,
body.dark-mode .contact-title,
body.dark-mode .contact-subtitle,
body.dark-mode .contact-address,
body.dark-mode .footer-note {
    background: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

/* متن‌ها و عناوین */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4,
body.dark-mode p, body.dark-mode span, body.dark-mode label,
body.dark-mode .mini-title, body.dark-mode .mini-desc,
body.dark-mode .section-title, body.dark-mode .section-subtitle,
body.dark-mode .product-info h3, body.dark-mode .product-info p,
body.dark-mode .article-info h3, body.dark-mode .article-info p,
body.dark-mode .video-title, body.dark-mode .result-content h3,
body.dark-mode .result-content p, body.dark-mode .info-text p,
body.dark-mode .info-text h4, body.dark-mode .article-container .content,
body.dark-mode .article-meta, body.dark-mode .contact-address {
    color: #e6edf3 !important;
}

/* قیمت */
body.dark-mode .price, body.dark-mode .price-tag {
    color: #F4B942 !important;
}

/* لینک‌ها */
body.dark-mode a {
    color: #58a6ff !important;
}
body.dark-mode .nav-menu a,
body.dark-mode .footer-col a {
    color: #e6edf3 !important;
}
body.dark-mode .auth-links a {
    color: #58a6ff !important;
}

/* بک‌گراند‌های ویژه */
body.dark-mode .info-group,
body.dark-mode .user-info-card {
    background: #1c2333 !important;
}
body.dark-mode .favorites-list li {
    background: #1c2333 !important;
    color: #e6edf3 !important;
}

/* فیلد‌های ورودی */
body.dark-mode input, body.dark-mode textarea {
    background: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
body.dark-mode input::placeholder {
    color: #8b949e !important;
}
body.dark-mode select {
    background: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

/* تب‌ها */
body.dark-mode .tab-btn {
    color: #8b949e !important;
    border-bottom-color: transparent !important;
}
body.dark-mode .tab-btn.active {
    color: #58a6ff !important;
    border-bottom-color: #58a6ff !important;
}

/* اسلایدر */
body.dark-mode .hero-left {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
body.dark-mode .slider-btn {
    background: rgba(0,0,0,0.6) !important;
}

/* دکمه‌های شناور */
body.dark-mode .chat-float-btn,
body.dark-mode .dark-mode-toggle {
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

/* جستجو */
body.dark-mode .search-box input {
    background: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
body.dark-mode .search-box button {
    background: #0E7A8C !important;
}

/* چت */
body.dark-mode .chat-messages {
    background: #161b22 !important;
}
body.dark-mode .admin-msg {
    background: #1c2333 !important;
    color: #e6edf3 !important;
}
body.dark-mode .chat-input input {
    background: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
body.dark-mode .bot-msg {
    background: #1c2333 !important;
    color: #e6edf3 !important;
}
body.dark-mode .chat-input-area input {
    background: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

/* محصولات */
body.dark-mode .product-card {
    background: #161b22 !important;
}
body.dark-mode .product-card:hover {
    transform: translateY(-5px);
    border-color: #58a6ff !important;
}

/* مقالات */
body.dark-mode .article-card {
    background: #161b22 !important;
}
body.dark-mode .article-date {
    color: #8b949e !important;
}

/* لوگو در هدر */
body.dark-mode .logo {
    color: #ffffff !important;
}

/* در info-item hover رنگ متن درست بمونه */
body.dark-mode .info-item:hover p,
body.dark-mode .info-item:hover h4 {
    color: rgba(255,255,255,0.9) !important;
}

/* دکمه دارک مود */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0A5C6A;
    color: #F4B942;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border: 2px solid #F4B942;
    transition: all 0.3s;
}
.dark-mode-toggle:hover {
    background: #0E7A8C;
}

/* ============================================================
   واکنش‌گرایی عمومی (موبایل / تبلت / لب‌تاپ)
   ============================================================ */

/* تبلت بزرگ و دسکتاپ کوچک */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* موبایل بزرگ / تبلت کوچک */
@media (max-width: 768px) {
    .container {
        width: 94%;
        padding: 0 10px;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* گریل‌ها به یک‌ستونه یا دومنظوره */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .footer-col {
        text-align: center;
    }
    .footer-col ul {
        padding: 0;
    }

    .team-grid {
        flex-direction: column;
        align-items: stretch;
    }
    .team-card {
        min-width: auto;
    }

    /* گرید محصولات/مقالات */
    .products-grid,
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        gap: 15px !important;
    }

    /* صفحه جزئیات محصول */
    .product-detail {
        flex-direction: column !important;
    }
    .product-detail img {
        max-width: 100% !important;
    }

    /* بنر اورژانسی */
    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    /* بخش‌های صفحه اصلی که از inline grid استفاده می‌کنند */
    .quick-links .cards-grid,
    .sections-grid {
        grid-template-columns: 1fr !important;
    }

    /* دکمه‌های شناور — همه هم‌اندازه و کوچک */
    .chat-float-btn,
    a[href="/chat"]:not(.chat-float-btn) {
        bottom: 16px !important;
        left: 16px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        border-width: 1.5px !important;
    }
    .dark-mode-toggle {
        bottom: 16px !important;
        right: 16px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        border-width: 1.5px !important;
    }
    /* دکمه چت‌بات که بالای دکمه پشتیبانی است */
    a[href="/chatbot"] {
        bottom: 68px !important;
        left: 16px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        border-width: 1.5px !important;
    }

    /* فرم‌ها و کارت‌ها پدینگ کمتر */
    .auth-container,
    .profile-container,
    .article-container {
        padding: 20px !important;
        margin: 20px auto !important;
    }

    .search-box {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .logo {
        font-size: 0.95rem;
    }
    .logo-icon {
        font-size: 1.4rem;
    }

    .products-grid,
    .articles-grid,
    .videos-grid {
        grid-template-columns: 1fr !important;
    }

    .quick-links .cards-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .quick-links .mini-card {
        padding: 18px 10px;
    }
    .quick-links .mini-icon {
        font-size: 2rem;
    }

    /* دکمه‌های داخل کارت‌های صفحه اصلی */
    .cards-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .section-box {
        padding: 20px !important;
    }
    .section-box h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* جلوگیری از لمس تصادفی روی دکمه‌های شناور هنگام اسکرول در موبایل */
@media (hover: none) and (pointer: coarse) {
    .chat-float-btn:hover {
        transform: none;
    }
}