@charset "UTF-8";

/* ==========================================================================
   WLASNY-AGENCJA.CSS
   Override warstwy dla sekcji AGENCJA — Inter (self-hosted) + minimalistyczny
   header w stylu galeryjnym + tile-design typografia GRAFICZNE.
   Ładowane TYLKO na stronach agencji (po wlasny.css i narzedzia.css).
   Reszta serwisu (biuro, main) używa wlasny.css produkcyjnego z Poppinsem.
   ========================================================================== */

/* === Inter Variable (self-hosted) === */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/InterVariable.woff2') format('woff2-variations'),
         url('../fonts/inter/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/InterVariable-Italic.woff2') format('woff2-variations'),
         url('../fonts/inter/InterVariable-Italic.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* Fallback z dopasowanymi metrykami Arial — minimalizuje CLS */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    ascent-override: 90%;
    descent-override: 22.43%;
    line-gap-override: 0%;
    size-adjust: 107.64%;
}

/* === Body — Inter z OpenType features i wygładzaniem === */
body {
    font-feature-settings: 'cv11', 'ss01';
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Sledgehammer override — wymusza Inter na wszystkich elementach
   (z wyjątkiem bootstrap-icons które mają wyższą specificity przez .bi::before) */
body,
body * {
    font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

/* Globalny tracking nagłówków — Inter w dużych rozmiarach lubi lekkie ściśnięcie */
h1 { letter-spacing: -0.02em; }
h2 { letter-spacing: -0.015em; }
h3 { letter-spacing: -0.01em; }
h4 { letter-spacing: -0.005em; }

/* ==========================================================================
   WIDER CONTAINER — agencja pages use 1500px instead of default 1320px
   ========================================================================== */
.container-xl {
    max-width: 1560px;
}

/* ==========================================================================
   OFERTA TILES — mobile: each tile full width (one per row)
   ========================================================================== */
@media (max-width: 991px) {
    .oferta-container > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   OFERTA TILES — wider gaps and container
   ========================================================================== */
#banner-carousel-agencja {
    margin-top: -10px;
}

#oferta > .container {
    max-width: 1500px;
    padding-left: 30px !important;
    padding-right: 30px !important;
}
.oferta-container {
    gap: 44px;
}
.oferta-container > [class*="col-"] {
    flex: 0 0 calc(33.333% - 34px);
    max-width: calc(33.333% - 34px);
}

/* ==========================================================================
   HERO SECTION — Fengo + czarny prostokąt z 3 taglinami
   ========================================================================== */
.hero-section {
    padding-top: 80px;
    padding-bottom: 60px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
}
.hero-brand {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.hero-main {
    margin: 0;
    padding: 0;
    line-height: 0;
}
.hero-logo-img {
    display: block;
    width: clamp(220px, 28vw, 420px);
    height: auto;
}
.hero-sub {
    font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
    font-size: clamp(14px, 1.45vw, 19px);
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1;
    margin: 0;
    padding-top: 20px;
    text-transform: uppercase;
    text-align: justify;
    text-align-last: justify;
    width: 100%;
    letter-spacing: 0;
    transform: translateY(20px);
}
.hero-cloud {
    flex: 1 1 auto;
    margin-left: 30px;
    align-self: stretch;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 0 5px;
    line-height: 0.85;
    font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
    overflow: hidden;
    aspect-ratio: 640 / 180;
    -webkit-mask-image: url("../img/wspolne/mask-design.svg");
            mask-image: url("../img/wspolne/mask-design.svg");
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}
.hero-cloud .cw {
    display: inline-block;
    color: #666;
    font-weight: 500;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.hero-cloud .cw-xs { font-size: clamp(7px, 0.6vw, 9px); }
.hero-cloud .cw-sm { font-size: clamp(8px, 0.72vw, 11px); }
.hero-cloud .cw-md { font-size: clamp(10px, 0.9vw, 13px); }
.hero-cloud .cw-lg { font-size: clamp(12px, 1.15vw, 16px); }
.hero-cloud .cw-xl { font-size: clamp(13px, 1.3vw, 18px); }
.hero-cloud .cw-b  { font-weight: 700; color: #1a1a1a; }
.hero-cloud .cw-p  { color: #1a1a2e; }
.hero-cloud .cw-p1 { color: #1a1a2e; }
.hero-cloud .cw-p2 { color: #2d2d44; }
.hero-cloud .cw-p3 { color: #40405a; }
.hero-cloud .cw-b.cw-p { font-weight: 700; }

.seo-hero-agencja {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(15px, 1.3vw, 19px);
    font-weight: 400;
    color: #555;
    margin-top: 8px;
    line-height: 1.3;
    text-align: center;
}

@media (max-width: 767.98px) {
    .hero-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding-top: 60px;
        padding-bottom: 50px;
    }
    .hero-cloud {
        margin-left: 0;
        align-self: flex-start;
    }
    .seo-hero-agencja {
        font-size: 14px;
    }
}

/* ==========================================================================
   TILE DESIGN — typografia GRAFICZNE (kafelek "Projektowanie graficzne")
   ========================================================================== */
.tile-design {
    background: linear-gradient(to bottom, #cbcbcb 0%, #ffffff 100%) !important;
    container-type: inline-size;
    position: relative;
    overflow: hidden;
}

/* Drzewo — warstwa nad gradientem, pod tekstem */
.tile-design::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/agencja/tree.webp') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
    transition: opacity 200ms ease;
}

/* Tekst musi być nad drzewem (position: absolute zachowane z głównej reguły) */
.tile-design .tile-design-text {
    z-index: 2;
    transition: opacity 200ms ease;
}

/* Hover — chowamy drzewo i typografię, żeby pokazać video pod spodem */
.tile-design:hover::after {
    opacity: 0;
}
.tile-design:hover .tile-design-text {
    opacity: 0;
}
/* Gradient przezroczysty na hover — video widoczne */
.tile-design:hover {
    background: transparent !important;
}

/* Ukrywamy img w tile-design tak, żeby gradient był widoczny.
   display:none jest bezpieczne bo .video-container ma aspect-ratio (gwarantowana wysokość). */
.tile-design .image-container img,
.tile-design .image-element,
.tile-design img.oferta-zdjecia-img {
    display: none !important;
}

.tile-design-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.tile-design-top {
    font-weight: 700;
    font-size: 5.5cqi;
    color: #1a1a1a;
    line-height: 1;
    display: block;
    padding: 0;
    margin: 0;
    text-align: left;
}

.tile-design-bottom {
    font-weight: 400;
    font-size: 18.4cqi;
    line-height: 0.82;
    letter-spacing: 0.009em;
    color: #1a1a1a;
    display: block;
    width: 100%;
    text-align: center;
    margin-left: -3px;
    transform: translateY(1px);
}

.tile-design-bar {
    display: block;
    background: #1a1a1a;
    border-radius: 0 0 9px 9px;
    padding: 0;
    overflow: hidden;
    font-size: 2.27cqi;
    line-height: 1.15;
    height: calc(1.15em * 6);
    transform: none;
}

.tile-design-bar-inner {
    display: block;
    color: #fff;
    font-weight: 400;
    word-spacing: 0.15em;
    text-align: justify;
    margin: -0.35em -0.55em 0 -0.55em;
}

/* ==========================================================================
   AGENCJA TILE OVERLAY — pastelowe placeholder backgrounds widoczne
   Produkcja ma rgba(255,255,255,0.96) overlay zakrywający webp images.
   Tutaj usuwamy biały overlay żeby pokazać inline SVG colors w kaflach.
   Plus delikatna ramka i zaokrąglenie 10px (zamiast 20px).
   aspect-ratio gwarantuje wysokość kafla niezależnie od inline SVG image.
   ========================================================================== */
#klienci .container-xl {
    border-radius: 8px !important;
}
.video-container {
    aspect-ratio: 8 / 5;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 10px !important;
}
.sec-video-container {
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 10px !important;
}
/* Wrap (Oklejanie pojazdów) — jedyny sec-video-container z aspect-ratio, bo ma inline SVG placeholder */
.sec-video-container:not(:has(.sec-centered-button)) {
    aspect-ratio: 8 / 5;
}
.video-container.rounded-3,
.sec-video-container.rounded-3 {
    border-radius: 10px !important;
}

/* video-container — usuwamy biały overlay z produkcji */
.video-container .overlay-container {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
}
.video-container .overlay {
    background-color: transparent !important;
    border-radius: 0 !important;
}
.video-container .oferta-zdjecia-img {
    border-radius: 0 !important;
}
.video-container video {
    border-radius: 0 !important;
}

/* sec-video-container (wrap tile - Oklejanie pojazdów) — to samo */
.sec-video-container .sec-overlay-container {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
}
.sec-video-container .sec-overlay {
    background-color: transparent !important;
    border-radius: 0 !important;
}
.sec-video-container .sec-oferta-zdjecia-img {
    border-radius: 0 !important;
}
.sec-video-container video {
    border-radius: 0 !important;
}

/* Logo Fengo Agency overlay w prawym górnym rogu każdego kafla */
.video-container::before,
.sec-video-container:not(:has(.sec-centered-button))::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 16px;
    width: 160px;
    height: 65px;
    background: url('../img/agencja/logo_fengo_agency_min_v2_white.svg') no-repeat right center/contain;
    z-index: 3;
    opacity: 0.7;
    pointer-events: none;
}

/* Tile-design (Projektowanie graficzne) — logo overlay się chowa, tylko gradient + typografia */
.tile-design::before {
    display: none !important;
}


/* ==========================================================================
   TILE-SMALLFORMAT — Mały format (mirror of tile-design)
   ========================================================================== */
/* ==========================================================================
   TILE-LARGEFORMAT — Druk wielkoformatowy (same layout as tile-design, no tree)
   ========================================================================== */
.tile-largeformat {
    background: linear-gradient(to bottom, #cbcbcb 0%, #ffffff 100%) !important;
    container-type: inline-size;
    position: relative;
}
.tile-largeformat .image-container img,
.tile-largeformat .image-element,
.tile-largeformat img.oferta-zdjecia-img {
    display: none !important;
}
.tile-largeformat:hover {
    background: transparent !important;
}
.tile-largeformat:hover .tile-design-text {
    opacity: 0;
    transition: opacity 200ms ease;
}
.tile-largeformat::before {
    display: none !important;
}

.tile-largeformat::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/agencja/elephant.webp') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
    transition: opacity 200ms ease;
}

.tile-largeformat:hover::after {
    opacity: 0;
}

.tile-largeformat .tile-design-text {
    z-index: 2;
}
.tile-largeformat .tile-design-bar {
    z-index: 2;
}
.tile-largeformat .tile-design-text {
    bottom: 0;
    top: 0;
}
.tile-largeformat .tile-design-top {
    position: absolute;
    top: calc(4% + 50px);
    left: calc(4% - 7px);
    right: auto;
    font-size: 8cqi;
    line-height: 1;
    text-align: left;
    padding-left: 0;
}
.tile-largeformat .tile-design-bottom {
    position: absolute;
    left: calc(4% - 7px);
    right: auto;
    top: calc(4% + 50px + 8cqi + 5px);
    bottom: auto;
    font-size: 8cqi;
    line-height: 0.82;
    text-align: left;
    margin-left: 0;
    transform: none;
    width: auto;
}
.tile-largeformat .tile-design-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* ==========================================================================
   TILE-SMALLFORMAT — Mały format (vertical bar + hands)
   ========================================================================== */
.tile-smallformat {
    background: linear-gradient(to right, #cbcbcb 0%, #ffffff 100%) !important;
    container-type: inline-size;
    position: relative;
}
.tile-smallformat .image-container img,
.tile-smallformat .image-element,
.tile-smallformat img.oferta-zdjecia-img {
    display: none !important;
}
.tile-smallformat:hover {
    background: transparent !important;
}
.tile-smallformat:hover .tile-smallformat-text {
    opacity: 0;
    transition: opacity 200ms ease;
}
.tile-smallformat:hover .image-container::after {
    opacity: 0;
    transition: opacity 200ms ease;
}

.tile-smallformat-text {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 2;
    transition: opacity 200ms ease;
}

.tile-smallformat-bar {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 2.27cqi;
    line-height: 1.15;
    width: calc(1.15em * 6);
    height: 100%;
    background: #1a1a1a;
    border-radius: 0 9px 9px 0;
    overflow: hidden;
    z-index: 3;
}

.tile-smallformat-bar-inner {
    color: #fff;
    font-weight: 400;
    word-spacing: 0.15em;
    text-align: justify;
    position: absolute;
    top: 0;
    left: 0;
    width: 62.5cqi;
    height: calc(1.15em * 6);
    margin: -0.55em -0.55em -0.55em -0.55em;
    transform-origin: top left;
    transform: rotate(90deg) translateY(-150%) translateX(5px);
}

.tile-smallformat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 10px;
    padding-top: 10px;
}

.tile-smallformat-top {
    font-weight: 700;
    font-size: 8cqi;
    color: #1a1a1a;
    line-height: 1;
    display: block;
    text-align: left;
}

.tile-smallformat-content {
    font-size: 12.6cqi;
}

.tile-smallformat-bottom {
    font-weight: 400;
    font-size: 1em;
    line-height: 0.82;
    letter-spacing: 0.009em;
    color: #1a1a1a;
    display: block;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    position: absolute;
    bottom: 10px;
    left: 30px;
}

.tile-smallformat::before {
    display: none !important;
}

.tile-smallformat::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: url('../img/agencja/hands.webp') no-repeat center bottom;
    background-size: 60%;
    pointer-events: none;
    z-index: 1;
}

/* Globalna ochrona przed długimi wyrazami w różnych językach */
.tile-design .tile-design-bottom,
.tile-smallformat .tile-smallformat-bottom,
.tile-smallformat .tile-smallformat-top {
    overflow: hidden;
    text-overflow: clip;
}

/* Auto-shrink dla długich słów w tile-design (GRAFICZNE/DESIGN/DESIGN/DESIGN/ДИЗАЙН) */
.tile-design .tile-design-bottom {
    white-space: nowrap;
    font-size: clamp(0px, 18.4cqi, 14cqb);
}

/* Oklejanie pojazdów — gradient + wood (zamiast drzewa) */
.tile-wrap::after {
    background: url('../img/agencja/wood.webp') no-repeat calc(50% + 7px) center !important;
    background-size: contain !important;
}
.tile-wrap.sec-video-container {
    background: linear-gradient(to bottom, #cbcbcb 0%, #ffffff 100%) !important;
}
.tile-wrap .sec-image-container img,
.tile-wrap .sec-image-element {
    display: none !important;
}
.tile-wrap .tile-design-text,
.tile-wrap .tile-design-bar {
    z-index: 2;
}
.tile-wrap .tile-design-top {
    transform: translateY(-80px) translateX(-4px);
    text-align: center;
    width: 100%;
    padding: 0;
    font-size: 9.44cqi;
}
.tile-wrap .tile-design-bottom {
    font-size: 14.7cqi;
    transform: translateY(-70px);
    overflow: hidden;
    padding-top: 0.18em;
}
.tile-wrap:hover {
    background: transparent !important;
}
.tile-wrap:hover::after {
    opacity: 0;
}
.tile-wrap:hover .tile-design-text {
    opacity: 0;
    transition: opacity 200ms ease;
}

/* Portfolio/Wyceny/Sklep — zmniejszenie wysokości o 15px + prostsze hover */
.sec-video-container:has(.sec-centered-button) .sec-image-container,
.sec-video-container:has(.sec-centered-button) .sec-oferta-zdjecia-img {
    height: 90px !important;
    object-fit: cover;
}
.sec-video-container:has(.sec-centered-button) .sec-text-theme2 {
    font-size: 1.4rem !important;
}

/* SEO section — więcej przestrzeni nad i pod + collapsible details */
#seo-agencja-content.seo-content-section {
    padding: 120px 0 80px;
}
#seo-agencja-content .col-lg-10 {
    flex: 0 0 100%;
    max-width: 100%;
}
#seo-agencja-content > .container {
    max-width: 1560px;
}
.seo-details {
    border: 0;
}
.seo-details-summary {
    list-style: none;
    cursor: pointer;
    display: block;
    padding: 0;
    user-select: none;
    outline: none;
}
.seo-details-summary:focus,
.seo-details-summary:focus-visible,
.seo-details:focus,
.seo-details:focus-visible {
    outline: none;
}
.seo-details-summary::-webkit-details-marker {
    display: none;
}
.seo-details-summary h2 {
    margin: 0;
    text-align: left;
    color: #fff !important;
    font-size: clamp(32px, 3.4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.1;
}
.seo-details-headbox {
    --cta-size: clamp(280px, 32vw, 420px);
    background: #4a4a4d;
    border-radius: 10px;
    padding: 70px 40px 50px 40px;
    color: #fff;
    text-align: left;
    width: 100%;
    min-height: var(--cta-size);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: nowrap;
    box-sizing: border-box;
}
.seo-details-headbox > div,
.seo-details-headbox > .seo-details-text {
    flex: 1;
    min-width: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 1127px;
}
.seo-details-subtitle {
    margin: 12px 0 0 0;
    font-size: clamp(18px, 1.4vw, 22px);
    color: #a0a0a8;
    opacity: 1;
    font-weight: 500;
    line-height: 1.1;
    text-align: left;
    max-width: 1012px;
}
.seo-details-headbox {
    overflow: hidden;
}
.seo-details-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: var(--cta-size);
    height: var(--cta-size);
    margin: -70px -40px -40px 0;
    padding: 0 24px;
    background: #2d2d44;
    color: #fff;
    border-radius: 0;
    font-size: 18px;
    font-weight: 500;
    transition: background 200ms ease;
    flex: 0 0 auto;
}
.seo-details-cta::after {
    content: '▾';
    font-size: 10px;
    transition: transform 200ms ease;
}
.seo-details[open] .seo-details-cta::after {
    transform: rotate(180deg);
}
.seo-details[open] .seo-details-cta {
    background: #40405a;
}
.seo-details-summary:hover .seo-details-cta {
    background: #40405a;
}
.seo-details[open] .seo-content-grid {
    animation: seoFadeIn 300ms ease;
    padding-top: 24px;
}
.seo-details-headbox {
    transition: min-height 300ms ease, padding 300ms ease;
}
.seo-details[open] .seo-details-headbox {
    --cta-size: 100px;
    height: 100px;
    min-height: 100px;
    padding: 20px 40px;
    align-items: center;
}
.seo-details[open] .seo-details-headbox > div,
.seo-details[open] .seo-details-headbox > .seo-details-text {
    justify-content: center;
    align-items: flex-start;
}
.seo-details[open] .seo-details-cta {
    margin: -20px -40px -20px 0;
}
.seo-details[open] .seo-details-summary h2 {
    font-size: clamp(20px, 2vw, 28px);
}
.seo-details[open] .seo-details-subtitle {
    display: none;
}
.seo-details:not([open]) .pipe-collapsed-hide {
    display: none;
}
.seo-details[open] .br-collapsed-only {
    display: none;
}
@keyframes seoFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Portfolio/Wyceny/Sklep — kolory jak w main.php tc-thumb */
.oferta-container > .col-12:nth-child(1) .sec-video-container:has(.sec-centered-button) {
    background-color: #1a1a2e !important;
}
.oferta-container > .col-12:nth-child(2) .sec-video-container:has(.sec-centered-button) {
    background-color: #2d2d44 !important;
}
.oferta-container > .col-12:nth-child(3) .sec-video-container:has(.sec-centered-button) {
    background-color: #40405a !important;
}
.oferta-container > .col-12 .sec-video-container:has(.sec-centered-button) .sec-oferta-zdjecia-img {
    opacity: 0 !important;
}

/* Sekcja klienci2 (newsletter) — tło z main.php po desaturacji */
#klienci2 {
    margin-top: 100px;
}
#klienci2 .container-xl::before {
    background: #1a1a2e url('../img/biuro/tlo.webp') center center / cover no-repeat fixed;
    filter: blur(16px) grayscale(100%);
}
#klienci2 .container-xl {
    min-height: 12rem;
    padding: 20px 20px;
}
/* Sekcja klienci (legacy) — gaussowskie rozmycie tła */
#klienci .container-xl {
    position: relative;
    overflow: hidden;
}
#klienci .container-xl::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(12px);
    z-index: 0;
}
#klienci .container-xl > * {
    position: relative;
    z-index: 1;
}

