/* Локальные шрифты */
@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* Общие стили */
body {
    background-color: #fff;
    color: #4a4a4a;
    font-family: 'Playfair Display', serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.fade-in {
    opacity: 1;
}

body.fade-out {
    opacity: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: #ff6f61;
    font-weight: 600;
}

/* Навигация */
.navbar {
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 1rem;
    border-bottom: 2px solid #ff6f61;
}

/* Логотип */
.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 110px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.1) rotate(5deg);
}

/* Навигационные кнопки */
.nav-custom .nav-link {
    color: #4a4a4a !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-custom .nav-link:hover {
    color: #fff !important;
    background-color: #ff6f61;
    box-shadow: 0 2px 8px rgba(255, 111, 97, 0.4);
}

.nav-custom .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: #ff6f61;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-custom .nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Поиск */
.search-form {
    max-width: 200px;
    width: 100%;
    margin: 15px auto 10px;
    transition: all 0.3s ease;
}

.search-group {
    border: 1px solid #ff6f61;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.search-form:hover .search-group {
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3);
}

.search-input {
    border: none;
    padding: 8px 15px;
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    background-color: #fff;
    border-radius: 30px 0 0 30px;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
    background-color: #fff;
}

.search-btn {
    background-color: #ff6f61;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 0 30px 30px 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-btn:hover {
    background-color: #e65b50;
    transform: scale(1.1);
}

/* Кнопки */
.btn-coral {
    background-color: #ff6f61;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-coral:hover {
    background-color: #e65b50;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.5);
}

