/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.container a[href^="tel:"] {
    color: inherit;
    text-decoration: none;
}

/* Шапка и подвал */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

footer {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

/* Радио-группы и чекбоксы */
.radio-group {
    margin-bottom: 1rem;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s;
}

.radio-group:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
}

.radio-group label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Карточки специалистов и дат */
.specialist-card,
.date-option,
.time-option {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.specialist-card:hover,
.date-option:hover,
.time-option:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.specialist-card input,
.date-option input,
.time-option input {
    margin-right: 10px;
}

/* Сетки */
.date-grid,
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* Прогресс-бар */
.booking-progress {
    margin-bottom: 3rem;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.progress-step.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.progress-step.completed {
    background-color: #28a745;
    color: white;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Оповещения */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Карточки записей */
.appointment-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.appointment-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        position: relative;
    }
    
    .burger-menu {
        display: flex;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-width: 200px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-radius: 0 0 8px 8px;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    nav a {
        display: block;
        padding: 12px 20px;
        transition: background-color 0.3s;
    }
    
    nav a:hover {
        background-color: rgba(255,255,255,0.1);
        opacity: 1;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .appointment-card {
        flex-direction: column;
        text-align: center;
    }
    
    .appointment-actions {
        margin-top: 1rem;
    }
    
    .progress-labels {
        display: none;
    }
    
    .date-grid,
    .time-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* Секция приветствия */
.welcome-section {
    text-align: center;
    padding: 3rem 0;
}

.welcome-section h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
    text-align: left;
}

.info-section ol {
    margin-left: 2rem;
    margin-top: 1rem;
}

.info-section li {
    margin-bottom: 0.5rem;
}

/* Действия формы */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Сводка бронирования */
.booking-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
}

.booking-summary h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Сообщение об успехе */
.success-message {
    text-align: center;
    padding: 3rem 0;
}

.success-actions {
    margin-top: 2rem;
}

/* Добавьте эти стили в конец файла styles.css */

/* Стиль для поля телефона */
input[type="tel"] {
    font-family: monospace;
    letter-spacing: 1px;
}

/* Подсказка для поля телефона */
input[type="tel"]::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Подсказка под полем ввода */
.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Стиль для отформатированного номера */
.formatted-phone {
    font-family: monospace;
    letter-spacing: 1px;
    font-weight: bold;
}

html {
    overflow-y: scroll;
  }

/* --- Адаптивный перенос для логотипа (полный контроль) --- */

/* 1. По умолчанию (на больших экранах) мы прячем наш специальный <br> */
.mobile-break {
  display: none;
}

/* 2. Применяем стили только для экранов 768px и меньше */
@media (max-width: 768px) {

  /* 3. Делаем наш <br> видимым, что заставляет текст перенестись */
  .mobile-break {
    display: block;
  }
  
  /* 4. Дополнительные стили для красоты на мобильных */
  .logo {
    /* Можно немного уменьшить шрифт, если нужно 
    font-size: 1rem; */
    
    /* Сближаем строки, чтобы они не были слишком далеко друг от друга */
    line-height: 1.3;
    
    /* Выравниваем текст по левому краю (или center, если так красивее) */
    text-align: left;
  }
  
  /* 5. Важный фикс для flex-контейнера в шапке */
  .header-content {
    /* Это свойство позволит логотипу занять больше места,
       а бургер-меню остаться прижатым к правому краю. */
    gap: 1rem;
  }
}