/* Blog Styles for FoodTech Hub */
:root {
  --primary-color: #ff6b35;
  --secondary-color: #2d3748;
  --accent-color: #ff8c5a;
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --bg-light: #fff5f0;
  --bg-white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-light);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo h1 {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 900px;
  justify-content: center;
}

.nav-menu a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-menu a:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Blog Container - 2 Column Layout */
.blog-container {
  max-width: 1400px;
  margin: 100px auto 40px;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

/* Main Content */
.main-content {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.blog-hero-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.main-content h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.main-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-color);
}

.main-content h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.main-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.main-content ul,
.main-content ol {
  margin: 1.5rem 0 1.5rem 2rem;
  color: var(--text-secondary);
}

.main-content li {
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

.main-content a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
}

.main-content a:hover {
  color: var(--accent-color);
}

.main-content strong {
  color: var(--text-primary);
  font-weight: 700;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  margin: 1rem 0;
  font-weight: 600;
  transition: var(--transition);
}

.external-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.ad-space {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  text-align: center;
}

.ad-space img {
  max-width: 100%;
  height: auto;
}

.toc {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.toc h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 0.6rem;
}

.toc a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: var(--transition);
  text-decoration: none;
}

.toc a:hover {
  background: var(--bg-light);
  color: var(--primary-color);
  padding-left: 1rem;
}

/* Share Links */
.share-links {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--bg-light);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.share-links p {
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.share-twitter,
.share-facebook {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

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

.share-twitter:hover {
  background: #0d8bd9;
  transform: translateY(-2px);
}

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

.share-facebook:hover {
  background: #0e66d4;
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

/* Blog Index Styles */
.blog-index-container {
  max-width: 1200px;
  margin: 100px auto 40px;
  padding: 0 2rem;
}

.blog-index-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--secondary-color);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-date {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.blog-card-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  align-self: flex-start;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .main-content {
    padding: 2rem;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .blog-container {
    margin-top: 80px;
    padding: 0 1rem;
  }

  .main-content {
    padding: 1.5rem;
  }

  .main-content h1 {
    font-size: 1.75rem;
  }

  .main-content h2 {
    font-size: 1.4rem;
  }

  .blog-hero-image {
    max-height: 250px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-index-title {
    font-size: 2rem;
  }
}