/* Wyłącz zamianę tła na hover (liście) — tylko delikatne przyciemnienie */
.sec-video-container:has(.sec-centered-button) .sec-hover-image {
    display: none !important;
}
.sec-video-container:has(.sec-centered-button) {
    transition: filter 200ms ease;
}
.sec-video-container:has(.sec-centered-button):hover {
    filter: brightness(0.88);
}
.sec-video-container:has(.sec-centered-button):hover .sec-oferta-zdjecia-img,
.sec-video-container:has(.sec-centered-button):hover .sec-logo-overlay,
.sec-video-container:has(.sec-centered-button):hover .sec-offer-content {
    opacity: 1 !important;
}

/* Technika laserowa — układ tekstu jak druk na odzieży */
/* Laser — layout jak Mały format (parent font-size + pixel positioning) */
.tile-laser .tile-smallformat-content {
    font-size: 10cqi;
}
.tile-laser .tile-smallformat-top {
    position: absolute;
    left: 20px;
    bottom: 20px;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-size: 0.33em;
    font-weight: 600;
    line-height: 0.82;
    padding: 0;
    margin: 0;
    z-index: 2;
}
.tile-laser .tile-smallformat-top .tst-word1 {
    font-size: 1.76em;
    font-weight: 800;
}
.tile-laser .tile-smallformat-top .tst-word2 {
    font-size: 1.35em;
    vertical-align: baseline;
    display: inline-block;
    transform: translateX(-3px);
}
.tile-laser .tile-smallformat-bottom {
    font-weight: 400;
    font-size: 1em;
    line-height: 1.2;
    letter-spacing: 0.009em;
    color: #1a1a1a;
    display: block;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    position: absolute;
    bottom: 18px;
    left: 45px;
}

