/* --- Global Reset & Font --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    /* Improved readability */
    background-color: #f8f9fa;
    /* Lighter grey background */
    color: #343a40;
    /* Slightly softer black for text */
    display: flex;
    /* Helps with footer positioning if content is short */
    flex-direction: column;
    /* Stack elements vertically */
    min-height: 100vh;
    /* Ensure body takes full viewport height */
    padding: 20px;
}

/* --- Container --- */
.container {
    flex-grow: 1;
    /* Allow container to grow to fill space */
    max-width: 960px;
    /* Slightly wider container */
    margin: 30px auto;
    /* More vertical margin */
    background-color: #ffffff;
    padding: 40px 50px;
    /* More padding */
    border-radius: 10px;
    /* Softer edges */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    /* More pronounced shadow */
    position: relative;
    /* For positioning the language switcher */
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 45px;
    /* More space below header */
    padding-bottom: 25px;
    /* Space before border */
    border-bottom: 1px solid #dee2e6;
    /* Subtle separator */
}

header h1 {
    color: #d82834;
    /* Official Austrian Red */
    font-weight: 700;
    font-size: 2.8em;
    /* Larger heading */
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    /* Tighten spacing slightly */
}

header .subtitle {
    font-size: 1.3em;
    color: #6c757d;
    /* Grey color for subtitle */
    font-weight: 300;
    margin-bottom: 20px;
}

header .info {
    font-size: 1em;
    color: #495057;
    /* Darker grey for info text */
    max-width: 700px;
    /* Limit width for readability */
    margin: 0 auto;
    /* Center the info text */
}

/* --- Language Switcher --- */
.lang-switcher {
    position: absolute;
    top: 20px;
    /* Position from top */
    right: 30px;
    /* Position from right */
    font-size: 0.9em;
}

.lang-switcher button {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 5px 8px;
    /* Add some padding */
    margin: 0 2px;
    /* Spacing between buttons */
    font-size: 0.95em;
    font-family: inherit;
    border-radius: 4px;
    /* Slightly rounded corners */
    transition: background-color 0.2s ease, color 0.2s ease;
    /* Smooth transition */
}

.lang-switcher button:hover:not(:disabled) {
    background-color: #e9ecef;
    /* Light grey background on hover */
    color: #0056b3;
    /* Darker blue on hover */
    text-decoration: none;
}

.lang-switcher button:disabled,
.lang-switcher button.active {
    color: #343a40;
    /* Dark text for active/disabled */
    font-weight: 700;
    /* Make active bold */
    cursor: default;
    background-color: transparent;
    /* Ensure no background for active */
}

/* --- Main Content & Table --- */
main {
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
    /* Slightly larger base font size for table */
    border: 1px solid #dee2e6;
    /* Add outer border */
    border-radius: 5px;
    /* Optional: round table corners */
    overflow: hidden;
    /* Ensures border-radius clips content */
}

thead {
    background-color: #f1f3f5;
    /* Very light grey header */
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    /* Stronger border below header */
}

th,
td {
    padding: 16px 20px;
    /* Generous padding */
    text-align: left;
    vertical-align: middle;
    /* Align text vertically */
    border-bottom: 1px solid #dee2e6;
    /* Horizontal lines */
}

th {
    font-weight: 600;
    /* Slightly less bold header */
    white-space: nowrap;
    /* Prevent headers wrapping */
}

/* Remove bottom border from last row */
tbody tr:last-child td {
    border-bottom: none;
}

/* Zebra-striping */
tbody tr:nth-child(even) {
    background-color: #fdfdfe;
    /* Almost white, very subtle striping */
}

tbody tr:hover {
    background-color: #eef2f7;
    /* Subtle blueish hover */
}

/* Column Specifics */
td:nth-child(1) {
    /* Date */
    font-weight: 400;
    white-space: nowrap;
    color: #333;
}

td:nth-child(2) {
    /* Day */
    color: #555;
    white-space: nowrap;
}

