/* Recipe Page Styles */

/* Recipe Header */
.recipe-header {
    padding: 6rem 0 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.breadcrumb-nav {
    margin-bottom: 2rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--dark);
    font-weight: 500;
}

.recipe-main {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.recipe-badge-top {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 89, 0, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-item i {
    color: var(--accent);
}

.recipe-title-main {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
}

.recipe-description-main {
    font-size: 1.125rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.recipe-meta-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 89, 0, 0.1);
    border-radius: 12px;
}

.meta-item div {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.recipe-actions-header {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.recipe-image-main {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 100%;
    aspect-ratio: 3 / 2;
}

.recipe-image-main > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recipe-author-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    flex-wrap: nowrap;
}

.recipe-author-card-standalone {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.author-card-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.author-card-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
}

.author-link-icon {
    margin-left: auto;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.author-card-link:hover .author-link-icon {
    opacity: 1;
    transform: translateX(5px);
}

.author-avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.author-role {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Recipe Content */
.recipe-content-section {
    padding: 3rem 0;
}

.recipe-block {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.block-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark);
}

.block-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Ingredients */
.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ingredient-category {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 1.5rem;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.ingredients {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ingredients li {
    display: flex;
    align-items: center;
}

.ingredients input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.ingredients label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    flex: 1;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.ingredients label:hover {
    background: rgba(255, 89, 0, 0.05);
}

.ingredients input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    color: var(--gray);
    background: rgba(255, 89, 0, 0.1);
}

.ingredient-amount {
    font-weight: 600;
    color: var(--primary);
    min-width: 80px;
}

.ingredient-name {
    color: var(--dark);
}

/* Steps */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.step-item::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: -2rem;
    width: 2px;
    background: var(--gray-lighter);
}

.step-item:last-child::before {
    display: none;
}

.step-number {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 89, 0, 0.4);
}

.step-content {
    flex: 1;
    padding-top: 0.5rem;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.step-description {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.step-image {
    margin-top: 1rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.step-image img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.step-image:hover img {
    transform: scale(1.05);
}

/* Tips */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 89, 0, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
}

.tip-item i {
    color: var(--primary);
    font-size: 1.25rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.tip-item p {
    margin: 0;
    color: var(--dark);
    line-height: 1.6;
}

/* Sidebar */
.recipe-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

/* Nutrition */
.nutrition-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-lighter);
}

.nutrition-item:last-child {
    border-bottom: none;
}

.nutrition-label {
    color: var(--gray);
    font-size: 0.875rem;
}

.nutrition-value {
    font-weight: 600;
    color: var(--dark);
}

/* Similar Recipes */
.similar-recipes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.similar-recipe {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.similar-recipe:hover {
    background: var(--bg-light);
    transform: translateX(5px);
    text-decoration: none;
    color: inherit;
}

.similar-recipe img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.similar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.similar-info h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.similar-time {
    font-size: 0.75rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Comments */
.comments-section {
    padding: 3rem 0;
    background: var(--bg-light);
}

.comments-block {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comments-count {
    color: var(--gray);
    font-weight: 400;
    font-size: 1rem;
}

.comment-form-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form {
    flex: 1;
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.stars i {
    font-size: 1.25rem;
    color: var(--gray-lighter);
    cursor: pointer;
    transition: color 0.2s ease;
}

.stars i:hover,
.stars i.active {
    color: var(--accent);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-lighter);
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.comment-rating {
    display: flex;
    gap: 0.125rem;
}

.comment-rating i {
    font-size: 0.875rem;
    color: var(--accent);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--gray);
}

.comment-text {
    color: var(--dark);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    gap: 1.5rem;
}

.comment-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.comment-action-btn:hover {
    color: var(--primary);
    background: rgba(255, 89, 0, 0.1);
}

.load-more-comments {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 992px) {
    .recipe-sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .recipe-meta-header {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recipe-main {
        padding: 1.5rem;
    }
    
    .recipe-block {
        padding: 1.5rem;
    }
    
    .recipe-meta-header {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        flex-direction: column;
    }
    
    .step-item::before {
        display: none;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .comment-form-card {
        flex-direction: column;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
}

