/* ==========================================================
 * AIフレンズ メディア型トップ
 * 対象テンプレート: page-top-media.php
 * ========================================================== */

.aif-top-media {
  --aif-bg: #ffffff;
  --aif-surface: #f5f7fb;
  --aif-surface-2: #eef3fb;
  --aif-text: #1b2330;
  --aif-muted: #5a6578;
  --aif-line: #e4e8ef;

  /* パレット（青を軸に、紫・コーラル・黄・ティールを差し色） */
  --aif-accent:      #4a9ede;
  --aif-accent-deep: #2b6fb0;
  --aif-c-violet:    #8b5cf6;
  --aif-c-coral:     #ff6f61;
  --aif-c-amber:     #f59e0b;
  --aif-c-teal:      #14b8a6;
  --aif-c-pink:      #ec4899;

  --aif-radius: 14px;
  --aif-radius-sm: 10px;
  color: var(--aif-text);
  background: var(--aif-bg);
  font-family: inherit;
  line-height: 1.7;
}

.aif-top-media a { color: inherit; text-decoration: none; }
.aif-top-media img { max-width: 100%; height: auto; }

.aif-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.aif-top-media section { padding: 72px 0; position: relative; }

/* --- セクション見出し ------------------------------------- */
.aif-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
  position: relative;
  padding-left: 18px;
}
.aif-section-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 10px;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--aif-accent) 0%, var(--aif-c-violet) 100%);
}
.aif-section-head__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0;
}
.aif-section-head__lead {
  margin: 8px 0 0;
  color: var(--aif-muted);
  font-size: 15px;
}
.aif-section-head__more {
  font-size: 14px;
  color: var(--aif-accent-deep);
  font-weight: 700;
  white-space: nowrap;
}
.aif-section-head__more:hover { text-decoration: underline; }

/* --- ボタン ---------------------------------------------- */
.aif-btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(43, 111, 176, 0.15);
}
.aif-btn:hover { transform: translateY(-1px); }
.aif-btn--primary {
  background: linear-gradient(135deg, var(--aif-accent) 0%, var(--aif-accent-deep) 100%);
  color: #fff;
}
.aif-btn--primary:hover { box-shadow: 0 8px 20px rgba(43, 111, 176, 0.32); color: #fff; }
.aif-btn--ghost {
  background: #fff;
  color: var(--aif-accent-deep);
  border: 1.5px solid var(--aif-accent);
  box-shadow: none;
}
.aif-btn--ghost:hover { background: var(--aif-accent); color: #fff; }
.aif-btn--line {
  background: linear-gradient(135deg, #06c755 0%, #04a647 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
}
.aif-btn--line:hover { box-shadow: 0 8px 20px rgba(6, 199, 85, 0.4); color: #fff; }

/* --- Cover Story ----------------------------------------- */
.aif-cover-story {
  padding-top: 56px;
  padding-bottom: 80px;
  background:
    radial-gradient(ellipse 600px 300px at 10% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 350px at 100% 20%, rgba(74, 158, 222, 0.12), transparent 60%),
    linear-gradient(180deg, #fafcff 0%, #f3f6fc 100%);
}
.aif-cover-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-left: 4px;
}
.aif-cover-eyebrow__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--aif-c-coral) 0%, var(--aif-c-pink) 100%);
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(255, 111, 97, 0.35);
  flex-shrink: 0;
}
.aif-cover-eyebrow__lead {
  font-size: 14px;
  color: var(--aif-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (max-width: 600px) {
  .aif-cover-eyebrow__lead { display: none; }
}
.aif-cover-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
@media (max-width: 900px) {
  .aif-cover-grid { grid-template-columns: 1fr; }
}
.aif-cover-main {
  display: block;
  position: relative;
  border-radius: var(--aif-radius);
  overflow: hidden;
  background-color: #1b2330;
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 36px rgba(30, 50, 90, 0.18);
  aspect-ratio: 16 / 10;
  min-height: 360px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.aif-cover-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(30, 50, 90, 0.26);
}
.aif-cover-main__placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #2b6fb0 0%, #8b5cf6 50%, #ec4899 100%);
}
.aif-cover-main__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.85) 100%),
    linear-gradient(135deg, rgba(43,111,176,0.30) 0%, transparent 50%);
}
.aif-cover-main::after {
  content: "FEATURED";
  position: absolute;
  top: 22px;
  left: 22px;
  background: linear-gradient(135deg, var(--aif-c-coral) 0%, var(--aif-c-pink) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 111, 97, 0.5);
  z-index: 2;
}
.aif-cover-main__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 28px 32px 30px;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.aif-cover-main__cat {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  align-self: flex-start;
  border: 1px solid rgba(255,255,255,0.35);
}
.aif-cover-main__title {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.4;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  color: #fff;
}
@media (max-width: 600px) {
  .aif-cover-main__title { font-size: 22px; }
  .aif-cover-main__body { padding: 22px 22px 24px; }
}
.aif-cover-main__excerpt {
  font-size: 14.5px;
  color: rgba(255,255,255,0.92);
  margin: 0 0 14px;
  line-height: 1.75;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
@media (max-width: 600px) {
  .aif-cover-main__excerpt { display: none; }
}
.aif-cover-main__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aif-cover-main__date {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
}
.aif-cover-main__cta {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.06em;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.5);
  transition: background 0.2s, transform 0.2s;
}
.aif-cover-main:hover .aif-cover-main__cta {
  background: #fff;
  color: var(--aif-accent-deep);
  transform: translateX(2px);
}

