/* =========================================================================
   Homepage promo blocks — Marketplace widget, Register-AI widget,
   Academy section. Mobile-first.
   ========================================================================= */

/* ---------- Everfit Marketplace widget ---------------------------------- */
/*
   The card art (bg + logo + headline + subtext) is a single baked image.
   The "Try for free" button is a live <a> overlaid on top of the baked
   button, aligned to the baked button position. Reference frame: 347 x 505.
*/
.everfit-marketplace {
    position: relative;
    display: block;
    width: 100%;
    max-width: 347px;
    margin: 0 auto;
    line-height: 0;
}

.everfit-marketplace__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.everfit-marketplace__btn {
    position: absolute;
    left: 50%;
    top: 84.2%;            /* button top: 425 / 505 */
    transform: translateX(-50%);
    width: 92.2%;          /* button width: 320 / 347 */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 19px 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.everfit-marketplace__btn:hover, .everfit-marketplace__btn:focus {
    background: #F6F6F6;
    color: #000;
}

.everfit-marketplace__btn:active {
    transform: translateX(-50%) scale(0.99);
    color: #000;
}

.everfit-marketplace__btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---------- Everfit Register (AI) widget ------------------------------- */
/*
   Card art (logo + headline + calendar/AI visual) is a baked image. The live
   sign-up form (email input + "Start 30-day trial" button) is overlaid on the
   cleared area, anchored to the bottom so the button stays put and the error
   row pushes the input up. Reference frame: 347 x 505.
*/
.everfit-register-ai {
    position: relative;
    display: block;
    width: 100%;
    max-width: 347px;
    margin: 0 auto;
    line-height: 0;
}

.everfit-register-ai__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.everfit-register-ai__form {
    position: absolute;
    left: 50%;
    bottom: 3.2%;          /* button anchored where the design button sits; form grows upward */
    transform: translateX(-50%);
    width: 92.2%;          /* 320 / 347 */
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;             /* between field group and button */
    line-height: normal;
}

.everfit-register-ai__field {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;              /* between input and error row */
    width: 100%;
}

.everfit-register-ai__field input {
    box-sizing: border-box;
    width: 100%;
    padding: 19px 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #000;           /* typed text — black (typing state) */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.everfit-register-ai__field input::placeholder {
    color: rgba(0, 0, 0, 0.55);
}

/* Error state — coral orange border + text (Figma Accent/Coral Orange #EB5302) */
.everfit-register-ai__field.input-error input,
.everfit-register-ai__field input.error {
    border-color: #EB5302;
    color: #EB5302;
}

/* Neutralize the theme's global .input-wrapper error tint (footer-blog.css:1164),
   which the shared engine's markup would otherwise inherit — Figma shows no band. */
.everfit-register-ai__field.input-wrapper:has(input.error),
.everfit-register-ai__field.input-wrapper.input-error {
    background-color: transparent;
    outline: none;
    border-color: transparent;
}

.everfit-register-ai__field .custom-error-message {
    display: none;
    align-items: center;
    gap: 4px;
    color: #EB5302;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
}

.everfit-register-ai__field .custom-error-message.show {
    display: flex;
}

.everfit-register-ai__err-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.everfit-register-ai__btn {
    box-sizing: border-box;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 19px 20px;
    background: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.everfit-register-ai__btn:hover {
    background: #222222;
}

.everfit-register-ai__btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Loading state — EverfitHubspotForm adds .is-loading to the submit button */
.everfit-register-ai__spinner {
    display: none;
}

.everfit-register-ai__btn.is-loading .everfit-register-ai__btn-label,
.everfit-register-ai__btn.is-loading .everfit-register-ai__btn-icon {
    visibility: hidden;
}

.everfit-register-ai__btn.is-loading .everfit-register-ai__spinner {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: efRegAiSpin 0.7s linear infinite;
}

@keyframes efRegAiSpin {
    to { transform: rotate(360deg); }
}

/* ---------- Everfit Academy section (full-width) ---------------------- */
/*
   Full-width promo band. One baked backdrop image per breakpoint, swapped via
   <picture>, sized width:100% / height:auto so the art scales to fill the width
   with no cropping between breakpoints. The heading + button are real DOM,
   grouped in a centered content block. Heading/button/positions set per tier.
   Mobile-first.
*/
.everfit-academy {
    position: relative;
    width: 100%;
    margin: 40px 0 0;
    padding: 0;
    line-height: 0;
}

.everfit-academy__img {
    display: block;
    width: 100%;
    height: auto;
}

.everfit-academy__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 60px 18px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 39px;
    line-height: normal;
    text-align: center;
}

.everfit-academy__heading {
    margin: 0;
    max-width: 339px;
    color: #fff;
    font-family: 'TWK Everett', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.everfit-academy__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 20px 26px;
    background: #000;
    color: #fff;
    font-family: 'Geist', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.everfit-academy__btn:hover, .everfit-academy__btn:focus {
    background: #222222;
    color: #fff;
}

.everfit-academy__btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.everfit-academy__btn:active {
    transform: scale(0.98);
}

.everfit-academy__btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (min-width: 641px) {
    .everfit-academy__content { top: 46.55%; left: 50%; transform: translate(-50%, -50%); padding: 0; }
    .everfit-academy__heading { max-width: 563px; font-size: 36px; }

}
@media (min-width: 1024px) {
    .everfit-academy { margin: 60px 0 0;}
}
@media (min-width: 1440px) {
    .everfit-academy { margin: 100px 0 0; }
    .everfit-academy__heading { max-width: 747px; font-size: 48px; line-height: 1; }
}
@media (min-width: 1920px) {
    .everfit-academy__heading { max-width: 841px;}
}
