/*
Theme Name: Xeory Child Kakan
Template: xeory_base
Description: 陰嚢湿疹情報サイト用カスタムテーマ
*/

/* ==========================================================================
   変数定義
   ========================================================================== */
:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #ff6b6b;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-lighter: #ffffff;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
    .home #content {
        padding-top: 90px !important;
    }

    #header {
        padding: 10px 0 10px !important;
    }

   .kakan-header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 管理バーが表示されている場合の調整 */
.admin-bar .kakan-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .kakan-header {
        top: 46px;
    }
}

.kakan-header.hidden {
    transform: translateY(-100%);
}

.header-inner {
    background-color: #fff;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px; /* 70px → 60pxに変更 */
    padding: 0 20px;
}

/* ロゴ */
.header-logo {
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: 22px; /* 24px → 22pxに変更 */
}

.site-title a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.site-title i {
    font-size: 24px; /* 28px → 24pxに変更 */
}

.logo-text {
    font-weight: bold;
}

/* ナビゲーション */
.header-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
    font-size: 15px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 検索フォーム */
.header-search {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-field {
    width: 180px;
    padding: 6px 35px 6px 12px; /* パディング調整 */
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 220px;
}

.search-submit {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.search-submit:hover {
    color: var(--primary-color);
}

/* モバイルメニューボタン */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.mobile-menu-toggle span:nth-child(1) { top: 6px; }
.mobile-menu-toggle span:nth-child(2) { top: 14px; }
.mobile-menu-toggle span:nth-child(3) { top: 22px; }

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 14px;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 14px;
}

/* モバイルメニュー */
.mobile-menu {
    position: fixed;
    top: 60px; /* 70px → 60pxに変更 */
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

/* 管理バーが表示されている場合の調整 */
.admin-bar .mobile-menu {
    top: 92px; /* 60px + 32px */
}

@media screen and (max-width: 782px) {
    .admin-bar .mobile-menu {
        top: 106px; /* 60px + 46px */
    }
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-inner {
    padding: 20px;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin-bottom: 15px;
}

.mobile-nav-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s;
}

.mobile-nav-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.mobile-search-form {
    display: flex;
    gap: 10px;
}

.mobile-search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
}

.mobile-search-form button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

/* ==========================================================================
   コラム一覧セクション
   ========================================================================== */
.column-section {
    margin-bottom: 80px;
}

.column-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.column-section .section-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.column-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* コラムグリッド */
.column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.column-item {
    background-color: var(--bg-lighter);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.column-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.column-link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

.column-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: var(--bg-light);
}

.column-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.column-item:hover .column-thumbnail img {
    transform: scale(1.05);
}

.column-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-color);
    font-size: 48px;
}

.column-thumbnail.no-image i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.column-content {
    padding: 20px;
}

.column-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.column-meta {
    font-size: 14px;
    color: var(--text-light);
}

.column-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.column-date i {
    font-size: 12px;
}

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

.no-posts {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    padding: 40px;
}

/* ボタンスタイル */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color) !important;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

.btn-primary i,
.btn-secondary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i,
.btn-secondary:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   フッター
   ========================================================================== */
.kakan-footer {
    background-color: var(--text-color);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-inner {
    width: 100%;
}

.footer-top {
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

/* フッターブランド */
.footer-brand {
    max-width: 400px;
}

.footer-logo {
    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo i {
    color: var(--primary-light);
}

.footer-description {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
}

/* フッターメニュー */
.footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-menu a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-menu a:hover {
    color: #fff;
}

/* フッター下部 */
.footer-bottom {
    text-align: center;
}

.copyright {
    margin: 0;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

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

/* タブレット */
@media (max-width: 1024px) {
    .column-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* スマートフォン */
@media (max-width: 768px) {
    /* ヘッダー */
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-container {
        padding: 0 15px;
        height: 50px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .site-title i {
        font-size: 20px;
    }
    
    /* コラムグリッド */
    .column-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .column-section {
        margin-bottom: 60px;
    }
    
    .column-section .section-header {
        margin-bottom: 30px;
    }
    
    .column-section .section-title {
        font-size: 24px;
    }
    
    .column-title {
        font-size: 16px;
    }
    
    /* フッター */
    .footer-content {
        flex-direction: column;
    }
    
    .footer-brand {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 15px;
    }
}

/* 小さいスマートフォン */
@media (max-width: 480px) {
    /* ボタン */
    .btn-primary,
    .btn-secondary {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* ==========================================================================
   コンテンツエリアの調整
   ========================================================================== */
#content {
    padding-top: 60px; /* ヘッダーの高さ分 */
    background-color: #ffffff; /* 背景色を白に */
}

/* 管理バーが表示されている場合の調整 */
.admin-bar #content {
    padding-top: 92px; /* 60px + 32px */
}

@media screen and (max-width: 782px) {
    .admin-bar #content {
        padding-top: 106px; /* 60px + 46px */
}
}

/* ==========================================================================
   Xeoryテーマとの調整
   ========================================================================== */

/* メインコンテンツエリアの調整 */
body.home #main {
    background-color: transparent;
}

body.home .main-inner {
    padding-top: 40px;
}

/* サイドバーとの位置調整 */
body.home #side {
    padding-top: 40px; /* メインコンテンツと同じ上部余白 */
}

/* サイドバーとの間隔調整 */
@media (min-width: 992px) {
    body.home #main.col-md-8 {
        padding-right: 30px;
    }
}

/* Xeoryのデフォルトスタイルを上書き */
body.home .post-loop-wrap {
    margin-top: 0;
}

/* Xeoryのデフォルトヘッダーを非表示 */
body .header {
    display: none;
}

/* Font Awesomeアイコンの調整 */
.fas, .far {
    line-height: 1;
}