/* ============================================================
   Jeremias Kominy Przemyslowe - Public Stylesheet
   Industrial elegance — professional, bold, memorable
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
    --primary: #0055AD;
    --primary-hover: #004490;
    --primary-light: #e9f1fb;
    --primary-muted: rgba(0, 85, 173, 0.1);
    --secondary: #003D7A;
    --accent: #0070B0;
    --accent-warm: #FFEA3D;
    --accent-warm-hover: #E6D235;

    --text-dark: #1a1a2e;
    --text-body: #333;
    --text-secondary: #555;
    --text-muted: #888;
    --text-light: #fff;

    --bg-white: #ffffff;
    --bg-gray: #f3f5f8;
    --bg-dark: #1a1e2e;
    --bg-darker: #12151f;

    --border-color: #e0e0e0;
    --border-light: #eee;

    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;

    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.16);

    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;
    --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-card: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    --container-max: 1200px;
    --nav-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--primary);
    color: var(--text-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.25;
}
h1 { font-size: 2.5rem; letter-spacing: -0.5px; }
h2 { font-size: 2rem; letter-spacing: -0.3px; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ============================================================
   Navigation
   ============================================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    height: var(--nav-height);
    transition: box-shadow var(--transition);
}

nav.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.08); }

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.2;
}

.nav-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-brand-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-logo {
    height: 40px;
    width: auto;
    border-radius: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-xs);
    align-items: center;
}

.nav-links a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-muted);
}

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s var(--ease-out-cubic);
    padding: var(--spacing-sm) 0;
    z-index: 100;
    border: 1px solid rgba(0,0,0,0.04);
}

.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.85rem;
    border-radius: 0;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--spacing-sm);
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   Hero Section
   ============================================================ */
@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + var(--spacing-3xl)) var(--spacing-lg) var(--spacing-3xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    overflow: hidden;
    color: var(--text-light);
}

.gradient-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0,53,112,0.92) 0%, rgba(0,79,159,0.78) 40%, rgba(18,21,31,0.92) 100%),
        url('../uploads/wordpress/2021/05/piatnica1.jpg') center/cover no-repeat;
    background-size: 200% 200%;
    animation: heroGradientShift 15s ease infinite;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(255,255,255,0.03) 49px,
            rgba(255,255,255,0.03) 50px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(255,255,255,0.03) 49px,
            rgba(255,255,255,0.03) 50px
        ),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.hero-trust {
    font-size: 0.85rem !important;
    opacity: 0.7 !important;
    margin-top: var(--spacing-md);
    letter-spacing: 0.5px;
}

/* Trust / Social Proof Bar */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3xl);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
}

.trust-item {
    text-align: center;
}

.trust-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.trust-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trust-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Hero Slider */
.hero-slider {
    margin-top: var(--spacing-xl);
    position: relative;
}

.slider-container {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.slider-track {
    display: flex;
    transition: transform 0.5s var(--ease-out-cubic);
}

.slider-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    gap: 0.75rem;
}

.slider-slide img {
    max-height: 280px;
    object-fit: contain;
    margin: 0 auto;
    border-radius: var(--radius);
}

.slider-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    color: rgba(255,255,255,0.95);
}

.slider-caption strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.slider-caption span {
    font-size: 0.85rem;
    opacity: 0.75;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.slider-dot.active {
    background: var(--accent-warm);
    border-color: var(--accent-warm);
    transform: scale(1.3);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
    padding: var(--spacing-4xl) 0;
}

.section-white { background: var(--bg-white); }
.section-gray { background: var(--bg-gray); }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-2xl);
}

.section-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-warm);
    margin: var(--spacing-sm) auto 0;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: var(--spacing-xs);
}
#stats .section-subtitle {
    color: rgba(255,255,255,0.7);
}

/* ============================================================
   Cards
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s var(--ease-card);
    border: none;
    border-top: 3px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-top-color: var(--accent-warm);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-gray);
    border-radius: 0;
    transition: transform 0.5s var(--ease-out-cubic);
}

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

#systems-grid,
#systems-cards {
    grid-template-columns: repeat(2, 1fr);
}

#systems-grid .card-img,
#systems .card-img,
#systems-cards .card-img {
    height: auto;
    max-height: 200px;
    padding: 1.5rem;
    object-fit: contain;
    background: #fff;
    transition: transform 0.5s var(--ease-out-cubic);
    border-radius: 0;
}

/* Systems cards enhanced */
#systems .card,
#systems-cards .card {
    border: none;
    box-shadow: var(--shadow);
    overflow: hidden;
}
#systems .card:hover .card-img,
#systems-cards .card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: var(--spacing-md);
    transition: gap 0.3s var(--ease-out-cubic), color var(--transition-fast);
}

