/*
Theme Name: 万象森羅
Description: クリエイターの未来を創造する万象森羅公式サイト - 画像カスタマイズ対応
Author: BANSHOU SHINRA
Version: 1.2.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', system-ui, sans-serif;
    line-height: 1.7;
    color: #2d3748;
    background: #fdfdfd;
    font-feature-settings: "palt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: #1a202c;
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 300;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    text-decoration: none;
    color: #1a202c;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
    color: #667eea;
    transform: translateY(-1px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: #1a202c;
    transform: translateY(-1px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #fdfdfd 0%, #f8fafc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-gallery-content {
    max-width: 800px;
    width: 80%;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: center;
    z-index: 2;
    position: relative;
}

.hero-text-gallery {
    padding: 80px 0;
}

.hero-text-gallery .brand {
    font-size: 4.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.5rem;
    line-height: 1.05;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #0f172a 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text-gallery .tagline {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 3rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

.hero-about {
    margin-bottom: 4rem;
    max-width: 580px;
}

.hero-about p {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #374151;
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.9;
}

/* アートワークグリッド */
.artwork-grid-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.artwork-grid-simple .artwork-main {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url('https://images.unsplash.com/photo-1541961017774-22349e4a1262?w=600&h=800&fit=crop') center/cover;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.artwork-grid-simple .artwork-main:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 
        0 35px 70px rgba(0,0,0,0.2),
        0 0 0 1px rgba(255,255,255,0.1);
}

/* Main Sections */
.section {
    padding: 140px 0;
    position: relative;
}

.section:nth-child(even) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.section-title {
    text-align: center;
    font-size: 3.2rem;
    margin-bottom: 5rem;
    color: #0f172a;
    font-weight: 800;
    position: relative;
    letter-spacing: -1.5px;
    line-height: 1.15;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    opacity: 0.8;
}

/* 3つの柱 */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 5rem;
    margin-top: 5rem;
}

.pillar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 4.5rem 4rem;
    border-radius: 28px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.pillar:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 35px 70px rgba(0,0,0,0.12),
        0 0 0 1px rgba(255,255,255,0.15);
}

.pillar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0.8;
}

.pillar-icon {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    font-size: 2.8rem;
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pillar:hover .pillar-icon {
    transform: translateY(-4px);
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255,255,255,0.15);
}

.pillar h3 {
    font-size: 1.9rem;
    margin-bottom: 2rem;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.25;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.92);
    padding: 16px 20px;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    letter-spacing: -0.5px;
}

.pillar p {
    color: #0f172a;
    line-height: 1.85;
    font-size: 1.15rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
    background: rgba(255,255,255,0.95);
    padding: 24px 28px;
    border-radius: 18px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
}

.pillar-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
    margin-top: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.pillar-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255,255,255,0.2);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Community Section */
.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem;
    margin-top: 5rem;
}

.feature {
    text-align: center;
    padding: 4rem 3rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.06),
        0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255,255,255,0.15);
}

.feature-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
    color: white;
    font-size: 2.2rem;
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature:hover .feature-icon {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 45px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255,255,255,0.15);
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-weight: 700;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.9);
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
}

.feature p {
    color: #374151;
    line-height: 1.75;
    position: relative;
    z-index: 2;
    font-weight: 500;
    background: rgba(255,255,255,0.95);
    padding: 16px 20px;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    font-size: 1rem;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3.5rem;
    margin-top: 5rem;
}

.news-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.06),
        0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.2);
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255,255,255,0.15);
}

.news-item-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-item:hover .news-thumbnail {
    transform: scale(1.05);
}

.news-item-content {
    padding: 3rem;
}

.news-item h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    line-height: 1.4;
    font-weight: 700;
}

.news-item h3 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-item h3 a:hover {
    color: #667eea;
}

.news-item time {
    color: #6b7280;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 1.5rem;
    font-weight: 500;
    opacity: 0.8;
}

