/* ==========================================================================
   Style_Archive.css
   Blog Archive Page Styles - Magazine-Style Modern Design
   Techno Relations Co., Ltd.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
    --archive-primary: #1C5B99;
    --archive-accent: #00DCFF;
    --archive-dark: #0A1628;
    --archive-light: #F8FAFC;
}

/* ==========================================================================
   横スクロール完全防止
   ========================================================================== */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================================================
   親要素のリセット - フルワイド対応（会社概要ページと同じ方式）
   ========================================================================== */
#page,
.site,
.site-content,
#content,
.content-area,
.inside-article,
article,
.entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* メインコンテンツのみ overflow を制御 */
.archive-page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: hidden;
}

/* サイドバーを非表示 */
body.category .widget-area,
body.archive .widget-area,
body.category #right-sidebar,
body.archive #right-sidebar,
body.category #left-sidebar,
body.archive #left-sidebar {
    display: none !important;
}

/* GeneratePressのアーカイブタイトルを非表示 */
body.category .archive-header,
body.archive .archive-header,
body.category .page-header,
body.archive .page-header {
    display: none !important;
}

/* site-contentの下の余白を削除 */
.site-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 記事コンテンツの下の余白を削除 */
.inside-article,
article,
.entry-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* GeneratePressのデフォルト余白を削除 */
#primary,
.content-area,
.inside-page,
.hentry,
.grid-container:not(.inside-header) {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   Archive Hero Section - フルワイド背景
   -------------------------------------------------------------------------- */
.archive-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--archive-dark) 0%, #0f2847 50%, var(--archive-primary) 100%);
    width: 100%;
}

.archive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 220, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(28, 91, 153, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Animated Grid Background */
.archive-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 220, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 220, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    opacity: 0.5;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

/* Floating Particles */
.archive-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--archive-accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; top: 60%; animation-delay: -2s; }
.particle:nth-child(3) { left: 45%; top: 30%; animation-delay: -4s; }
.particle:nth-child(4) { left: 65%; top: 70%; animation-delay: -6s; }
.particle:nth-child(5) { left: 80%; top: 40%; animation-delay: -8s; }
.particle:nth-child(6) { left: 90%; top: 80%; animation-delay: -10s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-30px) scale(1.5); opacity: 1; }
}

/* Hero Content */
.archive-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.archive-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 220, 255, 0.1);
    border: 1px solid rgba(0, 220, 255, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: var(--archive-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.archive-category-badge svg {
    width: 16px;
    height: 16px;
}

.archive-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.archive-title span {
    background: linear-gradient(135deg, #fff 0%, var(--archive-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.archive-description {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.archive-post-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.archive-post-count strong {
    color: var(--archive-accent);
    font-size: 1.2rem;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Archive Main Content - フルワイド背景
   -------------------------------------------------------------------------- */
.archive-main {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    padding: 4rem 0 6rem;
    min-height: 50vh;
    width: 100%;
}

.archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* --------------------------------------------------------------------------
   Category Navigation Tabs
   -------------------------------------------------------------------------- */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.category-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-nav-link svg {
    width: 18px;
    height: 18px;
}

.category-nav-link:hover {
    color: var(--archive-primary);
    border-color: var(--archive-primary);
    background: rgba(28, 91, 153, 0.05);
}

.category-nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--archive-primary) 0%, #2a7bc8 100%);
    border-color: var(--archive-primary);
    box-shadow: 0 4px 15px rgba(28, 91, 153, 0.3);
}

/* --------------------------------------------------------------------------
   Featured Post (First Post - Large Card)
   -------------------------------------------------------------------------- */
.featured-post {
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.featured-post-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 20px 60px rgba(28, 91, 153, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.featured-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.04),
        0 30px 80px rgba(28, 91, 153, 0.15);
}

.featured-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #e2e8f0;
}

.featured-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-post-card:hover .featured-thumbnail img {
    transform: scale(1.08);
}

.featured-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.featured-thumbnail-placeholder svg {
    width: 80px;
    height: 80px;
    color: #94a3b8;
}

.featured-label {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--archive-primary) 0%, #2a7bc8 100%);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 15px rgba(28, 91, 153, 0.4);
    z-index: 2;
}