.aif-cover-side {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}
.aif-cover-side__link {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: var(--aif-radius-sm);
  background: #fff;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.aif-cover-side__link:hover {
  border-color: var(--aif-accent);
  box-shadow: 0 6px 18px rgba(74, 158, 222, 0.15);
  transform: translateY(-1px);
}
.aif-cover-side__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #dde3ec;
  border-radius: 6px;
}
.aif-cover-side__thumb--placeholder { background: linear-gradient(135deg, #cfe0f4, #d9c9f9); }
.aif-cover-side__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.aif-cover-side__cat { font-size: 11px; color: var(--aif-c-violet); font-weight: 700; letter-spacing: 0.04em; }
.aif-cover-side__title { font-size: 14px; font-weight: 700; line-height: 1.5; }
.aif-cover-side__date { font-size: 11px; color: var(--aif-muted); }

/* --- 新着記事グリッド ------------------------------------ */
.aif-recent { background: #fff; }
.aif-card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 26px;
}
.aif-card-grid--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .aif-card-grid--3col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .aif-card-grid--3col { grid-template-columns: 1fr; }
}
.aif-card__link {
  display: block;
  background: #fff;
  border: 1px solid var(--aif-line);
  border-radius: var(--aif-radius);
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.aif-card__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(30, 50, 90, 0.10);
  border-color: transparent;
}
.aif-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #dde3ec;
  position: relative;
}
.aif-card__thumb--placeholder { background: linear-gradient(135deg, #cfe0f4, #d9c9f9 50%, #ffd9e7); }
.aif-card__body { display: block; padding: 16px 18px 20px; }
.aif-card__cat {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: var(--aif-accent);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
/* カテゴリ色のバリエーション（表示順で色を回す） */
.aif-card:nth-child(6n+2) .aif-card__cat { background: var(--aif-c-violet); }
.aif-card:nth-child(6n+3) .aif-card__cat { background: var(--aif-c-coral); }
.aif-card:nth-child(6n+4) .aif-card__cat { background: var(--aif-c-teal); }
.aif-card:nth-child(6n+5) .aif-card__cat { background: var(--aif-c-amber); }
.aif-card:nth-child(6n+6) .aif-card__cat { background: var(--aif-c-pink); }

.aif-card__title {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 10px;
}
.aif-card__date { font-size: 11px; color: var(--aif-muted); }

/* --- Courses（横スクロール帯） --------------------------- */
.aif-courses {
  background:
    radial-gradient(ellipse 500px 300px at 90% 10%, rgba(245, 158, 11, 0.12), transparent 60%),
    linear-gradient(135deg, #fff7e6 0%, #ffeecf 100%);
}
.aif-courses .aif-section-head::before {
  background: linear-gradient(180deg, var(--aif-c-amber) 0%, var(--aif-c-coral) 100%);
}
.aif-courses__list {
  list-style: none;
  padding: 6px 4px 14px;
  margin: 0 -4px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.aif-courses__item { scroll-snap-align: start; }
.aif-courses__link {
  display: block;
  background: #fff;
  border-radius: var(--aif-radius);
  overflow: hidden;
  height: 100%;
  box-shadow: 0 6px 20px rgba(160, 110, 30, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.aif-courses__link::before {
  content: "COURSE";
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--aif-c-amber) 0%, var(--aif-c-coral) 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border-radius: 999px;
  z-index: 1;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
}
.aif-courses__link:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(160, 110, 30, 0.18); }
.aif-courses__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #dde3ec;
}
.aif-courses__thumb--placeholder { background: linear-gradient(135deg, #f7d6a0, #fff0db); }
.aif-courses__title {
  display: block;
  padding: 14px 16px 18px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.55;
}
.aif-courses__footer { margin-top: 24px; text-align: center; }

/* --- カテゴリ別特集 --------------------------------------- */
.aif-cats { background: #fff; }
.aif-cats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 780px) {
  .aif-cats__grid { grid-template-columns: 1fr; }
}
.aif-cats__block {
  border-radius: var(--aif-radius);
  padding: 22px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(30, 50, 90, 0.06);
  border-top: 4px solid var(--aif-accent);
}
.aif-cats__grid > .aif-cats__block:nth-child(4n+1) { border-top-color: var(--aif-accent); }
.aif-cats__grid > .aif-cats__block:nth-child(4n+2) { border-top-color: var(--aif-c-violet); }
.aif-cats__grid > .aif-cats__block:nth-child(4n+3) { border-top-color: var(--aif-c-coral); }
.aif-cats__grid > .aif-cats__block:nth-child(4n+4) { border-top-color: var(--aif-c-teal); }
.aif-cats__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--aif-line);
}
.aif-cats__title { font-size: 19px; font-weight: 800; margin: 0; }
.aif-cats__more { font-size: 12px; color: var(--aif-accent-deep); font-weight: 700; }
.aif-cats__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.aif-cats__link {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.aif-cats__link:hover { background: var(--aif-surface); }
.aif-cats__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #dde3ec;
  border-radius: 6px;
}
.aif-cats__thumb--placeholder { background: linear-gradient(135deg, #cfe0f4, #d9c9f9); }
.aif-cats__item-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.aif-cats__item-title { font-size: 14px; font-weight: 700; line-height: 1.5; }
.aif-cats__item-date { font-size: 11px; color: var(--aif-muted); }

/* --- ランキング ------------------------------------------ */
.aif-rank {
  background:
    radial-gradient(ellipse 500px 300px at 0% 50%, rgba(74, 158, 222, 0.08), transparent 60%),
    linear-gradient(180deg, var(--aif-surface-2) 0%, #fafcff 100%);
}
.aif-rank__tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--aif-line);
}
.aif-rank__tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 800;
  color: var(--aif-muted);
  cursor: pointer;
  letter-spacing: 0.04em;
}
.aif-rank__tab.is-active {
  color: var(--aif-accent-deep);
  border-bottom-color: var(--aif-accent);
}
.aif-rank__pane { display: none; }
.aif-rank__pane.is-active { display: block; }
.aif-rank__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.aif-rank__link {
  display: grid;
  grid-template-columns: 52px 96px 1fr;
  gap: 16px;
  align-items: center;
  background: #fff;
  border-radius: var(--aif-radius-sm);
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(30, 50, 90, 0.06);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.aif-rank__link:hover { transform: translateX(4px); box-shadow: 0 8px 22px rgba(30, 50, 90, 0.12); }
.aif-rank__num {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  background: linear-gradient(180deg, var(--aif-accent) 0%, var(--aif-accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.aif-rank__item:nth-child(1) .aif-rank__num {
  background: linear-gradient(180deg, #ffd700 0%, #c08a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.aif-rank__item:nth-child(2) .aif-rank__num {
  background: linear-gradient(180deg, #c0c7d4 0%, #8792a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.aif-rank__item:nth-child(3) .aif-rank__num {
  background: linear-gradient(180deg, #e4a477 0%, #a46430 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.aif-rank__thumb {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #dde3ec;
  border-radius: 6px;
}
.aif-rank__thumb--placeholder { background: linear-gradient(135deg, #cfe0f4, #d9c9f9); }
.aif-rank__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.aif-rank__cat { font-size: 11px; color: var(--aif-c-violet); font-weight: 700; letter-spacing: 0.04em; }
.aif-rank__title { font-size: 14.5px; font-weight: 700; line-height: 1.5; }

/* --- コミュニティバナー ---------------------------------- */
.aif-community-banner {
  padding: 88px 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.35), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.35), transparent 45%),
    linear-gradient(135deg, #2b6fb0 0%, #4a9ede 50%, #8b5cf6 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.aif-community-banner::before,
.aif-community-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}
.aif-community-banner::before {
  width: 320px; height: 320px;
  background: #ff6f61;
  top: -80px; right: -60px;
}
.aif-community-banner::after {
  width: 240px; height: 240px;
  background: #14b8a6;
  bottom: -60px; left: -40px;
}
.aif-community-banner .aif-container { position: relative; z-index: 1; }
.aif-community-banner__link {
  display: block;
  transition: transform 0.2s ease;
}
.aif-community-banner__link:hover { transform: translateY(-2px); }
.aif-community-banner__body {
  text-align: center;
  color: #fff;
  padding: 12px 20px;
}
.aif-community-banner__eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.28em;
  font-weight: 800;
  padding: 5px 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  margin-bottom: 22px;
}
.aif-community-banner__title {
  font-size: 36px;
  font-weight: 900;
  margin: 0 0 18px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
.aif-community-banner__lead {
  font-size: 15.5px;
  line-height: 1.9;
  max-width: 640px;
  margin: 0 auto 28px;
  opacity: 0.96;
}
.aif-community-banner .aif-btn--primary {
  background: #fff;
  color: var(--aif-accent-deep);
  padding: 15px 36px;
  font-size: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.aif-community-banner .aif-btn--primary:hover {
  background: #f0f7ff;
  color: var(--aif-accent-deep);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
}
@media (max-width: 600px) {
  .aif-community-banner { padding: 64px 0; }
  .aif-community-banner__title { font-size: 26px; }
  .aif-community-banner__lead { font-size: 14px; }
}

/* --- CTA帯 ------------------------------------------------ */
.aif-cta-band {
  background:
    linear-gradient(180deg, #fafcff 0%, var(--aif-surface) 100%);
}
.aif-cta-band__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 720px) {
  .aif-cta-band__grid { grid-template-columns: 1fr; }
}
.aif-cta-band__card {
  background: #fff;
  border-radius: var(--aif-radius);
  padding: 30px;
  box-shadow: 0 8px 24px rgba(30, 50, 90, 0.08);
  position: relative;
  overflow: hidden;
}
.aif-cta-band__card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--aif-accent) 0%, var(--aif-c-violet) 100%);
}
.aif-cta-band__card--line::before {
  background: linear-gradient(90deg, #06c755 0%, #04a647 100%);
}
.aif-cta-band__icon {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 5px 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--aif-accent) 0%, var(--aif-c-violet) 100%);
  color: #fff;
  margin-bottom: 14px;
}
.aif-cta-band__card--line .aif-cta-band__icon {
  background: linear-gradient(135deg, #06c755 0%, #04a647 100%);
}
.aif-cta-band__title { font-size: 21px; font-weight: 800; margin: 0 0 10px; letter-spacing: 0.01em; }
.aif-cta-band__lead { font-size: 14px; color: var(--aif-muted); margin: 0 0 22px; line-height: 1.8; }

/* ==========================================================
 * アニメーション
 * ========================================================== */

/* 新着ティッカー */
.aif-ticker {
  padding: 14px 0;
  background: linear-gradient(90deg, #12172a 0%, #2b6fb0 50%, #8b5cf6 100%);
  background-size: 200% 100%;
  animation: aif-ticker-bg 18s ease-in-out infinite;
  color: #fff;
  overflow: hidden;
  border-top: 3px solid var(--aif-c-coral);
  border-bottom: 3px solid var(--aif-c-violet);
  position: relative;
}
.aif-ticker__wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.aif-ticker__label {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--aif-c-coral) 0%, var(--aif-c-pink) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 4px;
  letter-spacing: 0.2em;
  box-shadow: 0 3px 10px rgba(255, 111, 97, 0.4);
}
.aif-ticker__viewport { flex: 1; overflow: hidden; position: relative; min-width: 0; }
.aif-ticker__viewport::before,
.aif-ticker__viewport::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 1;
}
.aif-ticker__viewport::before { left: 0; background: linear-gradient(90deg, rgba(18,23,42,0.9), transparent); }
.aif-ticker__viewport::after  { right: 0; background: linear-gradient(-90deg, rgba(139,92,246,0.7), transparent); }
.aif-ticker__track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: aif-ticker-scroll 45s linear infinite;
  will-change: transform;
}
.aif-ticker__track:hover { animation-play-state: paused; }
.aif-ticker__item {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}
.aif-ticker__item:hover { color: #ffd37a; }
.aif-ticker__dot {
  color: var(--aif-c-coral);
  font-size: 9px;
  animation: aif-ticker-dot 2s ease-in-out infinite;
}
@keyframes aif-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes aif-ticker-bg {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
@keyframes aif-ticker-dot {
  0%,100% { opacity: 0.4; transform: scale(0.9); }
  50%     { opacity: 1;   transform: scale(1.25); }
}

/* FEATURED / COURSE バッジのパルス */
.aif-cover-main::after,
.aif-courses__link::before {
  animation: aif-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes aif-badge-pulse {
  0%,100% { box-shadow: 0 4px 10px rgba(255, 111, 97, 0.35); transform: scale(1); }
  50%     { box-shadow: 0 4px 20px rgba(255, 111, 97, 0.7);  transform: scale(1.04); }
}

/* ランキング1位のシャイン */
.aif-rank__item:nth-child(1) .aif-rank__link {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fffbea 100%);
  box-shadow: 0 6px 22px rgba(192, 138, 0, 0.18);
}
.aif-rank__item:nth-child(1) .aif-rank__link::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 215, 0, 0.35) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: aif-rank-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes aif-rank-shine {
  0%   { left: -75%; }
  40%  { left: 120%; }
  100% { left: 120%; }
}

/* コミュニティバナー ブロブの浮遊 */
.aif-community-banner::before {
  animation: aif-blob-float-a 18s ease-in-out infinite;
}
.aif-community-banner::after {
  animation: aif-blob-float-b 22s ease-in-out infinite;
}
@keyframes aif-blob-float-a {
  0%,100% { transform: translate(0, 0)       scale(1);   }
  33%     { transform: translate(-30px, 40px) scale(1.1); }
  66%     { transform: translate(20px, -20px) scale(0.95); }
}
@keyframes aif-blob-float-b {
  0%,100% { transform: translate(0, 0)        scale(1);   }
  40%     { transform: translate(40px, -30px) scale(1.15); }
  70%     { transform: translate(-20px, 30px) scale(0.9);  }
}

/* コミュニティバナー 背景全体もゆっくり色移り */
.aif-community-banner {
  background-size: 200% 200%;
  animation: aif-community-bg 18s ease-in-out infinite;
}
@keyframes aif-community-bg {
  0%,100% { background-position: 0% 50%;   }
  50%     { background-position: 100% 50%; }
}

/* ボタンのグラデーション動き（CTA） */
.aif-btn--primary {
  background-size: 180% 180%;
  animation: aif-btn-gradient 6s ease-in-out infinite;
}
@keyframes aif-btn-gradient {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* セクション見出しのアクセントバー ゆらぎ */
.aif-section-head::before {
  animation: aif-accent-bar 3.6s ease-in-out infinite;
}
@keyframes aif-accent-bar {
  0%,100% { opacity: 0.85; transform: scaleY(1);    }
  50%     { opacity: 1;    transform: scaleY(1.08); }
}

/* スクロールインアニメ共通 */
.aif-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--aif-reveal-delay, 0ms);
  will-change: opacity, transform;
}
.aif-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* カード浮き（hover時） */
.aif-card__link,
.aif-courses__link,
.aif-cover-main,
.aif-cta-band__card {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease, border-color 0.2s;
}

/* アクセシビリティ: 動きを減らす設定の尊重 */
@media (prefers-reduced-motion: reduce) {
  .aif-ticker__track,
  .aif-ticker,
  .aif-ticker__dot,
  .aif-cover-main::after,
  .aif-courses__link::before,
  .aif-rank__item:nth-child(1) .aif-rank__link::before,
  .aif-community-banner,
  .aif-community-banner::before,
  .aif-community-banner::after,
  .aif-btn--primary,
  .aif-section-head::before {
    animation: none !important;
  }
  .aif-reveal { opacity: 1; transform: none; transition: none; }
}
