:root {
    --primary: #000000;
    --accent: #B8905A;
    --surface: #FAFAFA;
    --surface-light: #E8E8E8;
    --border: #E8E8E8;
    --text-secondary: #6B6B6B;
    --text-body: #3a3a3a;
    --gap: clamp(12px, 1.2vw, 20px);
    --max-text: 680px;
    --max-wide: 1200px;
    --max-full: 1400px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background: white;
    color: var(--primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1400px; margin: 0 auto; }

@keyframes gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heroEntrance {
    from { opacity: 0; transform: scale(1.05); filter: blur(10px); }
    to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50%       { transform: rotate(45deg) translateY(5px); }
}

@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes appear { from { fill: transparent; stroke-opacity: 1; } to { fill: rgb(164,134,98); stroke-opacity: 0.4; } }


/* ─── HERO ─── */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(70deg, #B48E65 0%, #000000 50%);
    background-size: 150% 150%;
    animation: gradient 25s ease infinite;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 1200px;
    padding: 2rem;
    animation: heroEntrance 1.8s ease-out forwards;
}

.logo-hero {
    margin: 0 auto;
    max-width: 15vh;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
}

h1 {
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.hero-content h1 {
    color: white;
}

.cta-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    border-color: var(--accent);
    color: #fff;
    background-color: var(--accent);
}

.min-btn {
    display: inline-block;
    background: transparent;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    border: none;
    outline: none;
    text-decoration: none;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

       stroke-opacity: 0.4; }
  }

/* podpis start */

.sig-svg {
    display: block;
    width: 200px; /* Rozmiar docelowy */
    margin: 0 auto;
    max-width: 160px; /* Mniejszy na bardzo małych ekranach */
    filter: drop-shadow(0 2px 8px rgba(164,134,98,0.15));
    height: auto;
}

.sig-svg path {
    fill: transparent;
    stroke: rgb(164, 134, 98);
    stroke-width: 1.5; /* Nieco grubszy, bo SVG jest mniejsze */
    opacity: 0; /* Ukryty na start */
    transition: opacity 0.2s ease;
}

