/* Общие настройки и фоновое изображение */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #a8c0ff, #f4791f, #e3eed8);
    background-attachment: fixed;
    background-size: cover;
    color: #333333;
    line-height: 1.6;
}

/* Навигационная панель (Шапка) */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 1px;
}

.logo span {
    color: #d35400;
}

nav a {
    color: #2c3e50;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #d35400;
}

/* Главный контейнер */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Информационный блок (Эффект стекла) */
.info-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    margin-bottom: 40px;
}

.info-card h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 28px;
}

.info-card p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #4a4a4a;
}

/* Блок с анкетой */
.form-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.form-card h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
}

/* Стилизация полей формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

/* Стили для текстовых зон с запретом горизонтального изменения размера */
.form-group textarea {
    resize: vertical;
    min-height: 90px;
    max-height: 350px;
}

/* Контейнер для поля веса и чекбокса */
.weight-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weight-container input[type="number"] {
    flex: 1;
}

/* Контейнер для поля веса и чекбокса */
.weight-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weight-container input[type="number"] {
    flex: 1;
}

/* Общий лейбл как контейнер для кастомного чекбокса */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 28px; /* Место под кастомную галочку */
}

/* Прячем стандартный страшный чекбокс */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Создаем наш аккуратный скругленный чекбокс */
.custom-checkbox {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px; /* Красивое мягкое скругление углов */
    transition: all 0.2s ease;
}

/* Текст рядом с чекбоксом */
.checkbox-text {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Эффект при наведении на чекбокс */
.checkbox-label:hover input ~ .custom-checkbox {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: #d35400;
}

/* Стиль чекбокса, когда галочка СТАВИЦА (активна) */
.checkbox-label input:checked ~ .custom-checkbox {
    background-color: #d35400;
    border-color: #d35400;
}

/* Рисуем белую внутреннюю галочку (скрыта по умолчанию) */
.custom-checkbox::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Показываем внутреннюю галочку при клике */
.checkbox-label input:checked ~ .custom-checkbox::after {
    display: block;
}

/* Эффект фокуса на полях */
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: #d35400;
    box-shadow: 0 0 8px rgba(211, 84, 0, 0.2);
}

/* Кнопка отправки */
.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 25px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(211, 84, 0, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Стили для неактивного (заблокированного) поля */
.form-group input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Дополнительные стили для страницы "О кинологе" (Галерея) */
.subtitle {
    font-style: italic;
    color: #d35400;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 18px;
}

.gallery-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.gallery-card h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

/* Сетка фотографий (2 колонки на десктопе, 1 на мобилках) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.photo-item {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px); /* Легкий интерактивный подъем при наведении */
}

.photo-item img {
    width: 100%;
    height: 220px;
    object-fit: cover; /* Фотографии автоматически кадрируются под один размер без искажений */
    display: block;
}

.photo-caption {
    padding: 12px;
    font-size: 14px;
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Дополнительные стили для страницы "Услуги" (Таблица) */
.services-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.services-card h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.services-subtitle {
    text-align: center;
    color: #555;
    font-size: 15px;
    margin-bottom: 30px;
}

/* Контейнер для горизонтального скролла на мобильных устройствах */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Стили самой таблицы */
.services-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.2);
    text-align: left;
    font-size: 15px;
}

.services-table th, 
.services-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #2c3e50;
    vertical-align: middle;
}

.services-table th {
    background: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Подсветка строк при наведении */
.services-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Выравнивание колонки с ценой */
.price-col {
    text-align: center;
    width: 140px;
}

/* Стилизация нередактируемого блока цены, пришедшей из БД */
.price-block {
    display: inline-block;
    width: 100%;
    padding: 8px 12px;
    text-align: center;
    font-weight: bold;
    color: #d35400;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(211, 84, 0, 0.2);
    border-radius: 6px;
    font-size: 15px;
    /* Запрещаем выделение текста пользователем, подчеркивая статус "только чтение" */
    user-select: none; 
    cursor: default;
}


/* Кнопка перехода к анкете */
.services-action {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.btn-link {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(211, 84, 0, 0.2);
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 84, 0, 0.4);
}
