/* =========================================================================
   1. GLOBAL BASE — :root variables, reset, body, typography, animations
   ========================================================================= */

:root {
    --primary: #003576;
    --primary-hover: #00224d;
    --bg-color: #ffffff;
    --bg-alt: #f4f7f9;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-radius: 12px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* ANIMATIONS */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }


/* =========================================================================
   2. GLOBAL COMPONENTS — shared across templates, defined ONCE
   ========================================================================= */

/* --- Document list --- */
.excr-docs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.excr-docs li { background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: .2s; }
.excr-docs li:hover { border-color: #003576; box-shadow: 0 4px 14px rgba(0,53,118,0.08); }
.excr-docs a { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: inherit; }
.excr-docs .excr-doc-ico { width: 40px; height: 40px; border-radius: 8px; background: #f0f7ff; color: #003576; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.excr-docs .excr-doc-ico svg { width: 20px; height: 20px; }
.excr-docs .excr-doc-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.excr-docs .excr-doc-info strong { font-size: 15px; font-weight: 700; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.excr-docs .excr-doc-info small { font-size: 12px; color: #646970; font-weight: 500; }
.excr-docs .excr-doc-dl { font-size: 13px; font-weight: 700; color: #003576; padding: 8px 16px; border: 1px solid #003576; border-radius: 100px; flex-shrink: 0; }
.excr-docs li:hover .excr-doc-dl { background: #003576; color: #fff; }

/* --- Header (pill-style, fixed) --- */
header {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1100px; height: 60px;
    background: rgba(255,255,255,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 100px; box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    z-index: 1000; display: flex; justify-content: space-between; align-items: center;
    padding: 0 12px 0 30px; transition: var(--transition);
}
.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo img { height: 27px; width: auto; display: block; }

/* Header badge variant */
.header--badge {
    padding-right: 12px;
    background: #1D4B84;
    border: 1px solid rgba(94,197,237,0.40);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 0 8px 32px rgba(0,53,118,0.35);
}
.header--badge .logo img { filter: brightness(0) invert(1); }
.header--badge nav a {
    color: #ffffff; font-weight: 700;
    font-size: 14px;
}
.header--badge nav a:hover { color: #5ec5ed; font-weight: 800; }
.header--badge .nav-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: #5ec5ed; color: #003576 !important;
    padding: 10px 24px; border-radius: 100px;
    font-size: 14px; font-weight: 700;
    border: 1px solid #5ec5ed;
    box-shadow: 0 0 0 1px rgba(94,197,237,0.25), 0 10px 30px rgba(0,53,118,0.45);
    transition: var(--transition);
    text-decoration: none;
}
.header--badge .nav-cta .arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,53,118,0.18); color: #003576; font-size: 12px;
    transition: transform 0.3s ease;
}
.header--badge .nav-cta:hover {
    color: #003576 !important;
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(94,197,237,0.5), 0 0 50px rgba(94,197,237,0.5), 0 18px 44px rgba(0,53,118,0.7);
}
.header--badge .nav-cta:hover .arrow { background: rgba(0,53,118,0.3); transform: translateX(6px); }

/* --- Nav --- */
nav ul { display: flex; list-style: none; align-items: center; gap: 20px; margin-right: 0; }
nav a {
    text-decoration: none; color: var(--text-main); font-weight: 600;
    font-size: 14px; transition: var(--transition);
    white-space: nowrap; position: relative; cursor: pointer;
}
nav a:hover { color: var(--primary); font-weight: 800; }
.nav-active {
    color: white !important; background: var(--primary); padding: 8px 18px;
    border-radius: 100px; font-weight: 700 !important;
}
.nav-active::after { display: none; }
.nav-active:hover { color: white !important; }

/* --- Hamburger --- */
.excr-hamburger {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px 0 8px 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1100;
    margin-left: auto;
}
.excr-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.excr-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.excr-hamburger.is-open span:nth-child(2) { opacity: 0; }
.excr-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Footer --- */
footer { background: #0f172a; color: white; padding: 80px 5% 30px 5%; }
.footer-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto; text-align: left; }
.footer-column h4 { font-size: 16px; color: white; margin-bottom: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 12px; }
.footer-column a { color: #94a3b8; text-decoration: none; transition: color 0.2s; font-size: 14px; font-weight: 500; }
.footer-column a:hover { color: white; }
.footer-column p { color: #94a3b8; font-size: 14px; margin-bottom: 8px; line-height: 1.6; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 50px; padding-top: 30px; color: #475569; font-size: 13px; }

/* --- Forms --- */
.form-section-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center; max-width: 1200px; margin: 0 auto;
}
.form-info h2 { font-size: 34px; font-weight: 800; color: var(--primary); margin-bottom: 20px; line-height: 1.2; letter-spacing: -0.5px; }
.form-info > p { font-size: 16px; color: var(--text-muted); line-height: 1.7; margin-bottom: 30px; }
.form-benefits { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.form-benefits li {
    display: flex; align-items: center; gap: 14px;
    font-size: 15px; color: var(--text-main); line-height: 1.5;
}
.form-benefits-icon {
    width: 32px; height: 32px; min-width: 32px; border-radius: 8px; background: rgba(0,53,118,0.08);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.form-benefits-icon svg { width: 16px; height: 16px; color: var(--primary); }
.form-container {
    background: var(--surface); padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
}
.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-main); font-size: 15px; }
.form-input {
    width: 100%; padding: 15px 18px; border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: 16px; background: var(--bg-alt); transition: var(--transition);
    font-family: inherit;
}
.form-input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(0,53,118,0.08); }
.rodo-container { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; margin-bottom: 20px; text-align: left; }
.rodo-header { display: flex; align-items: center; gap: 10px; }
.rodo-header input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.rodo-header label { font-size: 13px; color: var(--text-main); line-height: 1.4; cursor: pointer; }
.rodo-toggle { color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: underline; margin-left: 5px; }
.rodo-content { max-height: 0; overflow-y: auto; transition: max-height 0.4s ease; font-size: 11px; color: var(--text-muted); line-height: 1.5; margin-top: 0; }
.rodo-content.open { max-height: 60px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e2e8f0; }

/* --- Sections --- */
section { padding: 80px 5%; }
.section-alt { background-color: var(--bg-alt); }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 38px; font-weight: 800; margin-bottom: 12px; text-align: center; color: var(--primary); letter-spacing: -0.5px; }
.section-subtitle { text-align: center; color: var(--text-muted); max-width: 700px; margin: 0 auto 50px auto; font-size: 18px; line-height: 1.7; }

/* --- Hero --- */
.hero {
    height: 65vh; min-height: 500px; max-height: 650px;
    display: flex; align-items: center; justify-content: center;
    padding: 80px 5% 40px; position: relative; text-align: center;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,20,50,0.8) 0%, rgba(0,0,0,0.35) 50%, rgba(0,10,30,0.75) 100%);
}
.hero-content { position: relative; z-index: 10; color: white; max-width: 960px; }
.hero-content h1 {
    font-size: 42px; font-weight: 800; margin-bottom: 20px; line-height: 1.15;
    text-shadow: 0 8px 30px rgba(0,0,0,0.5); letter-spacing: -1.5px;
}
.hero-content p { font-size: 20px; opacity: 0.95; text-shadow: 0 4px 12px rgba(0,0,0,0.5); line-height: 1.6; }

/* Hero gateway variant */
.hero.hero--gateway {
    background: radial-gradient(ellipse at 50% 55%, rgba(94,197,237,0.22) 0%, rgba(94,197,237,0.08) 35%, rgba(0,53,118,0) 70%), #003576 !important;
}
.hero--gateway::before { display: none; }
.hero--gateway .hero-content h1 { text-shadow: none; line-height: 1.35; }
.hero--gateway .hero-content p { text-shadow: none; opacity: 1; color: rgba(255,255,255,0.70); }
.gateway-btn.hero--gateway-btn {
    margin-top: 30px;
    background: #5ec5ed;
    color: #003576; border: 1px solid #5ec5ed;
    box-shadow: 0 0 0 1px rgba(94,197,237,0.25), 0 10px 30px rgba(0,53,118,0.45);
    text-decoration: none;
}
.gateway-btn.hero--gateway-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 0 2px rgba(94,197,237,0.5), 0 0 50px rgba(94,197,237,0.5), 0 18px 44px rgba(0,53,118,0.7);
}
.gateway-btn.hero--gateway-btn .arrow { background: rgba(0,53,118,0.18); color: #003576; }
.gateway-btn.hero--gateway-btn:hover .arrow { background: rgba(0,53,118,0.3); transform: translateX(6px); }

/* --- Hero komisy (pomarańczowy) --- */
.hero--komisy {
    background: radial-gradient(ellipse at 50% 55%, rgba(255,200,100,0.35) 0%, rgba(255,180,60,0.15) 35%, rgba(240,125,20,0) 70%), #f07d14 !important;
}
.hero--komisy::before { display: none; }
.hero--komisy .hero-content h1 { color: #ffffff; text-shadow: none; line-height: 1.35; }
.hero--komisy .hero-content p { color: rgba(255,255,255,0.80); text-shadow: none; opacity: 1; }
.gateway-btn.hero--komisy-btn {
    margin-top: 30px;
    background: rgba(255,255,255,0.15); color: #ffffff;
    border: 1px solid rgba(255,255,255,0.40);
    box-shadow: none;
    text-decoration: none;
}
.gateway-btn.hero--komisy-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.gateway-btn.hero--komisy-btn .arrow { background: rgba(255,255,255,0.25); color: #ffffff; }
.gateway-btn.hero--komisy-btn:hover .arrow { background: rgba(255,255,255,0.4); transform: translateX(6px); }

/* --- Header komisy (pomarańczowy badge) --- */
.header--komisy {
    padding-right: 12px;
    background: #F8E1D5;
    border: 1px solid rgba(240,125,20,0.40);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 0 8px 32px rgba(240,125,20,0.12);
}
.header--komisy nav a {
    color: #003576; font-weight: 700; font-size: 14px;
}
.header--komisy nav a:hover { color: #f07d14; font-weight: 800; }
.header--komisy .nav-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: #f07d14; color: #ffffff !important;
    padding: 10px 24px; border-radius: 100px;
    font-size: 14px; font-weight: 700;
    border: 1px solid #f07d14;
    box-shadow: 0 0 0 1px rgba(240,125,20,0.25), 0 10px 30px rgba(240,125,20,0.40);
    transition: var(--transition); text-decoration: none;
}
.header--komisy .nav-cta .arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,0.25); color: #ffffff; font-size: 12px;
    transition: transform 0.3s ease;
}
.header--komisy .nav-cta:hover {
    color: #ffffff !important; transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(240,125,20,0.5), 0 0 60px rgba(240,125,20,0.6), 0 18px 44px rgba(240,125,20,0.65);
}
.header--komisy .nav-cta:hover .arrow { background: rgba(255,255,255,0.5); transform: translateX(6px); }

/* --- h1-badge --- */
.h1-badge {
    background: rgba(94,197,237,0.12); color: #5ec5ed;
    border: 1px solid rgba(94,197,237,0.40);
    border-radius: 100px;
    font-size: inherit; font-weight: inherit; letter-spacing: inherit;
    padding: 2px 24px;
    white-space: nowrap;
}
.hero--komisy .h1-badge {
    background: rgba(255,255,255,0.15); color: #ffffff;
    border: 1px solid rgba(255,255,255,0.40);
}

/* --- Buttons --- */
/* Default .btn: cyan (wynajem style) */
.btn {
    display: inline-block; padding: 12px 28px;
    background: #5ec5ed; color: #003576;
    border: 1px solid #5ec5ed; border-radius: 100px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    text-decoration: none; transition: var(--transition); text-align: center;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0,53,118,0.18);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,53,118,0.28); }

/* .btn--primary: dark (komisy style) */
.btn--primary {
    background: var(--primary); color: white;
    border: none;
    box-shadow: none;
}
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,53,118,0.25); }

/* --- Gateway button and variants --- */
.gateway-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 34px; border-radius: 100px;
    font-size: 15px; font-weight: 700; transition: var(--transition);
    letter-spacing: 0.3px; text-decoration: none; color: inherit;
}
.gateway-btn .arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,0.25); font-size: 12px;
    transition: transform 0.3s ease;
}

