/*
Theme Name: Gallery Site
Description: シンプルで大人な雰囲気の画像ギャラリーサイト
Version: 1.0
*/

/* リセット & ベース */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
    line-height: 1.6;
    color: #2c2c2c;
    background-color: #fafafa;
    font-size: 16px;
}

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

/* ヘッダー */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e5e9;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.site-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c2c2c;
    letter-spacing: -0.5px;
}

.site-logo a {
    text-decoration: none;
    color: inherit;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.main-nav a {
    text-decoration: none;
    color: #5a5a5a;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #2c2c2c;
}

/* メインコンテンツ */
.main-content {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

/* ページヘッダー */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 18px;
    color: #7a7a7a;
    margin-bottom: 8px;
}

.image-count {
    display: inline-block;
    background-color: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #5a5a5a;
    font-weight: 500;
}

/* カテゴリーグリッド */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.category-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.category-item.small .category-thumbnail {
    height: 160px;
}

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

.category-item:hover .category-thumbnail img {
    transform: scale(1.05);
}

.category-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8a8a;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 30px 20px 20px;
    color: white;
}

.category-info {
    text-align: left;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.category-item.small .category-name {
    font-size: 16px;
}

.category-count {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

/* 画像グリッド */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 60px;
}

.images-grid.large {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-item:hover {
    transform: scale(1.02);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* セクション */
.recent-images, .related-categories {
    margin: 80px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 40px;
    text-align: center;
}

/* パンくずナビ */
.breadcrumb {
    margin-bottom: 40px;
    font-size: 14px;
    color: #7a7a7a;
}

.breadcrumb a {
    color: #7a7a7a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2c2c2c;
}

.breadcrumb .separator {
    margin: 0 12px;
    opacity: 0.6;
}

.breadcrumb .current {
    color: #2c2c2c;
    font-weight: 500;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    margin: 60px 0;
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #5a5a5a;
    background-color: #fff;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.pagination li a:hover,
.pagination li.current span {
    background-color: #2c2c2c;
    color: #fff;
    border-color: #2c2c2c;
}

/* 画像モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ccc;
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

.modal-prev,
.modal-next {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    pointer-events: all;
}

.modal-prev:hover,
.modal-next:hover {
    background-color: rgba(255,255,255,0.3);
}

/* 広告セクション */
.ad-section {
    margin: 60px 0;
    text-align: center;
}

.ad-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 40px 20px;
    border: 2px dashed #e1e5e9;
    color: #8a8a8a;
}

.ad-placeholder p {
    font-size: 16px;
    font-weight: 500;
}

/* フィルターセクション */
.filter-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 8px;
}

.filter-group select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    background-color: #fff;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #2c2c2c;
}

.reset-btn {
    padding: 12px 24px;
    background-color: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    color: #5a5a5a;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    height: fit-content;
}

.reset-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.filter-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

#results-count {
    color: #5a5a5a;
    font-size: 16px;
    font-weight: 500;
}

/* ローディングスピナー */
.loading-spinner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid #2c2c2c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 画像オーバーレイ */
.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-info {
    color: white;
    width: 100%;
}

.image-categories {
    margin-bottom: 8px;
}

.category-badge {
    display: inline-block;
    background-color: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-badge {
    display: inline-block;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

/* 統計情報セクション */
.gallery-stats {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin: 80px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #5a5a5a;
    font-weight: 500;
    margin: 0;
}

/* 人気のカテゴリー */
.popular-categories,
.popular-tags {
    margin: 60px 0;
    text-align: center;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.category-tag {
    background-color: #fff;
    border: 2px solid #e1e5e9;
    padding: 12px 20px;
    border-radius: 25px;
    color: #2c2c2c;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tag:hover,
.category-tag.active {
    background-color: #2c2c2c;
    color: #fff;
    border-color: #2c2c2c;
}

.category-tag .count {
    background-color: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.category-tag:hover .count,
.category-tag.active .count {
    background-color: rgba(255,255,255,0.2);
}

/* タグクラウド */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

.tag-item {
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    padding: 6px 12px;
    border-radius: 15px;
    color: #5a5a5a;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-item:hover,
.tag-item.active {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #2c2c2c;
}

.tag-item.size-1 {
    font-size: 16px;
    padding: 8px 16px;
}

.tag-item.size-2 {
    font-size: 18px;
    padding: 10px 20px;
    font-weight: 500;
}

.tag-item.size-3 {
    font-size: 20px;
    padding: 12px 24px;
    font-weight: 600;
}

/* モーダルの拡張 */
.modal-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-meta {
    font-size: 14px;
    opacity: 0.9;
}

/* 空の状態 */
.no-categories,
.no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #8a8a8a;
}
    

.no-images-content svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-images-content h3 {
    font-size: 24px;
    color: #5a5a5a;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-images-content p {
    font-size: 16px;
    color: #8a8a8a;
}

/* フッター */
.site-footer {
    background-color: #2c2c2c;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 100px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    opacity: 0.8;
    font-size: 14px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav ul {
        gap: 20px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .images-grid.large {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .main-content {
        padding: 40px 0;
    }
    
    .recent-images, .related-categories {
        margin: 60px 0;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .modal-content {
        width: 95%;
        height: 95%;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .modal-nav {
        padding: 0 10px;
    }
    
    .modal-prev,
    .modal-next {
        padding: 12px 15px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .category-name {
        font-size: 18px;
    }
    
    .images-grid,
    .images-grid.large {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .category-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* アニメーション無効化（要求通り） */
.image-item,
.category-item {
    /* ホバー時のアニメーションを最小限に */
}

.image-item:hover {
    transform: none; /* アニメーション無効 */
}

.category-item:hover {
    transform: translateY(-2px); /* 最小限の動き */
}

.category-thumbnail img {
    transition: none; /* 画像のズームアニメーション無効 */
}

.category-item:hover .category-thumbnail img {
    transform: none;
}