@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
    /* Main Colors */
    --primary: #417dc1;
    --primary-dark: #2d5a8a;
    --primary-light: #5a9bd5;
    --accent: #00d4aa;
    --accent-hover: #00b894;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #417dc1 0%, #2d5a8a 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    
    /* Text */
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    
    /* Module Colors */
    --color-hr: #f59e0b;
    --color-sys-ewi: #ef4444;
    --color-podatki: #10b981;
    --color-oplaty: #22c55e;
    --color-eratusz: #3b82f6;
    --color-ks-bud: #a855f7;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    font-size: 1.2rem;
    line-height: 1.6;
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
}

/* ===========================================
   TOP BAR
   =========================================== */
.top-bar {
    background: var(--bg-dark);
    padding: 10px 0;
    font-size: 13px;
}

.top-bar a {
    color: rgba(255,255,255,0.7);
    margin-left: 24px;
    font-weight: 500;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: #fff;
}

.top-bar img {
    opacity: 0.9;
}

/* ===========================================
   NAVBAR
   =========================================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 42px;
}

.navbar-nav .nav-link {
    color: var(--text-medium);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary);
    background: rgba(65, 125, 193, 0.08);
}

.btn-admin {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease !important;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero-section {
    background: var(--gradient-hero);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 212, 170, 0.25);
}

.hero-badge i {
    margin-right: 8px;
}

.hero-section h1 {
    color: #fff;
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-section h1 span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    color: rgba(255,255,255,0.75);
    font-size: 18px;
    font-weight: 400;
    max-width: 550px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.hero-stat .label {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Search Box */
.hero-search {
    max-width: 500px;
}

.hero-search .input-group {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border-radius: 12px;
    overflow: hidden;
}

.hero-search .form-control {
    border: none;
    padding: 18px 24px;
    font-size: 1rem;
    background: rgba(255,255,255,0.95);
}

.hero-search .form-control::placeholder {
    color: #94a3b8;
}

.hero-search .form-control:focus {
    box-shadow: none;
    background: #fff;
}

.hero-search .btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 28px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.hero-search .btn-search:hover {
    background: var(--primary-dark);
}

.hero-search .btn-search i {
    font-size: 1rem;
}

/* ===========================================
   MODULES SECTION - PREMIUM DESIGN
   =========================================== */
.modules-section {
    padding: 100px 0;
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.modules-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(65, 125, 193, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Module Cards - Ultra Premium */
.module-card {
    position: relative;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 36px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 
        0 4px 24px -8px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255,255,255,0.8) inset;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    text-decoration: none !important;
    z-index: 1;
    cursor: pointer;
}

/* Animated gradient background */
.module-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        var(--module-color, var(--primary)) 0%, 
        var(--module-color-dark, var(--primary-dark)) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -2;
    border-radius: 24px;
}

/* Animated shine effect */
.module-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255,255,255,0.1) 50%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: none;
    pointer-events: none;
    z-index: 10;
}

.module-card:hover {
    transform: translateY(-16px) scale(1.02);
    box-shadow: 
        0 32px 64px -16px rgba(0,0,0,0.2),
        0 0 80px -20px var(--module-color, var(--primary)),
        0 0 0 1px var(--module-color, var(--primary));
}

.module-card:hover::before {
    opacity: 1;
}

.module-card:hover::after {
    opacity: 1;
    animation: shine 1.5s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-50%) translateY(-50%) rotate(45deg); }
    100% { transform: translateX(50%) translateY(50%) rotate(45deg); }
}

/* Floating particles effect */
.module-card .particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 24px;
    pointer-events: none;
    z-index: -1;
}

.module-card .particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--module-color, var(--primary));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover .particles span {
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.module-card .particles span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.module-card .particles span:nth-child(2) { top: 60%; left: 80%; animation-delay: 0.5s; }
.module-card .particles span:nth-child(3) { top: 80%; left: 30%; animation-delay: 1s; }
.module-card .particles span:nth-child(4) { top: 30%; left: 70%; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 0.6; }
}