/* --- Why section (steps / features) --- */
.why-section {
    background: radial-gradient(ellipse at 50% 55%, rgba(94,197,237,0.22) 0%, rgba(94,197,237,0.08) 35%, rgba(0,53,118,0) 70%), #003576;
    border-radius: 0; padding: 80px 5%;
    color: white; position: relative; overflow: hidden;
}
.why-section::before { display: none; }
.why-section .section-title { color: white; }
.why-section .section-subtitle { color: rgba(255,255,255,0.7); }

/* Steps (wynajem) */
.steps-wrapper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; position: relative; z-index: 1; }
.step-card {
    background: rgba(255,255,255,0.08); padding: 32px 28px; border-radius: 14px;
    text-align: left; transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(4px);
    display: flex; flex-direction: column;
}
.step-card:hover { background: rgba(255,255,255,0.14); transform: translateY(-4px); border-color: rgba(255,255,255,0.2); }
.step-icon {
    width: 56px; height: 56px; background: rgba(255,255,255,0.12); border-radius: 14px;
    display: flex; align-items: center; justify-content: center; color: white;
    margin-bottom: 20px;
}
.step-icon svg { width: 26px; height: 26px; }
.step-card h4 { font-size: 16px; color: white; margin-bottom: 12px; font-weight: 700; }
.step-card p { font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.7; }

