/**
 * OTCA Theme — Theme Structural Stylesheet
 *
 * Contains ONLY theme-level structural styles:
 * 1. Base document reset and font smoothing.
 * 2. Fixed Header Wrapper (`#masthead`, `1300px` max-width) and Mobile Navigation Drawer.
 * 3. Blog Archive (`index.php` / `/news/`) layout, post cards, and sidebar widgets.
 * 4. Modals (`#otca-contact-modal` & `#otca-search-modal`) and Back-to-Top button.
 *
 * (All custom Elementor widget styles and Container behavior extensions live in the
 * `WebContent Custom Widgets for Elementor` plugin.)
 */

/* 1. Base Reset & Document Structure */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: clip;
	max-width: 100%;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--otca-body-font, "Manrope", sans-serif);
	color: var(--otca-text, #52525B);
	background-color: var(--otca-bg, #FFFFFF);
	overflow-x: clip;
	max-width: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.e-parent {
	overflow-x: clip;
}

/* 2. Floating & Sticky Header Shell (1300px width) */
.otca-site-header {
	position: fixed;
	top: 20px;
	left: 0;
	right: 0;
	z-index: 999;
	pointer-events: none;
	transition: top 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.admin-bar .otca-site-header {
	top: 52px;
}

.otca-site-header.is-scrolled {
	top: 12px;
}

.admin-bar .otca-site-header.is-scrolled {
	top: 44px;
}

.otca-header-inner {
	max-width: var(--otca-container-width, 1300px);
	margin: 0 auto;
	padding: 0 10px;
	pointer-events: auto;
}

/* Navigation Menu List & Mobile Toggle */
.otca-nav-wrapper {
	display: flex;
	align-items: center;
	width: 100%;
	position: relative;
}

.otca-nav-list {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.otca-nav-list > li {
	margin: 0;
	padding: 0;
}

.otca-nav-list > li > a {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border-radius: 8px;
	font-family: var(--otca-body-font, "Manrope", sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	color: #FFFFFF;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.otca-nav-list > li > a:hover,
.otca-nav-list > li.current-menu-item > a,
.otca-nav-list > li.current_page_item > a {
	background-color: #FFFFFF;
	color: #000000;
}

.otca-mobile-toggle,
.otca-mobile-toggle:hover,
.otca-mobile-toggle:focus {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	padding: 6px !important;
}

.otca-hamburger-line {
	display: block;
	width: 24px;
	height: 2px;
	background-color: #FFFFFF;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.otca-mobile-toggle[aria-expanded="true"] .otca-hamburger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.otca-mobile-toggle[aria-expanded="true"] .otca-hamburger-line:nth-child(2) {
	opacity: 0;
}

.otca-mobile-toggle[aria-expanded="true"] .otca-hamburger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
	.otca-site-header,
	.otca-site-header.is-scrolled {
		top: 0;
	}
	.admin-bar .otca-site-header,
	.admin-bar .otca-site-header.is-scrolled {
		top: 32px;
	}
	.otca-header-inner {
		max-width: 100%;
		padding: 0;
	}
	.otca-mobile-toggle {
		display: inline-flex;
	}
	.otca-nav-menu-container {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 240px;
		background-color: #18181B;
		padding: 15px;
		border-radius: 12px;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
		z-index: 1000;
		margin-top: 10px;
	}
	.otca-nav-menu-container.is-open {
		display: block;
	}
	.otca-nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}
	.otca-nav-list > li > a {
		width: 100%;
		border-radius: 8px;
	}
}

/* 3. Blog Archive (`index.php` / `/news/`) Layout & Post Cards */
.otca-blog-hero {
	background: linear-gradient(120deg, var(--otca-primary, #6A994E) 0%, var(--otca-secondary, #A7C957) 100%);
	padding: 150px 20px 85px;
	text-align: center;
	color: #FFFFFF;
}

.otca-blog-hero-inner {
	max-width: var(--otca-container-width, 1300px);
	margin: 0 auto;
}

.otca-blog-hero-title {
	font-family: var(--otca-heading-font, "Noto Serif", serif);
	font-size: 62px;
	font-weight: 500;
	line-height: 1.2;
	margin: 0 0 14px;
	color: #FFFFFF;
}

.otca-breadcrumbs {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.9);
}

.otca-breadcrumbs a {
	color: #FFFFFF;
	text-decoration: none;
}

.otca-blog-layout-container {
	max-width: var(--otca-container-width, 1300px);
	margin: 0 auto;
	padding: 70px 15px 90px;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: 50px;
	align-items: start;
}

@media (max-width: 991px) {
	.otca-blog-layout-container {
		grid-template-columns: 1fr;
	}
	.otca-blog-hero-title {
		font-size: 42px;
	}
}

.otca-posts-list,
.otca-blog-grid-list {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.otca-post-card {
	display: flex;
	flex-direction: column;
}

.otca-post-card-grid {
	gap: 18px;
}

.otca-post-thumb-wrap {
	position: relative;
	border-radius: 15px;
	overflow: hidden;
	line-height: 0;
}

.otca-post-thumb-img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.otca-post-card:hover .otca-post-thumb-img {
	transform: scale(1.04);
}

.otca-post-format-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #FFFFFF;
	color: #18181B;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
	transition: transform 0.3s ease;
}

.otca-post-format-badge:hover {
	transform: translate(-50%, -50%) scale(1.1);
}

.otca-post-thumb-meta {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
}

.otca-author-avatar-chip {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #FFFFFF;
	padding: 2px;
	display: inline-flex;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.otca-avatar-img {
	border-radius: 50%;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.otca-comment-count-chip {
	background: #FFFFFF;
	color: #18181B;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.otca-post-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.otca-cat-badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 6px;
	background: #F4F4F5;
	color: #3F3F46;
	font-size: 11px;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.3;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.otca-cat-badge:hover {
	background: var(--otca-primary, #6A994E);
	color: #FFFFFF;
}

.otca-post-title {
	font-family: var(--otca-heading-font, "Noto Serif", serif);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.32;
	margin: 0;
}

.otca-post-title a {
	color: var(--otca-heading, #000000);
	text-decoration: none;
	transition: color 0.2s ease;
}

.otca-post-title a:hover {
	color: var(--otca-primary, #6A994E);
}

.otca-post-excerpt {
	font-size: 15px;
	line-height: 1.75;
	color: var(--otca-text, #52525B);
}

.otca-post-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 4px;
	font-size: 13px;
	color: #71717A;
}

.otca-post-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.otca-post-read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 700;
	color: var(--otca-heading, #000000);
	text-decoration: none;
}

.otca-quote-card {
	background: linear-gradient(120deg, var(--otca-primary, #6A994E) 0%, var(--otca-secondary, #A7C957) 100%);
	border-radius: 15px;
	padding: 36px 40px;
	color: #FFFFFF;
	margin-bottom: 12px;
}

.otca-quote-text {
	margin: 0;
	font-family: var(--otca-heading-font, "Noto Serif", serif);
	font-size: 22px;
	line-height: 1.45;
}

.otca-quote-text cite {
	display: block;
	margin-top: 12px;
	font-family: var(--otca-body-font, "Manrope", sans-serif);
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
	opacity: 0.9;
}

/* Blog Sidebar */
.otca-blog-sidebar {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.otca-sidebar-widget {
	background: #FFFFFF;
	border: 1px solid #F0F0F2;
	border-radius: 15px;
	padding: 26px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.otca-widget-title {
	font-family: var(--otca-heading-font, "Noto Serif", serif);
	font-size: 20px;
	font-weight: 500;
	color: var(--otca-heading, #000000);
	margin: 0 0 18px;
}

.otca-sidebar-search-form {
	display: flex;
	gap: 8px;
}

.otca-sidebar-search-input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #E4E4E7;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	outline: none;
}

.otca-sidebar-search-btn {
	width: 46px;
	height: 46px;
	border: none !important;
	border-radius: 10px !important;
	background: var(--otca-primary, #6A994E) !important;
	color: #FFFFFF !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.otca-recent-posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.otca-recent-post-item {
	display: flex;
	align-items: center;
	gap: 14px;
}

.otca-recent-thumb img {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	object-fit: cover;
	display: block;
}

.otca-recent-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.otca-recent-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--otca-heading, #000000);
	text-decoration: none;
	line-height: 1.35;
}

.otca-recent-title:hover {
	color: var(--otca-primary, #6A994E);
}

.otca-recent-date {
	font-size: 12px;
	color: #71717A;
}

.otca-categories-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.otca-cat-list-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-radius: 10px;
	background: #F8F8FA;
	color: var(--otca-heading, #000000);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.2s ease;
}

.otca-cat-list-link:hover {
	background: #EFEFF2;
}

.otca-cat-count {
	background: #FFFFFF;
	padding: 2px 9px;
	border-radius: 12px;
	font-size: 12px;
	color: #52525B;
}

/* 4. Modals (Contact Popup #5856 & Search) and Back-to-Top Button */
.otca-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.otca-modal-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

.otca-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 780px;
	background: #FFFFFF;
	border-radius: 18px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	transform: translateY(15px) scale(0.97);
	transition: transform 0.28s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.otca-modal-overlay.is-active .otca-modal-dialog {
	transform: translateY(0) scale(1);
}

.otca-search-dialog {
	max-width: 560px;
	padding: 30px;
}

.otca-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 32px;
	height: 32px;
	padding: 0 !important;
	border-radius: 50% !important;
	border: none !important;
	background: #F4F4F5 !important;
	color: #18181B !important;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
}

.otca-search-form {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.otca-search-input {
	flex: 1;
	padding: 14px 18px;
	border: 1px solid #D4D4D8;
	border-radius: 10px;
	font-family: inherit;
	font-size: 16px;
}

.otca-search-submit {
	background: var(--otca-primary, #6A994E) !important;
	color: #FFFFFF !important;
	border: none !important;
	border-radius: 10px !important;
	padding: 0 20px !important;
	cursor: pointer;
}

.otca-back-to-top {
	position: fixed;
	left: 24px;
	bottom: 24px;
	width: 46px;
	height: 46px;
	padding: 0 !important;
	border-radius: 50% !important;
	border: none !important;
	background: #FFFFFF !important;
	color: #18181B !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
	cursor: pointer;
	z-index: 990;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: all 0.3s ease;
}

.otca-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.otca-back-to-top:hover {
	background: var(--otca-primary, #6A994E) !important;
	color: #FFFFFF !important;
}