td:nth-child(3) {
    /* Holiday Name */
    font-weight: 500;
    /* Make name slightly bolder */
    color: #212529;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: auto;
    /* Push footer down if content is short (Requires body flex setup) */
    padding: 25px 0 10px 0;
    /* More padding above footer */
    border-top: 1px solid #e9ecef;
    /* Lighter top border */
    font-size: 0.9em;
    color: #6c757d;
    /* Grey footer text */
}

/* --- Impressum Page Specific Styles --- */
/* MOVED TO GLOBAL SCOPE */
.impressum-container main section {
    margin-bottom: 30px;
    /* Space between sections */
    padding-bottom: 20px;
    /* Space below content before next heading */
    border-bottom: 1px solid #f1f3f5;
    /* Very subtle separator */
}

.impressum-container main section:last-child {
    border-bottom: none;
    /* Remove border from last section */
}

.impressum-container h2 {
    font-size: 1.4em;
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.impressum-container p {
    font-size: 0.95em;
    color: #343a40;
    line-height: 1.8;
    /* Slightly more line height for legal text */
}

.impressum-container p strong {
    font-weight: 600;
    /* Make labels slightly bolder */
    color: #212529;
}

.impressum-container a {
    /* Ensure links look consistent */
    color: #007bff;
    text-decoration: none;
}

.impressum-container a:hover {
    text-decoration: underline;
}

/* Back link styling */
.backlink {
    text-align: left;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.backlink a {
    color: #007bff;
    text-decoration: none;
}

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

/* --- Footer Link Styling (for index.html) --- */
/* MOVED TO GLOBAL SCOPE */
.footer-links {
    margin-top: 10px;
    /* Space above the links */
    font-size: 0.85em;
    /* Smaller font size */
}

.footer-links a {
    color: #6c757d;
    /* Grey color */
    text-decoration: none;
    margin: 0 10px;
    /* Spacing if you add more links later */
    display: inline-block;
    /* or display: block; */
    width: auto;
    height: 10px;
}

.footer-links a:hover {
    color: #007bff;
    /* Blue on hover */
    text-decoration: underline;
}


/* --- Responsive Design Adjustments --- */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
        padding: 30px 40px;
    }

    header h1 {
        font-size: 2.4em;
    }

    header .subtitle {
        font-size: 1.15em;
    }

    th,
    td {
        padding: 14px 15px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    body {
        padding: 10px;
        line-height: 1.6;
    }

    .container {
        max-width: none;
        /* Allow container to be full width */
        margin: 15px auto;
        padding: 25px 20px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    header h1 {
        font-size: 2.1em;
    }

    header .subtitle {
        font-size: 1.05em;
    }

    th,
    td {
        padding: 12px 10px;
        font-size: 0.95em;
    }

    /* Add horizontal scroll for table on smaller screens */
    main {
        overflow-x: auto;
        /* Enable horizontal scroll */
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
    }

    table {
        /* Optional: add min-width if needed, but 100% width + scroll usually works */
        /* min-width: 600px; */
        border: none;
        /* Remove outer border when scrolling */
        border-radius: 0;
    }

    thead {
        border-bottom-width: 1px;
        /* Less thick border */
    }

    th,
    td {
        border-bottom: 1px solid #e9ecef;
        /* Consistent border */
    }

    tbody tr:last-child td {
        border-bottom: 1px solid #e9ecef;
        /* Re-add border for last row when scrolling */
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        padding: 5px;
    }

    .container {
        margin: 10px auto;
        padding: 20px 15px;
        border-radius: 5px;
    }

    header {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    header .subtitle {
        font-size: 1em;
        margin-bottom: 15px;
    }

    header .info {
        font-size: 0.9em;
    }

    .lang-switcher {
        position: static;
        /* Bring switcher into flow */
        text-align: center;
        /* Center buttons */
        margin-bottom: 20px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 0.9em;
        white-space: normal;
        /* Allow text wrapping in cells */
    }

    /* Re-apply nowrap selectively if needed */
    td:nth-child(1),
    td:nth-child(2) {
        white-space: nowrap;
    }

    /* Styles previously nested here were moved out to global scope */

}