/*
 * Czytelny, responsywny program szkolenia.
 * Program pozostaje jednym kafelkiem, bez obcinania treści na wąskich ekranach.
 */
.eureka-program-section,
.eureka-program-section > div,
.eureka-program-card,
.eureka-program-card .eureka-formatted-content {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.eureka-program-section {
    overflow: visible !important;
}

.eureka-program-card {
    overflow-x: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.eureka-program-card .eureka-formatted-content > * {
    max-width: 100% !important;
}

.eureka-program-card .eureka-formatted-content p,
.eureka-program-card .eureka-formatted-content h3,
.eureka-program-card .eureka-formatted-content h4,
.eureka-program-card .eureka-bullet-text {
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.eureka-program-card .eureka-formatted-content img,
.eureka-program-card .eureka-formatted-content video,
.eureka-program-card .eureka-formatted-content iframe {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
}

.eureka-program-card .eureka-formatted-content table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

@media (max-width: 767px) {
    .eureka-program-card {
        border-radius: 1.35rem !important;
        padding: 1.25rem !important;
    }

    .eureka-program-card .eureka-bullet-item {
        padding-left: 0 !important;
    }
}

/*
 * Mobilne kafelki najbliższych szkoleń na stronie głównej.
 * Mniej pustych przestrzeni, większa data oraz spokojniejszy tytuł.
 */
@media (max-width: 640px) {
    #calendar {
        padding-top: 3rem !important;
        padding-bottom: 3.5rem !important;
    }

    #calendar .rounded-\[2\.5rem\] {
        border-radius: 1.75rem !important;
        padding: 1.15rem !important;
        min-height: auto !important;
    }

    #calendar a[class*="rounded-3xl"][class*="bg-white"] {
        align-items: flex-start !important;
        gap: 0.9rem !important;
        padding: 0.95rem !important;
        border-radius: 1.35rem !important;
        min-height: auto !important;
    }

    #calendar a[class*="rounded-3xl"][class*="bg-white"] > div[class*="w-16"][class*="h-16"] {
        width: 4.8rem !important;
        height: 4.8rem !important;
        min-width: 4.8rem !important;
        border-radius: 1.25rem !important;
        font-size: 1.42rem !important;
        color: #55708a !important;
        background: #f8fbff !important;
        box-shadow: inset 0 1px 8px rgba(15, 23, 42, 0.04) !important;
    }

    #calendar a[class*="rounded-3xl"][class*="bg-white"] > div[class*="w-16"][class*="h-16"] span:first-child {
        font-size: 1.08rem !important;
        line-height: 1 !important;
        letter-spacing: -0.03em !important;
    }

    #calendar a[class*="rounded-3xl"][class*="bg-white"] > div[class*="w-16"][class*="h-16"] span:last-child {
        font-size: 0.72rem !important;
        line-height: 1 !important;
        margin-top: 0.18rem !important;
        letter-spacing: 0.08em !important;
        opacity: 0.82 !important;
    }

    #calendar h4 {
        font-size: clamp(0.95rem, 4.7vw, 1.18rem) !important;
        line-height: 1.12 !important;
        font-weight: 650 !important;
        text-transform: none !important;
        letter-spacing: -0.02em !important;
    }

    #calendar h4 + span,
    #calendar h4 ~ span {
        font-size: 0.68rem !important;
        line-height: 1 !important;
        padding: 0.32rem 0.55rem !important;
        border-radius: 0.55rem !important;
        letter-spacing: 0.04em !important;
    }

    #calendar a[class*="rounded-3xl"][class*="bg-white"] [class*="opacity-50"] {
        opacity: 0.72 !important;
        gap: 0.58rem !important;
        flex-wrap: wrap !important;
        margin-top: 0.45rem !important;
    }

    #calendar a[class*="rounded-3xl"][class*="bg-white"] [class*="opacity-50"] p {
        font-size: 0.72rem !important;
        line-height: 1.22 !important;
        letter-spacing: 0.04em !important;
    }
}

/*
 * Podstrona szkolenia na telefonie: obraz wyróżniający pojawia się
 * bezpośrednio pod tytułem, przed opisem. Oryginalny obraz z układu
 * desktopowego jest wtedy ukryty, żeby nie dublować treści.
 */
@media (max-width: 767px) {
    .eureka-mobile-course-hero {
        display: block !important;
        margin: -0.2rem 0 1.35rem !important;
        border-radius: 1.55rem !important;
        overflow: hidden !important;
        border: 1px solid rgba(186, 230, 253, 0.9) !important;
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10) !important;
        background: #ffffff !important;
    }

    .eureka-mobile-course-hero img {
        display: block !important;
        width: 100% !important;
        aspect-ratio: 4 / 3 !important;
        object-fit: cover !important;
    }

    img[data-eureka-mobile-hero-source="1"],
    div[data-eureka-mobile-hero-source-wrap="1"] {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .eureka-mobile-course-hero {
        display: none !important;
    }
}