/* Wyzwalacz animacji */
.sig-svg.start-animation path {
    opacity: 1;
    stroke-dasharray: var(--len);
    stroke-dashoffset: var(--len);
    animation: 
        draw var(--dur, 0.5s) var(--delay, 0s) cubic-bezier(0.3, 0, 0.3, 1) forwards,
        appear 0.4s calc(var(--delay, 0s) + var(--dur, 0.5s) * 0.8) ease forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { 
    from { fill: transparent; stroke-opacity: 1; } 
    to   { fill: rgb(164, 134, 98); stroke-opacity: 0.6; } 
}

/* Skrócone delaye - teraz całość zamknie się w ~2.5s zamiast 8s */
  .p0 { --delay: 0s; --dur: 0.88s; }
  .p1 { --delay: 0.48s; --dur: 0.86s; }
  .p2 { --delay: 0.96s; --dur: 0.8s; }
  .p3 { --delay: 1.4s; --dur: 0.81s; }
  .p4 { --delay: 1.84s; --dur: 0.97s; }
  .p5 { --delay: 2.37s; --dur: 1.02s; }
  .p6 { --delay: 2.93s; --dur: 0.86s; }
  .p7 { --delay: 3.41s; --dur: 0.81s; }
  .p8 { --delay: 3.86s; --dur: 0.93s; }
  .p9 { --delay: 4.37s; --dur: 0.88s; }
  .p10 { --delay: 4.85s; --dur: 1.07s; }
  .p11 { --delay: 5.44s; --dur: 0.87s; }
  .p12 { --delay: 5.92s; --dur: 0.8s; }
  .p13 { --delay: 6.36s; --dur: 0.96s; }
  .p14 { --delay: 6.89s; --dur: 0.86s; }
  .p15 { --delay: 7.36s; --dur: 0.92s; }
  .p16 { --delay: 7.87s; --dur: 1.01s; }
  .p17 { --delay: 8.42s; --dur: 0.97s; }

/* end podpis */


/* ─── SHARED ─── */

.section-label {
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    margin-bottom: 4rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
}


/* ─── SERVICES ─── */

.services {
    padding: clamp(6rem, 12vw, 10rem) 2rem;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.service-card {
    padding: 3rem 2.5rem;
    background: white;
    border-top: 2px solid transparent;
    transition: all 0.3s ease;
}

.service-card:hover {
    background: var(--surface);
    border-top: 2px solid var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.service-number { font-size: 0.875rem; color: var(--accent); font-weight: 600; margin-bottom: 1.5rem; }
.service-title  { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.service-desc   { color: var(--text-secondary); font-size: 0.95rem; }


/* ─── VIDEO HERO ─── */

.video-hero-section {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.99) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 2;
}

.video-content { position: relative; z-index: 3; padding: 0 20px; max-width: 800px; }
.video-title   { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.2; color: white; }
.video-subtitle { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }

.video-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-btn:hover { transform: translateY(-3px); background-color: #a37d4a; }


/* ─── TIMELINE ─── */

.timeline-section { height: 500vh; position: relative; background: var(--surface-light); }
.timeline-sticky  { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; }

.timeline-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.8s ease;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    width: 100%;
}

.timeline-stage.active { opacity: 1; }

.timeline-stage-number {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 800;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
}

.timeline-stage-period {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 600;
    margin: 2rem 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.timeline-stage-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-stage.active .timeline-stage-title { opacity: 1; transform: translateY(0); }

.timeline-stage-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s ease 0.3s;
}

.timeline-stage.active .timeline-stage-desc { opacity: 1; transform: translateY(0); }

.progress-indicator {
    position: fixed;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}

.progress-dot.active { background: var(--accent); transform: scale(1.5); }

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 10;
}

.scroll-hint.visible { opacity: 1; }
.scroll-hint.hidden  { opacity: 0; }

.scroll-hint-arrow {
    width: 18px;
    height: 18px;
    border-right: 1.5px solid #aaa;
    border-bottom: 1.5px solid #aaa;
    transform: rotate(45deg);
    animation: scrollBounce 1.6s ease-in-out infinite;
}


/* ─── ABOUT ─── */

.about {
    padding: clamp(6rem, 12vw, 10rem) 2rem;
    color: white;
    text-align: center;
    position: relative;
    background: url('../img/kim_bg.jpg') center top / cover no-repeat;
    z-index: 0;
}

.about::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(-70deg, rgba(180,142,101,0.85) 0%, rgba(0,0,0,0.92) 50%);
    background-size: 150% 150%;
    animation: gradient 25s ease infinite;
    opacity: 0.77;
    z-index: 1;
}

.about-title    { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 1.5rem; position: relative; z-index: 2; }
.about .cta-btn { position: relative; z-index: 2; }
.about p        { font-size: 1.1rem; color: rgba(255,255,255,0.7); max-width: 550px; margin: 0 auto 2.5rem; font-weight: 300; line-height: 1.7; position: relative; z-index: 2; }


/* ─── PORTFOLIO MOSAIC ─── */

.portfolio-section { width: 100%; padding: clamp(5rem, 10vw, 9rem) 0; background: white; overflow: hidden; }
.portfolio-header  { padding: 0 clamp(1.5rem, 4vw, 4rem); margin-bottom: clamp(3rem, 6vw, 5rem); }

.mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--gap);
    padding: 0 clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

.mosaic-col             { display: flex; flex-direction: column; gap: var(--gap); }
.mosaic-col:nth-child(2){ margin-top: clamp(80px, 12vw, 160px); }
.mosaic-col:nth-child(3){ margin-top: clamp(30px, 5vw, 60px); }

