📁 last Posts

9 High-Protein Intermittent Fasting Meals to Keep Muscle

High-Protein Intermittent Fasting Meals help you keep muscle while you eat in a shorter window. Aim for roughly 20 to 40 grams of protein per meal. Here are nine meals from trusted recipe developers, each with 21 to 42 grams of protein per serving.

When I moved to a shorter eating window, my first mistake was a light, low-protein first meal. I was hungry again within two hours and my lifting felt flat. Building every meal around a protein source fixed it, and these nine are the ones I keep rotating.

Table with high-protein intermittent fasting meals: chicken, salmon, egg bake and turkey chili

High-Protein Intermittent Fasting Meals at a Glance

Use this table to pick a meal by protein, time or the slot in your eating window where it fits best. The slot suggestions are mine, not the sources'.

#RecipeTimeProtein per servingBest slot
1Cottage Cheese Egg Bake40 min21 gFirst meal
2Chopped Mediterranean Salad with Chicken40 min29 gMid-window lunch
3Healthy Chicken Parmesan25 min42 gLast meal
4Egg Roll in a Bowl30 min32 gAny meal
5Veggie Loaded Turkey Chili40 min33 gLast meal or meal prep
6Greek Chicken Meatball Bowls40 min32 gMid-window lunch
7Sheet Pan Baked Salmon with Vegetables45 min31 gLast meal
8Sheet Pan Mediterranean Chicken and Veggies45-50 min35 gLast meal
9Whipped Feta Veggie Bowls50 min28 gVegetarian meal

9 High-Protein Intermittent Fasting Meals You Can Cook at Home

Each recipe links to the original cook's page. Times, servings, calories and protein come from the source, and I show calories only when the source gives them. Where an ingredient might hide added sugar, the tip flags it.

1. Cottage Cheese Egg Bake (40 Minutes)

Baked cottage cheese egg bake with spinach cut into squares in a square baking dish

Eight eggs, cottage cheese, Parmesan, spinach and onion get whisked together and baked in a 9x9 dish. It sets in about 30 minutes, cuts into tidy squares, and makes an easy first meal when your eating window opens. Leftovers reheat well.

⏱ Total: 40 min 🍽 Serves: 4 🔥 248 kcal per serving (source estimate) 💪 21 g protein (source estimate)

Ingredients

  • Nonstick cooking spray
  • 8 eggs
  • 1/4 tsp garlic powder
  • 1/4 tsp fine salt
  • 1/4 tsp black pepper
  • 3/4 cup 2% or full-fat cottage cheese
  • 1/2 cup shredded or shaved Parmesan cheese
  • 3 cups roughly chopped fresh spinach
  • 1/2 cup finely diced yellow onion or green onions

Instructions

  1. Heat the oven to 375°F and spray a 9x9-inch baking dish.
  2. Whisk the eggs with the garlic powder, salt and pepper, then stir in the cottage cheese, Parmesan, spinach and onion.
  3. Pour the mixture into the dish and bake for 30 to 35 minutes, until the center is set.
  4. Cut into four portions. Refrigerate leftovers, covered, for up to 3 days and reheat in a skillet or the microwave.

Tip: Label check: cottage cheese brands differ, so pick one without added sugar or starches. The source lists no sweetened ingredients.

Recipe source: The Real Food Dietitians, by Stacie Hassing

2. Chopped Mediterranean Salad with Chicken (40 Minutes)

Large bowl of chopped Mediterranean salad with chicken, chickpeas, quinoa, feta and olives

Shredded chicken, quinoa and chickpeas sit in a bowl with peppers, tomatoes, cucumber, feta and olives, all tossed in a red wine vinaigrette. It serves six, so it works for meal prep, and the quinoa and chickpeas keep you full through a long evening.

⏱ Total: 40 min 🍽 Serves: 6 🔥 438 kcal per 1 2/3 cup serving (source estimate) 💪 29 g protein (source estimate)

