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

body {
    font-family: 'Inter', sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #1e2a12;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

header img {
    height: 40px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a {
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color .2s, background .2s;
}

.header-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.header-nav .strava-link {
    color: #fc4c02;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.header-nav .strava-link:hover {
    color: #e04400;
    background: none;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 16px;
    border-left: 1px solid #2d3d1f;
    padding-left: 16px;
}

.lang-switcher a {
    color: #aaa;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    transition: color .2s, background .2s;
}

.lang-switcher a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.lang-switcher a.active {
    color: #8a7a2e;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    line-height: 0;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #141e0c;
    z-index: 99;
    padding: 8px 0 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    flex-direction: column;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: #aaa;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 24px;
    border-bottom: 1px solid #1e2a12;
    transition: color .2s, background .2s;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}

.mobile-menu .strava-link {
    color: #fc4c02;
}

.mobile-lang {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    border-bottom: 1px solid #1e2a12;
}

.mobile-lang a {
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
}

.mobile-lang a.active {
    color: #8a7a2e;
}

@media (max-width: 680px) {
    .header-nav {
        display: none;
    }

    .hamburger {
        display: block;
    }
}

.hero {
    background: linear-gradient(135deg, rgba(36, 36, 40, .85) 0%, rgba(58, 58, 63, .85) 100%), url('/assets/images/banner-792x336.png') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 64px 24px 56px;
}

.hero img {
    height: 100px;
    width: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .4));
}

.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.hero h1 span {
    color: #8a7a2e;
}

.hero p {
    font-size: 16px;
    color: #aaa;
    margin-top: 8px;
}

main {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    flex: 1;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8a7a2e;
    margin-top: 48px;
    margin-bottom: 20px;
}

.section-title:first-child {
    margin-top: 0;
}

.event-body-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: start;
}

.event-map {
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 560px) {
    .event-map {
        display: none;
    }

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

.event-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12), 0 8px 32px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

.event-card-header {
    background: #1e2a12;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-card-header svg {
    flex-shrink: 0;
    opacity: .9;
}

.event-card-header span {
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.event-card-body {
    padding: 20px 24px 24px;
}

.event-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e2a12;
    margin-bottom: 16px;
    text-decoration: none;
    display: block;
}

.event-title:hover {
    color: #8a7a2e;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 16px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #555;
}

.event-meta-item svg {
    color: #8a7a2e;
    flex-shrink: 0;
}

.maps-link {
    color: inherit;
    text-decoration: none;
}

.maps-link:hover {
    text-decoration: underline;
}

.event-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
    margin-top: 4px;
}

.event-footer {
    padding: 14px 24px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.btn-strava {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fc4c02;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 6px;
    transition: background .2s;
}

.btn-strava:hover {
    background: #e04400;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #888;
    font-size: 15px;
}

.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.sponsor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px 24px;
    width: 220px;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.sponsor-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
    border-color: #8a7a2e;
}

.sponsor-card img {
    height: 56px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: grayscale(30%);
    transition: filter .2s;
}

.sponsor-card:hover img {
    filter: grayscale(0%);
}

.sponsor-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e2a12;
    text-align: center;
    margin-bottom: 6px;
}

.sponsor-card-desc {
    font-size: 11px;
    color: #888;
    text-align: center;
    line-height: 1.5;
}

footer {
    background: #1e2a12;
    color: #fff;
    text-align: center;
    font-size: 13px;
    padding: 24px;
}

footer a {
    color: #fc4c02;
    text-decoration: none;
}

@media (max-width: 480px) {
    .event-meta {
        flex-direction: column;
        gap: 8px;
    }

    .kit-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

.kit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.kit-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s;
    border: 2px solid transparent;
}

.kit-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12), 0 8px 32px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
    border-color: #8a7a2e;
}

.kit-card-preview {
    background: #f0f0f0;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.kit-card-preview .kit-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 36, 40, .3);
    opacity: 0;
    transition: opacity .2s;
}

.kit-card:hover .kit-overlay {
    opacity: 1;
}

.kit-overlay svg {
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
}

.kit-card-label {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1e2a12;
    text-align: center;
    line-height: 1.3;
}

.kit-card-label span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #888;
    margin-top: 2px;
}

.kit-card-preview>div {
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
}

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.popup-overlay.active {
    display: flex;
}

.popup {
    background: #1e2a12;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    animation: popIn .2s ease;
}

@keyframes popIn {
    from {
        transform: scale(.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.popup-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.popup-header p {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.popup-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color .2s, background .2s;
    line-height: 0;
}

.popup-close:hover {
    color: #fff;
    background: #333;
}

#popup-viewer-container {
    width: 100%;
    aspect-ratio: 4/3;
}

#popup-viewer-container>div {
    width: 100% !important;
    height: 100% !important;
}

[id] {
    scroll-margin-top: 80px;
}

[title="Layer Views"],
[title="Help"],
[title="Made with Marmoset Toolbag"] {
    display: none !important;
}

.kit-card-preview [title="Full Screen"] {
    display: none !important;
}