.mosaic-card { position: relative; overflow: hidden; cursor: pointer; background: #111; }
.mosaic-card.ratio-tall   { aspect-ratio: 3 / 4; }
.mosaic-card.ratio-square { aspect-ratio: 1 / 1; }
.mosaic-card.ratio-wide   { aspect-ratio: 4 / 3; }
.mosaic-card.ratio-std    { aspect-ratio: 5 / 6; }

.card-img {
    position: absolute;
    inset: -15% 0;
    width: 100%;
    height: 130%;
    object-fit: cover;
    transform: translateY(0px);
    will-change: transform;
    transition: transform 0.1s linear;
}

.mosaic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.mosaic-card:hover::before { opacity: 0; }

.card-img-overlay {
    z-index: 2;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: white;
}


/* ─── INWESTYCJE ─── */

.inwestycje { padding: clamp(6rem, 12vw, 10rem) 2rem; background: white; }

.inwestycje-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.inwestycje-card {
    aspect-ratio: 4/3;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.inwestycje-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

.inwestycje-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.inwestycje-card:hover::before { opacity: 0.1; }

.inwestycje-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%); color: #999; }
.inwestycje-img img { width: 100%; height: 100%; object-fit: cover; }

.inwestycje-overlay {
    z-index: 2;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: white;
}

.inwestycje-name     { font-size: 1.25rem; font-weight: 600; }
.inwestycje-location { font-size: 0.9rem; opacity: 0.9; }


/* ─── CAROUSEL ─── */

.carousel-nav  { display: flex; justify-content: center; gap: 1rem; margin-top: 3rem; align-items: center; }
.carousel-dots { display: flex; gap: 0.5rem; }

.carousel-btn {
    width: 48px;
    height: 48px;
    color: var(--primary);
    border: 1px solid var(--border);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.carousel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.4s ease;
    z-index: -1;
}

.carousel-btn:hover:not(:disabled) { border-color: var(--accent); color: white; transform: scale(1.1); }
.carousel-btn:hover:not(:disabled)::before { transform: translate(-50%, -50%) scale(1); }
.carousel-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot:hover  { background: var(--accent); transform: scale(1.3); }
.carousel-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }


/* ─── NEWS ─── */

.news { padding: clamp(6rem, 12vw, 10rem) 2rem; background: var(--surface); }
.news-description { max-width: 100%; }
.author { display: flex; align-items: center; gap: 20px; margin-top: 35px; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.news-card { background: white; border-radius: 4px; overflow: hidden; transition: all 0.3s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.news-card.news-hidden { display: none; }

.news-more-wrap { text-align: center; margin-top: 3rem; }

.news-more-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-more-btn:hover { border-color: var(--accent); background: var(--accent); color: white; }

.news-content { min-height: 315px; padding: 2rem; }
.news-title   { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.news-excerpt { color: var(--text-secondary); margin-bottom: 1.5rem; }
.news-link    { color: var(--accent); text-decoration: none; font-weight: 600; }

.news-source { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.7rem; }
.news-source-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #f0f0f0; overflow: hidden; flex-shrink: 0; }
.news-source-icon img { width: 16px; height: 16px; object-fit: contain; }


/* ─── CONTACT ─── */

.contact {
    padding: clamp(6rem, 12vw, 10rem) 2rem;
    color: white;
    text-align: center;
    background: linear-gradient(-70deg, #B48E65 0%, #000000 50%);
    background-size: 150% 150%;
    animation: gradient 25s ease infinite;
}

.contact-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact.reveal-active .contact-title { opacity: 1; transform: translateY(0); }

.contact p { font-size: 1.1rem; color: rgba(255,255,255,0.7); max-width: 550px; margin: 0 auto 2.5rem; font-weight: 300; line-height: 1.7; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 3rem;
    width: 100%;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.contact-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.4s ease; }
.contact-link:hover  { color: var(--accent); }
.contact-link:hover::after { width: 100%; }

.contact-form { max-width: 680px; margin: 0 auto; }

.contact-form input,
.contact-form textarea,
.wpcf7 input,
.wpcf7 textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    padding: 0.75rem 0;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder,
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder { color: rgba(255,255,255,0.5); }

.contact-form input:focus,
.contact-form textarea:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus { border-bottom-color: var(--accent); }

.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.form-field { margin-bottom: 2rem; }

.form-rodo {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.form-rodo input[type="checkbox"] { width: auto; flex-shrink: 0; margin-top: 3px; }
.form-rodo label { font-size: 0.8rem; color: rgba(255,255,255,0.6); line-height: 1.5; }

.wpcf7-submit,
.wpcf7 input[type="submit"] {
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35) !important;
    color: white !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto !important;
    border-bottom: 1px solid rgba(255,255,255,0.35) !important;
}

.wpcf7-submit:hover,
.wpcf7 input[type="submit"]:hover { border-color: var(--accent) !important; background-color: var(--accent) !important; }


/* ─── FOOTER ─── */

footer.footer {
    background: #0a0a0a;
    padding: 3rem 2rem;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    line-height: 1.8;
}

footer.footer a { color: rgba(255,255,255,0.4); text-decoration: none; }
footer.footer a:hover { color: var(--accent); }


/* ─── REVEAL ANIMATIONS ─── */

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.2s cubic-bezier(0.215, 0.61, 0.355, 1), transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }


/* ─── BLOG SINGLE ─── */

.article-reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); z-index: 2000; width: 0%; transition: width 0.1s linear; }

nav.article-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a;
    border-bottom: 1px solid #2a2a2a;
    transition: border-color 0.4s ease;
}