Ingredients

  • 3 cups (12 oz) chopped spring mix, spinach or romaine
  • 3 cups (16 oz) shredded or chopped cooked chicken breast
  • 1 1/2 cups cooked quinoa (from a scant 1/2 cup dry)
  • 1 can (15 oz) low-sodium chickpeas, drained and rinsed
  • 1 medium orange or yellow pepper, diced
  • 1 cup halved cherry or grape tomatoes
  • 1/2 small English cucumber, cut into half moons
  • 1 cup (4 oz) crumbled feta (omit for dairy-free)
  • 3/4 cup kalamata olives, halved
  • 1/2 small red onion, thinly sliced
  • Optional: hummus, roasted chickpeas, parsley or mint
  • Vinaigrette: 1/4 cup extra-virgin olive oil
  • Vinaigrette: 1/4 cup red wine vinegar
  • Vinaigrette: 2 tsp Dijon mustard
  • Vinaigrette: 2 tsp pure honey
  • Vinaigrette: 1 garlic clove, minced
  • Vinaigrette: 1/4 tsp fine salt
  • Vinaigrette: 1/4 tsp dried oregano
  • Vinaigrette: 1/8 tsp black pepper

Instructions

  1. Put the greens, chicken, quinoa, chickpeas, pepper, tomatoes, cucumber, feta, olives and red onion in a large bowl.
  2. Shake or whisk all the vinaigrette ingredients together in a jar or small bowl.
  3. Pour the dressing over the salad and toss until everything is coated.
  4. Top each serving with hummus, roasted chickpeas or fresh herbs if you like.

Tip: Sugar flag: the vinaigrette contains 2 tsp honey (about 1/3 tsp per serving), and the source lists 9 g sugar per serving. Leave it out if you want zero added sugar. Also check the label on Dijon and jarred olives.

Recipe source: The Real Food Dietitians, by Jessie Shafer

3. Healthy Chicken Parmesan (25 Minutes)

Skillet chicken Parmesan with melted mozzarella, marinara and fresh basil

Thin chicken breasts get a light flour coating, a quick pan sear, then marinara and two cheeses under a lid. It is the highest-protein recipe in this list at 42 grams a serving and takes only 25 minutes. Serve it over spaghetti squash or zucchini noodles.

⏱ Total: 25 min 🍽 Serves: 4 🔥 367 kcal per serving (source estimate) 💪 42 g protein (source estimate)

Ingredients

  • 1 tbsp olive oil or avocado oil
  • 2 tbsp flour (the author used a gluten-free 1:1 baking flour)
  • 1/4 tsp garlic powder
  • 1/4 tsp fine salt
  • Pinch of black pepper
  • 1 lb boneless, skinless chicken breasts, cut into 4 pieces and pounded to about 1/2 inch thick
  • Cooking spray
  • 1 jar (24 oz) tomato basil marinara sauce (the author used Primal Kitchen)
  • 1/2 cup shredded mozzarella (2 oz)
  • 1/4 cup shredded Parmesan (1 oz)
  • Fresh basil, thinly sliced
  • Optional: spaghetti squash, cooked pasta or zucchini noodles, to serve

Instructions

  1. Heat the oil in a large skillet over medium-high heat. Mix the flour, salt, garlic powder and pepper in a shallow dish and coat each chicken piece.
  2. Mist the chicken with cooking spray and cook about 4 minutes per side, until golden and nearly cooked through.
  3. Pour the marinara around the chicken, lifting each piece slightly so sauce runs underneath.
  4. Sprinkle on the mozzarella and Parmesan, lower the heat to medium, cover, and cook about 5 minutes until the sauce is hot and the chicken is done.
  5. Garnish with basil and serve over spaghetti squash or pasta. Leftovers keep up to 3 days in the fridge.

Tip: Sugar flag: jarred marinara is a packaged sauce. The source says its brand has no added sugar but still lists 15 g sugar per serving, so compare labels and choose one with no added sugar.

Recipe source: The Real Food Dietitians, by Jessica Beacom

4. Egg Roll in a Bowl (30 Minutes)

Skillet of egg roll in a bowl with ground chicken, broccoli slaw and sliced green onions

All the flavor of an egg roll filling without the wrapper. Ground chicken or turkey cooks with garlic, ginger and green onions, then crisp-tender slaw goes in with a coconut aminos and sesame sauce. One skillet, 30 minutes, and 32 grams of protein a serving.

⏱ Total: 30 min 🍽 Serves: 4 🔥 263 kcal per 2 cup serving (source estimate) 💪 32 g protein (source estimate)

