/* Existing scroll-top (admin) */
html .scroll-top {
    border-radius: 4px 4px 0 0;
    border-radius: 0.5rem;
    bottom: 55px;
    color: #fff;
    display: block;
    height: 9px;
    padding: 10px 10px;
    position: fixed;
    right: 16px;
    transition: all 0.3s;
}
html .scroll-top {
    font-size: 0.8em;
    text-align: center;
    text-decoration: none;
    z-index: 1040;
}
html .scroll-top img {
    width: 40px;
    --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

html .scroll-top span {
    display: inline-block;
    padding: 0 5px;
}
@media (max-width: 991px) {
    html .scroll-top.hidden-mobile {
        display: none !important;
    }
}

/* ========== Phase 1: Consult CTA ========== */
.btn-consult-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    border-radius: 9999px;
    background: #f58428;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 16px rgba(245, 132, 40, 0.28);
}

.btn-consult-cta:hover {
    background: #033727;
    transform: translateY(-1px);
}

.btn-consult-cta--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-consult-cta--block {
    width: 100%;
}

@media (max-width: 380px) {
    .btn-consult-cta--sm {
        padding: 0.45rem 0.85rem;
        font-size: 0.75rem;
    }
}

/* ========== Phase 2: Consultation form (netdesign-style) ========== */
.consultation-section {
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
    padding: 3.5rem 0 4rem;
    background: linear-gradient(145deg, #f58428 0%, #e07020 22%, #2d6b45 58%, #033727 100%);
    color: #fff;
}

.consultation-section__glow {
    position: absolute;
    top: -80px;
    right: -40px;
    width: min(480px, 55vw);
    height: min(480px, 55vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 180, 90, 0.4) 0%, rgba(45, 120, 80, 0.2) 45%, transparent 70%);
    pointer-events: none;
}

.consultation-section__deco {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.consultation-section__deco-plane {
    position: absolute;
    top: 4%;
    left: -2%;
    width: min(420px, 58vw);
    height: auto;
    opacity: 0.85;
}

.consultation-section__deco-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.55);
    width: 52px;
    height: 52px;
    opacity: 0.7;
}

.consultation-section__deco-icon--cap {
    top: 12%;
    right: 8%;
    width: 64px;
    height: 64px;
    transform: rotate(12deg);
    color: rgba(255, 255, 255, 0.5);
}

.consultation-section__deco-icon--book {
    top: 38%;
    right: 4%;
    width: 58px;
    height: 58px;
    transform: rotate(-14deg);
}

.consultation-section__deco-icon--pencil {
    bottom: 28%;
    left: 6%;
    width: 48px;
    height: 48px;
    transform: rotate(28deg);
    opacity: 0.55;
}

.consultation-section__deco-icon--apple {
    top: 55%;
    left: 42%;
    width: 44px;
    height: 44px;
    transform: rotate(-8deg);
    opacity: 0.45;
}

.consultation-section__deco-icon--bulb {
    bottom: 18%;
    right: 18%;
    width: 50px;
    height: 50px;
    transform: rotate(6deg);
    opacity: 0.5;
}

@media (max-width: 1023px) {
    .consultation-section__deco-plane {
        width: min(300px, 70vw);
        top: 2%;
        left: -8%;
        opacity: 0.55;
    }

    .consultation-section__deco-icon--cap {
        top: 8%;
        right: 4%;
        width: 48px;
        height: 48px;
    }

    .consultation-section__deco-icon--book {
        top: auto;
        bottom: 8%;
        right: 6%;
        width: 44px;
        height: 44px;
    }

    .consultation-section__deco-icon--pencil,
    .consultation-section__deco-icon--apple {
        display: none;
    }

    .consultation-section__deco-icon--bulb {
        bottom: auto;
        top: 22%;
        right: 12%;
        width: 40px;
        height: 40px;
        opacity: 0.4;
    }
}

@media (min-width: 1280px) {
    .consultation-section__deco-plane {
        left: 2%;
        width: 460px;
    }

    .consultation-section__deco-icon--apple {
        left: 48%;
        opacity: 0.5;
    }
}

.consultation-section__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .consultation-section {
        padding: 4.5rem 0 5rem;
    }

    .consultation-section__grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        gap: 2.5rem 3rem;
        align-items: start;
    }

    .consultation-intro {
        position: sticky;
        top: 110px;
    }
}

.consultation-intro__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
}