/* Icon Box - Premium 3D Effect */
.module-card .icon-box {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    background: linear-gradient(145deg, 
        var(--module-color, var(--primary)) 0%, 
        var(--module-color-dark, var(--primary-dark)) 100%);
    box-shadow: 
        0 16px 32px -8px var(--module-color, var(--primary)),
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 2px 0 rgba(255,255,255,0.3),
        inset 0 -2px 0 rgba(0,0,0,0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

/* Glow ring around icon */
.module-card .icon-box::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    background: linear-gradient(145deg, 
        var(--module-color, var(--primary)), 
        transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(8px);
}

.module-card:hover .icon-box {
    transform: translateY(-8px) rotateX(10deg) rotateY(-10deg) scale(1.1);
    box-shadow: 
        0 24px 48px -12px rgba(0,0,0,0.3),
        inset 0 2px 0 rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
}

.module-card:hover .icon-box::before {
    opacity: 0.6;
}

.module-card .icon-box i {
    font-size: 32px;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.module-card:hover .icon-box i {
    transform: scale(1.2) rotateY(360deg);
}

/* Title with gradient on hover */
.module-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-dark);
    transition: all 0.4s ease;
    position: relative;
}

.module-card:hover h3 {
    color: #fff;
    text-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Description */
.module-card .description {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 28px;
    flex-grow: 1;
    transition: all 0.4s ease;
}

.module-card:hover .description {
    color: rgba(255,255,255,0.9);
}

/* Card Footer */
.module-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
    transition: all 0.4s ease;
}

.module-card:hover .card-footer {
    border-top-color: rgba(255,255,255,0.2);
}

/* Product count with animated dot */
.module-card .count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-card .count::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--module-color, var(--primary));
    box-shadow: 0 0 0 0 var(--module-color, var(--primary));
    transition: all 0.3s ease;
}

.module-card:hover .count {
    color: rgba(255,255,255,0.95);
}

.module-card:hover .count::before {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

/* Arrow Button - Premium with morph effect */
.module-card .arrow-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #f0f0f0, #e6e6e6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        4px 4px 8px rgba(0,0,0,0.1),
        -2px -2px 4px rgba(255,255,255,0.9);
}

.module-card .arrow-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        var(--module-color, var(--primary)) 0%, 
        var(--module-color-dark, var(--primary-dark)) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.module-card .arrow-btn i {
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 1;
}

.module-card:hover .arrow-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    transform: rotate(0deg);
    box-shadow: none;
}

.module-card:hover .arrow-btn i {
    color: #fff;
    animation: arrowMove 0.8s ease infinite;
}

@keyframes arrowMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* Entry animation */
.module-card {
    opacity: 0;
    transform: translateY(40px);
    animation: cardEntry 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes cardEntry {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.row .col-lg-4:nth-child(1) .module-card { animation-delay: 0.1s; }
.row .col-lg-4:nth-child(2) .module-card { animation-delay: 0.2s; }
.row .col-lg-4:nth-child(3) .module-card { animation-delay: 0.3s; }
.row .col-lg-4:nth-child(4) .module-card { animation-delay: 0.4s; }
.row .col-lg-4:nth-child(5) .module-card { animation-delay: 0.5s; }
.row .col-lg-4:nth-child(6) .module-card { animation-delay: 0.6s; }

/* Module Colors - Vibrant */
.module-card.hr { 
    --module-color: #f59e0b; 
    --module-color-dark: #d97706; 
}
.module-card.sys_ewi { 
    --module-color: #ef4444; 
    --module-color-dark: #dc2626; 
}
.module-card.podatki { 
    --module-color: #10b981; 
    --module-color-dark: #059669; 
}
.module-card.oplaty { 
    --module-color: #22c55e; 
    --module-color-dark: #16a34a; 
}
.module-card.eratusz { 
    --module-color: #3b82f6; 
    --module-color-dark: #2563eb; 
}
.module-card.ks_bud { 
    --module-color: #a855f7; 
    --module-color-dark: #9333ea; 
}

/* ===========================================
   FEATURES SECTION
   =========================================== */
.features-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-card .icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.feature-card .icon i {
    font-size: 28px;
    color: #fff;
}

.feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* ===========================================
   INTEGRATION SECTION
   =========================================== */
.integration-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.integration-section h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.integration-section .lead {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 32px;
}

.integration-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.integration-item {
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    align-items: center;
    transition: all 0.2s ease;
    border-left: 3px solid var(--primary);
}

.integration-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.integration-item i {
    color: var(--primary);
    margin-right: 12px;
    font-size: 18px;
}

.integration-item strong {
    color: var(--text-dark);
    margin-right: 8px;
}

.integration-item span {
    color: var(--text-light);
    font-size: 14px;
    line-height: 20px;
}

/* ===========================================
   CTA SECTION
   =========================================== */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}

.cta-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-4px);
}

