/* ==========================================
   WIN AVTO — Styles
   ========================================== */

/* --- Custom Properties --- */
:root {
    --color-primary: #F07B1A;
    --color-primary-hover: #D96A10;
    --color-primary-light: rgba(240, 123, 26, 0.1);
    --color-black: #1A1A1A;
    --color-text: #444444;
    --color-text-light: #777777;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F5F5F5;
    --color-border: #E5E5E5;
    --color-white: #FFFFFF;
    --color-success: #22C55E;
    --color-error: #EF4444;

    --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --fs-h1: clamp(2rem, 5vw, 3.25rem);
    --fs-h2: clamp(1.625rem, 4vw, 2.5rem);
    --fs-h3: clamp(1.125rem, 2.5vw, 1.375rem);
    --fs-body: clamp(0.9375rem, 1.5vw, 1.0625rem);
    --fs-small: clamp(0.8125rem, 1.2vw, 0.9375rem);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);

    --header-height: 72px;
    --container-max: 1200px;
    --container-padding: clamp(1rem, 3vw, 2rem);

    --transition: 0.3s ease;
}

/* --- Modern Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-black);
    line-height: 1.2;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.text-accent {
    color: var(--color-primary);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-1px);
}

.btn--lg {
    padding: 14px 32px;
    font-size: var(--fs-body);
}

.btn--messenger {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--fs-small);
    border: 2px solid;
}

.btn--telegram {
    color: #0088cc;
    border-color: #0088cc;
}

.btn--telegram:hover {
    background: #0088cc;
    color: var(--color-white);
}

.btn--viber {
    color: #7360f2;
    border-color: #7360f2;
}

.btn--viber:hover {
    background: #7360f2;
    color: var(--color-white);
}

.btn--phone {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--phone:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* --- Section Base --- */
.section {
    padding: clamp(3rem, 8vw, 5rem) 0;
    scroll-margin-top: var(--header-height);
}

.section--alt {
    background: var(--color-bg-alt);
}

.section__title {
    font-size: var(--fs-h2);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section__subtitle {
    text-align: center;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: var(--fs-body);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: box-shadow var(--transition);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.header--scrolled {
    box-shadow: var(--shadow-sm);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 2rem;
}

.header__logo img {
    height: 42px;
    width: auto;
}

.header__nav {
    flex: 1;
}

.header__menu {
    display: flex;
    gap: 1.5rem;
}

.header__link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-small);
    color: var(--color-black);
    padding: 4px 0;
    position: relative;
    transition: color var(--transition);
}

.header__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.header__link:hover,
.header__link--active {
    color: var(--color-primary);
}

.header__link:hover::after,
.header__link--active::after {
    width: 100%;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__phone {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-small);
    color: var(--color-black);
}

.header__phone:hover {
    color: var(--color-primary);
}

.header__cta {
    padding: 10px 20px;
}

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    z-index: 1001;
}

.burger__line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: all var(--transition);
    border-radius: 1px;
}

.burger--active .burger__line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger--active .burger__line:nth-child(2) {
    opacity: 0;
}

.burger--active .burger__line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    padding-top: calc(var(--header-height) + clamp(2rem, 6vw, 4rem));
    padding-bottom: clamp(2rem, 6vw, 4rem);
    overflow: hidden;
}

.hero__inner {
    display: grid;
    grid-template-columns: 55% 45%;
    align-items: center;
    gap: clamp(2rem, 4vw, 3rem);
}

.hero__title {
    font-size: var(--fs-h1);
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: var(--fs-body);
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    max-width: 520px;
    line-height: 1.7;
}

.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--color-black);
}

.badge__icon {
    display: flex;
    align-items: center;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 800;
}

.badge__icon svg {
    width: 20px;
    height: 20px;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero__image {
    position: relative;
}

.hero__image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-lg);
}

/* --- Services --- */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-card__image {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card__image img {
    transform: scale(1.05);
}

.service-card__body {
    padding: 1.25rem;
}

.service-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.service-card__icon svg {
    width: 22px;
    height: 22px;
}

.service-card__title {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-card__list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.service-card__list--open {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 0.75rem;
}

.service-card__list li {
    padding: 6px 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: var(--fs-small);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.service-card__list li:last-child {
    border-bottom: none;
}

.service-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}

.service-card__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--fs-small);
    padding: 4px 0;
    transition: color var(--transition);
}

