/* Root variables */

:root {
    --primary: #1e3a8a;
    --accent: #06b6d4;
    --light: #f5f7fb;
    --border: #e2e8f0;

    --text-main: #0f172a;
    --text-muted: #64748b;

    --radius: 16px;
}

/* Base */

body {
    font-family: "Inter", system-ui, sans-serif;
    background: var(--light);
    color: var(--text-main);
}

/* Topbar */

.topbar {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 12px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Sidebar */

.sidebar {
    background: #0f172a;
}

.sidebar a {
    color: #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    display: block;
    margin-bottom: 6px;
    transition: 0.2s;
}

.sidebar a:hover {
    background: #1e293b;
    color: #ffffff;
}

/* Cards */

.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.article-card {
    border-radius: var(--radius);
    transition: all 0.25s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Images */

.card-img-top {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

/* Text */

.text-muted {
    color: var(--text-muted) !important;
}

/* Tags */

.badge {
    border-radius: 30px;
    font-weight: 500;
}

/* Buttons */

.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: #162d6b;
}

/* Dropdown */

.dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    background: rgba(6,182,212,0.1);
}

/* Profile image */

img.rounded-circle {
    object-fit: cover;
}

/* Scrollbar */

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

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* Responsive */

@media (max-width: 768px) {

    .topbar {
        padding: 10px;
    }

}


.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.article-content p {
    margin-bottom: 1rem;
}

.btn-light {
    border-radius: 10px;
    transition: 0.2s;
}

.btn-light:hover {
    background: #e2e8f0;
}

/* Sidebar responsive behavior */

@media (max-width: 768px) {

    .sidebar {
        width: 50% !important;   /* sidebar takes only part of screen */
        max-width: 280px;        /* prevent too large */
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    /* overlay background (optional but recommended) */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

}