/* ===== Mobile Styles (max-width: 768px) ===== */

@media (max-width: 768px) {
    /* Variables override */
    :root {
        --header-height: 64px;
    }
    
    /* Accent secondary buttons on mobile (services + scenarios) */
    .services .btn--secondary,
    .scenarios .btn--secondary {
        color: var(--color-accent);
        border-color: var(--color-accent);
    }
    
    .services .btn--secondary:hover,
    .services .btn--secondary:active,
    .scenarios .btn--secondary:hover,
    .scenarios .btn--secondary:active {
        color: var(--color-accent);
        border-color: var(--color-accent);
    }

    /* Portfolio overlay: show like desktop hover (touch devices don't hover) */
    .portfolio .portfolio-item__overlay {
        opacity: 1;
        pointer-events: none;
    }

    /* Guarantees: add more left breathing room for the icon */
    .guarantees__list svg {
        margin-left: 10px;
    }
    
    /* Container */
    .container {
        padding: 0 16px;
    }
    
    /* Section header */
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: clamp(26px, 6vw, 32px);
    }
    
    .section-desc {
        font-size: 15px;
    }
    
    /* Navigation */
    .nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 24px;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav__link {
        padding: 16px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav__link::after {
        display: none;
    }
    
    /* Header */
    .header__actions {
        margin-left: auto;
        margin-right: 12px;
    }
    
    .header__phone {
        padding: 8px;
        background: var(--color-accent-light);
        border-radius: var(--radius-md);
    }
    
    .header__phone span {
        display: none;
    }
    
    .header__phone svg {
        width: 22px;
        height: 22px;
    }
    
    .header__cta {
        display: none;
    }
    
    .burger {
        display: flex;
    }
    
    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        height: auto;
        padding-top: calc(var(--header-height) + 24px);
        padding-bottom: 24px;
    }
    
    .hero__title {
        font-size: 26px;
    }
    
    .hero__subtitle {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .hero__desc {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .hero__triggers {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 28px;
    }
    
    .trigger {
        padding: 14px 16px;
    }
    
    .trigger__icon {
        width: 38px;
        height: 38px;
    }
    
    .trigger span {
        font-size: 13px;
    }
    
    .hero__buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Анимация блеска для кнопок в мобильной версии */
    .hero__buttons .btn:first-child::before {
        animation: shineMoveFirst 2s infinite linear;
        animation-delay: 0s;
    }
    
    .hero__buttons .btn:last-child::before {
        animation: shineMoveFirst 2s infinite linear;
        animation-delay: 0.1s;
    }
    
    .hero__buttons .btn--lg {
        width: 100%;
        padding: 16px 24px;
        font-size: 15px;
    }
    
    .btn--lg {
        width: 100%;
        justify-content: center;
    }
    
    .hero__scroll {
        display: none;
    }
    
    /* Sections padding */
    .services,
    .why-us,
    .scenarios,
    .portfolio,
    .process,
    .guarantees,
    .calculator,
    .faq,
    .about,
    .reviews,
    .contacts {
        padding: 60px 0;
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .service-card__img {
        height: 180px;
    }
    
    .service-card__content {
        padding: 20px;
    }
    
    .service-card__title {
        font-size: 18px;
    }
    
    .service-card__text {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    /* Why Us */
    .why-us__grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .why-card {
        padding: 24px;
    }
    
    .why-card__number {
        font-size: 40px;
    }
    
    .why-card__title {
        font-size: 16px;
    }
    
    .why-card__text {
        font-size: 13px;
    }
    
    /* Scenarios */
    .scenarios__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .scenario-card {
        padding: 24px 20px;
    }
    
    .scenario-card__icon {
        font-size: 36px;
        margin-bottom: 16px;
    }
    
    .scenario-card__title {
        font-size: 16px;
    }
    
    .scenario-card__text {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    /* Portfolio */
    .portfolio__filters {
        gap: 8px;
        margin-bottom: 24px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .portfolio__grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .portfolio-item {
        aspect-ratio: 4/3;
    }
    
    /* Process */
    .process__timeline {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }
    
    .process-step {
        padding: 24px;
    }
    
    .process-step__number {
        font-size: 36px;
    }
    
    .process-step__title {
        font-size: 16px;
    }
    
    .process-step__text {
        font-size: 13px;
    }
    
    /* Guarantees */
    .guarantees__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .guarantees__image {
        display: none;
    }
    
    .guarantees__list {
        margin: 24px 0;
    }
    
    .guarantees__list li {
        padding: 14px 0;
        gap: 12px;
    }
    
    .guarantees__list span {
        font-size: 14px;
    }
    
    /* Calculator */
    .calculator__inner {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .calculator__benefits {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 20px;
        align-items: center;
    }
    
    .calculator__benefits .benefit {
        flex: 0 0 auto;
        font-size: 13px;
        gap: 8px;
    }
    
    .calculator__benefits .benefit svg {
        width: 24px;
        height: 24px;
    }
    
    .calculator__form-wrapper {
        padding: 24px;
    }

    /* Calculator form: override inherited center alignment from `.calculator__inner` */
    .calculator__form-wrapper {
        text-align: left;
    }

    .calculator__form-wrapper .form-group--checkbox {
        justify-content: flex-start;
    }

    .calculator__form-wrapper .checkbox-label {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
    }

    /* Text inside privacy label */
    .calculator__form-wrapper .checkbox-label > span:last-child {
        flex: 1;
        text-align: left;
    }

    /* Calculator: make outline buttons visible on white form card (mobile only) */
    .calculator__form-wrapper .btn--outline {
        color: var(--color-dark);
        border-color: rgba(9, 9, 11, 0.22);
        background: transparent;
    }
    
    .calculator__form-wrapper .btn--outline:hover,
    .calculator__form-wrapper .btn--outline:active {
        border-color: var(--color-accent);
        color: var(--color-accent);
    }
    
    /* Calculator Steps - one row with lines */
    .calc-steps__progress {
        flex-wrap: nowrap;
        gap: 0;
        justify-content: center;
        align-items: center;
    }
    
    .calc-steps__progress-line {
        display: block;
        flex: 1;
        min-width: 16px;
        max-width: 40px;
        height: 2px;
        margin: 0 4px;
    }
    
    .calc-steps__progress-item {
        flex: 0 0 auto;
    }
    
    .calc-steps__progress-label {
        display: none;
    }
    
    .calc-steps__progress-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .calc-step__title {
        font-size: 20px;
    }
    
    .calc-step__actions {
        flex-direction: column;
    }
    
    .calc-step__actions .btn {
        max-width: 100%;
    }
    
    /* FAQ */
    .faq__list {
        max-width: 100%;
    }
    
    .faq-item__question {
        padding: 18px 16px;
        font-size: 15px;
    }
    
    .faq-item__answer p {
        padding: 0 16px 18px;
        font-size: 14px;
    }
    
    /* About */
    .about__inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "content"
            "image"
            "stats";
        gap: 32px;
    }
    
    .about__image {
        grid-area: image;
    }

    .about__content {
        grid-area: content;
    }
    
    .about__text {
        font-size: 14px;
    }
    
    .about__stats {
        grid-area: stats;
        flex-wrap: wrap;
        gap: 24px;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .stat {
        flex: 1;
        min-width: 100px;
    }
    
    .stat__number {
        font-size: 32px;
    }
    
    .stat__label {
        font-size: 12px;
    }
    
    /* Reviews */
    .reviews .section-header {
        margin-bottom: 36px;
    }
    
    .reviews__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .review-card::before {
        content: none;
        font-size: 48px;
        top: 12px;
        right: 16px;
    }
    
    .review-card__header {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .review-card__avatar {
        width: 44px;
        height: 44px;
    }
    
    .review-card__avatar span {
        font-size: 13px;
    }
    
    .review-card__name {
        font-size: 15px;
    }
    
    .review-card__location {
        font-size: 12px;
    }
    
    .review-card__rating svg {
        width: 14px;
        height: 14px;
    }
    
    .review-card__text {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 14px;
    }
    
    .review-card__date {
        font-size: 11px;
        padding-top: 14px;
    }
    
    .reviews__actions {
        margin-top: 28px;
    }
    
    /* Contacts */
    .contacts__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .contacts__desc {
        font-size: 14px;
        margin-bottom: 24px;
    }

    /* Contacts: phone/WA/TG as icon-only row on mobile (strict one row) */
    .contacts__icons {
        display: flex;
        gap: 12px;
        width: 100%;
    }

    .contacts__icons > a.contact-item {
        flex: 1 1 0;
        min-width: 0;
        height: 56px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }

    .contacts__icons > a.contact-item .contact-item__content {
        display: none;
    }

    .contacts__icons > a.contact-item .contact-item__icon {
        width: 44px;
        height: 44px;
        margin: 0;
    }
    
    .contacts__map {
        min-height: 280px;
    }
    
    .contact-item {
        padding: 14px;
    }
    
    .contact-item__icon {
        width: 42px;
        height: 42px;
    }
    
    .contact-item__label {
        font-size: 11px;
    }
    
    .contact-item__value {
        font-size: 14px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0;
    }
    
    .footer__inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .footer__copy {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Modal */
    .modal {
        padding: 16px;
    }
    
    .modal__content {
        padding: 24px;
        max-width: 100%;
    }
    
    .modal__content:has(.calc-form--steps) {
        padding: 20px;
    }
    
    .modal__body h3 {
        font-size: 22px;
    }
    
    .modal__body > p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .modal__content .calc-steps__progress {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .modal__content .calc-step__title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    /* Object type options */
    .object-type-select {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .object-type-option {
        padding: 12px;
    }
    
    .object-type-option__icon {
        width: 36px;
        height: 36px;
    }
    
    .object-type-option__label {
        font-size: 12px;
    }
    
    /* Additional elements */
    .additional-elements-select {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .additional-element-option {
        padding: 12px;
    }
    
    .additional-element-option__icon {
        width: 36px;
        height: 36px;
    }
    
    .additional-element-option__label {
        font-size: 12px;
    }
    
    /* Form elements */
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="email"],
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Floating contact */
    .floating-contact {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    
    .floating-contact__main {
        width: 56px;
        height: 56px;
    }
    
    .floating-contact__item {
        width: 48px;
        height: 48px;
    }
    
    /* Success message */
    .success-message__content {
        padding: 32px 24px;
    }
    
    .success-message__content h3 {
        font-size: 22px;
    }
    
    .success-message__content p {
        font-size: 14px;
    }
}

/* ===== Small Mobile (max-width: 480px) ===== */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 12px;
    }
    
    /* Hero */
    .hero__title {
        font-size: 22px;
    }
    
    .hero__subtitle {
        font-size: 14px;
    }
    
    .hero__desc {
        font-size: 13px;
    }
    
    .hero__buttons .btn--lg {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .trigger {
        padding: 10px 12px;
    }
    
    .trigger__icon {
        width: 32px;
        height: 32px;
    }
    
    .trigger span {
        font-size: 12px;
    }
    
    /* Portfolio filters: minimal width chips + maximum items per row */
    .portfolio__filters {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    
    .filter-btn {
        width: auto;
        flex: 0 0 auto;
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.1;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Sections */
    .services,
    .why-us,
    .scenarios,
    .portfolio,
    .process,
    .guarantees,
    .calculator,
    .faq,
    .about,
    .reviews,
    .contacts {
        padding: 48px 0;
    }
    
    /* Reviews - smaller screens */
    .review-card {
        padding: 16px;
    }
    
    .review-card::before {
        font-size: 40px;
        top: 10px;
        right: 12px;
    }
    
    .review-card__avatar {
        width: 40px;
        height: 40px;
    }
    
    .review-card__avatar span {
        font-size: 12px;
    }
    
    .review-card__name {
        font-size: 14px;
    }
    
    .review-card__text {
        font-size: 13px;
    }
    
    .reviews__actions {
        margin-top: 24px;
    }
    
    /* Cards */
    .service-card__content {
        padding: 16px;
    }
    
    .why-card {
        padding: 20px;
    }
    
    .scenario-card {
        padding: 20px 16px;
    }
    
    .process-step {
        padding: 20px;
    }
    
    /* Calculator */
    .calculator__form-wrapper {
        padding: 20px;
    }
    
    .calc-steps__progress-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    /* Footer */
    .footer {
        padding: 32px 0;
    }
    
    .footer__links {
        gap: 12px;
    }
    
    .footer__links a {
        font-size: 13px;
    }
    
    /* Modal */
    .modal__content {
        padding: 20px;
    }
    
    .modal__content:has(.calc-form--steps) {
        padding: 16px;
    }
    
    .modal__body h3 {
        font-size: 20px;
    }
    
    /* Floating contact */
    .floating-contact {
        bottom: 16px;
        right: 16px;
    }
    
    .floating-contact__main {
        width: 52px;
        height: 52px;
    }
    
    .floating-contact__item {
        width: 44px;
        height: 44px;
    }
}

