/* =========================================================
 *  Webinary — dynamiczna lista (CPT `webinar` + ACF).
 *  Styl przeniesiony 1:1 ze statycznego zrzutu parts/webinary.html
 * ========================================================= */
.webinars-section {
    padding: 60px 20px;
    background-color: transparent;
    width: 100%;
    clear: both;
}
.webinars-container {
    max-width: 1200px;
    margin: 0 auto;
}
.webinars-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.webinar-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    display: grid;
    grid-template-columns: 140px 1fr 280px;
    gap: 40px;
    align-items: start;
    border: 2px solid #e3eaf5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;

    /* Animacja scroll */
    opacity: 0;
    transform: translateX(-40px);
}
.webinar-card.scroll-fade {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.webinar-card.scroll-fade.in-view {
    opacity: 1;
    transform: translateX(0);
}
.webinar-card.no-logo {
    grid-template-columns: 1fr 280px;
}
.webinar-card.has-poster {
    grid-template-columns: 320px 1fr 280px;
}
.webinar-card:hover {
    border-color: #4068b2;
    box-shadow: 0 4px 12px rgba(64, 104, 178, 0.15);
    transform: translateY(-2px);
}

/* LOGO / MINIATURA */
.webinar-logo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
}
.webinar-logo img {
    max-width: 120px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* PLAKAT WEBINARU */
.webinar-poster {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.webinar-poster img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: block;
}

/* TREŚĆ */
.webinar-content {
    flex: 1;
    min-width: 0; /* fix grid overflow */
}
.webinar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.webinar-date {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}
.webinar-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}
.webinar-badge.status-upcoming {
    background: #e7f1ff;
    color: #1e40af;
    border-color: #bfdbfe;
}
.webinar-badge.status-live {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}
.webinar-badge.status-ended {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}
.webinar-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
    line-height: 1.3;
}
.webinar-intro,
.webinar-section {
    margin-bottom: 20px;
}
.webinar-section:last-child {
    margin-bottom: 0;
}
.webinar-label {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px 0;
}
.webinar-text {
    font-size: 15px;
    line-height: 1.7;
    color: #4a5568;
}
.webinar-text p {
    margin: 0 0 12px 0;
}
.webinar-text p:last-child {
    margin-bottom: 0;
}
.webinar-guest-name {
    font-weight: 700;
    color: #1a202c;
}
.webinar-schedule {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e3eaf5;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

/* PRZYCISK ROZWIŃ/ZWIŃ */
.webinar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 0;
    margin-top: 8px;
    color: #4068b2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease;
}
.webinar-toggle:hover {
    color: #2d4d85;
}
.webinar-toggle svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.webinar-card.expanded .webinar-toggle svg {
    transform: rotate(180deg);
}

/* ROZWIJANE SZCZEGÓŁY */
.webinar-details {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, margin-top 0.4s ease, padding-top 0.4s ease;
    margin-top: 0;
}
.webinar-card.expanded .webinar-details {
    max-height: 3000px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #e3eaf5;
}

/* AKCJA / PRZYCISK */
.webinar-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.webinar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background-color: #4068b2;
    color: white !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    width: 100%;
}
.webinar-btn:hover {
    background-color: #2d4d85;
    gap: 12px;
    color: white !important;
}
.webinar-btn svg {
    transition: transform 0.2s ease;
}
.webinar-btn:hover svg {
    transform: translateX(4px);
}
.webinar-btn.disabled {
    background-color: #cbd5e1;
    pointer-events: none;
    cursor: not-allowed;
}
.webinar-note {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 992px) {
    .webinar-card,
    .webinar-card.no-logo {
        grid-template-columns: 100px 1fr;
        gap: 24px;
        padding: 32px;
    }
    .webinar-card.has-poster {
        grid-template-columns: 240px 1fr;
    }
    .webinar-poster img {
        max-width: 240px;
    }
    .webinar-action {
        grid-column: 1 / 3;
        align-items: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #e2e8f0;
    }
}
@media (max-width: 640px) {
    .webinars-section {
        padding: 40px 16px;
    }
    .webinar-card,
    .webinar-card.no-logo,
    .webinar-card.has-poster {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    .webinar-logo {
        justify-content: center;
        padding-top: 0;
        margin-bottom: 8px;
    }
    .webinar-poster img {
        max-width: 100%;
    }
    .webinar-title {
        font-size: 20px;
    }
    .webinar-action {
        grid-column: 1;
        align-items: center;
        width: 100%;
    }
    .webinar-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .webinar-card.scroll-fade {
        transition-duration: 0.01ms !important;
    }
    .webinar-card.scroll-fade.in-view {
        opacity: 1 !important;
        transform: none !important;
    }
}
