/**
 * Responsive CSS - Global Adaptive Styles
 * clinic-result.ru
 *
 * This file contains media queries for:
 * - Tablets (768px - 1024px)
 * - Mobile devices (<768px)
 */

/* ==============================================
   GLOBAL FIXES
   ============================================== */

/* Prevent horizontal scroll */
body {
    overflow-x: clip !important;
    max-width: 100vw;
}

/* Article single page title */
h1.articles-typical__title.md-main-title {
    width: 53vw;
    line-height: 1.3;
}

/* ==============================================
   TABLET STYLES (768px - 1024px)
   ============================================== */

@media (min-width: 768px) and (max-width: 1024px) {

    /* Wrapper */
    .wrapper {
        width: 90vw;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Main Title */
    .md-main-title {
        font-size: 4.5vw;
        line-height: 1.3;
    }

    /* Main Button */
    .md-main-color-btn {
        height: 50px;
        width: auto;
        min-width: 200px;
        padding: 0 25px !important;
    }

    .md-main-color-btn span {
        font-size: 14px;
    }

    .md-main-color-btn img,
    .md-main-color-btn svg {
        width: 30px;
    }

    /* Header styles moved to header-nav.css */

    /* Hero Section */
    .first {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .first__title {
        font-size: 5vw;
        line-height: 1.3;
    }

    .first__text p,
    .first__text h1 {
        font-size: 2.5vw;
        line-height: 1.5;
    }

    .first__bullets {
        flex-wrap: wrap;
        gap: 15px;
    }

    .first__buttons {
        flex-wrap: wrap;
        gap: 15px;
    }

    .first__form {
        width: 100%;
        margin-top: 30px;
    }

    /* Forms */
    .md-standart-form .form-container {
        flex-direction: column;
        gap: 15px;
    }

    .md-standart-form .form-input,
    .md-standart-form .form-select {
        width: 100%;
        height: 50px;
        font-size: 14px;
        margin-right: 0;
    }

    .md-standart-form .form-btn {
        width: 100%;
        height: 50px;
    }

    /* Consultation block - tablet */
    .get-consultation.md-style-2 .get-consultation__content {
        gap: 25px !important;
    }

    .get-consultation__container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: inherit;
        background-color: #81967b;
        z-index: 0;
        pointer-events: none;
    }

    .get-consultation .form-checkbox {
      max-width: 100% !important; 
    }

    .get-consultation.md-style-2 .get-consultation__form {
        flex: 0 0 430px !important;
        padding: 22px 24px !important;
    }

    .get-consultation.md-style-2 .form-container {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .get-consultation.md-style-2 .form-input {
        height: auto !important;
        width: auto !important;
        border-radius: 10px !important;
    }

    .get-consultation.md-style-2 .form-btn {
        width: auto !important;
        height: auto !important;
    }

    /* Breadcrumbs */
    .breadcrumbs {
        padding: 20px 0;
    }

    .breadcrumbs__container {
        font-size: 14px;
    }

    /* Articles/Cards grid */
    .articles__container .container-flex {
        justify-content: space-between;
    }

    .articles__item {
        width: 48%;
        min-height: 200px;
    }

    /* Filters */
    .filters__slider .filters-item {
        width: auto;
        padding: 12px 20px;
        font-size: 13px;
    }

    /* Footer */
    .footer__container {
        flex-wrap: wrap;
        gap: 30px;
    }

    .footer__block {
        width: 45%;
    }

    /* Article single page title - tablet */
    h1.articles-typical__title.md-main-title {
        width: 80% !important;
    }
}

/* ==============================================
   MOBILE STYLES (<768px)
   ============================================== */

@media (max-width: 767px) {

    /* Wrapper */
    .wrapper {
        width: var(--m-wrapper-w);
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Main Title */
    .md-main-title {
        font-size: 6vw;
        line-height: 1.3;
        text-align: center;
    }

    /* Main Button */
    .md-main-color-btn {
        height: 50px;
        width: 100%;
        max-width: 300px;
        padding: 0 20px !important;
        margin: 0 auto;
    }

    .md-main-color-btn span {
        font-size: 14px;
    }

    .md-main-color-btn img,
    .md-main-color-btn svg {
        width: 25px;
    }

    /* Header styles moved to header-nav.css */

    /* Hero Section */
    .first {
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .first__bg img {
        object-fit: cover;
        object-position: center;
    }

    .first__content {
        text-align: center;
    }

    .first__title {
        font-size: 7vw;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .first__text {
        margin-bottom: 20px;
    }

    .first__text p,
    .first__text h1 {
        font-size: 4vw;
        line-height: 1.5;
    }

    .first__bullets {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }

    .first__bullets .bullets-item {
        width: 100%;
        justify-content: center;
    }

    .first__bullets .bullets-item p {
        font-size: 14px;
    }

    .first__buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .first__buttons .item-bottom__link,
    .first__buttons .md-main-color-btn {
        width: 100% !important;
        max-width: 280px;
        justify-content: center;
    }

    .first__form {
        width: 100%;
        margin-top: 25px;
        padding: 20px;
    }

    .first__form .form-title {
        flex-direction: column;
        text-align: center;
    }

    .first__form .form-title p {
        font-size: 18px;
        margin-bottom: 15px;
    }

    /* Forms */
    .md-standart-form .form-container {
        flex-direction: column;
        gap: 12px;
    }

    .md-standart-form .form-input,
    .md-standart-form .form-select {
        width: 100%;
        height: 50px;
        font-size: 14px;
        padding: 0 20px;
        margin-right: 0;
        border-radius: 25px;
    }

    .md-standart-form .form-btn {
        width: 100%;
        height: 50px;
    }

    .md-standart-form .form-text {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .md-standart-form .form-checkbox {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    .md-standart-form .form-checkbox p {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Consultation block - mobile */
    .get-consultation.md-style-2 .get-consultation__container {
        padding: 25px 20px !important;
    }

    .get-consultation__container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: inherit;
        background-color: #81967b;
        z-index: 0;
        pointer-events: none;
    }

    .get-consultation.md-style-2 .get-consultation__content {
        flex-direction: column !important;
        gap: 20px !important;
        align-items: stretch !important;
    }

    .get-consultation.md-style-2 .get-consultation__title {
        font-size: 22px !important;
    }

    .get-consultation.md-style-2 .get-consultation__text {
        font-size: 14px !important;
        margin-bottom: 15px !important;
    }

    .get-consultation.md-style-2 .get-consultation__form {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 18px !important;
        box-sizing: border-box !important;
    }

    .get-consultation.md-style-2 .form-text {
        font-size: 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }

    .get-consultation.md-style-2 .form-list {
        flex-direction: column !important;
        gap: 2px !important;
        margin-bottom: 8px !important;
    }

    .get-consultation.md-style-2 .form-list li {
        font-size: 12px !important;
    }

    .get-consultation.md-style-2 .form-container {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .get-consultation.md-style-2 .form-input {
        width: 100% !important;
        height: auto !important;
        padding: 10px 16px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    .get-consultation.md-style-2 .form-btn {
        width: 100% !important;
        height: auto !important;
        padding: 10px 20px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    .get-consultation.md-style-2 .form-checkbox {
        margin-top: 8px !important;
        margin-left: 6px !important;
        width: calc(100% - 6px) !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: 6px !important;
        padding: 0 !important;
    }

    .get-consultation.md-style-2 .form-checkbox>div {
        flex-shrink: 0 !important;
    }

    .get-consultation.md-style-2 .form-checkbox p {
        flex: 1 1 0% !important;
        margin: 0 !important;
    }

    /* White form card -- dark consent text, green links */
    .get-consultation.md-style-2 .get-consultation__form .form-checkbox p {
        color: var(--color-muted) !important;
        font-size: 10px !important;
        line-height: 1.4 !important;
    }

    .get-consultation.md-style-2 .get-consultation__form .form-checkbox p a {
        color: var(--color-sage) !important;
        text-decoration: underline !important;
    }

    .get-consultation.md-style-2 .get-consultation__form .form-checkbox p a:hover {
        color: var(--color-sage-dark) !important;
    }

    .get-consultation.md-style-2 .get-consultation__contacts {
        margin-bottom: 12px !important;
    }

    .get-consultation.md-style-2 .get-consultation__contacts a {
        font-size: 20px !important;
    }

    .get-consultation.md-style-2 .get-consultation__links p {
        margin-bottom: 3px !important;
    }

    /* Breadcrumbs */
    .breadcrumbs {
        padding: 15px 0;
    }

    .breadcrumbs__container {
        font-size: 12px;
        flex-wrap: wrap;
    }

    .breadcrumbs__container a,
    .breadcrumbs__container span {
        font-size: 12px;
    }

    /* Articles/Cards grid */
    .articles {
        margin-bottom: 30px;
    }

    .articles__title {
        margin-bottom: 15px;
    }

    .articles__text {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .articles__container .container-flex {
        flex-direction: column;
        margin: 0;
    }

    .articles__item {
        width: 100%;
        min-height: 200px;
        margin: 10px 0;
    }

    .articles__item .item-title {
        font-size: 16px;
        line-height: 1.3;
    }

    .articles__item .item-link div {
        font-size: 12px;
    }

    /* Filters */
    .filters__slider {
        margin-bottom: 20px;
    }

    .filters__slider .filters-item {
        width: auto;
        padding: 10px 15px;
        font-size: 12px;
    }

    /* Slider */
    .md-standart-slider .slider-btn {
        width: 40px;
        height: 40px;
        left: -10px;
    }

    .md-standart-slider .slider-btn.slider-next-btn {
        left: auto;
        right: -10px;
    }

    .md-standart-slider .slider-btn img,
    .md-standart-slider .slider-btn svg {
        width: 10px;
        height: 15px;
    }

    .md-standart-slider .slider-pagination {
        bottom: -30px;
    }

    .md-standart-slider .slider-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 5px;
    }

    /* Footer */
    .footer {
        padding: 30px 0;
    }

    .footer__container {
        flex-direction: column;
        gap: 25px;
    }

    .footer__block {
        width: 100%;
        text-align: center;
    }

    .footer__block-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .footer__block-list {
        gap: 10px;
    }

    .footer__block-list a {
        font-size: 14px;
    }

    .footer__logo {
        margin-bottom: 20px;
    }

    .footer__logo img {
        max-width: 150px;
    }

    /* Sections common */
    section {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    /* Portfolio */
    .portfolio__container {
        gap: 15px;
    }

    .portfolio__item {
        width: 100%;
    }

    /* Services */
    .services__container {
        flex-direction: column;
        gap: 15px;
    }

    .services__item {
        width: 100%;
    }

    /* Specialists */
    .specialists__container {
        flex-direction: column;
        gap: 20px;
    }

    .specialists__item {
        width: 100%;
    }

    /* Pop-up forms */
    .popup__container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .popup__title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .popup__text {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Calc Banner */
    .calc-banner__container {
        padding: 20px;
        flex-direction: column;
    }

    .calc-banner__title {
        font-size: 18px;
        text-align: center;
    }

    .calc-banner__text {
        font-size: 14px;
        text-align: center;
    }

    .calc-banner__img {
        width: 80px;
        margin: 0 auto 15px;
    }

    /* Fixed bottom bar */
    .side-fixed-links {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }

    .side-fixed-links__container {
        flex-direction: row;
        justify-content: space-around;
    }

    /* ==============================
       QUIZ - 2 Cards Per Row Layout
       ============================== */

    /* Remove fixed height and vertical scroll from answers container */
    .calc-price__quiz .quiz-questions-container .answers-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-y: visible !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
    }

    /* Flex container for grid layout */
    .calc-price__quiz .quiz-questions-container .answers-container .container-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 3vw !important;
        margin: 0 !important;
    }

    /* Answer wrapper - 2 per row (48% width minus gap) */
    .calc-price__quiz .quiz-questions-container .answers-container .answers-wrap {
        width: calc(50% - 1.5vw) !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Answer item - fill wrapper width */
    .calc-price__quiz .quiz-questions-container .answers-container .answers-item {
        width: 100% !important;
    }

    /* Text answers (no image) - FULL WIDTH LIST LAYOUT */
    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .container-flex {
        display: flex !important;
        flex-direction: column !important;
        gap: 3vw !important;
        margin: 0 !important;
    }

    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .answers-wrap {
        width: 100% !important;
        margin: 0 !important;
    }

    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .answers-item {
        width: 100% !important;
        padding: 4vw 5vw !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    /* Icon adjustments for text answers - horizontal layout */
    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .answers-item__icon {
        margin-right: 4vw !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
        width: 7vw !important;
        height: 7vw !important;
    }

    /* Text size adjustments */
    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .answers-item__text {
        font-size: 4vw !important;
        line-height: 1.4 !important;
        text-align: left !important;
    }

    /* Image item adjustments - keep 2 per row */
    .calc-price__quiz .quiz-questions-container .answers-container .answers-item__img {
        height: 22vw !important;
    }

    .calc-price__quiz .quiz-questions-container .answers-container .answers-item__text {
        font-size: 3vw !important;
        line-height: 1.3 !important;
    }

    /* Hints and video icons positioning - for full width cards */
    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .answers-wrap__hint,
    .calc-price__quiz .quiz-questions-container .answers-container.md-no-img-item .answers-wrap__video {
        top: 50% !important;
        transform: translateY(-50%) !important;
        right: 4vw !important;
        width: 6vw !important;
        height: 6vw !important;
    }

    /* Ensure calc-price section has enough height */
    .calc-price {
        min-height: auto !important;
    }

    .calc-price__container {
        min-height: auto !important;
    }

    .calc-price__quiz {
        min-height: auto !important;
    }

    /* Question container - auto height */
    .quiz-questions-container .quiz-question.active {
        height: auto !important;
        min-height: auto !important;
    }

    /* ==============================
       CHECKBOX - Mobile adjustments
       ============================== */

    [agreementControl_JS] {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }

    [agreementControl_JS] img {
        width: 16px !important;
        height: 16px !important;
    }

    .form-checkbox p,
    .form-checkbox span {
        font-size: 12px !important;
    }

    /* ==============================
       GET-CONSULTATION MOBILE FIXES
       ============================== */

    /* 1. Fix title overlapping -- hide <br> tags and set proper line-height */
    .get-consultation .get-consultation__title br {
        display: none !important;
    }

    .get-consultation .get-consultation__title {
        line-height: 1.35 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* 2. Make consent text and links white on dark background */
    .get-consultation .form-checkbox p,
    .get-consultation .form-checkbox p span,
    .get-consultation .form-checkbox span {
        color: var(--color-white) !important;
    }

    .get-consultation .form-checkbox p a,
    .get-consultation .form-checkbox a {
        color: var(--color-white) !important;
        text-decoration: underline !important;
    }

    /* 3. Remove excessive bottom space */
    .get-consultation .get-consultation__container {
        min-height: auto !important;
        padding-bottom: 25px !important;
    }

    .get-consultation.md-style-2 .get-consultation__info {
        width: 100% !important;
    }

    .get-consultation.md-style-2 {
        margin-bottom: 20px !important;
    }

    .get-consultation .form-checkbox {
      max-width: 100% !important; 
    }
    /* ==============================
       FOOTER MOBILE FIXES
       ============================== */

    /* 1. Center-align footer list text (services, menu, advantages) */
    .footer-list {
        text-align: center !important;
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .footer-list li {
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        width: auto !important;
        max-width: 100% !important;
    }

    .footer-list li a,
    .footer-list li a.nav-link {
        text-align: center !important;
        width: 100% !important;
    }

    .footer-list .menu-item a,
    .footer-list .nav-item a,
    .footer-list li span {
        text-align: center !important;
    }

    .footer__top-item {
        text-align: center !important;
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .footer__top-item .menu-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .footer-text {
        text-align: center !important;
    }

    /* 2. Increase messenger buttons size */
    .footer .header__social .social-links,
    .footer .footer__social>div,
    .footer__top-main .social-links {
        gap: 10px !important;
        justify-content: center !important;
        display: flex !important;
    }

    .footer .header__social .social-links a,
    .footer .footer__social>div a,
    .footer__top-main .social-links a,
    .footer__social>div a {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        position: relative !important;
        margin: 0 5px !important;
    }

    .footer .header__social .social-links a img,
    .footer .footer__social>div a img,
    .footer__top-main .social-links a img,
    .footer__social>div a img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .footer .header__social,
    .footer__top-main .header__social {
        align-items: center !important;
    }

    .footer .header__social p,
    .footer__top-main .header__social p {
        text-align: center !important;
    }

    /* 3. Reduce document links spacing */
    .footer__bottom {
        gap: 3px !important;
        padding-bottom: 12px !important;
    }

    .footer__bottom-item {
        margin-bottom: 2px !important;
    }

    /* Article single page title - mobile */
    h1.articles-typical__title.md-main-title {
        width: 100% !important;
        font-size: 6vw !important;
    }
}

/* ==============================================
   SMALL MOBILE (<500px)
   ============================================== */

@media (max-width: 500px) {

    .first__title {
        font-size: 8vw;
    }

    .first__text p,
    .first__text h1 {
        font-size: 4.5vw;
    }

    .md-main-title {
        font-size: 7vw;
    }

    .md-main-color-btn {
        height: 48px;
        padding: 0 15px !important;
    }

    .md-main-color-btn span {
        font-size: 13px;
    }

    .popup__container {
        width: 100%;
        padding: 0;
    }

    .articles__item {
        min-height: 180px;
    }
}

/* ==============================================
   LANDSCAPE MOBILE (Height < 500px)
   ============================================== */

@media (max-height: 500px) and (orientation: landscape) {

    .first {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 30px;
    }

    .popup__container {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Mobile menu & header styles moved to header-nav.css */
/* ==============================================
   FORM CHECKBOX ENHANCEMENT - Orange when checked
   ============================================== */

/* Checkbox container - larger and more prominent */
[agreementControl_JS] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 5px !important;
    border: 2px solid var(--color-border) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--transition-speed) ease !important;
    background-color: var(--color-white) !important;
    flex-shrink: 0 !important;
}

/* Checkbox when checked - ORANGE */
[agreementControl_JS].checked {
    background-color: var(--color-amber) !important;
    border-color: var(--color-amber) !important;
}

/* Check icon visibility */
[agreementControl_JS] img {
    opacity: 0;
    transition: opacity 0.2s ease;
    width: 14px !important;
    height: 14px !important;
    filter: brightness(0) invert(1);
}

[agreementControl_JS].checked img {
    opacity: 1;
}

/* Consent text - DEFAULT styles */
.form-checkbox p {
    font-size: 13px !important;
    line-height: 1.5 !important;
}

/* ===== DARK/COLORED BACKGROUNDS - WHITE TEXT ===== */
/* Color inherits to child spans; no separate span/.consent-text selectors needed */
.download-price .form-checkbox p,
.download-price__content .form-checkbox p,
.calc-price .form-checkbox p,
.calc-price__quiz .form-checkbox p,
.first__content .form-checkbox p,
section[style*="background"] .form-checkbox p,
.price-popup .form-checkbox p {
    color: var(--color-white) !important;
}

/* ===== QUIZ FINAL FORM - Consent text special colors ===== */
.calc-price__quiz .quiz-final__form .form-checkbox p {
    color: var(--color-black) !important;
}

.calc-price__quiz .quiz-final__form .form-checkbox p a {
    color: var(--color-black) !important;
    text-decoration: underline !important;
}

/* ===== WHITE/LIGHT BACKGROUNDS - BLACK TEXT ===== */
/* Popup forms with white background */
.popup__block .form-checkbox p,
.main-popup .form-checkbox p,
.md-popup-form .form-checkbox p,
.download-popup .form-checkbox p {
    color: var(--color-charcoal) !important;
}

/* Link styles within consent text */
.form-checkbox a {
    text-decoration: underline !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.form-checkbox a:hover {
    color: var(--color-sage-dark) !important;
}

/* Flex alignment for checkbox row */
.form-checkbox {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

/* Vertical alignment: align first line of text with checkbox center */
.form-checkbox p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    padding-top: 2px !important;
}

.form-checkbox span.consent-text {
    line-height: 1.4 !important;
}

/* ==============================================
   DOWNLOAD-PRICE & FAQ SECTIONS (desktop >=768px)
   ============================================== */
@media (min-width: 768px) {

    /* Reduce container height */
    .download-price__container {
        min-height: 25vw !important;
        padding-top: 3.2vw !important;
        padding-bottom: 3.2vw !important;
    }

    /* Reduce and match img-large wrapper */
    .download-price__img-large {
        height: 25vw !important;
    }

    /* Shrink notebook image and push right */
    .download-price__img-large img {
        width: 33vw !important;
        right: -3vw !important;
        top: -40px !important;
    }

    /* Move circle to the right */
    .download-price__circle {
        left: 50vw !important;
        top: 4.5vw !important;
    }

    /* FAQ - Equal height tiles */
    .questions__item {
        min-height: 6vw !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
}

/* Fix for consent text width in popups */
.main-popup__content .form-checkbox {
    width: 100% !important;
    max-width: 100% !important;
}

.main-popup__content .form-checkbox p {
    flex: 1 !important;
    width: 100% !important;
}

/* Hidden on desktop */
.mobile-contact-card {
    display: none;
}

/* Extra small header styles moved to header-nav.css */

/* ==============================================
   MOBILE BOTTOM PANEL REDESIGN
   ============================================== */
@media (max-width: 768px) {

    /* Panel container: soft gray background, refined shadow */
    .cfb-mobile-panel {
        background: var(--bg-gray) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
        padding: 8px 10px !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        gap: 8px !important;
    }

    /* Both buttons: modern rounded style, taller for easier tapping */
    .cfb-mobile-btn {
        border-radius: 10px !important;
        padding: 10px 14px !important;
        font-size: 12.5px !important;
        font-weight: 600 !important;
        letter-spacing: 0.2px !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
        text-transform: none !important;
    }

    /* "Записаться онлайн" -- keep warm gold but refine */
    .cfb-mobile-btn:first-child {
        background: linear-gradient(135deg, #F2B644 0%, #E8A832) !important;
    }

    /* "Позвонить" -- site green instead of blue */
    .cfb-mobile-btn:last-child {
        background: linear-gradient(135deg, var(--color-sage) 0%, #96A882 100%) !important;
    }

    /* Active/pressed state for touch feedback */
    .cfb-mobile-btn:active {
        transform: scale(0.97) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
    }

    /* SVG icons inside buttons */
    .cfb-mobile-btn svg {
        flex-shrink: 0 !important;
        opacity: 0.9 !important;
    }

    /* Move scroll-to-top button above the mobile panel */
    .to-top {
        bottom: 60px !important;
    }
}

/* ====== Consultation form - global fixes ====== */
/* These override the default .md-standart-form rules for the portfolio consultation block */

/* Desktop/all sizes: compact input & button */
.get-consultation.md-style-2 .form-input {
    height: 38px !important;
    box-sizing: border-box !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
}

.get-consultation.md-style-2 .form-btn {
    height: 38px !important;
    width: auto !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0 24px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
}

.get-consultation.md-style-2 .form-btn span {
    font-size: 15px !important;
    letter-spacing: normal !important;
}

.get-consultation.md-style-2 .form-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: stretch !important;
}

/* Header mobile layout styles moved to header-nav.css */