.consultation-intro__title {
    font-size: clamp(1.6rem, 2.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 0.85rem;
    max-width: 18ch;
}

.consultation-intro__lead,
.consultation-intro__desc {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    max-width: 36rem;
}

.consultation-intro__bullets {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.consultation-intro__bullet {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.5;
}

.consultation-intro__check {
    flex-shrink: 0;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 9999px;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: 0.05rem;
}

.consultation-intro__note {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    line-height: 1.6;
    font-style: italic;
    max-width: 36rem;
}

.consultation-form-card {
    background: #fff;
    color: #1f2937;
    border-radius: 1.5rem;
    padding: 1.4rem 1.2rem 1.55rem;
    box-shadow: 0 24px 60px rgba(40, 12, 0, 0.28);
}

@media (min-width: 640px) {
    .consultation-form-card {
        padding: 1.85rem 1.85rem 2rem;
        border-radius: 1.75rem;
    }
}

.consultation-form-card__head {
    margin-bottom: 1.35rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #f1f5f9;
}

.consultation-form-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.consultation-form-card__subtitle {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0;
}

.consultation-block {
    margin-bottom: 1.2rem;
}

.consultation-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1.2rem;
    min-width: 0;
}

.consultation-legend {
    display: block;
    width: 100%;
    font-size: 0.92rem;
    font-weight: 650;
    color: #ea580c;
    margin-bottom: 0.75rem;
    padding: 0;
}

.consultation-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.95rem 1rem;
}

@media (min-width: 640px) {
    .consultation-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.consultation-field {
    min-width: 0;
}

.consultation-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 550;
    color: #374151;
    margin-bottom: 0.45rem;
}

.consultation-label .req,
.consultation-pdpa .req {
    color: #ef4444;
}

.consultation-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.72rem 0.9rem;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.consultation-input::placeholder {
    color: #9ca3af;
}

.consultation-input:hover {
    border-color: #d1d5db;
}

.consultation-input:focus {
    border-color: #f58428;
    box-shadow: 0 0 0 3px rgba(245, 132, 40, 0.15);
    background: #fff;
}

.consultation-input.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.consultation-textarea {
    min-height: 104px;
    resize: vertical;
}

/* Role segmented control */
.consultation-role-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.3rem;
    background: #f3f4f6;
    border-radius: 0.9rem;
}

.consultation-role {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}

.consultation-role input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.consultation-role span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.7rem;
    font-size: 0.9rem;
    font-weight: 550;
    color: #4b5563;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.consultation-role:hover span {
    color: #111827;
}

.consultation-role input:checked + span {
    background: #fff;
    color: #ea580c;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-weight: 650;
}

.consultation-role input:focus-visible + span {
    outline: 2px solid #f58428;
    outline-offset: 2px;
}

/* Grade / topic chips — hide native controls */
.consultation-level-group,
.consultation-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.consultation-topics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .consultation-topics {
        grid-template-columns: 1fr 1fr;
    }
}

.consultation-chip,
.consultation-topic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.consultation-chip input,
.consultation-topic input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.consultation-chip span,
.consultation-topic span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #fff;
    font-size: 0.84rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.consultation-chip span {
    justify-content: flex-start;
    text-align: left;
    padding-left: 0.7rem;
    padding-right: 0.95rem;
}

.consultation-chip span::before {
    content: "";
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 9999px;
    background: #fff;
    box-shadow: inset 0 0 0 0 #f58428;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.consultation-topic span {
    border-radius: 0.85rem;
    justify-content: flex-start;
    text-align: left;
}

.consultation-topic span::before {
    content: "";
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.3rem;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.consultation-chip:hover span,
.consultation-topic:hover span {
    border-color: #fdba74;
    background: #fffaf5;
}

.consultation-chip:hover span::before {
    border-color: #f58428;
}

.consultation-chip input:checked + span,
.consultation-topic input:checked + span {
    border-color: #f58428;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 0 0 1px rgba(245, 132, 40, 0.2);
}

.consultation-chip input:checked + span::before {
    border-color: #f58428;
    background: #fff;
    box-shadow: inset 0 0 0 3.5px #f58428;
}

.consultation-topic input:checked + span::before {
    border-color: #f58428;
    background: #f58428;
    box-shadow: inset 0 0 0 2px #fff;
}

.consultation-chip input:focus-visible + span,
.consultation-topic input:focus-visible + span {
    outline: 2px solid #f58428;
    outline-offset: 2px;
}

/* Parent fields collapse */
.consultation-parent-fields {
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.25s ease, padding 0.25s ease;
    max-height: 480px;
    opacity: 1;
}

.consultation-parent-fields.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.consultation-parent-fields.is-emphasized:not(.is-collapsed) {
    background: #fffaf5;
    border: 1px solid #fed7aa;
    border-radius: 1rem;
    padding: 0.95rem 1rem 1.05rem;
    outline: none;
}

.consultation-footer {
    margin-top: 0.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid #f1f5f9;
}

.consultation-pdpa {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.84rem;
    color: #4b5563;
    line-height: 1.55;
    cursor: pointer;
    margin-bottom: 0.85rem;
}

.consultation-pdpa input {
    margin-top: 0.2rem;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #f58428;
    flex-shrink: 0;
}

.consultation-pdpa a {
    color: #ea580c;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 550;
}

.consultation-field-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin: -0.45rem 0 0.75rem;
}

