﻿/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #333;
    line-height: 1.6;
}

a {
    color: #004a99;
    text-decoration: none;
    font-weight: bold;
}

    a:hover {
        text-decoration: underline;
    }

/* ---------- Header ---------- */
header {
    background: #004a99;
    color: #fff;
    padding: 20px;
    text-align: center;
}

    header h1 {
        margin: 0;
    }

    header p {
        margin: 5px 0 0;
        font-size: 0.95em;
    }

/* ---------- Navigation ---------- */
nav {
    background: #003366;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

    nav a {
        color: #fff;
        padding: 12px 18px;
        text-decoration: none;
        font-weight: bold;
    }

        nav a:hover,
        nav a.active {
            background: #005bb5;
        }

/* ---------- Main Content ---------- */
main {
    max-width: 1000px;
    margin: 30px auto;
    background: #fff;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

h2, h3 {
    color: #003366;
}

/* ---------- Tables (Events) ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #e9eff6;
}

/* Alternating row colours */
tbody tr:nth-child(odd) {
    background: #ffffff;
}

tbody tr:nth-child(even) {
    background: #f4f7fb;
}

/* Correct, consistent hover */
tbody tr:hover {
    background: #dde9f8;
}

/* Highlight important events (still works with striping) */
.event-highlight {
    background: #cfe1f7 !important;
    font-weight: bold;
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: #555;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {

    nav {
        flex-direction: column;
    }

        nav a {
            text-align: center;
            border-top: 1px solid rgba(255,255,255,0.2);
        }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 5px;
    }

    td {
        border: none;
        padding: 6px 0;
    }

        td::before {
            font-weight: bold;
            display: block;
        }

        td:nth-of-type(1)::before {
            content: "Date";
        }

        td:nth-of-type(2)::before {
            content: "Event";
        }

        td:nth-of-type(3)::before {
            content: "Location";
        }

        td:nth-of-type(4)::before {
            content: "Details";
        }
}
