:root {
    --afs-font-heading: "Inter", sans-serif;
    --afs-font-body: "Titillium Web", sans-serif;
    --afs-blue: #2952d6;
    --afs-accent: #f2994a;
    --afs-text: #1d2d50;
    --afs-text-soft: #52627d;
    --afs-light: #f5f7fb;
    --afs-white: #ffffff;
    --afs-white-soft: rgba(255, 255, 255, 0.92);
    --afs-lh-heading: 1.1;
    --afs-lh-body: 1.5;
    --afs-fs-body: 1rem;
    --afs-fs-body-lg: 1.1875rem;
    --afs-fs-title: 2.48rem;
    --afs-space-title: 1.5rem;
}

html {
    scroll-behavior: smooth;
}

.afs-page {
    color: var(--afs-text);
    background: var(--afs-white);
    font-family: var(--afs-font-body);
    font-weight: 400;
}

.afs-page img {
    display: block;
    max-width: 100%;
    height: auto;
}

.afs-page h1,
.afs-page h2,
.afs-page h3 {
    margin: 0 0 1rem;
    color: var(--afs-text);
    font-family: var(--afs-font-heading);
    font-weight: 700;
    line-height: var(--afs-lh-heading);
}

.afs-page p,
.afs-page li {
    color: var(--afs-text-soft);
    font-size: var(--afs-fs-body);
    line-height: var(--afs-lh-body);
}

.afs-section__title {
    font-size: var(--afs-fs-title);
    line-height: var(--afs-lh-heading);
    margin-bottom: var(--afs-space-title);
    scroll-margin-top: 1.5rem;
}

.afs-section__text {
    margin-bottom: 1.25rem;
}

/* HERO */
.afs-hero {
    position: relative;
    background: var(--afs-blue);
    background: linear-gradient(rgb(0, 0, 0, 0.4), rgb(0, 0, 0, 0.4)), url("assets/img/hero.jpg");
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.afs-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--afs-blue);
    clip-path: polygon(0 0, 57% 0, 53% 100%, 0 100%);
    z-index: 2;
}

.afs-hero>.container {
    position: relative;
    z-index: 3;
}

