/* ==========================
   全体ベース（共通）
========================== */
* {
    box-sizing: border-box;
}

body {
    background: #f5f7fb;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    margin: 0;
}

@media (min-width: 1024px) {
    body {
        max-width: 1280px;
        margin: 0 auto;
    }
}

.siteTitle {
    background-color: #e3f2ff;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.4) 0,
            rgba(255,255,255,0.4) 12px,
            transparent 12px,
            transparent 24px
        );
}

/* ==========================
   タイトルロゴ（指定通り）
   - SP縦(<=599): spロゴ
   - それ以外: pcロゴ
========================== */

.siteTitle__logo {
    background-image: url("https://fake2.site/img/titlelogo.png");
    height: 275px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 0 auto;
    width: 100%;
    display: block;
}

/* スマホ（縦） */
@media (max-width: 599px) {
    .siteTitle__logo {
        height: 115px;
    }
}

/* スマホ（横） */
@media (min-width: 600px) and (max-width: 767px) {
    .siteTitle__logo {
        height: 200px; /* 横向きで潰れないよう中間サイズ */
    }
}

/* タブレット〜大画面（PCロゴ） */
@media (min-width: 768px) {
    .siteTitle__logo {
        height: 275px;
    }
}

.video-thumb-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
}

.video-thumb-wrap .title {
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #fff;
    position: absolute;
    left: 5px;
    right: 5px;
    z-index: 10;
    background-color: rgba(59, 130, 246, 0.75);
    padding: 5px;
    border-radius: 5px;
}

.video-info .play-count,
.play-count {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-info .user-icon,
.user-icon {
    margin-left: 8px;
    display: inline-block;
    order: 1;
}

.video-info .user-icon img,
.user-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
}

.video-info .play-count::before,
.play-count::before {
    content: "▶";
    font-size: 12px;
    color: #888;
    order: 2;
}

.play-count span {
    order: 3;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #fff;
    z-index: 5;
}

/* ==========================
   768px以上のサムネ描画（共通）
========================== */
@media (min-width: 768px) {
    .video-thumb-wrap {
        max-height: 370px;
    }

    .video-thumb {
        position: relative;
        width: 100%;
        aspect-ratio: 9 / 16;
        background-size: cover;
        background-position: center;
        cursor: pointer;
        overflow: hidden;
        border-radius: 12px;
    }

    .video-thumb::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0) 60%,
            rgba(0,0,0,0.35)
        );
    }

    .play-btn {
        font-size: 24px;
        background: rgba(0, 0, 0, 0.6);
        padding: 6px 10px;
        transition: transform 0.15s ease, background 0.15s ease;
    }

    .video-thumb:hover .play-btn {
        transform: translate(-50%, -50%) scale(1.1);
        background: rgba(0, 0, 0, 0.75);
    }

    .video-thumb-wrap .title {
        font-size: 15px;
        top: 72%;
    }
}

/* ==========================
   video-grid（指定通り）
   スマホ縦: 2
   スマホ横: 3
   タブレット: 4
   小さめPC: 5
   PC以上: 5
========================== */

/* スマホ（縦） */
@media (max-width: 599px) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
        padding: 10px;
    }
}

/* スマホ（横） */
@media (min-width: 600px) and (max-width: 767px) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
    }
}

/* タブレット：4列 */
@media (min-width: 768px) and (max-width: 1023px) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        justify-content: center;
        padding: 10px;
    }

    .video-info {
        padding: 10px 12px;
        border-top: 1px solid #eee;
        font-size: 13px;
        line-height: 1.5;
    }

    .video-info .tag-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .video-info .tag-link {
        display: inline-block;
        background-color: #e2e8f0;
        color: #333;
        padding: 3px 8px;
        border-radius: 6px;
        text-decoration: none;
        font-size: 12px;
        transition: background-color 0.2s ease;
    }

    .video-info .tag-link:hover {
        background-color: #cbd5f5;
    }

    .video-info .tag-list span {
        font-size: 12px;
        color: #999;
    }
}

/* 小さめPC / ノート：5列 */
@media (min-width: 1024px) and (max-width: 1279px) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 14px;
        justify-content: center;
        padding: 10px;
    }
}

/* PC（標準）〜大画面：5列 */
@media (min-width: 1280px) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 14px;
        justify-content: center;
    }
}

/* 1280px以上は固定幅カラムにしたい（元の仕様を維持） */
@media (min-width: 1280px) {
    .video-grid {
        grid-template-columns: repeat(5, 240px);
    }
}