Ingredients

  • 1/2 cup coconut aminos
  • 2 tbsp toasted sesame oil
  • 2 tbsp rice vinegar
  • 5 garlic cloves, minced
  • 1 tbsp grated fresh ginger (or 1 tsp ground)
  • 1/2 tsp Chinese 5-spice powder
  • 1 to 2 tsp avocado, coconut or olive oil
  • 8 green onions, sliced (white and green parts separated)
  • 1 lb lean ground chicken or turkey
  • 2 bags (12 oz each) broccoli slaw or coleslaw mix
  • Optional: black sesame seeds, sriracha, avocado, cilantro

Instructions

  1. Whisk the coconut aminos, sesame oil, rice vinegar, garlic, ginger and 5-spice in a small bowl.
  2. Warm the oil in a large skillet over medium heat and cook the white and light green onion parts for 2 to 3 minutes.
  3. Add the ground chicken, break it up, and cook 5 to 6 minutes until no pink remains.
  4. Turn the heat to medium-high, add the slaw and the sauce, and cook 6 to 7 minutes until crisp-tender.
  5. Stir in the dark green onion, take the pan off the heat, and serve in bowls with any toppings.

Tip: Sugar flag: coconut aminos is a packaged sauce, and the source lists 11 g sugar per serving without saying where it comes from. Compare brands, and check the sriracha label if you add it.

Recipe source: The Real Food Dietitians, by Jessica Beacom

5. Veggie Loaded Turkey Chili (40 Minutes)

Pot of turkey chili with beans, corn and vegetables topped with avocado and cilantro

Lean ground turkey, black beans, corn, zucchini, carrot and bell pepper simmer in a chili powder and cumin tomato base. It takes 40 minutes on the stove, or you can use a slow cooker. A bowl gives you 33 grams of protein and plenty of fiber.

⏱ Total: 40 min 🍽 Serves: 4 🔥 435 kcal per 2 cup serving (source estimate) 💪 33 g protein (source estimate)

Ingredients

  • 1 tbsp olive or avocado oil
  • 1 lb lean ground turkey, beef or chicken
  • 2 large garlic cloves, minced
  • 1/2 medium onion, diced
  • 1 red bell pepper, diced
  • 1 zucchini or yellow squash, diced
  • 1 medium carrot, diced
  • 2 tbsp chili powder
  • 1 tbsp ground cumin
  • 1 can (15 oz) tomato sauce
  • 1 can (15 oz) crushed or petite diced tomatoes
  • 1 can (15 oz) black beans, rinsed and drained
  • 1 cup frozen corn
  • 8 oz water or broth
  • Dash of cayenne (optional)
  • Salt and black pepper
  • Optional toppings: avocado, cilantro, shredded cheese, Greek yogurt or sour cream, lime

Instructions

  1. Heat the oil in a large pot or Dutch oven over medium heat.
  2. Add the meat, garlic, onion, pepper, zucchini and carrot and cook 7 to 9 minutes, until the meat is cooked through.
  3. Stir in the chili powder, cumin, tomato sauce, crushed tomatoes, beans, corn and water or broth, then bring to a boil.
  4. Turn the heat to low, cover, and simmer 15 minutes, until the carrots are tender.
  5. Ladle into bowls and add your toppings. For a slow cooker, cook on low 8 hours or high 4 hours after the first steps.

Tip: Sugar flag: canned tomato sauce, crushed tomatoes and broth are packaged items, so read the labels for added sugar. The source lists none in the recipe itself.

Recipe source: The Real Food Dietitians, by Stacie Hassing

6. Greek Chicken Meatball Bowls (40 Minutes)

Greek chicken meatball bowl with rice, cucumber tomato salad, feta and tzatziki

Chicken meatballs with dill, lemon zest and oregano sit on rice and a cucumber, tomato and olive salad, finished with feta and tzatziki. You can cook the meatballs in an air fryer, skillet or oven. Each bowl delivers 32 grams of protein.

⏱ Total: 40 min 🍽 Serves: 4 🔥 404 kcal per bowl (source estimate) 💪 32 g protein (source estimate)

