/*
Theme Name: jam2604
Author: Yasui
Description: 最小構成のシンプルテーマ
Version: 1.0
*/

/* =========================
   Layout
========================= */

/* コンテナ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* カード一覧 */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* ページネーション */
.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination .nav-links {
  display: inline-flex;
  gap: 8px;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border-radius: 6px;
  background: #f0f0f0;
  text-decoration: none;
  color: #333;
}

.pagination .current {
  background: #0073aa;
  color: #fff;
}

/* =========================
   Card Component
========================= */

.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 全体クリック用 */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* サムネ */
.card-thumb {
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* コンテンツ */
.card-content {
  padding: 15px;
}

/* カテゴリー */
.card-category {
  font-size: 12px;
  color: #0073aa;
  margin-bottom: 8px;
}

.card-category a {
  display: inline-block;
  background: #eef6fb;
  padding: 3px 8px;
  border-radius: 5px;
  margin-right: 5px;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

/* タイトル */
.card-title {
  font-size: 18px;
  margin-bottom: 10px;
  transition: color 0.3s;
}

/* 日付 */
.card-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

/* 抜粋 */
.card-excerpt {
  font-size: 14px;
  color: #444;
}

/* =========================
   Hover Effects
========================= */

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.card:hover .card-thumb img {
  transform: scale(1.1);
}

.card:hover .card-title {
  color: #0073aa;
}

/* =========================
   Scroll Animation
========================= */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) {
  transition-delay: 0.1s;
}
.fade-in:nth-child(3) {
  transition-delay: 0.2s;
}
.fade-in:nth-child(4) {
  transition-delay: 0.3s;
}

/* =========================
   Home
========================= */

.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.hero p {
  color: #666;
}

.home-posts {
  margin-top: 40px;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-card {
  background: #eef6fb;
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  color: #0073aa;
}

.site-logo img {
  max-height: 60px;
  width: auto;
}

/* 固定ヘッダーの基本形 */
.my-custom-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* 動きをより滑らかに */
  background: transparent;
  padding: 20px 0;
}

/* スクロール後のスタイル */
.my-custom-header.is-scrolled {
  padding: 10px 0;
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); /* Safari対策 */
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden; /* はみ出し防止 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.hero-content {
    z-index: 10; /* 文字を一番前に */
    text-align: center;
}

.hero-parallax-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.parallax-item {
    position: absolute;
    transition: transform 0.1s ease-out; /* 動きを滑らかに追従させる */
}

/* ロゴアイコンを右上に配置する例 */
.layer-1 {
    top: 20%;
    right: 15%;
    width: 200px;
    opacity: 0.6;
}

/* タイピングカーソルの点滅 */
.cursor {
    font-weight: 100;
    color: #3B82F6; /* ロゴのアクセントカラーに合わせる */
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 後続要素のフェードイン演出 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ヒーローエリア全体の背景をシンプルに */
.hero {
    background: #ffffff; /* 七色ロゴが映えるように白ベース */
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-section {
    padding: 100px 0;
    background-color: #fdfdfd;
}

.inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    letter-spacing: 0.1em;
}

.section-title span {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

/* グリッドレイアウト */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* カードの基本スタイル */
.service-card {
    position: relative;
    background: #fff;
    padding: 50px 40px;
    text-decoration: none;
    color: #333;
    border-radius: 4px; /* あえて少し角を立てるとプロっぽい */
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ホバー時の「おっ」ポイント1: 浮き上がり */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* ホバー時の「おっ」ポイント2: 七色グラデーションのバー */
.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

/*.service-card:hover::before {
    transform: translateX(0);
}*/

.service-card:hover::before,
.service-card.is-animated::before {
    transform: translateX(0);
}

/* スマホで「ふわっ」と浮き上がる動きも自動にしたい場合 */
.service-card:hover,
.service-card.is-animated {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* アイコンとテキストの装飾 */
.card-number {
    font-size: 0.8rem;
    color: #bbb;
    font-weight: bold;
    margin-bottom: 15px;
}

.card-icon {
    width: 40px;
    height: 40px;
    color: #3B82F6;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
    flex-grow: 1;
}

.card-link {
    font-size: 0.85rem;
    font-weight: bold;
    color: #3B82F6;
    letter-spacing: 0.1em;
    position: relative;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- レスポンシブ調整 --- */

/* タブレット・スマホ共通の調整 */
@media screen and (max-width: 1024px) {
    .inner {
        padding: 0 30px; /* 余白を少し広めに */
    }
    .service-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列にする */
        gap: 20px;
    }
}

/* スマホ専用の調整 (767px以下) */
@media screen and (max-width: 767px) {
    .service-section {
        padding: 60px 0; /* 上下の余白を少し詰める */
    }

    .section-title {
        font-size: 1.8rem; /* タイトルを少し小さく */
        margin-bottom: 40px;
    }

    .service-grid {
        grid-template-columns: 1fr; /* 縦に1列並べる */
        gap: 20px;
    }

    .service-card {
        padding: 40px 30px; /* カード内の余白を微調整 */
    }

    /* スマホでは「ホバー」がないため、最初から少しだけ
       グラデーションが見えるようにするか、タップした時に反応させる */
    .service-card::before {
        transform: translateX(-95%); /* 5%だけチラ見せして「動く」予感を与える */
    }
    
    .service-card:active {
        transform: scale(0.98); /* タップした時に少し沈む演出 */
        background-color: #f9f9f9;
    }
}

/* スクロール誘導の全体配置 */
.scrolldown {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
	opacity: 0;
    transition: opacity 1s ease 0.5s; /* 少し遅れてふわっと出す */
}

/* JSでクラスが付いたら表示 */
.scrolldown.is-visible {
    opacity: 1;
}

/* 「SCROLL」の文字 */
.scrolldown span {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif; /* 欧文フォントにするとよりプロっぽいです */
}

/* 縦線の枠 */
.scrolldown::after {
    content: "";
    position: absolute;
    bottom: -40px; /* 線を出す位置 */
    left: 50%;
    width: 1px;
    height: 40px;
    background: #eee; /* 背景の薄い線 */
}

/* 動く線本体（擬似要素の入れ子にするか、spanの後に別の要素を置く） */
/* ここではさらにシンプルに、一本の線がアニメーションする形にします */
.scrolldown::before {
    content: "";
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #3B82F6, #8b00ff); /* ここで七色ロゴのニュアンスを！ */
    animation: scroll-line 2s cubic-bezier(0.7, 0, 0.3, 1) infinite;
    z-index: 3;
}

/* 線が伸びて消えるアニメーション */
@keyframes scroll-line {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    40% {
        transform: scaleY(1);
        transform-origin: top;
    }
    60% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.hero {
    background: #ffffff;
    height: 100vh; /* フォールバック（古いブラウザ用） */
    height: 100dvh; /* スマホのアドレスバーを考慮した「本当の全画面」 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative; /* scrolldownの基準にするために必須 */
}