/**
 * フロントページ専用CSS
 * worry_categoryアイコン・色分け、セクション間レイアウト調整
 * 
 * @package YaneMediaTheme
 */

/* サイドバー固定表示に対応したメインコンテンツレイアウト */
@media (min-width: 768px) {
    body {
        margin-right: 320px; /* サイドバー幅分のマージン */
    }
}

/* ==================================================
   worry_category カテゴリスタイル（BEM記法）
   ================================================== */

.magazine-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    text-transform: none;
    letter-spacing: 0;
    transition: all 0.2s ease;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.magazine-category .category-icon {
    width: 16px;
    height: 16px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
}

/* 雨漏り */
.magazine-category--rain-leak {
    background: rgba(74, 144, 226, 0.1);
    color: #4A90E2;
    border-color: rgba(74, 144, 226, 0.2);
}

.magazine-category--rain-leak:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.3);
    transform: none;
}

/* 塗装 */
.magazine-category--painting {
    background: rgba(126, 211, 33, 0.1);
    color: #7ED321;
    border-color: rgba(126, 211, 33, 0.2);
}

.magazine-category--painting:hover {
    background: rgba(126, 211, 33, 0.15);
    border-color: rgba(126, 211, 33, 0.3);
    transform: none;
}

/* 屋根修理 */
.magazine-category--roof-repair {
    background: rgba(245, 166, 35, 0.1);
    color: #F5A623;
    border-color: rgba(245, 166, 35, 0.2);
}

.magazine-category--roof-repair:hover {
    background: rgba(245, 166, 35, 0.15);
    border-color: rgba(245, 166, 35, 0.3);
    transform: none;
}

/* 訪問営業 */
.magazine-category--sales-visit {
    background: rgba(208, 2, 27, 0.1);
    color: #D0021B;
    border-color: rgba(208, 2, 27, 0.2);
}

.magazine-category--sales-visit:hover {
    background: rgba(208, 2, 27, 0.15);
    border-color: rgba(208, 2, 27, 0.3);
    transform: none;
}

/* その他の暮らしの悩み */
.magazine-category--other-lifestyle {
    background: rgba(144, 19, 254, 0.1);
    color: #9013FE;
    border-color: rgba(144, 19, 254, 0.2);
}

.magazine-category--other-lifestyle:hover {
    background: rgba(144, 19, 254, 0.15);
    border-color: rgba(144, 19, 254, 0.3);
    transform: none;
}

/* ==================================================
   セクション間レイアウト調整
   ================================================== */

/* ヒーローセクション */
.hero-section {
    margin-top: 0;  /* グローバルメニューとの間隔をなくす */
    margin-bottom: 48px;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 80px 20px 80px;
    position: relative;
    
    /* 背景画像の設定 */
    background-image: url('../images/hero/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
}

/* オーバーレイなし */

.hero-content {
    position: relative;
    max-width: 800px;  /* コンテンツの幅を制限 */
    margin: 0 auto;  /* 中央寄せ */
    padding: 0 20px;  /* 左右の余白 */
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-cta {
    text-align: center;
    margin-top: 32px;
}

.hero-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: #32b16c;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    border: 3px solid #fff;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(50, 177, 108, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
    position: relative;
}

.hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(50, 177, 108, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cta-free-label {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 800;
    text-shadow: none;
}

.cta-button-text {
    flex: 1;
    font-weight: 700;
}

.cta-button-icon {
    font-size: 18px;
    font-weight: bold;
}

.hero-cta-button:hover {
    background: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #fff;
}

.cta-button-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.hero-cta-button:hover .cta-button-icon {
    transform: translateX(4px);
}

.cta-description {
    margin-top: 15px;
    font-size: 0.875rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* お悩み別ガイドセクション */
.trouble-guide-section {
    margin-bottom: 32px;
    padding: 24px 0;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 12px;
}

.trouble-guide-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
}

.trouble-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.trouble-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Removed box-shadow for cleaner appearance */
}

.trouble-item:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--category-color, #333);
    border-color: var(--category-color, rgba(0, 0, 0, 0.08));
    /* Removed box-shadow for cleaner appearance */
}

