:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --accent-color: #2563eb; 
    --text-main: #1e293b;
    --text-dim: #64748b;
    --border-color: #e2e8f0;
    --section-divider: #cbd5e1;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
    color: var(--text-main);
    min-height: 100vh;
}

/* --- Navigation --- */
.home-nav {
    position: absolute;
    display: flex;
    top: 25px;
    left: 25px;
}

.home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--accent-color);
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.home-link:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
    cursor: pointer;
}

header {
    margin-top: 60px;
    text-align: center;
    padding: 0 20px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

/* --- Section Styling --- */
.section-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    margin: 40px 0 10px 0;
}

.section-title h2 {
    font-size: 1.25rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    margin: 0 20px 0 0;
}

.section-title::after {
    content: "";
    height: 1px;
    background: var(--section-divider);
    width: 100%;
}

/* --- Grid Layout --- */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 60px auto;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08);
}

.card h3 {
    margin: 0 0 15px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    min-height: 2.5em; /* Alignment */
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.badge-container img {
    height: 20px;
    border-radius: 3px;
}

@media (max-width: 600px) {
    header h1 { font-size: 1.8rem; }
    .home-nav { top: 15px; left: 15px; }
}

.menu-container {
    position: relative; /* Context for the absolute menu */
    display: inline-block;
}

.context-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50px;    /* Places it below the 40px icon */
    left: 0;
    background: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 150px;
    z-index: 1000;
    border-radius: 4px;
}

.context-menu.active {
    display: block;
}

.context-menu li a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #333;
}

.context-menu li a:hover {
    background-color: #f0f0f0;
}