/* ============================================================
   Skup Nieruchomości ORG — Design System v1.0
   Cel: <30KB gzip | WCAG 2.1 AA | Mobile-first
   Wzorzec: premium-nieruchomosci.pl (minimalistyczny)
   ============================================================ */

/* Globalne zabezpieczenie przed poziomym overflow */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }
img, video, iframe, svg { max-width: 100%; }

/* ===== ZMIENNE ===== */
:root {
    --color-accent:     #ea5818;
    --color-accent-h:   #c94810;
    --color-accent-bg:  #fff4f0;
    --color-heading:    #2b3d4f;
    --color-body:       #333333;
    --color-muted:      #6b7280;
    --color-bg:         #ffffff;
    --color-bg-alt:     #f8f9fa;
    --color-border:     #e5e7eb;
    --color-success:    #16a34a;
    --color-success-bg: #f0fdf4;
    --color-debit:   #dc2626;
    --color-credit:  #059669;
    --color-neutral: #6b7280;

    --font-base: 'Poppins', system-ui, sans-serif;
    --fw-normal: 400;
    --fw-semi:   600;
    --fw-bold:   700;

    --container: 1200px;
    --radius:    6px;
    --radius-lg: 12px;
    --shadow:    0 2px 12px rgba(0,0,0,.08);
    --shadow-md: 0 4px 24px rgba(0,0,0,.12);
    --transition: .2s ease;

    --header-h: 68px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-base);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-body);
    background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { font-family: var(--font-base); cursor: pointer; }

/* ===== SKIP LINK WCAG ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: var(--color-heading);
    color: #fff;
    padding: .5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: var(--fw-semi);
    font-size: .9rem;
}
.skip-link:focus { top: 1rem; }

/* ===== FOKUS WCAG ===== */
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

/* ===== CONTAINER ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

/* ===== TYPOGRAFIA ===== */
h1, h2, h3, h4, h5 {
    color: var(--color-heading);
    font-weight: var(--fw-bold);
    line-height: 1.25;
}
h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
h4 { font-size: 1rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
strong { font-weight: var(--fw-semi); color: var(--color-heading); }

/* ===== PRZYCISKI ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: var(--fw-semi);
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 4px 14px rgba(234, 88, 24, 0.2);
}
.btn-primary:hover {
    background: var(--color-accent-h);
    border-color: var(--color-accent-h);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(234, 88, 24, 0.4);
    transform: translateY(-2px);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}
.btn-primary:hover::after {
    left: 150%;
}
.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.btn-secondary:hover {
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
}
.btn-ghost {
    background: transparent;
    color: var(--color-heading);
    border-color: var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-bg-alt);
    text-decoration: none;
}
.btn-lg  { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-sm  { padding: .4rem 1rem; font-size: .85rem; min-height: 36px; }
.btn-full { width: 100%; }

/* ===== HEADER I NAWIGACJA ===== */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.site-header.header--hidden {
    transform: translateY(-100%);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 1rem;
}
.logo { flex-shrink: 0; line-height: 0; transition: transform 0.2s ease; }
.logo:hover { transform: scale(1.02); }
.logo img { height: 44px; width: auto; }

/* Nawigacja główna */
.nav-mobile-cta { display: none; } /* widoczne tylko na mobile — patrz breakpoint 768px */
.site-nav { margin-right: auto; margin-left: 1.5rem; }
.nav-list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.nav-list > li > a {
    display: block;
    padding: 0.5rem 0.65rem;
    color: var(--color-heading);
    font-weight: var(--fw-semi);
    font-size: 0.85rem;
    border-radius: 50px;
    transition: all var(--transition);
    white-space: nowrap; /* Prevent wrapping */
}
.nav-list > li > a:hover {
    color: var(--color-accent);
    background: var(--color-accent-bg);
    text-decoration: none;
}

/* Dropdown "Co skupujemy" */
.has-dropdown { position: relative; }
.has-dropdown > a::after { 
    content: '▾'; 
    font-size: .8rem; 
    margin-left: 4px;
    transition: transform 0.2s ease;
}
.has-dropdown:hover > a::after { transform: rotate(180deg); }

.dropdown {
    display: none;
    position: absolute;
    /* Dystans realizowany przez przezroczysty border top zamiast marginesu,
       żeby myszka nie "spadała" z elementu podczas najeżdżania na niego */
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: #fff;
    /* Usunięcię góry border dołączonej do przezroczystego marginesu top */
    border: 1px solid rgba(0,0,0,0.05);
    border-top: 10px solid transparent;
    background-clip: padding-box;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: .75rem;
    z-index: 300;
    animation: fadeInDown 0.2s ease-out;
}
.dropdown li a {
    display: block;
    padding: .7rem 1rem;
    color: var(--color-body);
    font-size: .9rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.dropdown li a:hover {
    background: var(--color-bg-alt);
    color: var(--color-accent);
    padding-left: 1.25rem;
}
.has-dropdown:hover .dropdown { display: block; }

/* Akcje w nagłówku (Telefon + Kontakt) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}
.header-socials {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.header-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--color-heading);
    transition: all 0.2s ease;
}
.header-socials a:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}
.header-socials svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.header-phone {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--color-heading);
    font-weight: var(--fw-bold);
    font-size: .9rem;
    transition: color var(--transition);
    white-space: nowrap;
}
.header-phone:hover {
    color: var(--color-accent);
    text-decoration: none;
}
.phone-icon {
    font-size: 1.1rem;
    filter: grayscale(1);
    transition: filter 0.2s ease;
}
.header-phone:hover .phone-icon { filter: grayscale(0); }

/* Hamburger Style */
.nav-toggle-input { position: absolute; opacity: 0; visibility: hidden; }
.nav-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1100;
}
.nav-toggle-btn span {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--color-heading);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger transition to X */
.nav-toggle-input:checked + .nav-toggle-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle-input:checked + .nav-toggle-btn span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle-input:checked + .nav-toggle-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991px) {
    .nav-toggle-btn { display: flex; }
    
    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        padding: 80px 2rem 2rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
    }
    
    .nav-toggle-input:checked ~ .site-nav {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-list > li { width: 100%; }
    .nav-list > li > a { 
        width: 100%; 
        padding: 1rem; 
        font-size: 1.1rem;
        border-radius: var(--radius);
    }
    
    .header-actions {
        display: none; /* Ukrywamy w headerze na mobile, pokazujemy wewnatrz nav jeśli trzeba */
    }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    padding: 5rem 0 6rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 40%;
    height: 60%;
    background: radial-gradient(circle, var(--color-accent-bg) 0%, transparent 70%);
    z-index: 0;
    opacity: 0.6;
}
.hero-inner {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 4rem;
}
.hero-content h1 {
    margin-bottom: 1.5rem;
    line-height: 1.15;
}
.hero-lead {
    font-size: 1.15rem;
    color: var(--color-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-image:hover img { transform: scale(1.03); }
/* Placeholder gdy brak zdjęcia */
.hero-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
    border-radius: var(--radius-lg);
    aspect-ratio: 4/3;
    font-size: 4rem;
}

/* Trust bar pod hero */
.trust-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(229, 231, 235, 0.5);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.trust-items {
    display: flex;
    gap: 1.75rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .95rem;
    font-weight: var(--fw-semi);
    color: var(--color-heading);
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity var(--transition);
}
.trust-item:hover {
    opacity: 1;
}
.trust-item svg,
.trust-icon { color: var(--color-accent); flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(234, 88, 24, 0.2)); }