Ingredients

  • Meatballs: 1 lb ground chicken
  • Meatballs: 3 tbsp minced red onion
  • Meatballs: 2 garlic cloves, finely minced
  • Meatballs: 2 tsp lemon zest
  • Meatballs: 1 tbsp fresh dill (or 3/4 tsp dried)
  • Meatballs: 1/2 tsp dried oregano
  • Meatballs: 1/2 tsp fine salt
  • Meatballs: 1/4 tsp black pepper
  • Bowls: 1 cup thinly sliced mini cucumbers
  • Bowls: 1 cup grape tomatoes, halved
  • Bowls: 1/4 cup diced red onion
  • Bowls: 1/3 cup sliced kalamata olives
  • Bowls: 1 1/2 tbsp chopped fresh mint
  • Bowls: 2 tsp extra-virgin olive oil
  • Bowls: 2 tsp red wine vinegar
  • Bowls: 1/4 tsp salt and a pinch of pepper
  • Bowls: 4 handfuls chopped romaine
  • Bowls: 3 cups cooked rice (orzo or cauliflower rice also work)
  • Bowls: 1/3 cup crumbled feta
  • Bowls: 1/2 cup tzatziki
  • Bowls: 1 lemon, cut into wedges

Instructions

  1. Mix the meatball ingredients in a bowl and roll the mixture into 16 balls with damp hands.
  2. Cook the meatballs to 165°F: air fry at 400°F for 7 to 8 minutes, pan-cook 5 to 7 minutes per side, or bake at 400°F for 12 to 16 minutes.
  3. While they cook, toss the cucumbers, tomatoes, red onion, olives and mint with the oil, vinegar, salt and pepper.
  4. Build each bowl with lettuce, 3/4 cup rice, a scoop of the vegetable salad and 4 meatballs.
  5. Top with feta and 2 tbsp tzatziki and serve with lemon wedges.

Tip: Sugar flag: store-bought tzatziki varies by brand, so pick one with no added sugar or make your own. The source's brand claims no added sugar and lists 4 g sugar per serving.

Recipe source: The Real Food Dietitians, by Jessie Shafer

7. Sheet Pan Baked Salmon with Vegetables (45 Minutes)

Sheet pan with baked salmon, sweet potato rounds, green beans and lemon slices

Salmon, thin sweet potato rounds and green beans share one parchment-lined pan, all coated in a lemon, garlic and dill marinade. The potatoes go in first so everything finishes together. Most of the 45 minutes is simple hands-off oven time.

⏱ Total: 45 min 🍽 Serves: 4 🔥 365 kcal per serving (source estimate) 💪 31 g protein (source estimate)

Ingredients

  • 3 tbsp avocado or olive oil
  • Juice of 1 medium lemon (about 1/4 cup)
  • 2 garlic cloves, finely minced
  • 1 tbsp fresh dill (or 1/2 tsp dried)
  • 1/2 tsp fine salt
  • 1/4 tsp black pepper
  • 1 1/4 lb salmon fillets
  • 1 lb sweet potato, thinly sliced
  • 12 oz fresh green beans, trimmed
  • 1/2 small red onion, thinly sliced
  • 1/2 lemon, thinly sliced

Instructions

  1. Heat the oven to 425°F and line a large rimmed baking sheet with parchment.
  2. Whisk the oil, lemon juice, garlic, dill, salt and pepper. Set 2 tbsp aside, and marinate the salmon in half of what is left while you prep the vegetables.
  3. Toss the sweet potato slices (about 1/8 inch thick) in the remaining marinade, spread them on the pan, and bake 10 minutes.
  4. Push the potatoes to one side, add the green beans and onion tossed with the reserved 2 tbsp, and bake 5 minutes more.
  5. Make room in the center, add the salmon, top with lemon slices, and bake 10 to 15 minutes, until it flakes easily.

Tip: Sweet potato brings natural sugar (the source lists 5 g per serving) but no added sweeteners. The source lists no packaged sauces.

Recipe source: The Real Food Dietitians, by Jessica Beacom

8. Sheet Pan Mediterranean Chicken and Veggies (45 Minutes)

Sheet pan of roasted Mediterranean chicken thighs with cauliflower, zucchini, olives and lemon

Chicken thighs roast on a sheet pan with cauliflower, zucchini, peppers, tomatoes and lemon, then get finished with olives, feta and a quick tahini-lemon sauce over greens. It is a hearty last meal of the day with 35 grams of protein.

⏱ Total: 45-50 min 🍽 Serves: 4 🔥 476 kcal per serving (source estimate) 💪 35 g protein (source estimate)

