/* =========================================================
   САЛОН КРАСОТЫ «МАЛИНА» — АДАПТИВНЫЙ STYLE.CSS
   Mobile-first: базовые стили рассчитаны на телефоны.
   Структура и классы соответствуют index.html.
========================================================= */

/* 1. ПЕРЕМЕННЫЕ И СБРОС */
:root {
    --bg: #FFF5F5;
    --bg-light: #FFFFFF;
    --coral: #F08080;
    --coral-dark: #E66F72;
    --pink: #FCE4E5;
    --text: #292525;
    --text-light: #777171;
    --border: #F0DEDE;
    --heading-font: 'Playfair Display', Georgia, serif;
    --main-font: 'Montserrat', Arial, sans-serif;
    --container: 1200px;
    --page-gutter: 18px;
    --section-space: 58px;
    --card-radius: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    font-family: var(--main-font);
    background: var(--bg);
    color: var(--text);
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.7;
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
    min-width: 0;
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

.container {
    width: min(var(--container), calc(100% - var(--page-gutter) * 2));
    margin-inline: auto;
}

.section {
    padding-block: var(--section-space);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--coral-dark);
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 700;
    letter-spacing: clamp(1px, 0.22vw, 2.5px);
    line-height: 1.5;
    text-transform: uppercase;
}

:focus-visible {
    outline: 3px solid rgba(230, 111, 114, 0.55);
    outline-offset: 3px;
}

/* 2. ШАПКА */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(255, 245, 245, 0.96);
    border-bottom: 1px solid rgba(240, 222, 222, 0.8);
    backdrop-filter: blur(14px);
}

.header-container {
    display: flex;
    min-height: 70px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding-block: 10px;
}

.logo {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 8px;
    font-family: var(--heading-font);
    font-size: clamp(23px, 5vw, 29px);
    font-weight: 600;
    line-height: 1.1;
}

.logo img {
    width: 32px;
    height: 38px;
    flex: 0 0 auto;
    object-fit: contain;
}

.logo-dot,
.footer-logo span {
    color: var(--coral);
}

.navigation {
    display: flex;
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 18px;
}

.navigation a {
    padding: 5px 2px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    transition: color 0.25s ease;
}

.navigation a:hover {
    color: var(--coral-dark);
}

.header-button {
    display: inline-flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 10px 17px;
    border-radius: 50px;
    background: var(--coral);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    transition: background 0.25s ease, transform 0.25s ease;
}

.header-button:hover {
    transform: translateY(-2px);
    background: var(--coral-dark);
}

