/* Ad placements: Google AdSense units and sponsored university cards. */
.a4u-ad {
    --a4u-ad-ink: #0b2545;
    --a4u-ad-accent: #ff6b00;
    --a4u-ad-accent-hover: #e55f00;
    position: relative;
    margin: 1.25rem 0;
    font-family: inherit;
}
.a4u-ad.is-flush { margin: 0; }
.a4u-ad.course-side-ad { margin: 1rem 0 0; }
.a4u-ad.is-top { margin: 0 0 1.25rem; }

.a4u-ad__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.a4u-ad--google .a4u-ad__label { text-align: center; }

/* Google AdSense */
.a4u-ad__code {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}
.a4u-ad__code ins.adsbygoogle { width: 100%; }
.a4u-ad--row .a4u-ad__code ins.adsbygoogle { min-height: 90px; }
.a4u-ad--square .a4u-ad__code ins.adsbygoogle { min-height: 250px; max-width: 336px; margin: 0 auto; }
.a4u-ad--vertical .a4u-ad__code ins.adsbygoogle { min-height: 600px; max-width: 300px; margin: 0 auto; }
.a4u-ad__code ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.a4u-ad--google:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* Sponsored cards */
.a4u-sp {
    display: grid;
    gap: 0.75rem;
}
.a4u-sp__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.a4u-sp__card:hover {
    border-color: var(--a4u-ad-accent);
    box-shadow: 0 12px 28px -16px rgba(11, 37, 69, 0.45);
    transform: translateY(-1px);
}
.a4u-sp__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.a4u-sp__brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.a4u-sp__logo {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    color: var(--a4u-ad-ink);
}
.a4u-sp__logo img {
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
}
.a4u-sp__meta {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.a4u-sp__headline {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--a4u-ad-ink);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.a4u-sp__text {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.a4u-sp__cta {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--a4u-ad-accent);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.a4u-sp__card:hover .a4u-sp__cta { background: var(--a4u-ad-accent-hover); }
.a4u-sp__media {
    display: block;
    overflow: hidden;
    background: var(--a4u-ad-ink);
    aspect-ratio: 16 / 9;
}
.a4u-sp__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Row: one or two wide cards side by side */
.a4u-sp--row.is-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a4u-sp--row .a4u-sp__card { border-left: 4px solid var(--a4u-ad-accent); }

/* Square and tall: stacked cards with optional creative on top */
.a4u-sp--square .a4u-sp__card,
.a4u-sp--vertical .a4u-sp__card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-top: 3px solid var(--a4u-ad-accent);
}
.a4u-sp--square .a4u-sp__body,
.a4u-sp--vertical .a4u-sp__body { padding: 1rem 1rem 0.85rem; }
.a4u-sp--square .a4u-sp__cta,
.a4u-sp--vertical .a4u-sp__cta { margin: 0 1rem 1rem; padding: 0.7rem 1rem; }
.a4u-sp--square .a4u-sp__text { -webkit-line-clamp: 3; }
.a4u-sp--vertical.is-single .a4u-sp__media { aspect-ratio: 4 / 5; }
.a4u-sp--vertical.is-single .a4u-sp__text { -webkit-line-clamp: 4; }
.a4u-sp--vertical.is-multi .a4u-sp__media { aspect-ratio: 21 / 9; }

/* Square and tall cards keep their size when a slot sits in a wide column */
.a4u-ad--square .a4u-sp { max-width: 360px; margin-inline: auto; }
.a4u-ad--vertical .a4u-sp { max-width: 320px; margin-inline: auto; }

/* Header mega menu: compact card without the creative */
.a4u-ad.is-mega .a4u-sp { max-width: 420px; margin-inline: 0; }
.a4u-ad.is-mega .a4u-sp__media { display: none; }

/* Fit the row cards to the width of the slot, not the screen */
.a4u-ad { container-type: inline-size; }
@container (max-width: 760px) {
    .a4u-sp--row.is-multi { grid-template-columns: 1fr; }
}
@container (max-width: 520px) {
    .a4u-sp--row .a4u-sp__card { flex-wrap: wrap; }
    .a4u-sp--row .a4u-sp__cta { width: 100%; }
}
@supports not (container-type: inline-size) {
    @media (max-width: 767px) {
        .a4u-sp--row.is-multi { grid-template-columns: 1fr; }
    }
    @media (max-width: 560px) {
        .a4u-sp--row .a4u-sp__card { flex-wrap: wrap; }
        .a4u-sp--row .a4u-sp__cta { width: 100%; }
    }
}