.trouble-icon {
    width: 120px;
    height: 120px;
    background: color-mix(in srgb, var(--category-color, #666) 10%, transparent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 32px;
    color: var(--category-color, #666);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
    /* Removed box-shadow for cleaner appearance */
}

.trouble-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.trouble-item:hover .trouble-icon {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--category-color, #666);
    transform: scale(1.05);
    /* Removed box-shadow for cleaner appearance */
}

.trouble-item p {
    margin: 0;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* 編集部おすすめ記事・最新記事セクション */
.recommended-section,
.latest-articles-section {
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.more-articles-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.more-articles-link:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    text-decoration: none;
    color: #fff;
}

.more-articles-link::after {
    content: "→";
    transition: transform 0.3s ease;
}

.more-articles-link:hover::after {
    transform: translateX(2px);
}

/* Magazine Grid（cowcamo MAGAZINEスタイル） */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.magazine-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.magazine-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.08);
}

.magazine-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.magazine-card:hover .magazine-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.magazine-content {
    padding: 16px;
}

.magazine-title {
    margin: 12px 0 0 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.magazine-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.magazine-title a:hover {
    color: #4A90E2;
    text-decoration: none;
}

.magazine-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.magazine-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
}

.magazine-date {
    font-size: 0.875rem;
    color: #999;
}

/* 市町村区別おすすめ屋根業者セクション */
.municipality-section {
    margin-bottom: 32px;
    padding: 24px 0;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 12px;
}

.municipality-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
}

.area-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.area-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.area-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #4A90E2;
}

.prefecture-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.prefecture-link {
    display: block;
    padding: 10px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.prefecture-link:hover {
    background: #4A90E2;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
    text-decoration: none;
}

/* 他のセクション */
.useful-docs-section,
.interview-section,
.sponsored-section {
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.useful-docs-section h2,
.interview-section h2,
.sponsored-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-description {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
}

/* インタビューカードレイアウト */
.interview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.interview-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.interview-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.interview-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #7B5CBF;
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    z-index: 10;
}

.interview-card-event .interview-card-badge {
    background: #4A90E2;
}

.interview-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.interview-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.interview-card:hover .interview-card-image img {
    transform: scale(1.05);
}

/* イベントカード特別スタイル */
.interview-card-event {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.interview-card-event-header {
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.event-date-box {
    text-align: center;
    color: #fff;
}

.event-date-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.event-date-subtitle {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-date-description {
    font-size: 12px;
    opacity: 0.9;
}

.interview-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.interview-card-event .interview-card-content {
    background: #fff;
}

.interview-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.interview-card-meta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.interview-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.interview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.interview-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 11px;
    border-radius: 3px;
}

.interview-section-footer {
    text-align: center;
    margin-top: 40px;
}

.view-more-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #fff;
    color: #333;
    border: 2px solid #333;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
}

/* スポンサードグリッド */
.sponsored-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sponsored-item {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sponsored-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.company-logo {
    height: 120px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ==================================================
   レスポンシブ対応
   ================================================== */

@media (max-width: 1200px) {
    .magazine-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .interview-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sponsored-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .area-cards-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cta-button {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .trouble-guide-section h2,
    .municipality-section h2,
    .useful-docs-section h2,
    .interview-section h2,
    .sponsored-section h2 {
        font-size: 1.75rem;
    }
    
    .trouble-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .trouble-item {
        padding: 24px 16px;
    }
    
    .trouble-image {
        width: 60px;
        height: 60px;
    }
    
    .magazine-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .area-cards-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .prefecture-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .interview-cards,
    .sponsored-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        margin-bottom: 32px;
    }
    
    .trouble-guide-section,
    .recommended-section,
    .latest-articles-section,
    .municipality-section,
    .useful-docs-section,
    .interview-section,
    .sponsored-section {
        margin-bottom: 24px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .trouble-guide-section h2,
    .municipality-section h2,
    .useful-docs-section h2,
    .interview-section h2,
    .sponsored-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .magazine-category {
        font-size: 10px;
        padding: 3px 6px;
        gap: 3px;
    }
    
    .magazine-category .category-icon {
        font-size: 11px;
    }
    
    .trouble-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .trouble-icon {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }
    
    .magazine-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* サイドバー検索セクション */
.search-section {
    text-align: center;
    padding: 20px 0;
}

.search-section h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.search-section .view-all-link {
    display: inline-block;
    padding: 10px 20px;
    background: #32b16c;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-section .view-all-link:hover {
    background: #2a9859;
    transform: translateY(-1px);
}