/* ---------- ОБЩИЕ СТИЛИ ---------- */
/* Комментарий: Основные настройки шрифтов и цветов сайта */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #8FBF9A; /* Основной цвет - светло-зеленый */
    --primary-hover: #6FAE78; /* Темнее для hover */
    --secondary-color: #C9A66B; /* Вторичный цвет - светло-коричневый */
    --accent-color: #EDE2D0; /* Акцентный цвет - светло-коричневый/беж */
    --text-color: #333333;
    --light-text: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* ---------- ШАПКА САЙТА ---------- */
/* Комментарий: Навигационное меню и логотип. Можно изменить логотип в HTML */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-right: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    align-items: center;
    text-align: center;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 2px;
    text-transform: lowercase;
}

/* Навигация */
nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* ---------- ГЛАВНЫЙ БАННЕР ---------- */
/* Комментарий: Первый экран с призывом к действию. Можно изменить текст и фоновое изображение */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/fon.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--light-text);
    text-align: center;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ---------- РАЗДЕЛ "О НАС" ---------- */
/* Комментарий: Информация о салоне. Можно изменить текст и изображение */
.about {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-img img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* ---------- РАЗДЕЛ "УСЛУГИ" ---------- */
/* Комментарий: Список услуг салона. Можно добавить/удалить услуги в HTML */
.services {
    position: relative;
    overflow: hidden;
    padding: 60px 0;
    background-color: var(--accent-color); /* fallback if image missing */
    border-radius: 12px;
    margin-bottom: 30px;
}

/* Фоновое изображение с размытием для раздела услуг */
.services::before {
    content: "";
    position: absolute;
    inset: 0;
    background: center/cover no-repeat url('images/cedar.jpg');
    filter: blur(8px) brightness(0.55);
    transform: scale(1.03);
    z-index: 0;
    pointer-events: none;
}

.services > .container {
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Expanded / focused card behaviour */
.no-scroll { overflow: hidden; }

.services-grid {
    position: relative;
}

.services-grid.expanded .service-card:not(.focused) {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    pointer-events: none;
}

.service-card {
    transition: transform 0.32s ease, box-shadow 0.32s ease, width 0.32s ease, left 0.32s ease, top 0.32s ease;
}

.service-card.focused {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) !important;
    top: 120px; /* увеличенный отступ от верхнего края */
    width: min(980px, 94%);
    z-index: 2200;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    border-radius: 12px;
    max-height: calc(100vh - 160px);
    overflow: auto;
}

/* Псевдоэлемент с сильным размытием той же картинки, что и в карточке */
.service-card.focused .service-img {
    position: relative;
    overflow: hidden; /* ограничиваем псевдоэлемент областью картинки */
}

/* Размытый фон только за изображением карточки */
.service-card.focused .service-img::before {
    content: "";
    position: absolute;
    /* смещаем верхний градиент выше изображения, фон выходит немного сверху и мягко плавно исчезает снизу */
    top: -22%; /* градиент начнётся выше картинки */
    bottom: -28%; /* фон продолжается ниже картинки */
    left: 0;
    right: 0;
    /* Слой 1: сильный тёмный градиент сверху, слой 2: изображение карточки */
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 8%, rgba(0,0,0,0.2) 28%, rgba(0,0,0,0) 48%), var(--bg-url);
    background-size: cover, cover;
    background-position: center, center;
    filter: blur(22px) brightness(0.55);
    transform: scale(1.06);
    z-index: 0;
    pointer-events: none;
    /* Плавный спад видимости внизу: маска делает переход мягким к содержимому страницы */
    -webkit-mask-image: linear-gradient(black 0%, black 70%, transparent 100%);
    mask-image: linear-gradient(black 0%, black 70%, transparent 100%);
}

.service-card.focused .service-img img {
    position: relative;
    z-index: 1; /* над размытым фоном */
}

.service-card.focused .service-info,
.service-card.focused .service-details {
    position: relative;
    z-index: 2; /* контент над изображением */
    background: transparent;
}

