/* =====================================================
   Midori Photo Art - メインスタイルシート
   ===================================================== */

/* ===================
   変数定義
   =================== */
:root {
    /* カラー */
    --color-primary: #3498db;
    --color-primary-dark: #2980b9;
    --color-primary-light: #5dade2;
    --color-secondary: #e74c3c;
    --color-accent: #2ecc71;
    
    --color-text: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-text-muted: #95a5a6;
    
    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-tertiary: #ecf0f1;
    
    --color-border: #e1e8ed;
    --color-border-light: #f0f3f5;
    
    /* タイポグラフィ */
    --font-brand: 'Papyrus', 'Brush Script MT', cursive, serif;
    --font-primary: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    --font-heading: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    
    /* スペーシング */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 5rem;
    
    /* レイアウト */
    --container-width: 1200px;
    --container-padding: 2rem;
    
    /* シャドウ */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* トランジション */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* ボーダー半径 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* z-index */
    --z-dropdown: 1000;
    --z-sticky: 1010;
    --z-fixed: 1020;
    --z-modal: 1030;
    --z-popover: 1040;
    --z-tooltip: 1050;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.8;
    font-feature-settings: "palt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ヒーロー表示中のスクロール制御 */
body.hero-active {
    overflow: hidden;
    height: 100vh;
}

/* ===================
   Google Translate
   =================== */
#google_translate_element {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-normal);
}

#google_translate_element.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
}

/* Google翻訳のツールバーを完全非表示 */
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Google翻訳のツールバーを強制的に非表示 */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body.translated-ltr {
    top: 0 !important;
}

/* ページ上部のGoogle翻訳バナーを完全に非表示 */
iframe.goog-te-banner-frame {
    display: none !important;
}

.goog-te-banner-frame,
.goog-te-ftab {
    display: none !important;
}

.translate-toggle {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: var(--z-fixed);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    pointer-events: none;
}

.translate-toggle.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.translate-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.translate-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.translate-toggle svg {
    width: 18px;
    height: 18px;
}

/* ===================
   ヒーローセクション
   =================== */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    overflow: hidden;
    z-index: 1000;
    animation: fadeOut 1.5s ease-in-out forwards;
    animation-delay: 2.5s;
    pointer-events: none;
}

.hero.hidden {
    display: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: heroShimmer 3s ease-in-out infinite;
}

@keyframes heroShimmer {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.05);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: slideUp 1.5s ease-out;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__title {
    font-family: var(--font-brand);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeInScale 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero__subtitle {
    font-family: var(--font-secondary);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    margin-bottom: var(--spacing-sm);
    opacity: 0;
    letter-spacing: 0.02em;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 1s;
}

.hero__description {
    font-family: var(--font-primary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0;
    line-height: 1.7;
    letter-spacing: 0.01em;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 1.5s;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards, bounce 2s infinite;
    animation-delay: 2s, 2.8s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.hero__scroll-indicator span {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.hero__scroll-line {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, white, transparent);
}

/* ===================
   ナビゲーション
   =================== */
.main-nav {
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-normal);
}

.main-nav--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.nav-logo:hover {
    color: var(--color-primary-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary);
    background: var(--color-bg-secondary);
}

.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--color-primary);
}

.nav-link--old {
    color: var(--color-secondary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

/* ===================
   コンテナ
   =================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.main-content {
    min-height: 100vh;
    opacity: 0;
    animation: showContent 1s ease-out forwards;
    animation-delay: 3s;
}

@keyframes showContent {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================
   お知らせセクション（トップ）
   =================== */
.news-section-top {
    padding: var(--spacing-md) 0 var(--spacing-lg);
    background: linear-gradient(to bottom, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
}

.news-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.5vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    text-align: left;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
    width: auto;
    letter-spacing: -0.02em;
}

.news-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    transform: none;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-sm);
    max-width: none;
    margin: 0;
}

