body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f8fa;
    color: #333;
    margin: 0;
}

main {
    min-height: calc(100vh - 80px); /* altezza navbar */
}

/* HEADER */
header {
    background-color: #0056a6;
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}
header h1 { margin: 0.2rem 0; font-weight: 700; }
header p { font-size: 1.2rem; }

.navbar-shadow {
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.15);
}

/* Quick links navbar */
#quick-links .nav-link {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;              /* pill */
    font-weight: 500;
    color: #212529;
    transition: all 0.25s ease;
    position: relative;
}

/* Hover */
#quick-links .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
    text-decoration: none;
}

/* Active / focus */
#quick-links .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.3);
}

#nav-container {
    height: fit-content;
}


/* LAYOUT GRID */
.row.g-4 { margin: 0; row-gap: 2rem; column-gap: 2rem; display: flex; flex-wrap: wrap; justify-content: center; }
.col-card { flex: 1 1 250px; max-width: 300px; }

.topic-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

/* header */
.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

/* bottone Apri centrato verticalmente */
.topic-action .btn {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* corpo espanso */
.topic-body {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
}

.topic-body img,
.topic-body table {
    max-width: 100%;
}

/* DASHBOARD CARD */
.card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.card-title { font-size: 1.3rem; font-weight: 600; }
.card-text { font-size: 0.95rem; color: #555; }
.badge-topics {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.9rem;
}

/* ICONS */
.icon { font-size: 3rem; }

.tag-badge {
    background-color: #f1f3f5;
    color: #212529;
    padding: 0.45em 0.75em;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    background-color: #0d6efd;
    color: #fff;
}

.tag-badge.active {
    background-color: #0d6efd;
    color: #fff;
}


/* TOPICS SECTION */
#topics-container { 
    margin-top: 2rem; 
    overflow-y: auto;
    max-height: 50vh;
}

#topics-list { 
    overflow-y: auto;
    max-height: 70vh;
}