.service-card.focused .service-img {
    height: auto;
}
.service-card.focused .service-img img {
    width: 100%;
    height: auto; /* показываем изображение полностью до max-height */
    max-height: 360px; /* ограничение по высоте, чтобы не раздувать карточку */
    object-fit: contain;
    display: block;
}

/* Небольшая заметка под сеткой услуг */
.services-note {
    text-align: center;
    margin: 18px 0 6px;
    font-size: 0.95rem;
    color: #fff; /* белый текст для читаемости на фоне */
}
.services-note a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

/* Плейсхолдер для сохранения высоты документа при фиксировании карточки */
.card-placeholder {
    width: 100%;
    display: block;
}

/* Когда карточка в фокусе, даём больший лимит для внутренних деталей */
.service-card.focused .service-details.open {
    max-height: 1200px;
    padding: 18px 0;
}

.service-card .service-info { /* ensure internal padding when focused */
    padding: 28px;
}

.service-img {
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-info {
    padding: 25px;
}

.service-info h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Стили для блока деталей внутри карточки */
.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.36s ease, padding 0.28s ease;
    padding: 0 0;
    color: #555;
    font-size: 0.95rem;
}
.service-details.open {
    padding: 12px 0;
    max-height: 240px; /* достаточно для простого списка */
}
.service-details ul {
    margin-left: 18px;
}
.service-details .details-group {
    margin-bottom: 12px;
}
.service-details .details-group h4 {
    margin: 8px 0 6px 0;
    font-size: 1rem;
    color: var(--secondary-color);
}
.service-details .details-group ul {
    margin-left: 16px;
}
.details-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 14px;
    border-radius: 24px;
    font-weight: 700;
}
.details-btn:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

/* New layout for services columns */
.services-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: start;
}

.services-columns .col {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.services-columns h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.program h4, .procedure h4 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.program p, .procedure p {
    color: #444;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.muted {
    color: #777;
    font-weight: 600;
}

@media (max-width: 1000px) {
    .services-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-columns {
        grid-template-columns: 1fr;
    }
}

.service-info p {
    margin-bottom: 20px;
    color: #666;
}

.price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.service-btn {
    width: 100%;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* Раздел "Преимущества" удалён — связанные стили убраны */

/* ---------- РАЗДЕЛ "ЗАПИСЬ" ---------- */
/* Комментарий: Способы записи на процедуры */
.booking {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.booking-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.booking-text {
    flex: 1;
}

.booking-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.booking-text p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #666;
}

.booking-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --------- ЛОГОТИП (изображение) --------- */
.logo-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
}

/* Если нужно показывать только изображение (без текста), можно использовать класс .logo--image-only */
.logo--image-only .logo-text {
    display: none;
}

.booking-method {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.method-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

.method-content h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.method-content p {
    margin-bottom: 15px;
    color: #666;
}

.method-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.telegram-btn {
    background-color: #0088cc;
}

.telegram-btn:hover {
    background-color: #0077b3;
}

.booking-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.booking-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.booking-image img:hover {
    transform: scale(1.05);
}

/* ---------- РАЗДЕЛ "КОНТАКТЫ" ---------- */
/* Комментарий: Контактная информация и карта */
.contacts {
    padding: 100px 0;
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-map {
    flex: 1;
}

.contact-info h3, .contact-map h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    min-width: 30px;
}

.contact-subtext {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.map-container {
    margin-top: 10px;
}

.map-placeholder {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    text-align: center;
}

.map-overlay p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.map-overlay i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.map-btn {
    background-color: var(--secondary-color);
}

.map-btn:hover {
    background-color: var(--primary-color);
}

/* ---------- ПОДВАЛ ---------- */
/* Комментарий: Копирайт и дополнительная информация */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--accent-color);
}

.footer-links li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-links i {
    margin-right: 10px;
    color: var(--secondary-color);
    min-width: 20px;
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- АДАПТИВНОСТЬ ---------- */
/* Комментарий: Стили для мобильных устройств. Регулирует отображение на разных экранах */
@media (max-width: 992px) {
    .about-content, .booking-content, .contact-container {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .booking-method {
        flex-direction: column;
        text-align: center;
    }
    
    .method-icon {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 576px) {
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .method-btn {
        width: 100%;
        justify-content: center;
    }
}