/* ===== HERO — Strona miasta / artykułu ===== */
.hero-page {
    background: var(--color-bg-alt);
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid var(--color-border);
}
.hero-page h1 { margin-top: .75rem; margin-bottom: .75rem; }
.hero-page .hero-lead { margin-bottom: 1.5rem; }
.hero-page .hero-cta { flex-wrap: wrap; gap: .75rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: var(--color-muted);
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-accent); text-decoration: none; }
.breadcrumb-sep { color: var(--color-border); }
.breadcrumb-current { color: var(--color-body); }

/* ===== SEKCJE ===== */
.section { padding: 4rem 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark {
    background: var(--color-heading);
    color: #fff;
}
.section--dark h2 { color: #fff; }
.section--dark p { color: #cbd5e1; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p { font-size: 1.05rem; color: var(--color-muted); max-width: 600px; margin: 0 auto; }
.section-label {
    display: inline-block;
    font-size: .75rem;
    font-weight: var(--fw-bold);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: .5rem;
}

/* ===== PROCES — 4 kroki ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
}
/* Linia łącząca kroki */
.steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(12.5% + 1px);
    right: calc(12.5% + 1px);
    height: 3px;
    background: linear-gradient(90deg, rgba(234,88,24,0.1) 0%, rgba(234,88,24,0.5) 50%, rgba(234,88,24,0.1) 100%);
    z-index: 0;
}
.step {
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
    z-index: 1;
    transition: transform var(--transition);
}
.step:hover {
    transform: translateY(-5px);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-h) 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: var(--fw-bold);
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 20px rgba(234,88,24,.3);
    border: 4px solid var(--color-bg);
    transition: transform var(--transition), box-shadow var(--transition);
}
.step:hover .step-num {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(234,88,24,.4);
}
.step h3 { font-size: 1rem; margin-bottom: .5rem; }
.step p { font-size: .88rem; color: var(--color-muted); }
.step-time {
    display: inline-block;
    margin-top: .5rem;
    font-size: .78rem;
    font-weight: var(--fw-bold);
    color: var(--color-accent);
    background: var(--color-accent-bg);
    padding: .2rem .6rem;
    border-radius: 100px;
}

/* ===== STEP DETAIL LAYOUT (jak-dzialamy) ===== */
.step-detail-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    align-items: start;
}
.step-detail-row--bordered {
    border-bottom: 1px solid var(--color-border);
}
.step-detail-num {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    text-align: center;
}
.step-detail-body h3 {
    color: var(--color-heading);
    font-size: 1.2rem;
    margin-bottom: .75rem;
}
.step-detail-body p {
    margin-bottom: .75rem;
    line-height: 1.7;
}
@media (max-width: 640px) {
    .step-detail-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .step-detail-num {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* ===== HUB INTRO + FOR WHO ===== */
.hub-intro-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-body);
    max-width: 820px;
    margin: 0 auto;
}
.for-who-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.for-who-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.for-who-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    padding-top: .125rem;
}
.for-who-body { flex: 1; }
.for-who-title {
    display: block;
    font-size: .95rem;
    font-weight: var(--fw-semi);
    color: var(--color-heading);
    margin-bottom: .25rem;
}
.for-who-desc {
    font-size: .875rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
}

