/* --- Глобальные стили и переменные --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: 'Segoe UI', Arial, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f4f7f9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* --- Шапка (Header) --- */
header {
    background-color: white;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0;
}

header p {
    margin: 5px 0 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* --- Информационные блоки и расписания --- */
.info-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.info-title {
    font-size: 1.8rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.important-note {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.schedule-table th, .schedule-table td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: center;
}

.schedule-table th {
    background-color: var(--light-color);
    font-weight: bold;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.info-section ul li::before {
    content: '✓';
    color: var(--success-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- Карточки услуг --- */
.service-category h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.service-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-top: 0;
    color: var(--primary-color);
}

.service-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--success-color);
    margin: 10px 0;
}

.service-details {
    color: #6c757d;
    flex-grow: 1;
    margin-bottom: 15px;
}
.service-details p {
    margin: 5px 0;
}

/* --- Кнопки --- */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    transform: scale(1.02);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: #0056b3;
}
.btn-success {
    background: var(--success-color);
    color: white;
}
.btn-success:hover {
    background: #218838;
}
.btn-secondary {
    background: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background: #5a6268;
}

/* --- Уведомления --- */
.alert {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
}
.alert-success {
    background: #d4edda; color: #155724; border-color: #c3e6cb;
}
.alert-error {
    background: #f8d7da; color: #721c24; border-color: #f5c6cb;
}
.alert-info {
    background: #d1ecf1; color: #0c5460; border-color: #bee5eb;
}

/* --- Модальное окно --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header h2 {
    margin: 0 0 20px;
    font-size: 1.8rem;
    color: var(--dark-color);
}

/* --- Формы --- */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* --- Результаты поиска клиента --- */
.client-found, .client-not-found, .client-searching {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 10px;
}
.client-found {
    background: #d4edda; border: 1px solid #c3e6cb;
}
.client-found h4 {
    color: #155724; margin: 0 0 5px;
}
.client-not-found {
    background: #fff3cd; border: 1px solid #ffeeba;
}
.client-not-found h4 {
    color: #856404; margin: 0 0 5px;
}
.client-searching {
    background: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460;
}

/* --- Футер (Footer) --- */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    line-height: 1.8;
}
footer p {
    margin: 5px 0;
}
footer a {
    color: var(--primary-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .schedule-table thead {
        display: none;
    }
    .schedule-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: var(--border-radius);
        overflow: hidden;
    }
    .schedule-table td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #dee2e6;
    }
    .schedule-table td:last-child {
        border-bottom: none;
    }
    .schedule-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
}