.news-item p {
    color: #374151;
    line-height: 1.75;
    font-size: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 6rem 0 3rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h4 {
    margin-bottom: 2rem;
    color: #667eea;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    margin-bottom: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
    font-size: 1rem;
    opacity: 0.9;
}

.footer-section a:hover {
    color: #667eea;
    transform: translateX(4px);
    opacity: 1;
}

.copyright {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text-gallery,
.artwork-grid {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.pillar {
    animation: staggerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.pillar:nth-child(1) { animation-delay: 0.1s; }
.pillar:nth-child(2) { animation-delay: 0.2s; }
.pillar:nth-child(3) { animation-delay: 0.3s; }

.feature {
    animation: staggerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }
.feature:nth-child(4) { animation-delay: 0.4s; }

/* カスタマイズ用の追加スタイル - そうさく酒場バナーを大きく横長に */
.sakaba-banner-large {
    margin: 40px 0;
    text-align: center;
}

.sakaba-banner-content-large {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #1a202c;
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(255, 193, 7, 0.4);
    transition: all 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sakaba-banner-content-large:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(255, 193, 7, 0.5);
}

.sakaba-banner-content-large h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #1a202c;
}

.sakaba-banner-content-large p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    color: #2d3748;
    font-weight: 500;
}

.sakaba-banner-content-large .sakaba-link {
    background: rgba(26, 32, 44, 0.15);
    color: #1a202c;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.sakaba-banner-content-large .sakaba-link:hover {
    background: rgba(26, 32, 44, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

/* 最新ブログ記事を3つに制限 */
.news-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 40px;
}

/* コミュニティ活動を3つに整理 */
.community-features-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-top: 5rem;
}

/* プロジェクトセクション */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    margin-top: 5rem;
}

.project-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 4rem 3.5rem;
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.06),
        0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255,255,255,0.15);
}

.project-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
    color: white;
    font-size: 2.5rem;
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover .project-icon {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 45px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255,255,255,0.15);
}

.project-item h3 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

.project-item p {
    color: #374151;
    line-height: 1.8;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .news-grid-three {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .community-features-three {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 800px) {
    .hero-gallery-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-gallery-content {
        padding: 0 20px;
    }
    
    .hero-text-gallery .brand {
        font-size: 2.8rem;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .pillars {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .pillar {
        padding: 3rem 2rem;
    }
    
    .community-features {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .news-grid,
    .news-grid-three {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .community-features-three {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .news-item-image {
        height: 180px;
    }
    
    .sakaba-banner-content-large {
        padding: 35px 30px;
        max-width: 90%;
    }
    
    .sakaba-banner-content-large h3 {
        font-size: 1.5rem;
    }
    
    .sakaba-banner-content-large p {
        font-size: 1rem;
    }
    
    .project-item {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text-gallery .brand {
        font-size: 2.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .pillar {
        padding: 2rem 1.5rem;
    }
    
    .pillar-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .sakaba-banner-content-large {
        padding: 25px 20px;
    }
    
    .sakaba-banner-content-large h3 {
        font-size: 1.3rem;
    }
    
    .sakaba-banner-content-large .sakaba-link {
        padding: 12px 25px;
        font-size: 1rem;
    }
}
/* カスタマイザー対応追加スタイル - style.cssの末尾に追加してください */

/* フィーチャーリンクスタイル */
.feature-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.feature-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 動的記事数に対応したグリッド調整 */
.news-grid-three {
    display: grid;
    gap: 3rem;
    margin-top: 40px;
}

/* 記事数に応じたグリッド調整 */
.news-grid-three:has(.news-item:nth-child(1):nth-last-child(1)) {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.news-grid-three:has(.news-item:nth-child(2):nth-last-child(1)) {
    grid-template-columns: repeat(2, 1fr);
}

.news-grid-three:has(.news-item:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

.news-grid-three:has(.news-item:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
}

.news-grid-three:has(.news-item:nth-child(5)) {
    grid-template-columns: repeat(3, 1fr);
}

/* レスポンシブ対応（記事数動的調整） */
@media (max-width: 1024px) {
    .news-grid-three:has(.news-item:nth-child(3)),
    .news-grid-three:has(.news-item:nth-child(4)),
    .news-grid-three:has(.news-item:nth-child(5)) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid-three {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
}

/* カスタマイザープレビュー用スタイル */
.customize-partial-edit-shortcut {
    z-index: 9999 !important;
}

/* 管理者バー表示時の調整 */
.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar header {
        top: 46px;
    }
}

/* セクション非表示時の調整 */
.section.hidden {
    display: none !important;
}

/* 画像読み込み時のプレースホルダー */
.hero-gallery-content::before,
.pillar::before,
.sakaba-banner-content-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 画像が読み込まれるまでプレースホルダーを表示 */
.hero[style*="background-image"]::before,
.pillar[style*="background-image"]::before,
.sakaba-banner-content-large[style*="background-image"]::before {
    opacity: 0;
}

/* カスタマイザーライブプレビュー対応 */
.customize-partial-edit-shortcut-button {
    background: rgba(102, 126, 234, 0.8) !important;
    color: white !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    padding: 2px 6px !important;
}

.customize-partial-edit-shortcut-button:hover {
    background: rgba(102, 126, 234, 1) !important;
}

/* プリントスタイル */
@media print {
    header,
    footer,
    .customize-partial-edit-shortcut {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
        margin-bottom: 40px;
    }
    
    .hero {
        min-height: 400px !important;
        page-break-after: always;
    }
}