/* ===== STATYSTYKI ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    text-align: center;
}
.stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: var(--fw-bold);
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: .35rem;
}
.stat-label {
    font-size: .88rem;
    color: var(--color-muted);
}

/* ===== OPINIE (testimonials) ===== */
.testimonials { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.testimonial {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.testimonial:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    background: #fff;
}
.testimonial::before {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 5rem;
    font-weight: var(--fw-bold);
    color: var(--color-accent);
    opacity: .08;
    line-height: 1;
    font-family: serif;
}
.testimonial-stars { color: #f59e0b; margin-bottom: 1rem; font-size: 1.1rem; }
.testimonial-text { font-size: .95rem; margin-bottom: 1.5rem; font-style: italic; color: var(--color-body); }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-author-name { font-weight: var(--fw-semi); color: var(--color-heading); font-size: .9rem; }
.testimonial-author-meta { font-size: .8rem; color: var(--color-muted); }

/* ===== FAQ (CSS-only accordion) ===== */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-list details {
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease;
}
.faq-list details:first-child { border-top: 1px solid var(--color-border); }
.faq-list details:hover { background-color: rgba(234, 88, 24, 0.02); }
.faq-list summary {
    padding: 1.5rem 0;
    cursor: pointer;
    font-weight: var(--fw-semi);
    color: var(--color-heading);
    font-size: 1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    user-select: none;
    transition: color 0.3s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: var(--fw-normal);
    color: var(--color-accent);
    flex-shrink: 0;
    transition: transform var(--transition);
    line-height: 1;
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details[open] summary { color: var(--color-accent); padding-bottom: 0.75rem; }
.faq-answer { padding-bottom: 1.5rem; font-size: .95rem; color: var(--color-muted); line-height: 1.7; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ===== FORMULARZ KONTAKTOWY ===== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-info p { color: var(--color-muted); }
.contact-phone {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin: 1.5rem 0 .5rem;
    text-decoration: none;
}
.contact-phone:hover { color: var(--color-accent); text-decoration: none; }
.contact-hours { font-size: .85rem; color: var(--color-muted); margin-bottom: 2rem; }
.contact-badges { display: flex; flex-direction: column; gap: .5rem; }
.contact-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    color: var(--color-heading);
}
.contact-badge::before { content: '✓'; color: var(--color-success); font-weight: var(--fw-bold); }

.form-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.form-box h3 { margin-bottom: 1.5rem; font-size: 1.25rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-weight: var(--fw-semi);
    font-size: .9rem;
    margin-bottom: .5rem;
    color: var(--color-heading);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: .85rem 1.2rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-family: var(--font-base);
    font-size: 1rem;
    color: var(--color-body);
    background: #f9fafb;
    transition: all var(--transition);
    appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234,88,24,.35);
    outline: none;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group .form-hint { font-size: .8rem; color: var(--color-muted); margin-top: .4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-rodo { font-size: .75rem; color: var(--color-muted); margin-top: 1.25rem; line-height: 1.6; }
.form-success {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid #bbf7d0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-weight: var(--fw-semi);
}

/* ===== KARTY (artykuły, dokumenty) ===== */
.cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2rem; 
}
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.card > img {
    max-width: none; /* Nadpisuje restrykcje z resetu */
    width: calc(100% + 3.5rem);
    margin: -1.75rem -1.75rem 1.25rem -1.75rem;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.card:hover { 
    box-shadow: 0 15px 35px rgba(0,0,0,0.08); 
    transform: translateY(-5px);
    background: #fff;
}
.card:hover::after {
    transform: scaleX(1);
}
.card-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-accent);
    background: var(--color-accent-bg);
    padding: .2rem .65rem;
    border-radius: 100px;
    margin-bottom: .75rem;
}
.card h3 { font-size: 1rem; margin-bottom: .5rem; line-height: 1.4; }
.card-meta { font-size: .8rem; color: var(--color-muted); margin-bottom: .75rem; }
.card p { font-size: .9rem; color: var(--color-muted); flex-grow: 1; }
.card-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: 1rem;
    font-size: .88rem;
    font-weight: var(--fw-semi);
    color: var(--color-accent);
}
.card-link:hover { text-decoration: none; gap: .55rem; }

/* Karta dokumentu */
.card-document .card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--color-accent);
    font-size: 1.5rem;
}