.service-card__toggle:hover {
    color: var(--color-primary-hover);
}

.service-card__toggle svg {
    transition: transform var(--transition);
}

.service-card__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.service-card__toggle[aria-expanded="true"] .service-card__toggle-text::after {
    content: '';
}

/* --- Advantages --- */
.advantages__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.advantage-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.advantage-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    border-radius: 50%;
    color: var(--color-primary);
    margin: 0 auto 1rem;
}

.advantage-card__icon svg {
    width: 26px;
    height: 26px;
}

.advantage-card__title {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.advantage-card__desc {
    font-size: var(--fs-small);
    color: var(--color-text-light);
    line-height: 1.6;
}

/* --- Gallery --- */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery__item {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery__item--hidden {
    display: none;
}

.gallery__item--visible {
    display: block;
}

.gallery__item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery__item:hover img {
    transform: scale(1.05);
}

.gallery__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background var(--transition);
}

.gallery__item:hover::after {
    background: rgba(0,0,0,0.15);
}

.gallery__more {
    text-align: center;
    margin-top: 2rem;
}

/* --- Reviews --- */
.reviews__carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-border);
}

.reviews__carousel::-webkit-scrollbar {
    height: 6px;
}

.reviews__carousel::-webkit-scrollbar-track {
    background: var(--color-border);
    border-radius: 3px;
}

.reviews__carousel::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.review-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.review-card__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 0.75rem;
    color: #F59E0B;
}

.review-card__text {
    font-size: var(--fs-body);
    font-style: italic;
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 1rem;
    border: none;
    padding: 0;
}

.review-card__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.review-card__name {
    font-weight: 600;
    color: var(--color-black);
    font-size: var(--fs-small);
}

.review-card__car {
    font-size: var(--fs-small);
    color: var(--color-text-light);
}

/* --- Contacts --- */
.contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contacts__info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contacts__block h3 {
    font-size: var(--fs-body);
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--color-black);
}

.contacts__block p {
    color: var(--color-text);
    line-height: 1.6;
}

.contacts__block a {
    color: var(--color-primary);
    font-weight: 600;
}

.contacts__messengers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contacts__map {
    margin-top: 0.5rem;
}

/* --- Form --- */
.contacts__form {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form__title {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.form__desc {
    font-size: var(--fs-small);
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.form__group {
    margin-bottom: 1rem;
}

.form__label {
    display: block;
    font-weight: 600;
    font-size: var(--fs-small);
    margin-bottom: 0.375rem;
    color: var(--color-black);
}

.form__required {
    color: var(--color-error);
}

.form__input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--color-black);
    background: var(--color-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form__input::placeholder {
    color: var(--color-text-light);
}

.form__input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form__input--error {
    border-color: var(--color-error);
}

.form__input--error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 80px;
}

.form__error {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 0.25rem;
    min-height: 1.2em;
}

.form__group--checkbox {
    margin-bottom: 1.25rem;
}

.form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: var(--fs-small);
    line-height: 1.4;
    color: var(--color-text);
}

.form__checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form__checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    margin-top: 1px;
}

