/*
Theme Name: Kochi Insider Child
Theme URI: https://kochiinsider.com
Description: Custom child theme for Kochi Insider website
Author: Hiroshi M.
Template: astra
Version: 1.0.0
*/

/* ===========================================
   WordPress要素の非表示
   =========================================== */
.site-title, .site-description, .entry-title, .entry-header { 
  display: none !important; 
}

/* ===========================================
   CSS変数定義
   =========================================== */
:root{
  --gwg-accent: #ff5a5f;
  --gwg-text: #484848;
  --gwg-muted: #717171;
  --gwg-border: #e4e4e4;
  --gwg-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ===========================================
   ロゴ＆ブランドエリア
   =========================================== */
.custom-brand-area {
  max-width: 1150px;
  margin: 30px auto 10px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 25px;
}
.custom-logo {
  height: 110px;
  width: auto;
}
.brand-text-wrap {
  display: flex;
  flex-direction: column;
  border-left: 2px solid #e4e4e4;
  padding-left: 25px;
}
.custom-main-title {
  font-size: 28px;
  font-weight: 800;
  color: #222;
  margin: 0 0 5px 0;
  line-height: 1.2;
}
.custom-subtitle {
  font-size: 16px;
  color: #717171;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}

/* ===========================================
   全体レイアウト
   =========================================== */
.gwg-container{
  display:flex;
  flex-direction:row;
  gap:40px;
  max-width:1150px;
  margin:10px auto 40px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--gwg-text);
  scroll-behavior:smooth;
}

.gwg-sidebar{ flex:1; min-width:300px; }
.gwg-main{ flex:2.2; min-width:320px; }

.gwg-card{
  background:#fff;
  border:1px solid var(--gwg-border);
  border-radius:12px;
  padding:25px;
  box-shadow:var(--gwg-shadow);
  margin-bottom:25px;
}

.gwg-sidebar-card{
  text-align:center;
  position:sticky;
  top:20px;
}

.gwg-profile-img{
  width:160px;
  height:160px;
  border-radius:50%;
  object-fit:cover;
  margin:0 auto 15px;
  border:4px solid #fff;
  box-shadow:0 4px 10px rgba(0,0,0,0.1);
}

.gwg-btn-primary{
  display:block;
  background:var(--gwg-accent);
  color:#fff !important;
  text-align:center;
  padding:16px;
  border-radius:8px;
  text-decoration:none;
  font-weight:bold;
  font-size:18px;
  margin-bottom:15px;
}

.gwg-btn-instagram{
  display:block;
  background:#fff;
  color:#E1306C !important;
  text-align:center;
  padding:12px;
  border-radius:8px;
  text-decoration:none;
  font-weight:bold;
  font-size:16px;
  margin-bottom:20px;
  border:2px solid #E1306C;
  transition:0.3s;
}
.gwg-btn-instagram:hover{ background:#E1306C; color:#fff !important; }

/* ===========================================
   タブメニュー
   =========================================== */
.gwg-tabs{
  display:flex;
  border-bottom:1px solid #ddd;
  margin-bottom:30px;
  position:sticky;
  top:70px;
  background:white;
  z-index:10;
  padding-top:10px;
}

html{ scroll-padding-top:110px; }

.gwg-tab-link{
  padding:15px 25px;
  font-weight:bold;
  color:var(--gwg-muted);
  text-decoration:none;
  border-bottom:3px solid transparent;
  font-size:16px;
}
.gwg-tab-link:hover, .gwg-tab-link.active { 
  color:#222; 
  border-bottom:3px solid var(--gwg-accent); 
}

/* ===========================================
   ツアーグリッド
   =========================================== */
.gwg-tour-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:20px;
  margin-bottom:40px;
}

.gwg-tour-card{
  background:#fff;
  border:1px solid var(--gwg-border);
  border-radius:12px;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  transition:0.3s;
  display:flex;
  flex-direction:column;
}
.gwg-tour-card:hover{
  transform:translateY(-5px);
  box-shadow:0 10px 20px rgba(0,0,0,0.1);
}

.gwg-tour-img-wrap{
  width:100%;
  aspect-ratio:4 / 3;
  overflow:hidden;
  background:#f0f0f0;
  position:relative;
}
.gwg-tour-img{ width:100%; height:100%; object-fit:cover; }

.gwg-badge{
  position:absolute;
  top:12px;
  left:12px;
  background:rgba(255,255,255,0.9);
  padding:4px 10px;
  border-radius:4px;
  font-size:12px;
  font-weight:bold;
  color:#555;
}

.gwg-tour-content{
  padding:20px;
  display:flex;
  flex-direction:column;
  flex-grow:1;
}

.gwg-tour-title{
  font-size:17px;
  font-weight:bold;
  color:#222;
  margin-bottom:10px;
  line-height:1.4;
  height:auto;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.gwg-tour-footer{
  border-top:1px solid #eee;
  padding-top:15px;
  margin-top:auto;
  font-weight:bold;
  color:#222;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tour-price {
  font-size: 20px;
  font-weight: bold;
  color: #222;
}

.currency-dropdown {
  position: relative;
  display: inline-block;
}

.currency-dropdown-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #666;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.currency-dropdown-btn:hover {
  background: #e8e8e8;
  border-color: #bbb;
}

.dropdown-arrow {
  font-size: 10px;
  color: #999;
}

.currency-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  bottom: auto;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 100;
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
}