/* Długie słowa w innych językach — per-język mniejszy font */
:lang(en) .tile-laser .tile-smallformat-bottom,
:lang(ua) .tile-laser .tile-smallformat-bottom {
    font-size: 0.8em;
    bottom: 20px;
}
:lang(de) .tile-apparel .tile-smallformat-bottom {
    font-size: 0.88em;
}
/* Cyrylica — glify szersze/wyższe, mniejszy font dla Mały FORMAT */
:lang(ua) .tile-smallformat:not(.tile-apparel):not(.tile-laser) .tile-smallformat-bottom {
    font-size: 0.88em;
    bottom: 24px;
}
:lang(ua) .tile-smallformat:not(.tile-apparel):not(.tile-laser) .tile-smallformat-top {
    margin-left: 19px;
}
/* UA — "Графічний" krótszy niż "Projektowanie", przesuwamy w prawo */
:lang(ua) .tile-design:not(.tile-wrap):not(.tile-largeformat) .tile-design-top {
    padding-left: 65px;
}
/* DE — "Grafik" krótszy, przesuwamy w prawo */
:lang(de) .tile-design:not(.tile-wrap):not(.tile-largeformat) .tile-design-top {
    padding-left: 80px;
}
/* CZ — "Grafický" krótszy, przesuwamy w prawo */
:lang(cs) .tile-design:not(.tile-wrap):not(.tile-largeformat) .tile-design-top {
    padding-left: 78px;
}
/* EN — "Graphic" krótszy, przesuwamy w prawo */
:lang(en) .tile-design:not(.tile-wrap):not(.tile-largeformat) .tile-design-top {
    padding-left: 77px;
}
/* UA — "Обклеювання" przesuwamy w lewo */
:lang(ua) .tile-wrap .tile-design-top {
    transform: translateY(-80px) translateX(-34px);
}
/* DE — "Fahrzeug" przesuwamy w lewo */
:lang(de) .tile-wrap .tile-design-top {
    transform: translateY(-80px) translateX(-5px);
}
/* EN — "Vehicle" przesuwamy w lewo */
:lang(en) .tile-wrap .tile-design-top {
    transform: translateY(-80px) translateX(-5px);
}
/* CZ — "Polepování" przesuwamy w lewo + ściśnij, "VOZIDEL" rozszerz */
:lang(cs) .tile-wrap .tile-design-top {
    transform: translateY(-80px) translateX(-6px);
    letter-spacing: -0.03em;
}
:lang(cs) .tile-wrap .tile-design-bottom {
    letter-spacing: 0.05em;
}