.card-link:hover {
    gap: var(--spacing-sm);
    color: var(--accent-warm);
}

/* About cards - 2x2 grid */
#about-content .card-grid {
    grid-template-columns: repeat(2, 1fr);
}

#about-content .card {
    border-left: 4px solid var(--primary);
    border-top: none;
    transition: all 0.4s var(--ease-card);
    position: relative;
}
#about-content .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    bottom: 0;
    width: 12px;
    background: linear-gradient(90deg, rgba(0,79,159,0.12), transparent);
    pointer-events: none;
}
#about-content .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
#about-content .card:nth-child(1) { animation-delay: 0s; }
#about-content .card:nth-child(2) { animation-delay: 0.1s; }
#about-content .card:nth-child(3) { animation-delay: 0.2s; }
#about-content .card:nth-child(4) { animation-delay: 0.3s; }
#about-content .card:nth-child(5) { animation-delay: 0.4s; }
#about-content .card:nth-child(6) { animation-delay: 0.5s; }

.card-icon {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-warm);
    margin-bottom: var(--spacing-sm);
    line-height: 1;
    letter-spacing: -1px;
    opacity: 0.8;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-cubic);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--text-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,79,159,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-light);
    transform: translateY(-1px);
}

.btn-white {
    background: var(--bg-white);
    color: var(--primary);
    border-color: var(--bg-white);
}
.btn-white:hover {
    background: var(--bg-gray);
    border-color: var(--bg-gray);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   Stats Section
   ============================================================ */
@keyframes statPulseGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(212,168,83,0.2); }
    50% { text-shadow: 0 0 25px rgba(212,168,83,0.4); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    text-align: center;
}

.stat-item {
    padding: var(--spacing-xl);
    position: relative;
}

.stat-item::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent-warm);
    margin: 0 auto var(--spacing-md);
    border-radius: 2px;
}

.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats dark band override */
#stats {
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 30px,
            rgba(255,255,255,0.015) 30px,
            rgba(255,255,255,0.015) 31px
        ),
        linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    color: var(--text-light);
}
#stats .section-header h2 {
    color: var(--text-light);
}
#stats .section-header h2::after {
    background: var(--accent-warm);
}
#stats .section-header p {
    color: rgba(255,255,255,0.7);
}
#stats .stat-number {
    color: #fff;
    font-size: 3.5rem;
    text-shadow: 0 0 20px rgba(212,168,83,0.3);
    animation: statPulseGlow 3s ease-in-out infinite;
}
#stats .stat-label {
    color: rgba(255,255,255,0.75);
}
#stats .stat-item::before {
    background: var(--accent-warm);
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-hero {
    min-height: 30vh;
    display: flex;
    align-items: center;
    padding-top: var(--spacing-xl);
    background: var(--primary-light);
    text-align: center;
}

.contact-hero h1 { color: var(--primary); margin-bottom: var(--spacing-md); }

.map-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-gray);
}

.map-container { width: 100%; position: relative; }

.map-wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    cursor: pointer;
}

#map-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-lg);
}

.map-popup {
    display: none;
    position: absolute;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    min-width: 250px;
    z-index: 50;
    pointer-events: none;
    border-top: 3px solid var(--accent-warm);
}

.map-popup.visible { display: block; }

.map-popup h4 { color: var(--primary); margin-bottom: var(--spacing-sm); }

.static-contacts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.contact-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    transition: all 0.4s var(--ease-card);
    border-top: 3px solid transparent;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent-warm);
}

.contact-card-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    flex-shrink: 0;
}

.contact-card h4 { color: var(--primary); margin-bottom: var(--spacing-xs); }
.contact-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 2px; }

/* ============================================================
   Quote Form
   ============================================================ */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
    flex-shrink: 0;
}