Ingredients

  • About 1 1/2 lb boneless, skinless chicken thighs
  • 16 oz cauliflower florets
  • 2 small zucchini, cut into half moons
  • 1 medium red onion, thinly sliced
  • 1 medium bell pepper, thinly sliced
  • 6 oz grape tomatoes
  • 3 garlic cloves, minced
  • 2 medium lemons, halved
  • 2 tsp dried oregano
  • 1 tsp dried basil
  • 1/2 tsp garlic powder
  • 1/2 tsp onion powder
  • 1/2 tsp fine salt
  • 1/4 tsp black pepper
  • 2 tbsp olive or avocado oil, divided
  • 1/4 cup pitted kalamata olives, halved
  • 2 oz crumbled feta (optional)
  • 5 oz spinach or arugula, to serve
  • Chopped parsley (optional)
  • Sauce: 1/4 cup tahini
  • Sauce: 1/4 cup warm water
  • Sauce: juice of 1/2 lemon
  • Sauce: salt, to taste

Instructions

  1. Heat the oven to 425°F and line a large rimmed baking sheet with parchment.
  2. Stir the juice of 1/2 lemon, oregano, basil, garlic powder, onion powder, salt, pepper and 1 tbsp oil together.
  3. Spread the vegetables and garlic on the pan, toss with half the herb mixture, then lay the chicken on top and coat it with the rest.
  4. Tuck the lemon halves in cut side up, drizzle with the remaining 1 tbsp oil, and roast 25 to 30 minutes, until the chicken reaches 165°F.
  5. Whisk the tahini, warm water, lemon juice and salt into a sauce.
  6. Scatter the olives, feta and parsley over the pan and serve over greens with the tahini sauce.

Tip: Label check: kalamata olives and tahini are packaged, so look for brands with no added sugar. The source lists 7 g sugar per serving, mostly from the vegetables.

Recipe source: The Real Food Dietitians, by Jessica Beacom

9. Whipped Feta Veggie Bowls (50 Minutes)

Bowl of roasted butternut squash, broccoli, cauliflower and chickpeas over whipped feta

Butternut squash, broccoli, cauliflower and chickpeas roast together on one pan while feta and Greek yogurt are blended into a smooth whipped spread. A vegetarian way to reach 28 grams of protein. Add quinoa, farro or rice if you want more.

⏱ Total: 50 min 🍽 Serves: 4 🔥 581 kcal as listed on the source card (source estimate) 💪 28 g protein (source estimate)

Ingredients

  • 4 cups butternut squash, peeled and cut into 1-inch cubes
  • 1 large head broccoli, cut into florets
  • 1 small head cauliflower, cut into florets
  • 1/2 medium red onion, cut into wedges
  • 2 cans (15 oz each) chickpeas, drained, rinsed and patted dry
  • 3 tbsp olive oil
  • 1 tsp salt
  • 1/2 tsp black pepper
  • 1/2 tsp garlic powder
  • 1/2 tsp smoked paprika (optional)
  • Whipped feta: 6 oz feta, crumbled
  • Whipped feta: 1 cup plain Greek yogurt
  • Whipped feta: 1 tbsp olive oil
  • Whipped feta: 1 tbsp lemon juice
  • Whipped feta: black pepper, to taste
  • Optional: cooked quinoa, farro or rice, and fresh parsley or dill

Instructions

  1. Heat the oven to 425°F. Toss the squash, broccoli, cauliflower, onion and chickpeas with the oil and spices and spread them in an even layer.
  2. Roast 30 to 35 minutes, flipping once halfway, until tender and the chickpeas are lightly crisp.
  3. While the vegetables roast, blend the feta, Greek yogurt, olive oil, lemon juice and pepper in a food processor until smooth.
  4. Divide the vegetables and chickpeas among four bowls, add a spoonful of whipped feta to each, and finish with herbs or lemon.

Tip: Sugar flag: use plain, unsweetened Greek yogurt, since flavored tubs add sugar. The source lists 14 g sugar per serving, which it ties to the squash and onion. Its calorie and protein figures are not labeled per serving.

Recipe source: Food with Feeling, by Brita Britnell

How Much Protein Do You Need on Intermittent Fasting?

The International Society of Sports Nutrition suggests 1.4 to 2.0 grams of protein per kilogram of body weight daily for most people who exercise. Per meal, it recommends about 0.25 g per kg, or 20 to 40 grams, ideally spread across the day.

  • Daily target: 1.4 to 2.0 g per kg of body weight.
  • Per meal: about 20 to 40 g of quality protein.
  • Eating window: two or three protein-rich meals instead of one huge one.
  • Strength training: keep it up, since protein alone does not hold muscle.