/* Technika laserowa — zamiast rąk pokaż thunder */
.tile-laser::after {
    background: url('../img/agencja/thunder.webp') no-repeat center center !important;
    background-size: contain !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    transition: opacity 200ms ease;
}
.tile-laser:hover::after {
    opacity: 0;
}
.tile-laser .image-container::after {
    display: none !important;
}

/* Druk na odzieży — zamiast rąk pokaż bawełnę */
.tile-apparel::after {
    background: url('../img/agencja/bawelna.webp') no-repeat center center !important;
    background-size: contain !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    transition: opacity 200ms ease;
}
.tile-apparel:hover::after {
    opacity: 0;
}
.tile-apparel .image-container::after {
    display: none !important;
}
/* Apparel — layout jak Mały format (parent font-size + pixel positioning) */
.tile-apparel .tile-smallformat-content {
    font-size: 12cqi;
}
.tile-apparel .tile-smallformat-top {
    position: absolute;
    left: 20px;
    bottom: 20px;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-size: 0.33em;
    font-weight: 600;
    line-height: 0.82;
    padding: 0;
    margin: 0;
    z-index: 2;
}
.tile-apparel .tile-smallformat-top .tst-word1 {
    font-size: 1.76em;
    font-weight: 800;
}
.tile-apparel .tile-smallformat-top .tst-word2 {
    font-size: 1.35em;
    vertical-align: baseline;
    display: inline-block;
    transform: translateX(-3px);
}
.tile-apparel .tile-smallformat-bottom {
    font-weight: 400;
    font-size: 1em;
    line-height: 1.2;
    letter-spacing: 0.009em;
    color: #1a1a1a;
    display: block;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    position: absolute;
    bottom: 10px;
    left: 50px;
}

