/* =========================================================
   ВИРТУАЛЬНАЯ КНИГА РЕЦЕПТОВ
   ОБЩИЙ CSS
   ========================================================= */


/* =========================================================
   1. ОБЩИЕ СТИЛИ
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fdfaf6;
    color: #333;
    line-height: 1.6;
}


/* =========================================================
   2. ГЛАВНАЯ ШАПКА / HERO
   ========================================================= */

.hero {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.4),
            rgba(0, 0, 0, 0.4)
        ),
        url('https://images.unsplash.com/photo-1612874742237-6526221588e3?w=1200&q=80');

    background-size: cover;
    background-position: center;

    min-height: 400px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 1200px;

    text-align: center;
    color: white;

    padding: 30px 20px;
}

.hero h1 {
    font-size: 3rem;

    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.5);

    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;

    margin-top: 15px;

    font-style: italic;

    text-shadow:
        1px 1px 3px rgba(0, 0, 0, 0.5);
}


/* =========================================================
   3. НАВИГАЦИЯ В HERO
   ========================================================= */

.hero-buttons {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 12px;

    margin-top: 28px;

    flex-wrap: wrap;
}

.hero-button {
    display: inline-block;

    padding: 11px 20px;

    background-color: transparent;

    color: white;

    border: 2px solid white;

    border-radius: 50px;

    font-size: 0.95rem;

    font-family: inherit;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.hero-button:hover,
.hero-button.active {
    background-color: white;

    color: #d35400;

    border-color: white;

    transform: translateY(-3px);

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.25);
}


/* =========================================================
   4. ОБЩИЙ БЕЛЫЙ КОНТЕЙНЕР
   ========================================================= */

.container {
    max-width: 800px;

    margin: -50px auto 40px;

    background-color: white;

    padding: 40px;

    border-radius: 15px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.1);

    position: relative;

    z-index: 2;
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #d35400;

    margin-bottom: 15px;

    border-bottom: 2px solid #f39c12;

    padding-bottom: 5px;
}

h3 {
    color: #333;
}

p {
    margin-bottom: 15px;
}

ul,
ol {
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}


/* =========================================================
   5. КНОПКИ
   ========================================================= */

.btn-print {
    display: inline-block;

    margin-top: 20px;

    padding: 12px 24px;

    background-color: #d35400;

    color: white;

    border: none;

    border-radius: 50px;

    font-size: 1rem;

    font-family: inherit;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.btn-print:hover {
    background-color: #e67e22;

    transform: translateY(-2px);

    box-shadow:
        0 5px 15px rgba(211, 84, 0, 0.25);
}


/* =========================================================
   6. ГЛАВНАЯ СТРАНИЦА
   ========================================================= */

.about p,
.benefits p,
.features p,
.catalog-link p {
    color: #444;
}

.features-list {
    display: flex;

    flex-direction: column;

    gap: 20px;

    margin-top: 25px;
}

.feature {
    padding: 20px 25px;

    background-color: #fdfaf6;

    border-left: 4px solid #f39c12;

    border-radius: 10px;
}

.feature h3 {
    color: #d35400;

    margin-bottom: 8px;
}

.feature p {
    margin-bottom: 0;
}


/* =========================================================
   7. FOOTER
   ========================================================= */

footer {
    text-align: center;

    padding: 20px;

    background-color: #333;

    color: #aaa;

    font-size: 0.9rem;
}


/* =========================================================
   8. КАТАЛОГ
   ========================================================= */

.catalog-header {
    min-height: 300px;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.45)
        ),
        url('https://images.unsplash.com/photo-1498837167922-ddd27525d352?w=1400&q=80');

    background-size: cover;

    background-position: center;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    color: white;
}

.catalog-header-content {
    padding: 30px 20px;
}

.catalog-header-content h1 {
    font-size: 3rem;

    margin-bottom: 10px;

    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.5);
}

.catalog-header-content p {
    font-size: 1.2rem;

    font-style: italic;

    margin-bottom: 0;
}

