/*
Theme Name: FitMealStudio
Description: Modern health and weight loss WordPress theme with SEO optimization
Author: FitMealStudio Team
Version: 1.0.0
Text Domain: fitmealstudio
*/

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; }

/* Main Content Container */
.main-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Section Spacing */
section { margin: 40px 0; }
section:first-child { margin-top: 0; }
section:last-child { margin-bottom: 0; }

/* Page Container */
.page-container, .post-container { max-width: 800px; margin: 0 auto; padding: 40px 20px; }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 36px; color: #2c5530; margin-bottom: 15px; }
.section-header p { font-size: 18px; color: #666; max-width: 600px; margin: 0 auto; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e5e5e5; position: sticky; top: 0; z-index: 1000; }
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 24px; font-weight: bold; color: #2c5530; text-decoration: none; }
.main-nav ul { display: flex; list-style: none; gap: 30px; }
.main-nav a { text-decoration: none; color: #333; font-weight: 500; transition: color 0.3s; }
.main-nav a:hover { color: #2c5530; }

/* Mobile Menu */
.mobile-menu-toggle { display: none; flex-direction: column; background: none; border: none; cursor: pointer; padding: 5px; }
.mobile-menu-toggle span { width: 25px; height: 3px; background: #333; margin: 3px 0; transition: 0.3s; }

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex !important; }
    .main-nav { position: absolute; top: 100%; left: 0; width: 100%; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .main-nav.active { max-height: 400px !important; }
    .main-nav ul { flex-direction: column; padding: 20px; gap: 15px; }
    .main-nav li { border-bottom: 1px solid #eee; padding-bottom: 10px; }
}

/* Breadcrumbs */
.breadcrumbs { padding: 15px 20px; background: #f8f9fa; font-size: 14px; }
.breadcrumbs a { color: #2c5530; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Table of Contents */
.table-of-contents { background: #f8f9fa; padding: 20px; margin: 20px 0; border-radius: 8px; }
.table-of-contents h3 { color: #2c5530; margin-bottom: 15px; }
.table-of-contents ul { list-style: none; }
.table-of-contents li { margin: 8px 0; }
.table-of-contents a { color: #333; text-decoration: none; }
.table-of-contents a:hover { color: #2c5530; }

/* Internal Links Box */
.internal-links-box { background: linear-gradient(135deg, #2c5530 0%, #1e3a21 100%); color: white; padding: 30px; margin: 30px 0; border-radius: 10px; }
.internal-links-box h3 { margin-bottom: 20px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.links-grid a { color: white; text-decoration: none; padding: 10px 15px; background: rgba(255,255,255,0.1); border-radius: 5px; transition: background 0.3s; }
.links-grid a:hover { background: rgba(255,255,255,0.2); }

/* Hero Section */
.hero { background: linear-gradient(135deg, #f8fffe 0%, #e8f5e8 100%); padding: 80px 0; text-align: center; }
.hero-content { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.hero h1 { font-size: 48px; font-weight: 700; color: #2c5530; margin-bottom: 20px; }
.hero p { font-size: 20px; color: #666; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-button { background: #2c5530; color: white; padding: 15px 30px; border: none; border-radius: 5px; font-size: 18px; font-weight: 600; text-decoration: none; display: inline-block; transition: background 0.3s; }
.cta-button:hover { background: #1e3a21; }

/* Categories Section */
.categories-section { padding: 60px 0; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.category-card { background: white; border-radius: 10px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); text-align: center; transition: transform 0.3s; }
.category-card:hover { transform: translateY(-5px); }
.category-card h3 { color: #2c5530; margin-bottom: 15px; font-size: 24px; }

/* Blog Section */
.blog-section { padding: 60px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.blog-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-content { padding: 25px; }
.blog-card h3 { color: #2c5530; margin-bottom: 10px; font-size: 20px; }

/* Related Posts */
.related-posts { padding: 60px 0; }
.related-posts h3 { text-align: center; margin-bottom: 40px; color: #2c5530; font-size: 32px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.related-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.3s; }
.related-card:hover { transform: translateY(-5px); }
.related-card img { width: 100%; height: 180px; object-fit: cover; }
.related-card h4 { padding: 20px 20px 10px; color: #2c5530; }
.related-card p { padding: 0 20px; color: #666; }
.related-card .read-more { display: block; padding: 15px 20px; color: #2c5530; text-decoration: none; font-weight: 600; }

/* Newsletter Section */
.newsletter-section { background: #f8f9fa; padding: 60px 0; text-align: center; margin: 60px 0; }
.newsletter-content { max-width: 600px; margin: 0 auto; padding: 0 20px; }
.newsletter-signup h3 { color: #2c5530; margin-bottom: 15px; font-size: 28px; }
.newsletter-signup p { margin-bottom: 30px; color: #666; }
.newsletter-form { display: flex; justify-content: center; gap: 15px; max-width: 400px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 15px; border: 1px solid #ddd; border-radius: 5px; }
.newsletter-form button { background: #2c5530; color: white; padding: 15px 25px; border: none; border-radius: 5px; font-weight: 600; cursor: pointer; }

/* Featured Recipes Section */
.featured-recipes { padding: 60px 0; }
.recipes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.post-title { font-size: 36px; color: #2c5530; margin-bottom: 20px; }
.post-meta { color: #666; margin-bottom: 30px; }
.post-meta span { margin-right: 20px; }
.post-content { font-size: 18px; line-height: 1.8; }
.post-content h2 { color: #2c5530; margin: 30px 0 15px; }
.post-content h3 { color: #2c5530; margin: 25px 0 10px; }

/* Footer */
.site-footer { background: #2c5530; color: white; padding: 60px 0 0; margin-top: 60px; }
.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-column h4 { margin-bottom: 15px; }
.footer-column ul { list-style: none; }
.footer-column li { margin: 8px 0; }
.footer-column a { color: #ccc; text-decoration: none; }
.footer-column a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #444; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 18px; }
    .main-nav ul { flex-direction: column; gap: 15px; }
    .newsletter-form { flex-direction: column; }
    .post-title { font-size: 28px; }
}

/* Footer Styles */
.site-footer { 
    background: linear-gradient(135deg, #2c5530 0%, #1e3a21 100%); 
    color: white; 
    padding: 60px 20px 0; 
    margin-top: 60px;
}

.footer-content { 
    max-width: 1200px; 
    margin: 0 auto; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px; 
    margin-bottom: 50px; 
}

.footer-column h4 { 
    color: #fff; 
    margin-bottom: 20px; 
    font-size: 18px; 
    font-weight: 600;
    border-bottom: 2px solid #4a7c59;
    padding-bottom: 10px;
}

.footer-column ul { 
    list-style: none; 
    padding: 0;
}

.footer-column li { 
    margin: 12px 0; 
}

.footer-column a { 
    color: #ccc; 
    text-decoration: none; 
    transition: color 0.3s, padding-left 0.3s;
    display: block;
    padding: 5px 0;
}

.footer-column a:hover { 
    color: #fff; 
    padding-left: 10px;
}

.footer-column p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    font-size: 24px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    padding-left: 8px;
}

/* Footer Newsletter */
.footer-newsletter {
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 40px;
}

.footer-newsletter h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 24px;
}

.footer-newsletter p {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 16px;
}

.footer-newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 15px;
}

.footer-newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.footer-newsletter-form button {
    background: #ff6b35;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.footer-newsletter-form button:hover {
    background: #e55a2b;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid #4a7c59;
    padding: 30px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    text-align: right;
}

.copyright p {
    color: #999;
    font-size: 14px;
    margin: 5px 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-newsletter-form {
        flex-direction: column;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .copyright {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    margin-bottom: 60px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s ease-in-out;
    color: white;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-100%);
}

.slide-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.slide h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slide p {
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.95;
}

.slide-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: rgba(255,255,255,0.9);
    color: #333;
}

.btn-primary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.8);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.slide-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat .number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat .label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slide-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 400px;
}

.image-placeholder {
    font-size: 120px;
    opacity: 0.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: white;
    border-color: white;
}

.nav-dot:hover {
    border-color: white;
    transform: scale(1.2);
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.slider-arrow:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 30px;
}

.slider-arrow.next {
    right: 30px;
}

/* Slide Backgrounds */
.slide[data-bg] {
    background: var(--slide-bg);
}

/* Auto-play indicator */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    z-index: 1;
}

.slide.active::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.8) 100%);
    animation: slideProgress 5s linear;
}

@keyframes slideProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* Responsive Slider */
@media (max-width: 768px) {
    .hero-slider {
        height: 500px;
    }
    
    .slide {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    
    .slide h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .slide p {
        font-size: 18px;
        margin-bottom: 25px;
    }
    
    .slide-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .slide-stats {
        justify-content: center;
        gap: 30px;
    }
    
    .slide-image {
        margin-top: 20px;
    }
    
    .image-placeholder {
        font-size: 80px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .slider-arrow.prev {
        left: 15px;
    }
    
    .slider-arrow.next {
        right: 15px;
    }
}


/* Image Optimization Styles */
img {
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Recipe card images */
.recipe-card img, .blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f9fa;
}

/* Category icons as image placeholders */
.category-icon {
    font-size: 48px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Recipe image placeholders */
.recipe-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin-bottom: 15px;
}

/* Responsive images */
@media (max-width: 768px) {
    .recipe-image, .recipe-card img, .blog-card img {
        height: 150px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
}

/* WebP support indicator */
.webp-supported img {
    filter: brightness(1.05);
}

/* Image loading states */
.image-loading {
    opacity: 0.7;
    filter: blur(2px);
}

.image-loaded {
    opacity: 1;
    filter: none;
}
