/* Meal Plan Page Styles */

/* Meal Plan Count */
.meal-plan-count-container {
    text-align: center;
    margin: 2rem 0 1rem;
}

.meal-plan-count {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 3rem 0 2rem;
}

.load-more-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    min-width: 200px;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

/* Hero Section */
.meal-plan-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));
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 1.5rem;
    color: #4CAF50;
}

.feature span {
    font-weight: 500;
    color: #2E7D32;
}

/* Advertisement */
.advertisement {
    padding: 3rem 0;
    background: #f8f9fa;
}

.ad-banner {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ad-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #4CAF50;
}

.ad-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 2rem;
}

.ad-content h3 {
    color: #2E7D32;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.ad-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.ad-cta {
    color: #4CAF50;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Meal Plan Categories */
.meal-plan-categories {
    padding: 4rem 0;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    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);
}

/* Meal Plan Grid */
.meal-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

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

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

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

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

.meal-plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.meal-plan-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease;
    image-rendering: auto;
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

.meal-plan-card:hover .meal-plan-image {
    opacity: 0.9;
}

.meal-plan-content {
    padding: 1.5rem;
    position: relative;
}

.meal-plan-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 0.5rem;
}

.meal-plan-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.meal-plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meal-plan-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #666;
    background: #f5f5f5;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.meal-plan-meta i {
    color: #4CAF50;
}

.category {
    background: white !important;
    color: #2E7D32 !important;
    font-weight: 500;
}

.nutrition-highlights {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.nutrition-item {
    font-size: 0.85rem;
    color: #888;
    background: #f9f9f9;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

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

.favorite-btn i {
    font-size: 1.1rem;
}

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

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

/* Meal Plan Builder */
.meal-plan-builder {
    background: white;
    padding: 4rem 0;
}

.builder-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.builder-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.builder-form h3 {
    color: #2E7D32;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.builder-preview {
    padding: 2rem;
}

.builder-preview h3 {
    color: #2E7D32;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.preview-features {
    display: grid;
    gap: 2rem;
}

.preview-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.preview-feature i {
    font-size: 2rem;
    color: #4CAF50;
    margin-top: 0.5rem;
}

.preview-feature h4 {
    color: #2E7D32;
    margin-bottom: 0.5rem;
}

.preview-feature p {
    color: #666;
    line-height: 1.6;
}

/* Success Stories */
.success-stories {
    padding: 4rem 0;
    background: white;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.story-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
}

.story-avatar {
    margin-bottom: 1rem;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4CAF50;
}

.story-content h4 {
    color: #2E7D32;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.story-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.story-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.story-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #4CAF50;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .meal-plan-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;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .feature {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem;
    }
    
    .ad-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .ad-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .meal-plan-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .builder-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .meal-plan-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nutrition-highlights {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .meal-plan-hero {
        padding: 100px 0 60px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .hero-img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    .meal-plan-grid {
        grid-template-columns: 1fr;
    }
    
    .meal-plan-card {
        margin: 0 1rem;
    }
    
    .builder-form,
    .builder-preview {
        padding: 1.5rem;
    }
}

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

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

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

/* Hidden class for filtering */
.meal-plan-card.hidden {
    display: none;
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 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);
    }
}