/* ---------------------------------------------------------------------------------- */

/* Секция masters.css - переменные страницы */

.masters-page-header,
.master-block {
    --accent: rgb(34, 104, 109);
    --accent-hover: rgb(24, 84, 88);
    --tint-a: #effffa;
    --tint-b: #ffffe3;
}

/* ---------------------------------------------------------------------------------- */

/* Секция masters.css - заголовок страницы */

.masters-page-header {
    max-width: 800px;
    margin: 80px auto 60px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.masters-page-eyebrow {
    color: var(--title-color);
    font-size: 20px;
    margin: 0 0 8px 0;
}

.masters-page-title {
    font-size: 44px;
    margin: 0 0 20px 0;
}

.masters-page-text {
    color: rgb(80, 80, 80);
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    max-width: 100%;
    word-wrap: break-word;
}

/* ---------------------------------------------------------------------------------- */

/* Секция masters.css - блок мастера (на всю ширину) */

.master-block {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 70px 10%;
    background-color: var(--tint-a);
    box-sizing: border-box;
}

.master-block:nth-of-type(even) {
    background-color: var(--tint-b);
}

.master-block__media {
    flex-shrink: 0;
    width: 380px;
    max-width: 40%;
}

.master-block__img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    border-radius: 30px;
    display: block;
}

.master-block__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 620px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.master-block__eyebrow {
    color: var(--title-color);
    font-size: 16px;
    margin: 0 0 6px 0;
}

.master-block__name {
    font-size: 40px;
    margin: 0 0 4px 0;
}

.master-block__role {
    color: var(--accent);
    font-size: 17px;
    margin: 0 0 18px 0;
}

.master-block__text {
    color: rgb(70, 70, 70);
    line-height: 1.6;
    margin: 0 0 30px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ---------------------------------------------------------------------------------- */

/* Секция masters.css - кнопки действий */

.master-block__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 10px;
    width: 100%;
}

.btn-book,
.btn-book:visited {
    height: 45px;
    padding: 0 26px;
    background-color: var(--accent);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
    font-size: 15px;
    flex-shrink: 0;
}

.btn-book:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-services {
    height: 45px;
    padding: 0 22px;
    background-color: transparent;
    border: 1px solid var(--accent);
    border-radius: 20px;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-services:hover {
    background-color: var(--accent);
    color: white;
}

.btn-services__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.btn-services[aria-expanded="true"] .btn-services__icon {
    transform: rotate(45deg);
}

/* ---------------------------------------------------------------------------------- */

/* Секция masters.css - раскрывающийся список услуг (аккордеон) */

.services-panel {
    width: 100%;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.services-panel.open {
    grid-template-rows: 1fr;
}

.services-panel__inner {
    overflow: hidden;
    min-height: 0;
}

.services-list {
    list-style: none;
    margin: 20px 0 0 0;
    padding: 16px 22px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    width: 100%;
    box-sizing: border-box;
}

.services-list__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(34, 104, 109, 0.15);
    flex-wrap: wrap;
}

.services-list__item:last-child {
    border-bottom: none;
}

.services-list__name {
    flex: 1;
    color: rgb(40, 40, 40);
    min-width: 120px;
    word-wrap: break-word;
}

.services-list__time {
    color: rgb(120, 120, 120);
    font-size: 14px;
    width: 70px;
    flex-shrink: 0;
}

.services-list__price {
    color: var(--title-color);
    font-weight: 600;
    width: 90px;
    text-align: right;
    flex-shrink: 0;
}

/* ========================================================================== */
/* АДАПТИВ */
/* ========================================================================== */

/* Планшеты */
@media (max-width: 1024px) {
    .master-block {
        padding: 50px 6%;
        gap: 40px;
    }

    .master-block__media {
        width: 320px;
        max-width: 40%;
    }

    .master-block__img {
        height: 380px;
    }

    .master-block__name {
        font-size: 34px;
    }

    .master-block__text {
        font-size: 15px;
    }

    .btn-book,
    .btn-services {
        font-size: 14px;
        padding: 0 20px;
    }
}

@media (max-width: 900px) {
    .master-block {
        flex-direction: column;
        text-align: center;
        padding: 40px 5%;
        gap: 30px;
    }

    .master-block--reverse {
        flex-direction: column;
    }

    .master-block__content {
        align-items: center;
        max-width: 100%;
    }

    .master-block__media {
        width: 100%;
        max-width: 380px;
    }

    .master-block__img {
        height: 340px;
    }

    .master-block__actions {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .btn-book,
    .btn-services {
        white-space: nowrap;
        text-align: center;
        flex-shrink: 0;
    }

    .services-list__item {
        justify-content: space-between;
    }

    .masters-page-header {
        margin: 40px auto 30px auto;
    }

    .masters-page-title {
        font-size: 34px;
    }

    .masters-page-text {
        font-size: 16px;
    }
}

/* Мобильные устройства */
@media (max-width: 650px) {
    .master-block__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .btn-book,
    .btn-services {
        width: 100%;
        justify-content: center;
        white-space: nowrap;
        padding: 0 16px;
        flex-shrink: 1;
        min-width: 0;
        box-sizing: border-box;
    }

    .btn-services {
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .masters-page-header {
        margin: 30px auto 20px auto;
        padding: 0 15px;
    }

    .masters-page-eyebrow {
        font-size: 16px;
    }

    .masters-page-title {
        font-size: 28px;
    }

    .masters-page-text {
        font-size: 15px;
        word-wrap: break-word;
    }

    .master-block {
        padding: 30px 4%;
        gap: 20px;
    }

    .master-block__media {
        max-width: 100%;
        width: 100%;
    }

    .master-block__img {
        height: 260px;
        border-radius: 20px;
    }

    .master-block__name {
        font-size: 28px;
    }

    .master-block__role {
        font-size: 15px;
    }

    .master-block__text {
        font-size: 14px;
        margin: 0 0 20px 0;
        word-wrap: break-word;
    }

    .services-list {
        padding: 12px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .services-list__item {
        flex-wrap: wrap;
        row-gap: 4px;
        padding: 10px 0;
    }

    .services-list__name {
        width: 100%;
        flex: none;
        font-size: 14px;
        min-width: unset;
    }

    .services-list__time {
        font-size: 13px;
        width: 60px;
    }

    .services-list__price {
        font-size: 14px;
        width: 80px;
        text-align: right;
    }
}

@media (max-width: 400px) {
    .masters-page-title {
        font-size: 24px;
    }

    .master-block__name {
        font-size: 24px;
    }

    .master-block__img {
        height: 220px;
    }

    .master-block__eyebrow {
        font-size: 14px;
    }

    .master-block__text {
        font-size: 13px;
    }

    .services-list {
        padding: 10px 12px;
    }

    .services-list__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .services-list__price {
        text-align: left;
        width: auto;
    }

    .services-list__time {
        width: auto;
    }

    .btn-book,
    .btn-services {
        font-size: 14px;
        padding: 0 12px;
        height: 42px;
    }
}