.tile-smallformat .image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: url('../img/agencja/hand.webp') no-repeat center top;
    background-size: 30%;
    pointer-events: none;
    z-index: 1;
}

/* =========================================================
   HEADER — galeryjna nawigacja (Pentagram / MoMA / Cooper Hewitt style)
   wersaliki, tracking 0.12em, font-size 12px, brak ramek/teł
   logo po lewej, menu po prawej, jeden cienki pas
   fiolet Fengo #40405a jako jedyny akcent koloru
   ========================================================= */

/* === Main header (logo + nav) === */
.header-main {
    background: #fff;
    padding: 0;
}
.header-main-container {
    position: relative;
}
.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 100px;
}
.header-logo {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}
.header-logo img {
    display: block;
    width: 150px;
    height: auto;
}

/* === Desktop nav (>= 992px) === */
@media (min-width: 992px) {
    .header-toggler { display: none; }

    .header-nav {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
    }
    .header-nav-list {
        display: flex;
        align-items: center;
        gap: 30px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .header-nav-lang { margin-left: 6px; }
    .header-dropdown-lang { min-width: 160px; }

    .header-nav-item {
        position: relative;
    }
    .header-mobile-lang-row { display: none; }

    .header-nav-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #1a1a1a;
        text-decoration: none;
        padding: 8px 0 6px;
        cursor: pointer;
        background: transparent;
        border: 0;
        border-bottom: 1px solid transparent;
        position: relative;
        transition: color 200ms ease, border-color 200ms ease;
    }
    .header-nav-link:hover,
    .header-nav-link:focus-visible {
        color: #40405a;
        outline: 0;
    }
    /* Active state — cienkie podkreślenie 1px w fiolecie Fengo */
    .header-nav-link.is-active {
        border-bottom-color: #40405a;
    }
    /* Chevron dla dropdown — minimalny SVG */
    .header-nav-link.has-dropdown::after {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        margin-left: -2px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%231a1a1a' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        transition: opacity 200ms ease;
    }
    .header-nav-link.has-dropdown:hover::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%2340405a' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    }

    /* Dropdown panel — biała ramka z cienkim cieniem, fade-in */
    .header-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%) translateY(-4px);
        background: #ffffff;
        border: 1px solid #eee;
        box-shadow: 0 4px 24px rgba(0,0,0,0.06);
        padding: 16px 0;
        min-width: 220px;
        list-style: none;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
        z-index: 1040;
    }
    .header-nav-item:hover .header-dropdown,
    .header-nav-item:focus-within .header-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    /* Pozycje wewnątrz dropdownu — normalna typografia, NIE wersaliki */
    .header-dropdown a {
        display: block;
        padding: 7px 24px;
        font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
        font-size: 14px;
        font-weight: 400;
        color: #333;
        text-decoration: none;
        text-transform: none;
        letter-spacing: 0;
        white-space: nowrap;
        transition: color 200ms ease;
    }
    .header-dropdown a:hover {
        color: #40405a;
    }
    .header-dropdown a.is-accent {
        color: #40405a;
    }
    /* Aktywny język w dropdownie języków — cienkie podkreślenie fioletem */
    .header-dropdown-lang a.is-active-lang {
        color: #40405a;
        text-decoration: underline;
        text-decoration-color: #40405a;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;
    }
}

