/* Mobile UX adaptation */

@media (max-width: 767px) {

    .site-header__wrap {
        min-height: 64px;
        padding-block: 0;
    }

    .poster {
        padding-top: 1rem;
        padding-bottom: 1.2rem;
    }

    .poster__wrap {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .poster .poster-media {
        order: -1;
        margin-bottom: 1.25rem;
    }

    .poster .poster-media > .poster-media__img {
        width: 100%;
        max-height: 430px;
        object-fit: cover;
        border-radius: 12px;
    }

    .poster__content {
        order: 2;
        text-align: center;
        max-width: 100%;
    }

    .poster__content::before {
        margin: 0 auto 1rem;
    }

    .poster__content::after {
        display: none;
    }

    .poster__eyebrow {
        margin-bottom: .8rem;
        font-size: .72rem;
    }

    .poster .poster__subtitle {
        font-size: 2rem;
        line-height: 1.12;
        margin-bottom: .75rem;
    }

    .poster__remote-note {
        font-size: .78rem;
        margin-bottom: .8rem;
    }

    .poster .poster__title {
        font-size: .95rem;
        line-height: 1.45;
        margin-bottom: 1rem;
    }

    .poster .poster-btn {
        width: 100%;
        justify-content: center;
        margin-top: .5rem;
    }

    .poster__phone-link {
        align-self: center;
        margin: .9rem auto 0;
    }

    .poster__trust {
        order: 3;
        padding-top: .75rem;
        margin-top: 1rem;
    }

    .poster__trust-list {
        display: block;
    }

    .poster__trust-item {
        padding: .45rem .2rem;
        font-size: .85rem;
    }

    .poster__trust-item + .poster__trust-item {
        border-top: 1px solid var(--ustina-line);
    }


    .services-section.section,
    #problems.section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .services-card {
        padding: 1rem;
        min-height: 0;
    }

    .services-card__title {
        font-size: 1.15rem;
    }

    .services-card__list li {
        font-size: .86rem;
    }

    .services-more-toggle {
        display: flex;
        justify-content: center;
        margin: 1.25rem 0;
    }

    .services-more-btn {
        min-height: 44px;
        padding: 0 1.4rem;
        border: 1px solid var(--ustina-wine);
        border-radius: 7px;
        background: #fff;
        color: var(--ustina-wine);
        font-weight: 600;
    }

    .services-grid--hidden {
        display: none;
        margin-top: 1rem;
    }

    .services-grid--hidden.is-open {
        display: grid;
    }
}

/* Desktop: mobile service spoiler disabled */
@media (min-width: 768px) {
    .services-more-toggle {
        display: none;
    }

    .services-grid--hidden {
        display: grid;
    }
}


/* Mobile final polish: hero and forms */
@media (max-width: 767px) {

    /* Hero compact */
    .poster {
        padding-top: .55rem;
        padding-bottom: .8rem;
    }

    .poster .poster-media {
        margin-bottom: .8rem;
    }

    .poster .poster-media > .poster-media__img {
        max-height: 300px;
        object-fit: cover;
        object-position: center top;
    }

    .poster__eyebrow {
        margin-bottom: .55rem;
    }

    .poster .poster__subtitle {
        font-size: 1.75rem;
        line-height: 1.08;
        margin-bottom: .6rem;
    }

    .poster__remote-note {
        margin-bottom: .55rem;
    }

    .poster .poster__title {
        margin-bottom: .7rem;
    }

    .poster .poster-btn {
        margin-top: .25rem;
        min-height: 46px;
    }

    .poster__phone-link {
        margin-top: .55rem;
    }

    .poster__trust {
        margin-top: .65rem;
        padding-top: .45rem;
    }

    .poster__trust-item {
        padding: .35rem .15rem;
    }


    /* Consultation blocks */
    #consultation.consultation-section,
    .consultation-section {
        padding: 1.5rem 0 !important;
    }

    #consultation .consultation-title,
    .consultation-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    #consultation .consultation-grid,
    .consultation-grid {
        gap: 12px;
    }

    #consultation .consultation-info,
    .consultation-info {
        min-height: auto;
        padding: 22px 18px;
        border-radius: 10px;
    }

    #consultation .consultation-info__phone,
    .consultation-info__phone {
        font-size: 24px;
    }

    #consultation .consultation-form-card,
    .consultation-form-card {
        padding: 18px;
        border-radius: 10px;
    }

    .ustina-form__field {
        margin-bottom: 12px;
    }

    .ustina-form input,
    .ustina-form select,
    .ustina-form textarea {
        margin-top: 6px;
        padding: 12px;
        font-size: 16px;
    }

    .ustina-form textarea {
        min-height: 100px;
    }

    .ustina-form__consent {
        margin: 12px 0;
        font-size: 11px;
    }

    .ustina-form__submit input {
        min-height: 48px;
        padding: 0 15px;
    }

    /* Popup / side panel form */
    .ustina-appointment-panel .ustina-panel__content,
    .ustina-appointment-panel .ustina-panel__form,
    .ustina-appointment-panel .ustina-form {
        max-width: 100%;
    }

    .ustina-appointment-panel .ustina-form {
        padding: 14px;
    }

    .ustina-appointment-panel .ustina-form__field {
        margin-bottom: 14px;
    }

    .ustina-appointment-panel .ustina-form__submit input {
        min-height: 48px;
        width: 100%;
    }
}


