:root {
    --rotary-blue: #17458f;
    --rotary-gold: #f7a81b;
    --rotary-blue-dark: #12376f;
    --page-bg: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #667085;
    --shadow-soft: 0 4px 18px rgba(23, 69, 143, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    font-family: Arial, sans-serif;
    color: var(--text-main);
}

/*
|--------------------------------------------------------------------------
| Hero / top
|--------------------------------------------------------------------------
*/

.hero {
    background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-blue-dark));
    color: white;
    border-bottom: 5px solid var(--rotary-gold);
    padding: 34px 24px;
}

.hero-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    width: 76px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 38px;
    line-height: 1.1;
}

.hero p {
    margin: 0;
    opacity: 0.92;
    font-size: 16px;
}

/*
|--------------------------------------------------------------------------
| Layout
|--------------------------------------------------------------------------
*/

.container {
    max-width: 1300px;
    margin: 34px auto;
    padding: 0 20px;
}

.info-card,
.calendar-wrapper,
.empty-card,
.page-header,
.detail-event-card {
    background: white;
    border-radius: 16px;
    border-top: 4px solid var(--rotary-gold);
    box-shadow: var(--shadow-soft);
}

/*
|--------------------------------------------------------------------------
| Info card
|--------------------------------------------------------------------------
*/

.info-card {
    padding: 28px;
    margin-bottom: 30px;
}

.info-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    color: var(--rotary-blue);
}

.info-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

/*
|--------------------------------------------------------------------------
| Quick links
|--------------------------------------------------------------------------
*/

.quick-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.quick-links a,
.action-button,
.actions a,
.back-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--rotary-blue);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: bold;
    transition: all 0.15s ease;
}

.quick-links a:hover,
.action-button:hover,
.actions a:hover,
.back-link-button:hover {
    background: var(--rotary-gold);
    color: #1f2937;
}

/*
|--------------------------------------------------------------------------
| Calendar
|--------------------------------------------------------------------------
*/

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.calendar-title {
    font-size: 34px;
    font-weight: bold;
    color: var(--rotary-blue);
}

.calendar-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-nav a {
    text-decoration: none;
    background: var(--rotary-blue);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
}

.calendar-nav a:hover {
    background: var(--rotary-gold);
    color: #1f2937;
}

.calendar-wrapper {
    overflow: hidden;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.weekday {
    background: #eef4ff;
    padding: 16px;
    font-weight: bold;
    color: var(--rotary-blue);
    border-bottom: 1px solid #dce6f8;
    border-right: 1px solid #dce6f8;
}

.day-cell,
.empty-cell {
    min-height: 160px;
    background: white;
    border-right: 1px solid #dce6f8;
    border-bottom: 1px solid #dce6f8;
    padding: 12px;
}

.day-number {
    font-size: 28px;
    font-weight: bold;
    color: var(--rotary-blue);
    margin-bottom: 10px;
}

/*
|--------------------------------------------------------------------------
| Events
|--------------------------------------------------------------------------
*/

.calendar-event {
    display: block;
    text-decoration: none;
    color: white;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}



.event-public {
    background: var(--rotary-blue);
}

.event-club_visit {
    background: #005daa;
}

.event-district_meeting {
    background: #5b2c83;
}

.event-committee_meeting {
    background: #0f766e;
}

.event-travel {
    background: #d97706;
}

.event-other {
    background: #555;
}

.event-time {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.event-meta {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--rotary-blue);
    font-weight: 600;
}
/*
|--------------------------------------------------------------------------
| Public event pages
|--------------------------------------------------------------------------
*/

.page-header {
    padding: 28px;
    margin-bottom: 24px;
}

.page-header h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--rotary-blue);
}

.page-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.actions,
.back-link-wrapper {
    margin-bottom: 24px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.event-card {
    padding: 24px;
}

.event-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--rotary-blue);
    margin-bottom: 14px;
}

