:root {
    --szkolenia-primary: #2c3e50;
    --szkolenia-accent: #26CBC5;
    --szkolenia-bg-light: #e1e1e1;
    --szkolenia-text-main: #333333;
    --szkolenia-text-muted: #666666;
}

/* Delicate & Minimalist Grid Layout for Szkolenia */
section#szkolenia-archive {
    width: 100%;
    background: var(--szkolenia-bg-light);
    padding-bottom: 100px;
}

div#szkolenia-breadcrumps {
    padding: 80px 0 60px 0;
    margin: 0;
    font-size: 1.5em;
    font-weight: 300;
    text-transform: uppercase;
    color: var(--szkolenia-text-muted);
    text-align: center;
    letter-spacing: 2px;
}

ul#szkolenia-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

li.szkolenia-posts-item {
    width: 320px;
    list-style: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative; /* Crucial context for absolute positioning inside */
}

a.szkolenia-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--szkolenia-text-main);
    position: relative; /* Context for children */
}

/* Base style for the image area */
.szkolenia-bg {
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    background-color: #fff; /* White bg for image container */
    transition: all 0.3s ease;
}

/* Hover effect for items WITH images */
li.szkolenia-posts-item:not(.no-image):hover .szkolenia-bg {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* SPECIAL STYLE FOR NO-IMAGE ITEMS */
li.no-image .szkolenia-bg {
    /* Slightly lighter than main bg to stand out but stay subtle */
    background: #f2f2f2; 
    border: 1px solid #dcdcdc;
    display: block; /* Reset flex */
    height: 320px; /* Taller box for text-only items */
}

/* Subtle pattern for no-image background */
li.no-image .szkolenia-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    /* Use the accent variable in the SVG data URI if possible, but encoded is hard. 
       However, the SVG already uses %2326cbc5 which is the accent color. */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2326cbc5' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Center title inside the box for no-image items */
/* IMPORTANT: Targeting the content inside the link, inside the .no-image li */
li.no-image .szkolenia-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px; /* Generous padding */
    text-align: center;
    box-sizing: border-box;
    z-index: 10;
}

li.no-image .szkolenia-content h2 {
    font-size: 1.3em;
    font-weight: 300;
    margin-bottom: 25px;
    color: var(--szkolenia-text-main);
}

li.no-image .btn-more {
    margin: 0 auto;
}

/* STANDARD CONTENT STYLE (for items with images) */
.szkolenia-content {
    padding: 15px 5px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.szkolenia-content h2 {
    color: var(--szkolenia-text-main);
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 8px 0;
    transition: color 0.3s ease;
}

li.szkolenia-posts-item:hover .szkolenia-content h2 {
    color: var(--szkolenia-accent);
}

.btn-more {
    font-size: 0.75em;
    text-transform: uppercase;
    color: var(--szkolenia-text-muted);
    letter-spacing: 1.5px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    width: fit-content;
}

.btn-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--szkolenia-accent);
    transition: width 0.3s ease;
}

li.szkolenia-posts-item:hover .btn-more {
    color: var(--szkolenia-accent);
}

li.szkolenia-posts-item:hover .btn-more::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 700px) {
    li.szkolenia-posts-item {
        width: 100%;
    }
    .szkolenia-bg {
        height: 200px;
    }
    li.no-image .szkolenia-bg {
        height: 250px;
    }
}