/* Mobile UX final: appointment panel compact */
@media (max-width: 767px) {

    .ustina-appointment-panel .ustina-panel__wrap {
        padding: 16px 14px 18px;
    }

    .ustina-appointment-panel .ustina-panel__head {
        margin-bottom: 12px;
    }

    .ustina-appointment-panel .panel__title {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .ustina-appointment-panel .panel__descr {
        font-size: .8rem;
        line-height: 1.35;
        margin-bottom: 14px;
    }

    .ustina-appointment-panel .ustina-short-form,
    .ustina-appointment-panel .ustina-form {
        padding: 14px;
    }

    .ustina-appointment-panel .ustina-short-form__field,
    .ustina-appointment-panel .ustina-form__field {
        margin-bottom: 10px;
    }

    .ustina-appointment-panel label {
        margin-bottom: 4px;
    }

    .ustina-appointment-panel input,
    .ustina-appointment-panel select,
    .ustina-appointment-panel textarea {
        margin-top: 4px;
        min-height: 44px;
        padding: 10px 12px;
    }

    .ustina-appointment-panel textarea {
        min-height: 90px;
    }

    .ustina-appointment-panel .ustina-short-form__consent,
    .ustina-appointment-panel .ustina-form__consent {
        margin: 10px 0;
        font-size: 10.5px;
        line-height: 1.35;
    }

    .ustina-appointment-panel .wpcf7-submit,
    .ustina-appointment-panel .ustina-short-form__submit input {
        min-height: 46px;
        padding: 0 12px;
    }

}


/* Mobile appointment panel final UX fix */
@media (max-width: 767px) {

    .ustina-appointment-panel .ustina-panel__wrap {
        padding: 12px 14px 16px !important;
    }

    .ustina-appointment-panel .ustina-panel__head {
        margin-bottom: 8px !important;
    }

    .ustina-appointment-panel .ustina-panel__form {
        margin: 0 !important;
    }

    .ustina-appointment-panel .ustina-form,
    .ustina-appointment-panel .ustina-short-form {
        padding: 14px !important;
        border-radius: 10px;
    }

    .ustina-appointment-panel .ustina-form__row {
        margin: 0 !important;
    }

    .ustina-appointment-panel .ustina-form__field,
    .ustina-appointment-panel .ustina-short-form__field {
        margin: 0 0 16px !important;
    }

    .ustina-appointment-panel .ustina-form__field:last-child {
        margin-bottom: 12px !important;
    }

    .ustina-appointment-panel label {
        margin: 0 0 6px !important;
        line-height: 1.2 !important;
    }

    .ustina-appointment-panel .wpcf7-form-control-wrap {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ustina-appointment-panel input,
    .ustina-appointment-panel select,
    .ustina-appointment-panel textarea {
        margin: 0 !important;
        min-height: 42px !important;
        padding: 10px 12px !important;
    }

    .ustina-appointment-panel textarea {
        height: 90px !important;
        min-height: 90px !important;
    }

    .ustina-appointment-panel .ustina-form__consent {
        margin: 8px 0 14px !important;
        line-height: 1.3 !important;
    }

    .ustina-appointment-panel .wpcf7-submit {
        min-height: 46px !important;
        width: 100% !important;
        margin: 0 !important;
    }
}


/* FINAL MOBILE APPOINTMENT FORM UX FIX */
@media (max-width: 767px){

    .ustina-appointment-panel .ustina-panel__wrap{
        padding:16px 14px 20px !important;
    }

    .ustina-appointment-panel .ustina-panel__form .ustina-form{
        padding:14px !important;
        margin:0 !important;
    }

    .ustina-appointment-panel .ustina-form__row{
        display:block !important;
        gap:0 !important;
    }

    .ustina-appointment-panel .ustina-form__field{
        margin:0 0 14px !important;
        padding:0 !important;
    }

    .ustina-appointment-panel .ustina-form__field + .ustina-form__field{
        margin-top:14px !important;
    }

    .ustina-appointment-panel .ustina-form__field label{
        display:block !important;
        margin:0 0 6px !important;
        padding:0 !important;
    }

    .ustina-appointment-panel .ustina-form__field p{
        margin:0 !important;
        padding:0 !important;
    }

    .ustina-appointment-panel .wpcf7-form-control-wrap{
        display:block !important;
        margin:0 !important;
        padding:0 !important;
    }

    .ustina-appointment-panel input,
    .ustina-appointment-panel select,
    .ustina-appointment-panel textarea{
        margin:0 !important;
        padding:10px 12px !important;
    }

    .ustina-appointment-panel textarea{
        height:90px !important;
        min-height:90px !important;
    }

    .ustina-appointment-panel .ustina-form__consent{
        margin:12px 0 !important;
    }

    .ustina-appointment-panel .wpcf7-submit{
        margin-top:10px !important;
    }
}

/* Финальная мобильная форма CF7 */

@media (max-width: 767px) {

    .ustina-form {
        padding: 16px !important;
    }

    .ustina-form__row {
        display: block !important;
    }

    .ustina-form__field {
        margin-bottom: 18px !important;
    }

    .ustina-form__field label {
        display: block !important;
        margin-bottom: 7px !important;
        line-height: 1.25 !important;
    }

    .ustina-form input,
    .ustina-form select,
    .ustina-form textarea {
        width: 100% !important;
        margin: 0 !important;
    }

    .ustina-form textarea {
        height: 100px !important;
        min-height: 100px !important;
    }

    .ustina-form__consent {
        margin-top: 12px !important;
        margin-bottom: 16px !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .ustina-form__submit {
        margin-top: 0 !important;
    }

    .ustina-form__submit input {
        width: 100% !important;
    }

}


/* FINAL MOBILE FORM RHYTHM FIX */
@media (max-width: 767px) {

    .ustina-appointment-panel .ustina-form {
        padding: 10px 14px !important;
    }

    .ustina-appointment-panel .ustina-form__row {
        margin: 0 !important;
    }

    .ustina-appointment-panel .ustina-form__field,
    .ustina-appointment-panel .ustina-form__field + .ustina-form__field {
        margin: 0 0 12px !important;
    }

    .ustina-appointment-panel .ustina-form__field label {
        margin: 0 0 5px !important;
    }

    .ustina-appointment-panel .wpcf7-form-control-wrap {
        line-height: 1 !important;
    }

    .ustina-appointment-panel input,
    .ustina-appointment-panel select,
    .ustina-appointment-panel textarea {
        min-height: 42px !important;
    }

    .ustina-appointment-panel textarea {
        height: 85px !important;
        min-height: 85px !important;
    }

    .ustina-appointment-panel .ustina-form__consent {
        margin: 8px 0 10px !important;
    }

    .ustina-appointment-panel .ustina-form__submit {
        margin-top: 0 !important;
    }

}

/* CF7 acceptance checkbox alignment */
@media (max-width: 767px) {

    .ustina-appointment-panel .ustina-form__consent .wpcf7-acceptance label {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        text-align: left !important;
    }

    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item {
        margin: 0 !important;
    }

    .ustina-appointment-panel .ustina-form__consent input[type="checkbox"] {
        flex: 0 0 auto !important;
        width: 16px !important;
        height: 16px !important;
        margin: 3px 0 0 !important;
    }

    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item-label {
        display: block !important;
        line-height: 1.35 !important;
    }

}

/* FINAL POPUP FORM MOBILE FIX */
@media (max-width: 767px) {

    .ustina-appointment-panel .ustina-panel__wrap {
        padding: 12px 12px 18px !important;
    }

    .ustina-appointment-panel .ustina-panel__form .ustina-form {
        padding: 12px !important;
    }

    .ustina-appointment-panel .ustina-form__row {
        display:block !important;
    }

    .ustina-appointment-panel .ustina-form__field {
        margin-bottom: 10px !important;
    }

    .ustina-appointment-panel .ustina-form label {
        margin-bottom: 5px !important;
        line-height: 1.2 !important;
    }

    .ustina-appointment-panel .ustina-form input,
    .ustina-appointment-panel .ustina-form select {
        height: 42px !important;
        min-height:42px !important;
        margin-top:4px !important;
        padding:8px 12px !important;
    }

    .ustina-appointment-panel .ustina-form textarea {
        height:72px !important;
        min-height:72px !important;
        margin-top:4px !important;
        padding:8px 12px !important;
    }

    .ustina-appointment-panel .ustina-form__consent {
        margin:8px 0 10px !important;
    }

    .ustina-appointment-panel .ustina-form__consent .wpcf7-form-control-wrap,
    .ustina-appointment-panel .ustina-form__consent .wpcf7-acceptance,
    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item {
        display:block !important;
        margin:0 !important;
        padding:0 !important;
    }

    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item > label {
        display:flex !important;
        flex-direction:row !important;
        align-items:flex-start !important;
        justify-content:flex-start !important;
        gap:8px !important;
        text-align:left !important;
    }

    .ustina-appointment-panel .ustina-form__consent input[type="checkbox"] {
        flex:0 0 16px !important;
        width:16px !important;
        height:16px !important;
        margin:2px 0 0 !important;
    }

    .ustina-appointment-panel .ustina-form__submit input {
        min-height:44px !important;
        padding:10px !important;
    }

}

/* CF7 consent alignment final */
@media (max-width:767px){

    .ustina-form__consent .ustina-consent {
        display:flex !important;
        align-items:flex-start !important;
        gap:8px !important;
        text-align:left !important;
    }

    .ustina-form__consent .wpcf7-acceptance {
        flex:0 0 auto !important;
    }

    .ustina-form__consent input[type="checkbox"] {
        width:16px !important;
        height:16px !important;
        margin:3px 0 0 !important;
    }

    .ustina-consent__text {
        display:block !important;
        flex:1 !important;
        line-height:1.35 !important;
    }

}

/* FINAL CF7 CONSENT ALIGNMENT */
@media (max-width: 767px) {

    .ustina-appointment-panel .ustina-form__consent {
        margin: 8px 0 10px !important;
        text-align: left !important;
    }

    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item,
    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item label {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        gap: 8px !important;
    }

    .ustina-appointment-panel .ustina-form__consent input[type="checkbox"] {
        position: relative !important;
        flex: 0 0 16px !important;
        width: 16px !important;
        height: 16px !important;
        margin: 2px 0 0 !important;
        transform: none !important;
    }

    .ustina-appointment-panel .ustina-form__consent .wpcf7-list-item-label {
        display: block !important;
        flex: 1 1 auto !important;
        width: auto !important;
        line-height: 1.3 !important;
        margin: 0 !important;
    }

}

/* CF7 custom checkbox */
@media (max-width:767px){

    .ustina-consent{
        display:flex !important;
        align-items:flex-start !important;
        gap:8px !important;
        text-align:left !important;
    }

    .ustina-consent input[type="checkbox"]{
        flex:0 0 16px !important;
        width:16px !important;
        height:16px !important;
        margin:3px 0 0 !important;
    }

    .ustina-consent span{
        flex:1 !important;
        line-height:1.3 !important;
    }

}