:root {
    --color-accent: #0f4c81;
    --color-accent-hover: #0c3d68;
    --content-max: 72rem;
}

.site-header__slogan {
    color: var(--header-slogan);
}

.site-header__subtitle {
    color: var(--header-subtitle);
}

.site-header__link {
    color: var(--header-link);
}

.site-header__link:hover {
    color: var(--header-link-hover);
}

.site-header__aside {
    align-self: flex-start;
}

.site-header__logo-additional-wrap {
    align-self: flex-start;
}

.site-header__logo-additional {
    display: block;
    height: 3rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
}

/* Wąski ekran + drugie logo: ogranicz szerokość grafik, tekst w jednej linii */
@media (max-width: 639px) {
    .site-header--dual-logo .site-header__logo-main {
        max-width: 7.5rem;
    }

    .site-header--dual-logo .site-header__logo-main img {
        max-width: 100%;
        object-fit: contain;
        object-position: left center;
    }

    .site-header--dual-logo .site-header__logo-additional {
        height: 2rem;
        max-width: 4.5rem;
    }

    .site-header--dual-logo .site-header__text {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .site-header--dual-logo .site-header__slogan,
    .site-header--dual-logo .site-header__subtitle {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-header--dual-logo .site-header__aside {
        align-self: center;
        margin-right: 0.5rem;
    }

    .site-header--dual-logo .site-header__text > .flex {
        min-width: 0;
    }
}

@media (min-width: 640px) {
    .site-header__logo-additional {
        height: 3.5rem;
        max-width: 18rem;
    }
}

@media (min-width: 1024px) {
    .site-header__logo-additional {
        height: 4rem;
        max-width: 20rem;
    }
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f4f7f9;
    background-image: var(--asset-bg);
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Pasek wersji demonstracyjnej */
.demo-banner {
    background-color: #f0f9ff;
    border-bottom: 1px solid #e0f2fe;
}

.demo-banner__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.5rem 1rem;
    text-align: center;
}

.demo-banner__title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.01em;
}

.demo-banner__text {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    margin-top: 0.125rem;
}

@media (min-width: 640px) {
    .demo-banner__inner {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.625rem 1.5rem;
    }

    .demo-banner__title {
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .demo-banner__text {
        margin-top: 0;
        font-size: 0.8125rem;
    }

    .demo-banner__title::after {
        content: '—';
        margin-left: 0.5rem;
        font-weight: 400;
        color: #94a3b8;
    }
}

/* Przycisk główny */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--color-accent);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.15);
}

.btn-primary:disabled,
.btn-primary.is-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #94a3b8;
}

/* Karty strony głównej */
.tile-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
}

.tile-card--kontakt { background-image: var(--asset-opt1); }
.tile-card--kalendarz { background-image: var(--asset-opt2); }
.tile-card--szkoda { background-image: var(--asset-opt3); }

.tile-card__badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    background-color: #10b981;
    border-radius: 9999px;
    white-space: nowrap;
}

.tile-card--has-badge .tile-card__title {
    padding-right: 6.75rem;
}

@media (min-width: 640px) {
    .tile-card--has-badge .tile-card__title {
        padding-right: 7.5rem;
    }
}

.tile-card__content {
    position: relative;
    z-index: 1;
    min-height: inherit;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 58%, rgba(255, 255, 255, 0.35) 100%);
}

.tile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.tile-card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.tile-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--color-accent);
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.tile-card:hover .tile-card__cta,
.tile-card:focus-visible .tile-card__cta {
    background-color: var(--color-accent-hover);
}

/* Sekcja „Jak to działa?” */
.how-it-works {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06);
}

@media (min-width: 640px) {
    .how-it-works {
        padding: 2rem;
    }
}

.how-it-works__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1.25rem;
}

.how-it-works__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 640px) {
    .how-it-works__list {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.how-it-works__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.how-it-works__step {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--color-accent);
    border-radius: 9999px;
}

.how-it-works__text {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    padding-top: 0.125rem;
}

/* Serwisy powiązane — „Inne oddziały” */
.related-services {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1rem 0;
}

.related-services__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.375rem;
}

.related-services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Tablet: maks. 2 kafelki w rzędzie (albo mniej, jeśli tyle jest). */
@media (min-width: 640px) {
    .related-services__grid {
        grid-template-columns: repeat(min(var(--related-cols, 2), 2), 1fr);
    }
}

/* Desktop: liczba kolumn = liczba kafelków (maks. 3): 2 → 50%, 3 → ~33%. */
@media (min-width: 1024px) {
    .related-services__grid {
        grid-template-columns: repeat(var(--related-cols, 2), 1fr);
    }
}

.related-tile {
    /* ~30% wysokości banera z makiety — zmień w jednym miejscu, by dostroić wysokość kafelków */
    --related-tile-height: 4rem;
    position: relative;
    display: block;
    min-height: var(--related-tile-height);
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #fff;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.related-tile:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.related-tile__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--related-tile-height);
    padding: 0.5rem 0.875rem;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 55%, rgba(255, 255, 255, 0.4) 100%);
}

.related-tile__logo {
    flex-shrink: 0;
    width: 5.5rem;
    height: calc(var(--related-tile-height) - 0.75rem);
    object-fit: cover;
    border-radius: 0.5rem;
}

.related-tile__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.related-tile__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.related-tile__address {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.2;
    margin-top: 0.125rem;
}

.related-tile__current {
    font-size: 0.6875rem;
    font-style: italic;
    color: #94a3b8;
    line-height: 1.2;
    margin-top: 0.125rem;
}

/* Kafel bieżącego serwisu — wyróżniony jako wybrany */
.related-tile--current {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent);
    cursor: default;
}

.related-tile--current:hover {
    transform: none;
    box-shadow: 0 0 0 2px var(--color-accent);
}

.related-tile--current .related-tile__content {
    background: linear-gradient(to right, rgba(15, 76, 129, 0.14) 0%, rgba(255, 255, 255, 0.88) 55%, rgba(255, 255, 255, 0.45) 100%);
}

/* Pola formularzy — focus z kolorem akcentu */
.contact-input:focus,
.damage-input:focus,
.booking-input:focus {
    --tw-ring-color: var(--color-accent);
    border-color: var(--color-accent);
}