.featured-label svg {
    width: 14px;
    height: 14px;
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.featured-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #64748b;
}

.featured-date svg {
    width: 14px;
    height: 14px;
    color: var(--archive-primary);
}

.featured-category {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--archive-primary);
    background: rgba(28, 91, 153, 0.08);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--archive-dark);
    line-height: 1.4;
    margin: 0 0 1rem;
    transition: color 0.3s ease;
}

.featured-post-card:hover .featured-title {
    color: var(--archive-primary);
}

.featured-excerpt {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--archive-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.featured-post-card:hover .featured-link {
    color: var(--archive-accent);
}

.featured-post-card:hover .featured-link svg {
    transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   Post Grid
   -------------------------------------------------------------------------- */
.posts-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    margin-top: 48px;
}

.posts-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--archive-dark);
    margin: 0;
}

.posts-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--archive-primary) 0%, var(--archive-accent) 100%);
    border-radius: 2px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* --------------------------------------------------------------------------
   Post Card
   -------------------------------------------------------------------------- */
.post-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 10px 40px rgba(28, 91, 153, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 20px 60px rgba(28, 91, 153, 0.12);
}

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-card-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #e2e8f0;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.1);
}

.post-card-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.post-card-thumbnail-placeholder svg {
    width: 50px;
    height: 50px;
    color: #94a3b8;
}

/* Thumbnail Overlay */
.post-card-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.6) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.post-card:hover .post-card-thumbnail::after {
    opacity: 1;
}

/* Read More Indicator */
.post-card-read-more {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
    white-space: nowrap;
}

.post-card-read-more svg {
    width: 16px;
    height: 16px;
}

.post-card:hover .post-card-read-more {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Post Card Content */
.post-card-content {
    padding: 1.5rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: #94a3b8;
}

.post-card-date svg {
    width: 12px;
    height: 12px;
}

.post-card-category {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--archive-primary);
    background: rgba(28, 91, 153, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-card-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--archive-dark);
    line-height: 1.5;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.post-card:hover .post-card-title {
    color: var(--archive-primary);
}

.post-card-excerpt {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers:hover {
    color: var(--archive-primary);
    border-color: var(--archive-primary);
    background: rgba(28, 91, 153, 0.05);
}

.archive-pagination .page-numbers.current {
    color: #fff;
    background: linear-gradient(135deg, var(--archive-primary) 0%, #2a7bc8 100%);
    border-color: var(--archive-primary);
    box-shadow: 0 4px 15px rgba(28, 91, 153, 0.3);
}

.archive-pagination .prev,
.archive-pagination .next {
    font-weight: 600;
    gap: 0.3rem;
}

.archive-pagination .prev svg,
.archive-pagination .next svg {
    width: 18px;
    height: 18px;
}

.archive-pagination .dots {
    border: none;
    background: transparent;
    color: #94a3b8;
}

/* --------------------------------------------------------------------------
   No Posts State
   -------------------------------------------------------------------------- */
.archive-no-posts {
    text-align: center;
    padding: 6rem 2rem;
}

.archive-no-posts-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #cbd5e1;
}

.archive-no-posts h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--archive-dark);
    margin: 0 0 0.75rem;
}

.archive-no-posts p {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .featured-post-card {
        grid-template-columns: 1fr;
    }
    
    .featured-thumbnail {
        aspect-ratio: 16/9;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .archive-hero {
        min-height: 35vh;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .archive-container {
        padding: 0 1rem;
    }
    
    .archive-main {
        padding: 3rem 0 4rem;
    }
    
    .category-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }
    
    .category-nav-link {
        justify-content: center;
    }
    
    .posts-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .archive-pagination {
        flex-wrap: wrap;
    }
    
    .archive-pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .featured-content {
        padding: 1.5rem;
    }
    
    .featured-title {
        font-size: 1.25rem;
    }
    
    .post-card-content {
        padding: 1.25rem;
    }
    
    .post-card-title {
        font-size: 1rem;
    }
    
    .archive-hero-content {
        padding: 1rem;
    }
}