/*
Theme Name: Yoriai Custom Theme
Theme URI: https://yori-ai.com
Author: Cominka
Author URI: https://cominka.co.jp
Description: Custom theme for yori-ai.com, including yoriaiSEO LP.
Version: 1.0.0
Text Domain: yoriai-theme
*/

:root {
    /* Color Palette - Japanese Modern & Corp Identity (Standard 2026) */
    --color-brand: #229ebd;
    /* Yoriai Blue */
    --color-main: #333333;
    /* Sumi Ink (Corporate Black) */
    --color-base: #F9F9F9;
    /* Paper White */
    --color-accent: #EE4B2B;
    /* Vermilion Red */
    --color-text: #333333;
    /* Sumi Text */
    --color-text-muted: #666666;
    /* Sumi Ink Muted */
    --color-surface: #FFFFFF;

    /* Mapping old variables to new palette for backward compatibility */
    --color-primary: var(--color-brand);
    --color-secondary: var(--color-main);
    --color-text-light: var(--color-text-muted);
    --color-bg: var(--color-base);
    --color-bg-light: #fff;
    --color-border: #EEEEEE;
    --font-base: "LINE Seed JP", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, sans-serif;
    --width-max: 1200px;
}

/* Basic Reset & Typography */
html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    font-family: var(--font-base);
    color: var(--color-text);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* Layout Utilities */
.wrapper {
    width: 100%;
    max-width: var(--width-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Components */
.site-main {
    padding: 0 0 40px;
}

.page-header {
    margin-bottom: 40px;
    text-align: center;
}

.page-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-text);
}

.entry-content {
    margin-bottom: 40px;
}

.entry-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.entry-content h3 {
    font-size: 1.5rem;
    border-left: 5px solid var(--color-primary);
    padding-left: 15px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.entry-content p {
    margin-bottom: 1.5em;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 50%;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Post List (Archive) */
.post-list {
    display: grid;
    gap: 30px;
}

.post-item {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    transition: transform 0.2s;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

/* Button Styles (Global) */
.btn-primary {
    background-color: var(--color-main);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

.btn-secondary {
    background-color: #fff;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 13px 38px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

/* ==========================================================================
   New Content Layout (Sidebar + Main Content)
   ========================================================================== */
.content-layout {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 30px;
}

.content-area {
    width: 100%;
    max-width: 800px;
    /* Adjust based on design preference */
}

/* Sidebar Styles */
.widget-area {
    width: 100%;
    /* Default width for sidebar */
    max-width: 300px;
    flex-shrink: 0;
}

.widget {
    margin-bottom: 40px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.widget ul li a {
    color: var(--color-text);
    display: block;
}

.widget ul li a:hover {
    color: var(--color-primary);
    padding-left: 5px;
    /* Micro interaction */
}

/* Breadcrumbs */
.breadcrumbs {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs li {
    display: inline-block;
}

.breadcrumbs a {
    color: #888;
    text-decoration: underline;
}

.breadcrumbs a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumbs .separator {
    margin: 0 8px;
    font-size: 0.8rem;
}

/* Search Form */
.search-form {
    display: flex;
}

.search-field {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

.search-submit {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Responsive */
@media screen and (max-width: 900px) {
    .content-layout {
        flex-direction: column;
    }

    .content-area {
        max-width: 100%;
    }

    .widget-area {
        max-width: 100%;
    }
}

/* ==========================================================================
   Post Navigation (Single Post)
   ========================================================================== */
.post-navigation {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    min-width: 280px;
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 25px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 80px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.post-navigation a:hover {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(34, 158, 189, 0.15);
    transform: translateY(-2px);
    color: var(--color-brand);
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-text);
}

.post-navigation .nav-previous a {
    align-items: flex-start;
    text-align: left;
}

.post-navigation .nav-previous a::before {
    content: "«";
    display: block;
    font-size: 1.2rem;
    color: var(--color-brand);
    margin-bottom: 5px;
    line-height: 1;
}

.post-navigation .nav-next a {
    align-items: flex-end;
    text-align: right;
}

.post-navigation .nav-next a::after {
    content: "»";
    display: block;
    font-size: 1.2rem;
    color: var(--color-brand);
    margin-top: 5px;
    line-height: 1;
}