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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
}

header {
    background: #16213e;
    padding: 1rem 2rem;
}

header .logo {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}

main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: #16213e;
}

h1 {
    margin-bottom: 0.5rem;
    color: #16213e;
}

h2 {
    margin: 2rem 0 1rem;
    color: #16213e;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    color: #fff;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.hero-sub {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Home Info */
.home-info {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.home-info h2 {
    margin-top: 0;
}

/* Route Card provider accents */
.route-card-nightjet {
    border-left: 3px solid #e94560;
}

.route-card-european-sleeper {
    border-left: 3px solid #2ecc71;
}

p {
    margin-bottom: 1rem;
    color: #444;
}

/* Route Grid */
.route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.route-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.2rem 1.5rem;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a2e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.route-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.route-cities {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.route-arrow {
    color: #e94560;
    font-weight: bold;
}

.route-from, .route-to {
    font-weight: 600;
    font-size: 1.1rem;
}

.route-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

/* Route Summary */
.route-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 1.5rem 0;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.summary-item strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.03em;
}

.summary-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

.intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin: 1.5rem 0;
}

/* Booking Links */
.booking-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.btn-primary {
    background: #e94560;
    color: #fff;
}

.btn-primary:hover {
    background: #c73652;
}

.btn-secondary {
    background: #fff;
    color: #16213e;
    border: 2px solid #16213e;
}

.btn-secondary:hover {
    background: #16213e;
    color: #fff;
}

/* Price Table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.price-table th {
    background: #16213e;
    color: #fff;
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
}

.price-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #eee;
}

.price-table tr:hover {
    background: #f0f4ff;
}

.price-table .price {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

/* Price Calendar */
.price-calendar {
    margin: 1.5rem 0;
}

.cal-month {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.cal-month-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.cal-month-header h3 {
    margin: 0;
    color: #16213e;
    font-size: 1.2rem;
}

.cal-updated {
    font-size: 0.75rem;
    color: #999;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-dow {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    padding: 0.3rem 0;
    text-transform: uppercase;
}

.cal-spacer {
    /* leere Zellen vor dem 1. des Monats */
}

.cal-day {
    position: relative;
    min-height: 52px;
    border-radius: 6px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: default;
}

a.cal-day {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.cal-day:not(.cal-past):not(.cal-empty):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1;
}

.cal-day-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
}

.cal-day-price {
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Farbklassen */
.cal-cheap {
    background: #d4edda;
    border: 1px solid #b7dfbf;
}
.cal-cheap .cal-day-price { color: #155724; }

.cal-mid {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}
.cal-mid .cal-day-price { color: #856404; }

.cal-expensive {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}
.cal-expensive .cal-day-price { color: #721c24; }

.cal-empty {
    background: #f5f5f5;
    border: 1px solid #eee;
}
.cal-empty .cal-day-num { color: #bbb; }

.cal-past {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    opacity: 0.5;
}
.cal-past .cal-day-num { color: #ccc; }

.cal-today {
    outline: 2px solid #e94560;
    outline-offset: -1px;
}

/* Legende */
.cal-legend {
    display: flex;
    gap: 1.2rem;
    margin: 0.8rem 0 0;
    font-size: 0.8rem;
    color: #666;
    flex-wrap: wrap;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.cal-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.cal-dot.cal-cheap { background: #d4edda; border: 1px solid #b7dfbf; }
.cal-dot.cal-mid { background: #fff3cd; border: 1px solid #ffeaa7; }
.cal-dot.cal-expensive { background: #f8d7da; border: 1px solid #f5c6cb; }
.cal-dot.cal-empty { background: #f5f5f5; border: 1px solid #eee; }

@media (max-width: 768px) {
    .cal-day {
        min-height: 44px;
        padding: 3px 4px;
    }

    .cal-day-num {
        font-size: 0.65rem;
    }

    .cal-day-price {
        font-size: 0.55rem;
    }

    .cal-month-header {
        flex-direction: column;
        gap: 0.3rem;
    }

    .cal-legend {
        gap: 0.6rem;
        font-size: 0.7rem;
    }
}

/* Legal Pages */
.legal-page {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1.8;
}

.legal-page h1 {
    margin-bottom: 1.5rem;
}

.legal-page h2 {
    margin-top: 2rem;
    font-size: 1.2rem;
}

.legal-page h3 {
    margin-top: 1.5rem;
    font-size: 1rem;
}

.contact-email {
    font-size: 1.3rem;
    font-weight: 600;
}

.contact-email a {
    color: #e94560;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Reverse Link */
.reverse-link {
    margin-top: 2rem;
    padding: 1rem;
    background: #f0f4ff;
    border-radius: 6px;
}

.reverse-link a {
    color: #16213e;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .route-summary {
        flex-direction: column;
        gap: 0.8rem;
    }

    .price-table {
        font-size: 0.85rem;
    }

    .price-table th, .price-table td {
        padding: 0.5rem;
    }

    .booking-links {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}
