/* =========================================================
   StudyMEDIC - Course Landing Page
   Lightweight, isolated and responsive
========================================================= */

body.page-template-product-lp {
    background: #ffffff;
}

.sm-course-landing,
.sm-course-landing * {
    box-sizing: border-box;
}

.sm-course-landing {
    --sm-primary: #2f2a8f;
    --sm-pink: #ef4b83;
    --sm-pink-dark: #de3a72;
    --sm-pink-soft: #fff0f5;
    --sm-blue: #1266be;
    --sm-blue-soft: #f1f7ff;
    --sm-text: #121936;
    --sm-body: #273157;
    --sm-border: #bfd7fb;
    width: 100%;
    padding-top: var(--header-height, 105px);
    color: var(--sm-text);
    background: #ffffff;
}

.sm-course-container {
    width: min(var(--site-container-width, 1180px), calc(100% - (var(--site-container-gutter, 30px) * 2)));
    margin-inline: auto;
}

.sm-course-hero {
    padding: 34px 0 54px;
}

.sm-course-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
    gap: clamp(36px, 5vw, 78px);
    align-items: start;
}

.sm-course-main {
    min-width: 0;
}

/* Badges */
.sm-course-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.sm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 13px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.sm-badge-premium {
    background: #daa61f;
}

.sm-badge-bestseller {
    background: linear-gradient(90deg, #d74f84 0%, #13a9d8 100%);
}

/* Heading */
.sm-course-heading h1 {
    margin: 0;
    color: var(--sm-primary);
    font-size: clamp(48px, 4.3vw, 68px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.sm-course-type {
    margin: 12px 0 0;
    color: #121212;
    font-size: clamp(25px, 2.1vw, 33px);
    font-weight: 400;
    line-height: 1.25;
}

.sm-course-price {
    margin: 8px 0 0;
    color: #ea3c6d;
    font-size: clamp(27px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.15;
}

/* Stats */
.sm-course-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--sm-border);
    border-radius: 22px;
    background: var(--sm-blue-soft);
}

.sm-course-stat {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-width: 0;
    min-height: 94px;
    padding: 18px 22px;
}

.sm-course-stat:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 21px;
    right: 0;
    bottom: 21px;
    width: 1px;
    background: #d8e0ed;
}

.sm-course-stat-icon {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: var(--sm-blue);
}

.sm-course-stat-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sm-course-stat-icon--filled svg {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1;
}

.sm-course-stat-copy {
    min-width: 0;
}

.sm-course-stat-copy strong,
.sm-course-stat-copy > span {
    display: block;
}

.sm-course-stat-copy strong {
    margin-bottom: 3px;
    color: #071127;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.sm-course-stat-copy > span {
    color: #202942;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
}

/* Body content */
.sm-course-description {
    max-width: 1150px;
    margin-top: 25px;
    color: var(--sm-body);
    font-size: 18px;
    line-height: 1.72;
}

.sm-course-description p {
    margin: 0 0 7px;
}

.sm-course-description p:last-child {
    margin-bottom: 0;
}

.sm-course-dates {
    margin-top: 23px;
    color: var(--sm-body);
    font-size: 17px;
    line-height: 1.55;
}

.sm-course-dates p {
    margin: 0;
}

/* Buttons */
.sm-course-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 33px;
}

.sm-course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 198px;
    min-height: 54px;
    padding: 12px 30px;
    border: 0;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.sm-course-btn:hover {
    transform: translateY(-2px);
}

.sm-course-btn-primary,
.sm-course-btn-secondary {
    color: #ffffff !important;
    background: var(--sm-pink);
}

.sm-course-btn-primary:hover,
.sm-course-btn-secondary:hover {
    background: var(--sm-pink-dark);
    box-shadow: 0 10px 25px rgba(239, 75, 131, .2);
}

/* Advisor form */
.sm-course-form-wrap {
    position: sticky;
    top: 96px;
    min-width: 0;
}

.sm-course-form-card {
    padding: 28px 25px 27px;
    border-radius: 42px;
    background: var(--sm-pink-soft);
}

.sm-course-form-heading {
    text-align: center;
}

