/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #faf6f0;
    color: #333;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка сайта и меню */
header {
    background-color: #a0522d;
    padding: 20px 0;
}

.logo {
    color: #fff;
    font-size: 32px;
    text-decoration: none;
}

.logo span {
    color: #ffd9a0;
}

nav {
    background-color: #8b4513;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 16px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #a0522d;
}

/* Основное содержимое */
.content {
    padding: 30px 0;
    min-height: 500px;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #5c3317;
}

h2 {
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #5c3317;
}

.content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.content ul, .content ol {
    margin-left: 25px;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Хлебные крошки */
.breadcrumbs {
    font-size: 14px;
    color: #8a7460;
}

.breadcrumbs a {
    color: #a0522d;
}

.banner {
    background-color: #ffe8cc;
    border: 1px solid #e8c9a0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    animation: appear 0.8s;
}

.banner h1 {
    margin-bottom: 10px;
}

/* Слайдер фотографий на главной странице */
.slider {
    position: relative;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
    animation: appear 0.8s;
}

.slide img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 12px 20px;
    font-size: 17px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: none;
    font-size: 22px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.65);
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

/* Плавное появление блока */
@keyframes appear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Карточки рецептов */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    width: 295px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin-bottom: 10px;
    color: #5c3317;
}

.card-body p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #555;
}

.btn {
    display: inline-block;
    background-color: #a0522d;
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #8b4513;
}

/* Страница рецепта */
.recipe-photo {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.recipe-info {
    border-collapse: collapse;
    margin-bottom: 20px;
}

.recipe-info td, .recipe-info th {
    border: 1px solid #c9a97e;
    padding: 8px 20px;
    text-align: center;
}

.recipe-info th {
    background-color: #ffe8cc;
    color: #5c3317;
}

/* Форма обратной связи */
.form-block {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    max-width: 500px;
}

.form-block label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-block input, .form-block textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.form-block textarea {
    height: 100px;
    resize: vertical;
}

.form-block button {
    background-color: #a0522d;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-block button:hover {
    background-color: #8b4513;
}

/* Сообщение показывается скриптом после отправки формы */
.form-success {
    display: none;
    color: #2e7d32;
    font-weight: bold;
    margin-top: 15px;
}

/* Карта сайта */
.sitemap ul {
    list-style: square;
}

.sitemap li {
    margin-bottom: 8px;
}

.sitemap a {
    color: #a0522d;
    font-weight: bold;
}

/* Подвал */
footer {
    background-color: #5c3317;
    color: #e8d5c0;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

footer a {
    color: #ffd9a0;
}

footer p {
    margin-top: 5px;
}

/* Адаптивность для планшетов и телефонов */
@media (max-width: 700px) {
    .logo {
        font-size: 26px;
    }

    nav ul {
        flex-direction: column;
    }

    .banner p {
        display: none;
    }

    .slide img {
        height: 220px;
    }

    .slide-caption {
        font-size: 14px;
        padding: 8px 12px;
    }

    .cards {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }

    .recipe-info td, .recipe-info th {
        padding: 6px 10px;
        font-size: 14px;
    }
}