.currency-dropdown-menu.show {
  display: block;
}

.currency-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #444;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.currency-option:last-child {
  border-bottom: none;
}

.currency-option:hover {
  background: #f5f5f5;
}

.currency-option:active {
  background: #e8e8e8;
}

/* ===========================================
   レビューカード
   =========================================== */
.gwg-review-card{
  background:#fff;
  border:1px solid var(--gwg-border);
  border-radius:12px;
  padding:30px;
  margin-bottom:30px;
}

.gwg-review-header{ 
  display:flex; 
  align-items:center; 
  margin-bottom:15px; 
}

.gwg-review-avatar{
  width:45px;
  height:45px;
  background:var(--gwg-accent);
  color:white;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
  margin-right:15px;
  font-size:20px;
}

.gwg-stars{ 
  color:#ffb400; 
  font-size:16px; 
  margin-bottom:10px; 
}

.gwg-owner-reply{
  background:#f8f9fa;
  border-left:4px solid #ddd;
  padding:20px;
  border-radius:0 8px 8px 0;
  margin-top:20px;
  font-size:15px;
}

.read-more-state{ display:none; }
.read-more-target{ display:none; }
.read-more-trigger{
  color:#0073aa;
  cursor:pointer;
  font-weight:bold;
  font-size:14px;
  display:inline-block;
  margin-top:10px;
}
.read-more-state:checked ~ .read-more-target{ display:block; }
.read-more-state:checked ~ .read-more-trigger{ display:none; }

#more-reviews{ display:none; }
.show-more-reviews-btn{
  display:block;
  width:100%;
  padding:18px;
  text-align:center;
  border:2px solid #222;
  border-radius:10px;
  font-weight:bold;
  cursor:pointer;
  font-size:16px;
  margin-top:20px;
}

/* ===========================================
   ブログリンク
   =========================================== */
.gwg-blog-links{
  text-align:left;
  margin-top:18px;
  border-top:1px solid #eee;
  padding-top:15px;
  font-size:14px;
  line-height:2;
}
.gwg-blog-links a{
  color:#0073aa;
  text-decoration:none;
}
.gwg-blog-links a:hover{ text-decoration:underline; }

/* ===========================================
   フッター
   =========================================== */