.cta-card i {
    font-size: 40px;
    color: #fff;
    margin-bottom: 20px;
    display: inline-block;
}

.cta-card h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.cta-card p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 30px;
}

footer h5 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.9);
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 12px;
}

footer a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: color 0.2s;
}

footer a:hover {
    color: #fff;
}

footer .footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer .footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin: 0;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-left: 12px;
    transition: all 0.2s;
}

footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ===========================================
   MODULE PAGE - SIDEBAR NAV
   =========================================== */
.sidebar-nav {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.sidebar-nav .nav-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 20px;
    font-weight: 600;
}

.sidebar-nav .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-menu li {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-nav .nav-menu li:last-child {
    border-bottom: none;
}

.sidebar-nav .nav-menu a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-menu a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-menu a:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-nav .nav-menu a.active {
    background: rgba(65, 125, 193, 0.08);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Module color variations for sidebar */
.sidebar-nav .nav-menu a.active.hr,
.sidebar-nav .nav-menu a:hover.hr { border-left-color: var(--color-hr); color: var(--color-hr); }
.sidebar-nav .nav-menu a.active.sys_ewi,
.sidebar-nav .nav-menu a:hover.sys_ewi { border-left-color: var(--color-sys-ewi); color: var(--color-sys-ewi); }
.sidebar-nav .nav-menu a.active.podatki,
.sidebar-nav .nav-menu a:hover.podatki { border-left-color: var(--color-podatki); color: var(--color-podatki); }
.sidebar-nav .nav-menu a.active.oplaty,
.sidebar-nav .nav-menu a:hover.oplaty { border-left-color: var(--color-oplaty); color: var(--color-oplaty); }
.sidebar-nav .nav-menu a.active.eratusz,
.sidebar-nav .nav-menu a:hover.eratusz { border-left-color: var(--color-eratusz); color: var(--color-eratusz); }
.sidebar-nav .nav-menu a.active.ks_bud,
.sidebar-nav .nav-menu a:hover.ks_bud { border-left-color: var(--color-ks-bud); color: var(--color-ks-bud); }

/* ===========================================
   CONTENT PAGES
   =========================================== */
.page-header {
    background: var(--gradient-hero);
    padding: 60px 0;
    color: #fff;
}

.page-header h1 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 8px;
}

.page-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
}

.page-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.5);
}

.content-section {
    padding: 60px 0;
}

/* ===========================================
   WIDE LAYOUT - All Content Pages
   =========================================== */
.content-wide {
    padding: 60px 0;
}

.content-section.content-wide {
    padding: 60px 0;
}

/* Apply padding to content-wide sections */
.content-wide > .content-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0 70px;
}

.content-wide .product-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 40px;
    align-items: start;
}