/* ===== KROKI (TIMELINE) ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    position: relative;
}
.steps-grid::before {
    content: '';
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, rgba(234, 88, 24, 0.2) 100%);
    z-index: 0;
}
@media (max-width: 768px) {
    .steps-grid::before { display: none; }
}

.step-card {
    text-align: center;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(234, 88, 24, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(234, 88, 24, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 88, 24, 0); }
}

.step-number {
    width: 4.5rem;
    height: 4.5rem;
    background: var(--color-accent);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(234, 88, 24, 0.3);
    border: 4px solid var(--color-bg);
    animation: pulse 2.5s infinite;
}
.step-card h3 {
    margin-bottom: 1rem;
    color: var(--color-heading);
}
.step-card p {
    color: var(--color-muted);
}

/* ===== AUTOR BOX ===== */
.author-box {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}
.author-box-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--color-bg);
    box-shadow: var(--shadow);
}
.author-box-name {
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    font-size: .97rem;
}
.author-box-title { font-size: .82rem; color: var(--color-muted); margin-top: .2rem; }
.author-box-link { font-size: .82rem; color: var(--color-accent); margin-top: .4rem; display: block; }

/* ===== KALKULATOR (statyczny PHP) ===== */
.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
    margin: 1.5rem 0;
}
.calc-table th {
    background: var(--color-heading);
    color: #fff;
    padding: .85rem 1.25rem;
    text-align: left;
    font-weight: var(--fw-semi);
}
.calc-table th:last-child { background: var(--color-accent); }
.calc-table td {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.calc-table tr:last-child td { border-bottom: none; font-weight: var(--fw-bold); color: var(--color-heading); }
.calc-table .val-plus { color: var(--color-success); }
.calc-table .val-minus { color: #dc2626; }
.calc-table--data tr:last-child td { font-weight: var(--fw-normal); color: var(--color-body); border-bottom: 1px solid var(--color-border); }
.calc-table--data tr:nth-child(odd) td { background: rgba(0,0,0,.018); }
@media (max-width:768px) {
    .calc-table { font-size: .82rem; }
    .calc-table th, .calc-table td { padding: .65rem .85rem; }
}
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

/* ===== ALERT / INFO BOXY ===== */
.alert {
    display: flex;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9rem;
    margin: 1.5rem 0;
}
.alert-info  { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warn  { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-ok    { background: var(--color-success-bg); border: 1px solid #bbf7d0; color: #14532d; }

/* ===== ARTYKUŁ (treść z WP) ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}
.article-content h2 { margin: 2rem 0 .75rem; }
.article-content h3 { margin: 1.5rem 0 .6rem; }
.article-content ul,
.article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: .4rem; }
.article-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 1rem 1.5rem;
    background: var(--color-bg-alt);
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--color-muted);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-content th { background: var(--color-bg-alt); padding: .6rem 1rem; text-align: left; font-weight: var(--fw-semi); border: 1px solid var(--color-border); }
.article-content td { padding: .6rem 1rem; border: 1px solid var(--color-border); }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-content a { font-weight: var(--fw-semi); }
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .82rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.article-meta-sep { color: var(--color-border); }

/* Sidebar artykułu */
.article-sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.sidebar-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar-box h4 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; color: var(--color-muted); }
.sidebar-box ul li { border-bottom: 1px solid var(--color-border); }
.sidebar-box ul li:last-child { border-bottom: none; }
.sidebar-box ul li a { display: block; padding: .5rem 0; font-size: .88rem; color: var(--color-body); }
.sidebar-box ul li a:hover { color: var(--color-accent); text-decoration: none; }

/* ===== STRONA MIASTA — Sekcja dzielnic ===== */
.districts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.district-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.district-card strong { display: block; color: var(--color-heading); margin-bottom: .25rem; }
.district-price { font-size: .82rem; color: var(--color-muted); }

/* Pobliskie miasta */
.nearby-cities { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.nearby-city-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: .82rem;
    font-weight: var(--fw-semi);
    color: var(--color-heading);
    transition: border-color var(--transition), color var(--transition);
}
.nearby-city-link:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }

/* ===== BADGE problemów ===== */
.badge {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: var(--fw-bold);
}
.badge-kredyt    { background: #dbeafe; color: #1d4ed8; }
.badge-komornik  { background: #fee2e2; color: #991b1b; }
.badge-spadek    { background: #d1fae5; color: #065f46; }
.badge-lokator   { background: #fef9c3; color: #854d0e; }
.badge-remont    { background: #ede9fe; color: #6d28d9; }
.review-stars {
    color: #f59e0b;
    margin-bottom: .75rem;
    font-size: 1rem;
}

/* ===== PAGINACJA ===== */
.pagination {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--color-heading);
    font-weight: var(--fw-semi);
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }
.pagination .current { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ===== CTA SECTION (ciemna) ===== */
.cta-section {
    background: var(--color-heading);
    padding: 4rem 0;
    text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: .75rem; }
.cta-section p { color: #94a3b8; margin-bottom: 2rem; }
.cta-section .btn-primary { font-size: 1.1rem; padding: 1rem 2.5rem; }
.cta-section .btn-secondary { border-color: rgba(255,255,255,.3); color: #fff; }
.cta-section .btn-secondary:hover { background: rgba(255,255,255,.1); }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-social-proof {
    margin-top: 1.5rem;
    font-size: .82rem;
    color: #64748b;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-heading);
    color: #94a3b8;
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #3d4f5e;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand .logo img { filter: brightness(0) invert(1) opacity(.85); height: 38px; }
.footer-desc { font-size: .85rem; line-height: 1.7; max-width: 300px; margin-bottom: 1.25rem; }
.company-legal { font-size: .78rem; line-height: 1.8; color: #64748b; }
.footer-col h4 {
    color: #e2e8f0;
    font-size: .82rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a { font-size: .85rem; color: #94a3b8; transition: color var(--transition); }
.footer-col ul a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-disclaimer { font-size: .75rem; color: #475569; max-width: 700px; }
.footer-copy { font-size: .75rem; color: #475569; white-space: nowrap; }

/* ===== UTILITY ===== */
.text-center  { text-align: center; }
.text-accent  { color: var(--color-accent); }
.text-muted   { color: var(--color-muted); }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }
.mb-0  { margin-bottom: 0; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== SIATKI POMOCNICZE ===== */
.grid-2col    { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-2col--md { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-2col--lg { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-2col--xl { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

/* ===== RESPONSYWNOŚĆ ===== */

/* Tablet */
@media (max-width: 1024px) {
    .steps { grid-template-columns: repeat(2, 1fr); }
    .steps::before { display: none; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .contact-section { gap: 2.5rem; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --header-h: 60px; }

    /* Hamburger widoczny */
    .nav-toggle-btn { display: flex; }
    .header-cta { display: none; } /* ukryj CTA tel w headerze na mobile */

    /* Nawigacja mobilna — slide down (nadpisuje blok 991px) */
    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 0;
        background: var(--color-bg);
        border-bottom: 2px solid var(--color-accent);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        z-index: 1050;
        margin-left: 0;
    }
    .nav-toggle-input:checked ~ .site-nav {
        max-height: 90vh;
        overflow-y: auto;
    }
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem 1.5rem;
        gap: 0;
    }
    .nav-list > li > a {
        padding: .85rem .5rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
    }
    .nav-list > li:last-child > a { border-bottom: none; }
    .has-dropdown > a::after { float: right; }
    .dropdown {
        display: block;
        position: static;
        transform: none;
        left: auto;
        min-width: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding-left: 1rem;
        background: var(--color-bg-alt);
        animation: none;
    }
    .dropdown li a { padding: .6rem .75rem; border-bottom: 1px solid var(--color-border); }

    /* Hero mobile */
    .hero { padding: 2.5rem 0; }
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .hero-content { width: 100%; max-width: 100%; box-sizing: border-box; }
    .hero-image { display: none !important; } /* ukryj na mobile dla performance */
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; justify-content: center; }

    /* Trust bar */
    .trust-items { gap: 1rem; justify-content: flex-start; }
    .trust-item { font-size: .82rem; }

    /* Sekcje */
    .section { padding: 2.5rem 0; }
    .section-header { margin-bottom: 2rem; }

    /* Kroki */
    .steps { grid-template-columns: 1fr 1fr; gap: 1rem; }

    /* Siatki pomocnicze */
    .grid-2col,
    .grid-2col--md,
    .grid-2col--lg,
    .grid-2col--xl { grid-template-columns: 1fr; }

    /* Formularz */
    .form-row { grid-template-columns: 1fr; }
    .contact-section { grid-template-columns: 1fr; gap: 2rem; }
    .contact-info { display: none; } /* ukryj info tekstowe, zostaw form */
    .form-box { padding: 1.5rem; width: 100%; box-sizing: border-box; }

    /* Nawigacja — przycisk hamburger */
    .nav-toggle-btn { margin-right: 0; }

    /* Telefon w mobilnym menu */
    .nav-mobile-cta {
        display: flex;
        flex-direction: column;
        gap: .5rem;
        padding: 1rem .5rem 0;
        border-top: 2px solid var(--color-accent);
        margin-top: .5rem;
    }
    .nav-mobile-cta a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        padding: .75rem 1rem;
        border-radius: var(--radius);
        font-weight: var(--fw-semi);
        font-size: 1rem;
        text-decoration: none;
        transition: background .2s;
    }
    .nav-mobile-cta .nav-mobile-phone {
        background: var(--color-accent);
        color: #fff;
    }
    .nav-mobile-cta .nav-mobile-phone:hover { background: #d14a10; }
    .nav-mobile-cta .nav-mobile-contact {
        background: var(--color-bg-alt);
        color: var(--color-heading);
        border: 1px solid var(--color-border);
    }
    .nav-mobile-cta .nav-mobile-contact:hover { background: var(--color-border); }

    /* Przyciski — zawijanie tekstu na mobile */
    .btn-lg { white-space: normal; width: 100%; max-width: 100%; box-sizing: border-box; text-align: center; }

    /* Karty */
    .cards { grid-template-columns: 1fr; }

    /* Artykuł */
    .article-layout { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-brand { grid-column: auto; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }

    /* CTA section */
    .cta-section { padding: 2.5rem 0; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-buttons .btn { width: 100%; max-width: 320px; justify-content: center; }

    /* Paginacja */
    .pagination { gap: .25rem; }
}

/* Małe mobile */
@media (max-width: 480px) {
    .steps { grid-template-columns: 1fr; }
    .hero--short .hero-inner { grid-template-columns: 1fr; }
    .hero-page .hero-cta { flex-direction: column; }
    .hero-page .hero-cta .btn { width: 100%; justify-content: center; }
    .trust-items { flex-direction: column; gap: .75rem; }
    .contact-detail-list { gap: 1.25rem; }
}

/* ===== HERO — wariant krótki (podstrony) ===== */
.hero--short { padding: 2.5rem 0 2rem; }
.hero--short .hero-inner { grid-template-columns: 1fr; max-width: 720px; }
.hero--short .hero-lead { max-width: 100%; }

/* ===== CONTACT DETAIL LIST ===== */
.contact-detail-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 1.5rem;
}
.contact-detail-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.contact-detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-bg);
    border-radius: var(--radius);
    color: var(--color-accent);
}
.contact-detail-label {
    font-size: .8rem;
    font-weight: var(--fw-semi);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .25rem;
}

/* ===== BTN WHITE / OUTLINE-WHITE (na ciemnym tle) ===== */
.btn-white {
    background: #fff;
    color: var(--color-heading);
    border: 2px solid #fff;
}
.btn-white:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
    text-decoration: none;
    color: var(--color-heading);
}
.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.6);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,.12);
    border-color: #fff;
    text-decoration: none;
    color: #fff;
}

/* ===== CONTENT BODY (polityka prywatnosci, artykuły tekstowe) ===== */
.content-body h1 { margin-bottom: 1.5rem; }
.content-body h2 {
    font-size: 1.2rem;
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--color-border);
}
.content-body p { margin-bottom: 1rem; }
.content-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.content-body ul li { margin-bottom: .4rem; }
.content-body a { text-decoration: underline; }

/* ===== HISTORY / DOCUMENT SINGLE PAGE ===== */
.history-content h2,
.document-content h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: .6rem;
    color: var(--color-heading);
}
.history-content h3,
.document-content h3 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: .5rem;
    color: var(--color-heading);
}
.history-content p,
.document-content p   { margin-bottom: 1rem; }
.history-content ul,
.document-content ul  { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.history-content ul li,
.document-content ul li { margin-bottom: .4rem; }
.history-content .history-lead,
.document-content .document-lead {
    font-size: 1.1rem;
    color: var(--color-muted);
    border-left: 3px solid var(--color-accent);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

/* Result box w historiach */
.history-result-box {
    background: var(--color-success-bg);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
}
.history-result-box p { margin-bottom: .5rem; font-weight: var(--fw-semi); }
.history-result-box ul { list-style: none; padding: 0; margin: 0; }
.history-result-box ul li { padding: .25rem 0; border-bottom: 1px solid #d1fae5; font-size: .95rem; }
.history-result-box ul li:last-child { border-bottom: none; }

/* ===== ARTICLE LIST (PORADNIK) ===== */
.cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.cat-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: .85rem;
    font-weight: var(--fw-semi);
    color: var(--color-body);
    background: var(--color-bg);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
    white-space: nowrap;
}
.cat-filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.cat-filter-btn--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.cat-filter-btn--active:hover {
    background: var(--color-accent-h);
    border-color: var(--color-accent-h);
    color: #fff;
}
.cat-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.08);
    border-radius: 100px;
    font-size: .75rem;
    padding: 0 .45rem;
    min-width: 1.4rem;
    height: 1.4rem;
    line-height: 1;
}
.cat-filter-btn--active .cat-filter-count {
    background: rgba(255,255,255,.25);
}
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.article-card {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: .6rem;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.article-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}
.article-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}
.article-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: var(--fw-semi);
    padding: .2rem .65rem;
    border-radius: 100px;
    text-decoration: none;
    white-space: nowrap;
}
.article-date {
    font-size: .78rem;
    color: var(--color-muted);
    margin-left: auto;
    flex-shrink: 0;
}
.article-card-title {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--color-heading);
    margin: 0;
}
.article-card-title a {
    color: inherit;
    text-decoration: none;
}
.article-card-excerpt {
    font-size: .85rem;
    color: var(--color-muted);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}
.article-card-readmore {
    font-size: .82rem;
    color: var(--color-accent);
    font-weight: var(--fw-semi);
    margin-top: .25rem;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.pagination-info {
    font-size: .9rem;
    color: var(--color-muted);
    padding: 0 .5rem;
}

/* ===== DOCUMENT LIST PAGE ===== */
.doc-category-block {
    margin-bottom: 3rem;
}
.doc-category-header {
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}
.doc-category-title {
    font-size: 1.05rem;
    color: var(--color-heading);
    font-weight: var(--fw-semi);
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .25rem;
}
.doc-category-desc {
    font-size: .875rem;
    color: var(--color-muted);
    margin: 0;
    max-width: 560px;
}
.doc-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1.25rem;
}
.doc-card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.doc-card-body { flex: 1; }
.doc-card-title {
    font-size: .95rem;
    line-height: 1.4;
    margin-bottom: .6rem;
}
.doc-card-title a {
    color: var(--color-heading);
    text-decoration: none;
}
.doc-card-title a:hover { color: var(--color-accent); }
.doc-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Document note */
.document-note {
    background: var(--color-accent-bg);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    font-size: .9rem;
}

/* Stretched link (karta z pełnym obszarem klikalnym) */
.card--link-wrap { position: relative; }
.stretched-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* ===== TESTIMONIAL — featured (hub pages) ===== */
.testimonial--featured {
    background: var(--color-bg-alt);
    border: none;
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 2rem 2.5rem;
}
.testimonial--featured::before { display: none; }
.testimonial--featured .testimonial-text {
    font-size: 1.05rem;
    color: var(--color-body);
}
.testimonial--featured .testimonial-author {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}
.testimonial--featured .testimonial-author strong { color: var(--color-heading); }
.testimonial--featured .testimonial-author span  { color: var(--color-muted); font-size: .9rem; }
.testimonial-label {
    display: inline-block;
    background: var(--color-accent-bg);
    color: var(--color-accent);
    font-size: .75rem;
    font-weight: var(--fw-semi);
    padding: .2rem .65rem;
    border-radius: 100px;
    margin-left: .25rem;
}

/* ===== PARALLAX PREMIUM BACKGROUND (CONTACT SECTION) ===== */
#formularz.section {
    position: relative;
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.92)), url('../images/hero-home.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
}
#formularz.section h2,
#formularz.section .contact-info p,
#formularz.section .contact-hours,
#formularz.section .contact-badge {
    color: #f8fafc;
}
#formularz.section .contact-info h2 {
    color: #ffffff;
}
#formularz.section .section-label {
    color: var(--color-accent);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
#formularz.section .contact-phone {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}


/* ===== SEKCJA PROBLEMY Z T�EM PARALLAX ===== */
.section-problems-bg {
    position: relative;
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('../images/bg_problems_parallax.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
}
.section-problems-bg .section-header h2,
.section-problems-bg .section-header p {
    color: #f8fafc;
}
.section-problems-bg .section-header .section-label {
    color: var(--color-accent);
}
.section-problems-bg .card {
    background: rgba(255, 255, 255, 0.95);
}
.section-problems-bg .card > img {
    filter: brightness(0.82) contrast(1.05);
}

/* ===== AVATARY W OPINIACH ===== */
.testimonial-author-avatar {
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-right: 1rem;
    border: 2px solid var(--color-accent);
}

/* ===== GOOGLE REVIEWS SLIDER ===== */
.google-rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.google-rating-badge {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    padding: .5rem 1.25rem;
    font-size: .9rem;
    font-weight: var(--fw-semi);
    color: var(--color-heading);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.google-logo-svg { flex-shrink: 0; }

.reviews-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 2.5rem;
}
.reviews-slider-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
.reviews-slider-track {
    display: flex;
    gap: 1.25rem;
    transition: transform .4s cubic-bezier(.25,.8,.25,1);
    will-change: transform;
}
.review-card {
    width: 280px; /* fallback – overridden by JS */
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: box-shadow .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}
.review-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}
.review-card-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}
.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: var(--fw-bold);
    color: #fff;
    background: var(--av-color, #4285F4);
    flex-shrink: 0;
    letter-spacing: .02em;
}
.review-meta { flex: 1; min-width: 0; }
.review-name {
    font-weight: var(--fw-semi);
    color: var(--color-heading);
    font-size: .9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.review-date {
    font-size: .78rem;
    color: var(--color-muted);
    margin: .15rem 0 0;
}
.review-stars {
    color: #f59e0b;
    font-size: 1rem;
    letter-spacing: .05em;
    margin-bottom: .75rem;
}
.review-text {
    font-size: .88rem;
    color: var(--color-body);
    line-height: 1.65;
    flex: 1;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.review-link {
    display: inline-block;
    font-size: .8rem;
    color: var(--color-accent);
    font-weight: var(--fw-semi);
    text-decoration: none;
    margin-top: auto;
    transition: color .2s;
}
.review-link:hover { text-decoration: underline; }
.review-google-icon {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    opacity: .6;
}

.reviews-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: #fff;
    color: var(--color-heading);
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, border-color .2s, color .2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.reviews-arrow:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.reviews-arrow:disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

.reviews-dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.5rem;
}
.reviews-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.reviews-dot.is-active {
    background: var(--color-accent);
    transform: scale(1.25);
}

@media (max-width: 560px) {
    .reviews-arrow { display: none; }
}

/* === City grid (strona województwa) === */
.city-grid {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.city-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-heading);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.city-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(234,88,24,0.12);
}
.city-card:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(234,88,24,0.12);
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}
.city-card__name {
    font-weight: 600;
    font-size: 0.9rem;
}
.city-card__price {
    font-size: 0.75rem;
    color: var(--color-muted);
}

/* =================== BREADCRUMBS =================== */
.breadcrumb-nav {
    background: #f9fafb;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    margin-bottom: 2rem;
}
.breadcrumb-nav .container {
    padding: 0 1rem;
}
.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}
.breadcrumb li {
    display: inline-flex;
    align-items: center;
}
.breadcrumb li + li::before {
    content: "›";
    margin: 0 0.5rem 0 0;
    color: #9ca3af;
    font-weight: 600;
}
.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}
.breadcrumb a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}
.breadcrumb span[itemprop="name"] {
    color: #374151;
    font-weight: 600;
}
/* ================================================== */