.gwg-footer {
  background: #f8f8f8;
  border-top: 1px solid #e4e4e4;
  padding: 30px 20px;
  margin-top: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.gwg-footer-content {
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.gwg-footer-left {
  color: #717171;
  font-size: 14px;
}

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

.gwg-footer-links a {
  color: #484848;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.gwg-footer-links a:hover {
  color: #ff5a5f;
}

/* ===========================================
   モバイル対応
   =========================================== */
@media (max-width: 850px){
  .custom-brand-area { 
    flex-direction: column; 
    text-align: center; 
    gap: 15px; 
    margin-top: 15px; 
  }
  .brand-text-wrap { 
    border-left: none; 
    padding-left: 0; 
  }
  .custom-main-title { font-size: 22px; }
  .custom-logo { height: 95px; }

  .gwg-container{ 
    flex-direction:column; 
    padding:15px; 
    padding-bottom:90px; 
  }

  .gwg-tour-grid{
    display:flex;
    overflow-x:auto;
    gap:15px;
    margin-bottom:40px;
    padding-bottom:10px;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x mandatory;
  }
  .gwg-tour-card{
    flex:0 0 80%;
    scroll-snap-align:start;
  }

  .gwg-sidebar-card{ position:static; }

  .gwg-review-card{
    padding:22px 18px;
    margin-left:-10px;
    margin-right:-10px;
  }
  .gwg-review-body{
    font-size:15px;
    line-height:1.75;
  }
  .gwg-owner-reply{
    font-size:14px;
    line-height:1.7;
  }

  .gwg-tabs{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    top:auto;
    margin:0;
    padding:10px 10px;
    background:white;
    z-index:999;
    border-top:1px solid #ddd;
    border-bottom:none;
    justify-content:space-around;
  }
  .gwg-tab-link{
    padding:10px 8px;
    font-size:13px;
    border-bottom:0;
  }

  html{ scroll-padding-top:90px; }
  
  .gwg-footer-content {
    flex-direction: column;
    text-align: center;
  }
  
 .gwg-footer-links {
    justify-content: center;
  }

  #availability > div:first-of-type {
    grid-template-columns: 1fr !important;
  }
}

/* ===========================================
   ツアー詳細ページ専用CSS
   =========================================== */
.tour-container, .tour-container * { box-sizing: border-box; }

/* スマホ幅崩れの根本対策：flex子要素が縮められるようにする */
.tour-main, .tour-sidebar { min-width: 0; }

.tour-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #484848;
    line-height: 1.8;
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    width: 100%;
    overflow-x: hidden;
}
.tour-main { flex: 2.2 1 0; }
.tour-sidebar { flex: 1 1 0; }