/* 3. ПЕРВЫЙ ЭКРАН */
.hero {
    overflow: hidden;
    padding-block: 48px 58px;
    background:
        radial-gradient(circle at 85% 20%, rgba(248, 207, 207, 0.5), transparent 35%),
        linear-gradient(120deg, #FFF5F5 0%, #FCEBEB 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 34px;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.hero h1 {
    max-width: 650px;
    margin: 0 0 18px;
    font-family: var(--heading-font);
    font-size: clamp(38px, 10vw, 58px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.8px;
}

.hero h1 span {
    display: block;
    color: var(--coral-dark);
    font-style: italic;
}

.hero-description {
    max-width: 440px;
    margin: 0 0 25px;
    color: var(--text-light);
    font-size: clamp(14px, 3.5vw, 16px);
    line-height: 1.8;
}

.primary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 13px 23px;
    border-radius: 50px;
    background: var(--coral);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-button span {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.primary-button:hover {
    transform: translateY(-3px);
    background: var(--coral-dark);
    box-shadow: 0 10px 24px rgba(240, 128, 128, 0.25);
}

.primary-button:hover span {
    transform: translateX(4px);
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    color: var(--text-light);
    font-size: 11px;
    letter-spacing: 0.4px;
}

.note-line {
    display: block;
    width: 28px;
    height: 1px;
    flex: 0 0 auto;
    background: var(--coral);
}

.hero-image-wrapper {
    position: relative;
    width: min(100%, 440px);
    min-width: 0;
    min-height: 0;
    margin-inline: auto;
    padding: 8px 8px 0 0;
}

.hero-image-background {
    position: absolute;
    top: 5%;
    left: 8%;
    width: 90%;
    height: 90%;
    border-radius: 48% 48% 10px 10px;
    background: #F3C9C9;
    transform: rotate(3deg);
}

.hero-image {
    position: relative;
    width: 100%;
    height: clamp(260px, 75vw, 390px);
    border-radius: 48% 48% 10px 10px;
    object-fit: cover;
    box-shadow: 0 20px 45px rgba(100, 50, 50, 0.12);
}

.hero-image-label {
    position: absolute;
    right: 18px;
    bottom: 16px;
    left: 18px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

/* 4. ЗАГОЛОВКИ СЕКЦИЙ */
.section-heading {
    width: 100%;
    max-width: 650px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading h2,
.about-heading h2 {
    margin: 0 0 14px;
    font-family: var(--heading-font);
    font-size: clamp(29px, 7.5vw, 44px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.section-heading h2 span,
.about-heading h2 span {
    color: var(--coral-dark);
    font-style: italic;
}

.section-heading p,
.about-heading p {
    margin: 0;
    color: var(--text-light);
    font-size: clamp(13px, 3.4vw, 15px);
    line-height: 1.8;
}

/* 5. УСЛУГИ */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.service-card {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 22px;
    border: 1px solid #F8EEEE;
    border-radius: var(--card-radius);
    background: #FFFAFA;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: #F2C5C5;
    background: #FFFFFF;
    box-shadow: 0 14px 32px rgba(110, 60, 60, 0.08);
}

.service-icon {
    display: flex;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--pink);
    color: var(--coral-dark);
    font-size: 22px;
    transition: transform 0.25s ease;
}

.service-card:hover .service-icon {
    transform: rotate(-8deg) scale(1.06);
}

.service-card h3 {
    margin: 0 0 9px;
    font-family: var(--heading-font);
    font-size: clamp(19px, 4.5vw, 22px);
    font-weight: 600;
    line-height: 1.3;
}

.service-card p {
    margin: 0 0 16px;
    color: var(--text-light);
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.75;
}

.service-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--coral-dark);
    font-size: 12px;
    font-weight: 700;
    transition: gap 0.25s ease;
}

.service-link:hover {
    gap: 13px;
}

/* 6. ПОЧЕМУ МЫ */
.about {
    background:
        radial-gradient(circle at 10% 80%, rgba(248, 210, 210, 0.35), transparent 30%),
        var(--bg);
}

.about-heading {
    max-width: 650px;
    margin: 0 0 38px;
}

.about-heading h2 {
    max-width: 520px;
}

.about-heading p {
    max-width: 540px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
}

.advantage {
    position: relative;
    min-width: 0;
    padding-top: 18px;
    border-top: 1px solid #E9CECE;
}

.advantage-number {
    color: #D7B8B8;
    font-family: var(--heading-font);
    font-size: 14px;
}

.advantage-icon {
    margin: 12px 0;
    color: var(--coral-dark);
    font-size: 27px;
    line-height: 1.2;
}

.advantage h3 {
    margin: 0 0 8px;
    font-family: var(--heading-font);
    font-size: clamp(18px, 4.3vw, 21px);
    font-weight: 600;
    line-height: 1.35;
}

.advantage p {
    margin: 0;
    color: var(--text-light);
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.8;
}

/* 7. ОТЗЫВЫ */
.reviews {
    background: #FFFFFF;
}

.reviews .section-heading {
    margin-bottom: 34px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.review-card {
    min-width: 0;
    padding: 25px 22px;
    border: 1px solid #F5E8E8;
    border-radius: var(--card-radius);
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(100, 50, 50, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 13px 30px rgba(100, 50, 50, 0.1);
}

.review-name {
    margin: 0 0 7px;
    color: var(--coral-dark);
    font-family: var(--heading-font);
    font-size: clamp(20px, 4.5vw, 23px);
    font-weight: 700;
    line-height: 1.3;
}

.review-stars {
    margin-bottom: 13px;
    color: var(--coral);
    font-size: 19px;
    letter-spacing: 2px;
    line-height: 1.4;
}

.review-text {
    min-height: 0;
    margin: 0;
    color: var(--text-light);
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* 8. ЗАПИСЬ */
.booking {
    background: var(--bg-light);
}

.booking-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    min-width: 0;
    padding: 30px 18px;
    overflow: hidden;
    border-radius: 14px;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.25), transparent 40%),
        linear-gradient(135deg, #F08080, #E87378);
}

.booking-content {
    min-width: 0;
    color: #FFFFFF;
}

.booking-content .eyebrow {
    color: rgba(255, 255, 255, 0.85);
}

.booking-content h2 {
    margin: 0 0 16px;
    font-family: var(--heading-font);
    font-size: clamp(34px, 9vw, 48px);
    font-weight: 500;
    line-height: 1.15;
}

.booking-content h2 span {
    display: block;
    font-style: italic;
}

.booking-content p {
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(13px, 3.4vw, 15px);
    line-height: 1.8;
}

.booking-decoration {
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 9px;
    letter-spacing: 2px;
    overflow-wrap: anywhere;
}

.booking-form {
    width: 100%;
    min-width: 0;
    padding: 22px 17px;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 12px 32px rgba(100, 40, 40, 0.12);
}

.form-group {
    min-width: 0;
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.form-group input,
.form-group select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    background: #FFFAFA;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(240, 128, 128, 0.12);
}

.form-group input::placeholder {
    color: #A99F9F;
    opacity: 1;
}

.form-group select {
    cursor: pointer;
}

.submit-button {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 17px;
    border: 0;
    border-radius: 7px;
    background: var(--coral);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.submit-button:hover {
    background: var(--coral-dark);
    box-shadow: 0 7px 18px rgba(240, 128, 128, 0.25);
}

.submit-button span {
    font-size: 20px;
    line-height: 1;
}

.form-policy {
    margin: 12px 0 0;
    color: #8E8585;
    font-size: 10px;
    line-height: 1.6;
}

/* 9. ФУТЕР */
.footer {
    padding: 48px 0 20px;
    background: #292525;
    color: #FFFFFF;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-bottom: 35px;
}

.footer-brand {
    min-width: 0;
}

.footer-logo-image {
    width: 100px;
    max-width: 100%;
    height: auto;
    margin-bottom: 12px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    max-width: 260px;
    margin: 0;
    color: #B9ACAC;
    font-size: 13px;
    line-height: 1.8;
}

.footer-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-column h3 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
}

.footer-column a,
.footer-column p {
    margin: 0;
    color: #B9ACAC;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--coral);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid #494141;
}

.footer-bottom p,
.footer-bottom a {
    margin: 0;
    color: #A99D9D;
    font-size: 11px;
    line-height: 1.7;
}

.footer-bottom a:hover {
    color: var(--coral);
}

/* =========================================================
   10. АДАПТИВНОСТЬ
   Базовые правила выше — мобильные.
========================================================= */

/* Телефоны: до 680px */
@media (max-width: 680px) {
    :root {
        --page-gutter: 16px;
        --section-space: 52px;
    }

    .header-container {
        column-gap: 8px;
    }

    .navigation {
        gap: 2px 16px;
    }

    .navigation a {
        font-size: 12px;
    }

    .header-button {
        padding-inline: 15px;
    }

    .hero {
        padding-block: 42px 50px;
    }

    .hero-container {
        gap: 30px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .services-grid,
    .advantages-grid,
    .reviews-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-card {
        padding: 22px 20px;
    }

    .about-heading {
        margin-bottom: 30px;
    }

    .booking-container {
        gap: 24px;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px 18px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Планшеты: 681–900px */
@media (min-width: 681px) and (max-width: 900px) {
    :root {
        --page-gutter: 25px;
        --section-space: 72px;
    }

    .header-container {
        min-height: 76px;
        flex-wrap: nowrap;
        gap: 18px;
    }

    .navigation {
        order: 0;
        width: auto;
        flex: 1 1 auto;
        justify-content: center;
        gap: 16px;
    }

    .navigation a {
        font-size: 12px;
    }

    .hero {
        padding-block: 58px;
    }

    .hero-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
        gap: 28px;
    }

    .hero h1 {
        font-size: clamp(40px, 6vw, 52px);
    }

    .hero-image {
        height: clamp(310px, 43vw, 390px);
    }

    .section-heading h2,
    .about-heading h2 {
        font-size: clamp(34px, 4.5vw, 42px);
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 24px;
    }

    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .booking-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px;
        padding: 38px 28px;
    }

    .booking-form {
        padding: 25px 20px;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
}

/* Маленькие ноутбуки: 901–1200px */
@media (min-width: 901px) and (max-width: 1200px) {
    :root {
        --page-gutter: 30px;
        --section-space: 88px;
    }

    .header-container {
        min-height: 80px;
        gap: 24px;
    }

    .navigation {
        order: 0;
        width: auto;
        flex: 1 1 auto;
        justify-content: center;
        gap: clamp(18px, 3vw, 34px);
    }

    .hero-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        gap: 48px;
    }

    .hero h1 {
        font-size: clamp(48px, 5.2vw, 64px);
    }

    .hero-image {
        height: clamp(390px, 42vw, 460px);
    }

    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 28px;
    }

    .reviews-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .booking-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        gap: 48px;
        padding: 55px 48px;
    }

    .footer-main {
        grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
        gap: 28px;
    }
}

/* Большие экраны: от 1201px */
@media (min-width: 1201px) {
    :root {
        --section-space: 105px;
    }

    .header-container {
        min-height: 85px;
        flex-wrap: nowrap;
        gap: 30px;
    }

    .navigation {
        order: 0;
        width: auto;
        flex: 1 1 auto;
        justify-content: center;
        gap: 38px;
    }

    .hero {
        padding-block: 75px 90px;
    }

    .hero-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        gap: 75px;
    }

    .hero-image-wrapper {
        width: 100%;
        max-width: none;
    }

    .hero-image {
        height: 480px;
    }

    .section-heading {
        margin-bottom: 55px;
    }

    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 22px;
    }

    .service-card {
        min-height: 260px;
        padding: 30px 24px;
    }

    .advantages-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 32px;
    }

    .reviews-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 25px;
    }

    .review-card {
        padding: 32px 28px;
    }

    .booking-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
        gap: 75px;
        padding: 68px 72px;
    }

    .booking-form {
        padding: 34px;
    }

    .footer {
        padding-top: 70px;
    }

    .footer-main {
        grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
        gap: 42px;
        padding-bottom: 55px;
    }
}

/* Очень узкие телефоны */
@media (max-width: 380px) {
    :root {
        --page-gutter: 14px;
        --section-space: 44px;
    }

    .header-container {
        gap: 7px;
    }

    .logo {
        gap: 6px;
        font-size: 22px;
    }

    .logo img {
        width: 28px;
        height: 34px;
    }

    .header-button {
        min-height: 42px;
        padding-inline: 12px;
        font-size: 10px;
    }

    .navigation {
        justify-content: space-between;
        gap: 3px 10px;
    }

    .navigation a {
        font-size: 11px;
    }

    .hero h1 {
        font-size: clamp(35px, 10vw, 40px);
        letter-spacing: -0.5px;
    }

    .hero-image {
        height: 255px;
    }

    .booking-container {
        padding: 25px 14px;
    }

    .booking-form {
        padding: 19px 13px;
    }

    .footer-main {
        gap: 22px 13px;
    }
}

/* Устройства с уменьшенной анимацией */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
