/*
 Theme Name:   SWELL CHILD
 Theme URI:    https://swell-theme.com/
 Description:  SWELL の子テーマ（千葉フード カスタマイズ用）
 Author:       千葉フード株式会社
 Template:     swell
 Version:      1.0.0
 Text Domain:  swell_child
*/

/* ==========================================================================
   お問い合わせフォーム
   ========================================================================== */

.chibafood-contact-form {
	max-width: 720px;
	margin: 0 auto;
	padding: 2em 0;
}

.chibafood-form-field {
	margin-bottom: 1.5em;
}

.chibafood-form-label {
	display: block;
	font-weight: bold;
	margin-bottom: 0.4em;
	font-size: 0.95em;
}

.chibafood-form-label--required::after {
	content: '必須';
	color: #fff;
	background: #dd3333;
	font-size: 0.75em;
	font-weight: normal;
	padding: 0.1em 0.5em;
	border-radius: 3px;
	margin-left: 0.5em;
	vertical-align: middle;
}

.chibafood-form-input,
.chibafood-form-textarea {
	width: 100%;
	padding: 0.7em 1em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.chibafood-form-input:focus,
.chibafood-form-textarea:focus {
	border-color: #dd3333;
	outline: none;
	box-shadow: 0 0 0 2px rgba(221, 51, 51, 0.15);
}

.chibafood-form-textarea {
	min-height: 180px;
	resize: vertical;
}

.chibafood-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	margin-top: 0.3em;
}

.chibafood-radio-card {
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex: 1;
	min-width: 0;
	padding: 0.75em 1em;
	border: 2px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
	font-weight: normal;
	background: #fff;
}

.chibafood-radio-card:hover {
	border-color: #dd3333;
	background: rgba(221, 51, 51, 0.02);
}

.chibafood-radio-card input[type="radio"] {
	accent-color: #dd3333;
	margin: 0;
	flex-shrink: 0;
}

.chibafood-radio-card__text {
	font-size: 0.9em;
	line-height: 1.3;
}

.chibafood-radio-card:has(input:checked),
.chibafood-radio-card.is-checked {
	border-color: #dd3333;
	background: rgba(221, 51, 51, 0.04);
	box-shadow: 0 0 0 1px #dd3333;
}

/* 2カラムレイアウト */

.chibafood-form-row {
	display: flex;
	gap: 1em;
}

.chibafood-form-col {
	flex: 1;
	min-width: 0;
}

.chibafood-form-submit {
	text-align: center;
	margin-top: 2em;
}

.chibafood-form-button {
	display: inline-block;
	background: #dd3333;
	color: #fff;
	border: none;
	padding: 0.9em 3em;
	font-size: 1.05em;
	font-weight: bold;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(221, 51, 51, 0.25);
}

.chibafood-form-button:hover {
	background: #b82a2a;
	box-shadow: 0 4px 14px rgba(221, 51, 51, 0.35);
	transform: translateY(-1px);
}

.chibafood-form-button:active {
	transform: scale(0.98);
}

/* メッセージ表示 */

.chibafood-form-message {
	padding: 1em 1.2em;
	border-radius: 4px;
	margin-bottom: 1.5em;
	font-size: 0.95em;
}

.chibafood-form-message--success {
	background: #e8f5e9;
	border: 1px solid #66bb6a;
	color: #2e7d32;
}

.chibafood-form-message--error {
	background: #fbe9e7;
	border: 1px solid #ef5350;
	color: #c62828;
}

/* バリデーションエラー */

.chibafood-field-error {
	display: block;
	color: #c62828;
	font-size: 0.85em;
	margin-top: 0.3em;
}

.chibafood-form-field--error .chibafood-form-input,
.chibafood-form-field--error .chibafood-form-textarea {
	border-color: #ef5350;
}

/* ハニーポット非表示 */

.chibafood-honeypot {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	width: 0;
	overflow: hidden;
}

@media (max-width: 600px) {
	.chibafood-radio-group {
		flex-direction: column;
	}

	.chibafood-form-row {
		flex-direction: column;
		gap: 0;
	}

	.chibafood-form-button {
		width: 100%;
		padding: 1em;
	}
}

/* ==========================================================================
   CTA ボタン（トップページ btn_link）
   ========================================================================== */

.btn_link {
	display: inline-block;
	background: #dd3333;
	color: #fff !important;
	text-decoration: none;
	padding: 0.8em 2.5em;
	border-radius: 4px;
	font-weight: bold;
	font-size: 0.95em;
	letter-spacing: 0.05em;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(221, 51, 51, 0.25);
	position: relative;
	overflow: hidden;
}

.btn_link::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s ease;
}

.btn_link:hover {
	background: #b82a2a;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(221, 51, 51, 0.35);
}

.btn_link:hover::before {
	left: 100%;
}

.btn_link:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(221, 51, 51, 0.2);
}

a.tel {
	text-decoration: none;
	color: #dd3333;
	font-size: 1.8em;
	font-weight: bold;
	letter-spacing: 0.03em;
	transition: color 0.2s ease;
}

a.tel:hover {
	color: #b82a2a;
}

/* ==========================================================================
   トップページ レイアウト修正（wp-block-columns 横並び補正）
   ========================================================================== */

.post_content .wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em;
}

