/*
Theme Name: THEMAE Vol 1.2 Child
Theme URI: 
Description: Child theme of THEMAE Vol 1.2
Author: 
Author URI: 
Template: clinic_vol1.2
Version: 1.0.0
Requires at least: 5.7
Tested up to: 6.8.3
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clinic-vol1-2-child
*/

/* 
 * Custom styles for the child theme can be added here
 * Parent theme styles will be loaded automatically
 */

/* Column Page Styles - Archive and Sidebar */
#wrap_main {
	/* max-width: 1200px; */
	margin: 0 auto;
	padding: 20px;
}

#wrap_contents {
	width: 100%;
}

#contents {
	display: flex;
	gap: 30px;
	align-items: flex-start;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

/* Main Left Section */
.column-main-left {
	flex: 1;
	min-width: 0;
}

#wrap_page_title {
	margin: 0;
	margin-bottom: 20px;
}

#wrap_page_title h3 {
	font-weight: bold;
	color: #A78569;
	margin: 0;
}

.column-subtitle {
	margin-bottom: 30px;
}

.column-subtitle p,
.column-subtitle h3 {
	font-size: 16px;
	color: #A78569;
	line-height: 1.6;
	margin: 0;
	margin-bottom: 10px;
}

.column-subtitle h3:last-child {
	margin-bottom: 0;
}

.new-article-section {
	margin-bottom: 40px;
}

.section-title {
	font-size: 20px;
	font-weight: bold;
	color: #A78569;
	margin-bottom: 20px;
}

.section-header .section-title {
	margin-bottom: unset;
}

.section-header {
	margin-bottom: 20px;
	width: 29%;
}

/* Article Grid - 3x3 Layout */
.column-post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 30px;
}

.column-post-item {
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.column-post-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.column-post-link {
	display: block;
	text-decoration: none;
	color: #A78569;
}

.column-post-thumbnail {
	width: 100%;
	height: 140px;
	overflow: hidden;
	background: #f5f5f5;
}

.column-post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.column-post-category {
	display: inline-block;
	padding: 4px 8px;
	background: #f0f0f0;
	color: #666;
	font-size: 12px;
	margin: 10px;
	border-radius: 3px;
}

.column-post-content {
	padding: 15px;
}

.column-post-title {
	font-size: 14px;
	font-weight: normal;
	color: #A78569;
	line-height: 1.5;
	margin: 0 0 10px 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.column-post-meta {
	font-size: 12px;
	color: #999;
}

.update-date {
	color: #A78569;
}

/* Pagination */
.pagination-wrapper {
	margin-top: 40px;
	text-align: center;
}

.pagination-wrapper .page-numbers {
	display: flex;
	padding: 8px 12px;
	margin: 0 4px;
	color: #A78569;
	text-decoration: none;
	border: none;
	border-radius: 3px;
	transition: all 0.3s ease;
	justify-content: center;
}

.pagination-wrapper .page-numbers a:hover,
.pagination-wrapper .page-numbers.current {
	background: #A78569;
	color: #fff;
}

.pagination-wrapper .page-numbers.current {
	font-weight: bold;
}

/* Sidebar Styles */
.column-sidebar {
	width: 300px;
	flex-shrink: 0;
}

.sidebar-section {
	padding: 0 0 15px 0;
	border: none;
}

.sidebar-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
	font-size: 16px;
	font-weight: bold;
}

.sidebar-title .title-en {
	color: #A78569;
}

.sidebar-title .title-separator {
	color: #ccc;
}

.sidebar-title .title-ja {
	color: #A78569;
}

.sidebar-divider {
	position: relative;
	height: 1px;
	background: #A78569;
	margin-bottom: 5px;
}

.sidebar-divider::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 11px;
	width: 30%;
	height: 3px;
	background: #A78569;
}

/* NEW ARTICLES Section */
.sidebar-article-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-article-item {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.sidebar-article-item:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.article-category-tag {
	display: inline-block;
	padding: 3px 8px;
	background: #f0f0f0;
	color: #666;
	font-size: 11px;
	border-radius: 3px;
	margin-right: 8px;
	margin-bottom: 0;
}

.article-date {
	display: inline-block;
	font-size: 12px;
	color: #999;
	margin-bottom: 8px;
	margin-right: 0;
}

.sidebar-article-item .article-meta-wrapper {
	margin-bottom: 8px;
}

.article-title {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}

.article-title a {
	color: #A78569;
	text-decoration: none;
	transition: color 0.3s ease;
}

.article-title a:hover {
	color: #8a6d4f;
	text-decoration: underline;
}

/* CATEGORY Section */
.sidebar-category-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-category-list li {
	margin-bottom: 10px;
}

.sidebar-category-list li a {
	color: #A78569;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

.sidebar-category-list li a:hover {
	color: #8a6d4f;
	text-decoration: underline;
}

/* OTHER Section */
.sidebar-other-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-other-list li {
	margin-bottom: 10px;
}

.sidebar-other-list li a {
	color: #A78569;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

.sidebar-other-list li a:hover {
	color: #8a6d4f;
	text-decoration: underline;
}

.contents_title {
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
	#contents {
		flex-direction: column;
	}

	.column-sidebar {
		width: 100%;
	}

	.column-post-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
}

@media (max-width: 480px) {
	.column-post-grid {
		grid-template-columns: 1fr;
	}
}

/* Single Page Styles */
#single_contents {
	position: relative;
}

#single {
	font-size: 28px;
	font-weight: bold;
	line-height: 1.5;
	margin-bottom: 15px;
	color: #A78569;
}

