/* Custom Styles for Keto Recipes Made Easy */

* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Recipe Card Styles */
.recipe-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Nutrition Badge */
.nutrition-badge {
    background: linear-gradient(135deg, #2D5016 0%, #7CB342 100%);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: inline-block;
}

/* Category Badge */
.category-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-breakfast {
    background: linear-gradient(135deg, #FFA726 0%, #FB8C00 100%);
    color: white;
}

.category-lunch {
    background: linear-gradient(135deg, #7CB342 0%, #558B2F 100%);
    color: white;
}

.category-dinner {
    background: linear-gradient(135deg, #EF5350 0%, #C62828 100%);
    color: white;
}

.category-snacks {
    background: linear-gradient(135deg, #42A5F5 0%, #1976D2 100%);
    color: white;
}

.category-desserts {
    background: linear-gradient(135deg, #AB47BC 0%, #7B1FA2 100%);
    color: white;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2D5016;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

.toast.success {
    border-left: 4px solid #7CB342;
}

.toast.error {
    border-left: 4px solid #EF5350;
}

/* Search Highlight */
.search-highlight {
    background-color: #FFF176;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Recipe Image Overlay */
.recipe-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recipe-card:hover .recipe-image-overlay {
    opacity: 1;
}

/* Macro Stats */
.macro-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #F5F5F5;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.macro-stat:hover {
    background: #E8F5E9;
    transform: scale(1.05);
}

.macro-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2D5016;
}

.macro-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Recipe Difficulty Badge */
.difficulty-easy {
    color: #7CB342;
}

.difficulty-medium {
    color: #FFA726;
}

.difficulty-hard {
    color: #EF5350;
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #7CB342;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #558B2F;
}

/* Image Lazy Loading Blur Effect */
.lazy-image {
    filter: blur(10px);
    transition: filter 0.3s;
}

.lazy-image.loaded {
    filter: blur(0);
}

/* Newsletter Success Message */
.newsletter-success {
    display: none;
    background: #E8F5E9;
    color: #2D5016;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Share Buttons */
.share-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-button:hover {
    transform: scale(1.1);
}

.share-facebook {
    background: #1877F2;
    color: white;
}

.share-twitter {
    background: #1DA1F2;
    color: white;
}

.share-pinterest {
    background: #E60023;
    color: white;
}

.share-whatsapp {
    background: #25D366;
    color: white;
}

/* Ingredient Checkbox */
.ingredient-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #7CB342;
}

.ingredient-item label {
    cursor: pointer;
    user-select: none;
}

.ingredient-item input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Recipe Rating Stars */
.rating-stars {
    color: #FFA726;
}

/* Sticky Newsletter Bar */
.sticky-newsletter {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2D5016 0%, #7CB342 100%);
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-newsletter.show {
    transform: translateY(0);
}

/* Ad Container Styling */
.ad-container {
    background: #F5F5F5;
    border: 2px dashed #DDD;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