.event-section {
    margin-top: 14px;
    line-height: 1.7;
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.system-footer {
    margin-top: 56px;
    padding: 30px 28px;
    background: linear-gradient(135deg, #102c59, #17458f);
    border-top: 5px solid var(--rotary-gold);
    color: white;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-brand strong {
    font-size: 18px;
}

.footer-brand span {
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    line-height: 1.5;
}

.footer-meta {
    text-align: right;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255,255,255,0.84);
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 1000px) {

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .weekday {
        display: none;
    }

    .day-cell {
        min-height: auto;
    }

    .empty-cell {
        display: none;
    }

    .hero-inner {
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 28px;
    }
}

@media (max-width: 700px) {

    .hero {
        padding: 26px 20px;
    }

    .hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        width: 62px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .calendar-title {
        font-size: 28px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-meta {
        text-align: left;
    }
}

.calendar-event,
.calendar-event *,
.calendar-event .event-time,
.calendar-event .event-meta {
    color: #ffffff !important;
}

.detail-event-card {
    background: white;
    border-radius: 16px;
    border-top: 4px solid var(--rotary-gold);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.event-list {
    max-width: 900px;
}

.detail-event-card {
    padding: 22px 24px;
}

.event-meta {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--rotary-blue);
    font-weight: 600;
}

.detail-event-card {
    background: white;
    border-radius: 16px;
    border-top: 4px solid var(--rotary-gold);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.event-list {
    max-width: 900px;
    margin: 0 auto;
}

.event-datetime {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef4ff;
    color: var(--rotary-blue);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.public-card-padding {
    padding: 24px;
}

.calendar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--rotary-blue);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: bold;
    transition: all 0.15s ease;
}

.calendar-button:hover {
    background: var(--rotary-gold);
    color: #1f2937;
}

/*
|--------------------------------------------------------------------------
| Public calendar wide layout
|--------------------------------------------------------------------------
| Bruges på den offentlige kalenderforside, så introduktionskortet bevarer
| normal læsebredde, mens selve kalenderen får mere arbejdsplads.
*/

.public-calendar-wide {
    width: min(calc(100% - 48px), 1700px);
    margin: 30px auto 0;
}

@media (max-width: 700px) {
    .public-calendar-wide {
        width: calc(100% - 24px);
        margin-top: 24px;
    }
}

/*
|--------------------------------------------------------------------------
| Test environment banner
|--------------------------------------------------------------------------
*/

.test-environment-banner {
    width: 100%;
    background: #111827;
    color: #ffffff;
    border-bottom: 4px solid var(--rotary-gold);
    position: relative;
    z-index: 1000;
}

.test-environment-banner__inner {
    max-width: 1700px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
}

.test-environment-banner__title {
    font-size: 14px;
    letter-spacing: 0.12em;
}

.test-environment-banner__site {
    font-size: 14px;
    font-weight: 700;
    color: var(--rotary-gold);
}

.test-environment-banner__text {
    font-size: 13px;
    color: rgba(255,255,255,0.88);
}

@media (max-width: 700px) {
    .test-environment-banner__inner {
        padding: 9px 14px;
        gap: 6px 10px;
        flex-direction: column;
    }

    .test-environment-banner__title,
    .test-environment-banner__site,
    .test-environment-banner__text {
        width: 100%;
    }
}

/*
|--------------------------------------------------------------------------
| Public test banner positioning
|--------------------------------------------------------------------------
*/

.test-environment-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

body {
    padding-top: 76px;
}

@media (max-width: 700px) {
    body {
        padding-top: 116px;
    }
}

/*
|--------------------------------------------------------------------------
| Kompakt public layout
|--------------------------------------------------------------------------
| Reducerer unødig vertikal luft på almindelige laptopskærme uden at ændre
| kalenderens struktur eller læsbarhed.
*/

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 32px;
}

.hero {
    padding: 24px;
}

.container {
    margin-top: 22px;
    margin-bottom: 22px;
}

.info-card {
    padding: 22px;
    margin-bottom: 20px;
}

.quick-links {
    margin-top: 16px;
}

.public-calendar-wide {
    margin-top: 20px;
}

.calendar-header {
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 30px;
}

.day-cell,
.empty-cell {
    min-height: 145px;
    padding: 10px;
}

.day-number {
    font-size: 25px;
    margin-bottom: 8px;
}

.system-footer {
    margin-top: auto;
    padding: 22px 28px;
}

@media (max-width: 1000px) {
    .day-cell {
        min-height: auto;
    }
}

@media (max-width: 700px) {
    body {
        padding-top: 88px;
    }

    .hero {
        padding: 22px 20px;
    }

    .container {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .info-card {
        padding: 20px;
    }

    .public-calendar-wide {
        margin-top: 20px;
    }

    .system-footer {
        margin-top: auto;
        padding: 24px 20px;
    }
}


/*
|--------------------------------------------------------------------------
| Public distriktsvalg
|--------------------------------------------------------------------------
*/

.district-picker-page {
    width: min(calc(100% - 40px), 1100px);
    margin: 34px auto;
    flex: 1;
}

.district-picker-card {
    background: var(--card-bg);
    border-radius: 18px;
    border-top: 4px solid var(--rotary-gold);
    box-shadow: var(--shadow-soft);
    padding: 30px;
}

.district-picker-header {
    max-width: 720px;
    margin-bottom: 26px;
}

.district-picker-header h2 {
    margin: 0 0 10px;
    color: var(--rotary-blue);
    font-size: 28px;
}

.district-picker-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.district-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.district-picker-option {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 145px;
    padding: 24px;
    border: 1px solid #dce6f8;
    border-radius: 16px;
    background: #ffffff;
    color: var(--text-main);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(23, 69, 143, 0.08);
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.district-picker-option:hover {
    transform: translateY(-2px);
    border-color: var(--rotary-gold);
    box-shadow: 0 12px 30px rgba(23, 69, 143, 0.14);
}

.district-picker-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef4ff;
    font-size: 25px;
}

.district-picker-content {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.district-picker-number {
    color: var(--rotary-blue);
    font-size: 20px;
    line-height: 1.3;
}

.district-picker-name {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.district-picker-action {
    color: var(--rotary-blue);
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
}

/*
|--------------------------------------------------------------------------
| Public sticky footer
|--------------------------------------------------------------------------
*/

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

.system-footer {
    margin-top: auto;
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .district-picker-page {
        width: calc(100% - 24px);
        margin: 24px auto;
    }

    .district-picker-card {
        padding: 22px;
    }

    .district-picker-grid {
        grid-template-columns: 1fr;
    }

    .district-picker-option {
        min-height: 125px;
        padding: 20px;
    }
}

/*
|--------------------------------------------------------------------------
| Public klubbesøgsoversigt - komplet styling
|--------------------------------------------------------------------------
*/

.club-visit-year-badge {
    margin-top: 18px;
}

.club-visit-submit {
    border: 0;
}

.club-visit-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.club-visit-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.club-visit-filter-form label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: var(--rotary-blue);
}

.club-visit-filter-form select {
    min-width: 220px;
    padding: 11px 13px;
    border-radius: 9px;
    border: 1px solid #cfd8e3;
    font-size: 15px;
    background: #fff;
}

.club-visit-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #eef4ff;
    color: var(--rotary-blue);
    border: 1px solid #dce6f8;
    padding: 11px 15px;
    border-radius: 10px;
    font-weight: 700;
}

.club-visit-back-link:hover {
    background: var(--rotary-gold);
    color: #1f2937;
    border-color: var(--rotary-gold);
}

.club-visit-progress {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #dce6f8;
    border-radius: 14px;
    background: #f8fbff;
}

.club-visit-progress__text {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
    color: #334155;
    line-height: 1.5;
}

.club-visit-progress__text strong {
    color: var(--rotary-blue);
}

.club-visit-progress__track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe5f3;
}

.club-visit-progress__bar {
    height: 100%;
    border-radius: inherit;
    background: var(--rotary-blue);
}

.club-visit-wide {
    width: min(calc(100% - 40px), 1300px);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 22px;
}

.club-visit-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.club-visit-stat {
    min-height: 112px;
    padding: 18px;
    border-radius: 14px;
    border-top: 4px solid var(--rotary-gold);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.club-visit-stat__label {
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

.club-visit-stat__number {
    margin-top: 10px;
    color: var(--rotary-blue);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.club-visit-list {
    margin-top: 28px;
}

.club-visit-table-card {
    background: #fff;
    border-radius: 18px;
    border-top: 4px solid var(--rotary-gold);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.club-visit-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.club-visit-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    table-layout: fixed;
}

.club-visit-table th {
    background: #eef4ff;
    color: var(--rotary-blue);
    text-align: left;
    padding: 15px 18px;
    font-size: 15px;
    font-weight: 700;
}

.club-visit-table td {
    padding: 17px 18px;
    border-top: 1px solid #e5e7eb;
    vertical-align: middle;
}

.club-visit-table tr:hover td {
    background: #f8fbff;
}

.club-visit-table th:nth-child(1),
.club-visit-table td:nth-child(1) {
    width: 30%;
}

.club-visit-table th:nth-child(2),
.club-visit-table td:nth-child(2) {
    width: 16%;
}

.club-visit-table th:nth-child(3),
.club-visit-table td:nth-child(3) {
    width: 20%;
}

.club-visit-table th:nth-child(4),
.club-visit-table td:nth-child(4) {
    width: 25%;
}

.club-visit-table th:nth-child(5),
.club-visit-table td:nth-child(5) {
    width: 9%;
}

.public-club-name {
    font-weight: 700;
    color: var(--rotary-blue);
    font-size: 16px;
}

.public-club-city,
.public-muted {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}

.public-date-badge {
    display: inline-block;
    background: #eef4ff;
    color: var(--rotary-blue);
    padding: 8px 12px;
    border-radius: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.public-location {
    line-height: 1.55;
}

.public-action-cell {
    text-align: right;
    white-space: nowrap;
}

.public-calendar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.club-visit-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.club-visit-status--planned { background: #17458f; color: #fff; }
.club-visit-status--confirmed { background: #0ea5e9; color: #fff; }
.club-visit-status--reserved { background: #f59e0b; color: #1f2937; }
.club-visit-status--cancelled { background: #dc3545; color: #fff; }
.club-visit-status--missing { background: #ffc107; color: #1f2937; }
.club-visit-status--not-wanted { background: #6c757d; color: #fff; }
.club-visit-status--not-relevant { background: #0dcaf0; color: #1f2937; }

.club-visit-back-link--text {
    background: transparent;
    border: 0;
    padding: 8px 2px;
    border-radius: 0;
    font-weight: 700;
}

.club-visit-back-link--text:hover {
    background: transparent;
    color: var(--rotary-blue);
    border-color: transparent;
    text-decoration: underline;
}

@media (max-width: 1050px) {
    .club-visit-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .club-visit-table {
        min-width: 0;
        table-layout: auto;
    }

    .club-visit-table thead {
        display: none;
    }

    .club-visit-table,
    .club-visit-table tbody,
    .club-visit-table tr,
    .club-visit-table td {
        display: block;
        width: 100%;
    }

    .club-visit-table-card {
        background: transparent;
        border-top: 0;
        box-shadow: none;
        overflow: visible;
    }

    .club-visit-table tr {
        background: #fff;
        border-radius: 18px;
        margin-bottom: 22px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
        border-top: 4px solid var(--rotary-gold);
    }

    .club-visit-table td {
        border: 0;
        padding: 12px 18px;
    }

    .club-visit-table td:first-child {
        padding-top: 18px;
    }

    .club-visit-table td:last-child {
        padding-bottom: 18px;
    }

    .club-visit-table td::before {
        display: block;
        margin-bottom: 5px;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .club-visit-table td:nth-child(1)::before { content: "Klub"; }
    .club-visit-table td:nth-child(2)::before { content: "Status"; }
    .club-visit-table td:nth-child(3)::before { content: "Dato"; }
    .club-visit-table td:nth-child(4)::before { content: "Lokation"; }
    .club-visit-table td:nth-child(5)::before { content: "Kalender"; }

    .public-action-cell {
        text-align: left;
    }
}

@media (max-width: 800px) {
    .club-visit-toolbar,
    .club-visit-progress__text {
        align-items: stretch;
        flex-direction: column;
    }

    .club-visit-filter-form,
    .club-visit-filter-form > div,
    .club-visit-filter-form select,
    .club-visit-filter-form button,
    .club-visit-back-link {
        width: 100%;
    }

    .club-visit-back-link--text {
        justify-content: flex-start;
        padding: 10px 0;
    }
}

@media (max-width: 700px) {
    .club-visit-wide {
        width: calc(100% - 40px);
    }
}

@media (max-width: 600px) {
    .club-visit-stats {
        grid-template-columns: 1fr;
    }
}
