/* =========================================================
   RESOURCE シングルページ専用スタイル / root対応
========================================================= */

/* ===== レイアウト外枠余白 ===== */
.resource-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem; /* ← 左右にゆとり */
  box-sizing: border-box;
}

/* ===== 2カラム構造調整 ===== */
.resource-columns {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem; /* ← カラム間の余白を広めに */
}

/* ===== メイン・サイドの幅バランス ===== */
.resource-main {
  flex: 1;
  min-width: 0;
}

.resource-sidebar {
  width: 360px;
  flex-shrink: 0;
}

/* ===== アイキャッチ ===== */
.resource-thumbnail {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
}

.resource-thumbnail img,
.resource-main img.wp-post-image {
  width: 100%;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.resource-title {
    font-size: 1.6rem;
    font-weight: bold;
    padding-top: 20px;
    margin-bottom: 1rem;
    color: var(--color-text);
}

/* ===== メタ情報 ===== */
.resource-meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.resource-meta {
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.resource-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.resource-badge {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.resource-value {
  font-weight: 500;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: pre-wrap;
  margin-top: 0.2rem;
}

/* ===== 本文 ===== */
.resource-content {
  line-height: 1.8;
  color: var(--color-text);
}

/* ===== フォームエリア ===== */
.resource-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  max-width: 400px;
  margin-left: auto;
  padding: 1.5rem;
}

.resource-form .form-intro {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
}

.resource-form .form-group {
  margin-bottom: 1.2rem;
}

.resource-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.resource-form input[type="text"],
.resource-form input[type="email"],
.resource-form input[type="tel"],
.resource-form select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.resource-form select {
  background-color: var(--color-white);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999'%3E%3Cpath d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
}

.resource-form select:focus {
  border-color: var(--color-primary-hover);
  outline: none;
}

/* ===== プライバシーポリシー ===== */
.resource-form .form-group.privacy-policy {
  margin-top: 1rem;
}

.resource-form .privacy-policy {
  font-size: 0.65rem;
  font-weight: normal;
  line-height: 1.5;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.resource-form .privacy-policy input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.resource-form .privacy-policy a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: normal;
}

.resource-form .privacy-policy a:hover {
  color: var(--color-primary-hover);
}

/* ===== 送信ボタン ===== */
.resource-form .form-submit {
  text-align: center;
  margin-top: 1.5rem;
}

.resource-form button[type="submit"] {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.resource-form button[type="submit"]:hover {
  background: var(--color-primary-hover);
}

/* ===== 下余白（フォーム下〜フッター間） ===== */
.site-main.resource {
  padding-bottom: 80px; /* ← 余白をしっかり確保 */
}

/* =========================================================
   MEDIA QUERIES
========================================================= */

/* ===== タブレット・スマホ共通調整 ===== */
@media (max-width: 768px) {
  .site-main.resource {
    padding-bottom: 60px; /* スマホでは少し狭く */
  }

  /* 2カラム → 1カラム化 */
  .resource-columns {
    flex-direction: column;
    gap: 2rem;
  }

  .resource-sidebar {
    width: 100%;
    margin: 0 auto;
  }

  .resource-container {
    padding: 0 1.5rem;
  }

  .resource-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
  }

  .resource-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .resource-meta-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .resource-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .resource-badge {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .resource-thumbnail img {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  }

  .resource-form {
    margin: 2rem auto 0 !important;
    padding: 1.2rem !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}