.form-checkbox label {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-message {
    padding: var(--spacing-md);
    border-radius: var(--radius);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.form-message.success {
    background: rgba(34,197,94,0.1);
    color: var(--success);
    border: 1px solid rgba(34,197,94,0.2);
}

.form-message.error {
    background: rgba(239,68,68,0.1);
    color: var(--error);
    border: 1px solid rgba(239,68,68,0.2);
}

/* Hidden honeypot field */
.hp-field { position: absolute; left: -9999px; }

/* ============================================================
   News / Blog
   ============================================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s var(--ease-card);
    border: none;
    border-top: 3px solid transparent;
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-top-color: var(--accent-warm);
}

/* News card image — works as <img> or <div> wrapper */
.news-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
    background: var(--bg-gray);
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.5s var(--ease-out-cubic);
}

.news-card-img img,
.news-card-img picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.news-card-img--placeholder {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-gray) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-img--placeholder::after {
    content: '';
    width: 48px;
    height: 48px;
    opacity: 0.15;
    background: var(--primary);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='m3 16 5-5 4 4 4-4 5 5'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='m3 16 5-5 4 4 4-4 5 5'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.news-card:hover .news-card-img img,
.news-card:hover img.news-card-img {
    transform: scale(1.05);
    transition: transform 0.5s var(--ease-out-cubic);
}

.news-card-body {
    padding: var(--spacing-lg);
    position: relative;
}

.news-card-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-card-category {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.news-card:hover .news-card-title {
    color: var(--primary);
}

.news-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Article Detail --- */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}
.article-content iframe {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1rem 0;
}
.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}
.article-content h2,
.article-content h3 {
    margin: 1.5rem 0 0.75rem;
    color: var(--text-dark);
}
.article-content figure {
    margin: 1rem 0;
    max-width: 100%;
}
.article-content figure img {
    max-width: 100%;
    height: auto;
}
.article-content .wp-block-gallery,
.article-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}
.article-content .wp-block-gallery img,
.article-content .gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- Article Gallery --- */
.article-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.article-gallery-item {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--bg-gray);
}
.article-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out-cubic);
    border-radius: 0;
}
.article-gallery-item:hover img {
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .article-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .article-gallery-grid { grid-template-columns: 1fr; }
}

/* --- Lightbox --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12,15,25,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.lightbox-overlay.active { opacity: 1; }
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: transform var(--transition-fast);
}
.lightbox-close:hover {
    transform: rotate(90deg);
}

.news-filters {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-2xl);
    flex-wrap: wrap;
}

.news-filter-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s var(--ease-out-cubic);
    color: var(--text-body);
}

.news-filter-btn:hover,
.news-filter-btn.active {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-2xl);
}

.pagination button {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s var(--ease-out-cubic);
}

.pagination button:hover,
.pagination button.active {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* ============================================================
   Content Pages (Zastosowanie, Produkcja)
   ============================================================ */
.content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid var(--border-light);
}

.content-section:last-child { border-bottom: none; }

.content-section:nth-child(even) .content-image { order: -1; }

.content-text h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary);
}

.content-text p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.content-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ============================================================
   Chimney System Detail
   ============================================================ */
.system-hero {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    background: var(--bg-gray);
}

.system-hero h1 { color: var(--primary); }

.system-specs { padding: var(--spacing-2xl) 0; }

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.spec-table th,
.spec-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.spec-table th {
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-gray);
    width: 40%;
    border-left: 3px solid var(--primary);
}

.spec-table td { color: var(--text-secondary); }

.spec-table tr:nth-child(even) td {
    background: var(--bg-gray);
}
.spec-table tr:nth-child(even) th {
    background: #eaecf0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s var(--ease-card);
}

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

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}

.document-list { margin-top: var(--spacing-lg); }

.document-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: var(--spacing-sm);
    transition: all 0.25s var(--ease-out-cubic);
}

.document-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

/* ============================================================
   Page Hero (inner pages)
   ============================================================ */
.page-hero {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    background: var(--primary-light);
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 0 100%);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(0,79,159,0.02) 20px,
            rgba(0,79,159,0.02) 21px
        );
    pointer-events: none;
}

.page-hero h1 {
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.page-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    position: relative;
}

/* Article Hero Image — full-width cover */
.article-hero-img {
    width: 100%;
}

.article-hero-img img {
    width: 100%;
    height: 45vh;
    max-height: 480px;
    min-height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: rgba(255,255,255,0.8);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
    border-top: 3px solid var(--accent-warm);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-column h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-warm);
}

.footer-column p,
.footer-column a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.8;
    transition: color var(--transition-fast);
}

.footer-column a:hover { color: var(--accent-warm); }

.footer-bottom {
    max-width: var(--container-max);
    margin: var(--spacing-2xl) auto 0;
    padding: var(--spacing-lg) var(--spacing-lg) 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a { color: rgba(255,255,255,0.4); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent-warm); }

/* Realizations hover zoom */
#realizations .card {
    overflow: hidden;
    position: relative;
}
#realizations .card-img {
    height: 240px;
    transition: transform 0.5s var(--ease-out-cubic);
    border-radius: 0;
}
#realizations .card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition);
}
#realizations .card:hover::after {
    opacity: 1;
}
#realizations .card:hover .card-img {
    transform: scale(1.05);
}

