/*
Theme Name: Shurijo Castle
Theme URI: https://example.com/shurijocastle
Author: Shurijo Castle
Author URI: https://example.com
Description: A general-purpose, standards-compliant WordPress theme for the Shurijo Castle project. Supports custom logo, custom menus, widget areas, featured images, and threaded comments.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shurijocastle
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks, block-styles
*/

/* ==========================================================================
   1. Reset & base
   Ported from lp_html/shurijo/css/style.css so every template (not just the
   front page) shares the same dark Okinawan-castle look.
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0e1414;
	color: #ffffff;
	line-height: 1.8;
	font-size: 16px;
}

body:not(.home) #page {
	position: relative;
	z-index: 0;
	background-color: #68BBD2;
	background-repeat: no-repeat;
	background-position: center top;
	background-size: auto;
	background-image: linear-gradient(to bottom, #096679 0%, #3A87AA 20%, #4B92BC 40%, #4B92BC 100%);
}

body:not(.home) #page::before {
	content: '';
	display: block;
	position: absolute;
	inset: 0;
	background-image: url(assets/images/bg-overlay.png);
	background-position: center top;
	background-size: 7.5%;
	background-repeat: repeat;
	z-index: -2;
	opacity: 0.9;
	mix-blend-mode: overlay;
	pointer-events: none;
}

body:not(.home) #page::after {
	content: '';
	display: block;
	position: absolute;
	inset: 0;
	background-image: url(assets/images/cloud-right-other.png);
	background-position: top right;
	background-size: 400px auto;
	background-repeat: no-repeat;
	z-index: -1;
	pointer-events: none;
}

@media (max-width: 768px) {
	body:not(.home) #page::after {
		background-size: 50vw auto;
		background-position: top -7vw;
		top: -7vw;
	}

	body:not(.home) #page::before {
		background-size: 18%;
	}
}

@media (max-width: 480px) {
	body {
		font-size: 3.6vw;
	}
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.3s;
}

a:hover {
	opacity: 0.75;
}

a:focus-visible {
	outline: 2px solid #4ecfc8;
	outline-offset: 2px;
}

ul,
ol {
	padding-left: 1.25em;
}

table {
	border-collapse: collapse;
	width: 100%;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.3;
	margin: 1.4em 0 0.6em;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	left: -9999em;
	top: -9999em;
}

/* ==========================================================================
   2. Common utilities
   Shared building blocks used across the front page and inner templates —
   ported from lp_html/shurijo/css/style.css.
   ========================================================================== */

.sp {
	display: none !important;
}

@media (max-width: 480px) {
	.sp {
		display: block !important;
	}

	.pc {
		display: none !important;
	}
}

.sec-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 44px 90px;
}

@media (max-width: 768px) {
	.sec-inner {
		padding: 2vw 6vw 14vw;
	}
}

.breadcrumb-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 44px 0;
	font-size: 14px;
	letter-spacing: 0.06em;
}

.breadcrumb__sep {
	margin: 0 10px;
	font-size: 20px;
}

@media (max-width: 768px) {
	.breadcrumb-wrap {
		padding: 6vw 6vw 0;
		font-size: 2.2vw;
	}
}

@media (max-width: 480px) {
	.breadcrumb-wrap {
		font-size: 3.2vw;
	}
}

.bg2-title {
	text-align: center;
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 700;
	letter-spacing: 0.22em;
	margin-bottom: 16px;
	color: #fff;
}

.page-title,
.page-header .page-title {
	text-align: center;
	font-size: clamp(30px, 4vw, 50px);
	font-weight: 500;
	letter-spacing: 0.22em;
	color: #fff;
	font-family: "Zen Old Mincho", serif;
	margin-bottom: 60px;
}

.bg2-title.bg-ct {
	font-size: clamp(16px, 1.4vw, 22px);
	margin-top: 0;
	margin-bottom: 20px;
}

.title-sub {
	font-size: clamp(20px, 2.8vw, 28px);
	color: rgba(255, 255, 255, 0.8);
	letter-spacing: 0.1em;
}

@media (max-width: 480px) {
	.bg2-title {
		font-size: 5vw;
		margin-bottom: 3vw;
	}

	.page-title,
	.page-header .page-title {
		margin-bottom: 8vw;
	}
}

.btn-lp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(20, 20, 20, 0.7);
	border: 2px solid rgba(255, 255, 255, 0.7);
	padding: 18px 52px;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.08em;
	color: #fff;
	transition: background 0.3s, border-color 0.3s;
	cursor: pointer;
	position: relative;
	min-width: 360px;
}

.btn-lp:hover {
	background: rgba(20, 20, 20, 0.8);
	border-color: #fff;
	opacity: 1;
}

/* CSS-drawn chevron (border corner rotated -45°) instead of a "›" glyph, so
   its size/weight is consistent across fonts and it centers on the button
   regardless of height (no more per-breakpoint top:21%/29% percentage hacks). */
.btn-lp-arrow {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%) rotate(-45deg);
}

@media (max-width: 480px) {
	.btn-lp {
		padding: 6vw 7.5vw 6vw 5vw;
		width: 100%;
		font-size: 4.8vw;
		border-width: 2px;
		min-width: auto;
	}
}

/* ==========================================================================
   Schedule table (関連イベント) — shared by the front page's schedule
   section and archive-schedule_event.php's standalone listing.
   ========================================================================== */

.table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 15px;
}

.sch-note {
	text-align: center;
	font-size: clamp(20px, 2.5svw, 26px);
	font-weight: 700;
	color: #fff;
	margin-top: 32px;
	margin-bottom: 48px;
	line-height: 1.5;
	font-family: "Noto Sans JP", sans-serif;
	letter-spacing: 0.08em;
}

