/* General Styles */
:root {
    --primary-color: #E65100;
    --secondary-color: #FFF3E0;
    --accent-color: #2E7D32;
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #ddd;
    --background-color: #fff;
    --light-background-color: #f9f9f9;
    --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-size-base: 1.125rem; /* 18px */
    --line-height-base: 1.6;
    --spacing-unit: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%; /* Ensures 1rem = 16px by default */
}

body {
    font-family: var(--font-family-sans);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 5rem; /* Space for fixed header */
}

/* Accessible focus styles */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Layout - Timeline influence */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.timeline-section {
    position: relative;
    padding: calc(var(--spacing-unit) * 2) 0;
    margin-bottom: var(--spacing-unit);
}

.timeline-section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--border-color);
    transform: translateX(-50%);
    z-index: -1;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: calc(var(--spacing-unit) * 2);
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-item-content {
    width: calc(50% - var(--spacing-unit));
    padding: var(--spacing-unit);
    background-color: var(--light-background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
}

.timeline-item-content::after {
    content: '';
    position: absolute;
    top: calc(var(--spacing-unit) * 1.5);
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(even) .timeline-item-content::after {
    right: -16px;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--border-color);
}

.timeline-item:nth-child(odd) .timeline-item-content::after {
    left: -16px;
    border-width: 10px 16px 10px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

.timeline-item-date {
    position: absolute;
    top: calc(var(--spacing-unit) * 1.5);
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 1;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 0 0 4px var(--primary-color);
}

.timeline-item-date span {
    display: block;
    line-height: 1.2;
}

/* Header & Navigation (Mega Menu) */
.site-header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: var(--spacing-unit) 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--secondary-color);
    white-space: nowrap;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-unit);
}

.site-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    position: relative;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.site-nav li.has-submenu {
    position: relative;
}

.site-nav .submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: var(--primary-color);
    min-width: 250px;
    padding: var(--spacing-unit);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-top: 3px solid var(--accent-color);
    z-index: 1001;
    border-radius: 0 0 8px 8px;
}

.site-nav .submenu ul {
    flex-direction: column;
    gap: 0.5rem;
}

.site-nav .submenu li {
    width: 100%;
}

.site-nav .submenu a {
    color: var(--secondary-color);
    padding: 0.75rem 1rem;
    display: block;
    border-radius: 4px;
}

.site-nav li.has-submenu:hover .submenu,
.site-nav li.has-submenu:focus-within .submenu {
    display: block;
}

.site-nav .submenu-title {
    font-weight: bold;
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://via.placeholder.com/1920x600/E65100/FFF3E0?text=Austrian+Alps+Road');
    background-size: cover;
    background-position: center;
    color: var(--secondary-color);
    text-align: center;
    padding: calc(var(--spacing-unit) * 4) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-unit);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--secondary-color);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn:hover,
.btn:focus-visible {
    background-color: darken(var(--accent-color), 10%);
    transform: translateY(-2px);
}

.btn.btn-secondary {
    background-color: var(--primary-color);
    margin-left: var(--spacing-unit);
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus-visible {
    background-color: darken(var(--primary-color), 10%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-sans);
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-unit);
    line-height: var(--line-height-base);
}

a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover,
a:focus-visible {
    color: var(--accent-color);
    text-decoration: none;
}

ul, ol {
    margin-left: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    list-style-position: inside;
}

ul li, ol li {
    margin-bottom: 0.5rem;
    font-size: var(--font-size-base);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--secondary-color);
    padding: var(--spacing-unit) 0;
    text-align: center;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1;
    max-width: 800px;
    font-size: 1rem;
}

.cookie-banner .btn {
    margin: 0;
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-unit);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-family-sans);
    color: var(--text-color);
    background-color: var(--background-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.2);
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 0.5rem;
}

.form-actions {
    margin-top: var(--spacing-unit);
    text-align: right;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-unit);
    background-color: var(--background-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden; /* For rounded corners to apply to borders */
}

.data-table th,
.data-table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table th {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr:nth-child(even) {
    background-color: var(--light-background-color);
}

.data-table tbody tr:hover {
    background-color: rgba(var(--primary-color), 0.05);
}

/* Details/Summary */
details {
    background-color: var(--light-background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: var(--spacing-unit);
    padding: var(--spacing-unit);
    transition: background-color 0.3s ease;
}

details[open] {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
}

summary {
    display: block; /* Ensures full width click area */
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-color);
    padding: 0.5rem 0;
    position: relative;
    list-style: none; /* Remove default marker */
}

summary::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit */
}

summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

details[open] summary::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

details p {
    margin-top: var(--spacing-unit);
    margin-bottom: 0;
    padding-top: var(--spacing-unit);
    border-top: 1px solid var(--border-color);
}

/* Aside */
aside {
    background-color: var(--secondary-color);
    border-left: 5px solid var(--primary-color);
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

aside h3 {
    color: var(--primary-color);
    margin-top: 0;
}

aside p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Blockquote */
blockquote {
    background-color: var(--light-background-color);
    border-left: 5px solid var(--accent-color);
    padding: var(--spacing-unit);
    margin: var(--spacing-unit) 0;
    font-style: italic;
    color: var(--light-text-color);
    border-radius: 0 8px 8px 0;
}

blockquote p {
    margin-bottom: 0.5rem;
}

blockquote footer {
    font-style: normal;
    font-size: 0.9rem;
    text-align: right;
    color: var(--text-color);
}

/* Definition List */
dl {
    margin-bottom: var(--spacing-unit);
}

dt {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

dd {
    margin-left: var(--spacing-unit);
    margin-bottom: 1rem;
    line-height: var(--line-height-base);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: calc(var(--spacing-unit) * 2) 0;
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 3);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-unit);
}

.footer-column {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-column h3 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-unit);
    font-size: 1.2rem;
}

.footer-column p,
.footer-column ul {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover,
.footer-column a:focus-visible {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--spacing-unit);
    margin-top: var(--spacing-unit);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 992px) {
    .site-nav ul {
        gap: 0.5rem;
    }

    .site-nav a {
        padding: 0.5rem 0.75rem;
    }

    .site-nav .submenu {
        min-width: 200px;
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .timeline-section::before {
        left: 20px; /* Move timeline line to the left */
        transform: translateX(0);
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-item-content {
        width: calc(100% - 60px); /* Adjust width to make space for date and line */
        margin-left: 60px; /* Push content to the right of the line */
    }

    .timeline-item-content::after {
        border-width: 10px 16px 10px 0 !important; /* Always point left */
        left: -16px !important;
        right: auto !important;
    }

    .timeline-item-date {
        left: 20px;
        transform: translateX(-50%);
        top: 0; /* Align date to the top of the item */
    }

    .timeline-item:nth-child(odd) {
        flex-direction: column; /* Ensure consistent stacking */
    }

    .timeline-item:nth-child(odd) .timeline-item-content {
        margin-left: 60px; /* Consistent margin for all content blocks */
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 4rem; /* Adjust for smaller header */
    }

    .site-header {
        padding: 0.75rem 0;
    }

    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .site-logo {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .site-nav {
        width: 100%;
    }

    .site-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .site-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-nav li:last-child {
        border-bottom: none;
    }

    .site-nav a {
        padding: 0.75rem 1rem;
        display: block;
        width: 100%;
    }

    .site-nav .submenu {
        position: static; /* Stack submenu items */
        width: 100%;
        box-shadow: none;
        border-top: none;
        padding: 0.5rem 0;
        border-radius: 0;
        background-color: rgba(var(--primary-color), 0.9); /* Slightly darker for submenus */
    }

    .site-nav .submenu a {
        padding-left: 2.5rem; /* Indent submenu items */
    }

    .hero {
        min-height: 40vh;
        padding: var(--spacing-unit) 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 1rem;
        padding: var(--spacing-unit) 0.5rem;
    }

    .cookie-banner p {
        margin-bottom: 0.5rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .footer-column {
        min-width: 100%;
        text-align: center;
    }

    .site-footer .container {
        flex-direction: column;
        align-items: center;
    }

    .footer-column ul {
        padding-left: 0;
    }

    .footer-column ul li {
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1.1rem; }
    p { font-size: 1rem; }

    .site-logo {
        font-size: 1.3rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .btn.btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
    }

    .timeline-item-date {
        width: 80px;
        height: 80px;
        font-size: 0.9rem;
    }

    .timeline-item-content {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}