nav.article-nav.scrolled {
    border-bottom-color: #333;
}

.nav-logo {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: white;
    text-decoration: none;
}

/* Logo SVG paths — white inverted to black bg context (already white on black = correct) */
nav.article-nav .nav-logo svg path[style*="fill:white"] {
    fill: white;
}

.nav-back {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-back:hover { color: var(--accent); }

.article-body a,
.article-body--page a {
    word-break: break-all;
    overflow-wrap: break-word;
}

.article-hero {
    height: 85vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.article-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 50%, #1a1715 100%);
}

.article-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(184,144,90,0.08) 0%, transparent 70%),
        linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
}

.article-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.article-hero-content {
    position: relative;
    z-index: 2;
    padding: clamp(2rem, 5vw, 5rem) clamp(2rem, 5vw, 4rem);
    max-width: var(--max-wide);
    width: 100%;
    margin: 0 auto;
}

.article-hero .tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(184,144,90,0.4);
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.5rem;
}

.article-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 820px;
    margin-bottom: 2rem;
}

.article-meta { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.article-meta-item { font-size: 0.8rem; color: rgba(255,255,255,0.55); letter-spacing: 0.05em; }
.article-meta-item strong { color: rgba(255,255,255,0.85); font-weight: 500; }

.article-body { max-width: var(--max-text); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) 2rem; }
.article-body p  { font-size: 1.05rem; color: var(--text-body); line-height: 1.85; margin-bottom: 1.5rem; }
.article-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin: 3rem 0 1rem; line-height: 1.2; }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.5rem; }
.article-body li { font-size: 1.05rem; color: var(--text-body); line-height: 1.85; margin-bottom: 0.5rem; }

.article-intro { max-width: var(--max-text); margin: clamp(3rem, 7vw, 6rem) auto 0; padding: 0 2rem; }
.article-intro p { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-body); line-height: 1.8; margin-bottom: 1.5rem; font-weight: 400; }

.text-block { max-width: var(--max-text); margin: 0 auto; padding: 3rem 2rem 0; }
.text-block h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 1.5rem; line-height: 1.2; }
.text-block p  { font-size: 1.05rem; color: var(--text-body); line-height: 1.85; margin-bottom: 1.5rem; }
.accent-line   { border-left: 3px solid var(--accent); padding-left: 1.5rem; color: var(--primary) !important; font-weight: 500 !important; font-style: italic; }

.key-figures { max-width: var(--max-wide); margin: 0 auto; padding: 0 2rem; }
.key-figures-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.key-figure { padding: 2.5rem 2rem; background: white; text-align: center; }
.key-figure-value { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1; margin-bottom: 0.5rem; }
.key-figure-value .accent { color: var(--accent); }
.key-figure-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; }

.image-full { max-width: var(--max-wide); margin: 4rem auto; padding: 0 2rem; }
.image-full img { width: 100%; height: auto; display: block; }
.image-full figcaption { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.75rem; text-align: center; letter-spacing: 0.05em; }

.image-text { max-width: var(--max-wide); margin: 4rem auto; padding: 0 2rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.image-text.reverse .image-text-visual { order: 2; }
.image-text.reverse .image-text-content { order: 1; }
.image-text-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-text-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 1.5rem; line-height: 1.2; }
.image-text-content p  { font-size: 1.05rem; color: var(--text-body); line-height: 1.85; margin-bottom: 1.5rem; }