.sch-title {
	text-align: center;
	font-size: clamp(22px, 3svw, 30px);
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.5;
	margin-bottom: 40px;
	color: #fff;
}

.sch-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 600px;
}

.sch-table th {
	padding: 12px 20px;
	font-weight: 700;
	letter-spacing: 0.08em;
	border-bottom: 2px solid rgba(255, 255, 255, 0.9);
	text-align: left;
	color: #4ecfc8;
	width: 26%;
	font-size: 20px;
}

.sch-table th:first-child {
	padding-left: 0;
}

.sch-table th:last-child {
	padding-right: 0;
}

.archive .sch-table th {
	color: #fff;
}

.sch-table td {
	padding: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	line-height: 1.6;
	vertical-align: top;
	font-size: 16px;
	letter-spacing: 0.08em;
}

.sch-table td:first-child {
	padding-left: 0;
}

.sch-table td:last-child {
	padding-right: 0;
}

.sch-table__label {
	display: none;
}

.sch-table__row[data-href] {
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.sch-table__row[data-href]:hover {
	background-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
	.sch-table th {
		padding: 12px 14px;
	}

	.sch-table td {
		padding: 18px 14px;
	}
}

@media (max-width: 480px) {
	.sch-title {
		font-size: 4.8vw;
	}

	.table-wrap {
		overflow-x: visible;
		margin-bottom: 3vw;
	}

	.sch-note {
		font-size: 4.8vw;
		margin-top: 5vw;
		margin-bottom: 8vw;
		text-align: center;
	}

	.sch-table {
		min-width: unset;
		display: block;
		border-top: 2px solid #fff;
	}

	.archive .sch-table {
		border-top: none;
	}

	.sch-table thead {
		display: none;
	}

	.sch-table tbody {
		display: block;
	}

	.sch-table tr {
		display: grid;
		grid-template-columns: 1fr 1fr;
		border-bottom: 1px solid rgba(255, 255, 255, 0.4);
		padding: 14px 0;
	}

	.sch-table td {
		display: block;
		border-bottom: none;
		padding: 5px 0;
		font-size: 3.1vw;
		line-height: 1.6;
	}

	.sch-table td:nth-child(2) {
		padding-right: 20px;
	}

	.sch-table td:nth-child(1),
	.sch-table td:nth-child(4) {
		grid-column: 1 / -1;
	}

	.sch-table td:nth-child(1) {
		font-weight: 700;
		font-size: 3.4vw;
	}

	.sch-table__label {
		display: block;
		color: #4ecfc8;
		letter-spacing: 0.06em;
		margin-bottom: 3px;
		font-size: 3vw;
	}

	.archive .sch-table__label {
		color: #fff;
	}
}

/* "TOP へ戻る" button under a CPT archive listing (notice, schedule_event). */
.archive-back {
	text-align: center;
	margin-top: 70px;
}

.error-404 .archive-back {
	margin-bottom: 120px;
}

@media (max-width: 480px) {
	.error-404 .archive-back {
		margin-bottom: 100px;
	}
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

.site {
	max-width: 100%;
}

.site-main {
	overflow-x: hidden;
}

.site-main.front-page {
	margin-top: -95px;
}

.site-content-wrap {
	position: relative;
	overflow-x: hidden;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 44px 0;
}

/*.site-content-wrap::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: calc(50% - 50vw);
	width: 300px;
	height: 328px;
	background: url(assets/images/cloud-left-other.png) no-repeat bottom center / 100%;
	pointer-events: none;
	z-index: -1;
}*/

@media (max-width: 768px) {
	.site-content-wrap::after {
		width: 34vw;
		height: 37vw;
	}
}

.site-content-wrap.has-sidebar {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 40px;
	align-items: start;
}

@media (max-width: 768px) {
	.site-content-wrap.has-sidebar {
		grid-template-columns: 1fr;
	}
	.site-content-wrap {
		padding: 2vw 6vw 0;
	}
}

/* ==========================================================================
   4. Content (blog posts, pages, archives, search)
   ========================================================================== */

.entry-title {
	margin-top: 0;
	color: #ffffff;
}

.entry-title a {
	color: inherit;
}

.entry-meta {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.85rem;
	margin-bottom: 1em;
}

.entry-content {
	color: rgba(255, 255, 255, 0.9);
}

.entry-content > * + * {
	margin-top: 1.2em;
}

.entry-footer {
	margin-top: 2em;
	padding-top: 1em;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
}

.post-thumbnail {
	margin-bottom: 1.5em;
}

.pagination,
.nav-links {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 2em 0;
	color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   5. Sidebar & widgets
   ========================================================================== */

.widget {
	margin-bottom: 2em;
	color: rgba(255, 255, 255, 0.85);
}

.widget-title {
	font-size: 1.1rem;
	color: #ffffff;
	border-bottom: 2px solid #b3202c;
	padding-bottom: 0.4em;
	margin-bottom: 0.8em;
}

/* ==========================================================================
   6. Comments
   ========================================================================== */

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	padding-left: 24px;
}

.comment-body {
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	padding: 1.2em 0;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	max-width: 500px;
	padding: 8px 10px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #ffffff;
	font-family: inherit;
}

/* ==========================================================================
   7. Block alignment (core editor)
   ========================================================================== */

.alignleft {
	float: left;
	margin-right: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide {
	max-width: 1200px;
}

.alignfull {
	max-width: none;
	width: 100%;
}
