/* =========================
   CSS RESET + VARIABELEN
========================= */
:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --primary: #4f46e5;     /* indigo */
    --primary-dark: #4338ca;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 14px;
    --shadow: 0 10px 25px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #e9ebef;
    color: var(--text);
    line-height: 1.6;
	font-size: 15px;
	letter-spacing: 0.1px;
}

/* =========================
   LAYOUT
========================= */
.container {
    max-width: 900px;
    margin: 10px auto;
/*    padding: 24px; */
	overflow: visible;
	border-radius: var(--radius);
}

.card {
    background: #d1cdcf9c;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
	border: 3px solid #357206;
}

/* =========================
   MELDINGEN
   ========================= */
.msg {
    margin-bottom: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12.5px;
}
.error {
    background: #fee2e2;
    color: #b91c1c;
}
.success {
    background: #d1fae5;
    color: #065f46;
}

/* =========================
   TYPOGRAFIE
========================= */
h1, h2, h3 {
    margin-top: 0;
    font-weight: 600;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.4rem;
}

small {
    color: var(--muted);
}

/* =========================
   LINKS & BUTTONS
========================= */
a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

button,
.btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:hover,
.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.btn-red {
    background: #ef4444;
}

.btn-red:hover {
    background: #b91c1c;
}

/* =========================
   FORMULIEREN
========================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    margin-bottom: 14px;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

/* =========================
   NAVIGATION
========================= */
nav {
    background: #d2d4d4;
    padding: 1px 1px;
/*    margin-bottom: 30px; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
	border-radius: var(--radius);
	border: 3px solid #357206;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative; /* Cruciaal voor dropdown positioning */
}
.nav-left a, .nav-right a {
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

/* zachte underline animation */
.nav-left a::after,
.nav-right a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.nav-left a:hover::after,
.nav-right a:hover::after {
    width: 100%;
}
.nav-right .dropdown {
    position: relative;
    display: inline-block;
}

.nav-right .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: var(--card);
    min-width: 220px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 999;
}

.nav-right .dropdown:hover .dropdown-content {
    display: block;
}

.nav-right .dropdown-content a,
.nav-right .dropdown-content span {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
}

.nav-right .dropdown-content a:hover {
    background: #f3f4f6;
}
.logo {
	padding: 0 0 0 10px;
	width: 125px;
}

/* =========================
   TOPIC / POST LIJST
========================= */
.topic {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.topic:last-child {
    border-bottom: none;
}

.topic-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.post {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
	border: 3px solid #357206;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.post-actions a {
    margin-left: 8px;
    font-size: 0.85rem;
}
.post img {
    max-width: 100%;
    height: auto;
}

.img-left {
    float: left;
    margin: 6px 16px 6px 0;
}

.img-right {
    float: right;
    margin: 6px 0 6px 16px;
}

.img-center {
    display: block;
    margin: 12px auto;
}
.post::after {
    content: "";
    display: block;
    clear: both;
}

/* =========================
   MESSAGES
========================= */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

/* =========================
   ADMIN TABLE
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-weight: 600;
}
/* =========================
   BRAND + LINKS
========================= */
.brand {
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 20px;
}

.nav-left a, .nav-right a {
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.nav-left a:hover, .nav-right a:hover {
    text-decoration: underline;
}

/* =========================
   DROPDOWN
========================= */
.dropdown {
    position: relative;
}

.dropbtn {
    cursor: pointer;
    padding: 6px 10px;
    display: inline-block;
    user-select: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 110%;           /* net onder de button */
    left: 0;
    min-width: 150px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    pointer-events: auto;
    z-index: 9999;
}
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
}
.dropdown-content.show {
    display: block;
}

.dropdown-content.right {
    right: 0;
    left: auto;
}

/* Scrollbare categorieën (voor veel items) */
.dropdown-content.scrollable {
    max-height: 300px;
    overflow-y: auto;
}

/* Links in dropdown */
.dropdown-content a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
}

.dropdown-content a:hover {
    background: #f3f4f6;
}

.dropdown-content hr {
    margin: 6px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* Hover effect */
.dropdown:hover .dropdown-content {
    display: block;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-left, .nav-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .dropdown-content {
        position: relative;
        top: 0;
        width: 100%;
    }

    .dropdown-content.scrollable {
        max-height: 200px;
    }
}
