/* ============================================
   Basic PHP Multipage Webapp - Stylesheet
   Mobile-first, responsive
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f8;
    color: #222;
    line-height: 1.5;
}

/* ---------- Top Navigation Bar ---------- */
.navbar {
    background-color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.navbar .brand {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}

.nav-toggle .bar {
    display: block;
    width: 24px;
    height: 3px;
    margin: 4px 0;
    background-color: #ffffff;
    border-radius: 2px;
}

.nav-links {
    list-style: none;
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #1f2937;
    position: absolute;
    top: 100%;
    left: 0;
}

.nav-links.open {
    display: flex;
}

.nav-links li {
    border-top: 1px solid #374151;
}

.nav-links li a {
    display: block;
    padding: 0.85rem 1.25rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1rem;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: #374151;
    color: #ffffff;
}

.nav-links li a.exit-link {
    color: #fca5a5;
}

/* ---------- Layout wrapper ---------- */
.page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem;
}

.card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.card p {
    margin-bottom: 0.75rem;
    color: #374151;
}

.info-message {
    background-color: #eef2ff;
    border-left: 4px solid #4f46e5;
    padding: 0.9rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: #3730a3;
}

/* ---------- Forms ---------- */
form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    margin-top: 0.9rem;
    font-size: 0.9rem;
    color: #1f2937;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
}

form textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    margin-top: 1.25rem;
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-color: #4338ca;
}

.btn-danger {
    background-color: #dc2626;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.alert-success {
    background-color: #dcfce7;
    border-left: 4px solid #16a34a;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    color: #14532d;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    color: #7f1d1d;
    margin-bottom: 1rem;
}

/* ---------- Events list ---------- */
.event-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.85rem 0;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item .event-date {
    font-size: 0.85rem;
    color: #6b7280;
}

.event-item .event-title {
    font-weight: 600;
    color: #111827;
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ---------- Desktop / larger screens ---------- */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background: none;
    }

    .nav-links li {
        border-top: none;
    }

    .nav-links li a {
        padding: 0.5rem 0.9rem;
        border-radius: 6px;
    }
}