.sm-course-form-heading h2 {
    margin: 0;
    color: var(--sm-primary);
    font-size: clamp(31px, 2.5vw, 40px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.sm-course-form-heading p {
    margin: 18px 0 24px;
    color: #3d4054;
    font-size: 15px;
    line-height: 1.45;
}

/* Contact Form 7 overrides only inside this landing page */
.sm-course-form .wpcf7,
.sm-course-form .wpcf7-form {
    margin: 0;
}

.sm-course-form .wpcf7-form {
    display: grid;
    gap: 14px;
}

.sm-course-form .wpcf7-form p {
    margin: 0;
}

.sm-course-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.sm-course-form label {
    display: block;
    margin: 0 0 5px;
    color: #2b315c;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.sm-course-form input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.sm-course-form select,
.sm-course-form textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 0 17px;
    border: 1px solid #d8d8dd;
    border-radius: 999px;
    outline: 0;
    color: #111111;
    background: #ffffff;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
}

.sm-course-form textarea {
    min-height: 98px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-radius: 24px;
    resize: vertical;
}

.sm-course-form input:focus,
.sm-course-form select:focus,
.sm-course-form textarea:focus {
    border-color: #8a77d7;
    box-shadow: 0 0 0 3px rgba(47, 42, 143, .08);
}

.sm-course-form input[type="submit"] {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 5px 0 0;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #ef548c;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}

.sm-course-form input[type="submit"]:hover {
    background: var(--sm-pink-dark);
}

.sm-course-form .iti {
    width: 100%;
}

.sm-course-form .iti input[type="tel"] {
    padding-left: 92px;
}

.sm-course-form .wpcf7-not-valid-tip {
    margin-top: 4px;
    font-size: 11px;
}

.sm-course-form .wpcf7-response-output {
    margin: 10px 0 0 !important;
    padding: 9px 11px !important;
    border-radius: 12px;
    font-size: 12px;
}

/* Tablet */
@media (max-width: 1180px) {
    .sm-course-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 32px;
    }

    .sm-course-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm-course-stat:nth-child(2)::after {
        display: none;
    }

    .sm-course-stat:nth-child(-n+2) {
        border-bottom: 1px solid #d8e0ed;
    }
}

/* Mobile */
@media (max-width: 820px) {
    .sm-course-hero {
        padding: 24px 0 42px;
    }

    .sm-course-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sm-course-heading h1 {
        font-size: clamp(38px, 12vw, 50px);
    }

    .sm-course-type {
        font-size: 25px;
    }

    .sm-course-price {
        font-size: 28px;
    }

    .sm-course-form-wrap {
        position: static;
        scroll-margin-top: 90px;
    }

    .sm-course-form-card {
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .sm-course-badges {
        margin-bottom: 14px;
    }

    .sm-course-stats {
        border-radius: 18px;
    }

    .sm-course-stat {
        justify-content: flex-start;
        gap: 10px;
        min-height: 84px;
        padding: 13px 11px;
    }

    .sm-course-stat-icon {
        flex-basis: 29px;
        width: 29px;
        height: 29px;
    }

    .sm-course-stat-copy strong {
        font-size: 17px;
    }

    .sm-course-stat-copy > span {
        font-size: 12px;
    }

    .sm-course-description {
        margin-top: 22px;
        font-size: 16px;
        line-height: 1.66;
    }

    .sm-course-dates {
        margin-top: 19px;
        font-size: 15px;
    }

    .sm-course-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 11px;
        margin-top: 26px;
    }

    .sm-course-btn {
        min-width: 0;
        width: 100%;
        min-height: 50px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .sm-course-form-card {
        padding: 25px 18px 22px;
        border-radius: 28px;
    }

    .sm-course-form-heading h2 {
        font-size: 31px;
    }

    .sm-course-form-heading p {
        margin: 13px 0 20px;
        font-size: 14px;
    }
}

@media (max-width: 390px) {
    .sm-course-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Course Features + sticky quick navigation
========================================================= */
.sm-features-section {
    padding: 54px 0 72px;
    background: #fff2f7;
}

.sm-features-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 32px;
    align-items: start;
}

.sm-features-panel {
    min-width: 0;
    padding: 34px 36px 38px;
    border-radius: 30px;
    background: #ffffff;
}

.sm-features-title {
    margin: 0 0 28px;
    color: var(--sm-primary);
    font-size: clamp(28px, 2.4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.sm-features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.sm-feature-card {
    display: flex;
    gap: 15px;
    min-height: 104px;
    padding: 20px 20px;
    border-radius: 18px;
    background: #ffe5ef;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.sm-feature-card:hover {
    transform: translateY(-3px);
    background: #ffdeea;
    box-shadow: 0 12px 28px rgba(41, 34, 119, .08);
}

.sm-feature-card__icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #ee4e8d;
    font-size: 24px;
    line-height: 1;
}

.sm-feature-card__text {
    color: #4b4f70;
    font-size: 15px;
    line-height: 1.55;
}

.sm-feature-card__text p {
    margin: 0;
}

.sm-features-sidebar {
    min-width: 0;
}

.sm-features-sidebar__inner {
    position: sticky;
    top: calc(var(--header-height, 105px) + 20px);
    display: grid;
    gap: 16px;
}

.sm-sticky-cta {
    display: flex;
    width: 100%;
    min-height: 54px;
    padding: 13px 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff !important;
    background: var(--sm-pink);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.sm-sticky-cta:hover {
    transform: translateY(-2px);
    background: var(--sm-pink-dark);
    box-shadow: 0 10px 24px rgba(239, 75, 131, .18);
}

.sm-sticky-menu {
    display: grid;
    overflow: hidden;
    border-radius: 22px;
    background: var(--sm-pink);
    box-shadow: 0 16px 34px rgba(239, 75, 131, .14);
}

.sm-sticky-menu a {
    position: relative;
    display: flex;
    min-height: 43px;
    padding: 12px 20px;
    align-items: center;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none !important;
    transition: background-color .18s ease, padding-left .18s ease;
}

.sm-sticky-menu a + a {
    border-top: 1px solid rgba(255,255,255,.12);
}

.sm-sticky-menu a:hover,
.sm-sticky-menu a:focus-visible {
    padding-left: 24px;
    background: rgba(56, 38, 143, .14);
}

.sm-sticky-cta--form {
    background: var(--sm-primary);
}

.sm-sticky-cta--form:hover {
    background: #241f74;
}

/* Keep anchor jumps clear of fixed header */
.sm-feature-card[id] {
    scroll-margin-top: calc(var(--header-height, 105px) + 24px);
}

@media (max-width: 980px) {
    .sm-features-layout {
        grid-template-columns: 1fr;
    }

    .sm-features-sidebar {
        order: -1;
    }

    .sm-features-sidebar__inner {
        position: static;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .sm-sticky-menu {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 18px;
    }

    .sm-sticky-menu a + a {
        border-top: 0;
    }

    .sm-sticky-menu a:nth-child(n+3) {
        border-top: 1px solid rgba(255,255,255,.12);
    }
}

@media (max-width: 700px) {
    .sm-features-section {
        padding: 34px 0 48px;
    }

    .sm-features-panel {
        padding: 24px 18px 22px;
        border-radius: 22px;
    }

    .sm-features-title {
        margin-bottom: 20px;
        font-size: 28px;
    }

    .sm-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sm-feature-card {
        min-height: 0;
        padding: 17px 16px;
        border-radius: 15px;
    }

    .sm-features-sidebar__inner {
        grid-template-columns: 1fr;
    }

    .sm-sticky-menu {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .sm-sticky-menu a + a,
    .sm-sticky-menu a:nth-child(n+3) {
        border-top: 1px solid rgba(255,255,255,.12);
    }
}

/* =========================================================
   Simplified Course Features sidebar (ACF fields only)
========================================================= */
.sm-features-action {
    margin-top: 28px;
}

.sm-feature-card__title {
    display: block;
    margin-bottom: 5px;
    color: var(--sm-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.sm-sidebar-form-card {
    padding: 24px 20px 20px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(47, 42, 143, .08);
}

.sm-sidebar-form-title {
    margin: 0 0 18px;
    color: var(--sm-primary);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.sm-sidebar-form .wpcf7-form {
    gap: 11px;
}

.sm-sidebar-form input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.sm-sidebar-form select,
.sm-sidebar-form textarea {
    min-height: 46px;
    font-size: 13px;
}

.sm-sidebar-form input[type="submit"] {
    min-height: 48px;
    font-size: 14px;
}

@media (max-width: 980px) {
    .sm-features-sidebar {
        order: 0;
    }

    .sm-features-sidebar__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .sm-features-action .sm-course-btn {
        width: 100%;
    }

    .sm-sidebar-form-card {
        padding: 20px 16px 18px;
        border-radius: 20px;
    }
}
