/* TeMaFoT – style strony (bez zależności). */

:root {
    --c-bg: #e3e3e3;
    --c-box: #d7d7d7;
    --c-border: #58585a;
    --c-border-light: #b7b7b7;
    --c-text: #58585a;
    --c-muted: #707681;
    --c-accent: #f1592a;
    --c-accent-dark: #c43d12;
    --max-width: 960px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
    font-size: clamp(14px, 1.2vw + 10px, 18px);
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--c-accent-dark);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(51, 51, 51, 0.5);
    outline-offset: 2px;
}

h1, h2, h3, p, ul, figure {
    margin: 0;
}

h2 {
    color: var(--c-accent);
    font-size: clamp(24px, 2vw + 16px, 33px);
    font-weight: normal;
    margin-bottom: 0.5em;
}

h3 {
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 0.75em;
}

p + p {
    margin-top: 1em;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.5em 1em;
    background: #fff;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

.accent {
    color: var(--c-accent);
}

.text-center {
    text-align: center;
}

.link-button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
}

/* --- Nagłówek --- */
.site-header {
    max-width: 860px;
    margin: 20px auto 0;
    padding: 20px 25px 20px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--c-border-light);
    background: var(--c-box);
}

.site-header a {
    text-decoration: none;
}

.site-header__logo img {
    display: block;
    width: 200px;
}

.site-header__title {
    flex: 1;
}

.site-header h1 {
    color: var(--c-muted);
    font-size: clamp(16px, 2.2vw + 6px, 28px);
    text-align: right;
    line-height: 1.25;
}

/* --- Nawigacja --- */
.site-nav {
    max-width: 860px;
    margin: 0 auto;
}

.site-nav ul {
    list-style: none;
    padding: 8px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 24px;
}

.site-nav a {
    color: var(--c-accent-dark);
    text-decoration: none;
}

.site-nav a:hover {
    text-decoration: underline;
}

/* --- Treść --- */
.site-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 100px 240px;
    background: url("../../images/kolo.png") no-repeat right bottom;
}

.box {
    border: 3px solid var(--c-border);
    margin-top: 30px;
    scroll-margin-top: 10px;
}

.box__inner {
    border: 3px solid var(--c-border);
    margin: 7px;
    padding: 16px 25px 16px 45px;
    background: var(--c-box);
}

.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact address {
    font-style: normal;
}

.contact a {
    color: inherit;
}

.plain-list {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.dash-list {
    list-style: none;
    padding: 0;
}

.dash-list li::before {
    content: "- ";
}

.offer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 1.5em;
}

.table-wrap {
    overflow-x: auto;
}

.brands {
    width: 100%;
    border-collapse: collapse;
}

.brands caption {
    font-weight: bold;
    text-transform: uppercase;
    padding-bottom: 0.5em;
}

.brands th,
.brands td {
    text-align: left;
    vertical-align: top;
    padding: 4px 8px 4px 0;
    font-weight: normal;
}

.brands th {
    width: 40%;
}

/* --- Galeria (układ kolumnowy zamiast Masonry) --- */
.gallery {
    list-style: none;
    padding: 0;
    columns: 200px;
    column-gap: 5px;
}

.gallery__item {
    break-inside: avoid;
    margin-bottom: 5px;
}

.gallery__item img {
    display: block;
    width: 100%;
    transition: opacity 0.2s;
}

.gallery__item a:hover img {
    opacity: 0.85;
}

/* --- Mapa --- */
.map {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    aspect-ratio: 640 / 440;
    margin: 0 auto 0.5em;
    border: 0;
}

.rodo {
    font-size: 12px;
    text-align: justify;
}

/* --- Stopka --- */
.site-footer {
    max-width: 860px;
    margin: -190px auto 20px;
    padding: 5px;
    position: relative;
    border: 1px solid var(--c-border-light);
    background: linear-gradient(to right, rgba(215, 215, 215, 0.65) 0%, rgba(215, 215, 215, 0.33) 50%, rgba(0, 0, 0, 0) 100%);
    font-size: 12px;
    color: var(--c-muted);
}

.site-footer a {
    color: var(--c-muted);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* --- Okno polityki prywatności --- */
.modal {
    width: min(900px, 94vw);
    max-height: 90vh;
    padding: 0;
    border: 3px solid var(--c-border);
    background: var(--c-box);
    color: var(--c-text);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.modal__inner {
    position: relative;
    padding: 24px 32px;
    font-size: 13px;
}

.modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 28px;
    line-height: 1;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--c-text);
}

#polityka p,
#polityka ul {
    margin: 1em 0;
}

#polityka ul {
    padding-left: 40px;
}

/* --- Lightbox galerii --- */
.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 48px 56px;
    border: 0;
    background: transparent;
    color: #fff;
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
}

.lightbox figure {
    text-align: center;
}

.lightbox__img {
    max-width: calc(100vw - 112px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
}

.lightbox__caption {
    font-size: 13px;
    margin-top: 6px;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    padding: 6px 14px;
}

.lightbox__close {
    top: 8px;
    right: 8px;
}

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__nav--prev {
    left: 4px;
}

.lightbox__nav--next {
    right: 4px;
}

/* --- Baner cookies --- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(830px, 94vw);
    z-index: 50;
    padding: 10px;
    border: 5px solid #25064b;
    background: #fff;
    color: #514706;
    font-size: 11px;
    text-align: center;
}

.cookie-banner a,
.cookie-banner .link-button {
    color: #25064b;
    font-size: 12px;
    font-weight: bold;
}

.cookie-banner[hidden] {
    display: none;
}

/* --- Responsywność --- */
@media (max-width: 980px) {
    .site-content {
        padding: 0 5% 240px;
    }
}

@media (max-width: 820px) {
    .site-header {
        margin-top: 0;
        padding: 16px;
    }

    .site-header__logo img {
        width: 25vw;
    }

    .site-content {
        padding: 0 8px 240px;
    }

    .box__inner {
        padding: 16px 12px;
    }

    .contact,
    .offer {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .site-header {
        flex-direction: column;
        text-align: center;
    }

    .site-header__logo img {
        width: 30vw;
    }

    .site-header h1 {
        text-align: center;
    }

    .brands th,
    .brands td {
        display: block;
        width: auto;
    }

    .lightbox {
        padding: 48px 8px;
    }

    .lightbox__img {
        max-width: calc(100vw - 16px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