/* 長い英単語/URLで横はみ出し対策 */
.tour-container p,
.tour-container li {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 画像がテーマ側で崩されないように共通で制御 */
.tour-container img{
    max-width: 100%;
    height: auto;
    display: block;
}

/* ヒーロー画像 */
.tour-hero {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 30px;
    display: block;
    object-fit: cover;
}

/* サイドバー */
.sidebar-card {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    text-align: center;
}
.btn-msg {
    display: block;
    width: 100%;
    background: #ff5a5f;
    color: #fff !important;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    transition: 0.3s;
}
.btn-msg:hover { background: #e04a4f; }

/* 価格注記 */
.price-note {
    font-size: 12px;
    color: #777;
    line-height: 1.6;
    margin-top: 10px;
}

/* セクション */
.section-box {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}
.section-h2 {
    font-size: 24px;
    font-weight: bold;
    color: #222;
    margin-bottom: 20px;
}

/* 行程表 */
.timeline-item { display: flex; gap: 0; margin-bottom: 35px; }
.tl-time { min-width: 100px; font-weight: bold; color: #ff5a5f; font-size: 16px; }
.tl-body { border-left: 2px solid #eee; padding-left: 25px; flex: 1; min-width: 0; }
.tl-title { font-weight: bold; font-size: 18px; margin-bottom: 10px; color: #222; }

/* リストスタイル */
.inclusion-list { list-style: none; padding: 0; margin-top: 15px; }
.inclusion-list li { margin-bottom: 10px; padding-left: 25px; position: relative; }

/* ツアーページ用フォトギャラリー */
.tour-photo-section { margin: 0 0 40px; }
.tour-photo-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:14px;
    margin-top: 16px;
    min-width: 0;
}
.tour-photo-item{
    position:relative;
    border-radius:12px;
    overflow:hidden;
    aspect-ratio: 4 / 3;
    background:#f0f0f0;
    border:1px solid #eaeaea;
    min-width: 0;
}
.tour-photo-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.tour-photo-cap{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    padding:26px 12px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    color:#fff;
    font-weight:bold;
    font-size:13px;
    line-height:1.3;
}

/* その他のツアー（下部） */
.other-tours-grid{
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap:16px;
    margin-top: 16px;
    min-width: 0;
}
.other-tour-card{
    display:flex;
    gap:14px;
    align-items:center;
    text-decoration:none;
    color:inherit;
    background:#fff;
    border:1px solid #e4e4e4;
    border-radius:12px;
    padding:14px;
    transition:0.25s;
    min-width: 0;
}
.other-tour-card:hover{
    border-color:#ff5a5f;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.other-tour-img{
    width:110px;
    height:80px;
    border-radius:10px;
    object-fit:cover;
    flex:0 0 auto;
    background:#f0f0f0;
}
.other-tour-title{
    font-weight:bold;
    color:#222;
    margin:0 0 6px;
    line-height:1.35;
    font-size:16px;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.other-tour-meta{
    font-size:13px;
    color:#666;
    margin:0;
    line-height:1.5;
}

/* モバイル最適化 */
@media (max-width: 850px) {
    .tour-container{
        max-width: 100%;
        width: 100%;
        margin: 10px auto 30px;
        padding: 14px 14px;
        gap: 22px;
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: clip;
    }

    .tour-main{ width: 100%; }
    .tour-sidebar{ width: 100%; }
    .sidebar-card{ position: static; }

    .tl-time { min-width: 85px; font-size: 14px; }
    .tl-body { padding-left: 16px; }
    .section-h2 { font-size: 20px; }
    .tl-title { font-size: 16px; }

    /* フォトは横スクロール */
    .tour-photo-grid{
        display:flex;
        overflow-x:auto;
        gap:12px;
        padding-bottom:10px;
        -webkit-overflow-scrolling:touch;
        scroll-snap-type:x mandatory;
    }
    .tour-photo-item{
        flex: 0 0 78%;
        scroll-snap-align:start;
    }
    .tour-photo-cap{ font-size: 14px; }

    /* その他のツアーも横スクロール */
    .other-tours-grid{
        display:flex;
        overflow-x:auto;
        gap:12px;
        padding-bottom:10px;
        -webkit-overflow-scrolling:touch;
        scroll-snap-type:x mandatory;
    }
    .other-tour-card{
        flex: 0 0 86%;
        scroll-snap-align:start;
    }
}

/* さらに狭い端末：タイムライン縦積み */
@media (max-width: 520px) {
    .timeline-item{ flex-direction: column; }
    .tl-time{ min-width: 0; margin-bottom: 6px; }
    .tl-body{ border-left: none; padding-left: 0; border-top: 2px solid #eee; padding-top: 12px; }
}

/* ===========================================
   ブログセクション
   =========================================== */
.gwg-blog-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: #717171;
  margin-top: 10px;
}

/* モバイルではハンバーガーメニューを非表示 */
@media (max-width: 768px) {
  .menu-toggle,
  .main-navigation {
    display: none !important;
  }
}
/* ===========================================
   Step 1: style.css に追加するCSS
   ※ 既存CSSの最後に追加してください
   =========================================== */

/* ===========================================
   WhatsApp フローティングボタン
   =========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 998;
  transition: all 0.3s;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #fff;
  color: #333;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
}

/* ===========================================
   CTA ボタン（Book Tour / WhatsApp）
   =========================================== */
.gwg-btn-book {
  display: block;
  background: #ff5a5f;
  color: #fff !important;
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
  transition: 0.3s;
}
.gwg-btn-book:hover {
  background: #e04a4f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 90, 95, 0.3);
}
.gwg-btn-whatsapp {
  display: block;
  background: #25D366;
  color: #fff !important;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 15px;
  transition: 0.3s;
}
.gwg-btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.gwg-btn-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  vertical-align: middle;
  margin-right: 6px;
}

/* ツアーページ用 Book / WhatsApp ボタン */
.btn-book {
  display: block;
  width: 100%;
  background: #ff5a5f;
  color: #fff !important;
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
  transition: 0.3s;
}
.btn-book:hover {
  background: #e04a4f;
}
.btn-wa {
  display: block;
  width: 100%;
  background: #25D366;
  color: #fff !important;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 15px;
  transition: 0.3s;
}
.btn-wa:hover {
  background: #1da851;
}
.btn-wa svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  vertical-align: middle;
  margin-right: 6px;
}

/* モバイル: WhatsAppフローティングボタン位置調整 */
@media (max-width: 850px) {
  .whatsapp-float {
    bottom: 100px; /* タブメニューの上に配置 */
    right: 15px;
    width: 55px;
    height: 55px;
  }
  .whatsapp-tooltip {
    display: none;
  }
}
