/*
 * Custom CSS for ABC Marketing
 * Shared styles for home.php, archive.php, and archive-term.php
 */

/* =============================================================================
   共通基本スタイル
   ============================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "游ゴシック体", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =============================================================================
   ヘッダースタイル（home.php用）
   ============================================================================= */

.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-top {
    background-color: #e8f4fd;
    text-align: center;
    padding: 4px 0;
    font-size: 12px;
    color: #666;
}

.header-main {
    padding: 8px 0;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    color: #1e73be;
    width: 200px;
}

.logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    font-size: 14px;
    transition: color 0.3s;
}

.nav a:hover {
    color: #1e73be;
}

.consultation-btn {
    background: #00ad00;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 195, 0, 0.3);
}

.consultation-btn i {
    font-size: 16px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.nav-mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    transition: left 0.3s ease;
    z-index: 1005;
    padding-top: 80px;
    overflow-y: auto;
}

.nav-mobile.active {
    left: 0;
}



.nav-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-mobile ul li {
    border-bottom: 1px solid #eee;
}

.nav-mobile ul li a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.nav-mobile-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    z-index: 1010;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 0 10px;
}

.nav-close {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.nav-close:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* ハンバーガーメニュー内のキーワードセクション */
.nav-mobile-keywords {
    padding: 30px 20px 20px 20px;
    text-align: center;
}

.keywords-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.keyword-tags-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.keyword-tags-mobile a,
.keyword-tag-mobile {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #666;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.keyword-tags-mobile a:hover,
.keyword-tag-mobile:hover {
    background: #1e73be;
    color: white;
    border-color: #1e73be;
}

/* ハンバーガーメニュー内のLINEボタン */
.nav-mobile .consultation-btn {
    display: block;
    position: static;
    margin: 30px auto 20px auto;
    padding: 16px 24px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    text-decoration: none;
    max-width: calc(100% - 40px);
}

/* =============================================================================
   メインコンテンツ（home.php用）
   ============================================================================= */

.main-content {
    margin-top: 130px;
}

/* メインビジュアルセクション */
.main-visual-section {
    padding: 20px;
    margin: 0;
    width: 100%;
}

.main-visual-carousel {
    width: 100%;
    margin: 0;
    padding: 0;
}

.main-visual {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin: 0 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}

.main-visual.slick-center {
    transform: scale(1);
    opacity: 1;
    z-index: 2;
}

.main-visual:not(.slick-center) {
    transform: scale(0.9);
    opacity: 0.7;
}

.main-visual-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Slick Carousel カスタマイズ */
.slick-dots {
    position: relative;
    bottom: auto;
    margin-top: 10px;
    z-index: 10;
}

.slick-dots li button:before {
    color: #ccc;
    font-size: 12px;
    opacity: 0.5;
}

.slick-dots li.slick-active button:before {
    color: #333;
    opacity: 1;
}

.slick-prev,
.slick-next {
    z-index: 10;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
}

.slick-prev {
    left: 30px;
}

.slick-next {
    right: 30px;
}

.slick-prev:before,
.slick-next:before {
    font-size: 20px;
    color: white;
}

.slick-list {
    overflow: hidden;
}

.slick-track {
    display: flex;
    align-items: center;
}

.slick-dotted.slick-slider{
    margin-bottom: 0 !important;
}

/* =============================================================================
   セクション共通スタイル（home.php用）
   ============================================================================= */

.section {
    padding: 60px 0;
    background: white;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-header.with-icon {
    gap: 8px;
}

.section-icon {
    color: #1e73be;
    font-size: 24px;
    display: flex;
    align-items: center;
    position: relative;
    top: -2px;
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-right: 15px;
    font-family: "Montserrat", sans-serif, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif;
}

.section-subtitle {
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

/* 記事グリッド（home.php用） */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.article-image {
    position: relative;
    height: 200px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #1e73be;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.article-content {
    padding: 25px;
}

.article-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
}

.article-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    color: #999;
    font-size: 14px;
}

/* カテゴリーグリッド（home.php用） */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #1e73be, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.category-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-link {
    color: #1e73be;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.category-link:hover {
    color: #2980b9;
}

/* キーワード（home.php用） */
.keywords {
    margin-top: 40px;
    text-align: center;
}

.keywords h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.keyword-tag {
    background-color: #f5f5f5;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.keyword-tag:hover {
    background: #1e73be;
    color: white;
    border-color: #1e73be;
}

/* もっと見るボタン（home.php用） */
.more-link {
    text-align: center;
    margin-top: 40px;
}

.more-btn {
    background: white;
    color: #1e73be;
    padding: 15px 30px;
    border: 1px solid #1e73be;
    border-radius: 8px;
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.more-btn:hover {
    background: #1e73be;
    color: white;
}

/* =============================================================================
   アーカイブページスタイル（archive.php、archive-term.php用）
   ============================================================================= */

.archive-container {
    max-width: 1200px;
    margin: 80px auto 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* single.php用のスタイル調整 */
body.single {
    background-color: #f8f9fa;
}

body.single .archive-container {
    margin: 40px auto 0 auto;
}

.archive-main {
    background: white;
    padding: 30px;
    box-shadow: 0 2px 1px rgba(145, 145, 145, 0.1);
}

.archive-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1e73be;
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-title i {
    color: #1e73be;
}

/* カテゴリ説明（archive-term.php用） */
.category-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

/* 記事リスト */
.post-list-archive {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-item-archive {
    border-bottom: 1px solid #eee;
}

.post-item-link {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s;
}

.post-item-link:hover {
    background-color: #f9f9f9;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 5px;
}

.post-item-archive:last-child {
    border-bottom: none;
}

.post-thumbnail-archive {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail-archive img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content-archive {
    flex: 1;
}

.post-title-archive {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
    transition: color 0.3s;
}

.post-item-link:hover .post-title-archive {
    color: #1e73be;
}

.post-excerpt-archive {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta-archive {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.post-category-archive {
    background: #1e73be;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* =============================================================================
   サイドバースタイル（共通）
   ============================================================================= */

.sidebar-widget {
    background: white;
    padding: 25px;
    margin: 15px 0;
    box-shadow: 0 2px 1px rgba(145, 145, 145, 0.1);
}

.sidebar-widget:first-child {
    margin-top: 0 !important;
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e73be;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: #1e73be;
    font-size: 16px;
}

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

.category-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.category-item a:hover {
    color: #1e73be;
}

.category-item.current a {
    color: #1e73be;
    font-weight: bold;
}

.category-count {
    background: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.popular-post-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-post-item:last-child {
    border-bottom: none;
}

.popular-post-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.popular-post-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.popular-post-content h4 a:hover {
    color: #1e73be;
}

.popular-post-date {
    font-size: 12px;
    color: #999;
}

/* ページネーション */
.archive-pagination {
    margin-top: 40px;
    text-align: center;
}

.archive-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: white;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.archive-pagination .page-numbers.current {
    background: #1e73be;
    color: white;
    border-color: #1e73be;
}

.archive-pagination .page-numbers:hover {
    background: #f5f5f5;
}

/* =============================================================================
   フッタースタイル（home.php用）
   ============================================================================= */

.footer {
    background: #2c3e50;
    color: white;
    padding: 20px 0 20px 0;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1e73be;
}

.footer-tagline {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 14px;
}

.footer-contact .phone-number {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

.footer-contact .business-hours {
    color: #fff;
    margin-bottom: 20px;
    font-size: 14px;
}

.contact-btn {
    background: #1e73be;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-nav a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 18px;
}

.social-icons a:hover {
    color: white;
    background: #1e73be;
}

.footer-bottom {
    background: #2c3e50;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.footer-bottom-icons {
    display: flex;
    gap: 15px;
}

.footer-bottom-icons a {
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom-icons a:hover {
    color: white;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-bottom-links a:hover {
    color: white;
}

.footer-copyright {
    color: #fff;
    font-size: 14px;
}

/* =============================================================================
   レスポンシブデザイン
   ============================================================================= */

@media (max-width: 768px) {
    /* ヘッダー */
    .logo {
        width: 120px;
    }

    .header-main {
        padding: 15px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav {
        display: none;
    }

    .consultation-btn {
        position: absolute;
        right: 50px;
        font-size: 12px;
        padding: 8px 14px;
    }

    .hamburger {
        display: flex;
    }

    /* メインコンテンツ */
    .main-content {
        margin-top: 100px;
    }

    .main-visual {
        height: auto;
        aspect-ratio: 16/9;
        margin: 0;
    }

    .main-visual:not(.slick-center) {
        transform: none;
        opacity: 1;
    }

    .main-visual-bg {
        position: relative;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .slick-prev {
        left: 10px;
    }

    .slick-next {
        right: 10px;
    }

    .slick-prev,
    .slick-next {
        width: 30px;
        height: 30px;
    }

    .slick-prev:before,
    .slick-next:before {
        font-size: 16px;
    }

    .slick-dots {
        margin-top: 15px;
    }

    .slick-dots li button:before {
        font-size: 10px;
    }

    /* セクション */
    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-icon {
        font-size: 20px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* アーカイブページ */
    .archive-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }

    /* single.php用のarchive-container（モバイル版margin-top調整） */
    body.single .archive-container {
        margin: 20px auto 0 auto;
        padding: 20px 10px;
    }
    
    .post-item-archive {
        border-bottom: 1px solid #eee;
    }
    
    .post-item-link {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }
    
    .post-item-link:hover {
        background-color: #f9f9f9;
        padding: 20px 0;
        margin: 0;
        border-radius: 0;
    }
    
    .post-thumbnail-archive {
        width: 100%;
        height: 200px;
    }
    
    .archive-main,
    .sidebar-widget {
        padding: 20px;
    }

    /* フッター */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* =============================================================================
   サイドバー検索ウィジェット - カスタムスタイル
   ============================================================================= */

.search-form-wrapper {
    position: relative;
}

.sidebar-search-form {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.sidebar-search-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-size: 14px;
    outline: none;
    background: #f8f9fa;
    color: #666;
}

.sidebar-search-button {
    background: #1e73be;
    color: white;
    border: none;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 0 6px 6px 0;
}

.sidebar-search-button i {
    font-size: 14px;
}

/* =============================================================================
   サイドバーカテゴリータグ - カスタムスタイル
   ============================================================================= */

.category-tag {
    background: #f5f5f5;
    color: #666;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    display: inline-block;
}

.category-tag:hover {
    background: #1e73be;
    color: white;
}

.category-tag.current {
    background: #ff7043;
    color: white;
}

.category-tag.current:hover {
    background: #ff7043;
    color: white;
}

.all-categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
} 

.post-template-default {
    background-color: #f8f9fa;
}

.post-template-default .archive-container{
    margin-top: 0 !important;
    padding: 20px 0;
}
@media (max-width: 768px) {
    .post-template-default .l-container{
        padding: 0 !important;
        margin-top: 20px;
    }
}