.mak-news-header h2 {
    font-size: 1.8rem;
    background: #000;
    color: #ffd500;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mak-news-main {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.mak-main-article {
    flex: 2;
    min-width: 300px;
    position: relative;
}

.mak-main-article img {
    width: 100%;
    border-radius: 10px;
    height: 250px;
    object-fit: cover;
}

.mak-main-article-content {
    position: absolute;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    width: 100%;
    padding: 10px 15px;
    border-radius: 0 0 10px 10px;
}

.mak-main-article-content h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

.mak-sub-article {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.mak-sub-article img {
    width: 100%;
    border-radius: 10px;
    height: 100%;
    object-fit: cover;
}

.mak-sub-article-content {
    position: absolute;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    width: 100%;
    padding: 5px 10px;
    border-radius: 0 0 10px 10px;
}

.mak-sub-article-content h4 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
}

.mak-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.mak-grid-article {
    
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.3s;
}

.mak-grid-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.mak-grid-article img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.mak-grid-article-content {
    padding: 10px;
}

.mak-grid-article-content h5 {
    font-size: 1rem;
    margin: 0 0 5px;
}

.mak-date {
    font-size: 0.8rem;
    color: #888;
}

@media (max-width: 768px) {
    .mak-news-main {
        flex-direction: column;
    }
    .mak-main-article, .mak-sub-article {
        width: 100%;
    }
    .mak-main-article img { height: 200px; }
    .mak-sub-article img { height: 100px; }
}

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }


.container {
    max-width: 1200px;
    padding: 0px;
}

