/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本スタイル */
body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f5f7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ヘッダー */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.site-branding .site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.site-title a {
    color: #2c5aa0;
}

.site-description {
    color: #666;
    font-size: 0.9rem;
}

.header-utilities {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 8px 15px;
    border: 1px solid #ddd;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    width: 200px;
    font-size: 0.9rem;
}

.search-btn {
    border: none;
    background: none;
    cursor: pointer;
    margin-left: 10px;
}

/* プライマリナビゲーション */
.primary-nav {
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 15px 0;
}

.nav-item {
    position: relative;
    margin-right: 40px;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #2c5aa0;
}

/* ドロップダウンメニュー */
.has-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    list-style: none;
    padding: 10px 0;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: #333;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #2c5aa0;
}

/* モバイルメニュートグル */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* メインコンテナ */
.main-container {
    max-width: 1240px;
    margin: 30px auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.primary-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* ヒーローバナー */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    border-radius: 8px;
    max-width: 300px;
}

/* セクションヘッダー */
.section-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 5px;
}

.section-subtitle {
    color: #666;
    font-size: 0.9rem;
}

/* 記事グリッド */
.latest-articles {
    padding-bottom: 40px;
}

.articles-grid {
    padding: 30px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* 注目記事（大きめ） */
.article-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 25px;
}

/* 記事カード */
.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card-thumbnail {
    position: relative;
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

/* 注目記事のサムネイル */
.article-card.featured .card-thumbnail img {
    height: 250px;
}

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.badge.new {
    background: #ff4757;
}

.badge.featured {
    background: #ffa502;
}

.card-content {
    padding: 20px;
}

.card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #666;
}

.card-meta .area {
    color: #2c5aa0;
    font-weight: 500;
}

.card-meta .price {
    color: #ff4757;
    font-weight: 600;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.card-title a {
    color: #333;
    transition: color 0.3s;
}

.card-title a:hover {
    color: #2c5aa0;
}

.card-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* サイドバー */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ウィジェット */
.widget {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.widget-content {
    padding: 20px;
}

/* プロフィールウィジェット */
.profile-info {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.profile-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.profile-text h4 {
    margin-bottom: 8px;
    color: #333;
}

.profile-text p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* 人気記事ウィジェット */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rank {
    background: #2c5aa0;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.popular-content h4 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.popular-content a {
    color: #333;
    transition: color 0.3s;
}

.popular-content a:hover {
    color: #2c5aa0;
}

.popular-meta {
    font-size: 0.75rem;
    color: #999;
}

/* エリア別ウィジェット */
.area-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.area-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    transition: color 0.3s;
}

.area-item:hover {
    color: #2c5aa0;
}

.area-count {
    font-size: 0.85rem;
    color: #999;
}

/* タグクラウド */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #666;
    transition: all 0.3s;
}

.tag-item:hover {
    background: #2c5aa0;
    color: white;
}

/* フッター */
footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-note {
    color: #aaa;
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .hero-image {
        order: -1;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 30px;
    }

    .article-card.featured {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .section-header {
        padding: 20px 30px 15px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .search-box {
        width: 100%;
        max-width: 300px;
    }

    .search-input {
        width: 100%;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 20px;
    }

    .nav-item {
        margin: 10px 0;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-banner {
        padding: 20px;
    }

    .section-header,
    .articles-grid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
    }

    .main-container {
        margin: 20px auto;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .card-content {
        padding: 15px;
    }

    .widget-content {
        padding: 15px;
    }
}