.image-duo { max-width: var(--max-wide); margin: 4rem auto; padding: 0 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.image-duo figure img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pullquote { max-width: var(--max-wide); margin: 5rem auto; padding: 0 2rem; }
.pullquote-inner { background: var(--surface); padding: clamp(2rem, 5vw, 4rem); border-left: 4px solid var(--accent); }
.pullquote blockquote { font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-weight: 400; line-height: 1.5; color: var(--primary); margin-bottom: 2rem; font-style: italic; }
.pullquote cite { font-size: 0.85rem; color: var(--text-secondary); font-style: normal; display: block; }
.pullquote cite strong { color: var(--primary); display: block; font-size: 1rem; margin-bottom: 0.25rem; }

.scope-block { max-width: var(--max-wide); margin: 0 auto; padding: clamp(4rem, 8vw, 6rem) 2rem; }
.scope-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 2.5rem; }
.scope-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.scope-item { padding: 2.5rem 2rem; background: white; }
.scope-item-num   { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.scope-item-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.6rem; }
.scope-item-desc  { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

.statement-band { background: #0a0a0a; padding: clamp(4rem, 8vw, 7rem) 2rem; text-align: center; }
.statement-band p { font-size: clamp(1.5rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; color: white; max-width: 900px; margin: 0 auto; }
.statement-band p span { color: var(--accent); }

.read-more { background: var(--surface); padding: clamp(5rem, 10vw, 8rem) 0; }
.read-more-inner { max-width: var(--max-wide); margin: 0 auto; padding: 0 2rem; }
.read-more-label { font-size: 0.8rem; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; font-weight: 600; margin-bottom: 3rem; }
.read-more-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }

.read-more-card { background: white; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.read-more-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.read-more-card .thumb { aspect-ratio: 16/10; background: var(--surface-light); overflow: hidden; }
.read-more-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.read-more-card .info    { padding: 1.5rem; }
.read-more-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; line-height: 1.3; }
.read-more-card p  { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }


/* ─── RESPONSIVE ─── */

@media (max-width: 968px) {
    .progress-indicator { right: 1.5rem; }
    .key-figures-inner  { grid-template-columns: repeat(2, 1fr); }
    .scope-grid         { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .news-grid            { grid-template-columns: 1fr; }
    .inwestycje-grid      { grid-template-columns: 1fr; }
    .contact-form-row     { grid-template-columns: 1fr; gap: 0; }
    .portfolio-section    { overflow: visible; }
    .image-text           { grid-template-columns: 1fr; gap: 2rem; }
    .image-text.reverse .image-text-visual  { order: 1; }
    .image-text.reverse .image-text-content { order: 2; }
    .image-duo            { grid-template-columns: 1fr; }
    .read-more-grid       { grid-template-columns: 1fr; }
    .article-meta         { gap: 1rem; }

    .mosaic {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        padding: 0 1.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 1.5rem;
        scrollbar-width: none;
    }

    .mosaic::-webkit-scrollbar { display: none; }
    .mosaic-col { display: contents; }
    .mosaic-card { flex: 0 0 78vw; min-width: 78vw; height: 68vw; aspect-ratio: unset; margin-top: 0 !important; scroll-snap-align: start; }
    .mosaic-card:last-child { margin-right: 1.5rem; }
}

@media (max-width: 640px) {
    .key-figures-inner { grid-template-columns: 1fr 1fr; }
    .scope-grid        { grid-template-columns: 1fr; }
}

/* ── Snap scroll mobile – portfolio & news ── */
        @media (max-width: 390px) {

            .inwestycje-grid {
                display: flex;
                flex-direction: row;
                overflow-x: scroll;
                scroll-snap-type: x mandatory;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                gap: 1rem;
                padding: 0 1.5rem 1.5rem;
                margin: 2rem 0 0;          /* było: 2rem -1.5rem 0 — ujemny margin + overflow:hidden = niewidoczne karty */
            }

            .inwestycje-grid::-webkit-scrollbar { display: none; }

            .inwestycje-card {
                flex: 0 0 78vw;
                max-width: 340px;
                scroll-snap-align: start;
                aspect-ratio: 3/4;
            }

            .inwestycje .carousel-nav { display: none; }

            .inwestycje { position: relative; overflow: visible; }

            .inwestycje::after { display: none; }

            .inwestycje-grid {
                -webkit-mask-image: linear-gradient(to right, black calc(100% - 60px), transparent 100%);
                        mask-image: linear-gradient(to right, black calc(100% - 60px), transparent 100%);
            }

            .news-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
                margin-top: 2rem;
            }

            .news-card {
                min-height: auto;
            }

            .news .carousel-nav { display: none; }

        }

/* ─── GUTENBERG FRONTEND OVERRIDE ─── */
/* Wymuszenie stylu marki niezależnie od inline styles ustawionych w edytorze */

.article-body *,
.article-body *::before,
.article-body *::after {
    font-family: 'Outfit', sans-serif !important;
}

.article-body,
.article-body p,
.article-body li,
.article-body td,
.article-body th {
    font-size: 1.05rem !important;
    line-height: 1.85 !important;
    color: var(--text-body) !important;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    color: var(--primary) !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
}

.article-body h2 { font-size: clamp(1.5rem, 3vw, 2rem) !important; }
.article-body h3 { font-size: 1.35rem !important; }
.article-body h4 { font-size: 1.1rem !important; }

.article-body a { color: var(--accent) !important; }

/* Blok cytat */
.article-body .wp-block-quote,
.article-body blockquote {
    border-left: 3px solid var(--accent) !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    padding: 1rem 0 1rem 1.5rem !important;
    margin: 2rem 0 !important;
    background: transparent !important;
    color: var(--primary) !important;
    font-style: italic !important;
    font-size: 1.1rem !important;
}

.article-body .wp-block-quote p,
.article-body blockquote p {
    font-size: 1.1rem !important;
    color: var(--primary) !important;
    margin-bottom: 0 !important;
}

.article-body .wp-block-quote cite,
.article-body .wp-block-quote footer {
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
    font-style: normal !important;
}

/* Blok pullquote */
.article-body .wp-block-pullquote {
    border-top: 3px solid var(--accent) !important;
    border-bottom: 3px solid var(--accent) !important;
    border-left: none !important;
    border-right: none !important;
    padding: 2rem !important;
    text-align: center !important;
    background: transparent !important;
}

.article-body .wp-block-pullquote blockquote {
    border-left: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.article-body .wp-block-pullquote p {
    font-size: 1.4rem !important;
    font-style: italic !important;
    color: var(--primary) !important;
}

/* Blok separator */
.article-body .wp-block-separator,
.article-body hr {
    border: none !important;
    border-top: 1px solid var(--border) !important;
    margin: 3rem 0 !important;
    opacity: 1 !important;
    background: none !important;
    height: 1px !important;
}

/* Blok przycisku */
.article-body .wp-block-button .wp-block-button__link {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    padding: 0.9rem 2.5rem !important;
    border-radius: 0 !important;
    background: var(--accent) !important;
    color: white !important;
    border: 1px solid var(--accent) !important;
    transition: all 0.3s ease !important;
}

.article-body .wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Blok tabeli */
.article-body .wp-block-table td,
.article-body .wp-block-table th {
    border: 1px solid var(--border) !important;
    padding: 0.75rem 1rem !important;
}

.article-body .wp-block-table th {
    background: var(--surface) !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
}

/* Blok kodu */
.article-body .wp-block-code,
.article-body pre,
.article-body code {
    font-size: 0.9rem !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    padding: 1.5rem !important;
    color: var(--text-body) !important;
}

/* Figcaption */
.article-body figcaption,
.article-body .wp-element-caption {
    font-size: 0.8rem !important;
    color: var(--text-secondary) !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
    letter-spacing: 0.05em !important;
    font-style: normal !important;
}

/* Klasy kolorów z palety – dozwolone wyjątki */
.article-body .has-accent-color  { color: var(--accent) !important; }
.article-body .has-primary-color { color: var(--primary) !important; }
.article-body .has-white-color   { color: #ffffff !important; }
.article-body .has-muted-color   { color: var(--text-secondary) !important; }

.article-body .has-accent-background-color  { background-color: var(--accent) !important; color: white !important; }
.article-body .has-primary-background-color { background-color: var(--primary) !important; color: white !important; }
.article-body .has-surface-background-color { background-color: var(--surface) !important; }

/* Blokada custom font-size inline (np. style="font-size:48px") */
.article-body [style*="font-size"]:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    font-size: 1.05rem !important;
}

/* Blokada custom koloru tekstu inline */
.article-body [style*="color"] {
    color: var(--text-body) !important;
}

/* Wyjątki dla dozwolonych kolorów z palety */
.article-body [style*="color"].has-accent-color  { color: var(--accent) !important; }
.article-body [style*="color"].has-primary-color { color: var(--primary) !important; }
.article-body [style*="color"].has-white-color   { color: #ffffff !important; }


/* ── News cards (own posts + media articles) ── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background: white;
    border: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.news-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
    margin: 0;
}

.news-card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.news-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-card-source {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.news-card-source img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.news-card-source-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.news-card-source-label em {
    font-style: italic;
    color: var(--primary);
    font-weight: 500;
}

.news-card-more {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
    margin-top: auto;
}

.news-card-more:hover { opacity: 0.7; }

/* Hide cards beyond first 3, shown via JS */
.news-card.is-hidden { display: none; }

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

/* Hide extra news cards (show/hide via JS) */
.news-card.news-hidden { display: none; }


/* Kontener główny - zachowujemy Twoje wymiary i padding */
.contact-form {
    max-width: 560px;
    margin: 3rem auto 0;
    text-align: left;
    padding: 55px;
    border: 1px solid white;
    background-color: transparent;
    transition: 0.3s;
}

.contact-form:hover {
    background: #1E1812;
}

/* Naprawa układu siatki dla CF7 */
.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

/* CF7 dodaje spany wokół inputów - musimy wymusić ich pełną szerokość */
.form-field {
    position: relative;
    margin-bottom: 2rem;
}

.form-field .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Twoje style dla inputów i textarea */
.form-field input,
.form-field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    padding: 0.75rem 0;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
    border-radius: 0; /* Ważne dla iPhone */
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(255,255,255,0.4);
    font-weight: 300;
    letter-spacing: 0.04em;
}

.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: var(--accent);
}

.form-field textarea {
    min-height: 80px;
}

.form-rodo {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.form-rodo .wpcf7-list-item {
    margin: 0;
    display: block; 
}

.form-rodo .wpcf7-list-item label {
    display: flex !important;
    align-items: flex-start !important; 
    gap: 0.75rem;
    cursor: pointer;
}

.form-rodo input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 14px;
    min-width: 14px; 
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
    cursor: pointer;
    margin-top: 4px; 
    transition: border-color 0.3s ease;
    position: relative;
    display: block; 
}

.form-rodo input[type="checkbox"]:checked {
    border-color: var(--accent);
}

.form-rodo input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 9px;
    top: -1px;
    width: 8px;
    height: 18px;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    transform: rotate(45deg);
}

.form-rodo .wpcf7-list-item-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    display: block;
}