/* ==========================
   1024px以上のカード/オーバーレイ等
========================== */
@media (min-width: 1024px) {
    .video-card {
        background: #fff;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 6px 16px rgba(0,0,0,0.08);
        border: 1px solid #f0f0f0;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    }

    .video-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 26px rgba(0,0,0,0.14);
        border-color: #38bdf8;
    }

    .video-item {
        position: relative;
    }

    .thumb-label {
        position: absolute;
        bottom: 6px;
        left: 6px;
        right: 6px;
        background: rgba(0,0,0,0.6);
        color: #fff;
        font-size: 13px;
        padding: 4px 6px;
        border-radius: 6px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 6;
    }

    .video-info {
        padding: 10px 12px;
        border-top: 1px solid #eee;
        font-size: 13px;
        line-height: 1.5;
    }

    .video-info .tag-list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .video-info .tag-link {
        display: inline-block;
        background-color: #e2e8f0;
        color: #333;
        padding: 2px 6px;
        border-radius: 4px;
        text-decoration: none;
        font-size: 12px;
        transition: background-color 0.2s;
    }

    .video-info .tag-link:hover {
        background-color: #cbd5f5;
    }

    .video-info .tag-list span {
        font-size: 12px;
        color: #999;
    }

    #videoOverlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.75);
        z-index: 9999;
        justify-content: center;
        align-items: center;
        animation: fadeIn 0.25s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    #videoContainer {
        position: relative;
        width: 90vw;
        max-width: 480px;
        aspect-ratio: 9 / 16;
        background: #000;
        border-radius: 14px;
        overflow: hidden;
        animation: popupIn 0.25s ease;
    }

    @keyframes popupIn {
        from { transform: scale(0.85); opacity: 0; }
        to   { transform: scale(1); opacity: 1; }
    }

    #videoContainer iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

    #closeBtn {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 26px;
        padding: 6px 12px;
        background: rgba(0,0,0,0.6);
        color: #fff;
        border-radius: 8px;
        cursor: pointer;
        z-index: 10;
    }
}