/* Features (komisy) */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; z-index: 1; }
.feature-card {
    background: rgba(255,255,255,0.08); padding: 32px 28px; border-radius: 14px;
    text-align: left; transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(4px);
}
.feature-card:hover { background: rgba(255,255,255,0.14); transform: translateY(-4px); border-color: rgba(255,255,255,0.2); }
.feature-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: rgba(255,255,255,0.12); display: flex; align-items: center;
    justify-content: center; margin-bottom: 20px;
}

/* --- Form agent (handlowiec) — kwadratowe zdjęcie pod tekstem, dolna krawędź formularza --- */
.form-section-grid { align-items: stretch !important; }
.form-info { display: flex; flex-direction: column; }
.form-agent {
    margin-top: auto;
    padding-top: 30px;
    display: flex; justify-content: flex-start;
}
.form-agent-img {
    width: 100%; max-width: 420px; aspect-ratio: 1 / 1;
    object-fit: cover; border-radius: var(--border-radius);
    display: block;
}
.feature-card h3 { font-size: 20px; margin-bottom: 12px; color: white; font-weight: 700; }
.feature-card p { color: rgba(255,255,255,0.7); line-height: 1.7; font-size: 15px; }

/* --- SEO sections --- */
.seo-block { padding: 0; }
.seo-block h4 { font-size: 16px; color: var(--text-main); margin-bottom: 12px; font-weight: 700; }
.seo-block p { font-size: 14px; color: var(--text-muted); line-height: 1.8; column-count: 2; column-gap: 40px; text-align: left; }
.seo-dark { background: radial-gradient(ellipse at 50% 55%, rgba(94,197,237,0.22) 0%, rgba(94,197,237,0.08) 35%, rgba(0,53,118,0) 70%), #003576; padding: 60px 5%; }
.seo-dark h4 { font-size: 28px; color: #fff; font-weight: 800; margin-bottom: 24px; letter-spacing: -0.3px; }
.seo-dark-cols { column-count: 2; column-gap: 40px; font-size: 14px; color: rgba(255,255,255,0.70); line-height: 1.8; }
.seo-dark p { color: rgba(255,255,255,0.70); margin-bottom: 10px; }
.seo-dark--komisy {
    background: radial-gradient(ellipse at 50% 55%, rgba(255,200,100,0.35) 0%, rgba(255,180,60,0.15) 35%, rgba(240,125,20,0) 70%), #f07d14;
}

/* --- Car cards --- */
.cars-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; padding-bottom: 30px; }
.car-card {
    background: var(--surface); border-radius: var(--border-radius); overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.02);
    transition: var(--transition); border: 1px solid rgba(0,0,0,0.04);
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.car-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(0,0,0,0.1); border-color: var(--primary); }
.car-img-wrapper { position: relative; overflow: hidden; }
.car-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.6s ease; }
.car-card:hover .car-img { transform: scale(1.05); }
.car-badge {
    position: absolute; top: 15px; left: 15px;
    background: #5ec5ed; color: #003576;
    border: none;
    padding: 6px 14px;
    border-radius: 100px; font-size: 12px; font-weight: 700;
    letter-spacing: 0.5px;
}
.car-badge--orange {
    background: #f07d14; color: #ffffff;
}
.car-info { display: flex; flex-direction: row; flex-grow: 1; }
.car-info-left {
    flex: 0 0 60%; padding: 24px; display: flex; flex-direction: column;
    justify-content: flex-start; position: relative;
}
.car-info-left .btn {
    margin-top: auto; align-self: flex-start;
    padding: 10px 24px; font-size: 13px;
}
.car-info-right {
    flex: 0 0 40%; padding: 24px; display: flex; flex-direction: column;
    justify-content: center;
}
.car-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.3px; }
.car-specs {
    display: flex; flex-direction: column; gap: 8px;
    font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.car-specs span { display: flex; align-items: center; gap: 8px; }
.car-specs svg { width: 15px; height: 15px; fill: var(--text-muted); opacity: 0.6; flex-shrink: 0; }

/* --- Modal --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
    z-index: 2000; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; }
.modal-content {
    background: var(--surface); padding: 40px; border-radius: 16px;
    width: 90%; max-width: 550px; position: relative;
    transform: translateY(20px); transition: transform 0.3s ease;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2); max-height: 90vh; overflow-y: auto;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 15px; right: 20px; background: none;
    border: none; font-size: 28px; color: var(--text-muted); cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--primary); }

/* --- Gallery --- */
.gallery-section { padding-top: 100px; padding-bottom: 0; }
.gallery-wrapper { width: 90%; max-width: 1200px; margin: 0 auto; }
.gallery-main {
    position: relative; width: 100%; aspect-ratio: 3 / 2;
    border-radius: 16px; overflow: hidden; background: #cbd5e1;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.gallery-track {
    display: flex; width: 100%; height: 100%;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.gallery-track img {
    width: 100%; height: 100%; object-fit: cover; cursor: pointer;
    flex: 0 0 100%;
}
.gallery-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.45); color: white; border: none;
    width: 50px; height: 50px; border-radius: 50%; font-size: 24px;
    cursor: pointer; transition: all 0.3s; display: flex; justify-content: center;
    align-items: center; z-index: 10; backdrop-filter: blur(4px);
}
.gallery-btn:hover { background: rgba(0,0,0,0.75); transform: translateY(-50%) scale(1.1); }
.gallery-btn.prev { left: 20px; }
.gallery-btn.next { right: 20px; }
.gallery-fullscreen-icon {
    position: absolute; bottom: 20px; right: 20px;
    background: rgba(0,0,0,0.45); color: white; border: none;
    padding: 10px 18px; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 600; backdrop-filter: blur(5px);
    z-index: 10; transition: all 0.3s;
}
.gallery-fullscreen-icon:hover { background: rgba(0,0,0,0.75); }
.gallery-thumbnails {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 10px; margin-top: 12px; justify-items: start;
}
.gallery-thumbnails img {
    width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px;
    cursor: pointer; border: 3px solid transparent; opacity: 0.5;
    transition: all 0.3s;
}
.gallery-thumbnails img:hover { opacity: 0.8; }
.gallery-thumbnails img.active { border-color: var(--primary); opacity: 1; }

