/* ===============================================
           === 1. تعریف فونت‌ها ===
           =============================================== */
        
        
        

        /* =========================================
           2. متغیرها و استایل پایه
           ========================================= */
        :root {
            --primary-color: #0277bd;
            --primary-dark: #01579b;
            --secondary-color: #0288d1;
            --text-color: #263238;
            --light-text: #546e7a;
            --background-color: #f5f5f5;
            --card-color: #ffffff;
            --font-primary: 'Sahel', sans-serif;
            --star-color: #ffd700;
            --shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.2);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body { 
            font-family: var(--font-primary); 
            background-color: var(--background-color); 
            color: var(--text-color); 
            padding-bottom: 0;
            line-height: 1.8; 
        }

        /* =========================================
           3. هدر و نوبار
           ========================================= */
        header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 1000;
            width: 100%;
            transition: all 0.3s ease;
            height: 70px; 
            display: flex;
            align-items: center;
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 5%;
            max-width: 1400px;
            margin: 0 auto;
            flex-direction: row;
            width: 100%;
        }

        /* تغییر: تبدیل a به div تا لینک نباشد */
        .logo {
            font-family: var(--font-primary);
            font-size: 24px;
            font-weight: 900;
            color: var(--primary-dark);
            text-decoration: none;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            order: 2;
            cursor: default; /* نشانگر موس معمولی */
        }

        .logo img {
            margin-left: 10px;
            height: 45px;
            object-fit: contain;
        }

        .nav-links {
            display: flex;
            list-style: none;
            order: 1;
        }

        .nav-links li {
            margin-left: 25px;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-color);
            font-weight: 700;
            font-size: 16px;
            transition: all 0.3s ease;
            position: relative;
            padding: 5px 0;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary-color);
            transition: width 0.3s ease;
        }

        .nav-links a:hover::after { width: 100%; }
        .nav-links a:hover { color: var(--primary-dark); }

        .menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 24px;
            color: var(--primary-dark);
            cursor: pointer;
        }

        /* =========================================
           4. بخش جستجو
           ========================================= */
        .search-section { 
            background: white; 
            padding: 20px 0; 
            position: sticky; 
            top: 70px; 
            z-index: 90; 
            box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
        }
        .search-box { width: 90%; max-width: 600px; margin: 0 auto; position: relative; }
        .search-box input { 
            width: 100%; 
            padding: 12px 50px 12px 20px; 
            border-radius: 50px; 
            border: 2px solid #e0e0e0; 
            background: #f9f9f9; 
            font-family: var(--font-primary); 
            font-size: 15px; 
            transition: 0.3s; 
        }
        .search-box input:focus { border-color: var(--primary-color); background: #fff; outline: none; }
        .search-box i { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--primary-color); font-size: 18px; }

        /* =========================================
           5. کانتینر و فیلترها
           ========================================= */
        .container { max-width: 1400px; margin: 40px auto; padding: 0 20px; min-height: 60vh; }

        .filters { 
            display: flex; gap: 10px; margin-bottom: 30px; 
            overflow-x: auto; padding-bottom: 10px; 
            -webkit-overflow-scrolling: touch; scrollbar-width: none; 
        }
        .filters::-webkit-scrollbar { display: none; }
        
        .filter-btn { 
            background: white; border: 1px solid #dae1e7; padding: 8px 20px; 
            border-radius: 50px; cursor: pointer; font-family: var(--font-primary); 
            color: var(--light-text); transition: all 0.2s; white-space: nowrap; 
            font-size: 14px; font-weight: 500; flex-shrink: 0; 
        }
        .filter-btn.active, .filter-btn:hover { 
            background: var(--primary-color); color: white; border-color: var(--primary-color); 
        }

        /* =========================================
           6. گرید کارت‌ها
           ========================================= */
        .ideas-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
            gap: 30px; 
        }

        .idea-card { 
            background: var(--card-color); border-radius: 16px; overflow: hidden; 
            box-shadow: 0 4px 15px rgba(0,0,0,0.05); cursor: pointer; 
            transition: all 0.3s ease; display: flex; flex-direction: column; 
            position: relative; border: 1px solid transparent; 
        }
        .idea-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); border-color: #bbdefb; }
        
        .card-image { height: 230px; background: #eceff1; position: relative; }
        .card-image img { width: 100%; height: 100%; object-fit: cover; }
        
        /* تگ‌های رشته (بالا راست) */
        .card-tags { 
            position: absolute; top: 10px; right: 10px; left: 10px;
            display: flex; gap: 5px; flex-wrap: wrap; 
            justify-content: flex-start; align-content: flex-start;
            pointer-events: none; max-height: 85%; overflow: hidden;
        }
        .card-category { 
            background: rgba(33, 33, 33, 0.85); color: white; 
            padding: 3px 10px; border-radius: 8px; 
            font-size: 11px; font-weight: 700; 
            backdrop-filter: blur(4px); white-space: nowrap;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2); margin-bottom: 2px;
        }

        /* ستاره‌ها (پایین چپ) */
        .star-rating { 
            position: absolute; bottom: 10px; left: 10px; 
            background: rgba(0, 0, 0, 0.6); padding: 4px 8px; 
            border-radius: 12px; display: flex; align-items: center; gap: 2px; 
            backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(0,0,0,0.3); z-index: 5; 
        }
        .star-rating i { font-size: 12px; }
        .star-rating .filled { color: var(--star-color); }
        .star-rating .empty { color: #cfd8dc; opacity: 0.6; }

        .card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
        .card-title { font-size: 18px; font-weight: 900; margin-bottom: 10px; line-height: 1.5; color: var(--text-color); }
        .card-summary { font-size: 14px; color: var(--light-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.8; margin-bottom: 15px; }
        .card-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid #f1f3f5; font-size: 13px; color: var(--primary-color); display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

        /* =========================================
           7. مودال
           ========================================= */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; }
        .modal-overlay.active { display: flex; opacity: 1; }
        
        .modal-content { 
            background: white; width: 90%; max-width: 1000px; height: 90vh; 
            border-radius: 16px; display: flex; flex-direction: column; 
            overflow: hidden; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); 
        }
        
        .modal-header { padding: 15px 25px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; background: #fff; flex-shrink: 0; }
        .close-modal { background: #f5f5f5; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: #546e7a; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
        .close-modal:hover { background: #ffebee; color: #d32f2f; transform: rotate(90deg); }

        .modal-scroll-area { overflow-y: auto; flex-grow: 1; padding-bottom: 30px; }
        .hero-image-wrapper { width: 100%; height: 300px; background: #eee; position: relative; flex-shrink: 0; }
        .hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
        
        .content-wrapper { padding: 30px; max-width: 900px; margin: 0 auto; }
        .split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }

        .departments-section { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px; margin-bottom: 30px; }
        .dept-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
        .dept-item:last-child { border-bottom: none; }
        .dept-icon { background: #e1f5fe; color: var(--primary-color); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; margin-top: 2px; }
        .dept-content h4 { margin: 0 0 4px 0; color: #37474f; font-size: 16px; font-weight: 900; }
        .dept-line { color: var(--light-text); font-size: 14px; margin: 2px 0; display: flex; align-items: baseline; }
        .dept-line::before { content: "•"; color: var(--primary-color); margin-left: 6px; font-size: 16px; line-height: 1; }

        .text-block { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #eee; margin-bottom: 20px; }
        .problem-block { border-top: 4px solid #ff9800; background: #fff8e1; }
        .solution-block { border-top: 4px solid #00acc1; background: #e0f7fa; }
        .block-header { font-weight: 900; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; font-size: 17px; }
        .block-text { text-align: justify; line-height: 2; color: #263238; white-space: pre-line; font-size: 15px; }

        .modal-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.5); color: white; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2010; font-size: 20px; transition: 0.2s; }
        .modal-nav-btn:hover { background: white; color: var(--primary-color); }
        .right-nav { right: 20px; } .left-nav { left: 20px; }

        /* =========================================
           8. فوتر
           ========================================= */
        footer {
            background: rgba(255, 255, 255, 0.9);
            padding: 30px 20px;
            text-align: center;
            color: var(--light-text);
            font-size: 16px;
            border-top: 1px solid rgba(2, 119, 189, 0.2);
            margin-top: 50px;
        }

        .footer-content { max-width: 1200px; margin: 0 auto; }

        /* =========================================
           9. ریسپانسیو
           ========================================= */
        @media (max-width: 900px) {
            .modal-nav-btn { display: none; }
            .split-layout { grid-template-columns: 1fr; gap: 20px; }
            .modal-content { height: 100%; width: 100%; border-radius: 0; max-width: none; }
            .hero-image-wrapper { height: 250px; }
            .content-wrapper { padding: 20px; }
        }

        @media (max-width: 768px) {
            .menu-toggle { display: block; order: 3; }
            .nav-links {
                display: none; position: fixed; top: 70px; left: 0;
                width: 100%; height: calc(100vh - 70px);
                background: rgba(255, 255, 255, 0.98);
                flex-direction: column; align-items: center; justify-content: flex-start;
                padding-top: 50px; z-index: 999;
            }
            .nav-links.active { display: flex; }
            .nav-links li { margin: 20px 0; }
        }

        @media (max-width: 480px) {
            .navbar-container { padding: 0 15px; }
            .nav-links a { margin-left: 15px; font-size: 13px; }
            .container { margin: 20px auto; padding: 0 15px; }
            .ideas-grid { gap: 20px; grid-template-columns: 1fr; }
            .mobile-nav-controls { display: flex; justify-content: space-between; padding: 15px 20px; background: white; border-top: 1px solid #eee; }
            .mobile-btn { background: #f5f5f5; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; color: #546e7a; cursor: pointer; display: flex; align-items: center; gap: 8px; }
        }


/* Offline refresh additions */
.ideas-intro{padding:26px 5% 8px;text-align:center}
.ideas-intro h1{font-size:clamp(24px,3vw,34px);color:var(--primary-dark);margin:0 0 8px}
.ideas-intro p{color:var(--light-text);line-height:2;margin:0 auto 8px;max-width:850px}
.ideas-count,.staff-count{display:inline-flex;margin:6px auto;padding:5px 14px;border-radius:999px;background:#e7f5fc;color:var(--primary-dark);font-weight:800;font-size:13px}