.content-wide .sidebar-left {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

@media (min-width: 992px) {
    .content-wide > .content-wrapper > .row > .col-lg-3 {
        position: sticky;
        top: 100px;
        align-self: flex-start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
}

.content-wide .main-content {
    min-width: 0;
}

/* Mobile elements hidden by default on desktop */
.sidebar-left-mobile-toggle,
.sidebar-left-mobile {
    display: none;
}

/* Responsive - Wide Layout */
@media (max-width: 1400px) {
    .content-wide > .content-wrapper {
        padding: 0 40px;
    }
    
    .content-wide .product-layout {
        grid-template-columns: 250px 1fr 280px;
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .content-wide .product-layout {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }
    
    .content-wide .sidebar-left {
        display: none;
    }
    
    .sidebar-left-mobile-toggle {
        display: block;
        grid-column: 1 / -1;
        order: -2;
    }
    
    .sidebar-left-mobile-toggle .btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px 20px;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        color: #334155;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .sidebar-left-mobile-toggle .btn:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }
    
    .sidebar-left-mobile {
        grid-column: 1 / -1;
        order: -1;
        display: none;
    }
    
    .sidebar-left-mobile.show {
        display: block;
    }
}

@media (max-width: 991px) {
    .content-wide > .content-wrapper {
        padding: 0 30px;
    }
    
    .content-wide .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .content-wide .sidebar-right {
        position: static;
    }
}

@media (max-width: 767px) {
    .content-wide > .content-wrapper {
        padding: 0 20px;
    }
}

.content-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.content-card h2 {
    font-size: 28px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
}

.content-card .description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-medium);
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--accent);
    margin-right: 16px;
    margin-top: 4px;
    font-size: 16px;
}

.feature-list li .content {
    flex: 1;
}

.feature-list li strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.feature-list li p,
.feature-list li .text-muted {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* ===========================================
   MATERIALS SIDEBAR
   =========================================== */
.materials-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.materials-box h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
}

.materials-box h4 i {
    margin-right: 10px;
    color: var(--primary);
}

.materials-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.materials-list li {
    margin-bottom: 10px;
}

.materials-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
}

.materials-list li a:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.materials-list li a i {
    color: var(--primary);
}

/* ===========================================
   PRODUCT CARDS (Grid style)
   =========================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: block;
    border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.product-card .icon-box {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.product-card .icon-box i {
    font-size: 20px;
    color: #fff;
}

.product-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-card p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

/* ===========================================
   UTILITIES
   =========================================== */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-light { background: var(--bg-light) !important; }
.bg-white { background: var(--bg-white) !important; }

.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 991px) {
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-section h1 {
        font-size: 36px;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .modules-section,
    .features-section,
    .integration-section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .top-bar {
        display: none;
    }
    
    .hero-section h1 {
        font-size: 28px;
    }
    
    .hero-section .lead {
        font-size: 16px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .hero-stat {
        flex: 0 0 calc(50% - 12px);
    }
    
    .hero-search {
        max-width: 100%;
    }
    
    .hero-search .input-group {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .hero-search .form-control {
        border-radius: 12px 12px 0 0;
        padding: 14px 16px;
    }
    
    .hero-search .btn-search {
        border-radius: 0 0 12px 12px;
        padding: 14px 16px;
        justify-content: center;
    }
    
    .module-card {
        padding: 24px;
    }
    
    .content-card {
        padding: 20px;
    }
}

/* ===========================================
   PAGE HEADER PREMIUM (MODULE/PRODUCT PAGES)
   =========================================== */
.page-header-premium {
    position: relative;
    padding: 40px 0;
    overflow: hidden;
    margin-top: 0;
}

.page-header-premium .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.page-header-premium .header-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.page-header-premium .header-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: float-particle 8s infinite ease-in-out;
}

.page-header-premium .header-particles span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.page-header-premium .header-particles span:nth-child(2) { top: 60%; left: 20%; animation-delay: 1s; }
.page-header-premium .header-particles span:nth-child(3) { top: 30%; right: 15%; animation-delay: 2s; }
.page-header-premium .header-particles span:nth-child(4) { top: 70%; right: 25%; animation-delay: 3s; }
.page-header-premium .header-particles span:nth-child(5) { top: 40%; left: 50%; animation-delay: 4s; }

.page-header-premium .header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* All text in header should be white */
.page-header-premium,
.page-header-premium h1,
.page-header-premium h2,
.page-header-premium h3,
.page-header-premium p,
.page-header-premium span,
.page-header-premium a,
.page-header-premium .breadcrumb,
.page-header-premium .breadcrumb-item,
.page-header-premium .breadcrumb-item a,
.page-header-premium .breadcrumb-item.active,
.page-header-premium .header-desc,
.page-header-premium .stat-number,
.page-header-premium .stat-label {
    color: white !important;
}

.page-header-premium .breadcrumb-item a:hover {
    color: rgba(255,255,255,0.8) !important;
}

.page-header-premium .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5) !important;
}