/* === Mobile (< 992px): hamburger + fullscreen overlay === */
@media (max-width: 991.98px) {
    .header-main {
        padding: 0;
    }
    .header-main-inner {
        gap: 16px;
        min-height: 72px;
    }
    .header-logo img {
        width: 92px;
    }

    .header-toggler {
        background: transparent;
        border: 0;
        padding: 8px;
        cursor: pointer;
        color: #1a1a1a;
        z-index: 1100;
        position: relative;
    }
    .header-toggler-icon {
        display: block;
        width: 22px;
        height: 18px;
        position: relative;
    }
    .header-toggler-icon::before,
    .header-toggler-icon::after,
    .header-toggler-icon span {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 1.5px;
        background: #1a1a1a;
        transition: transform 250ms ease, opacity 200ms ease, top 250ms ease;
    }
    .header-toggler-icon::before { top: 0; }
    .header-toggler-icon span    { top: 50%; transform: translateY(-50%); display: block; }
    .header-toggler-icon::after  { top: calc(100% - 1.5px); }

    .header-toggler.is-open .header-toggler-icon::before { top: 50%; transform: translateY(-50%) rotate(45deg); }
    .header-toggler.is-open .header-toggler-icon::after  { top: 50%; transform: translateY(-50%) rotate(-45deg); }
    .header-toggler.is-open .header-toggler-icon span    { opacity: 0; }

    .header-nav {
        position: fixed;
        inset: 0;
        background: #ffffff;
        z-index: 1099;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        overflow-y: auto;
        padding: 88px 24px 48px;
        transition: opacity 200ms ease, visibility 200ms;
    }
    .header-nav.is-open {
        opacity: 1;
        visibility: visible;
    }
    .header-nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 26px;
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: center;
        width: 100%;
        max-width: 480px;
    }
    .header-nav-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .header-nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
        font-size: 18px;
        font-weight: 500;
        line-height: 1.15;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #1a1a1a;
        text-decoration: none;
        background: transparent;
        border: 0;
        cursor: pointer;
        padding: 0;
    }
    .header-nav-link.is-active {
        color: #40405a;
    }
    .header-nav-link.has-dropdown::after {
        content: '';
        display: inline-block;
        width: 11px;
        height: 11px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%231a1a1a' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        transition: transform 200ms ease;
    }
    .header-nav-item.is-open .header-nav-link.has-dropdown::after {
        transform: rotate(180deg);
    }
    .header-dropdown {
        list-style: none;
        padding: 14px 0 6px;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 280ms ease;
        text-align: center;
    }
    .header-nav-item.is-open .header-dropdown {
        max-height: 600px;
    }
    .header-dropdown a {
        display: block;
        padding: 7px 0;
        font-family: 'Inter', 'Inter Fallback', sans-serif;
        font-size: 14px;
        font-weight: 400;
        color: #666;
        text-decoration: none;
        text-transform: none;
        letter-spacing: 0;
    }
    .header-dropdown a.is-accent {
        color: #40405a;
    }
    .header-dropdown-lang a.is-active-lang {
        color: #40405a;
        font-weight: 500;
    }

    /* Ukryj desktop language item (chevron PL) na mobile — używamy poziomego paska na dole */
    .header-nav-lang { display: none; }

    /* Poziomy pasek języków na dole overlay */
    .header-mobile-lang-row {
        margin-top: 18px;
        padding-top: 24px;
        border-top: 1px solid #eee;
        width: 100%;
        max-width: 320px;
        display: flex;
        justify-content: center;
    }
    .header-mobile-lang {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-family: 'Inter', 'Inter Fallback', sans-serif;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }
    .header-mobile-lang a {
        color: #1a1a1a;
        text-decoration: none;
        transition: color 200ms ease;
    }
    .header-mobile-lang a.is-active {
        color: #40405a;
    }
    .header-mobile-lang a:hover {
        color: #40405a;
    }
    .header-mobile-lang .sep {
        color: #ccc;
    }

    /* Body scroll lock when overlay open */
    body.has-nav-open {
        overflow: hidden;
    }
}