.post_content .wp-block-columns > .wp-block-column {
	flex: 1;
	min-width: 0;
}

@media (max-width: 599px) {
	.post_content .wp-block-columns {
		flex-direction: column;
	}

	.post_content .wp-block-columns > .wp-block-column {
		flex: none;
		width: 100%;
	}
}

/* ==========================================================================
   お知らせセクション
   ========================================================================== */

.chibafood-news-section {
	max-width: 780px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid rgba(200, 200, 200, 0.35);
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.chibafood-news-section__header {
	display: flex;
	align-items: center;
	gap: 0.8em;
	padding: 1em 1.5em;
	border-bottom: 1px solid rgba(200, 200, 200, 0.35);
	background: linear-gradient(135deg, #fafafa, #fff);
}

.chibafood-news-section__badge {
	display: inline-block;
	background: #dd3333;
	color: #fff;
	font-size: 0.75em;
	font-weight: bold;
	letter-spacing: 0.15em;
	padding: 0.3em 0.9em;
	border-radius: 3px;
	line-height: 1;
	font-family: "Helvetica Neue", Arial, sans-serif;
}

.chibafood-news-section__label {
	font-size: 0.95em;
	font-weight: bold;
	color: #333;
}

.chibafood-news {
	max-width: none;
	margin: 0;
}

.chibafood-news__item {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 1em 1.5em;
	border-bottom: 1px solid rgba(200, 200, 200, 0.25);
	transition: background-color 0.2s ease;
}

.chibafood-news__item:last-child {
	border-bottom: none;
}

.chibafood-news__item:hover {
	background: rgba(221, 51, 51, 0.03);
}

.chibafood-news__date {
	flex-shrink: 0;
	font-size: 0.8em;
	color: #fff;
	background: #555;
	padding: 0.2em 0.7em;
	border-radius: 3px;
	font-family: "Helvetica Neue", Arial, sans-serif;
	letter-spacing: 0.03em;
	line-height: 1.4;
}

.chibafood-news__title {
	color: #333;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95em;
	transition: color 0.2s ease;
	position: relative;
}

.chibafood-news__title::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 1px;
	background: #dd3333;
	transition: width 0.3s ease;
}

.chibafood-news__title:hover {
	color: #dd3333;
}

.chibafood-news__title:hover::after {
	width: 100%;
}

.chibafood-news__empty {
	text-align: center;
	color: #999;
	padding: 2em 1.5em;
}

@media (max-width: 599px) {
	.chibafood-news__item {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.4em;
		padding: 0.9em 1.2em;
	}

	.chibafood-news-section__header {
		padding: 0.9em 1.2em;
	}
}

.chibafood-news-section {
	margin-bottom: 2.5em;
}

.chibafood-news__more {
	text-align: right;
	padding: 0.7em 1.5em 1em;
}

.chibafood-news__more a {
	color: #dd3333;
	text-decoration: none;
	font-size: 0.9em;
	font-weight: 500;
	transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.chibafood-news__more a:hover {
	color: #b82a2a;
	letter-spacing: 0.08em;
}

/* ==========================================================================
   お知らせ一覧ページ
   ========================================================================== */

.chibafood-news-archive {
	max-width: 780px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid rgba(200, 200, 200, 0.35);
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.chibafood-news-archive .chibafood-news {
	max-width: none;
	margin: 0;
}

.chibafood-pagination {
	padding: 1.5em;
	text-align: center;
	border-top: 1px solid rgba(200, 200, 200, 0.35);
}

.chibafood-pagination .page-numbers {
	list-style: none;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.4em;
	margin: 0;
	padding: 0;
}

.chibafood-pagination .page-numbers li {
	display: inline-block;
}

.chibafood-pagination .page-numbers a,
.chibafood-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2em;
	height: 2.2em;
	padding: 0 0.5em;
	border-radius: 4px;
	font-size: 0.9em;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.chibafood-pagination .page-numbers a {
	color: #555;
	background: #f5f5f5;
}

.chibafood-pagination .page-numbers a:hover {
	background: #dd3333;
	color: #fff;
	transform: translateY(-1px);
}

.chibafood-pagination .page-numbers .current {
	background: #dd3333;
	color: #fff;
	font-weight: bold;
}

.chibafood-pagination .page-numbers .dots {
	background: none;
	color: #999;
}

/* ==========================================================================
   モーダル
   ========================================================================== */

.chibafood-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chibafood-modal[aria-hidden="true"] {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.chibafood-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

.chibafood-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.chibafood-modal__content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 2em 2.5em;
	max-width: 640px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	z-index: 1;
}

.chibafood-modal__close {
	position: absolute;
	top: 0.6em;
	right: 0.8em;
	background: none;
	border: none;
	font-size: 1.8em;
	color: #999;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
}

.chibafood-modal__close:hover {
	color: #333;
}

.chibafood-modal__date {
	display: block;
	font-size: 0.85em;
	color: #888;
	margin-bottom: 0.3em;
}

.chibafood-modal__title {
	font-size: 1.2em;
	margin: 0 0 1em;
	padding-bottom: 0.6em;
	border-bottom: 2px solid #dd3333;
}

.chibafood-modal__body {
	font-size: 0.95em;
	line-height: 1.8;
}

.chibafood-modal__body p {
	margin-bottom: 1em;
}