.page-header-premium .header-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: white;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    animation: icon-float 4s infinite ease-in-out;
}

.page-header-premium .header-icon-box {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: white;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 60px rgba(255,255,255,0.1);
    transition: all 0.4s ease;
    animation: icon-float 4s infinite ease-in-out;
}

/* Icon color variants */
.page-header-premium.hr .header-icon-box { 
    background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(245,158,11,0.1));
    box-shadow: 0 0 60px rgba(245,158,11,0.3);
}
.page-header-premium.sys-ewi .header-icon-box { 
    background: linear-gradient(135deg, rgba(239,68,68,0.3), rgba(239,68,68,0.1));
    box-shadow: 0 0 60px rgba(239,68,68,0.3);
}
.page-header-premium.podatki .header-icon-box { 
    background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(16,185,129,0.1));
    box-shadow: 0 0 60px rgba(16,185,129,0.3);
}
.page-header-premium.oplaty .header-icon-box { 
    background: linear-gradient(135deg, rgba(34,197,94,0.3), rgba(34,197,94,0.1));
    box-shadow: 0 0 60px rgba(34,197,94,0.3);
}
.page-header-premium.eratusz .header-icon-box { 
    background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(59,130,246,0.1));
    box-shadow: 0 0 60px rgba(59,130,246,0.3);
}
.page-header-premium.ks-bud .header-icon-box { 
    background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(168,85,247,0.1));
    box-shadow: 0 0 60px rgba(168,85,247,0.3);
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.page-header-premium h1 {
    color: white;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.page-header-premium .header-lead {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.page-header-premium .header-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.page-header-premium .stat-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 13px;
    border: 1px solid #fff;
    border-radius: 15px;
    text-align: center;
}

.page-header-premium .stat-item .stat-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: white !important;
    line-height: 1.2;
}

