/**
 * WordPress Block Styles for Tech Mentor Blog
 *
 * WPカスタムブロック（JIN:R テーマ）のスタイルを再現。
 * すべて .wp-blog-content でスコープし、既存サイトとの競合を防止。
 */

/* ==========================================================================
   Base Typography & Spacing (within blog content)
   ========================================================================== */
.wp-blog-content {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	word-break: break-word;
}

.wp-blog-content p {
	margin-bottom: 1.5em;
}

.wp-blog-content strong {
	font-weight: 700;
}

/* ==========================================================================
   WordPress Core Block: Heading
   ========================================================================== */
.wp-blog-content h2.wp-block-heading {
	position: relative;
	font-size: 1.5em;
	font-weight: 700;
	padding-bottom: 8px;
	margin-top: 2.5em;
	margin-bottom: 1.2em;
	border-bottom: none;
}

.wp-blog-content h2.wp-block-heading::after {
	display: block;
	content: "";
	height: 5px;
	margin-top: 8px;
	background: linear-gradient(to right, #94d3fc, #0099ff);
	border-radius: 2px;
}

.wp-blog-content h3.wp-block-heading {
	font-size: 1.25em;
	font-weight: 700;
	padding: 0.25em 0.5em;
	margin-top: 2em;
	margin-bottom: 1em;
	background: transparent;
	border-left: solid 5px #7db4e6;
}

.wp-blog-content h4.wp-block-heading {
	font-size: 1.1em;
	font-weight: 700;
	margin-top: 1.5em;
	margin-bottom: 0.8em;
}

/* ==========================================================================
   WordPress Core Block: List
   ========================================================================== */
.wp-blog-content ul.wp-block-list {
	padding-left: 1.5em;
	margin-bottom: 1.5em;
	list-style-type: disc;
}

.wp-blog-content ol.wp-block-list {
	padding-left: 1.5em;
	margin-bottom: 1.5em;
	list-style-type: decimal;
}

.wp-blog-content .wp-block-list li {
	margin-bottom: 0.5em;
	line-height: 1.7;
}

.wp-blog-content .wp-block-list.has-background {
	padding: 1.25em 2.375em;
}

/* ==========================================================================
   WordPress Core Block: Image
   ========================================================================== */
.wp-blog-content .wp-block-image {
	margin-bottom: 1.5em;
}

.wp-blog-content .wp-block-image > a,
.wp-blog-content .wp-block-image > figure > a {
	display: inline-block;
}

.wp-blog-content .wp-block-image img {
	box-sizing: border-box;
	height: auto;
	max-width: 100%;
	vertical-align: bottom;
	border-radius: 4px;
}

.wp-blog-content .wp-block-image.aligncenter {
	text-align: center;
}

.wp-blog-content .wp-block-image.alignfull img,
.wp-blog-content .wp-block-image.alignwide img {
	height: auto;
	width: 100%;
}

.wp-blog-content .wp-block-image figcaption {
	font-size: 0.85em;
	color: #666;
	text-align: center;
	margin-top: 0.5em;
}

/* ==========================================================================
   JIN:R Simple Box — Base
   ========================================================================== */
.wp-blog-content .wp-block-jinr-blocks-simplebox {
	margin-bottom: 1.5em;
}

.wp-blog-content .b--jinr-block-container {
	margin-bottom: 1.5em;
}

.wp-blog-content .b--jinr-block,
.wp-blog-content .b--jinr-box {
	border-radius: 4px;
	overflow: hidden;
}

.wp-blog-content .a--simple-box-title {
	font-weight: bold;
	padding: 0.75em 1em;
	margin: 0;
}

.wp-blog-content .c--simple-box-inner {
	padding: 1em 1.5em;
}

.wp-blog-content .c--simple-box-inner > :last-child {
	margin-bottom: 0;
}

/* Simple Box Variants */
.wp-blog-content .d--simple-box1 {
	border: 2px solid #7bceb8;
}

.wp-blog-content .d--simple-box1 .a--simple-box-title {
	color: #7bceb8;
}

.wp-blog-content .d--simple-box2 {
	border: 2px solid #7bceb8;
	position: relative;
}

.wp-blog-content .d--simple-box2 .a--simple-box-title {
	color: #7bceb8;
}

.wp-blog-content .d--simple-box2::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 8px;
	width: 20px;
	height: 20px;
	border-top: 1px solid #7bceb8;
	border-left: 1px solid #7bceb8;
}