/* CTA section gradient */
#cta {
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 30px,
            rgba(255,255,255,0.02) 30px,
            rgba(255,255,255,0.02) 31px
        ),
        linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-light);
}
#cta h2 { color: var(--text-light); }
#cta p { color: rgba(255,255,255,0.85); }
#cta .btn-primary {
    background: var(--accent-warm);
    color: var(--bg-darker);
    border-color: var(--accent-warm);
    font-weight: 700;
}
#cta .btn-primary:hover {
    background: var(--accent-warm-hover);
    border-color: var(--accent-warm-hover);
    color: var(--bg-darker);
    box-shadow: 0 4px 20px rgba(255,234,61,0.4);
}
#cta .btn-secondary {
    border-color: rgba(255,255,255,0.5);
    color: var(--text-light);
}
#cta .btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: var(--text-light);
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-xl); }
.mb-3 { margin-bottom: var(--spacing-2xl); }
.mb-4 { margin-bottom: var(--spacing-3xl); }
.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-xl); }
.mt-3 { margin-top: var(--spacing-2xl); }
.mt-4 { margin-top: var(--spacing-3xl); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ============================================================
   Animations
   ============================================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out-cubic), transform 0.6s var(--ease-out-cubic);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for card grids */
.card-grid .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.card-grid .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.card-grid .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.card-grid .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.card-grid .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.card-grid .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

.news-grid .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.news-grid .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.news-grid .scroll-reveal:nth-child(3) { transition-delay: 0.15s; }

.stats-grid .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.stats-grid .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.stats-grid .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.stats-grid .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s var(--ease-out-cubic) forwards; }

/* ============================================================
   Back to Top
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    background: var(--accent-warm);
    color: var(--bg-darker);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--ease-out-cubic);
    box-shadow: 0 4px 15px rgba(212,168,83,0.3);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-warm-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212,168,83,0.4);
}

/* ============================================================
   Loading / Spinner
   ============================================================ */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Cookie Banner
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    color: rgba(255,255,255,0.9);
    padding: var(--spacing-lg);
    z-index: 2000;
    display: none;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.cookie-banner.visible { display: block; }

.cookie-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.cookie-banner p { font-size: 0.9rem; flex: 1; }

.cookie-banner .btn {
    flex-shrink: 0;
}

/* ============================================================
   Privacy / Static Pages
   ============================================================ */
.static-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.static-content h2 { margin-top: var(--spacing-xl); margin-bottom: var(--spacing-md); font-size: 1.5rem; }
.static-content h3 { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-sm); font-size: 1.2rem; }
.static-content p { margin-bottom: var(--spacing-md); line-height: 1.7; color: var(--text-secondary); }
.static-content ul { margin: var(--spacing-md) 0; padding-left: var(--spacing-xl); }
.static-content li { margin-bottom: var(--spacing-sm); color: var(--text-secondary); }

/* ============================================================
   404 Page
   ============================================================ */
.error-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
}

.error-page .error-code {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    opacity: 0.2;
}

.error-page h1 { font-size: 2rem; margin: var(--spacing-lg) 0 var(--spacing-md); }
.error-page p { color: var(--text-secondary); margin-bottom: var(--spacing-xl); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    #systems-grid, #systems-cards { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: calc(var(--nav-height) + var(--spacing-lg)) var(--spacing-lg) var(--spacing-lg);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition);
        gap: 0;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-links.open { right: 0; }
    .nav-toggle { display: flex; }

    .nav-links a {
        padding: var(--spacing-md);
        font-size: 1rem;
        border-bottom: 1px solid var(--border-light);
        border-radius: 0;
    }

    .nav-dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: var(--spacing-lg);
    }

    .hero { min-height: 60vh; }
    .hero-content h1 { font-size: 2rem; letter-spacing: -0.5px; }
    .hero-content p { font-size: 1rem; }

    .card-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr; }
    .static-contacts { grid-template-columns: 1fr; }
    .content-section { grid-template-columns: 1fr; }
    .content-section:nth-child(even) .content-image { order: 0; }
    .form-row { grid-template-columns: 1fr; }

    .footer-bottom { flex-direction: column; gap: var(--spacing-sm); text-align: center; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    .section { padding: var(--spacing-2xl) 0; }

    .page-hero {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 0 100%);
    }

    #stats .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-number { font-size: 2rem; }
    .hero { min-height: 50vh; }
    .hero-content h1 { font-size: 1.75rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .error-page .error-code { font-size: 5rem; }
    #stats .stat-number { font-size: 2.5rem; }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    background: var(--bg-gray);
    padding: 0.75rem 0;
    margin-top: var(--nav-height);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: relative;
    z-index: 1;
}
.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '\203A';
    margin-right: 0.35rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
}
.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb-item a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.breadcrumb-item.active {
    color: var(--text-secondary);
}
