/* =====================================
   BlogBooth Next - Cleaned & Optimized
   ===================================== */

:root {
  --bb-bg: #ffffff;
  --bb-text: #111;
  --bb-muted: #666;
  --bb-border: #e8e8ee;
  --bb-card: #fff;
  --bb-soft: #f6f7fb;
  --bb-radius: 16px;
  --bb-shadow: 0 8px 28px rgba(15, 18, 25, 0.08);
  --bb-max: 1040px;
  --bb-island-max: 1080px;
  --bb-pad: 20px;
  --bb-primary: #2563eb;
  --bb-primary-ink: #fff;
  --bb-accent-grad: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
}

/* --- Base --- */
* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bb-bg);
  color: var(--bb-text);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  background-color: #ffffff;
  background-image: radial-gradient(#e2e8f0 0.8px, transparent 0.8px);
  background-size: 30px 30px;
  background-attachment: fixed;
  overflow-x: hidden
}
a { color: inherit; text-decoration: none; transition: 0.2s; }
a:hover { text-decoration: none; opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }

/* --- Layout --- */
.bb-container {
  max-width: var(--bb-max);
  width: 92%;
  margin: 0 auto;
}
.bb-main { padding-bottom: 60px; }

/* --- Header (Floating Island) --- */

.bb-header-floating {
  transition: transform 0.4s cubic-bezier(.16, 1, .3, 1), opacity 0.3s ease;
  position: fixed;
  top: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 9999;
}

/* スクロール開始時に適用されるスタイル */
.bb-header-floating.is-hidden {
  transform: translateY(-120%); 
  opacity: 0;                   
}

.bb-island {
  pointer-events: auto;
  width: 95%;
  max-width: var(--bb-island-max);
  margin:0 auto;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  padding: 10px 14px 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bb-island.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  transform: scale(0.98);
  padding: 8px 12px 8px 20px;
}

.bb-logo__img { height: 20px; width: auto; display: block;transform: translateY(2px);}

.bb-island__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search & Dropdown inside Island */
.bb-island__search-wrap { position: relative; display: flex; align-items: center; }
.bb-island__search-input {
  width: 140px; height: 34px; background: rgba(0, 0, 0, 0.04);
  border: none; border-radius: 999px; padding: 0 10px 0 32px; font-size: 13px;
  transition: 0.3s;
}
.bb-island__search-wrap {
  position: relative;
}

/* 検索結果のドロップダウン本体 */
.bb-search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0; /* 右揃えにしてボタン類とのバランスを取る */
  width: 320px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 8px;
  display: none; /* JSで制御 */
  z-index: 10000;
  max-height: 400px;
  overflow-y: auto;
}

/* 検索結果が表示されている時 */
.bb-search-results.is-active {
  display: block;
  animation: bbFadeInUp 0.2s ease-out;
}

@keyframes bbFadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.bb-search-item {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.bb-search-item:hover {
  background: var(--bb-soft);
  transform: translateX(4px);
}

.bb-search-item__title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--bb-text);
  margin-bottom: 2px;
}

.bb-search-item__desc {
  display: block;
  font-size: 11px;
  color: var(--bb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 検索結果がない時 */
.bb-search-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--bb-muted);
}