.btn-outline-coral {
    border: 1px solid #ff6f61;
    color: #ff6f61;
    background-color: transparent;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-coral:hover {
    background-color: #ff6f61;
    color: white;
}

/* Категории в галерее */
.category-btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.category-btn-group .btn {
    font-size: 1rem;
    padding: 8px 15px;
    margin: 0;
    border-radius: 20px;
}

/* Цвет для иконок в контактах */
.text-coral {
    color: #ff6f61;
}

/* WhatsApp кнопка */
.whatsapp-btn {
    position: fixed;
    bottom: 15px;
    left: 15px;
    background-color: #25D366;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: bounce 2s infinite;
}

.whatsapp-btn:hover {
    background-color: #20c058;
    transform: scale(1.1);
}

/* Instagram кнопка */
.instagram-btn {
    position: fixed;
    bottom: 80px;
    left: 15px;
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: bounce 2s infinite;
}

.instagram-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* TikTok кнопка */
.tiktok-btn {
    position: fixed;
    bottom: 145px;
    left: 15px;
    background-color: #000000;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: bounce 2s infinite;
}

.tiktok-btn:hover {
    background-color: #333333;
    transform: scale(1.1);
}

/* Scroll Top кнопка */
.scroll-top-btn {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: #ff6f61;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: #e65b50;
    transform: scale(1.1);
}

/* Анимация bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Карточки тортов */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

/* Карусель */
.carousel-inner img {
    border-radius: 15px;
    max-height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.carousel-inner .carousel-item:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.carousel-caption {
    bottom: 10px;
    padding: 5px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item:hover .carousel-caption {
    opacity: 1;
}

.carousel-caption h5, .carousel-caption p {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 5px 10px;
}

/* Формы */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #ff6f61;
    box-shadow: none;
}

/* Стили для textarea в форме добавления поста */
.content-textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ff6f61;
    transition: border-color 0.3s ease;
}

.content-textarea:focus {
    outline: none;
    border-color: #e65b50;
    box-shadow: 0 0 5px rgba(255, 111, 97, 0.5);
}

.content-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-buttons .btn-outline-coral {
    width: 100%;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 992px) {
    .navbar {
        padding: 1rem;
    }
    .navbar-brand {
        font-size: 1.2rem;
    }
    .nav-custom .nav-link {
        font-size: 1rem;
        padding: 6px 15px;
    }
    .logo-img {
        max-height: 100px;
    }
    .search-form {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .navbar {
        padding: 0.75rem;
    }
    .logo-img {
        max-height: 100px;
    }
    .nav-custom .nav-link {
        font-size: 0.95rem;
        padding: 8px 10px;
        margin: 5px 0;
        text-align: center;
    }
    .search-form {
        max-width: 100%;
        margin: 10px auto;
    }
    .search-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    .search-btn {
        padding: 6px 10px;
    }
    .whatsapp-btn {
        bottom: 10px;
        left: 10px;
        padding: 8px;
        font-size: 18px;
        width: 40px;
        height: 40px;
    }
    .instagram-btn {
        bottom: 60px;
        left: 10px;
        padding: 8px;
        font-size: 18px;
        width: 40px;
        height: 40px;
    }
    .tiktok-btn {
        bottom: 110px;
        left: 10px;
        padding: 8px;
        font-size: 18px;
        width: 40px;
        height: 40px;
    }
    .scroll-top-btn {
        bottom: 10px;
        right: 10px;
        padding: 8px;
        font-size: 18px;
        width: 40px;
        height: 40px;
    }
    .category-btn-group .btn {
        font-size: 0.9rem;
        padding: 6px 12px;
        border-radius: 15px;
    }
    .content-textarea {
        min-height: 250px; /* Увеличенная высота для мобильных */
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
    }
    .logo-img {
        max-height: 100px;
    }
    .nav-custom .nav-link {
        font-size: 0.9rem;
        padding: 6px 8px;
    }
    .search-input {
        font-size: 0.85rem;
        padding: 5px 8px;
    }
    .search-btn {
        padding: 5px 8px;
    }
    .whatsapp-btn {
        padding: 7px;
        font-size: 16px;
        width: 36px;
        height: 36px;
        left: 10px;
    }
    .instagram-btn {
        bottom: 55px;
        padding: 7px;
        font-size: 16px;
        width: 36px;
        height: 36px;
        left: 10px;
    }
    .tiktok-btn {
        bottom: 100px;
        padding: 7px;
        font-size: 16px;
        width: 36px;
        height: 36px;
        left: 10px;
    }
    .scroll-top-btn {
        padding: 7px;
        font-size: 16px;
        width: 36px;
        height: 36px;
        right: 10px;
    }
    .category-btn-group {
        flex-direction: column;
        align-items: center;
    }
    .category-btn-group .btn {
        width: 80%;
        max-width: 200px;
        font-size: 0.85rem;
        padding: 5px 10px;
        margin-bottom: 5px;
    }
    .content-textarea {
        min-height: 300px; /* Еще больше для самых маленьких экранов */
        font-size: 0.9rem;
    }
}

/* Остальные стили */
.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background-color: transparent;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* Модальное окно */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-body img {
    max-height: 80vh;
    width: 100%;
    object-fit: contain;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
    animation: fadeIn 1s ease-in;
}

/* Пагинация */
.pagination .page-link {
    border-radius: 50%;
    margin: 0 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.pagination .page-item.active .page-link {
    background-color: #ff6f61;
    border-color: #ff6f61;
}

.pagination .page-link:hover {
    background-color: #e65b50;
    color: white;
    transform: scale(1.1);
}

/* Стили для формы отзыва */
.review-form {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.review-form .form-label {
    color: #ff6f61;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.review-form .form-control,
.review-form .form-select {
    font-size: 0.9rem;
    padding: 6px 12px;
}

.review-form .form-select {
    cursor: pointer;
}

.review-form .form-select:focus {
    border-color: #ff6f61;
    box-shadow: 0 0 5px rgba(255, 111, 97, 0.5);
}

/* Стили для карточек отзывов */
.review-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.review-card .card-title {
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.review-card .card-text {
    font-size: 0.95rem;
    color: #666;
}

.review-card .text-muted {
    font-size: 0.85rem;
}

/* Рейтинг в виде SVG-иконок */
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.rating-display svg {
    width: 16px;
    height: 16px;
}

/* Стили для кнопки "Хочу свой торт" */
.custom-order-btn {
    font-size: 1.2rem;
    padding: 12px 25px;
    background-color: #ff6f61;
    border: 2px solid #e65b50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.custom-order-btn:hover {
    background-color: #e65b50;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 111, 97, 0.6);
    color: #fff;
}

.custom-order-btn:active {
    transform: scale(1.05);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.share-buttons p {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: #ff6f61;
    font-weight: 600;
}

.share-buttons .btn {
    font-size: 0.9rem;
    padding: 6px 12px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.share-buttons .btn i {
    font-size: 1.2rem;
}

.share-buttons .btn:hover {
    transform: scale(1.05);
    background-color: #ff6f61;
    color: white;
}

/* Стили для изображений в тексте поста */
.post-image {
    max-width: 300px;
    height: auto;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.post-image:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.stats-compact .stats-table {
    display: inline-table;
    margin-top: 5px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stats-compact .stats-table td {
    padding: 2px 8px;
}

.stats-compact h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.orders-table {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.orders-table th, .orders-table td {
    vertical-align: middle;
    padding: 10px;
}

.orders-table th {
    background-color: #ff6f61;
    color: white;
    font-family: 'Montserrat', sans-serif;
}

.orders-table tbody tr:hover {
    background-color: #f8f8f8;
}

.status-select {
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 8px;
    width: 100px;
}

/* Стили для нового поля в форме */
.form-select#preferred_contact {
    background-color: #fff;
    border-color: #ff6f61;
}

/* Стили для столбца в таблице заказов */
.orders-table th:nth-child(4),
.orders-table td:nth-child(4) {
    min-width: 120px;
}

/* Переопределение путей для Font Awesome */
@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fa-regular-400.woff2') format('woff2'),
         url('../fonts/fa-regular-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fa-solid-900.woff2') format('woff2'),
         url('../fonts/fa-solid-900.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* Принудительное горизонтальное отображение меню */
.navbar-nav.nav-custom {
    flex-direction: row !important;
}
.navbar-nav.nav-custom .nav-item {
    margin-right: 10px;
}
@media (max-width: 991px) {
    .navbar-nav.nav-custom {
        flex-direction: column !important;
    }
}

/* static/css/style.css */
.carousel-image {
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
}

/* Стили для содержимого блога */
.blog-content {
    white-space: normal; /* Обычная обработка пробелов */
    line-height: 1.8; /* Увеличиваем межстрочный интервал */
    margin-bottom: 1.5rem; /* Отступ снизу */
}