:root {
    --primary-blue: #072d6d;
    --primary-blue-dark: #052354;
    --accent-orange: #f36c21;
    --bg-color: #ffffff;
    --text-color: #072d6d;
    --tile-white-bg: #ffffff;
    --tile-white-border: #e5eaf2;
    --header-border: #eaeef4;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
}

.top-header {
    background: #fff;
    border-bottom: 1px solid var(--header-border);
}

.header-inner {
    max-width: 1400px;
    margin: auto;
    height: 80px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 32px;
}

.header-nav, .header-tools {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav a, .header-tools a, .header-tools button {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.header-tools button {
    padding: 8px 12px;
    border: 1px solid #cfd6e4;
    border-radius: 6px;
    background: #f5f7fb;
}

.hero {
    text-align: center;
    background: #ffffff;
    padding: 20px 20px 40px 20px;
    border-bottom: 1px solid #eaeef4;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-wave-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.hero-wave-title h1 {
    font-size: 42px;
    font-weight: 800;
    color: #072d6d;
    margin: 0;
}

.badge-my {
    background: var(--accent-orange);
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    padding: 4px 18px;
    border-radius: 50px;
}

.hero-subtitle {
    color: #5a6987;
    font-size: 18px;
    margin: 0;
}

.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 24px;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tile {
    aspect-ratio: 1;
    border-radius: 22px;
    padding: 32px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    transition: transform .25s ease, box-shadow .25s ease;
}

.tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(7,45,109,.18);
}

.tile.blue {
    background: linear-gradient(135deg, #072d6d, #052354);
    color: #fff;
}

.tile.white {
    background: var(--tile-white-bg);
    border: 1px solid var(--tile-white-border);
    color: #072d6d;
}

.tile-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.white .icon {
    background: #f3f5fb;
}

.badge-warning {
    background: #f36c21;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.tile-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.tile.blue .tile-content h2, 
.tile.blue .tile-content p {
    color: #fff;
}

.tile.white .tile-content h2 {
    color: #072d6d;
}

.tile-content p {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
    color: #5a6987;
}

.tile.white .tile-content p {
    color: #5a6987;
}

.arrow {
    background: var(--accent-orange);
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    align-self: flex-end;
}

.tile-info-card {
    background: linear-gradient(135deg, #072d6d, #052354);
    color: #fff;
    position: relative;
    background-image: url('https://www.intercity.pl/images/train_bg.svg');
    background-size: cover;
    background-position: center;
}

.tile-info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(7, 45, 109, 0.85);
    z-index: 1;
}

.tile-info-card > * {
    position: relative;
    z-index: 2;
}

.tile-info-card p {
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 500;
}

.login-menu {
    position: relative;
    display: inline-block;
}

.login-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 15px;
}

.login-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    width: 280px;
    background: #fff;
    border: 1px solid #cfd6e4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: none;
    z-index: 9999;
}

.login-menu:hover .login-dropdown,
.login-menu:focus-within .login-dropdown {
    display: block;
}

.login-dropdown a {
    display: block;
    padding: 14px 18px;
    text-decoration: none;
    color: #072d6d;
    font-size: 15px;
    border-bottom: 1px solid #eef2f7;
}

.login-dropdown a:last-child {
    border-bottom: none;
}

.login-dropdown a:hover {
    background: #f4f7fb;
    color: var(--accent-orange);
}

.tile:focus,
.tile:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 4px solid #ffb81c;
    outline-offset: 4px;
}

/* Wersje kolorystyczne / Kontrast */
body.dark {
    --bg-color: #121212;
    --text-color: #ffffff;
    --tile-white-bg: #1e1e1e;
    --tile-white-border: #333333;
    --header-border: #333333;
}

body.dark .top-header, body.dark .hero {
    background: #1e1e1e;
}

body.dark .hero-wave-title h1, body.dark .header-nav a, body.dark .login-trigger {
    color: #ffffff;
}

body.contrast {
    --bg-color: #000000;
    --text-color: #ffffff;
    --tile-white-bg: #000000;
    --tile-white-border: #ffffff;
    --header-border: #ffffff;
}

body.contrast .tile.white, body.contrast .tile.blue {
    background: #000000;
    border: 3px solid #ffffff;
}

@media(max-width: 1200px) {
    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 700px) {
    .tiles {
        grid-template-columns: 1fr;
    }
    .header-nav {
        display: none;
    }
}