/* RESET & VARIABLES */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --border: #e5e9f0;
    --text: #1d1c1a;
    --muted: #6b7280;
    --accent: #ff6961;
    --accent-soft: #e0e7ff;

    --radius: 14px;
    --radius-sm: 8px;
}

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

.responsive-image {
    display: none;
}

/* BASE (MOBILE FIRST) */
body {
    margin: 0;
    padding: 1rem;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Ubuntu, sans-serif;
    line-height: 1.6;
}

.ml-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.ml-logo img {
    max-width: 250px;
}

[id*="link"] {
    width: 100%;
    display: none;
    flex-flow: column;
    align-items: center;
    gap: 16px;
}

.player-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    display: block;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    ;
}

iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.course-btn-group {
    display: flex;
    align-items: center;
    flex-flow: column;
    width: 100%;
    gap: 1rem;
}

.course-btn {
    width: 100%;
    text-align: center;
    background-color: black;
    padding: 0.85rem;
    border-radius: 14px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: background-color 0.5s ease;
    white-space: nowrap;
}

.course-btn img {
    max-width: 24px;
    height: auto;
    display: block;
}

.overview-btn {
    background-color: #ff6961;
}

.wa-share-btn {
    background-color: #25D366;
}

.student-support:any-link {
    width: 100%;
    max-width: 250px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: black;
    margin-top: 16px;
    transition: color 0.5s ease, text-decoration 0.5s ease;
}

.student-support img {
    max-width: 24px;
}

.phone-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-flow: column;
}

.phone-group select {
    width: 100%;
}

/* FORM CONTAINER */
.fs-form {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
}

/* FIELDSETS */
fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.fieldset-title {
    padding: 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
}

.nested-fieldset {
    margin-top: 1rem;
    padding: 1rem;
    background: #fafbff;
    border-radius: var(--radius-sm);
}

.nested-legend {
    font-size: 0.85rem;
    font-weight: 600;
}

/* LABELS & INPUTS */
label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

input,
select {
    font: inherit;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

input[type="radio"] {
    width: auto;
}

input::placeholder {
    color: var(--muted);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* RADIO BUTTONS */
input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--accent);
}

fieldset>label:has(input[type="radio"]) {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

/* SUPPORTING TEXT */
.fieldset-help {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.fieldset-help a:any-link {
    color: black;
    transition: color 0.5s ease, text-decoration 0.5s ease;
}

.fieldset-list {
    padding-left: 1.25rem;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* FILE UPLOAD */
.file-upload-label input[type="file"] {
    padding: 0.5rem;
    border: 1px dashed var(--border);
    background: #fafafa;
    width: 100%;
    max-width: 250px;
}

/* SUBMIT BUTTON */
.submit-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: var(--radius);
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.pay-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: var(--radius);
    border: none;
    background: #25D366;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    margin-bottom: 0.5rem;
}

small {
    display: block;
    margin-bottom: 1rem;
    font-style: italic;
}

footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: #64748b;
}

.heart {
    display: inline-block;
    animation: heartbeat 1s infinite;
    transform-origin: center;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

button:disabled {
    pointer-events: none;
    background-color: gray;
}

/* TABLET (>= 640px) */
@media (min-width: 640px) {
    body {
        padding: 2rem;
    }

    .ml-logo img {
        max-width: 350px;
    }

    .fs-form {
        max-width: 720px;
        margin: 0 auto;
        padding: 2rem;
    }

    fieldset {
        padding: 1.75rem;
    }

    .file-upload-label input[type="file"] {
        width: 500px;
    }

    .phone-group {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-flow: row;
    }

    .phone-group select {
        width: 28%;
    }
}

/* DESKTOP (>= 1024px) */
@media (min-width: 1024px) {
    .fs-form {
        max-width: 900px;
        position: relative;
    }

    .student-model {
        display: block;
        position: absolute;
        right: 38px;
        top: -156px;
        margin: 0;
    }

    .student-model img {
        max-width: 160px;
    }

    .ml-logo img {
        max-width: 450px;
    }

    /* Two-column layout for better scannin */
    fieldset {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.5rem;
    }

    fieldset legend {
        grid-column: 1 / -1;
    }

    fieldset>label,
    .nested-fieldset,
    .fieldset-help,
    .fieldset-list,
    .file-upload-label {
        grid-column: 1 / -1;
    }

    .file-upload-label input[type="file"] {
        width: 500px;
    }

    .submit-btn {
        transition: background 0.2s ease, color 0.2s ease;
    }

    .submit-btn:hover {
        background-color: var(--text);
        color: var(--text);
    }

    .pay-btn:hover {
        color: #075E54;
    }

    img[alt="send-icon"],
    img[alt="pay-icon"] {
        max-width: 32px;
        opacity: 0;
        display: block;
        transition: opacity 0.2s ease;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .submit-btn:hover img[alt="send-icon"],
    .pay-btn:hover img[alt="pay-icon"] {
        opacity: 1;
    }


    .course-btn-group {
        flex-flow: row;
    }

    .overview-btn:hover {
        background-color: black;
    }

    .wa-share-btn:hover,
    .pay-btn:hover {
        background-color: #075E54;
    }

    .student-support:hover {
        text-decoration: none;
        color: #766CF1;
    }

    .fieldset-help a:hover {
        text-decoration: none;
        color: #766CF1;
    }

    .phone-group select {
        width: 18%;
    }
}