/* =========================
   Base Reset
========================= */

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

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: #f6f8fb;
    color: #1f2933;
    line-height: 1.6;
}

/* =========================
   Layout
========================= */

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

main {
    padding: 30px 0;
}

/* =========================
   Typography
========================= */

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 12px;
}

a {
    text-decoration: none;
    color: #2563eb;
}

a:hover {
    text-decoration: underline;
}

/* =========================
   Navigation
========================= */

.site-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.nav-inner {
    max-width: 1200px;
    margin: auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-links a {
    margin-left: 20px;
    font-weight: 500;
}

/* =========================
   Breadcrumbs
========================= */

.breadcrumbs {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #6b7280;
}

.breadcrumbs a {
    color: #6b7280;
}

.breadcrumbs a:hover {
    color: #2563eb;
}

/* =========================
   Event Grid
========================= */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* =========================
   Event Card
========================= */

.event-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    transition: all .15s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.event-meta {
    font-size: 0.9rem;
    color: #6b7280;
}

.event-form {
max-width:600px;
display:flex;
flex-direction:column;
gap:14px;
}

.event-form input,
.event-form textarea,
.event-form select {
padding:10px;
border:1px solid #ddd;
border-radius:6px;
}

.submit-event-btn {
background:#2563eb;
color:white;
padding:8px 14px;
border-radius:6px;
font-weight:500;
}

.error-message{
background:#ffe3e3;
border:1px solid #ffbaba;
padding:15px;
margin-bottom:15px;
}

.success-message{
background:#e6ffed;
border:1px solid #b7f5c5;
padding:15px;
margin-bottom:15px;
}

/* =========================
   Event Page
========================= */

.event-single {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    max-width: 800px;
}

.event-description {
    margin-top: 20px;
}

/* =========================
   Buttons
========================= */

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    font-weight: 500;
}

.btn:hover {
    background: #1d4ed8;
}

/* =========================
   Footer
========================= */

footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #e5e7eb;
    background: white;
    text-align: center;
    font-size: 0.9rem;
}

/* =========================
   Mobile
========================= */

/* Town page */

.town-letter-section {
    margin-bottom: 40px;
}

.town-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.town-card {
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:14px 16px;
    background:white;
    border-radius:8px;
    border:1px solid #e5e7eb;

    font-weight:500;
}

.town-card:hover {
    border-color:#2563eb;
}

.town-count {
    font-size:.85rem;
    color:#6b7280;
}

@media (max-width: 768px) {

    .nav-inner {
        flex-direction: column;
        gap: 10px;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.8rem;
    }

}