/* Сброс стандартных стилей для всех элементов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}
/* Основные стили для тела страницы */
body {
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}
/* Переменные для настройки */
:root {
    --card-min-height: 680px; /* Все карточки минимум этой высоты */
}
/* Стили для заголовков */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: #ADD8E6;
}
/* Шапка сайта */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f8f8;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease;
}
/* Уменьшенная шапка при прокрутке */
header.shrunk {
    padding: 10px;
}
/* Стили для логотипа */
.logo img {
    width: 150px;
    height: auto;
}
/* Стили для кнопок */
.btn {
    background-color: #ADD8E6;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}
/* Эффект при наведении на кнопку */
.btn:hover {
    background-color: #87CEEB;
}
/* Стили для кнопки "Вернуться на главную" */
.back-btn {
    padding: 8px 16px;
    font-size: 14px;
}
/* Стили для всех секций */
section {
    padding-top: 200px;
    padding-bottom: 60px;
    text-align: center;
}
/* Список элементов прайс-листа */
.price-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
}
/* Стили для карточек прайс-листа */
.price-item {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
    width: calc(33.33% - 20px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: var(--card-min-height);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* На десктопе все карточки свернуты */
@media (min-width: 601px) {
    .price-item {
        max-height: var(--card-min-height);
    }
    
    .price-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: linear-gradient(to bottom, transparent, #f8f8f8);
        pointer-events: none;
        opacity: 0.9;
        transition: opacity 0.3s;
    }
    
    .price-item:hover {
        max-height: 2000px;
        overflow-y: auto;
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        z-index: 10;
    }
    
    .price-item:hover::after {
        opacity: 0;
    }
}

.price-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Стили для подсвеченной карточки */
.price-item.highlighted {
    border: 3px solid #ADD8E6;
    box-shadow: 0 8px 25px rgba(173, 216, 230, 0.3);
    animation: pulse 2s infinite;
}

/* Заголовки в карточках */
.price-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}
/* Описание в карточках */
.price-item .description {
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}
/* Список пунктов в карточках */
.price-item ul {
    list-style-type: disc;
    margin-left: 20px;
    text-align: left !important;
    margin-bottom: 15px;
    font-size: 0.95em;
    flex-grow: 1;
}
/* Детали */
.price-item .details {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}
/* Цена в карточках */
.price-item .price {
    font-size: 1.2em;
    font-weight: bold;
    color: #ADD8E6;
    margin-bottom: 15px;
}
/* Кнопка "Оплатить" */
.price-item .pay-btn {
    display: block;
    margin: 20px auto 10px;
    width: fit-content;
    min-width: 120px;
    text-align: center;
    padding: 8px 16px;
    font-size: 14px;
    margin-top: auto;
    z-index: 20;
    position: relative;
}
/* Стили для формы оплаты */
.consultation-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
/* Контент формы */
.form-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}
/* Подписи в форме */
.form-content label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}
/* Поля ввода в форме */
.form-content input {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 14px;
}
/* Кнопка "Оплатить" в форме */
.form-content button[type="submit"] {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    margin-top: 10px;
}
/* Крестик закрытия формы */
.close-form {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}
/* Стили для футера */
footer {
    text-align: center;
    padding: 20px;
    background-color: #f8f8f8;
}
/* Анимация появления элементов */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
/* Эффект при появлении */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Скрытие элементов */
.hidden {
    display: none;
}

/* Анимация для выделенной карточки */
@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(173, 216, 230, 0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(173, 216, 230, 0.6);
    }
    100% {
        box-shadow: 0 8px 25px rgba(173, 216, 230, 0.3);
    }
}

/* Стили для ссылок */
.internal-link, .external-link {
    color: #ADD8E6;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}
.internal-link:hover, .external-link:hover {
    color: #87CEEB;
}

/* Мобильная версия */
@media (max-width: 600px) {
    header.shrunk {
        padding: 10px;
    }
    .logo img {
        width: 120px;
    }
    .back-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    section {
        padding-top: 170px;
    }
    
    /* На мобильных все карточки развернуты полностью */
    .price-item,
    .price-item.long-content {  /* Добавлено правило для long-content */
        width: 100%;
        max-width: 350px;
        min-height: auto;
        margin: 10px auto;
        padding: 15px;
        max-height: none !important;
        overflow-y: visible !important;
        aspect-ratio: auto !important;  /* Отключаем aspect-ratio */
    }
    
    /* Убираем градиент на мобильных */
    .price-item::after,
    .price-item.long-content::after {  /* Добавлено правило для long-content */
        display: none !important;
    }
    
    .price-list {
        flex-direction: column;
        align-items: center;
    }
    
    .form-content {
        width: 90%;
        max-height: 80vh;
    }
    
    .price-item h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
        padding-right: 10px;
    }
    
    .price-item .description {
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    .price-item ul {
        padding-left: 20px;
        margin: 10px 0;
    }
    
    .price-item li {
        font-size: 0.9em;
        margin-bottom: 8px;
        line-height: 1.4;
    }
    
    .price-item .price {
        font-size: 1.3em;
        text-align: center;
        margin: 15px 0;
    }
    
    .price-item .pay-btn {
        padding: 12px 24px;
        font-size: 16px;
        width: 100%;
        max-width: 200px;
    }
    
    .internal-link, .external-link {
        display: inline-block;
        padding: 2px 0;
        word-break: break-word;
    }
}