/* Общие стили */
* {
    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: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
}

/* Шапка */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.header .container {
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #e74c3c;
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.logo p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 1.5rem;
}

.nav a {
    text-decoration: none;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #e74c3c;
}

/* Герой секция */
.hero {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Основной контент */
.main {
    padding: 2rem 0;
}

.content {
    flex: 3;
    margin-right: 2rem;
}

.sidebar {
    flex: 1;
}

/* Карточки рецептов */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.recipe-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.recipe-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.eggplant {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

.zucchini {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.tartlets {
    background: linear-gradient(45deg, #e67e22, #f39c12);
}

.bacon {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.recipe-info {
    padding: 1rem;
}

.recipe-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.time {
    color: #7f8c8d;
}

.difficulty {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty.легко {
    background: #d5f4e6;
    color: #27ae60;
}

.difficulty.средне {
    background: #fff3cd;
    color: #e67e22;
}

.difficulty.сложно {
    background: #f8d7da;
    color: #c0392b;
}

.btn-recipe {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-recipe:hover {
    background: #c0392b;
}

/* Категории */
.categories {
    margin: 3rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.category-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
}

.vegetable {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.mushroom {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

.meat {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.cheese {
    background: linear-gradient(45deg, #f1c40f, #f39c12);
}

.category-card h3 {
    font-size: 1rem;
}

/* Таблица рецептов */
.recipes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.recipes-table th, .recipes-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.recipes-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
}

.recipes-table tr:hover {
    background: #f8f9fa;
}

.btn-small {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #2980b9;
}

/* Боковая панель */
.sidebar > div {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 0.5rem;
}

.search-form {
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #bdc3c7;
    border-radius: 4px 0 0 4px;
}

.search-form button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.quick-recipes ul {
    list-style: none;
}

.quick-recipes li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.quick-recipes a {
    text-decoration: none;
    color: #34495e;
    transition: color 0.3s;
}

.quick-recipes a:hover {
    color: #e74c3c;
}

.quick-recipes span {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.seasonal-item {
    text-align: center;
}

.seasonal-image {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summer {
    background: linear-gradient(45deg, #f1c40f, #e67e22);
}

.seasonal-item h4 {
    margin-bottom: 0.5rem;
}

.seasonal-item p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Подвал */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #e74c3c;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social {
    background: #34495e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.social:hover {
    background: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .content {
        margin-right: 0;
        margin-bottom: 2rem;
    }
    
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav ul {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .nav li {
        margin: 0 0.5rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
/* Стили для страницы рецепта */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.recipe-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.recipe-header {
    padding: 2rem;
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    text-align: center;
}

.recipe-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.recipe-meta-large {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.time { background: #3498db; }
.difficulty { background: #2ecc71; }
.servings { background: #e74c3c; }

.recipe-hero {
    position: relative;
}

.recipe-image-large {
    height: 400px;
    background-size: cover;
    background-position: center;
}

.eggplant-detail {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

.recipe-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 1rem;
}

.btn-action {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-action:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.action-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.print { background: #3498db; }
.save { background: #2ecc71; }
.share { background: #e74c3c; }
.saved { background: #f1c40f; }

.recipe-content {
    padding: 2rem;
}

.ingredients-section, .instructions-section, .tips-section, .video-section {
    margin-bottom: 3rem;
}

.ingredients-section h2, .instructions-section h2, .tips-section h2, .video-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e74c3c;
}

.ingredients-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ingredient-group h3 {
    color: #34495e;
    margin-bottom: 1rem;
}

.ingredients-list {
    list-style: none;
}

.ingredients-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.ingredients-list input[type="checkbox"] {
    margin-right: 0.8rem;
    width: 18px;
    height: 18px;
}

.ingredients-list label {
    cursor: pointer;
    transition: all 0.3s;
}

.nutrition-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.nutrition-info h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.nutrition-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.nutrition-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.nutrition-item .label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.instructions-timeline {
    position: relative;
}

.instructions-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e74c3c;
}

.instruction-step {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 2rem;
    flex-shrink: 0;
    z-index: 1;
}

.step-content {
    flex: 1;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.step-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.step-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-top: 1rem;
}

.prep-image { background: linear-gradient(45deg, #27ae60, #2ecc71); }
.fry-image { background: linear-gradient(45deg, #e67e22, #f39c12); }
.sauce-image { background: linear-gradient(45deg, #3498db, #2980b9); }
.final-image { background: linear-gradient(45deg, #8e44ad, #9b59b6); }

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-top: 4px solid #e74c3c;
}

.tip-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
}

.knife { background: linear-gradient(45deg, #34495e, #2c3e50); }
.salt { background: linear-gradient(45deg, #7f8c8d, #95a5a6); }
.heat { background: linear-gradient(45deg, #e74c3c, #c0392b); }

.tip-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.tip-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.video-placeholder {
    background: #34495e;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail {
    height: 300px;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.video-thumbnail:hover {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    position: relative;
    margin-bottom: 1rem;
}

.play-button::after {
    content: '';
    position: absolute;
    left: 55%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.video-playing {
    color: white;
    font-size: 1.2rem;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
}

.close:hover {
    color: #e74c3c;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.share-option {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.share-option:hover {
    transform: translateY(-2px);
}

.vk { background: #4a76a8; }
.ok { background: #ee8208; }
.telegram { background: #0088cc; }
.whatsapp { background: #25d366; }
.copy { background: #34495e; }

.similar-recipes {
    margin-top: 3rem;
}

/* Адаптивность для страницы рецепта */
@media (max-width: 768px) {
    .recipe-header h1 {
        font-size: 2rem;
    }
    
    .recipe-meta-large {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ingredients-grid {
        grid-template-columns: 1fr;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instruction-step {
        flex-direction: column;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .instructions-timeline::before {
        left: 30px;
        top: 60px;
        bottom: 0;
    }
    
    .recipe-actions {
        position: static;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}

@media print {
    .header, .sidebar, .footer, .recipe-actions, .similar-recipes {
        display: none;
    }
    
    .recipe-detail {
        box-shadow: none;
    }
}