/* Lightbox */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 3000; display: none;
    align-items: center; justify-content: center;
}
.lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; background: none; border: none; transition: transform 0.2s; }
.lightbox-close:hover { transform: scale(1.2); }
.lightbox-img { max-width: 90%; max-height: 90vh; object-fit: contain; border-radius: 8px; }

/* --- Report / single page --- */
body.single-oferta_wynajmu, body.single-oferta_komis { background-color: var(--bg-alt); }

.report-section { padding: 40px 0 30px; }
.report-wrapper { width: 90%; max-width: 1200px; margin: 0 auto; }
.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: 14px; color: var(--text-muted); margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); font-weight: 500; }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text-main); font-weight: 600; }
.report-container {
    background: var(--surface); border-radius: 16px; padding: 40px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
}
.report-header {
    margin-bottom: 40px; border-bottom: 1px solid #eee; padding-bottom: 30px;
    display: flex; gap: 30px; align-items: stretch;
}
.report-header-left {
    flex: 0 0 60%; display: flex; flex-direction: column; justify-content: flex-start;
    position: relative;
}
.report-header-left::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0;
    width: 1px; background: rgba(0,0,0,0.06);
}
.report-header-right {
    flex: 0 0 calc(40% - 30px); display: flex; flex-direction: column; gap: 10px;
    justify-content: flex-start;
}
.report-header-title h1 { font-size: 30px; margin-bottom: 12px; color: var(--text-main); letter-spacing: -0.5px; }
.report-header-title p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.car-specs-row {
    display: flex; flex-wrap: wrap; gap: 22px;
    font-size: 14px; color: var(--text-muted); font-weight: 500;
}
.car-specs-row span { display: inline-flex; align-items: center; gap: 8px; }
.car-specs-row svg { width: 16px; height: 16px; fill: var(--text-muted); opacity: 0.7; flex-shrink: 0; }
.report-price-card {
    padding: 16px 22px; border-radius: 12px; text-align: center;
}
.report-price-card.secondary { background: var(--bg-alt); border: 1px solid #eee; }
.report-price-card.primary { background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%); border: 1px solid #cce0ff; }
.report-price-card .label {
    font-size: 14px; text-transform: uppercase; font-weight: 700;
    color: var(--text-muted); margin-bottom: 4px; display: block;
}
.report-price-card.primary .label { color: var(--primary); font-weight: 800; }
.report-price-card .value { font-size: 22px; font-weight: 800; color: var(--text-main); line-height: 1.1; }
.report-price-card.primary .value { color: var(--primary); font-size: 24px; }
.report-price-card .value span { font-size: 13px; font-weight: 600; }
.report-price-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.report-price-card .hint { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.report-price-card.small { padding: 12px 18px; }
.report-price-card.small .value { font-size: 16px; }
.report-price-card.small .label { font-size: 14px; }
.report-price-card.small .sub { font-size: 11px; }

.report-header-price { text-align: right; display: flex; gap: 15px; align-items: stretch; justify-content: flex-end; flex-wrap: wrap; }
.price-box {
    padding: 15px 20px; border-radius: 12px; display: flex;
    flex-direction: column; justify-content: center; text-align: right;
}
.price-box-buyout { background: var(--bg-alt); border: 1px solid #eee; }
.price-box-rent {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    border: 1px solid #cce0ff; text-align: center;
    box-shadow: 0 5px 15px rgba(0,53,118,0.05);
}
.price-box .label {
    font-size: 11px; text-transform: uppercase; font-weight: 700;
    color: var(--text-muted); margin-bottom: 4px; display: block;
}
.price-box-rent .label { font-weight: 800; color: var(--primary); letter-spacing: 0.5px; font-size: 12px; }
.price-box .value { font-size: 18px; font-weight: 800; color: var(--text-main); line-height: 1.1; }
.price-box .value span { font-size: 14px; font-weight: 600; }
.price-box-rent .value { font-size: 28px; color: var(--primary); }
.price-box-rent .value span { font-size: 14px; font-weight: 700; }
.price-box .sub { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.price-box-rent .sub { color: #476282; }

.report-section-block { margin-bottom: 40px; }
.report-section-block h3 {
    border-bottom: 2px solid var(--primary); display: inline-block;
    padding-bottom: 5px; margin-bottom: 20px; font-size: 20px; color: var(--text-main);
}
.report-row {
    display: flex; gap: 30px; align-items: flex-start;
}
.report-row-left {
    flex: 0 0 60%; position: relative; padding-right: 30px;
}
.report-row-left::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0;
    width: 1px; background: rgba(0,0,0,0.06);
}
.report-data-block { margin-top: 0; }
.report-docs-block { margin-top: 30px; }
.report-desc-block { margin-top: 30px; }
.report-row-right {
    flex: 1; align-self: stretch;
}
.sticky-price-box {
    position: sticky; top: 100px;
    display: flex; flex-direction: column; gap: 12px;
}
.data-table {
    width: 100%; border-collapse: collapse; table-layout: fixed;
}
.data-table tr { border-bottom: 1px solid rgba(0,0,0,0.06); }
.data-table tr:last-child { border-bottom: none; }
.data-table td {
    padding: 12px 0; font-size: 14px; vertical-align: middle;
}
.data-table td:first-child {
    color: var(--text-muted); font-size: 13px; font-weight: 500;
    width: 40%;
}
.data-table td:last-child {
    font-weight: 600; color: var(--text-main);
}
.paint-box {
    background: var(--bg-alt); padding: 25px; border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.04);
}
.paint-box p { margin-bottom: 10px; font-size: 15px; }
.paint-box p:last-child { margin-bottom: 0; }
.paint-ok { color: #16a34a; font-weight: bold; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-grid img {
    width: 100%; height: 180px; object-fit: cover; border-radius: 10px;
    cursor: pointer; transition: all 0.3s; border: 1px solid rgba(0,0,0,0.04);
}
.photo-grid img:hover { transform: scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,0.1); }
.report-actions {
    margin-top: 20px; text-align: center;
}


/* =========================================================================
   3. PAGE-SPECIFIC OVERRIDES — only what's unique per template
   ========================================================================= */

/* --- Index / gateway --- */
header.home-header {
    position: absolute !important;
    top: 28px !important;
    left: 40px !important;
    right: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    z-index: 1000;
}
header.home-header .logo img { filter: brightness(0) invert(1); height: 30px; }

/* Gateway hero */
.gateway-hero {
    display: flex; width: 100%; height: 100vh; min-height: 600px;
    padding: 0; margin: 0; position: relative; overflow: hidden;
}
.gateway-panel {
    flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); overflow: hidden;
    text-decoration: none;
}
.gateway-panel:hover { flex: 1.3; }
.gateway-bg { position: absolute; inset: 0; transition: background 0.6s ease; }
.gateway-panel--dark .gateway-bg {
    background: radial-gradient(ellipse at 50% 55%, rgba(94,197,237,0.22) 0%, rgba(94,197,237,0.08) 35%, rgba(0,53,118,0) 70%), #003576;
}
.gateway-panel--light .gateway-bg {
    background: radial-gradient(ellipse at 50% 55%, rgba(240,125,20,0.18) 0%, rgba(240,125,20,0.06) 35%, rgba(244,244,244,0) 70%), #f4f4f4;
}
.gateway-content {
    position: relative; z-index: 10; text-align: center;
    padding: 40px; max-width: 540px; width: 540px;
}
.gateway-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 20px; border-radius: 100px;
    font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; margin-bottom: 28px;
    line-height: 1;
}
.gateway-panel--dark .gateway-badge {
    background: rgba(94,197,237,0.12); color: #5ec5ed;
    border: 1px solid rgba(94,197,237,0.40);
}
.gateway-panel--light .gateway-badge {
    background: rgba(240,125,20,0.10); color: #f07d14;
    border: 1px solid rgba(240,125,20,0.40);
}
.gateway-content h2 {
    font-size: 56px; font-weight: 800; margin-bottom: 22px; line-height: 1.05;
    letter-spacing: -1.5px;
}
.gateway-content h2 .accent { display: block; }
.gateway-panel--dark .gateway-content h2 { color: #ffffff; }
.gateway-panel--dark .gateway-content h2 .accent { color: #5ec5ed; }
.gateway-panel--light .gateway-content h2 { color: #003576; }
.gateway-panel--light .gateway-content h2 .accent { color: #f07d14; }
.gateway-content p {
    font-size: 14px; margin-bottom: 34px; letter-spacing: 0.3px;
}
.gateway-panel--dark .gateway-content p { color: rgba(255,255,255,0.70); }
.gateway-panel--light .gateway-content p { color: rgba(0,53,118,0.70); }
.gateway-panel:hover .gateway-btn .arrow { transform: translateX(4px); }
.gateway-panel--dark .gateway-btn {
    background: #5ec5ed;
    color: #003576; border: 1px solid #5ec5ed;
    box-shadow: 0 0 0 1px rgba(94,197,237,0.25), 0 10px 30px rgba(0,53,118,0.45);
}
.gateway-panel--dark:hover .gateway-btn {
    transform: translateY(-3px);
    box-shadow: 0 0 0 1px rgba(94,197,237,0.4), 0 14px 36px rgba(0,53,118,0.6);
}
.gateway-panel--dark .gateway-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 0 2px rgba(94,197,237,0.5), 0 0 50px rgba(94,197,237,0.5), 0 18px 44px rgba(0,53,118,0.7);
}
.gateway-panel--dark .gateway-btn .arrow { background: rgba(0,53,118,0.18); color: #003576; }
.gateway-panel--dark .gateway-btn:hover .arrow { background: rgba(0,53,118,0.3); transform: translateX(6px); }
.gateway-panel--light .gateway-btn {
    background: #f07d14;
    color: #ffffff; border: 1px solid #f07d14;
    box-shadow: 0 0 0 1px rgba(240,125,20,0.25), 0 10px 30px rgba(240,125,20,0.40);
}
.gateway-panel--light:hover .gateway-btn {
    transform: translateY(-3px);
    box-shadow: 0 0 0 1px rgba(240,125,20,0.4), 0 14px 36px rgba(240,125,20,0.55);
}
.gateway-panel--light .gateway-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 0 2px rgba(240,125,20,0.5), 0 0 60px rgba(240,125,20,0.6), 0 18px 44px rgba(240,125,20,0.65);
}
.gateway-panel--light .gateway-btn:hover .arrow { background: rgba(255,255,255,0.5); transform: translateX(6px); }
.gateway-label {
    position: absolute; bottom: 32px; left: 0; right: 0;
    text-align: center; font-size: 11px; font-weight: 700;
    letter-spacing: 4px; text-transform: uppercase; z-index: 10;
}
.gateway-panel--dark .gateway-label { color: rgba(94,197,237,0.25); }
.gateway-panel--light .gateway-label { color: rgba(0,53,118,0.25); }

/* Index: section padding override (100px vs 80px on subpages) */
/* Note: on the index page, section uses 100px padding via the gateway template */

/* Bento grid (index only) */
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.bento-item {
    background: var(--bg-alt); border-radius: var(--border-radius); padding: 30px;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.04); display: flex; flex-direction: column;
    justify-content: center; transition: var(--transition);
}
.bento-item:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.bento-text { grid-area: 1 / 1 / 3 / 3; justify-content: flex-start; }
.bento-text:hover { transform: none; }
.bento-stat-1 { grid-area: 1 / 3 / 2 / 4; align-items: center; text-align: center; background: var(--bg-alt); }
.bento-img { grid-area: 1 / 4 / 3 / 5; padding: 0; overflow: hidden; position: relative; }
.bento-stat-2 { grid-area: 2 / 3 / 3 / 4; align-items: center; text-align: center; background: radial-gradient(ellipse at 50% 55%, rgba(94,197,237,0.22) 0%, rgba(94,197,237,0.08) 35%, rgba(0,53,118,0) 70%), #003576; color: white; border: none; }
.bento-seo { grid-column: 1 / -1; background: var(--bg-alt); padding: 40px; align-items: flex-start; }
.bento-text h3 { font-size: 28px; color: var(--primary); margin-bottom: 20px; letter-spacing: -0.3px; }
.bento-text p { font-size: 16px; color: var(--text-muted); margin-bottom: 15px; line-height: 1.7; }
.stat-num { font-size: 48px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 5px; }
.stat-desc { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.bento-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.bento-img:hover img { transform: scale(1.05); }
.bento-stat-2 .stat-num { color: white; }
.bento-stat-2 .stat-desc { color: rgba(255,255,255,0.8); }
.bento-seo h3 { font-size: 28px; color: var(--primary); font-weight: 700; margin: 18px 0 20px; line-height: 1.3; letter-spacing: -0.3px; }
.bento-seo h3:first-child { margin-top: 0; }
.bento-seo h4 { font-size: 16px; color: var(--text-main); font-weight: 700; margin: 24px 0 6px; line-height: 1.4; }
.bento-seo h4:first-child { margin-top: 0; }
.bento-seo h5 { font-size: 15px; color: var(--text-main); font-weight: 700; margin: 24px 0 6px; line-height: 1.4; }
.bento-seo h5:first-child { margin-top: 0; }
.bento-seo p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 15px; }
.bento-seo .seo-columns { column-count: 2; column-gap: 40px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* --- Wynajem --- */
/* scroll-padding for anchor links */
body.post-type-archive-oferta_wynajmu html,
body.post-type-archive-oferta_wynajmu { }
/* NOTE: scroll-padding-top is set via media-query-free rule below for wynajem/komisy/single */

/* Hero background */
.hero--wynajem {
    background: url('../img/najem-naglowek.jpg') center 40%/cover no-repeat;
}

/* Car pricing (wynajem-specific) */
.b2c-rent-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    padding: 14px; border-radius: 10px; border: 1px solid #cce0ff;
    text-align: center; transition: var(--transition); margin-bottom: 8px;
}
.car-card:hover .b2c-rent-box { box-shadow: 0 5px 15px rgba(0,53,118,0.1); border-color: #a8ccff; }
.b2c-rent-label { font-size: 14px; text-transform: uppercase; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; margin-bottom: 3px; }
.b2c-rent-hint { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.b2c-rent-gross { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.b2c-rent-gross span { font-size: 12px; font-weight: 600; display: block; margin-top: 2px; }
.b2c-rent-net { font-size: 11px; color: #476282; font-weight: 500; margin-top: 3px; }
.b2c-buyout-box {
    background: var(--bg-alt); padding: 10px 12px; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    margin-bottom: 0;
}
.b2c-buyout-label { font-size: 14px; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.b2c-buyout-val { font-size: 13px; font-weight: 700; color: var(--text-main); }
.b2c-buyout-val span { font-size: 11px; color: var(--text-muted); font-weight: 500; display: block; margin-top: 3px; }

/* --- Komisy --- */
/* Hero background */
.hero--komisy {
    background: url('../img/komisy-naglowek.jpg') center 60%/cover no-repeat;
}

/* Komisy why-section: pomarańczowe tło */
body.page-template-page-komisy .why-section {
    background: radial-gradient(ellipse at 50% 55%, rgba(255,200,100,0.35) 0%, rgba(255,180,60,0.15) 35%, rgba(240,125,20,0) 70%), #f07d14;
}
body.page-template-page-komisy .why-section .section-title { color: #ffffff; }
body.page-template-page-komisy .why-section .section-subtitle { color: rgba(255,255,255,0.80); }
body.page-template-page-komisy .feature-card h3 { color: #ffffff; }
body.page-template-page-komisy .feature-card p { color: rgba(255,255,255,0.70); }
body.page-template-page-komisy .feature-card {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
}
body.page-template-page-komisy .feature-icon {
    background: #f07d14;
}

/* Komisy .btn override — pomarańczowe jak gateway-panel--light */
body.page-template-page-komisy .btn,
body.post-type-archive-oferta_komis .btn,
body.single-oferta_komis .btn {
    background: #f07d14; color: #ffffff;
    border: 1px solid #f07d14;
    box-shadow: 0 4px 14px rgba(240,125,20,0.25);
}
body.page-template-page-komisy .btn:hover,
body.post-type-archive-oferta_komis .btn:hover,
body.single-oferta_komis .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(240,125,20,0.35);
}

/* Komisy car-info-right: wyrównanie do góry */
body.page-template-page-komisy .car-info-right,
body.post-type-archive-oferta_komis .car-info-right {
    justify-content: flex-start;
    padding-top: 24px;
}

/* Komisy car-specs i button: spacing jak w najmie */
body.page-template-page-komisy .car-specs,
body.post-type-archive-oferta_komis .car-specs {
    margin-bottom: 20px;
}
body.page-template-page-komisy .car-info-left .btn,
body.post-type-archive-oferta_komis .car-info-left .btn {
    margin-top: 20px;
}

/* Process timeline (komisy) */
.process { display: flex; gap: 0; margin-top: 60px; position: relative; }
.process-step {
    flex: 1; text-align: center; position: relative; padding: 0 20px;
}
.process-step::after {
    content: ''; position: absolute; top: 32px; left: calc(50% + 36px); right: calc(-50% + 36px);
    height: 2px; background: rgba(240,125,20,0.30);
}
.process-step:last-child::after { display: none; }
.process-top {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 8px;
    position: relative; z-index: 2;
}
.process-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: #f07d14; color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(240,125,20,0.3);
    transition: var(--transition);
}
.process-step:hover .process-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(240,125,20,0.4);
}
.process-icon svg { width: 26px; height: 26px; }
.process-num {
    font-size: 12px; font-weight: 800; color: var(--primary);
    margin-top: 14px; letter-spacing: 1px;
}
.process-step h4 { font-size: 18px; color: var(--text-main); margin-bottom: 6px; font-weight: 700; }
.process-step p { font-size: 14px; color: var(--text-muted); line-height: 1.7; max-width: 240px; margin: 0 auto; }

/* Komisy price-wrapper / grid-price-label / car-price */
.price-wrapper {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    padding: 14px; border-radius: 10px; border: 1px solid #cce0ff;
    text-align: center; transition: var(--transition);
}
.car-card:hover .price-wrapper { box-shadow: 0 5px 15px rgba(0,53,118,0.1); border-color: #a8ccff; }
.grid-price-label { font-size: 10px; color: var(--primary); text-transform: uppercase; font-weight: 800; display: block; margin-bottom: 3px; letter-spacing: 0.5px; }
.car-price { font-size: 24px; color: var(--primary); font-weight: 800; }

/* --- Komisy-single: report-header align-items differs --- */
body.single-oferta_komis .report-header {
    align-items: flex-start;
}

/* --- Wynajem/Komisy/Single: scroll-padding-top --- */
body.post-type-archive-oferta_wynajmu,
body.post-type-archive-oferta_komis,
body.single-oferta_wynajmu,
body.single-oferta_komis {
    /* scroll-padding applied via html within these pages */
}
/* Since we can't scope html easily with body class, we apply scroll-padding-top
   on all non-index pages. The index page overrides html without scroll-padding-top. */


/* =========================================================================
   4. RESPONSIVE — ALL media queries at the end, organized by breakpoint
   ========================================================================= */

/* scroll-padding-top for subpages (wynajem, komisy, singles).
   Applied globally since index doesn't use anchor scrolling. */
html { scroll-padding-top: 100px; }

@media (max-width: 1024px) {
    /* Header */
    header { width: 95%; padding: 0 20px; gap: 15px; }

    /* Sticky price box */
    .sticky-price-box { position: static; }

    /* Bento grid (index) */
    .bento-grid { display: flex; flex-direction: column; }
    .bento-img { height: 250px; }

    /* Steps (wynajem) */
    .steps-wrapper { grid-template-columns: repeat(2, 1fr); }
    .why-section { padding: 60px 5%; }

    /* Features (komisy) */
    .features-grid { grid-template-columns: repeat(2, 1fr); }

    /* Process (komisy) */
    .process { flex-wrap: wrap; gap: 40px; }
    .process-step { flex: 1 1 40%; }
    .process-step::after { display: none; }

    /* Report (single pages) */
    .report-header { flex-direction: column; }
    .report-header-left { flex: auto; }
    .report-header-left::after { display: none; }
    .report-header-right { flex: auto; flex-direction: row; }
    .report-row { flex-direction: column; gap: 20px; }
    .report-row-left { flex: auto; padding-right: 0; }
    .report-row-left::after { display: none; }
    .report-row-right { flex: auto; }
}

@media (max-width: 860px) {
    html, body { overflow-x: hidden !important; }

    /* --- Mobile header (pill, not home) --- */
    header:not(.home-header) {
        position: fixed !important;
        width: calc(100% - 24px) !important;
        max-width: none !important;
        padding: 0 16px 0 18px !important;
        height: 56px !important;
        top: 10px !important;
        left: 12px !important;
        right: 12px !important;
        transform: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        filter: none !important;
        overflow: visible !important;
        background: rgba(255,255,255,0.96) !important;
        border: 1px solid rgba(255,255,255,0.5) !important;
        border-radius: 100px !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04) !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    header:not(.home-header) .logo { flex-shrink: 0 !important; margin-right: 0 !important; }
    header:not(.home-header) nav { margin: 0 !important; }
    .excr-hamburger { display: flex !important; margin-left: auto !important; }

    header:not(.home-header) nav {
        position: fixed !important;
        top: 76px !important;
        left: 12px !important;
        right: 12px !important;
        background: #fff !important;
        border: 1px solid rgba(0,0,0,.08) !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 48px rgba(0,0,0,.12) !important;
        padding: 14px !important;
        display: none !important;
        max-height: calc(100vh - 96px) !important;
        overflow-y: auto !important;
    }
    header:not(.home-header) nav.is-open { display: block !important; }
    header:not(.home-header) nav ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
    header:not(.home-header) nav li { width: 100% !important; }
    header:not(.home-header) nav a {
        display: block !important;
        padding: 14px 16px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        color: var(--text-main) !important;
    }
    header:not(.home-header) nav a:hover { background: #f0f2f5 !important; }
    header:not(.home-header) nav a.nav-active {
        display: inline-block !important;
        width: auto !important;
        background: var(--primary) !important;
        color: #fff !important;
        margin-top: 6px !important;
        border-radius: 100px !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
    header:not(.home-header) nav li:last-child { width: auto !important; text-align: left !important; align-self: flex-start !important; }

    /* Mobile: header badge (wynajem) */
    header.header--badge {
        background: #1D4B84 !important;
        border: 1px solid rgba(94,197,237,0.40) !important;
        box-shadow: 0 8px 32px rgba(0,53,118,0.35) !important;
    }
    header.header--badge .excr-hamburger span {
        background: #ffffff !important;
    }
    header.header--badge nav {
        background: #1D4B84 !important;
        border: 1px solid rgba(94,197,237,0.40) !important;
        box-shadow: 0 20px 48px rgba(0,53,118,0.35) !important;
    }
    header.header--badge nav a {
        color: #ffffff !important;
    }
    header.header--badge nav a:hover {
        background: rgba(94,197,237,0.15) !important;
        color: #5ec5ed !important;
    }
    header.header--badge nav a.nav-cta {
        display: inline-flex !important; align-items: center !important; gap: 10px !important;
        background: #5ec5ed !important;
        color: #003576 !important;
        border-radius: 100px !important;
        padding: 12px 24px !important;
        margin-top: 6px !important;
        width: auto !important;
    }

    /* Mobile: gateway */
    .gateway-hero {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    .gateway-panel {
        width: 100% !important;
        height: auto !important;
        min-height: 50svh !important;
        flex: none !important;
        padding: 60px 20px 50px !important;
        justify-content: center !important;
    }
    .gateway-panel:first-child {
        padding-top: 95px !important;
        padding-bottom: 50px !important;
    }
    .gateway-panel:hover { flex: none !important; }
    .gateway-content { padding: 0 !important; max-width: 100% !important; }
    .gateway-content h2 {
        font-size: 34px !important;
        line-height: 1.1 !important;
        margin-bottom: 16px !important;
        letter-spacing: -0.5px !important;
    }
    .gateway-badge { margin-bottom: 18px !important; font-size: 10px !important; padding: 6px 14px !important; }
    .gateway-content p { font-size: 14px !important; margin-bottom: 22px !important; }
    .gateway-btn { padding: 13px 24px !important; font-size: 13px !important; }
    .gateway-label { display: none !important; }

    header.home-header { top: 18px !important; left: 20px !important; }
    header.home-header .logo img { height: 26px !important; }

    /* Mobile: shared layout */
    .container, .report-wrapper { width: 100% !important; padding-left: 18px !important; padding-right: 18px !important; box-sizing: border-box !important; }
    .cars-grid { grid-template-columns: 1fr !important; }
    .car-info {
        flex-direction: column !important;
        overflow: visible !important;
    }
    .car-info-left {
        flex: none !important;
        width: 100% !important;
        padding: 16px 16px 0 !important;
    }
    .car-info-left .btn {
        display: none !important;
    }
    .car-info-right {
        width: 100% !important;
        flex: none !important;
        padding: 12px 16px !important;
    }
    .car-info-right::after {
        content: 'Dowiedz się więcej' !important;
        display: block !important;
        margin-top: 14px !important;
        padding: 12px 24px !important;
        background: #5ec5ed !important;
        color: #003576 !important;
        border-radius: 100px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .car-specs {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px 16px !important;
        margin-bottom: 0 !important;
    }
    .car-card {
        overflow: visible !important;
    }
    .car-card, .car-card * {
        text-overflow: unset !important;
        -webkit-line-clamp: unset !important;
    }
    .form-section-grid { grid-template-columns: 1fr !important; }

    /* Mobile: report/single */
    .report-row {
        flex-direction: column !important; gap: 20px !important;
    }
    .report-row-left {
        flex: auto !important; padding-right: 0 !important;
        display: contents !important;
    }
    .report-row-left::after { display: none !important; }
    .report-row-right { flex: auto !important; display: contents !important; }
    .report-header-block { order: 1 !important; }
    .report-header-title { margin-bottom: 10px !important; }
    .car-specs-row { margin-top: -5px !important; }
    .sticky-price-box {
        order: 2 !important;
        width: 100% !important;
        align-items: stretch !important;
        margin-top: -15px !important;
    }
    .sticky-price-box .btn { width: 100% !important; }
    .sticky-price-box .report-price-card { text-align: center !important; }
    .report-data-block { order: 3 !important; }
    .report-docs-block { order: 4 !important; margin-top: 0 !important; }
    .report-docs-block .btn { width: auto !important; }
    .report-desc-block { order: 5 !important; margin-top: 0 !important; }
    .sticky-price-box { position: static !important; }
    .hero h1 { font-size: 26px !important; line-height: 1.35 !important; }
    .hero p { font-size: 15px !important; }
}

@media (max-width: 768px) {
    /* Header fallback (for browsers not matching 860px rule) */
    header { width: 92%; padding: 0 16px; gap: 10px; border-radius: 12px; top: 10px; overflow-x: auto; }
    .logo img { height: 22px; }
    nav a { font-size: 12px; }

    /* Hero */
    .hero { height: auto; min-height: auto; max-height: none; padding: 100px 5% 50px; }
    .hero-content h1 { font-size: 26px; line-height: 1.35; }
    .hero-content p { font-size: 15px; }

    /* Gateway (index) */
    .gateway-hero { flex-direction: column; height: auto; min-height: auto; max-height: none; }
    .gateway-panel { width: 100%; height: 50vh; }
    .gateway-content h2 { font-size: 26px; }
    .gateway-content p { font-size: 14px; }
    .gateway-btn { padding: 14px 28px; font-size: 14px; }
    .gateway-panel--light { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); }

    /* Sections */
    .section-title { font-size: 28px; }
    .section-subtitle { font-size: 16px; margin-bottom: 30px; }

    /* Bento (index) */
    .bento-seo .seo-columns { column-count: 1; }

    /* Steps (wynajem) */
    .steps-wrapper { grid-template-columns: 1fr; }
    .step-card { padding: 24px 20px; }
    .why-section { padding: 50px 5%; }

    /* Features (komisy) */
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 24px 20px; }

    /* Process (komisy) */
    .process { flex-direction: column; gap: 24px; margin-top: 30px; }
    .process-step { text-align: left; padding: 20px; background: var(--surface); border-radius: var(--border-radius); border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
    .process-step::after { display: none; }
    .process-top { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 12px; }
    .process-num { margin-top: 0; font-size: 13px; }
    .process-icon { width: 48px; height: 48px; flex-shrink: 0; }
    .process-icon svg { width: 20px; height: 20px; }
    .process-step h4 { font-size: 17px; margin-bottom: 6px; }
    .process-step p { max-width: 100%; margin: 0; font-size: 14px; }

    /* Cars grid */
    .cars-grid { grid-template-columns: 1fr; }
    .car-info { flex-direction: column; }
    .car-info-left { padding: 16px 16px 0; flex: none; width: 100%; box-sizing: border-box; }
    .car-info-right { padding: 12px 16px 16px; flex: none; width: 100%; box-sizing: border-box; }
    .car-title { font-size: 17px; }
    .car-specs { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 0; }
    .car-info-left .btn { display: none; }
    .car-info-right::after {
        content: 'Dowiedz się więcej'; display: block; margin-top: 14px;
        padding: 12px 24px; background: #5ec5ed; color: #003576;
        border-radius: 100px; font-size: 14px; font-weight: 700; text-align: center;
        width: 100%; box-sizing: border-box;
    }

    /* Wynajem pricing mobile */
    .b2c-rent-gross { font-size: 20px; }

    /* Komisy pricing mobile */
    .car-price { font-size: 20px; }

    /* Komisy mobile: car-info-right::after override */
    body.post-type-archive-oferta_komis .car-info-right::after,
    body.page-template-page-komisy .car-info-right::after {
        background: #f07d14 !important; color: #ffffff !important;
    }

    /* Mobile: header komisy */
    header.header--komisy {
        background: #F8E1D5 !important;
        border: 1px solid rgba(240,125,20,0.40) !important;
        box-shadow: 0 8px 32px rgba(240,125,20,0.12) !important;
    }
    header.header--komisy .excr-hamburger span {
        background: #003576 !important;
    }
    header.header--komisy nav {
        background: #F8E1D5 !important;
        border: 1px solid rgba(240,125,20,0.40) !important;
        box-shadow: 0 20px 48px rgba(240,125,20,0.15) !important;
    }
    header.header--komisy nav a {
        color: #003576 !important;
    }
    header.header--komisy nav a:hover {
        background: rgba(240,125,20,0.10) !important;
        color: #f07d14 !important;
    }
    header.header--komisy nav a.nav-cta {
        display: inline-flex !important; align-items: center !important; gap: 10px !important;
        background: #f07d14 !important;
        color: #ffffff !important;
        border-radius: 100px !important;
        padding: 12px 24px !important;
        margin-top: 6px !important;
        width: auto !important;
    }

    /* Forms */
    .form-section-grid { grid-template-columns: 1fr; gap: 30px; }
    .form-info h2 { font-size: 26px; }
    .form-container { padding: 30px 20px; }

    /* SEO */
    .seo-block p { column-count: 1; }
    .seo-dark-cols { column-count: 1; }

    /* Button full width */
    .btn { width: 100%; }

    /* Gallery (single pages) */
    .gallery-section { padding-top: 90px; }
    .gallery-main { border-radius: 10px; }

    /* Report (single pages) */
    .report-container { padding: 25px 18px; }
    .report-header { flex-direction: column; gap: 20px; }
    .report-header-left { flex: auto; }
    .report-header-left::after { display: none; }
    .report-header-right { flex: auto; flex-direction: column; }
    .report-header-title h1 { font-size: 24px; }
    .report-price-card.primary .value { font-size: 20px; }
    .report-row { flex-direction: column; gap: 20px; }
    .report-row-left {
        flex: auto; padding-right: 0;
        display: contents;
    }
    .report-row-left::after { display: none; }
    .report-row-right { flex: auto; display: contents; }
    .report-header-block { order: 1; }
    .sticky-price-box { order: 2; }
    .report-data-block { order: 3; }
    .report-docs-block { order: 4; margin-top: 0; }
    .report-desc-block { order: 5; margin-top: 0; }
    .gallery-wrapper { width: 95%; }
    .report-wrapper { width: 95%; }
    .photo-grid { grid-template-columns: 1fr 1fr; }
    .report-actions .btn { width: auto; }

    /* Footer */
    .footer-container { grid-template-columns: 1fr; gap: 30px; text-align: center; }
}
