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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.header {
    background: #EF3340;
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0px 9px 8px 0px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header h1 {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.header h1 a {
    color: white;
    text-decoration: none;
    text-shadow: -2px -1px 5px black;
}

.header h1 a:hover {
    text-decoration: underline;
}

.nav {
    display: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.page-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Content Wrapper für Tabellen und Karte */
.content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
    margin: 15px 0;
    width: 100%;
    flex-wrap: wrap;
}

/* Monatliche Tabellen Container - links */
.monthly-tables-container {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Monatliche Veranstaltungstabellen - Grid-Layout für horizontales Scrollen */
.monthly-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    width: 100%;
}

.monthly-events-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.9em;
}

.month-caption {
    background: linear-gradient(135deg, #EF3340, #ffffff);
    color: #fff;
    padding: 10px 10px;
    text-align: left;
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 2px solid #EF3340;
    caption-side: top;
    text-transform: uppercase;
}

.monthly-events-table th {
    display: none;
}

.monthly-events-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.monthly-events-table tr:last-child td {
    border-bottom: none;
}

.monthly-events-table tr:hover {
    background-color: #f8f8f8;
}

.monthly-events-table a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.monthly-events-table a:hover {
    color: #EF3340;
    text-decoration: underline;
}

/* Vergangene Veranstaltungen in hellgrau */
.monthly-events-table tr.past-event {
    color: #999;
}

.monthly-events-table tr.past-event a {
    color: #999;
}

.monthly-events-table tr.past-event a:hover {
    color: #EF3340;
}

/* Spaltenbreiten */
.monthly-events-table .event-day-col {
    width: 3em;
    min-width: 3em;
    max-width: 3em;
    text-align: right;
    white-space: nowrap;
}

.monthly-events-table .event-name-col {
    width: 15em;
    min-width: 15em;
    max-width: 15em;
    word-wrap: break-word;
}

.monthly-events-table .event-bundesland-col {
    width: 2.5em;
    min-width: 2.5em;
    max-width: 2.5em;
    text-align: center;
    white-space: nowrap;
}

.austria-map-container {
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.austria-map-svg {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

/* Fallback-Stil für ältere Browser */
.fallback-message {
    display: none;
    padding: 20px;
    background: #fff8f8;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
    color: #cc0000;
}

.fallback-message p {
    margin: 0;
    padding: 0;
}

/* Stile für die interaktive SVG-Karte */
.bundesland-table {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    border: 2px solid #EF3340;
    max-width: 300px;
    min-width: 200px;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.bundesland-header {
    background: linear-gradient(135deg, #EF3340, #ffffff);
    color: #333;
    padding: 12px 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 2px solid #EF3340;
    cursor: pointer;
}

.bundesland-header::before {
    content: attr(data-abbr);
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.bundesland-header:hover {
    background: linear-gradient(135deg, #ffffff, #EF3340);
}

.bundesland-content {
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.event-row {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

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

.event-row:hover {
    background-color: #f8f8f8;
}

.event-date {
    color: #EF3340;
    font-weight: bold;
    min-width: 70px;
    display: inline-block;
}

.event-name {
    margin-left: 8px;
    flex-grow: 1;
}

.event-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.event-name a:hover {
    color: #EF3340;
    text-decoration: underline;
}

.event-location {
    color: #666;
    font-size: 0.85em;
    margin-left: 8px;
    display: block;
    margin-top: 4px;
}

.no-events {
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.legend {
    display: none;
}

.map-hint {
    text-align: center;
    margin: 10px 0 20px;
    color: #666;
    font-size: 0.9em;
}

.footer {
    background: #EF3340;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    box-shadow: -2px -9px 6px 0px rgba(0, 0, 0, 0.1);
}

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

.footer a:hover {
    text-decoration: underline;
}

.disclaimer {
    margin: 40 10 0 10;
    font-size: 0.7em;
}

/* Responsive Design - Hochformat (Portrait) */
@media (orientation: portrait) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .austria-map-container {
        order: 1;
        width: 100%;
    }
    
    .monthly-tables-container {
        order: 2;
        width: 100%;
        flex: none;
    }
    
    /* Grid-Layout für Tabellen - Monate von links nach rechts, dann von oben nach unten */
    .monthly-tables-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
        width: 100%;
    }
    
    .monthly-events-table {
        font-size: 0.95em;
        min-width: 250px;
    }
    
    .monthly-events-table td {
        padding: 8px 10px;
    }
    
    .austria-map-svg {
        max-height: 400px;
    }
}

/* Responsive Design - Querformat (Landscape) */
@media (orientation: landscape) {
    .content-wrapper {
        flex-direction: row;
    }
    
    .austria-map-container {
        order: 2;
        flex: 1;
    }
    
    .monthly-tables-container {
        order: 1;
        flex: 0 0 350px;
        min-width: 300px;
    }
    
    /* In Querformat: Tabellen untereinander */
    .monthly-tables-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .monthly-events-table {
        font-size: 0.9em;
        width: 100%;
    }
    
    .austria-map-svg {
        max-height: 600px;
    }
}

/* Kleine Bildschirme - Anpassungen */
@media (max-width: 768px) {
    .austria-map-svg {
        max-height: 350px;
    }
    
    .monthly-tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .monthly-events-table {
        font-size: 0.9em;
    }
    
    .monthly-events-table .event-name-col {
        width: 12em;
        min-width: 12em;
        max-width: 12em;
    }
}

/* Sehr kleine Bildschirme (Smartphones) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .page-title {
        font-size: 1.3em;
    }
    
    .austria-map-svg {
        max-height: 300px;
    }
    
    .monthly-tables-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .monthly-events-table {
        font-size: 0.85em;
    }
    
    .monthly-events-table td {
        padding: 6px 8px;
    }
    
    .monthly-events-table .event-day-col {
        width: 2.5em;
        min-width: 2.5em;
        max-width: 2.5em;
    }
    
    .monthly-events-table .event-name-col {
        width: 10em;
        min-width: 10em;
        max-width: 10em;
    }
}

/* Viewport Meta für mobile Geräte */
@viewport {
    width: device-width;
    initial-scale: 1.0;
    maximum-scale: 1.0;
    user-zoom: fixed;
}