.catalog-container {
    max-width: 1200px;

    margin: 0 auto;

    padding: 60px 30px 80px;
}

.catalog h2 {
    text-align: center;

    color: #d35400;

    font-size: 2rem;

    border-bottom: none;

    margin-bottom: 40px;
}

.recipes-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 25px;
}

.recipe-card {
    display: block;

    background-color: white;

    border-radius: 12px;

    overflow: hidden;

    text-decoration: none;

    color: #333;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.recipe-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);
}

.recipe-card img {
    display: block;

    width: 100%;

    height: 170px;

    object-fit: cover;
}

.recipe-card-content {
    padding: 18px;
}

.recipe-category {
    display: block;

    color: #d35400;

    font-size: 0.75rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    margin-bottom: 7px;
}

.recipe-card h3 {
    font-size: 1.15rem;

    font-weight: 600;

    margin: 0;

    line-height: 1.3;
}

.back-home {
    text-align: center;

    margin-top: 60px;
}

.back-home .btn-print {
    display: inline-block;

    text-decoration: none;

    margin-top: 0;
}


/* =========================================================
   9. СТРАНИЦЫ РЕЦЕПТОВ
   ========================================================= */

.recipe-hero {
    min-height: 400px;

    background-size: cover;

    background-position: center;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;
}

.recipe-hero::before {
    content: '';

    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.45);
}

.recipe-hero-content {
    position: relative;

    z-index: 1;

    color: white;

    text-align: center;

    padding: 30px 20px;
}

.recipe-hero-content h1 {
    font-size: 3rem;

    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.5);

    line-height: 1.2;
}

.recipe-hero-content p {
    margin-top: 10px;

    font-size: 1.15rem;

    font-style: italic;
}

.recipe-page {
    max-width: 800px;

    margin: -50px auto 40px;

    background-color: white;

    padding: 40px;

    border-radius: 15px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.1);

    position: relative;

    z-index: 2;
}


/* ИНФОРМАЦИЯ О РЕЦЕПТЕ */

.recipe-info {
    display: flex;

    justify-content: center;

    gap: 30px;

    flex-wrap: wrap;

    margin: 25px 0 35px;

    padding: 20px;

    background-color: #fdfaf6;

    border-radius: 12px;
}

.recipe-info-item {
    text-align: center;

    min-width: 120px;
}

.recipe-info-item strong {
    display: block;

    color: #d35400;

    font-size: 1.1rem;

    margin-bottom: 4px;
}

.recipe-info-item span {
    color: #666;

    font-size: 0.9rem;
}


/* ИНГРЕДИЕНТЫ */

.ingredients {
    background-color: #fdfaf6;

    padding: 25px;

    border-radius: 12px;

    margin-bottom: 35px;
}

.ingredients ul {
    margin-top: 15px;
}

.ingredients li {
    margin-bottom: 10px;
}


/* ШАГИ */

.steps {
    margin-bottom: 35px;
}

.step {
    margin-bottom: 25px;

    padding-left: 20px;

    border-left: 4px solid #f39c12;
}

.step h3 {
    color: #d35400;

    margin-bottom: 8px;
}

.step p {
    color: #444;
}


/* КНОПКИ РЕЦЕПТА */

.recipe-actions {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

    margin-top: 40px;

    padding-top: 30px;

    border-top: 2px solid #f39c12;
}

.recipe-actions .btn-print {
    display: inline-block;

    text-decoration: none;

    margin-top: 0;
}

.recipe-footer {
    text-align: center;

    padding: 20px;

    background-color: #333;

    color: #aaa;

    font-size: 0.9rem;
}


/* =========================================================
   10. СТРАНИЦА "ЗАПРОСИТЬ РЕЦЕПТ"
   ========================================================= */

.request-hero {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.45)
        ),
        url('https://images.unsplash.com/photo-1556911220-bff31c812dba?w=1200&q=80');

    background-size: cover;

    background-position: center;
}

.request-container {
    max-width: 800px;
}

.request-description {
    margin-bottom: 30px;

    color: #555;
}

