/* Recipe Page Specific Styles */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.recipe-form-section {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.recipe-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
}

.recipe-gallery h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

#recipeSearch {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#recipeFilter {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.recipes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.recipe-description {
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box; /* REQUIRED for clamp */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; /* optional fallback */
}


.recipe-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-weight: 600;
}

.like-btn.liked {
    color: var(--primary-color);
}

.like-btn.liked .heart-icon {
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.placeholder-recipe {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
}

@media (max-width: 768px) {
    .search-filter {
        flex-direction: column;
    }
    
    .recipes-container {
        grid-template-columns: 1fr;
    }
}