.news-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs) var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-light));
    transition: width var(--transition-fast);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.news-card:hover::before {
    width: 8px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.news-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.news-badge--info {
    background: linear-gradient(135deg, var(--color-accent), #27ae60);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.news-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: var(--font-secondary);
}

.news-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xxs, 0.35rem);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.news-description {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    color: var(--color-text-light);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
    margin-top: auto;
    padding: 0.3rem 0;
}

.news-link:hover {
    color: var(--color-primary-dark);
    gap: 0.75rem;
}

/* ===================
   記事ジャンプセクション
   =================== */
.jump-section {
    padding: var(--spacing-lg) 0;
    background: var(--color-bg-secondary);
    text-align: center;
}

.jump-section .container {
    display: block;
}

.jump-section__button {
    display: block;
    width: 100%;
    max-width: none;
}

.jump-section .btn--primary {
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    .jump-section {
        padding: var(--spacing-md) 0;
    }
}

/* ===================
   セクション
   =================== */
.articles-section {
    padding: var(--spacing-xl) 0 var(--spacing-3xl);
    background: var(--color-bg);
}

.random-section {
    padding: var(--spacing-md) 0 var(--spacing-lg);
    background: linear-gradient(to bottom, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
}

.random-section .section-header {
    margin-bottom: var(--spacing-md);
}

.random-section .section-title {
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    margin-bottom: 0.15rem;
}

.random-section .section-subtitle {
    font-size: 0.85rem;
    margin-top: 0.1rem;
    color: var(--color-text-muted);
}

.random-section .articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: var(--spacing-xl);
}

.random-section .article-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.random-section .article-card__thumbnail,
.random-section .article-card__video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.random-section .article-card__content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    height: 100%;
}

.random-section .article-card__title {
    font-size: 1.05rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.45;
}

.random-section .article-card__description {
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    flex: 1 1 auto;
}

.random-section .article-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.random-section .article-card__read-time,
.random-section .article-card__tags {
    display: none;
}

.random-section .article-card__footer {
    display: none;
}

.random-section .article-card__footer .btn--secondary {
    display: none;
}

.random-card__nav {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-sm) calc(var(--spacing-sm) - 4px);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    align-items: center;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.random-card__btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.random-card__btn--primary {
    flex: 1.2 1 0;
    padding: 0.5rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.25);
    text-decoration: none;
}

.random-card__btn:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.random-card__btn--primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
}

.random-card__btn:active {
    transform: translateY(1px);
}

.popular-section,
.notice-section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: left;
    margin-bottom: var(--spacing-xl);
}

.section-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    margin-top: 0.75rem;
}

/* セクションヘッダー（タイトル + 検索の横並び） */
.section-header-with-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.section-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 360px;
    min-width: 240px;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin-top: var(--spacing-sm);
}

.popular-tags:empty {
    display: none;
}


.popular-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.85rem;
    font-family: var(--font-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.popular-tag:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.12);
    transform: translateY(-1px);
}

.popular-tag--active {
    color: white;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(52, 152, 219, 0.25);
}

.popular-tag svg {
    width: 14px;
    height: 14px;
}

.popular-tag__count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.popular-tag--active .popular-tag__count {
    color: rgba(255, 255, 255, 0.85);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: left;
}

.section-count {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0;
    font-weight: 500;
}

.section-header .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    transform: none;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

/* 横並びの場合は下線を左揃え */
.section-header-with-search .section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    transform: none;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
}

.section-header-with-search .section-title {
    position: relative;
    padding-bottom: 0.5rem;
}

.section-description {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.9;
    letter-spacing: 0.01em;
}

.section-subtitle {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ===================
   検索
   =================== */
.articles-filter {
    display: flex;
    margin-bottom: var(--spacing-xl);
    justify-content: center;
}

/* 検索ボックスのアニメーション */
.search-input:focus + .search-btn {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.search-box {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
}

.section-header-with-search .search-box {
    max-width: 360px;
    margin-left: auto;
    justify-content: flex-end;
    align-items: stretch;
    flex: 0 1 360px;
    min-width: 260px;
}

.section-header-with-search .search-input {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.section-header-with-search .search-btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    background: var(--color-bg);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}


/* ===================
   記事グリッド
   =================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.article-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), height 0.3s ease, min-height 0.3s ease;
}

.random-section .articles-grid {
    grid-auto-rows: 1fr;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.article-card__thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--color-bg-secondary);
    transition: transform var(--transition-normal);
}

.article-card:hover .article-card__thumbnail {
    transform: scale(1.08);
}

.article-card__content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* サムネイルがないカードの場合、コンテンツエリアのパディングを調整 */
.article-card:not(:has(.article-card__thumbnail)) .article-card__content {
    padding-top: var(--spacing-xl);
}

.article-card__meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-secondary);
    font-weight: 500;
}