.request-rules {
    margin: 30px 0;

    padding: 25px 30px;

    background-color: #fdfaf6;

    border-left: 4px solid #f39c12;

    border-radius: 12px;
}

.request-rules h3 {
    color: #d35400;

    margin-bottom: 10px;

    font-size: 1.2rem;
}

.request-rules > p {
    color: #555;

    margin-bottom: 15px;
}

.request-rules ol {
    padding-left: 25px;

    margin: 0;
}

.request-rules li {
    margin-bottom: 12px;

    color: #444;
}

.request-rules li:last-child {
    margin-bottom: 0;
}

.request-rules strong {
    color: #333;
}


/* ФОРМА */

.recipe-request-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: 600;

    color: #444;
}

.form-group input,
.form-group textarea {
    width: 100%;

    padding: 13px 15px;

    border: 1px solid #ddd;

    border-radius: 10px;

    font-family: inherit;

    font-size: 1rem;

    background-color: #fdfaf6;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group textarea {
    resize: vertical;

    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;

    border-color: #d35400;

    box-shadow:
        0 0 0 3px rgba(211, 84, 0, 0.1);
}

.recipe-request-form .btn-print {
    display: block;

    margin: 30px auto 0;
}


/* СООБЩЕНИЕ */

.success-message {
    margin-top: 30px;

    padding: 20px;

    background-color: #fdfaf6;

    border: 1px solid #f39c12;

    border-radius: 10px;

    text-align: center;

    color: #d35400;

    font-weight: 600;
}


/* КНОПКИ ВНИЗУ */

.request-back {
    display: flex;

    justify-content: center;

    gap: 15px;

    flex-wrap: wrap;

    margin-top: 40px;

    padding-top: 30px;

    border-top: 2px solid #f39c12;
}

.request-back .btn-print {
    display: inline-block;

    text-decoration: none;

    margin-top: 0;
}


/* =========================================================
   11. ЛАЙФХАКИ
   ========================================================= */

.lifehacks-hero {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.45)
        ),
        url('https://images.unsplash.com/photo-1556911220-bff31c812dba?w=1200&q=80');

    background-size: cover;

    background-position: center;
}

.lifehacks-container {
    max-width: 800px;
}

.lifehacks-intro {
    margin-bottom: 30px;

    color: #555;
}


/* ВАЖНО:
   ЛАЙФХАКИ ИДУТ ВЕРТИКАЛЬНЫМ СПИСКОМ */

.lifehacks-list {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.lifehack-item {
    background-color: #fdfaf6;

    padding: 25px 30px;

    border-radius: 12px;

    border-left: 4px solid #f39c12;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.lifehack-item:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}

.lifehack-item h3 {
    margin-bottom: 10px;

    font-size: 1.2rem;
}

.lifehack-item h3 a {
    color: #d35400;

    text-decoration: none;
}

.lifehack-item h3 a:hover {
    color: #e67e22;
}

.lifehack-item p {
    color: #555;

    margin-bottom: 12px;
}

.read-more {
    color: #d35400;

    font-weight: 600;

    text-decoration: none;
}

.read-more:hover {
    color: #e67e22;
}


/* =========================================================
   12. ОТДЕЛЬНАЯ СТАТЬЯ ЛАЙФХАКА
   ========================================================= */

.hack-article-container {
    max-width: 800px;
}

.hack-article {
    width: 100%;
}

.hack-article h2 {
    color: #d35400;

    font-size: 2rem;

    margin-bottom: 25px;

    border-bottom: 2px solid #f39c12;

    padding-bottom: 10px;

    line-height: 1.3;
}

.hack-full-text {
    color: #444;

    font-size: 1.05rem;

    line-height: 1.8;
}

.hack-full-text p {
    margin-bottom: 20px;
}

.hack-full-text p:last-of-type {
    margin-bottom: 0;
}


/* ВЫДЕЛЕННЫЙ ЛАЙФХАК */

.tip {
    margin-top: 30px;

    padding: 20px 25px;

    background-color: #fdfaf6;

    border-left: 4px solid #f39c12;

    border-radius: 10px;

    color: #555;
}

.tip strong {
    color: #d35400;
}


/* КНОПКИ СТАТЬИ */

.hack-actions {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

    margin-top: 40px;

    padding-top: 30px;

    border-top: 2px solid #f39c12;
}

.hack-actions .btn-print {
    display: inline-block;

    text-decoration: none;

    margin-top: 0;
}


/* =========================================================
   13. СТРАНИЦА "О СОЗДАТЕЛЕ"
   ========================================================= */

.creator-hero {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.45)
        ),
        url('https://images.unsplash.com/photo-1530789253388-582c481c54b0?w=1600&q=85');

    background-size: cover;

    background-position: center;
}