/* =====================================================
   VALUATION HERO (strony miast)
   ===================================================== */
.hero--valuation {
    padding: 0;
    background: #fff;
    min-height: unset;
}

.valuation-hero-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    min-height: 580px;
}

.valuation-form-panel {
    padding: 2rem 2rem 2.5rem;
    overflow-y: auto;
}

.valuation-form-title {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 .4rem;
    line-height: 1.3;
}

.valuation-form-subtitle {
    font-size: .88rem;
    color: var(--color-muted);
    margin: 0 0 1.25rem;
}

.valuation-form {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

/* Rows */
.vf-row { display: grid; gap: .6rem; }
.vf-row--2 { grid-template-columns: 1fr 1fr; }
.vf-row--3 { grid-template-columns: repeat(3, 1fr); }
.vf-row--4 { grid-template-columns: repeat(4, 1fr); }

/* Field */
.vf-field { display: flex; flex-direction: column; gap: .25rem; }

.vf-label {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.vf-icon {
    flex-shrink: 0;
    color: var(--color-muted);
}

.vf-input,
.vf-select {
    width: 100%;
    padding: .5rem .65rem;
    border: 1px solid #e2e8f0;
    border-radius: calc(var(--radius) / 2);
    font-size: .85rem;
    color: var(--color-body);
    background: #fff;
    transition: border-color var(--transition);
    font-family: inherit;
    box-sizing: border-box;
}

.vf-input:focus,
.vf-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent);
}