#single a {
	color: #A78569;
	text-decoration: none;
}

#single a:hover {
	color: #8a6d4f;
	text-decoration: underline;
}

/* Post Meta - Date Display */
#jinrPostMeta {
	display: flex;
	align-items: center;
	margin: 15px 0;
	flex-wrap: wrap;
	gap: 15px;
}

#jinrPostMeta .c--jinr-post-date {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	order: 1;
	font-size: 14px;
	color: #666;
}

#jinrPostMeta .c--jinr-post-date .jif,
#jinrPostMeta .c--jinr-post-date i,
#jinrPostMeta .c--jinr-post-date .fas {
	margin-right: 5px;
	color: #A78569;
}

#jinrPostMeta .c--jinr-post-date time {
	color: #666;
}

/* Column Single Page Styles */
.column-single-content {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
}

/* Column PR Notice */
.column-pr-notice {
	font-size: 14px;
	color: #666;
	margin-bottom: 20px;
	padding: 10px 0;
}

/* H2 Design - Color #A78569 (Brown banner with white text) */
.column-single-content h2,
#postContent h2,
#single_contents h2,
.column-single-content .h2 {
	background-color: #A78569;
	color: #ffffff;
	font-size: 24px;
	font-weight: bold;
	margin-top: 30px;
	margin-bottom: 20px;
	padding: 12px 15px;
	border: none;
	border-radius: 0;
	display: block;
}

/* Override for #single title */
#single_contents #single {
	background-color: transparent;
	color: #A78569;
	padding: 0;
	margin-top: 0;
}

#single_contents #single a {
	color: #A78569;
}

/* H3 Design (Brown text with two-color underline) */
.column-single-content h3,
#postContent h3,
#single_contents h3,
.column-single-content .h3 {
	color: #A78569;
	font-size: 18px;
	font-weight: normal;
	margin-top: 25px;
	margin-bottom: 15px;
	padding: 0;
	padding-bottom: 10px;
	position: relative;
}

.column-single-content h3::after,
#postContent h3::after,
#single_contents h3::after,
.column-single-content .h3::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(to right, #A78569 33%, #d8cbba 33%);
}

/* H4 Design (Brown vertical bar + text) */
.column-single-content h4,
#postContent h4,
#single_contents h4,
.column-single-content .h4 {
	color: #A78569;
	font-size: 18px;
	font-weight: bold;
	margin-top: 20px;
	margin-bottom: 12px;
	padding-left: 15px;
	position: relative;
}

.column-single-content h4::before,
#postContent h4::before,
#single_contents h4::before,
.column-single-content .h4::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background-color: #A78569;
}

/* Contents Box Color #A78569 */
#table-of-contents,
.toc,
.mokuji,
.contents-box {
	background-color: #A78569 !important;
	border-color: #A78569 !important;
}

#table-of-contents .toc-title,
.toc .toc-title,
.mokuji .mokuji-title,
.contents-box .contents-title {
	color: #fff !important;
	background-color: #A78569 !important;
}

#table-of-contents a,
.toc a,
.mokuji a,
.contents-box a {
	color: #fff !important;
}

/* Table of Contents Toggle Button */
.toc-toggle,
.contents-toggle,
.mokuji-toggle {
	background-color: #A78569 !important;
	color: #fff !important;
	border-color: #A78569 !important;
}

.toc-toggle:hover,
.contents-toggle:hover,
.mokuji-toggle:hover {
	background-color: #8a6d4f !important;
	border-color: #8a6d4f !important;
}

/* Column Accordion Styles */
.column-accordion-wrapper {
	margin: 30px 0;
}

/* Default style */
.column-accordion-item {
	margin-bottom: 15px;
}