/* Blog section — tło o połowie ciemności sekcji SEO (#4a4a4d → #a4a4a6),
   pasek na szerokość kontenera SEO, tytuł pionowo z lewej */
#blog-section {
    background: transparent;
    padding: 0;
    margin-top: 50px !important;
}
#blog-section .blog-section-container {
    max-width: 1560px;
}
#blog-section .section-blog {
    background: #cdcdd4;
    border-radius: 10px;
    padding: 50px;
    position: relative;
}
#blog-section .blog-side-title {
    position: absolute;
    left: -139px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    margin: 0;
    color: #000;
    font-weight: 700;
    font-size: clamp(30px, 2.71vw, 42px);
    letter-spacing: -0.01em;
    white-space: nowrap;
}
#blog-section .blog-posts-container-index {
    transform: translateX(10px);
}

/* Stonowane kolory blogu pod layout agencji (#1a1a2e/#2d2d44/#40405a) */
#blog-section .blog-post-index {
    border-color: #d0d0d4;
    box-shadow: 0 2px 12px 0 rgba(26, 26, 46, 0.08);
}
#blog-section .blog-post-index h5,
#blog-section .blog-post-title {
    color: #1a1a2e;
}
#blog-section .blog-excerpt {
    color: #3a3a4a;
}
#blog-section .blog-excerpt::after {
    background: linear-gradient(to bottom, transparent, #fff 90%);
}
#blog-section .blog-post-tags {
    color: #6a6a7a;
}
#blog-section .date-overlay {
    background-color: #2d2d44;
}
#blog-section .date-overlay::after {
    border-top-color: #1a1a2e;
}
#blog-section .new-overlay {
    background-color: #40405a;
}
#blog-section .new-overlay::after {
    border-top-color: #2d2d44;
}
#blog-section .section-blog .blog-image-wrapper::after {
    display: none;
}
#blog-section .section-blog .blog-post-image,
#blog-section .blog-post-image {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}
#blog-section .section-blog .blog-image-wrapper:hover .blog-post-image,
#blog-section .blog-image-wrapper:hover .blog-post-image {
    filter: grayscale(0%);
}
#blog-section a.blog-post-index {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#blog-section a.blog-post-index:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px 0 rgba(26, 26, 46, 0.15);
    text-decoration: none;
}
#blog-section a.blog-post-index .blog-excerpt::after {
    background: linear-gradient(to bottom, transparent, #fff 90%);
}
#blog-section h5.blog-post-title {
    font-size: clamp(22px, 1.75vw, 28px);
    margin: 0 !important;
    padding: 0;
    line-height: 1.2;
}
#blog-section .blog-image-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0;
}
#blog-section .blog-excerpt {
    margin-top: 4px !important;
    margin-bottom: 0;
    padding-top: 0;
}

/* Zakładki gier — prostokątne zamiast pigułek */
#strefa-relaksu .relax-tab {
    border-radius: 0;
}
#strefa-relaksu .relax-tab.active {
    background: #cdcdd4;
    color: #1a1a2e;
    border-color: #cdcdd4;
}

/* Nagłówek "Strefa relaksu" i zakładki w tej samej ramce co gry */
#strefa-relaksu .relax-header-frame {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid #40405a;
    border-radius: 10px;
    background: #40405a;
    padding: 18px 30px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
#strefa-relaksu .memo-title {
    margin: 0;
    text-align: left;
    white-space: nowrap;
    color: #fff;
    font-size: 1.725rem;
    font-weight: 800;
}
#strefa-relaksu .relax-tabs {
    justify-content: flex-end;
    margin-bottom: 0;
    margin-left: auto;
}
#strefa-relaksu .relax-game-container {
    border-radius: 10px;
}
#klienci2 .container-xl {
    border-radius: 10px;
}
#klienci2 .container-xl::before {
    border-radius: 10px;
}
#blog-section .placeholder-image {
    background-color: #ececef;
    color: #6a6a7a;
}
#blog-section .blog-post-index {
    background: #fff;
}
