/* 共通 */
body {
  font-family: "Poppins", sans-serif;
  background-color: #f6f5ed;
  margin: 0;
  padding: 40px 20px;
  color: #333;
}

/* ログイン画面専用 */
body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 0;
}
.login-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-box h2 {
  color: #4cbbc1;
  margin-bottom: 20px;
}
.login-box input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}
.login-box button {
  width: 100%;
  padding: 12px;
  background-color: #4cbbc1;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}
.login-box button:hover {
  background-color: #3aa6aa;
}
.login-box p {
  color: red;
  margin-bottom: 10px;
}

/* 投稿詳細ページ */
.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  padding: 30px;
}
.container h1 {
  font-size: 22px;
  color: #666;
  margin-bottom: 20px;
  text-align: center;
}
.container img,
.container video {
  max-width: 460px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.container p {
  font-size: 15px;
  line-height: 1.9;
  text-align: left;
  margin-left: 20px;
  margin-right: 10px;
  white-space: pre-wrap;
}

/* 投稿フォーム */
.form-container {
  max-width: 500px;
  margin: 40px auto;
  background: white;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.form-container h2 {
  color: #4cbbc1;
  text-align: center;
}
.form-container label {
  display: block;
  margin-top: 16px;
  margin-bottom: 4px;
}
.form-container input,
.form-container textarea,
.form-container button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}
.form-container button {
  background-color: #4cbbc1;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  padding: 10px 20px;
}
.success {
  text-align: center;
  color: green;
  margin-top: 10px;
}

body {
  background-color: #f5f7f9;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

/* お知らせ一覧レイアウト */
.gallery-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #f5f7f9;
}
.gallery-title {
  font-size: 26px;
  color: #4cbbc1;
  border-bottom: 3px solid #4cbbc1;
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 40px;
}
.gallery-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.gallery-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 16px 0;
  background-color: #fff;
  border-bottom: 1px solid #ddd;

  /* デフォルトは角丸なし・影なし */
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

/* 最初のカード：上だけ角丸＋影 */
.gallery-card:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 最後のカード：下だけ角丸＋影＋ボーダー消す */
.gallery-card:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-bottom: none;
}

.gallery-link {
  display: flex;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

/* 画像エリア */
.gallery-thumb {
  width: 120px;
  flex-shrink: 0;
  padding-left: 20px; /* ← 左余白強化 */
}

.gallery-thumb img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  transition: opacity 0.3s;
}
.gallery-thumb img:hover {
  opacity: 0.7; /* ← ホバーで半透明 */
}

.gallery-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gallery-date {
  font-size: 14px;
  color: #999;
  margin: 0 0 6px;
}

.gallery-caption {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin: 0;
  transition: all 0.2s;
}
.gallery-caption:hover {
  text-decoration: underline; /* ← ホバーで下線 */
}


/* 管理ページ */
.manage-table {
  width: 90%;
  margin: 40px auto;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.manage-table th, .manage-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #ccc;
  text-align: left;
  vertical-align: middle;
}
.manage-table th {
  background: #4cbbc1;
  color: #fff;
}
.manage-table td:last-child {
  text-align: left;
}
.filter-bar {
  margin: 20px auto;
  text-align: center;
}
.filter-bar input {
  padding: 5px;
  width: 200px;
}
.filter-bar select {
  padding: 5px;
}
.sortable-placeholder {
  background: #eee;
  height: 40px;
}
.save-order {
  text-align: center;
  margin: 20px;
}
.action-buttons {
  text-align: left;
  padding: 8px 0;
}
.action-buttons a, .action-buttons button {
  display: inline-block;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 4px;
  margin-right: 8px;
  margin-bottom: 6px;
  text-decoration: none;
  min-width: 64px;
  text-align: center;
}
.btn-view {
  background: #3498db;
  color: #fff;
}
.btn-edit {
  background: #f39c12;
  color: #fff;
  border: none;
}
.btn-delete {
  background: #e74c3c;
  color: #fff;
  border: none;
}
.btn-gallery {
  background: #6c757d;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}
.btn-gallery:hover {
  background: #5a6268;
}
.btn-logout {
  background: #ff5c5c;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  margin-left: 10px;
  transition: background 0.3s ease;
  cursor: pointer;
}
.btn-logout:hover {
  background: #e03a3a;
}
.btn-delete {
  cursor: pointer;
}

.gallery-more-button {
  margin-top: 30px;
  text-align: center;
}

.gallery-more-button a {
  display: inline-block;
  background: #cdc9b8;
  color: #fff;
  padding: 10px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.gallery-more-button a:hover {
  opacity: 0.85;
}


.btn-disabled {
  display: inline-block;
  padding: 6px 12px;
  background: #ccc;
  color: #666;
  border-radius: 4px;
  cursor: not-allowed;
}
