/*
Theme Name: NewinJapanAI Modern Magazine
Theme URI: https://newinjapanai.com
Author: NewinJapanAI Team
Author URI: https://newinjapanai.com
Description: A modern magazine-style theme for showcasing Japanese products to international audiences. Features category-focused design, responsive grid layouts, and optimized for SEO.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newinjapanai
Tags: blog, news, magazine, grid-layout, custom-colors, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
*/

/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --primary-color: #2D3748;
  --secondary-color: #4A5568;
  --accent-color: #667EEA;
  --text-color: #1A202C;
  --text-light: #718096;
  --bg-color: #FFFFFF;
  --bg-light: #F7FAFC;
  --border-color: #E2E8F0;

  /* Category Colors */
  --cat-sanrio: #FF69B4;
  --cat-food: #FF8C42;
  --cat-tech: #4A90E2;
  --cat-anime: #9B59B6;
  --cat-fashion: #E91E63;
  --cat-traditional: #27AE60;

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Breakpoints */
  --bp-mobile: 768px;
  --bp-tablet: 1024px;
  --bp-desktop: 1280px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.12);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
}

/* ===== Layout ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===== Header ===== */
.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
}

.site-branding {
  flex: 0 0 auto;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.site-description {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== Navigation ===== */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: var(--secondary-color);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.main-navigation a:hover {
  color: var(--accent-color);
  background: var(--bg-light);
}

/* ===== Hero Section ===== */
.hero-section {
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  color: white;
  padding: var(--spacing-2xl) 0;
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.hero-title {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: white;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: var(--spacing-lg);
}

.hero-cta {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: white;
  color: var(--accent-color);
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== Category Filter ===== */
.category-filter {
  background: var(--bg-light);
  padding: var(--spacing-md) 0;
  margin-bottom: var(--spacing-xl);
  border-radius: var(--radius-lg);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-item {
  display: inline-block;
}

.category-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-link.cat-sanrio { border-color: var(--cat-sanrio); color: var(--cat-sanrio); }
.category-link.cat-food { border-color: var(--cat-food); color: var(--cat-food); }
.category-link.cat-tech { border-color: var(--cat-tech); color: var(--cat-tech); }
.category-link.cat-anime { border-color: var(--cat-anime); color: var(--cat-anime); }
.category-link.cat-fashion { border-color: var(--cat-fashion); color: var(--cat-fashion); }
.category-link.cat-traditional { border-color: var(--cat-traditional); color: var(--cat-traditional); }

/* ===== Post Grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.post-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.post-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-light);
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-category-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-content {
  padding: var(--spacing-md);
}

.post-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.post-title a {
  color: var(--primary-color);
}

.post-excerpt {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--text-light);
}

.post-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ===== Category Section ===== */
.category-section {
  margin-bottom: var(--spacing-2xl);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 3px solid var(--border-color);
}

.category-title {
  font-size: 2rem;
  margin: 0;
}

.category-view-all {
  font-weight: 600;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  background: var(--bg-light);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-2xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  color: white;
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

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

  .main-navigation ul {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .category-list {
    gap: var(--spacing-xs);
  }

  .category-link {
    font-size: 0.875rem;
    padding: 0.5rem var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .header-container {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .main-navigation {
    width: 100%;
  }

  .main-navigation ul {
    width: 100%;
    justify-content: center;
  }
}