.articles-grid-section {
    padding: 2px;
}

    .section-header {
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #f0f0f0;
    }

    .section-header h2 {
        font-size: 28px;
        color: #2d3748;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .section-header h2 i {
        color: #4f46e5;
    }

    .section-header p {
        color: #718096;
        font-size: 16px;
    }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.article-card {
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .article-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        border-color: #cbd5e0;
    }

    .article-link {
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .article-image-container {
        position: relative;
        width: 100%;
        height: 200px;
        overflow: hidden;
    }

    .article-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .article-card:hover .article-image {
        transform: scale(1.05);
    }

    .article-date {
        position: absolute;
        top: 10px;
        left: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

.article-content {
    padding: 5px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

    .article-title {
        font-size: 18px;
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 10px;
        line-height: 1.4;
        flex-grow: 1;
    }

.chat-container {
    overflow: hidden;
    font-family: 'Noto Sans Arabic', sans-serif;
}

    .chat-header {
        background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
        color: white;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
    }

    .chat-header-icon {
        background: linear-gradient(135deg, #ffd700, #ffea80);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #1a1a1a;
        flex-shrink: 0;
    }

    .chat-header-text {
        flex-grow: 1;
        min-width: 0;
    }

    .chat-header-text h2 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .chat-header-text p {
        font-size: 14px;
        opacity: 0.9;
        color: #ffd700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .chat-status {
        background: rgba(255, 215, 0, 0.1);
        border: 1px solid rgba(255, 215, 0, 0.3);
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .chat-messages {
        height: 400px;
        overflow-y: auto;
        padding: 20px;
        
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .message {
        max-width: 85%;
        padding: 15px 18px;
        border-radius: 18px;
        line-height: 1.6;
        font-size: 15px;
        position: relative;
        animation: fadeIn 0.3s ease;
        word-wrap: break-word;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

.message.question {
    background: linear-gradient(135deg, #ffaf00, #ffab00);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
    margin-left: auto;
}

    .message.answer {
    
        align-self: flex-start;
        border: 1px solid #e5e7eb;
        border-bottom-left-radius: 5px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        margin-right: auto;
    }

    .message-content {
        line-height: 1.7;
    }

    .message-content h1,
    .message-content h2,
    .message-content h3 {
        margin: 10px 0;
        color: inherit;
        font-size: 1.2em;
    }

    .message-content ul,
    .message-content ol {
        padding-right: 20px;
        margin: 10px 0;
    }

    .message-content li {
        margin: 5px 0;
    }

    .message-content code {
        background: rgba(0, 0, 0, 0.05);
        padding: 2px 6px;
        border-radius: 4px;
        font-family: 'Courier New', monospace;
        font-size: 14px;
    }

    .message-content pre {
        background: #1a1a1a;
        color: #f8f9fa;
        padding: 12px;
        border-radius: 8px;
        overflow-x: auto;
        margin: 10px 0;
        font-size: 14px;
    }

    .message-content blockquote {
        border-right: 4px solid #4f46e5;
        padding-right: 15px;
        margin: 10px 0;
    
        font-style: italic;
    }

    .message-time {
        font-size: 11px;
        opacity: 0.7;
        margin-top: 8px;
        display: block;
        text-align: left;
    }

    .message.question .message-time {
        text-align: right;
    }

    .chat-input-area {
        padding: 20px;
    
        border-top: 1px solid #e5e7eb;
    }

    .input-wrapper {
        display: flex;
        gap: 12px;
        align-items: flex-end;
        flex-wrap: wrap;
    }

.chat-textarea {
    flex: 1;
    padding: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    min-height: 120px;
    max-height: 200px;
    transition: all 0.3s;
    width: 100%;
}

    .chat-textarea:focus {
        outline: none;
        border-color: #4f46e5;
    
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    .chat-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-width: 120px;
    }

    .send-button {
        background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
        color: white;
        border: none;
        padding: 14px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .send-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    }

    .provider-select {
        padding: 10px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    
        font-family: 'Noto Sans Arabic', sans-serif;
        font-size: 14px;
        width: 100%;
    }

    .chat-tools {
        display: flex;
        gap: 8px;
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tool-button {
        padding: 8px 12px;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 13px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .tool-button:hover {
        background: #e5e7eb;
        transform: translateY(-1px);
    }

    .typing-indicator {
        display: none;
        align-items: center;
        gap: 5px;
        padding: 10px 20px;
    
        border-radius: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin: 10px 0;
        align-self: flex-start;
        max-width: 150px;
    }

    .typing-indicator span {
        width: 8px;
        height: 8px;
        background: #4f46e5;
        border-radius: 50%;
        animation: typing 1.4s infinite ease-in-out both;
    }

    .typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
    .typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

    @keyframes typing {
        0%, 80%, 100% { transform: scale(0); }
        40% { transform: scale(1); }
    }

    @media (max-width: 768px) {
        .container {
            padding: 15px;
        }
        
        .articles-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        
        .article-image-container {
            height: 150px;
        }
        
        .article-title {
            font-size: 16px;
        }
        
        .chat-messages {
            height: 350px;
            padding: 15px;
        }
        
        .message {
            max-width: 90%;
            padding: 12px 15px;
            font-size: 14px;
        }
        
        .chat-header {
            padding: 15px;
        }
        
        .chat-header-text h2 {
            font-size: 16px;
        }
        
        .input-wrapper {
            flex-direction: column;
        }
        
        .chat-buttons {
            flex-direction: row;
            width: 100%;
            min-width: auto;
        }
        
        .send-button {
            flex: 1;
            padding: 12px;
        }
        
        .chat-textarea {
            min-height: 80px;
            font-size: 14px;
        }
        
        .tool-button {
            min-width: 100px;
            font-size: 12px;
            padding: 6px 10px;
        }
    }

    @media (max-width: 480px) {
        .articles-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        
        .section-header h2 {
            font-size: 22px;
            flex-direction: column;
            gap: 5px;
        }
        
        .chat-messages {
            height: 300px;
        }
        
        .message {
            max-width: 95%;
            padding: 10px 12px;
            font-size: 13px;
        }
        
        .chat-header {
            flex-direction: column;
            text-align: center;
            gap: 10px;
        }
        
        .chat-header-icon {
            width: 35px;
            height: 35px;
            font-size: 18px;
        }
        
        .chat-status {
            margin-top: 5px;
        }
        
        .chat-tools {
            flex-direction: column;
        }
        
        .tool-button {
            width: 100%;
            min-width: auto;
        }
    }

    ::-webkit-scrollbar {
        width: 6px;
    }

    ::-webkit-scrollbar-track {
        
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .dark-mode {
        background: #1a1a1a;
        color: #e5e7eb;
    }

    .dark-mode .chat-container {
        background: #2d2d2d;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    }

    .dark-mode .message.answer {
        background: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    .dark-mode .chat-input-area {
        background: #2d2d2d;
        border-color: #374151;
    }

    .dark-mode .chat-textarea {
        background: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    .dark-mode .tool-button {
        background: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    .dark-mode .provider-select {
        background: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    .info-text {
        text-align: center;
        padding: 15px;
        margin: 20px 0;
        background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
        border-radius: 12px;
        border: 1px solid #bae6fd;
        color: #0369a1;
        font-size: 14px;
    }

    .info-text i {
        margin-left: 8px;
    }

    .notification {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        padding: 12px 24px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1000;
        animation: slideIn 0.3s ease;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .notification.success {
        background: #10b981;
        color: white;
    }

    .notification.error {
        background: #ef4444;
        color: white;
    }

    .notification.info {
        background: #f59e0b;
        color: white;
    }

    .notification.warning {
        background: #fbbf24;
        color: white;
    }

    @keyframes slideIn {
        from { transform: translate(-50%, -100%); opacity: 0; }
        to { transform: translate(-50%, 0); opacity: 1; }
    }

    @keyframes slideOut {
        from { transform: translate(-50%, 0); opacity: 1; }
        to { transform: translate(-50%, -100%); opacity: 0; }
    }