.creator-container {
    max-width: 880px;

    margin: -50px auto 40px;

    padding: 40px;
}


/* СЕКЦИИ СОЗДАТЕЛЯ */

.creator-section {
    margin-bottom: 45px;
}

.creator-section:last-of-type {
    margin-bottom: 0;
}

.creator-section h2 {
    color: #d35400;

    margin-bottom: 20px;

    border-bottom: 2px solid #f39c12;

    padding-bottom: 8px;
}

.creator-section p {
    margin-bottom: 18px;

    color: #444;
}

.creator-section p:last-child {
    margin-bottom: 0;
}


/* ГЛАВНОЕ ФОТО
   ИМЕННО ЗДЕСЬ ИСПРАВЛЕНА ПРОБЛЕМА
   С ВЫЛЕЗАЮЩЕЙ КАРТИНКОЙ */

.creator-main-image {
    display: block;

    width: 100%;

    max-width: 100%;

    height: 380px;

    object-fit: cover;

    margin: 30px 0 0;

    border-radius: 12px;
}


/* ГАЛЕРЕЯ */

.creator-gallery {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;

    margin-top: 25px;

    width: 100%;
}

.creator-gallery img {
    display: block;

    width: 100%;

    max-width: 100%;

    height: 190px;

    object-fit: cover;

    border-radius: 10px;
}


/* ЦИТАТА */

.creator-quote {
    background-color: #fdfaf6;

    padding: 25px 30px;

    border-left: 4px solid #f39c12;

    border-radius: 12px;
}

.creator-quote h2 {
    border-bottom: none;

    padding-bottom: 0;

    margin-bottom: 15px;
}

.creator-quote blockquote {
    margin-top: 25px;

    padding: 20px 25px;

    border-left: 3px solid #d35400;

    color: #666;

    font-style: italic;

    font-size: 1.05rem;

    line-height: 1.7;
}


/* КНОПКИ СОЗДАТЕЛЯ */

.creator-actions {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

    margin-top: 45px;

    padding-top: 30px;

    border-top: 2px solid #f39c12;
}

.creator-actions .btn-print {
    display: inline-block;

    text-decoration: none;

    margin-top: 0;
}


/* =========================================================
   14. ОБЩАЯ МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================= */