.column-accordion-style-default {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.column-accordion-style-default .column-accordion-header {
	background-color: #f5f5f5;
	padding: 15px 20px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background-color 0.3s ease;
}

.column-accordion-style-default .column-accordion-header:hover {
	background-color: #e8e8e8;
}

.column-accordion-style-default .column-accordion-header.active {
	background-color: var(--active-bg-color, #A78569);
}

.column-accordion-style-default .column-accordion-header.active .column-accordion-title {
	color: var(--active-title-color, #fff);
}

.column-accordion-style-default .column-accordion-header.active .column-accordion-icon {
	color: var(--active-title-color, #fff);
	transform: rotate(45deg);
}

.column-accordion-style-default .column-accordion-title {
	font-weight: bold;
	color: #333;
	font-size: 16px;
}

.column-accordion-style-default .column-accordion-icon {
	font-size: 24px;
	color: #A78569;
	transition: transform 0.3s ease, color 0.3s ease;
	font-weight: bold;
}

.column-accordion-style-default .column-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.column-accordion-style-default .column-accordion-content.active {
	max-height: 2000px;
}

.column-accordion-style-default .column-accordion-inner {
	padding: 20px;
	background-color: #fff;
}

/* Simple style */
.column-accordion-style-simple {
	padding-bottom: 15px;
	margin-bottom: 20px;
}

.column-accordion-style-simple:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.column-accordion-style-simple .column-accordion-header {
	background-color: transparent;
	padding: 12px 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: all 0.3s ease;
	border: none;
}

.column-accordion-style-simple .column-accordion-header:hover {
	opacity: 0.8;
}

.column-accordion-style-simple .column-accordion-header.active {
	background-color: transparent;
}

.column-accordion-style-simple .column-accordion-header.active .column-accordion-title {
	color: var(--active-title-color, #A78569);
}

.column-accordion-style-simple .column-accordion-title {
	font-weight: normal;
	color: #333;
	font-size: 16px;
	line-height: 1.6;
	flex: 1;
}

.column-accordion-style-simple .column-accordion-icon-left {
	flex-shrink: 0;
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 1em;
	color: #A78569;
	font-size: 0.9em;
	line-height: 1;
	transition: transform 0.3s ease, color 0.3s ease;
	text-align: center;
}

.column-accordion-style-simple .column-accordion-icon-left::before {
	content: "\f078";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	display: inline-block;
}

.column-accordion-style-simple .column-accordion-header.active .column-accordion-icon-left {
	transform: rotate(180deg);
	color: var(--active-title-color, #A78569);
}

.column-accordion-style-simple .column-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, padding 0.4s ease;
	padding: 0 28px;
}

.column-accordion-style-simple .column-accordion-content.active {
	max-height: 2000px;
	padding: 0 28px;
}

.column-accordion-style-simple .column-accordion-inner {
	padding: 0;
	background-color: transparent;
	color: #333;
	font-size: 15px;
	line-height: 1.8;
}

.column-accordion-style-simple .column-accordion-inner p {
	margin: 0 0 12px 0;
}

.column-accordion-style-simple .column-accordion-inner p:last-child {
	margin-bottom: 0;
}

/* Common styles */
.column-accordion-header {
	cursor: pointer;
	display: flex;
	align-items: center;
}

.column-accordion-style-default .column-accordion-header {
	justify-content: space-between;
}

.column-accordion-icon {
	transition: transform 0.3s ease, color 0.3s ease;
}

.column-accordion-content {
	overflow: hidden;
}

/* Responsive adjustments for single pages */
@media (max-width: 768px) {
	.column-single-content {
		font-size: 15px;
	}

	.column-single-content h2,
	#postContent h2,
	#single_contents h2 {
		font-size: 22px;
		padding: 10px 12px;
	}

	.column-single-content h3,
	#postContent h3,
	#single_contents h3 {
		font-size: 17px;
	}

	.column-single-content h4,
	#postContent h4,
	#single_contents h4 {
		font-size: 17px;
		padding-left: 12px;
	}

	.column-single-content h4::before,
	#postContent h4::before,
	#single_contents h4::before {
		width: 3px;
	}

	#single {
		font-size: 24px;
	}

	/* Post Meta - Stack on mobile if needed */
	#jinrPostMeta {
		flex-direction: column;
		align-items: flex-start;
	}

	#jinrPostMeta .c--jinr-post-date {
		margin-right: 0;
	}

	/* Accordion mobile styles */
	.column-accordion-style-simple .column-accordion-title {
		font-size: 15px;
	}

	.column-accordion-style-simple .column-accordion-icon-left {
		width: 0.9em;
		height: 0.9em;
		margin-right: 0.8em;
	}

	.column-accordion-style-default .column-accordion-title {
		font-size: 15px;
	}

	.column-accordion-style-default .column-accordion-header {
		padding: 12px 15px;
	}

	.column-accordion-style-default .column-accordion-inner {
		padding: 15px;
	}
}

/* Fix for wrap_footer inside wrap_contents - ensure it displays as block and clears floats */
div#wrap_contents div#wrap_footer {
	width: 100% !important;
	float: none !important;
	clear: both !important;
	display: block !important;
}

/* Ensure wrap_footer is always outside wrap_contents in terms of layout */
div#wrap_footer {
	width: 100% !important;
	clear: both !important;
}