.wp-blog-content .d--simple-box4 {
	border-left: 2px solid #7bceb8;
	border-right: 2px solid #7bceb8;
	position: relative;
	padding-top: 12px;
	padding-bottom: 12px;
}

.wp-blog-content .d--simple-box4 .a--simple-box-title {
	color: #7bceb8;
}

.wp-blog-content .d--simple-box4::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 8px;
	background-image: linear-gradient(
		to right,
		#7bceb8,
		#7bceb8 4px,
		transparent 4px,
		transparent 8px
	);
	background-size: 8px 1px;
	background-repeat: repeat-x;
}

.wp-blog-content .d--simple-box4::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 8px;
	background-image: linear-gradient(
		to right,
		#7bceb8,
		#7bceb8 4px,
		transparent 4px,
		transparent 8px
	);
	background-size: 8px 1px;
	background-repeat: repeat-x;
}

.wp-blog-content .d--simple-box5 {
	border: 2px solid #eff9f7;
	background-color: #eff9f7;
}

.wp-blog-content .d--simple-box5 .a--simple-box-title {
	color: #4e7079;
}

.wp-blog-content .d--simple-box6 {
	border: 2px solid #8acebc;
	background-color: rgba(138, 206, 188, 0.1);
}

.wp-blog-content .d--simple-box6 .a--simple-box-title {
	color: #8acebc;
}

.wp-blog-content .d--simple-box7 {
	border: 2px solid #8ecebd;
	background-color: rgba(142, 206, 189, 0.1);
}

.wp-blog-content .d--simple-box7 .a--simple-box-title {
	color: #8ecebd;
}

.wp-blog-content .d--simple-box8 {
	border: 2px solid #eff7f5;
	background-color: #eff7f5;
}

.wp-blog-content .d--simple-box8 .a--simple-box-title {
	color: #4e7079;
}

.wp-blog-content .d--simple-box9 {
	border: 2px solid #7bceb8;
	background-color: rgba(123, 206, 184, 0.1);
	position: relative;
	margin: 2em 0;
}

.wp-blog-content .d--simple-box9 .a--simple-box-title {
	color: #7bceb8;
}

.wp-blog-content .d--simple-box10 {
	border: 2px solid #eff9f7;
	background-color: #eff9f7;
	position: relative;
	padding-bottom: 2em;
}

.wp-blog-content .d--simple-box10 .a--simple-box-title {
	color: #4e7079;
}

.wp-blog-content .d--simple-box11 {
	border: 2px solid #7bceb8;
	position: relative;
}

.wp-blog-content .d--simple-box11 .a--simple-box-title {
	color: #7bceb8;
}

.wp-blog-content .d--simple-box11::before,
.wp-blog-content .d--simple-box11::after {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	border-color: #7bceb8;
	border-style: solid;
}

.wp-blog-content .d--simple-box11::before {
	top: 8px;
	left: 8px;
	border-width: 2px 0 0 2px;
}

.wp-blog-content .d--simple-box11::after {
	bottom: 8px;
	right: 8px;
	border-width: 0 2px 2px 0;
}

.wp-blog-content .d--simple-box12 {
	background-color: rgba(78, 112, 121, 0.06);
	padding: 1.5em;
	position: relative;
}

/* ==========================================================================
   JIN:R Heading Box Variants
   ========================================================================== */