.afs-hero__content {
    max-width: 760px;
    padding: 78px 0 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.afs-hero__title {
    margin-bottom: 2.25rem;
}

.afs-hero__title-main {
    display: block;
    color: #fff;
    font-family: var(--afs-font-heading);
    font-size: 3.5rem;
    line-height: var(--afs-lh-heading);
    font-weight: 700;
}

.afs-hero__text {
    max-width: 540px;
    margin-bottom: 2.75rem;
    font-size: var(--afs-fs-body-lg);
    line-height: var(--afs-lh-body);
    color: #fff !important;
}

/* LOGOS */
.afs-logo-row {
    margin-top: 1.5rem;
    align-items: center;
}

.afs-logo-placeholder {
    width: 100%;
    max-width: 146px !important;
    margin: 0 auto;
}

/* SECTION BACKGROUND ALTERNATION (text-only sections) */
.afs-section--bg-white {
    background: var(--afs-white);
}

.afs-section--bg-blue {
    background: var(--afs-blue);
}

.afs-section--bg-blue h1,
.afs-section--bg-blue h2,
.afs-section--bg-blue h3,
.afs-section--bg-blue p,
.afs-section--bg-blue li {
    color: #fff;
}

.afs-section--bg-blue a {
    color: #fff;
    text-decoration: underline;
}

.afs-section--bg-blue a:hover {
    color: var(--afs-white-soft);
}

/* COURSE CARDS */
.afs-course-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem 1.75rem;
    background: var(--afs-white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(20, 30, 60, 0.12);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.afs-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(20, 30, 60, 0.18);
    text-decoration: none;
}

.afs-section--bg-blue .afs-course-card {
    text-decoration: none;
}

.afs-course-card__info {
    flex: 1 1 auto;
    min-width: 0;
}

.afs-course-card__title {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    transition: color 0.2s ease;
}

.afs-section--bg-blue .afs-course-card__title {
    color: var(--afs-text);
}

.afs-course-card:hover .afs-course-card__title {
    color: var(--afs-blue);
}

.afs-course-card__university {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.afs-section--bg-blue .afs-course-card__university {
    color: var(--afs-text-soft);
}

.afs-course-card__logo {
    flex: 0 0 auto;
    width: 120px;
    max-width: 30%;
    height: auto;
}

/* CALL BOX (bandi di ammissione) */
.afs-call-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(41, 82, 214, 0.06);
    border: 1px solid rgba(41, 82, 214, 0.18);
    border-radius: 8px;
}

.afs-call-box__label {
    font-weight: 700;
    color: var(--afs-text);
}

.afs-call-box--muted .afs-call-box__label {
    color: var(--afs-text-soft);
    font-weight: 600;
}

.afs-call-box__btn {
    padding: 0.5rem 1.1rem;
    background: var(--afs-blue);
    border-radius: 999px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.2s ease;
    text-decoration: none !important;

}

.afs-call-box__btn:hover {
    filter: brightness(0.9);
    color: #fff;
    text-decoration: none;
}

.afs-call-box__deadline {
    margin-left: auto;
    padding: 0.35rem 0.7rem;
    background: var(--afs-accent);
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.afs-call-box__btn--outline {
    background: transparent;
    border: 2px solid var(--afs-blue);
    color: var(--afs-blue);
}

.afs-call-box__btn--outline:hover {
    background: var(--afs-blue);
    filter: none;
    color: #fff;
}

.afs-section--bg-blue .afs-call-box {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

.afs-section--bg-blue .afs-call-box__label {
    color: #fff;
}

.afs-section--bg-blue .afs-call-box--muted .afs-call-box__label {
    color: var(--afs-white-soft);
}

.afs-section--bg-blue .afs-call-box__btn {
    background: #fff;
    color: var(--afs-blue);
}

.afs-section--bg-blue .afs-call-box__btn:hover {
    background: var(--afs-white-soft);
    color: var(--afs-blue);
}

.afs-section--bg-blue .afs-call-box__btn--outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.afs-section--bg-blue .afs-call-box__btn--outline:hover {
    background: #fff;
    color: var(--afs-blue);
}

/* FOOTER */
.afs-footer {
    padding: 1.5rem 0;
    background: var(--afs-text);
}

.afs-footer__text {
    margin: 0;
    color: var(--afs-white-soft) !important;
    font-size: 0.85rem;
}

.afs-footer__link {
    display: inline-block;
    color: var(--afs-white-soft) !important;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    text-decoration: underline;
}

/* MEDIA SECTIONS (image / video) */
.afs-media-section {
    background: var(--afs-light);
}

.afs-media-frame {
    max-width: 900px;
    margin: 0 auto;
}

.afs-media-frame img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.afs-media-frame .embed-responsive {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(25, 45, 90, 0.12);
}

/* RESPONSIVE */

@media (max-width: 1199.98px) {
    .afs-hero {
        min-height: 650px;
    }

    .afs-hero__content {
        min-height: 650px;
        max-width: 520px;
    }

    .afs-hero__title-main {
        font-size: 2.95rem;
    }
}

@media (max-width: 991.98px) {
    .afs-hero {
        min-height: auto;
        background-position: center right;
        background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url("assets/img/hero.jpg");
    }

    .afs-hero__overlay {
        display: none;
    }

    .afs-hero__content {
        min-height: auto;
        max-width: none;
        padding: 60px 0 40px;
    }

    .afs-hero__title-main {
        font-size: 2.7rem;
    }

    .afs-call-box {
        align-items: center;
    }

    .afs-call-box__deadline {
        order: 1;
        margin-left: auto;
    }

    .afs-call-box::after {
        content: "";
        order: 2;
        flex-basis: 100%;
        height: 0;
    }

    .afs-call-box__btn {
        order: 3;
    }

    .afs-course-card__logo {
        order: -1;
    }
}

@media (max-width: 767.98px) {
    .afs-hero {
        background-position: 68% top;
    }

    .afs-hero__title-main {
        font-size: 2.3rem;
        line-height: var(--afs-lh-heading);
    }

    .afs-hero__text {
        font-size: 1.05rem;
    }

    .afs-section__title {
        font-size: 1.9rem;
    }
}

@media (max-width: 575.98px) {
    .afs-hero__content {
        padding: 48px 0 32px;
    }

    .afs-hero__title-main {
        font-size: 1.95rem;
    }

    .afs-section__title {
        font-size: 1.7rem;
    }

    .afs-course-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .afs-course-card__logo {
        width: 96px;
        max-width: 40%;
    }

    .afs-call-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .afs-call-box__deadline {
        margin-left: 0;
    }

    .afs-call-box__btn {
        width: 100%;
        text-align: center;
    }
}