/* =========================================================
 * Taxi Noi Bai — Theme custom stylesheet
 * Sections numbered for maintainability
 * ========================================================= */

/* ---------- 1. BASE RESETS (scoped) ---------- */
.material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
	line-height: 1;
	vertical-align: middle;
	user-select: none;
}

.skip-link {
	transition: none;
}

body.no-scroll {
	overflow: hidden;
}

/* Remove default list styles where we opt-out via classes */
.nav-menu,
.primary-menu,
.mobile-menu-list,
.comment-list {
	list-style: none;
}

/* ---------- 1.5 SITE LOGO (typewriter) ---------- */
.site-logo-text {
	text-decoration: none;
	display: inline-block;
}

.site-logo-text .logo-primary {
	color: #CC422A;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.site-logo-text .logo-tagline {
	color: #13357F;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	text-transform: uppercase;
}

/* Looping typewriter (clip-path reveal, no caret) */
.typewriter-loop {
	display: inline-block;
	animation: typewriter-loop 4s steps(19, end) infinite;
}

@keyframes typewriter-loop {
	0%        { clip-path: inset(0 100% 0 0); opacity: 0; }
	5%        { opacity: 1; }
	40%, 80%  { clip-path: inset(0 0 0 0); opacity: 1; }
	85%       { opacity: 0; }
	100%      { clip-path: inset(0 100% 0 0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.typewriter-loop {
		animation: none;
		clip-path: none;
		opacity: 1;
	}
}

/* ---------- 1.6 TOP BAR ---------- */
.top-bar {
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar a {
	text-decoration: none;
}

/* ---------- 2. HEADER / NAVIGATION ---------- */

/* Accent gradient line at top of header */
.header-accent {
	background-size: 200% 100%;
	animation: accent-shimmer 3s ease-in-out infinite;
}

@keyframes accent-shimmer {
	0%, 100% { background-position: 0% 50%; }
	50%      { background-position: 100% 50%; }
}

/* Scroll state — shrink header, deepen shadow */
.site-header.is-scrolled {
	top: 0 !important;
}

.site-header.is-scrolled .header-inner {
	background-color: rgba(255, 255, 255, 0.97);
	box-shadow: 0 4px 30px rgba(10, 29, 55, 0.10);
}

.site-header.is-scrolled .site-nav {
	height: 56px;
}

.site-header.is-scrolled .header-accent {
	height: 2px;
}

/* ---- Primary Menu ---- */
.primary-menu {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
}

.primary-menu .menu-item > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	color: #334155;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 0.5rem 0.85rem;
	border-radius: 0.625rem;
	text-decoration: none;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.primary-menu .menu-item > a:hover {
	color: #895100;
	background-color: rgba(253, 157, 26, 0.08);
}

/* Active item indicator */
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
	color: #895100;
	background-color: rgba(253, 157, 26, 0.10);
}

/* Animated underline on hover */
.primary-menu > .menu-item > a::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	right: 0.85rem;
	bottom: 2px;
	height: 2px;
	background: linear-gradient(90deg, #fd9d1a, #ffb86b);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-menu > .menu-item > a:hover::after,
.primary-menu > .current-menu-item > a::after,
.primary-menu > .current_page_item > a::after {
	transform: scaleX(1);
}

/* ---- Dropdown ---- */
.primary-menu .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 240px;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-radius: 1rem;
	box-shadow:
		0 20px 60px rgba(10, 29, 55, 0.12),
		0 0 0 1px rgba(10, 29, 55, 0.04);
	padding: 0.5rem;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-8px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
	z-index: 60;
}

.primary-menu .menu-item-has-children {
	position: relative;
}

/* Hover bridge */
.primary-menu .menu-item-has-children::before {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 12px;
}

.primary-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.primary-menu .sub-menu .menu-item {
	position: relative;
}

.primary-menu .sub-menu .menu-item > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 0.625rem;
	color: #0b1c30;
	font-size: 0.875rem;
	transition: all 0.2s ease;
}

.primary-menu .sub-menu .menu-item > a:hover {
	background: linear-gradient(135deg, #eff4ff, #fef3e2);
	color: #895100;
	padding-left: 1.25rem;
}

/* Chevron indicator for nested children */
.primary-menu .sub-menu .menu-item-has-children > a::after {
	content: "chevron_right";
	font-family: "Material Symbols Outlined";
	font-size: 1.1em;
	line-height: 1;
	margin-left: auto;
	opacity: 0.5;
	transition: opacity 0.2s, transform 0.2s;
}

.primary-menu .sub-menu .menu-item-has-children > a:hover::after {
	opacity: 1;
	transform: translateX(2px);
}

/* Level 3+ submenu */
.primary-menu .sub-menu .sub-menu {
	top: -0.5rem;
	left: 100%;
	margin-left: 0.5rem;
	transform: translateX(-8px) scale(0.98);
}

.primary-menu .sub-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .sub-menu .menu-item-has-children:focus-within > .sub-menu {
	transform: translateX(0) scale(1);
}

/* Hover bridge for nested (right side) */
.primary-menu .sub-menu .menu-item-has-children::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 100%;
	width: 0.5rem;
	height: auto;
}

/* ---- CTA button glow ---- */
.header-cta__ping {
	animation: cta-ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
	background: linear-gradient(90deg, #fd9d1a, #ffb86b);
	pointer-events: none;
}

@keyframes cta-ping {
	0%   { transform: scale(1); opacity: 0.4; }
	75%, 100% { transform: scale(1.5); opacity: 0; }
}

/* ---- Mobile Menu Drawer ---- */
.mobile-menu__panel {
	translate: 100% 0;
	transition: translate 0.3s ease-out;
}

.mobile-menu.is-open {
	pointer-events: auto;
}

.mobile-menu.is-open .mobile-menu__overlay {
	opacity: 1;
}

.mobile-menu.is-open .mobile-menu__panel {
	translate: 0 0;
}

.mobile-menu-list .menu-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.mobile-menu-list .menu-item > a {
	display: flex;
	flex: 1;
	min-width: 0;
	align-items: center;
	padding: 0.875rem 0.75rem;
	border-radius: 0.75rem;
	color: #0b1c30;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: background-color 0.2s;
}

.mobile-menu-list .menu-item > a:hover {
	background-color: #eff4ff;
}

/* Chevron toggle button — sits next to the link, doesn't navigate */
.mobile-menu-list .submenu-toggle {
	flex-shrink: 0;
	width: 2.75rem;
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	color: #75777e;
	cursor: pointer;
	border-radius: 0.75rem;
	transition: background-color 0.2s, color 0.2s, transform 0.3s ease;
}

.mobile-menu-list .submenu-toggle:hover,
.mobile-menu-list .submenu-toggle:focus-visible {
	background-color: #eff4ff;
	color: #fd9d1a;
	outline: none;
}

.mobile-menu-list .submenu-toggle .material-symbols-outlined {
	font-size: 1.5rem;
	transition: transform 0.3s ease;
}

.mobile-menu-list .menu-item-has-children.is-open > .submenu-toggle {
	color: #fd9d1a;
}

.mobile-menu-list .menu-item-has-children.is-open > .submenu-toggle .material-symbols-outlined {
	transform: rotate(180deg);
}

/* Submenu wraps to next row inside the flex LI */
.mobile-menu-list .sub-menu {
	flex-basis: 100%;
}

.mobile-menu-list .sub-menu {
	list-style: none;
	margin: 0;
	padding-left: 0.75rem;
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.35s ease;
}

.mobile-menu-list .menu-item-has-children.is-open > .sub-menu {
	max-height: 500px;
}

.mobile-menu-list .sub-menu .menu-item > a {
	font-weight: 500;
	font-size: 0.875rem;
	color: #44474d;
	padding: 0.625rem 0.75rem;
	border-left: 2px solid #e5eeff;
	border-radius: 0 0.5rem 0.5rem 0;
}

.mobile-menu-list .sub-menu .menu-item > a:hover {
	border-left-color: #fd9d1a;
	color: #895100;
	background-color: #fef3e2;
}


/* ---------- 3. GLASSMORPHISM UTILITY ---------- */
.glass {
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-light {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ---------- 4. HERO / BOOKING FORM ---------- */
.hero {
	position: relative;
}

.booking-form input::placeholder,
.booking-form select,
.booking-form option {
	color: rgba(255, 255, 255, 0.7);
}

.booking-form input[type="date"],
.booking-form input[type="time"] {
	color-scheme: dark;
}

.booking-form select option {
	background-color: #0a1d37;
	color: #ffffff;
}

.booking-status.is-success {
	color: #bbf7d0;
}

.booking-status.is-error {
	color: #fecaca;
}

/* ---------- 4.5 THUMBNAIL LETTERBOX + BLUR ----------
   Pattern: ảnh thật giữ trọn (object-contain), khoảng trống 2 bên
   được fill bằng blur của chính ảnh đó (object-cover + blur).
   Dùng cho ảnh tỉ lệ không khớp khung 16:9 — không cắt, không méo. */
.thumb-letterbox {
	position: relative;
	overflow: hidden;
	width: 100%;
	height: 100%;
	background: #0a1d37;
	isolation: isolate;
}

.thumb-letterbox__bg {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	filter: blur(28px) saturate(1.35);
	transform: scale(1.2);
	z-index: 0;
	pointer-events: none;
	margin: 0 !important;
	border-radius: 0 !important;
}

.thumb-letterbox__fg {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain;
	z-index: 1;
	margin: 0 !important;
	border-radius: 0 !important;
	transition: transform 0.5s ease;
}

/* Hover effect cho thumbnail trong group card */
.group:hover .thumb-letterbox__fg {
	transform: scale(1.04);
}

/* Placeholder khi không có thumbnail */
.thumb-letterbox--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #e5eeff, #d3e4fe);
	color: rgba(10, 29, 55, 0.25);
}

/* Body images — wrap inline-block với aspect 16:9 */
.thumb-letterbox--body {
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 1rem;
	margin: 2rem auto;
	max-width: 100%;
	box-shadow: 0 6px 24px rgba(10, 29, 55, 0.10);
}

/* Override .prose-content img reset cho ảnh trong letterbox */
.prose-content .thumb-letterbox__bg,
.prose-content .thumb-letterbox__fg {
	width: 100% !important;
	height: 100% !important;
	border-radius: 0 !important;
	margin: 0 !important;
}

/* ---------- 5. CARDS & ELEVATION ---------- */
.service-card,
.vehicle-card {
	box-shadow: 0 10px 30px rgba(10, 29, 55, 0.05);
}

.service-card:hover,
.vehicle-card:hover {
	box-shadow: 0 20px 50px rgba(10, 29, 55, 0.12);
}

/* ---------- 6. BLOG/CONTENT ---------- */
.prose-content > * + * {
	margin-top: 1.25rem;
}

.prose-content p {
	font-size: 17px;
	line-height: 1.75;
	color: #0b1c30;
}

.prose-content h2 {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.35;
	margin-top: 2.5rem;
	color: #0a1d37;
}

.prose-content h3 {
	font-size: 20px;
	font-weight: 700;
	margin-top: 2rem;
	color: #0a1d37;
}

.prose-content h4 {
	font-size: 18px;
	font-weight: 600;
	margin-top: 1.75rem;
}

.prose-content a {
	color: #fd9d1a;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.prose-content a:hover {
	color: #895100;
}

.prose-content ul,
.prose-content ol {
	padding-left: 1.5rem;
}

.prose-content ul { list-style: disc; }
.prose-content ol { list-style: decimal; }

.prose-content li + li { margin-top: 0.5rem; }

/* Keep prose content strictly within its column */
.prose-content {
	max-width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.prose-content * {
	max-width: 100%;
}

/* Force site font on pasted-from-Word content — overrides inline font-family */
.prose-content,
.prose-content * {
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
}
.prose-content code,
.prose-content pre,
.prose-content kbd,
.prose-content samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

.prose-content img,
.prose-content figure img,
.prose-content .wp-block-image img {
	border-radius: 1rem;
	max-width: 100% !important;
	width: auto !important;
	height: auto !important;
	display: block;
	margin-inline: auto;
}

/* Figure / image block wrappers may carry inline width from editor — clamp them */
.prose-content figure,
.prose-content .wp-block-image,
.prose-content .wp-block-embed,
.prose-content p:has(> img:only-child) {
	margin: 2rem auto;
	text-align: center;
	max-width: 100% !important;
}

/* Gallery blocks */
.prose-content .wp-block-gallery,
.prose-content .blocks-gallery-grid {
	max-width: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.prose-content .wp-block-gallery img,
.prose-content .blocks-gallery-grid img {
	width: 100% !important;
	height: auto !important;
	object-fit: cover;
}

/* Embeds (YouTube, etc.) — enforce responsive wrapper */
.prose-content iframe,
.prose-content embed,
.prose-content video {
	max-width: 100% !important;
	height: auto;
}

.prose-content .wp-block-embed__wrapper {
	position: relative;
	padding-top: 56.25%;
	max-width: 100%;
}

.prose-content .wp-block-embed__wrapper > iframe {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
}

/* Force-center every image in post content, regardless of WP alignment class */
.prose-content .alignleft,
.prose-content .alignright,
.prose-content .alignnone,
.prose-content .aligncenter,
.prose-content img.alignleft,
.prose-content img.alignright,
.prose-content img.alignnone,
.prose-content img.aligncenter {
	float: none !important;
	display: block;
	margin-left: auto !important;
	margin-right: auto !important;
}

.prose-content figcaption {
	text-align: center;
	font-size: 14px;
	color: #44474d;
	margin-top: 0.5rem;
}

.prose-content blockquote {
	border-left: 4px solid #fd9d1a;
	padding: 1rem 1.5rem;
	background: #eff4ff;
	border-radius: 0.75rem;
	font-style: italic;
	color: #0b1c30;
}

.prose-content blockquote p {
	margin: 0;
}

/* Responsive horizontal scroll wrapper for tables */
.prose-content .table-scroll {
	max-width: 100%;
	overflow-x: auto;
	margin: 1.5rem 0;
	border-radius: 0.75rem;
	box-shadow: 0 0 0 1px #c5c6ce inset;
	-webkit-overflow-scrolling: touch;
	/* subtle edge hint on mobile */
	background:
		linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 20px 100% no-repeat,
		linear-gradient(to left,  #fff 30%, rgba(255,255,255,0)) right center / 20px 100% no-repeat,
		linear-gradient(to right, rgba(10,29,55,0.08), rgba(10,29,55,0)) left center / 12px 100% no-repeat,
		linear-gradient(to left,  rgba(10,29,55,0.08), rgba(10,29,55,0)) right center / 12px 100% no-repeat;
	background-attachment: local, local, scroll, scroll;
}

.prose-content table {
	width: 100%;
	min-width: 560px; /* force horizontal scroll on narrow viewports */
	border-collapse: collapse;
	margin: 0;
	box-shadow: none;
}

.prose-content thead {
	background: #0a1d37;
	color: #ffffff;
}

.prose-content th,
.prose-content td {
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid #e5eeff;
}

.prose-content tbody tr:nth-child(even) {
	background: #f8f9ff;
}

.prose-content code {
	background: #eff4ff;
	padding: 0.15rem 0.4rem;
	border-radius: 0.35rem;
	font-size: 0.9em;
}

.prose-content pre {
	background: #0a1d37;
	color: #ffffff;
	padding: 1rem 1.25rem;
	border-radius: 1rem;
	overflow-x: auto;
}

.prose-content pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}

/* Line clamp utilities */
.line-clamp-2,
.line-clamp-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

/* Share buttons */
.share-links a.is-copied {
	background: #fd9d1a;
	color: #2c1700;
}

.share-links a.is-copied::after {
	content: "Đã sao chép";
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: #0a1d37;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	white-space: nowrap;
	pointer-events: none;
}

.share-links a {
	position: relative;
}

/* Featured card hover effect */
.featured-card:hover {
	box-shadow: 0 24px 60px rgba(10, 29, 55, 0.18);
}

/* ---------- 7. COMMENTS ---------- */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #c5c6ce;
	border-radius: 0.75rem;
	background: #ffffff;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: #fd9d1a;
	box-shadow: 0 0 0 3px rgba(253, 157, 26, 0.15);
}

.comment-body {
	padding: 1rem 1.25rem;
	background: #ffffff;
	border: 1px solid #e5eeff;
	border-radius: 1rem;
}

/* ---------- 8. PAGINATION ---------- */
/* `the_posts_pagination()` wraps page-numbers trong <div class="nav-links">,
   nên flex/gap phải đặt ở .nav-links, không phải ở <nav>. */
nav.pagination,
.pagination {
	margin-top: 2.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.875rem;
	border-radius: 0.875rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #0b1c30;
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(10, 29, 55, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease,
	            background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination .page-numbers:hover {
	background: #fef3e2;
	border-color: #fd9d1a;
	color: #895100;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(253, 157, 26, 0.22);
}

.pagination .page-numbers.current {
	background: linear-gradient(135deg, #fd9d1a, #ffb86b);
	border-color: #fd9d1a;
	color: #2c1700;
	box-shadow: 0 6px 18px rgba(253, 157, 26, 0.40);
	cursor: default;
}

.pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: #94a3b8;
	box-shadow: none;
	cursor: default;
	pointer-events: none;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
	padding: 0 1.125rem;
	background: #0a1d37;
	color: #ffffff;
	border-color: #0a1d37;
}

.pagination .page-numbers.prev:hover,
.pagination .page-numbers.next:hover {
	background: #fd9d1a;
	border-color: #fd9d1a;
	color: #2c1700;
}

/* ---------- 9. WP ALIGNMENTS ---------- */
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }

/* ---------- 10. ANIMATIONS ---------- */
@keyframes fade-up {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

.hero-copy,
.booking-form,
.highlight-bar,
.service-card,
.vehicle-card {
	animation: fade-up 0.6s ease-out backwards;
}

.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.3s; }
.vehicle-card:nth-child(2) { animation-delay: 0.1s; }
.vehicle-card:nth-child(3) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* =========================================================
 * SIDEBAR WIDGETS — style WP default widgets cho khớp theme
 * (bg/rounded/shadow đã có sẵn từ before_widget trong widgets.php,
 *  phần dưới style nội dung bên trong widget cho đẹp hơn)
 * ========================================================= */

/* Lists chung trong widget */
.widget-area .widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.widget-area .widget > ul > li,
.widget-area .widget > div > ul > li {
	padding: 0.55rem 0;
	border-bottom: 1px solid #eef2f7;
}
.widget-area .widget > ul > li:last-child,
.widget-area .widget > div > ul > li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}
.widget-area .widget > ul > li:first-child,
.widget-area .widget > div > ul > li:first-child {
	padding-top: 0;
}
.widget-area .widget a {
	color: #1e293b;
	text-decoration: none;
	transition: color 0.15s ease;
}
.widget-area .widget a:hover {
	color: #f59e0b;
}
.widget-area .widget ul ul {
	margin-top: 0.5rem;
	padding-left: 1rem;
	border-top: 1px solid #eef2f7;
	padding-top: 0.5rem;
}

/* === Search widget ===
   CHỈ áp dụng khi widget Search dùng form WP fallback.
   Form custom (.taxinoibai-search-form từ searchform.php) đã có style Tailwind riêng,
   không cần — và KHÔNG được — bị các rule dưới override. */
.widget_search form:not(.taxinoibai-search-form) {
	position: relative;
	display: block;
}
.widget_search form:not(.taxinoibai-search-form) label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.widget_search form:not(.taxinoibai-search-form) input[type="search"],
.widget_search form:not(.taxinoibai-search-form) input.search-field {
	width: 100%;
	padding: 0.7rem 1rem 0.7rem 2.6rem;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 9999px;
	font-size: 0.9375rem;
	color: #0f172a;
	outline: none;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}
.widget_search form:not(.taxinoibai-search-form) input[type="search"]:focus,
.widget_search form:not(.taxinoibai-search-form) input.search-field:focus {
	background: #fff;
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.widget_search form:not(.taxinoibai-search-form) input[type="search"]::placeholder {
	color: #94a3b8;
}
/* Icon "search" prefix cho WP fallback search */
.widget_search form:not(.taxinoibai-search-form)::before {
	content: "search";
	font-family: "Material Symbols Outlined";
	font-size: 20px;
	color: #94a3b8;
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	font-variation-settings: 'FILL' 0, 'wght' 400;
	z-index: 1;
}
.widget_search form:not(.taxinoibai-search-form) input[type="submit"] {
	display: none; /* dùng Enter để submit, gọn hơn nút riêng */
}

/* Form custom trong widget area — bớt max-width center để fit gọn sidebar */
.widget_search .taxinoibai-search-form {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* === Header inline search (desktop lg+) ===
   Reuse searchform.php giống sidebar, chỉ compact lại để vừa header. */
.header-search {
	width: 200px;
}
@media (min-width: 1280px) {
	.header-search { width: 260px; }
}
.header-search .taxinoibai-search-form {
	max-width: none;
	margin: 0;
}
.header-search .taxinoibai-search-form input[type="search"] {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	padding-left: 2.5rem;
	padding-right: 4.5rem;
	font-size: 0.8125rem;
}
.header-search .taxinoibai-search-form > span:first-of-type {
	left: 0.75rem;
}
.header-search .taxinoibai-search-form > span:first-of-type .material-symbols-outlined {
	font-size: 1.125rem;
}
.header-search .taxinoibai-search-form button[type="submit"] {
	padding: 0.3rem 0.75rem;
	font-size: 0.75rem;
	right: 0.35rem;
}

/* Search trong mobile drawer — bỏ max-width để fit full chiều ngang */
.mobile-menu__search .taxinoibai-search-form {
	max-width: none;
	margin: 0;
}

/* === Recent Posts widget ===
   Mỗi item có số thứ tự lớn (1,2,3...) trong "huy hiệu" tròn gradient cam,
   layout 2 cột: badge số bên trái + title + (date nếu có) bên phải. */
.widget_recent_entries ul {
	counter-reset: recent-posts;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}
.widget_recent_entries > ul > li {
	counter-increment: recent-posts;
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.75rem 0.875rem;
	border: 1px solid #eef2f7;
	border-radius: 0.875rem;
	background: #ffffff;
	transition: background 0.2s ease, border-color 0.2s ease,
	            transform 0.2s ease, box-shadow 0.2s ease;
}
.widget_recent_entries > ul > li::before {
	content: counter(recent-posts, decimal-leading-zero);
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	background: linear-gradient(135deg, #fd9d1a, #ffb86b);
	color: #2c1700;
	font-weight: 800;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
	box-shadow: 0 6px 14px rgba(253, 157, 26, 0.28),
	            inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.widget_recent_entries > ul > li:hover {
	background: #fef3e2;
	border-color: #fcd9a4;
	transform: translateX(2px);
	box-shadow: 0 6px 16px rgba(253, 157, 26, 0.15);
}
.widget_recent_entries > ul > li:hover::before {
	transform: scale(1.08) rotate(-4deg);
	box-shadow: 0 8px 20px rgba(253, 157, 26, 0.45),
	            inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
/* Wrapper inner — flex-col cho title + date xếp dọc */
.widget_recent_entries > ul > li > a {
	flex: 1;
	min-width: 0;
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: #0a1d37;
	text-decoration: none;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.widget_recent_entries > ul > li:hover > a {
	color: #895100;
}
/* Khi widget block có hiển thị ngày — chuyển li thành column wrap */
.widget_recent_entries > ul > li:has(.post-date) {
	flex-wrap: wrap;
}
.widget_recent_entries > ul > li:has(.post-date) > a {
	flex-basis: calc(100% - 3.5rem);
}
.widget_recent_entries .post-date {
	flex-basis: 100%;
	padding-left: 3.375rem;
	font-size: 0.75rem;
	color: #64748b;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: 500;
	margin-top: -0.25rem;
}
.widget_recent_entries .post-date::before {
	content: "schedule";
	font-family: "Material Symbols Outlined";
	font-size: 14px;
	font-variation-settings: 'FILL' 0, 'wght' 400;
	color: #fd9d1a;
}

/* === Recent Comments widget ===
   Layout card với icon quote nổi bật, tách tên người bình + bài viết. */
.widget_recent_comments ul {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.widget_recent_comments ul li.recentcomments {
	display: block;
	position: relative;
	padding: 0.875rem 0.875rem 0.875rem 2.875rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: #475569;
	background: linear-gradient(135deg, #f8fafc 0%, #eff4ff 100%);
	border: 1px solid #e5eeff;
	border-radius: 0.875rem;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.widget_recent_comments ul li.recentcomments:hover {
	background: linear-gradient(135deg, #fef3e2 0%, #fff7ed 100%);
	border-color: #fcd9a4;
	transform: translateX(2px);
}
.widget_recent_comments ul li.recentcomments::before {
	content: "format_quote";
	font-family: "Material Symbols Outlined";
	font-size: 22px;
	font-variation-settings: 'FILL' 1, 'wght' 500;
	color: #fd9d1a;
	position: absolute;
	left: 0.75rem;
	top: 0.65rem;
	transform: scaleX(-1);
}
.widget_recent_comments .comment-author-link,
.widget_recent_comments .comment-author-link a {
	font-weight: 700;
	color: #0a1d37;
	text-decoration: none;
}
.widget_recent_comments ul li.recentcomments a {
	color: #895100;
	font-weight: 600;
	text-decoration: none;
}
.widget_recent_comments ul li.recentcomments a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* === Categories / Archives / Pages / Meta / Nav menu === */
.widget_categories ul li,
.widget_archive ul li,
.widget_pages ul li,
.widget_meta ul li,
.widget_nav_menu .menu li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}
.widget_categories ul li a,
.widget_archive ul li a {
	flex: 1;
	min-width: 0;
}
.widget_categories ul li,
.widget_archive ul li {
	font-size: 0.875rem;
	color: #64748b;
}
.widget_categories ul li a,
.widget_archive ul li a,
.widget_pages ul li a,
.widget_meta ul li a,
.widget_nav_menu .menu li a {
	font-weight: 600;
	color: #1e293b;
}

/* === Tag cloud === */
.widget_tag_cloud .tagcloud,
.widget_tag_cloud .tag-cloud-link {
	display: inline-block;
}
.widget_tag_cloud .tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.widget_tag_cloud .tag-cloud-link {
	padding: 0.3rem 0.75rem;
	background: #f1f5f9;
	border-radius: 9999px;
	font-size: 0.8125rem !important;
	color: #13357F;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.widget_tag_cloud .tag-cloud-link:hover {
	background: #f59e0b;
	color: #fff;
}

/* === Calendar === */
.widget_calendar table.wp-calendar-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}
.widget_calendar caption {
	font-weight: 700;
	padding: 0.5rem 0;
	color: #13357F;
}
.widget_calendar th,
.widget_calendar td {
	padding: 0.45rem 0;
	text-align: center;
	border: 1px solid #eef2f7;
}
.widget_calendar th {
	background: #f8fafc;
	font-weight: 700;
	color: #475569;
}
.widget_calendar #today {
	background: #f59e0b;
	color: #fff;
	font-weight: 700;
}
.widget_calendar nav.wp-calendar-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.875rem;
}

/* === Text widget === */
.widget_text p {
	line-height: 1.6;
	color: #475569;
}
.widget_text p:last-child {
	margin-bottom: 0;
}

/* === RSS widget === */
.widget_rss ul li {
	padding: 0.625rem 0;
}
.widget_rss .rsswidget {
	font-weight: 700;
	display: block;
	margin-bottom: 0.25rem;
}
.widget_rss .rss-date {
	font-size: 0.75rem;
	color: #64748b;
}
.widget_rss .rssSummary {
	font-size: 0.875rem;
	color: #475569;
	line-height: 1.55;
	margin-top: 0.25rem;
}