.wpcf7-not-valid-tip {
    font-size: 11px;
    color: #fff;
    margin-top: 5px;
}

.contact-form .cta-btn {
    width: auto;
    padding: 1rem 3rem;
}

/* Kontener na komunikaty CF7 */
.wpcf7-response-output {
    margin: 2rem auto 0 auto !important; 
    
    padding: 1rem 1.5rem !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 560px; 
    display: block; 
}

/* Stan: Sukces (Wiadomość wysłana) */
.wpcf7-mail-sent-ok {
    border-color: var(--accent) !important; /* Złoty kolor przy sukcesie */
    background: rgba(184, 144, 90, 0.1); /* Delikatna złota poświata w tle */
}

/* Stan: Błąd walidacji lub błąd wysyłki */
.wpcf7-validation-errors, 
.wpcf7-aborted, 
.wpcf7-spam-blocked, 
.wpcf7-mail-sent-ng {
    border-color: #ff4d4d !important; /* Czerwień dla błędów */
    background: rgba(255, 77, 77, 0.05);
}

/* Ukrycie komunikatu, gdy jest pusty (niektóre wersje CF7 zostawiają margines) */
.wpcf7-display-none {
    display: none !important;
}

@media (max-width: 600px) {
    .contact-form { padding: 30px; }
    .contact-form-row { grid-template-columns: 1fr; }
}

.entry-content a,
.wp-block-paragraph a,
body a {
    word-break: break-all;
    overflow-wrap: anywhere;
}


