/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c41e3a;
    --secondary-color: #2c5530;
    --accent-color: #f4d03f;
    --text-color: #333;
    --text-light: #666;
    --background-color: #fff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    background: var(--background-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.nav-brand span {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--background-color) 100%);
    padding: 4rem 0;
    display: flex;
    align-items: center;
    min-height: 60vh;
}

.hero-content {
    flex: 1;
    padding: 2rem;
}

.hero-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background: #a01729;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-image {
    flex: 1;
    text-align: center;
    padding: 2rem;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* Featured Section */
.featured-section {
    padding: 4rem 0;
    background: var(--gray-light);
    min-height: 500px; /* Prevent layout shift */
}

.featured-grid {
    min-height: 300px; /* Reserve space during loading */
}

.featured-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

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

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
}

.card-content h3 a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.card-content h3 a:hover {
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.read-time {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
}

.categories-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-card h3 {
    padding: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.category-card p {
    padding: 0 1rem 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* All Posts Section */
.all-posts-section {
    padding: 4rem 0;
    background: var(--gray-light);
    min-height: 600px; /* Prevent layout shift */
}

.all-posts-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.post-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.2rem;
}

.post-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.post-card h3 a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.post-card h3 a:hover {
    color: var(--primary-color);
}

.post-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.post-card .read-time {
    font-size: 0.8rem;
}

.load-more {
    text-align: center;
}

#load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

#load-more-btn:hover {
    background: #a01729;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* About Section */
.about-section {
    padding: 4rem 0;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-color);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* Blog Post Styles */
.post-header {
    background: var(--gray-light);
    padding: 2rem 0;
    text-align: center;
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
    line-height: 1.8;
}

.post-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 2rem 0 1rem;
}

.post-content h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 1.5rem 0 0.8rem;
}

.post-content p {
    margin-bottom: 1.2rem;
    color: var(--text-color);
}

.post-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.post-navigation {
    background: var(--gray-light);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 10px;
    text-align: center;
}

.back-to-home {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.back-to-home:hover {
    background: #a01729;
}

.related-posts {
    background: var(--gray-light);
    padding: 3rem 0;
}

.related-posts h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.related-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.related-card a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stats {
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .featured-section h2,
    .categories-section h2,
    .all-posts-section h2,
    .about-content h2 {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 0 1rem;
    }
}