/* ===== STEMigo intro (home hero) ===== */
.stemigo-intro {
    --navy: #0f1f5c;
    --gold: #dc9a1c;
    --gold-dark: #c4870f;
    --grey: #4b5563;
    --line: #e5e7eb;

    position: relative;
    overflow: hidden;
    background: #fff;
}

.intro-container {
    position: relative;
    max-width: 1300px;
}

/* ---------- Text side ---------- */
.intro-text {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 72px 0 56px;
}

.intro-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.tag-line {
    flex: 0 0 32px;
    height: 2px;
    background: var(--gold);
}

.tag-text {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--navy);
}

.intro-title {
    margin: 0 0 18px;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3.8vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    color: var(--navy);
}

.title-top,
.title-gold {
    display: block;
}

.title-gold {
    color: var(--gold);
}

.intro-desc {
    max-width: 560px;
    margin: 0 0 28px;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--grey);
}

/* ---------- Search ---------- */
.course-finder {
    display: grid;
    grid-template-columns: minmax(0, 0.5fr) minmax(0, 0.5fr) max-content;
    align-items: center;
    margin-bottom: 30px;
    padding: 12px 12px 12px 8px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 31, 92, 0.12);
}

.finder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 4px 14px;
}

.finder-item + .finder-item {
    border-left: 1px solid var(--line);
}

.finder-icon {
    flex: 0 0 auto;
    width: 20px;
    font-size: 1.2rem;
    text-align: center;
    color: var(--gold);
}

.finder-body {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.finder-select {
    display: block;
    width: 100%;
    padding: 0 16px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}


.finder-arrow {
    position: absolute;
    top: 5px;
    right: 0;
    font-size: 0.65rem;
    color: var(--grey);
    pointer-events: none;
}

.finder-hint {
    display: block;
    margin-top: 2px;
    font-size: 0.7rem;
    line-height: 1.3;
    color: var(--grey);
}

.finder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 6px;
    padding: 13px 22px;
    border: 0;
    border-radius: 10px;
    background: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.finder-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-1px);
}

.finder-btn:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

/* ---------- Perks ---------- */
.intro-perks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.perk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--navy);
}

.perk:first-child {
    padding-left: 0;
}

.perk + .perk {
    border-left: 1px solid var(--line);
}

.perk i {
    font-size: 1.35rem;
    color: var(--gold);
}

/* ---------- Image side (inside the container) ---------- */
.intro-visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
}

.intro-visual picture {
    display: block;
    height: 100%;
}

.intro-student {
    display: block;
    height: 100%;
    width: auto;
    max-width: none;
    transform-origin: right bottom;
    animation: intro-zoom 7s ease-in-out infinite alternate;

    /* soft left and right edges so the image melts into the page */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 90%, transparent 100%);
}

/* ===== Responsive ===== */

/* Small laptop */
@media (max-width: 1199.98px) {
    .intro-text {
        max-width: 600px;
        padding: 56px 0 44px;
    }

    .intro-student {
        height: 82%;
    }

    .finder-item {
        padding: 4px 10px;
    }

    .finder-btn {
        padding: 12px 16px;
    }

    .perk {
        padding: 0 12px;
    }
}

/* Tablet and mobile: image goes under the text */
@media (max-width: 991.98px) {
    .intro-text {
        max-width: 100%;
        padding: 44px 0 20px;
    }

    .intro-visual {
        position: static;
        display: block;
    }

    .intro-visual picture {
        height: auto;
    }

    .intro-student {
        height: auto;
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
    }

    .course-finder {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 12px;
    }

    .finder-btn {
        grid-column: 1 / -1;
        margin-left: 0;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .intro-text {
        padding: 36px 0 16px;
    }

    .course-finder {
        grid-template-columns: 1fr;
        padding: 6px 14px 14px;
        row-gap: 0;
    }

    .finder-item,
    .finder-item:first-child {
        padding: 14px 2px;
    }

    .finder-item + .finder-item {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .finder-btn {
        width: 100%;
        margin-top: 6px;
    }

    .intro-perks {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 12px;
    }

    .perk,
    .perk:first-child {
        padding: 0;
    }

    .perk + .perk {
        border-left: 0;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .tag-text {
        font-size: 0.72rem;
    }

    .perk {
        font-size: 0.76rem;
        gap: 8px;
    }

    .perk i {
        font-size: 1.15rem;
    }
}