/* ===============================
   TEMPLATE CURS ULM
   =============================== */

/* ======= GENERAL ======= */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f7f8fb;
    color: #222;
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: #003a88;
    font-weight: 600;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

a {
    color: #004aad;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ======= NAVBAR ======= */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .nav-link.active {
    background-color: #dce6ff !important;
    color: #003a88 !important;
    border-radius: 6px;
    font-weight: 600;
}

/* ======= SIDEBAR ======= */
#sidebar-wrapper {
    width: 290px;
    min-height: 100vh;
    background-color: #fff;
    border-right: 1px solid #ddd;
    transition: margin-left 0.3s ease, transform 0.3s ease;
    overflow-y: auto;
    z-index: 1040;
}

.sidebar-heading {
    background-color: #004aad;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 20px;
    letter-spacing: 0.2px;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.list-group-item:hover {
    background-color: #eef3ff;
}

.list-group-item a {
    color: #004aad;
    text-decoration: none;
}

.list-group-item a:hover {
    text-decoration: underline;
}

/* Submeniuri */
.collapse .list-group-item {
    font-size: 14px;
    background-color: #fafafa;
}

/* Icon săgeată */
.expand-toggle {
    cursor: pointer;
    font-weight: bold;
    color: #004aad;
}

.expand-toggle:hover {
    color: #002f73;
}

/* ======= CONȚINUT ======= */
#content-area {
    padding: 2px 2px;
    background-color: white;
    flex: 1;
    min-height: 100vh;
    border-left: 1px solid #ddd;
    transition: all 0.3s ease;
}

#content-area h2 {
    font-weight: 600;
    color: #003a88;
    margin-bottom: 10px;
    border-bottom: 2px solid #dce6ff;
    padding-bottom: 5px;
}

#content-area h3 {
    color: #004aad;
    margin-top: 25px;
}

#content-area ul, #content-area ol {
    margin-left: 25px;
}

blockquote {
    border-left: 4px solid #004aad;
    padding-left: 10px;
    font-style: italic;
    color: #333;
    background: #f1f5ff;
}

/* ======= TABELE ======= */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

table th {
    background-color: #004aad;
    color: white;
    padding: 10px;
    text-align: left;
}

table td {
    border: 1px solid #ccc;
    padding: 8px 10px;
}

table tr:nth-child(even) {
    background-color: #f2f4f8;
}

/* ======= IMAGINI ======= */
img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
    display: block;
}

/* ======= NOTE / INFO ======= */
.note {
    background-color: #f1f5ff;
    border-left: 4px solid #004aad;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.warning {
    background-color: #fff4e5;
    border-left: 4px solid #ff9900;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 15px 0;
}

/* ======= BUTON ☰ ======= */
.toggle-sidebar {
    background: transparent;
    color: white;
    border: none;
    font-size: 22px;
    margin-right: 10px;
    cursor: pointer;
}

.toggle-sidebar:hover {
    color: #dce6ff;
}

/* ======= SIDEBAR - FUNCȚIONALITATE ======= */

/* Desktop: ascundere laterală */
#sidebar-wrapper.collapsed {
    margin-left: -290px;
}

/* Conținutul se extinde când sidebarul e ascuns */
@media (min-width: 992px) {
    .sidebar-collapsed #sidebar-wrapper {
        margin-left: -290px;
    }
    .sidebar-collapsed #content-area {
        width: 100%;
    }
}

/* ======= RESPONSIVE (mobil) ======= */
@media (max-width: 992px) {
    #sidebar-wrapper {
        position: fixed;
        top: 56px; /* sub navbar */
        left: 0;
        height: calc(100vh - 56px);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%);
    }

    #sidebar-wrapper.show {
        transform: translateX(0);
    }

    /* blocăm scrollul în fundal când sidebarul e activ */
    body.sidebar-open {
        overflow: hidden;
    }
}
