/* Recipes Page Specific Styles */

/* Hero Section */
.recipes-hero {
    background: white;
    color: #333;
    padding: 6rem 2rem 4rem;
    min-height: 70vh;
    display: flex;
    align-items: center;
    margin-top: 80px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    animation: slideInLeft 0.8s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #09713D;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
    color: #333;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2E7D32;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    text-align: center;
    animation: slideInRight 0.8s ease;
}

.hero-img {
    max-width: 100%;
    height: auto;
    width: 500px;
    border-radius: 15px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
    image-rendering: auto;
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    display: flex;
    background: white;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-button {
    padding: 15px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-button:hover {
    background: #2E7D32;
}

/* Category Filters */
.recipe-categories {
    padding: 60px 0;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #09713D;
    background: transparent;
    color: #09713D;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #09713D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(9, 113, 61, 0.3);
}

/* Recipe Grid Enhancements */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .recipe-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}

.recipe-card {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    height: 320px;
    display: flex;
    flex-direction: column;
}

.recipe-card:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    z-index: 10;
}

.recipe-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.recipe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: opacity 0.3s ease;
    transform-origin: center;
}

/* Enhanced image quality for all recipe page images */
.recipe img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    image-rendering: auto;
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.recipe-card:hover .recipe-image {
    opacity: 0.9;
}

.recipe-content {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 0;
}

.recipe-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d5a3d;
    margin: 0.5rem 0 0 0;
    line-height: 1.2;
    flex-shrink: 0;
}

/* Duplicate button styling removed - using unified styling below */

/* Badge styling moved to unified section below */

.recipe-category-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #09713D;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.1;
    flex-shrink: 0;
}



.recipe-image-container {
    position: relative;
    overflow: hidden;
}



.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.favorite-btn:hover {
    background: #4a7c59;
    color: white;
    transform: scale(1.1);
}

.favorite-btn.active {
    background: #e74c3c;
    color: white;
}

.favorite-btn.active:hover {
    background: #c0392b;
}

/* Load More Section */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.recipe-count {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Recipe Detail Modal (for future use) */
.recipe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.recipe-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recipes-hero {
        padding: 4rem 1rem 3rem;
        min-height: 60vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-img {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .recipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .search-container {
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .hero-img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
}

/* Animation for recipe cards appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recipe-card {
    animation: fadeInUp 0.6s ease forwards;
}

.recipe-card:nth-child(1) { animation-delay: 0.1s; }
.recipe-card:nth-child(2) { animation-delay: 0.2s; }
.recipe-card:nth-child(3) { animation-delay: 0.3s; }
.recipe-card:nth-child(4) { animation-delay: 0.4s; }
.recipe-card:nth-child(5) { animation-delay: 0.5s; }
.recipe-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading state */
.recipe-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.recipe-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Hero Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Restaurant Ads Section */
.restaurant-ads {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.restaurant-ads .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d5a3d;
    margin-bottom: 3rem;
}

.restaurant-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.restaurant-ad-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.restaurant-ad-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.restaurant-ad-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.restaurant-ad-card:hover .restaurant-ad-image {
    transform: scale(1.05);
}

.restaurant-ad-content {
    padding: 2rem;
}

.restaurant-ad-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d5a3d;
    margin-bottom: 0.75rem;
}

.restaurant-ad-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.restaurant-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: #e8f5e8;
    color: #4a7c59;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #4a7c59;
}

.restaurant-cta-btn {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.restaurant-cta-btn:hover {
    background: #2E7D32;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.3);
}

/* Restaurant Ads Responsive */
@media (max-width: 768px) {
    .restaurant-ads {
        padding: 3rem 0;
    }
    
    .restaurant-ads .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .restaurant-ads-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .restaurant-ad-content {
        padding: 1.5rem;
    }
    
    .restaurant-ad-content h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .restaurant-ads {
        padding: 2rem 0;
    }
    
    .restaurant-ads .section-title {
        font-size: 1.8rem;
    }
    
    .restaurant-ad-content {
        padding: 1rem;
    }
    
    .feature-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}