.bb-island__btn {
  background: transparent;
  border: none;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  /* 標準ボタンの見た目を完全にリセット */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.bb-island__btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--bb-primary);
}
.bb-island__search-input:focus { width: 200px; background: #fff; outline: none; box-shadow: 0 0 0 2px var(--bb-primary); }
.bb-island__search-icon { position: absolute; left: 10px; color: var(--bb-muted); }

.bb-island__dropdown { position: relative; }
.bb-island__menu-content {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(10px);
  background: #fff; border-radius: 12px; padding: 8px; min-width: 150px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); opacity: 0; visibility: hidden; transition: 0.2s;
}
.bb-island__dropdown:hover .bb-island__menu-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.bb-island__menu-content a { display: block; padding: 8px 12px; font-size: 14px; border-radius: 8px; }
.bb-island__menu-content a:hover { background: var(--bb-soft); color: var(--bb-primary); }

.bb-btn-share-x {
  background: #3b82f6; color: #fff; font-size: 12px; font-weight: 800;
  padding: 6px 14px; border-radius: 33px; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* --- Hero Section --- */
.bb-hero-adobe { padding-top: 100px; background: #fff; }
.bb-hero-flex { display: flex; align-items: center; gap: 48px; }
.bb-hero-text { flex: 1.1; }
.bb-hero-visual { flex: 0.9; }

.bb-hero__label { font-size: 13px; color: var(--bb-muted); margin-bottom: 12px; }
.bb-hero__title { font-size: 36px; line-height: 1.2; margin: 0 0 20px; letter-spacing: -0.02em; }
.bb-hero__lead { font-size: 15px; color: #4b5563; margin-bottom: 30px; max-width: 600px; }

.bb-hero-visual img { border-radius: 12px; }

/* --- Common UI Components --- */
.bb-btn--primary.bb-btn--lg {
  display: inline-flex; align-items: center; padding: 12px 26px;
  font-size: 1.1rem; font-weight: 800; color: #fff;
  border-radius: 999px; background: var(--bb-accent-grad);
  box-shadow: 0 10px 25px rgba(244, 114, 182, 0.3);
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bb-btn--primary.bb-btn--lg:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(244, 114, 182, 0.45); }

.bb-breadcrumb {
  max-width: var(--bb-max);
  width: 92%;
  margin: 35px auto 25px;
  font-size: 13px;
  color: var(--bb-muted);
  display: flex;
  align-items: center;
  padding: 0;
  /* --- 追加：1行に収めて省略する設定 --- */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-breadcrumb a {
  color: var(--bb-primary);
  text-decoration: none;
  flex-shrink: 0; /* HomeやToolsの文字が潰れるのを防ぐ */
}

.bb-breadcrumb__separator {
  margin: 0 8px;
  color: #d1d5db;
  flex-shrink: 0; /* 区切り線が消えないように固定 */
}

/* タイトル部分（span）を優先的に省略させる */
.bb-breadcrumb span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0; /* flex内の省略を正常に機能させる */
}

/* --- Step Section --- */
.bb-intro-steps {
  background: var(--bb-accent-grad); padding: 80px 0; color: #fff;
}
.bb-step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.bb-step-card { background: #fff; color: var(--bb-text); padding: 30px; border-radius: var(--bb-radius); }

/* --- Footer --- */
.bb-footer { margin-top: 40px; background: #fff; }
.bb-footer-divider {
  overflow: hidden ;
  width: 100% ;
}
.bb-footer-divider svg { width: 100%; left:0;height: 80px; transform: none; }
.bb-footer__inner {
  max-width: var(--bb-max); 
  width: 92%;
  margin: 0 auto;
  padding:0 0 20px; 
}

.bb-footer__bottom-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.bb-footer__copy { font-size: 12px; color: #9ca3af; }
.bb-footer__policy-links {list-style: none; display: flex; gap: 24px; font-size: 12px; color: var(--bb-muted); }
.bb-footer__policy-links li {margin: 0;padding: 0;}
/* --- Responsive --- */
@media (max-width: 768px) {
  .bb-hero-flex { flex-direction: column-reverse; text-align: center; gap: 24px; }
  .bb-hero-text { text-align: center;padding: 0 5px; }
  .bb-hero__lead { margin-inline: auto; }
  .bb-step-grid { grid-template-columns: 1fr; }
  .bb-footer__bottom-flex { flex-direction: column-reverse; gap: 20px; text-align: center; }
  .bb-footer__policy-links {padding-left:0;}
  .bb-island__search-wrap, .bb-island__dropdown { display: none; } /* SP簡略化 */
}
/* top gate */
.top-gate-banner {margin:80px 0;padding: 20px 0;background-color: #fbfbfb;border-top: 1px solid #eee;border-bottom: 1px solid #eee;}
.top-gate-banner__inner {max-width: 1030px;margin: 0 auto;display: flex;align-items: center;gap: 35px;}
.top-gate-banner__visual {flex: 0 0 430px;}
.top-gate-banner__visual img {filter: drop-shadow(0 15px 30px rgba(0,0,0,0.1));max-width: 100%;height: auto;}
.top-gate-banner__body {flex: 1;}
.top-gate-banner__title {margin-top: 10px; display: flex; align-items: center; font-size: 36px; font-weight: 700; color: #000; letter-spacing: -0.02em; }
.top-gate-banner__title span { display: flex; align-items: center; margin-left: 15px; font-size: 26px; font-weight: 600; color: #888; letter-spacing: 0.1px; }
.top-gate-banner__title span::before { content: ""; display: inline-block; width: 1px; height: 45px; margin-right: 15px; background: #ddd; }
.top-gate-banner__text {font-size: 15px;line-height: 1.7;letter-spacing:0.5px;color: #555;margin-bottom: 30px;}
.top-gate-banner__note {font-size: 12px;margin-top: 10px;display: block;}
.top-gate-banner__button {display: inline-block;padding: 15px 30px;background: linear-gradient(135deg, #a855f7, #ec4899);color: #fff;font-size: 16px;font-weight: bold;border-radius: 50px;box-shadow: 0 10px 20px rgba(236, 72, 153, 0.2);transition: .2s;}
.top-gate-banner__action {margin-bottom: 25px;}
.top-gate-banner__button:hover {transform: translateY(-2px);opacity: .9;}

@media (max-width: 768px) {
    .top-gate-banner {padding: 40px 0;margin: 50px 0;}
    .top-gate-banner__text {margin: 0 25px 30px;}
    .top-gate-banner__inner {flex-direction:column-reverse;text-align: center;gap: 0;}
    .top-gate-banner__visual {flex: 0 0 auto;width: 80%;max-width: 300px;}
    .top-gate-banner__title {justify-content: center;}
}



/* ツール一覧のグリッドレイアウト */
.bb-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

/* カード全体のデザイン */
.bb-tool-card {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bb-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: var(--bb-primary);
}

/* サムネイル（画像）部分 */
.bb-tool-card__thumb {
    position: relative;
    background: #f8fafc;
    width: 100%;
    aspect-ratio: 8 / 7;
    overflow: hidden;
    display: block;
    /*place-items: center;*/
}

.bb-tool-card__thumb img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* テキスト部分 */
.bb-tool-card__body {
    padding: 0 20px 20px;
    flex-grow: 1;
}

.bb-tool-card__title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #111;
}

.bb-tool-card__desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* メタ情報（タグなど） */
.bb-tool-card__meta {
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
}

.bb-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    background: #f1f5f9;
    color: #64748b;
}

.bb-pill--soft {
    background: rgba(37, 99, 235, 0.08);
    color: var(--bb-primary);
}
/* カテゴリ一覧のグリッド（1040px幅に最適化） */
.bb-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

/* カテゴリカード */
.bb-category-card {
    background: #fff;
    border: 1px solid #eef0f5;
    padding: 32px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.bb-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: var(--bb-primary);
}

.bb-category-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #111;
}

.bb-category-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 注目ツール（看板枠） */
.bb-featured-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px dashed var(--bb-primary);
    padding: 40px;
    border-radius: 24px;
    margin-top: 24px;
    text-align: center;
}

.bb-featured-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--bb-primary);
    margin-bottom: 12px;
}

/* related carousel */
.bb-related-area { margin-top: 100px; padding-top: 50px; border-top: 1px solid #eee; }
.bb-carousel { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:16px; padding:10px 0 20px; }
.bb-carousel::-webkit-scrollbar { display:none; }
.bb-carousel__item { flex: 0 0 82%; scroll-snap-align:start; }
@media (min-width: 768px){
  .bb-carousel__item { flex: 0 0 calc(33.333% - 11px); }
}
.bb-related-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