Intermittent fasting is not right for everyone. If you are pregnant, have diabetes, take medication or have a history of disordered eating, talk to your doctor first.

How to Build a Muscle-Friendly Eating Window

A 16:8 window of noon to 8 p.m. leaves room for three protein-focused meals. Here is a sample day using these recipes. It is my own suggestion, so adjust the times and portions to your body weight and goals.

  • 12:00 p.m., first meal: Cottage Cheese Egg Bake (recipe 1), 21 g protein.
  • 3:30 p.m., second meal: Greek Chicken Meatball Bowls (recipe 6), 32 g protein.
  • 7:30 p.m., last meal: Sheet Pan Baked Salmon with Vegetables (recipe 7), 31 g protein.

That adds up to about 84 grams from three meals. Add a Greek yogurt or a protein shake if your daily target is higher.

Hidden Sugar Check for Your Fasting Meals

Only one recipe here uses honey. Several use packaged items, though, and labels vary widely by brand. Check these before you cook:

  • Honey (recipe 2): 2 tsp in the vinaigrette. Skip it for zero added sugar.
  • Jarred marinara (recipe 3): choose one with no added sugar.
  • Coconut aminos (recipe 4): compare brands, since the source lists 11 g sugar per serving.
  • Canned tomato products, beans and broth (recipe 5): read the sugar line.
  • Store-bought tzatziki (recipe 6): pick one with no added sugar.
  • Greek yogurt (recipe 9): plain and unsweetened only.
Infographic: where hidden sugar shows up in high-protein meals

High-Protein Intermittent Fasting Meals: Frequently Asked Questions

How much protein should I eat per meal while fasting?

The International Society of Sports Nutrition suggests about 0.25 g per kg of body weight, or 20 to 40 grams, per meal. All nine recipes here provide between 21 and 42 grams per serving, according to their sources.

How many meals should I eat in my eating window?

Two or three protein-rich meals work well for most people. The ISSN advises spreading protein evenly across the day, roughly every 3 to 4 hours, so a window of 8 hours or more fits two to three meals.

What should I eat first to break a fast?

Start with a protein-rich meal that is easy to digest, such as the Cottage Cheese Egg Bake. There is no single rule, so choose what feels good and keeps you full.

Can I meal prep these recipes?

Yes, with limits. The sources say the egg bake and the chicken Parmesan keep up to 3 days in the fridge. For the other recipes, check the original page for storage advice.

Does intermittent fasting cause muscle loss?

Not necessarily. Enough total protein and regular strength training matter most for keeping muscle, according to sports nutrition guidance. If you have a medical condition, ask your doctor or a dietitian before changing how you eat.

Final Thoughts

Good fasting meals do two jobs: they feel satisfying and they deliver real protein. Pick two or three of these, cook them on a Sunday, and see how your training feels after a week. If you try one, tell me in the comments which it was.

Jack Atles
Jack Atles
Hi! I'm Jack Atles, and I'm passionate about helping others build healthy habits that last a lifetime. Drawing from my experience as a Fitness Coch & Exercise Physiologist, I write for "Fitness Maker Blog" to share science-backed strategies to boost your fitness, energy, and overall well-being. Start your journey today by checking out Our Blog Posts Here.



// Blog CTA Close Functionality document.addEventListener('DOMContentLoaded', function() { // Check if CTA box exists on the page const ctaBox = document.querySelector('.blog-cta-box'); const ctaCloseBtn = document.querySelector('.cta-close'); if (ctaCloseBtn && ctaBox) { ctaCloseBtn.addEventListener('click', function() { ctaBox.style.opacity = '0'; ctaBox.style.transform = 'translateY(-20px)'; setTimeout(function() { ctaBox.style.display = 'none'; }, 300); }); } // Optional: Local storage to show CTA less frequently const ctaDismissed = localStorage.getItem('blogCtaDismissed'); if (ctaDismissed && ctaBox) { // If dismissed in last 7 days, don't show const dismissTime = parseInt(ctaDismissed); const oneWeek = 7 * 24 * 60 * 60 * 1000; if (Date.now() - dismissTime < oneWeek) { ctaBox.style.display = 'none'; } } // Update local storage when closed if (ctaCloseBtn) { ctaCloseBtn.addEventListener('click', function() { localStorage.setItem('blogCtaDismissed', Date.now().toString()); }); } });