/* Стили для секции информации о мастере */

.master-profile-section {
    padding: 120px 0 60px;
    min-height: auto;
    position: relative;
    padding-left: 0; /* Сдвигаем содержимое секции влево */
    overflow: hidden; /* Предотвращаем выход контента за границы экрана */
}

.master-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Уменьшаем разрыв между элементами */
    align-items: flex-start; /* Выравниваем по верхнему краю */
    padding-top: 20px;
    margin-left: -30px; /* Увеличиваем отрицательный отступ для большего смещения влево */
    justify-content: flex-start; /* Распределяем элементы с начала контейнера */
}

/* Контейнер с изображением мастера */
.master-image-container {
    flex: 1.3; /* Ещё больше увеличиваем относительную ширину */
    min-width: 520px;
    max-width: 600px; /* Увеличиваем максимальную ширину */
    position: relative;
    margin-right: 50px;
    align-self: flex-start; /* Выравниваем по верхнему краю */
    margin-top: 30px; /* Сдвигаем изображение немного вниз */
}

.master-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    height: 100%;
    display: flex;
    transform: translateY(0); /* Убираем сдвиг вниз */
}

.master-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    z-index: -1;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.master-image:hover::before {
    top: -25px;
    right: -25px;
}

.master-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
    object-fit: cover;
    max-height: 680px; /* Ещё больше увеличиваем высоту фото */
    filter: contrast(1.05) brightness(1.02); /* Слегка увеличиваем контраст и яркость */
}

.master-image:hover img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* Информация о мастере */
.master-info {
    flex: 0.7; /* Уменьшаем относительную ширину, чтобы изображение занимало больше места */
    min-width: 360px;
    padding-top: 40px; /* Больше сдвигаем текст вниз */
    padding-left: 10px; /* Уменьшаем отступ слева */
    padding-right: 20px; /* Добавляем отступ справа */
}

.master-name {
    font-size: 28px;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.master-title {
    font-size: 42px;
    margin-bottom: 30px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.master-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.master-description p {
    margin-bottom: 15px;
}

/* Контактная информация */
.master-contacts {
    margin-bottom: 30px;
    margin-top: 35px; /* Добавляем отступ сверху */
    border-top: 1px solid rgba(255,255,255,0.1); /* Добавляем тонкую разделительную линию */
    padding-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.contact-item i {
    width: 25px;
    margin-right: 15px;
    color: var(--accent-color);
    transition: transform 0.3s;
}

.contact-item:hover i {
    transform: scale(1.2);
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* Социальные сети */
.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--background-color);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: height 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
}

.social-link:hover::before {
    height: 100%;
}

.social-link i {
    position: relative;
    z-index: 1;
}

/* Кнопка записи */
.master-cta {
    margin-top: 10px;
}

.appointment-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: var(--accent-color);
    text-decoration: none;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
    z-index: 1;
}

.appointment-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.appointment-btn:hover {
    color: var(--background-color);
}

.appointment-btn:hover::before {
    left: 0;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 992px) {
    .master-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .master-profile-section {
        padding: 80px 0 40px;
    }
    
    .master-profile {
        flex-direction: column;
        gap: 20px;
        margin-left: 0;
        justify-content: center;
    }
    
    .master-image-container {
        width: 100%;
        max-width: 100%; /* Используем полную ширину контейнера */
        min-width: auto; /* Отменяем минимальную ширину */
        margin: 0 auto 20px;
        align-self: center;
        margin-top: 0;
    }
    
    .master-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .master-image img {
        width: auto;
        max-width: 100%; /* Ограничиваем ширину изображения по ширине экрана */
        height: auto; /* Поддерживаем пропорции */
        max-height: none; /* Отменяем ограничение высоты */
        object-fit: contain; /* Убеждаемся, что изображение отображается полностью */
        margin: 0 auto;
    }
    }
    
    .master-info {
        padding: 0 15px;
        text-align: center; /* Центрируем текст на мобильных */
    }
    
    .master-name {
        font-size: 26px;
    }
    
    .master-title {
        font-size: 36px;
    }
    
    .contact-item {
        justify-content: center; /* Центрируем контактные данные */
    }
    
    .master-contacts {
        margin-top: 25px;
        padding-top: 25px;
    }
    
    .master-title {
        font-size: 28px;
    }
}