/* ==========================
   767px以下（スマホ共通の見た目）
   ※ grid列だけは上で max599 / 600-767 に分岐済み
========================== */
@media (max-width: 767px) {
    .video-item {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .video-thumb-wrap {
        height: 200px;
        max-height: 200px;
    }

    .video-thumb {
        width: 100%;
        aspect-ratio: 9 / 16;
        cursor: pointer;
        border-radius: 10px;
        background-size: cover;
        background-position: center;

        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .play-btn {
        font-size: 17px;
        color: white;
        background: rgba(0,0,0,0.5);
        padding: 8px 10px;
        cursor: pointer;
    }

    .video-thumb-wrap .title {
        font-size: 14px;
        top: 65%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .video-info {
        border-radius: 12px;
    }

    .video-info .tag-list {
        display: none;
        flex-wrap: wrap;
        gap: 6px;
    }

    .video-info .tag-link {
        background: linear-gradient(135deg, #f8fafc, #e2e8f0);
        color: #333;
        padding: 4px 10px;
        border-radius: 999px;
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .video-info .tag-link:hover {
        background: #d0d0d0;
        transform: translateY(-1px);
    }

    .video-info .tag-list span {
        font-size: 13px;
        color: #aaa;
    }

    #videoOverlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.8);
        backdrop-filter: blur(2px);
        z-index: 9999;
        justify-content: center;
        align-items: center;
    }

    #videoContainer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        overflow: hidden;
        background: #000;
    }

    #videoContainer iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

    #closeBtn {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 9999;
        font-size: 20px;
        padding: 12px 14px;
        background: rgba(0,0,0,0.6);
        border-radius: 10px;
        cursor: pointer;
        line-height: 1;
        color: white;
    }
}

.global-nav {
    background: #dbeafe;
    border-bottom: 1px solid #bfdbfe;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
}

@media (min-width: 768px) {
    .global-nav__list {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 14px;
        padding: 6px 16px;
        margin: 0;
        list-style: none;
        flex-wrap: wrap;
        overflow: visible;
    }

    .global-nav__list li a {
        position: relative;
        display: inline-block;
        padding: 5px 14px;
        background: #ffffff;
        border-radius: 999px;
        color: #1d4ed8;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 1px 4px rgba(59, 130, 246, 0.18);
        transition:
            transform 0.15s ease,
            box-shadow 0.15s ease,
            background 0.15s ease;
        line-height: 1.4;
    }

    .global-nav__list li a:hover {
        background: #eff6ff;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(59, 130, 246, 0.22);
    }

    .global-nav__list li a::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 3px;
        width: 50%;
        height: 2px;
        background: linear-gradient(90deg, #38bdf8, #2563eb);
        transform: translateX(-50%) scaleX(0);
        transition: transform 0.2s ease;
        border-radius: 2px;
    }

    .global-nav__list li a:hover::after {
        transform: translateX(-50%) scaleX(1);
    }

}

@media (max-width: 767px) {
    .global-nav {
        padding: 1px 0;
    }

    .global-nav__list {
        display: flex;
        gap: 8px;
        padding: 4px 10px;
        margin: 0;
        list-style: none;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .global-nav__list::-webkit-scrollbar {
        display: none;
    }

    .global-nav__list li {
        flex: 0 0 auto;
    }

    .global-nav__list li a {
        position: relative;
        display: inline-block;
        padding: 4px 12px;
        background: #ffffff;
        border-radius: 999px;
        color: #1d4ed8;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 1px 4px rgba(59, 130, 246, 0.16);
        transition:
            transform 0.15s ease,
            box-shadow 0.15s ease,
            background 0.15s ease;
    }

    .global-nav__list li a:hover,
    .global-nav__list li a:active {
        background: #eff6ff;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(59, 130, 246, 0.22);
    }

    .global-nav__list li a::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 3px;
        width: 60%;
        height: 2px;
        background: linear-gradient(90deg, #38bdf8, #2563eb);
        transform: translateX(-50%) scaleX(0);
        transition: transform 0.2s ease;
        border-radius: 2px;
    }

    .global-nav__list li a:hover::after,
    .global-nav__list li a:active::after {
        transform: translateX(-50%) scaleX(1);
    }
}

:root{
  --blue: #2563eb;
  --border: #e5e7eb;
  --border-focus: rgba(37,99,235,.75);
  --highlight: rgba(37,99,235,.18);
  --text: #0f172a;
  --muted: #94a3b8;
}

/* 検索フォーム本体 */
.site-search{
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  padding: 8px 12px;

  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  margin-inline: auto; /
  transition: border-color .15s ease, box-shadow .15s ease;
}

@media (min-width: 768px){
  .site-search{
    margin-top: 16px; /* ← PC時だけ上に余白 */
  }
}

.site-search:focus-within{
  border-color: var(--border-focus);
  box-shadow:
    0 10px 28px rgba(37,99,235,.14),
    0 0 0 4px var(--highlight);
}

/* 入力欄 */
.site-search__input{
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;

  font-size: 15px;
  padding: 6px 4px; /* 縦を少し細め */
  color: var(--text);
}

.site-search__input::placeholder{
  color: var(--muted);
}

/* ボタン：背景なしで“アイコンだけ” */
.site-search__btn{
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border: 0;
  background: transparent;
  cursor: pointer;

  color: var(--blue);

  transition: transform .15s ease, opacity .15s ease;
}

.site-search__btn:hover{
  opacity: .85;
  transform: translateY(-1px) scale(1.02);
}

.site-search__btn:active{
  transform: translateY(0) scale(1.0);
}

/* 虫眼鏡サイズ（少し大きめ） */
.site-search__icon{
  width: 22px;
  height: 22px;
}

/* スマホ微調整 */
@media (max-width: 480px){
  .site-search{
    padding: 6px 10px;
    border-radius: 12px;
  }
  .site-search__input{
    font-size: 14px;
  }
  .site-search__btn{
    width: 34px;
    height: 34px;
  }
  .site-search__icon{
    width: 21px;
    height: 21px;
  }
}

/* タブレット以上 */
@media (min-width: 768px){
  .site-search{
    width: min(820px, 100%);
    padding: 10px 14px;
    border-radius: 16px;
  }
  .site-search__input{
    font-size: 16px;
    padding: 8px 10px;
  }
  .site-search__btn{
    width: 42px;
    height: 42px;
  }
  .site-search__icon{
    width: 24px;
    height: 24px;
  }
}

.single_content-header-title {
    margin-top: 15px;
    padding: 15px 5px 15px 10px;
    font-family: "Helvetica Neue", sans-serif;
    position: relative;
    font-weight: 700;
    color: #000;
    background-color: #eaf2ff;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .single_content-header-title {
        font-size: 26px;
        line-height: 35px;
    }
}

@media (max-width: 767px) {
    .single_content-header-title {
        font-size: 20px;
        line-height: 25px;
    }
}

.site-footer {
    background-color: #f5f7fb;
    text-align: center;
    padding: 10px 30px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    border-top: 1px solid #ddd;
    margin-top: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .site-footer {
        margin-top: 40px;
    }
}

.siteTitle--withAuth {
    position: relative;
}

.siteTitle__auth {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    font-size: 14px;
}

.siteTitle__authLink {
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    color: #1d4ed8;
    border: 1px solid #60a5fa;
}

.siteTitle__authIconWrap {
    position: relative;
}

.siteTitle__authIconToggle {
    cursor: pointer;
}

.siteTitle__authIcon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.siteTitle__authDropdown {
    display: none;
    position: absolute;
    top: 60%;
    margin-top:10px;
    left: -160px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    font-size: 14px;
    width: 150px;
    text-align: center;
    transform: translateY(-50%);
}

.siteTitle__authDropdown a {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 8px 0;
    border-bottom: 1px solid #bfdbfe;
}

.siteTitle__authDropdown a:last-child {
    border-bottom: none;
}

/* auth周りは従来通り 767px以下で縮小 */
@media (max-width: 767px) {
  .siteTitle__auth {
    top: 8px;
    right: 8px;
    font-size: 13px;
    padding: 5px 8px;
  }

  .siteTitle__authIcon {
    width: 30px;
    height: 30px;
  }
  .siteTitle__authDropdown {
    margin-top:20px;
    width: 120px;
    left: -130px;
  }
}

.video-more {
    display: flex;
    justify-content: center;
    margin: 20px 0 36px;
}

.video-more-button {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 10px 24px;
    width:98%;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.video-more-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

.video-more-button:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

@media (max-width: 767px) {
    .video-more {
        margin: 16px 0 28px;
    }

    .video-more-button {
        padding: 10px 22px;
        font-size: 14px;
    }

    .video-more-button:hover {
        transform: none;
        box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
    }

    .video-more-button:active {
        transform: scale(0.98);
    }
}
