@charset "UTF-8";

:root {
    --main-bg: #f9f9f9;
    --text-color: #333333;
    --accent-color: #2c3e50;
    --link-color: #0056b3;
    --white: #ffffff;
    --border-color: #dddddd;
}

body {
    font-family: 'Noto Serif JP', "Yu Mincho", "Hiragino Mincho ProN", serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--main-bg);
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
}

a {
    color: var(--link-color);
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
    opacity: 0.8;
}

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

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

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-title-area {
    padding: 50px 20px 10px;
    text-align: center;
}

.site-title {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.3;
}

.site-subtitle {
    font-size: 1.0rem;
    color: #666;
    margin-top: 8px;
    font-family: sans-serif;
    letter-spacing: 1px;
}

.global-nav {
    background-color: var(--accent-color);
    padding: 10px 0;
}

.global-nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 15px;
}

.nav-toggle {
    display: none;
}

.global-nav ul {
    order: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    flex: 1;
}

.global-nav li {
    display: block;
}

.global-nav a {
    display: block;
    padding: 8px 16px;
    color: var(--white);
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    font-family: sans-serif;
    transition: all 0.2s;
}

.global-nav a:hover {
    background-color: rgba(255,255,255,0.25);
}

.global-nav a.active {
    background-color: var(--white);
    color: var(--accent-color);
    border-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
}

.search-wrapper {
    order: 2;
    position: relative;
    width: 240px;
}

.search-form {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-family: sans-serif;
}

.search-form button {
    padding: 8px 15px;
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    font-family: sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-form button:hover {
    background-color: #d0d0d0;
}

.suggestions-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
    text-align: left;
    z-index: 2000;
    font-family: sans-serif;
}

.suggestions-list li {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.85rem;
}

.suggestions-list li:hover {
    background: #f0f8ff;
    color: var(--link-color);
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.category-hero-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 250px;
    background-color: #333;
}

.category-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.6);
}

.category-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    color: var(--white);
    pointer-events: none;
}

.category-hero-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.category-hero-count {
    font-size: 1.1rem;
    font-weight: normal;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

main {
    padding: 0 0 60px 0;
    min-height: 60vh;
}

.breadcrumb {
    padding: 40px 0 20px 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb li::after {
    content: ">";
    margin: 0 10px;
    color: #ccc;
}

.breadcrumb li:last-child::after {
    content: "";
}

.info-panel {
    background: var(--white);
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.info-panel h2 {
    margin-top: 0;
}

h1.page-title, h2 {
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
    font-size: 1.5rem;
    margin-bottom: 30px;
    margin-top: 0;
    font-weight: bold;
}

.item-count {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.top-category-card {
    position: relative;
    display: block;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #333;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.top-category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.6);
    transition: filter 0.3s ease;
}

.top-category-card:hover .top-category-image {
    filter: brightness(0.4);
}

.top-category-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    color: var(--white);
    z-index: 2;
    pointer-events: none;
}

.top-category-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
}

.top-category-count {
    font-size: 0.95rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    font-family: sans-serif;
}

.archive-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.archive-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
}

.item-image {
    width: 100%;
    height: 200px;
    background-color: #eee;
    object-fit: cover;
}

.item-info {
    padding: 15px;
}

.item-category {
    display: inline-block;
    background-color: #eee;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: sans-serif;
}

.item-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.item-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.detail-image-area, .detail-text-area {
    flex: 1;
    min-width: 300px;
}

.btn-back {
    display: inline-block;
    margin-top: 40px;
    padding: 10px 20px;
    background-color: #eee;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-weight: bold;
    font-family: sans-serif;
}

.btn-back:hover {
    background-color: #ddd;
}

footer {
    background-color: #333;
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    font-family: sans-serif;
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

footer small {
    font-size: 0.8rem;
    color: #aaa;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-image {
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--white);
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ccc;
}

.clickable-image {
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
}

.clickable-image:hover {
    opacity: 0.8;
}

@media (max-width: 768px) { 
    .global-nav-container {
        justify-content: space-between;
        align-items: center;
    } 
    .nav-toggle {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        cursor: pointer;
        flex-shrink: 0;
        order: 1;
    }
    .nav-toggle span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: var(--white);
        border-radius: 2px;
        transition: all 0.3s;
    }
    .nav-toggle span:nth-child(1) { top: 0; }
    .nav-toggle span:nth-child(2) { top: 10px; }
    .nav-toggle span:nth-child(3) { top: 20px; }
    .nav-toggle.open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }
    
    .search-wrapper {
        order: 2;
        flex-grow: 1;
        margin-left: 15px;
        width: auto;
    }
    .global-nav ul {
        order: 3;
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 15px 0 5px;
        gap: 8px;
    }
    .global-nav ul.active {
        display: flex;
    }
    .archive-grid {
        grid-template-columns: 1fr;
    } 
    .detail-layout {
        flex-direction: column;
    } 
    .category-hero-wrapper {
        height: 200px;
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
    }
    .category-hero-title {
        font-size: 1.5rem;
    }
    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 35px;
    }
}