.consultation-form-alert {
    font-size: 0.88rem;
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.consultation-form-alert.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.consultation-form-alert.is-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.btn-consult-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: 0;
    border-radius: 9999px;
    background: linear-gradient(90deg, #ff9a3c 0%, #f58428 45%, #e85d12 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(232, 93, 18, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-consult-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(232, 93, 18, 0.4);
}

.btn-consult-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ========== Consultation Thank You page ========== */
.consultation-thank-you {
    position: relative;
    overflow: hidden;
    min-height: min(70vh, 640px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: linear-gradient(160deg, #033727 0%, #0a5c44 45%, #0d6b4f 100%);
}

.consultation-thank-you__glow {
    position: absolute;
    inset: -20% auto auto 50%;
    width: min(720px, 90vw);
    height: min(720px, 90vw);
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 132, 40, 0.28) 0%, transparent 65%);
    pointer-events: none;
}

.consultation-thank-you__card {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem 1.75rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.consultation-thank-you__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 55, 39, 0.1);
    color: #033727;
}

.consultation-thank-you__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #033727;
    line-height: 1.25;
}

.consultation-thank-you__message {
    margin: 0 auto 1.75rem;
    max-width: 28rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #4b5563;
}

@media (min-width: 640px) {
    .consultation-thank-you__card {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 1023px) {
    .consultation-intro__title {
        max-width: none;
    }
}

/* ========== Phase 3: Floating contact widget ========== */
/* Match #btnBackToTop (~49px circle), bottom-right stack */
.floating-contact-widget {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.floating-contact-widget__toggle {
    width: 22px;
    height: 22px;
    margin-right: -2px;
    border: 0;
    border-radius: 9999px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 55, 39, 0.88);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    transition: opacity 0.2s ease;
}

.floating-contact-widget__toggle:hover {
    opacity: 0.72;
}

.floating-contact-widget__toggle:focus-visible {
    outline: 2px solid #033727;
    outline-offset: 2px;
}

.floating-contact-widget__toggle-icon {
    display: block;
    transition: transform 0.25s ease;
}

.floating-contact-widget:not(.is-expanded) .floating-contact-widget__toggle-icon {
    transform: rotate(180deg);
}

.floating-contact-widget__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    max-height: 480px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease;
}

.floating-contact-widget:not(.is-expanded) .floating-contact-widget__panel {
    max-height: 0;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.floating-contact-widget__btn {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #033727;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.floating-contact-widget__btn:hover {
    opacity: 0.72;
}

.floating-contact-widget__btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.floating-contact-widget__btn--phone img {
    filter: brightness(0) invert(1);
}

.floating-contact-widget__btn--phone {
    background: #033727;
}

.floating-contact-widget__btn--line,
.floating-contact-widget__btn--line_oa {
    background: #06c755;
}

.floating-contact-widget__btn--facebook {
    background: #1877f2;
}

.floating-contact-widget__btn--youtube {
    background: #ff0000;
}

.floating-contact-widget__btn--instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.floating-contact-widget__btn--tiktok {
    background: #010101;
}

.floating-contact-widget__btn--twitter {
    background: #000000;
}

.floating-contact-widget__btn--linkedin {
    background: #0a66c2;
}

.floating-contact-widget__btn--shopee {
    background: #ee4d2d;
}

.floating-contact-widget__btn--lazada {
    background: #0f146d;
}

@media (max-width: 640px) {
    .floating-contact-widget {
        right: 14px;
        bottom: 84px;
        gap: 6px;
    }

    .floating-contact-widget__toggle {
        width: 20px;
        height: 20px;
        margin-right: -1px;
    }

    .floating-contact-widget__panel {
        gap: 8px;
    }

    .floating-contact-widget__btn {
        width: 44px;
        height: 44px;
    }

    .floating-contact-widget__btn img {
        width: 20px;
        height: 20px;
    }
}

/* ========== Phase 4: Visitor counter ========== */
.visitor-counter__item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 10px 14px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.visitor-counter__label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 2px;
}

.visitor-counter__value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}

/* ========== Phase 5: Content views ========== */
.content-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
}

.content-view-count {
    white-space: nowrap;
}

.meta-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-right: 0.25rem;
    color: #6b7280;
    vertical-align: -0.125em;
}

.meta-icon--lg {
    width: 1.25rem;
    height: 1.25rem;
}