.wp-blog-content .d--heading-box1 {
	border: 2px solid #8ecebe;
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box1 .a--simple-box-title {
	background-color: #8ecebe;
	color: white;
	position: relative;
	margin: 0;
}

.wp-blog-content .d--heading-box1 .a--simple-box-title::before {
	content: "";
	position: absolute;
	bottom: -10px;
	left: 20px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 10px 10px 0 0;
	border-color: #8ecebe transparent transparent transparent;
}

.wp-blog-content .d--heading-box2 {
	border: 2px solid #7bceb8;
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box2 .a--simple-box-title {
	background-color: #7bceb8;
	color: white;
	margin: 0;
}

.wp-blog-content .d--heading-box3 {
	border: 2px solid #8ecebe;
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box3 .a--simple-box-title {
	background-color: #8ecebe;
	color: white;
	margin: 0;
}

.wp-blog-content .d--heading-box4 {
	border: 2px solid #8ecebe;
	border-radius: 8px;
	margin-bottom: 1.5em;
	overflow: hidden;
}

.wp-blog-content .d--heading-box4 .a--simple-box-title {
	background-color: #8ecebe;
	color: white;
	margin: 0;
	border-radius: 6px 6px 0 0;
}

.wp-blog-content .d--heading-box6 {
	border: 2px solid #14a7cc;
	background-color: rgba(20, 167, 204, 0.18);
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box6 .a--simple-box-title {
	color: #14a7cc;
}

.wp-blog-content .d--heading-box7 {
	border: 2px solid #14a7cc;
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box7 .a--simple-box-title {
	color: #14a7cc;
	border-left: 4px solid #14a7cc;
	padding-left: 1em;
}

.wp-blog-content .d--heading-box8 {
	border: 2px solid #14a7cc;
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box8 .a--simple-box-title {
	color: #14a7cc;
	border-bottom: 2px solid #14a7cc;
	padding-bottom: 0.5em;
}

.wp-blog-content .d--heading-box9 {
	border: 2px solid #14a7cc;
	margin-bottom: 1.5em;
}

.wp-blog-content .d--heading-box9 .a--simple-box-title {
	background-color: #14a7cc;
	color: white;
	margin: 0;
}

/* ==========================================================================
   JIN:R Button Styles
   ========================================================================== */
.wp-blog-content .b--jinr-button {
	margin: 1.5em 0;
	text-align: center;
}

.wp-blog-content .o--button-inner {
	display: inline-block;
}

.wp-blog-content .o--button-inner a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: all 0.3s ease;
	position: relative;
	font-weight: bold;
}

/* Button Type 1: Blue Gradient (Primary CTA) */
.wp-blog-content .d--button-type1 a {
	font-size: 14.4px;
	color: #ffffff;
	padding: 13.5px 48px 13.5px 30px;
	border-radius: 34px;
	background: linear-gradient(135deg, #1e73be, #5eaff2);
	box-shadow: 0 1px 3px hsla(207, 85%, 48%, 0.4);
}

.wp-blog-content .d--button-type1 a::after {
	content: "→";
	margin-left: 8px;
}

.wp-blog-content .d--button-type1 a:hover {
	opacity: 0.85;
}

@media (min-width: 552px) {
	.wp-blog-content .d--button-type1 a {
		font-size: 16px;
		padding: 19px 60px 18px 40px;
	}
}

/* Button Type 2: Teal (Secondary CTA) */
.wp-blog-content .d--button-type2 a {
	font-size: 14.4px;
	color: #ffffff;
	padding: 13.5px 48px 13.5px 30px;
	border-radius: 33px;
	background-color: #7bceb8;
	box-shadow: 0 1px 3px hsla(164, 46%, 47%, 0.4);
}

.wp-blog-content .d--button-type2 a::after {
	content: "→";
	margin-left: 8px;
}

.wp-blog-content .d--button-type2 a:hover {
	opacity: 0.85;
}

@media (min-width: 552px) {
	.wp-blog-content .d--button-type2 a {
		font-size: 16px;
		padding: 19px 60px 18px 40px;
	}
}

/* Button Type 3: Blue Outline */
.wp-blog-content .d--button-type3 a {
	font-size: 14.4px;
	color: #14a7cc;
	border: 1px solid #14a7cc;
	padding: 11px 40px 11px 24px;
	border-radius: 5px;
}

.wp-blog-content .d--button-type3 a::after {
	content: "→";
	margin-left: 8px;
}

.wp-blog-content .d--button-type3 a:hover {
	background: rgba(20, 167, 204, 0.09);
	border-color: transparent;
}

@media (min-width: 552px) {
	.wp-blog-content .d--button-type3 a {
		font-size: 16px;
		padding: 16px 56px 15px 32px;
	}
}

/* Button Type 4: Teal Outline */
.wp-blog-content .d--button-type4 a {
	font-size: 14.4px;
	color: #7bceb8;
	border: 1px solid #7bceb8;
	padding: 11px 40px 11px 24px;
	border-radius: 5px;
}

.wp-blog-content .d--button-type4 a::after {
	content: "→";
	margin-left: 8px;
}

.wp-blog-content .d--button-type4 a:hover {
	background: rgba(123, 206, 184, 0.09);
	border-color: transparent;
}

@media (min-width: 552px) {
	.wp-blog-content .d--button-type4 a {
		font-size: 16px;
		padding: 16px 56px 15px 32px;
	}
}

/* d--button-solid: filled background */
.wp-blog-content .d--button-solid a {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   JIN:R Speech Bubbles (Fukidashi)
   ========================================================================== */
.wp-blog-content .wp-block-jinr-blocks-fukidashi {
	margin: 1.5em 0;
	overflow: visible;
	border-radius: 0;
}

/* Flex container: o--jinr-fukidashi is the row wrapper for chat style */
.wp-blog-content .o--jinr-fukidashi {
	display: flex;
	gap: 1em;
	align-items: flex-start;
}

/* Bubble Content */
.wp-blog-content .c--fukidashi-contents {
	flex: 1;
	position: relative;
	border-radius: 8px;
	padding: 1em 1.25em;
	background-color: #f5f5f5;
}

.wp-blog-content .c--fukidashi-contents p:last-child,
.wp-blog-content .o--fukidashi-inner p:last-child {
	margin-bottom: 0;
}

/* === Chat style: img-box is a SIBLING of contents === */
.wp-blog-content .d--fukidashi-chat .c--fukidashi-img-box {
	flex-shrink: 0;
	width: 60px;
	text-align: center;
}

.wp-blog-content .d--fukidashi-chat.d--fukidashi-left {
	flex-direction: row;
}

.wp-blog-content .d--fukidashi-chat.d--fukidashi-right {
	flex-direction: row-reverse;
}

/* === Interview style: img-box is INSIDE contents — pull it outside === */
.wp-blog-content .d--fukidashi-interview .c--fukidashi-contents {
	position: relative;
}

.wp-blog-content .d--fukidashi-interview .c--fukidashi-img-box {
	position: absolute;
	top: 0;
	width: 60px;
	text-align: center;
}

.wp-blog-content .d--fukidashi-interview.d--fukidashi-left .c--fukidashi-contents {
	margin-left: 76px;
}

.wp-blog-content .d--fukidashi-interview.d--fukidashi-left .c--fukidashi-img-box {
	left: -76px;
}

.wp-blog-content .d--fukidashi-interview.d--fukidashi-right .c--fukidashi-contents {
	margin-right: 76px;
}

.wp-blog-content .d--fukidashi-interview.d--fukidashi-right .c--fukidashi-img-box {
	right: -76px;
}

.wp-blog-content .a--fukidashi-img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	overflow: hidden;
}

.wp-blog-content .a--fukidashi-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Speaker Name */
.wp-blog-content .a--fukidashi-icon-name {
	display: block;
	font-size: 0.7em;
	color: #666;
	text-align: center;
	margin-top: 4px;
	line-height: 1.3;
}

/* Decorative circle behind avatar — hide */
.wp-blog-content .a--fukidashi-img-circle {
	display: none;
}

/* Triangle arrow elements */
.wp-blog-content .a--fukidashi-parts-before,
.wp-blog-content .a--fukidashi-parts-after {
	position: absolute;
	width: 0;
	height: 0;
	border-style: solid;
}

/* Left Aligned — arrow points left toward avatar */
.wp-blog-content .d--fukidashi-left .a--fukidashi-parts-before {
	left: -10px;
	top: 15px;
	border-width: 8px 10px 8px 0;
	border-color: transparent currentColor transparent transparent;
}

.wp-blog-content .d--fukidashi-left .a--fukidashi-parts-after {
	left: -8px;
	top: 15px;
	border-width: 8px 10px 8px 0;
	border-color: transparent currentColor transparent transparent;
}

/* Right Aligned — arrow points right toward avatar */
.wp-blog-content .d--fukidashi-right .a--fukidashi-parts-before {
	right: -10px;
	top: 15px;
	border-width: 8px 0 8px 10px;
	border-color: transparent transparent transparent currentColor;
}

.wp-blog-content .d--fukidashi-right .a--fukidashi-parts-after {
	right: -8px;
	top: 15px;
	border-width: 8px 0 8px 10px;
	border-color: transparent transparent transparent currentColor;
}

/* Border Thin Style — uses inline border-color & background-color on .c--fukidashi-contents */
.wp-blog-content .d--fukidashi-border-thin .c--fukidashi-contents {
	border-width: 2px;
	border-style: solid;
}

/* ==========================================================================
   WordPress Core: Group Block
   ========================================================================== */
.wp-blog-content .wp-block-group {
	margin: 1em 0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.wp-blog-content .d--bold {
	font-weight: bold;
}

.wp-blog-content .has-text-align-center {
	text-align: center;
}

.wp-blog-content .has-text-align-left {
	text-align: left;
}

.wp-blog-content .has-text-align-right {
	text-align: right;
}

.wp-blog-content .is-content-justification-center {
	display: flex;
	justify-content: center;
}

/* ==========================================================================
   WordPress Core: Separator / HR
   ========================================================================== */
.wp-blog-content .wp-block-separator {
	border: none;
	border-top: 1px solid #e0e0e0;
	margin: 2em 0;
}

/* ==========================================================================
   WordPress Core: Blockquote
   ========================================================================== */
.wp-blog-content blockquote {
	border-left: 4px solid #7bceb8;
	padding: 1em 1.5em;
	margin: 1.5em 0;
	background-color: #f9fafb;
	color: #555;
}

.wp-blog-content blockquote p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   WordPress Core: Table
   ========================================================================== */
.wp-blog-content .wp-block-table {
	margin-bottom: 1.5em;
	overflow-x: auto;
}

.wp-blog-content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
}

.wp-blog-content .wp-block-table th,
.wp-blog-content .wp-block-table td {
	border: 1px solid #ddd;
	padding: 0.75em 1em;
	text-align: left;
}

.wp-blog-content .wp-block-table th {
	background-color: #f5f5f5;
	font-weight: bold;
}

/* ==========================================================================
   Links within blog content
   ========================================================================== */
.wp-blog-content a {
	color: #1e73be;
	text-decoration: underline;
}

.wp-blog-content a:hover {
	color: #155a96;
}

/* ==========================================================================
   WordPress JIN: Balloon (Chat) Block
   WP HTMLから取得した吹き出しブロック用
   ========================================================================== */
.wp-blog-content .balloon-box {
	display: grid;
	grid-template-columns: 60px 1fr;
	grid-template-rows: auto auto;
	column-gap: 1rem;
	margin: 1.5em 0;
}

.wp-blog-content .balloon-box .balloon-icon {
	grid-column: 1;
	grid-row: 1;
	justify-self: center;
}

.wp-blog-content .balloon-box .balloon-icon img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
}

.wp-blog-content .balloon-box .icon-name {
	grid-column: 1;
	grid-row: 2;
	font-size: 0.7rem;
	color: #666;
	text-align: center;
	width: auto;
}

.wp-blog-content .balloon-box .balloon-serif {
	grid-column: 2;
	grid-row: 1 / -1;
	min-width: 0;
}

.wp-blog-content .balloon-box .balloon-content {
	background: #f0f4f8;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	position: relative;
}

.wp-blog-content .balloon-box .balloon-content p:last-child {
	margin-bottom: 0;
}

.wp-blog-content .balloon-box.balloon-right {
	flex-direction: row-reverse;
}

/* ==========================================================================
   応急処置: BlogImage + icon-name パターンを吹き出し風に表示
   移管時に Fukidashi コンポーネントに変換されなかった記事向け
   構造: figure.wp-block-image → span.icon-name → p（兄弟要素）
   CSSのみで横並びレイアウトを実現（float使用）
   ========================================================================== */
.wp-blog-content .wp-block-image:has(+ .icon-name) {
	float: left;
	width: 60px;
	margin: 0 1rem 0.5rem 0;
}

.wp-blog-content .wp-block-image:has(+ .icon-name) img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
}

.wp-blog-content .icon-name:not(.balloon-box *) {
	float: left;
	clear: left;
	font-size: 0.7rem;
	text-align: center;
	width: 60px;
	color: #666;
	margin-right: 1rem;
}

.wp-blog-content .icon-name:not(.balloon-box *) + p {
	background: #f0f4f8;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	margin-top: 0;
	overflow: hidden;
}

/* ==========================================================================
   Scroll Offset for Anchor Links (TOC)
   ========================================================================== */
.wp-blog-content h2[id],
.wp-blog-content h3[id],
.wp-blog-content h4[id] {
	scroll-margin-top: var(--header-height, 80px);
}
