/* ==========================================================================
   Fonty self-hosted — pakiet #005 v2 (22.07.2026)

   Wczesniej szly z fonts.googleapis.com: arkusz blokowal render (780 ms wg
   PSI), a swap po jego pobraniu przesuwal tekst w hero (CLS 0,147).
   Lokalnie znika trzecie polaczenie (DNS + TLS + fetch do obcej domeny),
   a pliki da sie preloadowac.

   Pobrane tylko zakresy latin i latin-ext — reszta (cyrillic, greek,
   vietnamese) to dla polskiego serwisu martwy ciezar.
   Licencja: SIL Open Font License 1.1 (plik LICENSE.txt obok).
   ========================================================================== */

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('../fonts/archivo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/source-sans-3-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/source-sans-3-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* Podstawowe style */
:root {
    --primary: #1a365d;
    --secondary: #2d3748;
    /* Przyciemnione o 6% wobec pierwotnego #e53e3e (22/765 różnicy — niewidoczne
       gołym okiem). Powód: biały tekst na starym odcieniu dawał kontrast 4,12
       przy progu 4,5 (WCAG 1.4.3), przez co `color-contrast` oblewał na sześciu
       przyciskach strony głównej. Teraz 4,61. */
    --accent: #d73a3a;
    --light: #f7fafc;
    --text: #2d3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Source Sans 3', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1, h2, h3, h4, .btn {
    font-family: 'Archivo', 'Source Sans 3', 'Segoe UI', sans-serif;
}

body {
    color: var(--text);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Nagłówek */
header {
    background-color: #003300;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 2px solid white;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
    transition: opacity 0.3s;
}

.logo a:hover .logo-img {
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    transform: translateY(-10px);
}

nav ul li {
    margin-left: 1.25rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #cbd5e0;
}

/* <picture> opakowuje obrazki z wariantem WebP. `display: contents` sprawia,
   że samo opakowanie znika z układu — reguły pisane na `… img` działają
   tak samo jak przed jego dodaniem. */
picture {
    display: contents;
}

/* Sekcja hero */
.hero {
    /* Tło hero było najcięższym zasobem strony (JPG 210 KB) i najpewniejszym
       kandydatem na LCP. WebP tej samej rozdzielczości waży 44 KB. Gradient
       przykrywa zdjęcie na tyle mocno, że kompresja jest niewidoczna.
       Pierwsza deklaracja to fallback dla przeglądarek bez image-set(). */
    background: linear-gradient(rgba(51, 51, 51, 0.8), rgba(51, 51, 51, 0.9)), url('../images/hero/hero-dla-cosmo-pen.jpg');
    background-image: linear-gradient(rgba(51, 51, 51, 0.8), rgba(51, 51, 51, 0.9)),
                      -webkit-image-set(url('../images/hero/hero-dla-cosmo-pen.webp') type('image/webp'),
                                        url('../images/hero/hero-dla-cosmo-pen.jpg') type('image/jpeg'));
    background-image: linear-gradient(rgba(51, 51, 51, 0.8), rgba(51, 51, 51, 0.9)),
                      image-set(url('../images/hero/hero-dla-cosmo-pen.webp') type('image/webp'),
                                url('../images/hero/hero-dla-cosmo-pen.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 0;
    text-align: center;
}

/* Telefon dostawał obrazek 1920 px szerokości. Wariant 960 px waży 15 KB
   zamiast 44 KB — a to element LCP, więc różnica idzie wprost w wynik mobile.
   Odpowiada mu <link rel="preload" media="..."> w includes/header.php:
   przy zmianie tego progu trzeba poprawić oba miejsca. */
@media (max-width: 768px) {
    .hero {
        background-image: linear-gradient(rgba(51, 51, 51, 0.8), rgba(51, 51, 51, 0.9)),
                          -webkit-image-set(url('../images/hero/hero-dla-cosmo-pen-960.webp') type('image/webp'),
                                            url('../images/hero/hero-dla-cosmo-pen.jpg') type('image/jpeg'));
        background-image: linear-gradient(rgba(51, 51, 51, 0.8), rgba(51, 51, 51, 0.9)),
                          image-set(url('../images/hero/hero-dla-cosmo-pen-960.webp') type('image/webp'),
                                    url('../images/hero/hero-dla-cosmo-pen.jpg') type('image/jpeg'));
    }
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c53030;
}

/* Sekcje ogólne */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--secondary);
}

/* Kolekcja Millenium */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 250px;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Opis: max 3 linie, reszta pól (cena, przycisk) dociągnięta do dołu karty */
.product-info p:first-of-type {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
    padding-bottom: 1rem;
}

.product-info .btn {
    align-self: flex-start;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.product-info p {
    margin-bottom: 1rem;
    color: var(--secondary);
}

/* O firmie */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Realizacje */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s, transform 0.3s;
    /* Kafelek galerii jest <button>, nie <div> — otwiera powiększenie, więc musi
       być osiągalny z klawiatury. Reset zdejmuje domyślny wygląd przycisku,
       zostawiając kafelek wizualnie bez zmian. */
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: inherit;
}

.gallery-item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Element otwierający powiększenie zdjęcia. Był <div onclick> — działał myszą,
   ale nie dało się go dosięgnąć klawiaturą ani rozpoznać czytnikiem (WCAG 2.1.1).
   Reset zdejmuje wygląd przycisku; layout pozostaje sterowany stylem inline. */
.zoom-trigger {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: zoom-in;
}

.zoom-trigger:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.gallery-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoom 0.3s;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-width: 800px;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-nav-prev {
    left: 20px;
}

.lightbox-nav-next {
    right: 20px;
}

.lightbox-caption {
    text-align: center;
    color: white;
    padding: 10px;
    margin-top: 10px;
    font-size: 16px;
}

/* Formularz */
.contact {
    background-color: var(--light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Stopka */
footer {
    background-color: var(--primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr 1.6fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-column h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

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

.footer-column ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #4a5568;
    color: #cbd5e0;
    font-size: 0.9rem;
}

/* CTA Section - Box (used inside content) */
.cta-section {
    margin-top: 3rem;
    text-align: center;
    background: linear-gradient(rgba(51, 51, 51, 0.95), rgba(51, 51, 51, 0.95)) !important;
    padding: 3rem;
    border-radius: 8px;
    color: white !important;
}

.cta-section h3 {
    color: white !important;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #e0e0e0 !important;
}

.cta-section .btn {
    margin-right: 1rem;
}

.cta-section .btn-secondary {
    background-color: white !important;
    color: #333 !important;
}

/* CTA Section - Full width (used as <section>) */
.cta-section-full {
    background: linear-gradient(rgba(51, 51, 51, 0.95), rgba(51, 51, 51, 0.95)) !important;
    color: white !important;
    padding: 4rem 0;
    text-align: center;
}

.cta-section-full h2 {
    color: white !important;
    margin-bottom: 1rem;
}

.cta-section-full p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #e0e0e0 !important;
}

.cta-section-full .btn-white {
    background-color: white !important;
    color: #333 !important;
}

.cta-section-full .btn-accent {
    background-color: var(--accent) !important;
    margin-left: 1rem;
}

/* Image Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.95);
}

.slider-nav-prev {
    left: 10px;
}

.slider-nav-next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    /* 14px zamiast 8px: przy celach 24x24 (niżej) mniejszy odstęp sprawiałby,
       że obszary klikalne sąsiednich kropek zachodzą na siebie. */
    gap: 14px;
    align-items: center;
    z-index: 10;
}

.slider-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

/* WCAG 2.2, 2.5.8 Target Size (Minimum): cel ma mieć co najmniej 24x24 px.
   Kropka zostaje wizualnie mała — powiększamy sam obszar trafienia. */
.slider-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
}

.slider-dot.active {
    background: rgba(255, 255, 255, 0.95);
}

/* Zatrzymanie autoodtwarzania — wymóg WCAG 2.2.2 dla ruchu dłuższego niż 5 s. */
.slider-pauza {
    width: 24px;
    height: 24px;
    margin-left: 6px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: #222;
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-pauza:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* Bez tego nawigacja klawiaturą po sliderze jest niewidoczna. */
.slider-dot:focus-visible,
.slider-nav:focus-visible,
.slider-pauza:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    padding: 1rem 0;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumbs ul li {
    display: flex;
    align-items: center;
}

.breadcrumbs ul li::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--secondary);
}

.breadcrumbs ul li:last-child::after {
    content: '';
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

/* Aktywny link w menu */
nav ul li a.active {
    border-bottom: 2px solid white;
    padding-bottom: 3px;
}

/* Warianty produktów */
.variant-card {
    cursor: pointer;
}

.variant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
}

.product-detail-header {
    margin-bottom: 3rem;
}

/* Naglowek: ponizej 1180px logo + menu nie mieszcza sie obok siebie w jednej linii */
@media (max-width: 1180px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 0 0.75rem;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        justify-content: center;
    }

    nav ul li {
        margin: 0 0.75rem;
    }

    .hero {
        padding: 4rem 0;
    }

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

    .about-content {
        grid-template-columns: 1fr;
    }

    .product-detail-header {
        grid-template-columns: 1fr !important;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 0.5rem;
    }
}

/* ==========================================================================
   Baner zgody na cookies — zadanie LPAGE #002c (20.07.2026)
   Wymóg: „Akceptuję" i „Odrzucam" równorzędne — ten sam rozmiar, kolor
   i waga wizualna. Brak wyróżnienia akceptacji jest CELOWY (zero dark
   patterns) — nie „poprawiać" tego przez podbicie kontrastu jednego z nich.
   ========================================================================== */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-top: 3px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.consent-banner__text {
    flex: 1 1 420px;
    min-width: 0;
}

.consent-banner__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.consent-banner__text p {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--secondary);
}

.consent-banner__link {
    font-size: 0.9rem;
    text-decoration: underline;
}

.consent-banner__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
}

/* Oba przyciski dzielą DOKŁADNIE ten sam zestaw reguł. */
.consent-banner__btn {
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    background-color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    cursor: pointer;
}

.consent-banner__btn:hover {
    opacity: 0.9;
}

.consent-banner__btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .consent-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    .consent-banner__actions {
        flex-direction: column;
    }
    .consent-banner__btn {
        width: 100%;
    }
}