.page-header-premium .stat-item .stat-label {
    color: white !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header-premium .header-stat {
    text-align: center;
}

.page-header-premium .header-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.page-header-premium .header-stat-label {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-header-premium .breadcrumb-premium {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.page-header-premium .breadcrumb-premium a {
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
}

.page-header-premium .breadcrumb-premium a:hover {
    color: white;
}

.page-header-premium .breadcrumb-premium span {
    color: rgba(255,255,255,0.4);
}

.page-header-premium .breadcrumb-premium .current {
    color: var(--accent);
    font-weight: 500;
}

/* ===========================================
   SIDEBAR PREMIUM
   =========================================== */
.sidebar-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.sidebar-header {
    background: var(--gradient-hero);
    padding: 20px 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
}

.sidebar-header i {
    font-size: 1.8rem;
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none;
    padding: 12px;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--text-medium);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--link-color, var(--primary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-link .link-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-link .link-text {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.sidebar-link .link-arrow {
    font-size: 10px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.sidebar-link:hover::before {
    transform: scaleY(1);
}

.sidebar-link:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar Link - Dynamic Color from CSS Variable */
.sidebar-link:hover .link-icon,
.sidebar-link.active .link-icon { 
    background: color-mix(in srgb, var(--link-color, var(--primary)) 15%, transparent);
    color: var(--link-color, var(--primary)); 
}

.sidebar-link.active {
    background: var(--bg-light);
    color: var(--text-dark);
}

.sidebar-link.active::before {
    transform: scaleY(1);
}

.sidebar-link.active .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================================
   MATERIALS PREMIUM
   =========================================== */
.materials-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.materials-header {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.materials-header i {
    font-size: 1.8rem;
}

.materials-content {
    padding: 12px;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 7px;
    border-radius: var(--radius-md);
    color: var(--text-medium);
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.material-item:last-child {
    margin-bottom: 0;
}

.material-item:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.material-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Kolory dla typów materiałów */
.material-icon.material-link {
    border-color: #667eea;
    color: #667eea;
}

.material-icon.material-pdf {
    border-color: #f44336;
    color: #f44336;
}

.material-icon.material-image {
    border-color: #fb896d;
    color: #fb896d;
}

.material-icon.material-video {
    border-color: #3aaeab;
    color: #3aaeab;
}

.material-icon.material-powerpoint {
    border-color: #d04a27;
    color: #d04a27;
}

.material-icon.calendar {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hover - wypełnienie kolorem */
.material-item:hover .material-icon.material-link {
    background: #667eea;
    color: white;
}

.material-item:hover .material-icon.material-pdf {
    background: #f44336;
    color: white;
}

.material-item:hover .material-icon.material-image {
    background: #fb896d;
    color: white;
}

.material-item:hover .material-icon.material-video {
    background: #3aaeab;
    color: white;
}

.material-item:hover .material-icon.material-powerpoint {
    background: #d04a27;
    color: white;
}

.material-item:hover .material-icon.calendar {
    background: var(--primary);
    color: white;
}

/* Hover dla artykułów - użyj inline border-color jako background */
.material-item:hover .material-icon:not([class*="material-"]):not(.calendar) {
    background: currentColor;
    color: white;
}

.material-info {
    flex: 1;
}

.material-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.material-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
}

.material-size {
    font-size: 12px;
    color: var(--text-light);
}

.material-action {
    font-size: 12px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.material-item:hover .material-action {
    color: var(--primary);
    transform: translateX(3px);
}

/* CTA Card Hero - Folder i Umów prezentację */
.cta-card-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 18px 20px;
    background: var(--gradient-hero);
    border: none;
    border-radius: 16px;
    color: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-card-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.cta-card-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: white;
}

.cta-card-hero:hover .cta-arrow {
    transform: translateX(5px);
}

.cta-card-hero .cta-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.cta-card-hero .cta-content {
    flex: 1;
}

.cta-card-hero .cta-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.cta-card-hero .cta-subtitle {
    display: block;
    font-size: 0.8rem;
    opacity: 0.85;
}

.cta-card-hero .cta-arrow {
    font-size: 16px;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

/* ===========================================
   CONTENT CARD PREMIUM
   =========================================== */
.content-card-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 15px -3px rgb(0 0 0 / 0.08), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0, .12);
}

.card-header-premium {
    background: var(--bg-light);
    padding: 20px 28px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.card-header-premium i {
    color: var(--primary);
    font-size: 1.8rem;
}

.card-body-premium {
    padding: 28px;
}

.card-body-premium .description {
    line-height: 1.8;
    color: var(--text-medium);
    font-weight: 500;
}

.card-body-premium .description p {
    margin-bottom: 16px;
}

.card-body-premium .description ul,
.card-body-premium .description ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.card-body-premium .description li {
    margin-bottom: 8px;
}

.card-body-premium .description strong {
    color: var(--text-dark);
}

/* ===========================================
   PRODUCTS SECTION PREMIUM
   =========================================== */

/* Section Card Premium - dla sekcji w module */
.section-card-premium {
    margin-bottom: 0;
}

.section-card-premium .card-header-premium {
    padding: 16px 24px;
}

.section-card-premium .card-header-premium .section-count {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    min-width: 28px;
    text-align: center;
}

.section-card-premium .card-body-premium {
    padding: 20px 24px;
}

.section-card-premium .card-body-premium .description {
    font-size: 1.2rem;
    line-height: 1.7;
}
.products-section-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 15px -3px rgb(0 0 0 / 0.08), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0, .12);
}

/* Module Section Block - for grouped products */
.module-section-block {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 15px -3px rgb(0 0 0 / 0.08), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0, .12);
}

.section-title-block {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.section-title-block .section-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    font-size: 22px;
    box-shadow: var(--shadow-sm);
}

.section-title-block .section-info {
    flex: 1;
}

.section-title-block .section-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.section-title-block .section-info p {
    font-size: 14px;
    margin-top: 4px;
}

.section-title-block .section-count {
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

.section-header-premium {
    background: var(--bg-light);
    padding: 20px 28px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header-premium .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.section-header-premium .header-left i {
    color: var(--primary);
    font-size: 1.8rem;
}

.section-header-premium .product-count {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.products-grid-premium {
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ===========================================
   PRODUCT CARD PREMIUM
   =========================================== */
.product-card-premium {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-premium .card-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card-premium .card-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.3;
}

.product-card-premium .card-particles span:nth-child(1) { top: 15%; left: 10%; }
.product-card-premium .card-particles span:nth-child(2) { top: 25%; right: 15%; }
.product-card-premium .card-particles span:nth-child(3) { bottom: 20%; left: 20%; }

.product-card-premium .product-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

.product-card-premium .product-content {
    flex: 1;
    margin-bottom: 20px;
}

.product-card-premium h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.product-card-premium p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.product-card-premium .product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.product-card-premium .view-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s ease;
}

.product-card-premium .arrow-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 12px;
    transition: all 0.4s ease;
}

.product-card-premium .badge-new {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239,68,68,0.4);
}

/* Product Card Hover */
.product-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--card-color, var(--primary));
}

.product-card-premium:hover .card-particles {
    opacity: 1;
}

.product-card-premium:hover .arrow-circle {
    transform: translateX(4px);
    background: var(--card-color, var(--primary));
    color: white;
}

.product-card-premium:hover .product-icon {
    background: var(--card-color, var(--primary));
    color: white;
    transform: scale(1.1);
}

.product-card-premium:hover h4 {
    color: var(--card-color, var(--primary));
}

/* Product Card - Dynamic Color from CSS Variable */
.product-card-premium .product-icon { 
    background: color-mix(in srgb, var(--card-color, var(--primary)) 10%, transparent);
    color: var(--card-color, var(--primary)); 
}
.product-card-premium .card-particles span { 
    background: var(--card-color, var(--primary)); 
}
.product-card-premium:hover { 
    box-shadow: 0 -10px 30px color-mix(in srgb, var(--card-color, var(--primary)) 15%, transparent),
                0 20px 40px color-mix(in srgb, var(--card-color, var(--primary)) 20%, transparent);
}

/* Product Card Sizes for Custom Layouts */
.product-card-premium.product-card-large {
    min-height: 220px;
    padding: 28px;
}

.product-card-premium.product-card-large .product-icon {
    width: 70px;
    height: 70px;
}

.product-card-premium.product-card-large .product-icon i {
    font-size: 2rem;
}

.product-card-premium.product-card-large h4 {
    font-size: 20px;
    margin-bottom: 12px;
}

.product-card-premium.product-card-large p {
    font-size: 15px;
    line-height: 1.6;
}

.product-card-premium.product-card-small {
    min-height: 160px;
    padding: 18px;
}

.product-card-premium.product-card-small .product-icon {
    width: 48px;
    height: 48px;
}

.product-card-premium.product-card-small .product-icon i {
    font-size: 2rem;
}

.product-card-premium.product-card-small h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.product-card-premium.product-card-small p {
    font-size: 13px;
    line-height: 1.5;
}

.product-card-premium.product-card-small .product-footer {
    margin-top: 10px;
}

.product-card-premium.product-card-small .view-more {
    font-size: 12px;
}

.product-card-premium.product-card-small .arrow-circle {
    width: 28px;
    height: 28px;
}

/* ===========================================
   PRODUCT PAGE - ADDITIONAL STYLES
   =========================================== */

/* Header Badge for New Products */
.page-header-premium .header-badge {
    margin-bottom: 24px;
}

.badge-new-large {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(239,68,68,0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Back to Module Button */
.back-to-module-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--text-dark);
    transition: all 0.4s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.back-to-module-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: linear-gradient(135deg, color-mix(in srgb, var(--btn-color, var(--primary)) 10%, transparent), color-mix(in srgb, var(--btn-color, var(--primary)) 5%, transparent));
}

.back-to-module-btn:hover::before {
    opacity: 1;
}

.back-to-module-btn .btn-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.4s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: color-mix(in srgb, var(--btn-color, var(--primary)) 15%, transparent);
    color: var(--btn-color, var(--primary));
}

.back-to-module-btn .btn-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.back-to-module-btn .btn-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.back-to-module-btn .btn-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.back-to-module-btn .btn-arrow {
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.back-to-module-btn:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.back-to-module-btn:hover .btn-arrow {
    transform: translateX(-4px);
    color: var(--btn-color, var(--primary));
}

/* Features Card Premium */
.features-card-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0, .12);
}

.features-card-premium .card-header-premium {
    display: flex;
    align-items: center;
    gap: 12px;
}

.features-card-premium .feature-count {
    margin-left: auto;
    background: var(--gradient-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.feature-list-premium {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    transition: all 0.3s ease;
}

.feature-check.hr { background: rgba(245,158,11,0.15); color: var(--color-hr); }
.feature-check.sys-ewi { background: rgba(239,68,68,0.15); color: var(--color-sys-ewi); }
.feature-check.podatki { background: rgba(16,185,129,0.15); color: var(--color-podatki); }
.feature-check.oplaty { background: rgba(34,197,94,0.15); color: var(--color-oplaty); }
.feature-check.eratusz { background: rgba(59,130,246,0.15); color: var(--color-eratusz); }
.feature-check.ks-bud { background: rgba(168,85,247,0.15); color: var(--color-ks-bud); }

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.feature-text {
    font-size: 17px;
    font-weight: 100;
    color: var(--text-medium);
    line-height: 1.7;
}

.feature-item:hover .feature-check {
    transform: scale(1.1);
}

/* Relations Section Premium */
.relations-section-premium {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0, .12);
}

.relations-section-premium .section-header-premium .relation-count {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.relations-grid-premium {
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.relation-card-premium {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.4s ease;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.relation-card-premium:hover {
    background: white;
    border-color: rgba(0,0,0,0.08);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.relation-card-premium.no-link {
    cursor: default;
}

.relation-card-premium.no-link:hover {
    transform: none;
    box-shadow: none;
}

.relation-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

/* Współpraca z innymi systemami - kolor produktu */
.relation-card-premium.relation-product .relation-icon {
    color: var(--relation-color, var(--primary));
}

.relation-card-premium.relation-product:hover .relation-icon {
    background: linear-gradient(135deg, var(--relation-color, var(--primary)), color-mix(in srgb, var(--relation-color, var(--primary)) 70%, black));
    color: white;
    transform: scale(1.1);
}

/* Współpraca z systemami zewnętrznymi - kolor modułu */
.relation-card-premium.relation-external .relation-icon {
    color: var(--relation-color, var(--primary));
}

.relation-card-premium.relation-external:hover .relation-icon {
    background: linear-gradient(135deg, var(--relation-color, var(--primary)), color-mix(in srgb, var(--relation-color, var(--primary)) 70%, black));
    color: white;
    transform: scale(1.1);
}

/* Fallback dla kart bez określonej klasy */
.relation-card-premium:not(.relation-product):not(.relation-external):hover .relation-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

.relation-content {
    flex: 1;
    min-width: 0;
}

.relation-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.relation-content p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.relation-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--text-light);
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.relation-card-premium:hover .relation-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

/* ===========================================
   RESPONSIVE - MODULE PAGE
   =========================================== */
@media (max-width: 991px) {
    .page-header-premium {
        padding: 60px 0;
    }
    
    .page-header-premium h1 {
        font-size: 32px;
    }
    
    .page-header-premium .header-stats {
        gap: 32px;
    }
    
    .page-header-premium .header-stat-value {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .page-header-premium {
        padding: 40px 0;
    }
    
    .page-header-premium h1 {
        font-size: 26px;
    }
    
    .page-header-premium .header-icon-box {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .page-header-premium .header-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .page-header-premium .header-stat {
        flex: 0 0 calc(50% - 12px);
    }
    
    .page-header-premium .header-stat-value {
        font-size: 22px;
    }
    
    .sidebar-premium,
    .materials-premium {
        margin-bottom: 24px;
    }
    
    .products-grid-premium {
        padding: 20px;
        grid-template-columns: 1fr;
    }
    
    .product-card-premium {
        padding: 20px;
    }
}

/* ============================================
   TAGS LIST - INSIDE MATERIALS CONTAINER
   ============================================ */

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--tag-color, var(--primary)) 8%, white);
    color: var(--tag-color, var(--primary));
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--primary)) 25%, transparent);
}

.tag-chip:hover {
    background: var(--tag-color, var(--primary));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--tag-color, var(--primary)) 30%, transparent);
}

.tag-chip i {
    font-size: 9px;
    opacity: 0.7;
}