@media (max-width: 1000px) {

    .recipes-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


/* =========================================================
   15. ПЛАНШЕТ / НЕБОЛЬШОЙ ЭКРАН
   ========================================================= */

@media (max-width: 700px) {

    /* HERO */

    .hero {
        min-height: 420px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        gap: 8px;

        margin-top: 22px;
    }

    .hero-button {
        padding: 9px 15px;

        font-size: 0.85rem;
    }


    /* КОНТЕЙНЕР */

    .container {
        margin: -30px 15px 30px;

        padding: 25px;
    }


    /* КАТАЛОГ */

    .catalog-header {
        min-height: 250px;
    }

    .catalog-header-content h1 {
        font-size: 2.2rem;
    }

    .catalog-header-content p {
        font-size: 1rem;
    }

    .catalog-container {
        padding: 45px 20px 60px;
    }

    .recipes-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 15px;
    }

    .recipe-card img {
        height: 140px;
    }

    .recipe-card-content {
        padding: 14px;
    }

    .recipe-card h3 {
        font-size: 1rem;
    }


    /* РЕЦЕПТ */

    .recipe-page {
        margin: 0 15px 30px;

        padding: 25px;
    }

    .recipe-hero {
        min-height: 300px;
    }

    .recipe-hero-content h1 {
        font-size: 2.2rem;
    }

    .recipe-info {
        gap: 15px;
    }

    .recipe-info-item {
        min-width: 100px;
    }


    /* REQUEST */

    .request-container {
        margin: -30px 15px 30px;

        padding: 25px;
    }

    .request-back {
        flex-direction: column;
    }

    .request-back .btn-print {
        text-align: center;
    }


    /* LIFEHACKS */

    .lifehacks-container {
        margin: -30px 15px 30px;

        padding: 25px;
    }

    .lifehack-item {
        padding: 20px;
    }


    /* ARTICLE */

    .hack-article-container {
        margin: -30px 15px 30px;

        padding: 25px;
    }

    .hack-article h2 {
        font-size: 1.6rem;
    }

    .hack-full-text {
        font-size: 1rem;
    }

    .hack-actions {
        flex-direction: column;
    }

    .hack-actions .btn-print {
        width: 100%;

        text-align: center;
    }


    /* CREATOR */

    .creator-container {
        margin: -30px 15px 30px;

        padding: 25px;
    }

    .creator-section {
        margin-bottom: 35px;
    }

    .creator-section h2 {
        font-size: 1.5rem;
    }

    .creator-main-image {
        height: 260px;
    }

    .creator-gallery {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .creator-gallery img {
        height: 220px;
    }

    .creator-quote {
        padding: 20px;
    }

    .creator-actions {
        flex-direction: column;
    }

    .creator-actions .btn-print {
        width: 100%;

        text-align: center;
    }

}


/* =========================================================
   16. ТЕЛЕФОН
   ========================================================= */

@media (max-width: 480px) {

    /* HERO */

    .hero {
        min-height: 500px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: stretch;

        max-width: 300px;

        margin-left: auto;
        margin-right: auto;
    }

    .hero-button {
        width: 100%;

        text-align: center;
    }


    /* КОНТЕЙНЕР */

    .container {
        padding: 20px;
    }


    /* КАТАЛОГ */

    .recipes-grid {
        grid-template-columns: 1fr;
    }

    .recipe-card img {
        height: 200px;
    }


    /* RECIPE */

    .recipe-page {
        padding: 20px;
    }

    .recipe-hero-content h1 {
        font-size: 1.8rem;
    }

    .recipe-info {
        flex-direction: column;

        gap: 15px;
    }

    .recipe-info-item {
        width: 100%;
    }


    /* REQUEST */

    .request-rules {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }


    /* LIFEHACKS */

    .lifehack-item h3 {
        font-size: 1.05rem;
    }


    /* CREATOR */

    .creator-main-image {
        height: 220px;
    }

    .creator-gallery img {
        height: 200px;
    }

    .creator-quote blockquote {
        padding: 15px;

        font-size: 1rem;
    }

}


/* =========================================================
   17. ПЕЧАТЬ РЕЦЕПТА
   ========================================================= */

@media print {

    body {
        background-color: white;
    }


    /* УБИРАЕМ HERO */

    .hero,
    .recipe-hero {
        display: none;
    }


    /* УБИРАЕМ НАВИГАЦИЮ И КНОПКИ */

    .hero-buttons,
    .recipe-actions {
        display: none;
    }


    /* КОНТЕЙНЕР РЕЦЕПТА */

    .recipe-page {
        max-width: 100%;

        margin: 0;

        padding: 20px;

        box-shadow: none;

        border-radius: 0;
    }


    /* ИНФОРМАЦИЯ */

    .recipe-info {
        border: 1px solid #ddd;
    }


    /* ИНГРЕДИЕНТЫ */

    .ingredients {
        border: 1px solid #ddd;
    }


    /* FOOTER */

    .recipe-footer,
    footer {
        display: none;
    }


    /* ЗАГОЛОВКИ */

    h2 {
        page-break-after: avoid;
    }


    /* ШАГИ */

    .step {
        page-break-inside: avoid;
    }

}