.article-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: white;
    background: linear-gradient(135deg, var(--color-accent, #f39c12), var(--color-primary));
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform-origin: center;
}

.article-card__badge--new {
    animation: article-card-badge-pulse 2.4s ease-in-out infinite;
}

.article-card__date,
.article-card__read-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.article-card__date svg,
.article-card__read-time svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.article-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
    letter-spacing: -0.01em;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__description {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
    letter-spacing: 0.01em;
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.article-card__tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.article-card__tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.article-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--spacing-md);
}

/* 記事カード内のボタンを少し小さく */
.article-card__footer .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    flex: 0 1 auto;
    min-width: 0;
}

/* モバイルではボタンをさらに調整 */
@media (max-width: 480px) {
    .article-card__footer {
        gap: 0.5rem;
    }
    
    .article-card__footer .btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }
}

.btn {
    font-family: var(--font-secondary);
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    flex: 1;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.btn--secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text);
    border: 2px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn--secondary:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.15);
}

.btn--secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===================
   ページネーション
   =================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
}

.pagination button {
    padding: 0.625rem 1.125rem;
    background: var(--color-bg);
    color: var(--color-text);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 44px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pagination button:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination button.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ===================
   ランダム記事セクション
   =================== */
@media (min-width: 992px) {
    .random-section .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ===================
   お知らせセクション
   =================== */
.notice-card {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.notice-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.notice-content {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    line-height: 1.9;
    letter-spacing: 0.01em;
}

.notice-content a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.notice-content a:hover {
    text-decoration: none;
}

/* ===================
   フッター
   =================== */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    margin-top: 0;
    border-top: 3px solid var(--color-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section {
    min-width: 0;
}

.footer-section--about {
    max-width: 500px;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    color: white;
}

.footer-section--about .footer-title {
    font-family: Papyrus, var(--font-brand);
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: 0.05em;
}

.footer-tagline {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    font-style: italic;
}

.footer-description {
    font-family: var(--font-primary);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    letter-spacing: 0.01em;
    font-size: 0.875rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    font-family: var(--font-primary);
    display: inline-block;
    position: relative;
    padding-left: 1.25rem;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    transition: transform var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    padding-left: 1.5rem;
}

.footer-links a:hover::before {
    transform: translateX(3px);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    transition: all var(--transition-fast);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    font-family: var(--font-secondary);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.footer-bottom a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* ===================
   ユーティリティ
   =================== */
.loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* ===================
   レスポンシブ
   =================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --spacing-2xl: 2rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .section-header-with-search {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-lg);
        margin-bottom: var(--spacing-xl);
    }
    
    .section-info {
        min-width: auto;
        width: 100%;
    }
    
    .section-header-with-search .search-box {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        min-width: 0;
        flex: 1 1 auto;
        gap: 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }

    .section-header-with-search .search-input,
    .section-header-with-search .search-btn {
        border-radius: var(--radius-md);
        width: 100%;
    }

    .section-header-with-search .search-btn {
        padding: 0.75rem 1rem;
    }

    .section-count {
        font-size: 0.85rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .article-card__thumbnail {
        height: 145px;
    }

    .article-card__content {
        padding: var(--spacing-sm);
    }

    .article-card__title {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    .article-card__description {
        font-size: 0.75rem;
        line-height: 1.5;
        line-clamp: 3;
        -webkit-line-clamp: 3;
    }

    .article-card__tags {
        display: none !important;
    }

    .article-card__meta {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.35rem;
        flex-wrap: wrap;
        row-gap: 0.3rem;
    }

    .article-card__badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.65rem;
        letter-spacing: 0.08em;
    }

    .article-card__read-time {
        display: none !important;
    }

    .article-card__date {
        font-size: 0.75rem;
        color: var(--color-text-muted);
    }

    .article-card__footer {
        display: flex !important;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .article-card__footer .btn--primary {
        flex: 1 1 auto;
        min-height: 36px;
        font-size: 0.85rem;
        padding: 0.65rem 0.75rem;
        font-weight: 700;
    }

    .article-card__footer .btn--secondary {
        display: none !important;
    }
    
    .popular-tags {
        gap: 0.4rem;
    }
    
    .popular-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
    
    #google_translate_element {
        top: 140px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .translate-toggle {
        right: 12px;
        bottom: 20px;
        font-size: 0.8rem;
        padding: 0.55rem 0.9rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card {
        padding: var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-section--about {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .news-section-title {
        font-size: 1.5rem;
    }
    
    .news-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .news-description {
        font-size: 0.9rem;
    }
}

@keyframes article-card-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.25);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 4px 14px rgba(52, 152, 219, 0.35);
    }
}