.form__checkbox-label input[type="checkbox"]:checked + .form__checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.form__checkbox-label input[type="checkbox"]:checked + .form__checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.form__checkbox-label input[type="checkbox"]:focus-visible + .form__checkbox-custom {
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form__submit {
    width: 100%;
}

.form__message {
    margin-top: 1rem;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: var(--fs-small);
    text-align: center;
    transition: all var(--transition);
}

.form__message--success {
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form__message--error {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Footer --- */
.footer {
    background: var(--color-black);
    color: rgba(255, 255, 255, 0.7);
    padding: clamp(2.5rem, 6vw, 4rem) 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand img {
    margin-bottom: 0.75rem;
}

.footer__tagline {
    font-size: var(--fs-small);
    margin-bottom: 1rem;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
}

.footer__social a {
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition);
}

.footer__social a:hover {
    color: var(--color-primary);
}

.footer__nav h4,
.footer__contacts h4 {
    color: var(--color-white);
    font-size: var(--fs-body);
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer__nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__nav a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-small);
    transition: color var(--transition);
}

.footer__nav a:hover {
    color: var(--color-primary);
}

.footer__contacts p {
    font-size: var(--fs-small);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer__contacts a {
    color: rgba(255, 255, 255, 0.7);
}

.footer__contacts a:hover {
    color: var(--color-primary);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    font-size: var(--fs-small);
}

.footer__privacy {
    color: rgba(255, 255, 255, 0.5);
}

.footer__privacy:hover {
    color: var(--color-primary);
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox--open {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2.5rem;
    line-height: 1;
    z-index: 2001;
    transition: opacity var(--transition);
}

.lightbox__close:hover {
    opacity: 0.7;
}

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    z-index: 2001;
    padding: 1rem;
    transition: opacity var(--transition);
}

.lightbox__prev:hover,
.lightbox__next:hover {
    opacity: 0.7;
}

.lightbox__prev {
    left: 0.5rem;
}

.lightbox__next {
    right: 0.5rem;
}

.lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-small);
    font-family: var(--font-heading);
    font-weight: 600;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */

/* >= 1024px: default (3-col grids) — already defined above */

/* < 1024px */
@media (max-width: 1023px) {
    .header__nav {
        display: none;
    }

    .header__actions {
        display: none;
    }

    .burger {
        display: flex;
    }

    .header__inner {
        gap: 0;
        justify-content: space-between;
    }

    /* Mobile nav overlay */
    .header__nav--open {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        top: var(--header-height);
        bottom: 0;
        background: var(--color-white);
        z-index: 999;
        flex-direction: column;
        padding: 0;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }

    .header__nav--open .header__menu {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem var(--container-padding);
    }

    .header__nav--open .header__link {
        display: block;
        padding: 1rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--color-border);
    }

    .header__nav--open .header__link::after {
        display: none;
    }

    .header__actions--mobile {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.5rem var(--container-padding);
        border-top: 1px solid var(--color-border);
        margin-top: auto;
    }

    .header__actions--mobile .header__phone {
        font-size: 1.25rem;
        text-align: center;
        display: block;
        color: var(--color-black);
    }

    .header__actions--mobile .header__cta {
        text-align: center;
        padding: 14px 24px;
        width: 100%;
        justify-content: center;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__subtitle {
        margin-inline: auto;
    }

    .hero__badges {
        justify-content: center;
    }

    .hero__ctas {
        justify-content: center;
    }

    .hero__image {
        order: -1;
        max-width: 500px;
        margin-inline: auto;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacts__grid {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }

    .footer__brand {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer__brand img {
        margin-inline: auto;
    }

    .footer__social {
        justify-content: center;
    }
}

/* < 768px */
@media (max-width: 767px) {
    .services__grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-inline: auto;
    }

    .advantages__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-inline: auto;
    }

    .gallery__grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .review-card {
        flex: 0 0 280px;
    }

    .contacts__form {
        padding: 1.5rem;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .footer__brand {
        grid-column: auto;
    }

    .footer__nav ul {
        align-items: center;
    }

    .footer__contacts {
        text-align: center;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* < 640px */
@media (max-width: 639px) {
    :root {
        --header-height: 64px;
    }

    .header__inner {
        padding-inline: 16px;
    }

    .header__logo img {
        height: 48px;
    }

    .burger {
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-sm);
        transition: background var(--transition);
    }

    .burger:active {
        background: var(--color-bg-alt);
    }

    .burger__line {
        width: 26px;
    }

    .hero {
        padding-top: calc(var(--header-height) + 1rem);
    }

    .hero__badges {
        gap: 0.5rem;
    }

    .badge {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }

    .hero__ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__ctas .btn {
        justify-content: center;
    }

    .contacts__messengers {
        flex-direction: column;
    }

    .contacts__messengers .btn {
        justify-content: center;
    }

    .footer {
        padding-top: 2rem;
    }

    .footer__grid {
        gap: 1.25rem;
    }

    .footer__nav h4,
    .footer__contacts h4 {
        margin-bottom: 0.5rem;
    }

    .footer__bottom {
        padding: 1rem 0;
        font-size: 0.8125rem;
    }
}