.vf-input[readonly] {
    background: #f8f9fa;
    color: var(--color-muted);
}

/* Stepper */
.vf-stepper {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: calc(var(--radius) / 2);
    overflow: hidden;
    background: #fff;
}

.vf-stepper-btn {
    width: 32px;
    flex-shrink: 0;
    background: #f8f9fa;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-heading);
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.vf-stepper-btn:hover { background: #e2e8f0; }

.vf-stepper-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-heading);
    padding: .5rem 0;
    font-family: inherit;
    -moz-appearance: textfield;
    background: transparent;
}

.vf-stepper-input::-webkit-outer-spin-button,
.vf-stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.vf-stepper-input:focus { outline: none; }

/* Consents */
.vf-consents {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.vf-consent-label {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    font-size: .75rem;
    color: var(--color-muted);
    line-height: 1.5;
    cursor: pointer;
}

.vf-checkbox {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-top: .18rem;
    accent-color: var(--color-accent);
    cursor: pointer;
}

/* Submit button */
.vf-submit {
    width: 100%;
    letter-spacing: .1em;
    font-weight: 700;
    font-size: .95rem;
    padding: .85rem;
    margin-top: .25rem;
}

/* Photo panel */
.valuation-photo-panel {
    position: relative;
    background: var(--color-heading);
    overflow: hidden;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 960px) {
    .valuation-hero-grid {
        grid-template-columns: 1fr;
    }
    .valuation-photo-panel {
        display: none;
    }
    .vf-row--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .vf-row--2,
    .vf-row--3 { grid-template-columns: 1fr; }
    .vf-row--4 { grid-template-columns: repeat(2, 1fr); }
    .valuation-form-panel { padding: 1.25rem 1rem 2rem; }
}

/* ============ Property type cards (city pages) ============ */
.property-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.property-type-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.property-type-card:hover {
    box-shadow: 0 4px 16px rgba(234,88,24,.12);
    border-color: var(--color-accent);
}

.property-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff3ef;
    margin: 0 auto 1rem;
}

.property-type-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 .5rem;
}

.property-type-desc {
    font-size: .84rem;
    color: var(--color-muted);
    line-height: 1.55;
    margin: 0;
}

@media (max-width: 860px) {
    .property-types-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .property-types-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .property-type-card { padding: 1.1rem .85rem; }
}

/* ===== YOUTUBE FACADE ===== */
.yt-facade {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}
.yt-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}
.yt-facade:hover img { opacity: 0.85; }
.yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    pointer-events: none;
}
.yt-facade:hover .yt-play { transform: translate(-50%, -50%) scale(1.1); }
.yt-facade iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
