/**
 * Dictionary Frontend Styles
 * 
 * Styles for dictionary archive and single pages
 */

/* ============================================
   Dictionary Hero Section
   ============================================ */
.dictionary-hero {
	background: linear-gradient(135deg, #f9f7f4 0%, #fefdfb 100%);
	color: var(--color-headline);
	padding: 50px 0;
	position: relative;
	overflow: hidden;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-top: -1px; /* Connect to header */
	min-height: 350px; /* About half of front page hero */
}

.dictionary-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		radial-gradient(circle at 20% 80%, rgba(170, 1, 37, 0.02) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(0, 123, 152, 0.02) 0%, transparent 50%);
	pointer-events: none;
}

.dictionary-hero .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	position: relative;
	display: flex;
	align-items: center;
	min-height: 250px;
	height: 100%;
}

/* Ensure dictionary page doesn't restrict hero width */
.dictionary-page {
	width: 100%;
	transform: none;
	position: static;
}

.dictionary-hero-content {
	width: 60%;
	max-width: 650px;
	text-align: left;
	position: relative;
	z-index: 2;
	animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dictionary-hero-image {
	position: absolute;
	right: calc(10% - 100px);
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	width: 40%;
	max-width: 400px;
	opacity: 0.8;
	z-index: 1;
}

@keyframes gentleFloat {
	0%, 100% {
		transform: translateY(0) translateX(0);
	}
	50% {
		transform: translateY(-10px) translateX(-15px);
	}
}

.dictionary-hero-image img {
	width: 100%;
	height: auto;
	display: block;
	animation: gentleFloat 6s ease-in-out infinite;
}

.dictionary-title {
	font-size: 2.8rem;
	font-weight: 600;
	margin: 0 0 30px;
	font-family: 'Aleo', serif;
	position: relative;
	z-index: 1;
	color: #34190d; /* Dark brown from brand */
}

.dictionary-subtitle {
	font-size: 0.95rem;
	color: var(--color-text-light);
	margin-top: 15px;
	position: relative;
	z-index: 1;
	font-family: 'Open Sans', sans-serif;
}

.dictionary-count {
	font-size: 0.95rem;
	margin-top: 15px;
	color: var(--color-text-light);
	position: relative;
	z-index: 1;
}

.dictionary-count strong {
	font-weight: 600;
	font-size: 1.2em;
}

/* ============================================
   Search Bar
   ============================================ */
.dictionary-search-container {
	background: rgba(74, 74, 74, 0.08); /* Very subtle grey like breadcrumb area */
	padding: 20px;
	border-radius: 10px;
	margin-bottom: 15px;
	border: 1px solid rgba(74, 74, 74, 0.1);
}

.dictionary-search-wrapper {
	width: 100%;
	max-width: 100%;
	position: relative;
	z-index: 10;
}

.dictionary-search-form {
	display: flex;
	background: white;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.dictionary-search-field {
	flex: 1;
	padding: 20px;
	border: none;
	font-size: 1.1em;
	font-family: 'Outfit', sans-serif;
	outline: none;
}

.dictionary-search-submit {
	background: var(--color-accent); /* Gold/yellow */
	border: none;
	padding: 0 40px;
	color: var(--color-headline);
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 80px;
}

.dictionary-search-submit:hover {
	background: #e5a402;
}

.dictionary-search-submit svg {
	display: block;
}

/* AJAX Search Results Dropdown */
.dictionary-ajax-results {
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	right: 0;
	background: white;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(0, 0, 0, 0.08);
	display: none;
	max-height: 400px;
	overflow-y: auto;
	z-index: 100;
}

.search-results-list {
	padding: 20px;
}

.results-title {
	font-size: 0.9em;
	color: #666;
	margin: 0 0 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.search-result-item {
	margin-bottom: 15px;
}

.result-link {
	display: block;
	padding: 10px;
	border-radius: 5px;
	text-decoration: none;
	color: #323710;
	transition: background 0.2s ease;
}

.result-link:hover,
.search-result-item.focused .result-link {
	background: #f9f9f9;
}

.result-word {
	font-weight: 600;
	font-size: 1.1em;
	display: inline-block;
	margin-right: 10px;
	color: #aa0125;
}

.result-pos {
	color: #666;
	font-size: 0.9em;
	font-style: italic;
}

.result-definition {
	display: block;
	color: #555;
	font-size: 0.95em;
	margin-top: 5px;
}

.view-all-results {
	display: block;
	text-align: center;
	padding: 10px;
	color: #007b98;
	text-decoration: none;
	border-top: 1px solid #eee;
	margin-top: 15px;
	font-weight: 500;
}

.view-all-results:hover {
	color: #006580;
}

.search-loading,
.no-results,
.search-error {
	padding: 20px;
	text-align: center;
	color: #666;
}

/* ============================================
   Alphabetical Navigation
   ============================================ */
.dictionary-alphabet-nav {
	background: rgba(74, 74, 74, 0.08); /* Same as search container */
	padding: 40px 0;
	border-top: 1px solid rgba(74, 74, 74, 0.1);
}

/* Alphabet Containers - Side by Side */
.alphabet-containers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	max-width: 1200px;
	margin: 0 auto;
}

.alphabet-section {
	background: white;
	padding: 25px;
	border-radius: 10px;
	border: 1px solid #e5e5e5;
}

.alphabet-section h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 15px;
	color: var(--color-headline);
	font-family: 'Aleo', serif;
}

/* Primary alphabet (Samoan) - emphasized */
.alphabet-primary {
	border-left: 4px solid #ddd;
}

.alphabet-primary h3 {
	color: var(--color-primary);
}

/* Secondary alphabet (English) - restored to normal */
.alphabet-secondary {
	border-left: 4px solid #ddd;
}

.alphabet-secondary h3 {
	color: #007b98;
	font-weight: 600;
}

.alphabet-secondary .letter-link {
	color: #333;
}

.alphabet-secondary .letter-link:hover {
	color: var(--color-primary);
	background-color: #f6b402;
}

/* Old Alphabet Switcher - Hidden */
.alphabet-switcher {
	display: none;
}

.switcher-label {
	font-weight: 600;
	color: var(--color-headline);
	font-size: 1.1rem;
}

.alphabet-toggle {
	padding: 8px 20px;
	background: white;
	border: 2px solid #ddd;
	border-radius: 25px;
	color: var(--color-text);
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1rem;
}

.alphabet-toggle:hover {
	border-color: var(--color-secondary);
	color: var(--color-secondary);
}

.alphabet-toggle.active {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
}

/* Alphabet Navigation */
.alphabet-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Both alphabets always visible */
.alphabet-nav.samoan-alphabet,
.alphabet-nav.english-alphabet {
	display: flex;
}

/* Adjust spacing for longer alphabets */
.english-alphabet {
	gap: 5px;
}

.english-alphabet .letter-link {
	padding: 6px 12px;
	font-size: 0.95rem;
}

.letter-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-decoration: none;
	color: #323710;
	font-weight: 500;
	transition: all 0.3s ease;
	font-size: 1rem;
}

.letter-link:hover {
	background: var(--color-accent);
	color: var(--color-headline);
	border-color: var(--color-accent);
}

.letter-link.active {
	background: #007b98; /* Light blue from brand */
	color: white;
	border-color: #007b98;
}

.letter-link.disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ============================================
   Filters Section
   ============================================ */
.dictionary-filters {
	background: white;
	padding: 30px 0;
	border-bottom: 1px solid #eee;
}

.filters-wrapper {
	display: flex;
	gap: 20px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.filter-group {
	flex: 1;
	min-width: 200px;
}

.filter-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #323710;
}

.dictionary-filter-dropdown {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 1em;
	background: white;
	cursor: pointer;
}

.dictionary-filter-dropdown:focus {
	border-color: #aa0125;
	outline: none;
}

.btn-apply-filters {
	background: #007b98;
	color: white;
	border: none;
	padding: 12px 30px;
	border-radius: 5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease;
}

.btn-apply-filters:hover {
	background: #006580;
}

/* Mobile Filter Toggle */
.filter-toggle-mobile {
	display: none;
	background: #007b98;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 5px;
	margin-bottom: 20px;
	font-weight: 600;
}

/* ============================================
   Dictionary Content Layout
   ============================================ */
.dictionary-content {
	padding: 40px 0;
	background: #fafafa;
}

.dictionary-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 40px;
}

/* Dictionary Entries Grid */
.dictionary-entries {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.dictionary-entry-card {
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
}

.dictionary-entry-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.entry-link {
	display: block;
	padding: 20px;
	text-decoration: none;
	color: inherit;
}

.entry-header {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.entry-word {
	font-size: 1.5rem;
	font-weight: 600;
	color: #aa0125;
	margin: 0;
	font-family: 'Aleo', serif;
}

.part-of-speech {
	color: #666;
	font-size: 0.9em;
	font-style: italic;
}

.audio-indicator {
	font-size: 0.9em;
	opacity: 0.7;
}

.entry-definition {
	color: #555;
	line-height: 1.5;
	margin: 0;
}

/* ============================================
   Search Results Page
   ============================================ */
.dictionary-search-hero {
	background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
	padding: 60px 0;
	text-align: center;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	border-bottom: 2px solid var(--color-primary);
}

.search-results-title {
	font-size: 2.5rem;
	color: var(--color-headline);
	margin-bottom: 30px;
	font-family: 'Aleo', serif;
}

.dictionary-search-hero .dictionary-search-wrapper {
	max-width: 600px;
	margin: 0 auto 20px;
}

.search-results-count {
	font-size: 1.1rem;
	color: var(--color-text-light);
	margin-top: 20px;
}

.dictionary-search-content {
	padding: 40px 0;
	min-height: 400px;
}

.search-results-grid {
	margin-bottom: 40px;
}

.search-result-card {
	background: white;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
}

.search-result-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.search-result-card .entry-link {
	display: block;
	padding: 25px;
	text-decoration: none;
	color: inherit;
}

.search-result-card .entry-header {
	display: flex;
	align-items: baseline;
	gap: 15px;
	margin-bottom: 10px;
}

.search-result-card .pronunciation-mini {
	font-size: 1rem;
	color: #666;
	font-style: italic;
}

.search-result-card .entry-meta-line {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
}

.search-result-card .view-more {
	display: inline-block;
	margin-top: 10px;
	color: var(--color-primary);
	font-weight: 600;
	font-size: 0.95rem;
}

.no-results {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.no-results h2 {
	color: var(--color-headline);
	margin-bottom: 20px;
}

.no-results-actions {
	margin-top: 30px;
}

.no-results-actions .button {
	display: inline-block;
	padding: 12px 30px;
	background: var(--color-primary);
	color: white;
	text-decoration: none;
	border-radius: 5px;
	transition: background 0.3s ease;
}

.no-results-actions .button:hover {
	background: var(--color-brown-dark);
}

.empty-search {
	text-align: center;
	padding: 40px;
	font-size: 1.1rem;
	color: var(--color-text-light);
}

.search-related-links {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid #e0e0e0;
}

.search-related-links h3 {
	font-size: 1.3rem;
	margin-bottom: 20px;
	color: var(--color-headline);
}

.search-related-links ul {
	list-style: none;
	padding: 0;
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.search-related-links a {
	color: var(--color-secondary);
	text-decoration: none;
	font-weight: 500;
}

.search-related-links a:hover {
	color: var(--color-primary);
	text-decoration: underline;
}

.dictionary-pagination {
	text-align: center;
	margin-top: 40px;
}

.dictionary-pagination .page-numbers {
	display: inline-block;
	padding: 8px 12px;
	margin: 0 5px;
	background: white;
	border: 1px solid #ddd;
	color: var(--color-text);
	text-decoration: none;
	border-radius: 5px;
	transition: all 0.3s ease;
}

.dictionary-pagination .page-numbers:hover,
.dictionary-pagination .current {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
}

/* ============================================
   Sidebar
   ============================================ */
.dictionary-sidebar {
	position: sticky;
	top: 100px;
}

.sidebar-section {
	background: white;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 25px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-section h3 {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0 0 15px;
	padding-bottom: 8px;
	color: #666;
	font-family: 'Open Sans', sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.recent-words-list,
.grammar-links,
.tools-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.recent-words-list li,
.grammar-links li,
.tools-links li {
	margin-bottom: 12px;
}

.recent-words-list a,
.grammar-links a,
.tools-links a {
	color: #323710;
	text-decoration: none;
	display: flex;
	align-items: baseline;
	gap: 8px;
	transition: color 0.3s ease;
}

.recent-words-list a:hover,
.grammar-links a:hover,
.tools-links a:hover {
	color: #aa0125;
}

.pos-badge {
	background: #f0f0f0;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.8em;
	color: #666;
}

/* ============================================
   Single Dictionary Page
   ============================================ */
.dictionary-single {
	background: white;
}

/* Breadcrumb */
.dictionary-breadcrumb {
	background: #f8f8f8;
	padding: 15px 0;
	border-bottom: 1px solid #eee;
}

.dictionary-breadcrumb a {
	color: #666;
	text-decoration: none;
	transition: color 0.3s ease;
}

.dictionary-breadcrumb a:hover {
	color: #aa0125;
}

.dictionary-breadcrumb .separator {
	margin: 0 10px;
	color: #999;
}

.dictionary-breadcrumb .current {
	color: #323710;
	font-weight: 600;
}

/* Dictionary Single Page - Remove top padding */
.single-samoan_dictionary .site-content {
	padding-top: 0;
}

/* Word Header - Full Width Background */
.dictionary-word-header-wrapper {
	background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	position: relative;
	border-bottom: 1px solid #e0e0e0;
	margin-top: -1px; /* Connect to breadcrumb */
}

.dictionary-word-header {
	padding: 50px 0;
}

/* Search Section on Single Pages */
.dictionary-search-section {
	background: #f8f8f8;
	padding: 25px 0;
	border-bottom: 1px solid #e0e0e0;
}

.dictionary-search-wrapper.compact {
	max-width: 600px;
	margin: 0 auto;
}

.dictionary-search-wrapper.compact .dictionary-search-form {
	display: flex;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	border-radius: 10px;
	overflow: hidden;
}

.dictionary-search-wrapper.compact .dictionary-search-field {
	flex: 1;
	padding: 12px 20px;
	border: none;
	font-size: 1rem;
}

.dictionary-search-wrapper.compact .dictionary-search-submit {
	background: var(--color-primary);
	border: none;
	padding: 0 20px;
	color: white;
	cursor: pointer;
	transition: background 0.3s ease;
}

.dictionary-search-wrapper.compact .dictionary-search-submit:hover {
	background: var(--color-brown-dark);
}

.word-header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}

.word-main {
	flex: 1;
}

.word-meta {
	display: flex;
	align-items: baseline;
	gap: 20px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.samoan-word {
	font-size: 3rem;
	font-weight: 600;
	margin: 0;
	color: #aa0125;
	font-family: 'Aleo', serif;
	line-height: 1.2;
}

.pronunciation-info {
	font-size: 1.25rem;
	color: #555;
	font-style: italic;
}

.pronunciation-guide {
	margin-right: 10px;
}

.pos-indicator {
	font-size: 0.9rem;
	color: #888;
	background: #f0f0f0;
	padding: 3px 10px;
	border-radius: 15px;
	font-style: normal;
}

.ipa-pronunciation {
	font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
	color: #888;
}

.review-badge {
	background: #eafaf1;
	border-left: 4px solid #46b450;
	padding: 10px 15px;
	border-radius: 5px;
	margin-top: 20px;
	color: #2e7d32;
}

.review-badge svg {
	display: inline-block;
	vertical-align: middle;
	margin-right: 8px;
	fill: #46b450;
}

/* Word Title Row with Inline Audio */
.word-title-row {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.word-title-row .samoan-word {
	margin: 0;
}

/* Inline Audio Button */
.audio-play-button.inline-audio {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--color-primary);
	color: white;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.audio-play-button.inline-audio:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(170, 1, 37, 0.3);
}

.audio-play-button.inline-audio svg {
	width: 18px;
	height: 18px;
	margin-left: 2px;
}

.audio-credit-inline {
	font-size: 0.75rem;
	color: #666;
	font-style: italic;
}

/* Modern Audio Button (Old style - kept for backwards compatibility) */
.audio-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.audio-button-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.audio-button-label {
	font-size: 0.85rem;
	color: #666;
	font-style: italic;
}

.audio-play-button {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--color-primary);
	color: white;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(170, 1, 37, 0.3);
}

.audio-play-button:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(170, 1, 37, 0.4);
}

.audio-play-button:active {
	transform: scale(0.95);
}

.audio-play-button svg {
	width: 28px;
	height: 28px;
	margin-left: 3px;
}

.pronunciation-audio {
	display: none;
}

.audio-credit {
	font-size: 0.85rem;
	color: #888;
	font-style: italic;
}

/* Inline Search in Content */
.dictionary-inline-search {
	margin-bottom: 40px;
	position: relative;
}

.dictionary-inline-search .dictionary-search-form {
	display: flex;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	overflow: visible;
	background: white;
	position: relative;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.dictionary-inline-search .dictionary-search-field {
	flex: 1;
	padding: 18px 20px;
	border: none;
	font-size: 1rem;
	background: white;
	border-radius: 10px 0 0 10px;
	outline: none;
}

.dictionary-inline-search .dictionary-search-form:focus-within {
	border-color: var(--color-accent);
	box-shadow: 0 2px 12px rgba(246, 180, 2, 0.15);
}

.dictionary-inline-search .dictionary-search-submit {
	background: var(--color-primary);
	border: none;
	padding: 0 25px;
	color: white;
	cursor: pointer;
	transition: background 0.3s ease;
	border-radius: 0 10px 10px 0;
}

.dictionary-inline-search .dictionary-search-submit:hover {
	background: var(--color-brown-dark);
}

/* Main Content Sections */
.dictionary-content-wrapper {
	padding: 40px 0;
	background: linear-gradient(135deg, #F5F1EE 0%, #F9F6F3 50%, #F5F1EE 100%);
	width: 100vw;
	margin-left: calc(-50vw + 50%);
}

.dictionary-main-content section {
	margin-bottom: 40px;
	padding: 30px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dictionary-main-content h2 {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 20px;
	padding-bottom: 10px;
	color: #999;
	font-family: 'Open Sans', sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Definitions */
.definitions-list {
	margin: 0;
	padding-left: 20px;
}

.definition-item {
	margin-bottom: 20px;
	line-height: 1.6;
}

.definition-main {
	margin-bottom: 8px;
}

.definition-text {
	color: #333;
}

.definition-notes {
	color: #666;
	font-style: italic;
	font-size: 0.85rem;
}

/* Sample Sentences from Source */
.sample-sentence {
	margin-left: 25px;
	margin-top: 8px;
	padding-left: 15px;
	border-left: 2px solid #e0e0e0;
}

.sample-sentence-text {
	font-style: normal;
	color: #333;
	font-size: 1rem;
	line-height: 1.6;
}

/* Style the arrow in sample sentences */
.sample-sentence-text {
	word-spacing: 0.1em;
}

.sample-sentence-text .translation {
	color: #666;
}

/* Related Forms */
.related-forms-content {
	color: #555;
	line-height: 1.8;
}

/* Example Sentences */
.examples-notice,
.expert-verification-notice {
	margin-bottom: 20px;
	color: #888;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	font-style: italic;
}

.expert-verification-notice {
	background: rgba(255, 249, 230, 0.3);
	border: 1px solid rgba(240, 195, 109, 0.3);
	padding: 12px;
	border-radius: 5px;
	margin: 20px 0;
}

.examples-notice svg,
.expert-verification-notice svg {
	flex-shrink: 0;
	fill: #f6b402;
	width: 14px;
	height: 14px;
}

.examples-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
}

.examples-columns h3 {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 15px;
	color: #323710;
}

.examples-columns ul {
	margin: 0;
	padding-left: 20px;
}

.examples-columns li {
	margin-bottom: 12px;
	line-height: 1.6;
	color: #555;
}

/* Source Section */
.source-section {
	margin-bottom: 40px;
}

.source-label {
	display: block;
	font-size: 0.75rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 10px;
	font-weight: 600;
}

.pratt-reference,
.source-notes,
.editor-notes {
	margin-bottom: 30px;
}

.pratt-reference:last-child,
.source-notes:last-child,
.editor-notes:last-child {
	margin-bottom: 0;
}

.pratt-text {
	background: #f9f9f9;
	border-left: 3px solid #e0e0e0;
	padding: 15px 20px;
	margin: 0 0 25px;
	line-height: 1.7;
	color: #555;
	font-size: 0.85rem;
}

/* Expert Notes */
.expert-notes-content {
	background: #f0f9ff;
	border-left: 4px solid #007b98;
	padding: 20px;
	color: #333;
	line-height: 1.8;
}

/* Taxonomy Tags */
.taxonomy-section,
.share-section,
.related-words-section {
	background: white;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.taxonomy-group {
	margin-bottom: 20px;
}

.taxonomy-group:last-child {
	margin-bottom: 0;
}

.taxonomy-group h3,
.share-section h3,
.related-words-section h3 {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0 0 12px;
	color: #999;
	font-family: 'Open Sans', sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag-link {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 5px;
	text-decoration: none;
	font-size: 0.9em;
	transition: all 0.3s ease;
}

.formality-tag {
	background: transparent;
	color: #007b98;
	border: none;
	padding: 0;
	text-decoration: underline;
}

.formality-tag:hover {
	color: var(--color-primary);
	text-decoration: underline;
}

.grammar-tag {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.grammar-tag:hover {
	background: #2e7d32;
	color: white;
}

.level-tag {
	background: #fff3e0;
	color: #e65100;
	border: 1px solid #ffb74d;
}

.level-tag:hover {
	background: #e65100;
	color: white;
}

.origin-tag {
	background: transparent;
	color: #007b98;
	border: none;
	padding: 0;
	text-decoration: underline;
}

.origin-tag:hover {
	color: var(--color-primary);
	text-decoration: underline;
}

/* Cross-Promotion Section */
.cross-promotion {
	background: white;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cross-promotion h3 {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0 0 12px;
	color: #999;
	font-family: 'Open Sans', sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Source Notes Styling */
.source-notes p {
	line-height: 1.7;
	color: #555;
	margin-bottom: 15px;
	font-size: 0.85rem;
}

.source-notes p:last-child {
	margin-bottom: 0;
}

/* Editor Notes - Smaller footnote style */
.editor-notes {
	font-size: 0.9rem;
}

.editor-notes p {
	line-height: 1.6;
	color: #666;
	margin-bottom: 12px;
	font-size: 0.9rem;
}

.editor-notes p:last-child {
	margin-bottom: 0;
}

/* Share Buttons */
.share-section {
	padding: 25px;
	background: #fafafa;
	border-radius: 10px;
	margin-bottom: 30px;
}

.share-buttons {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-top: 20px;
}

.share-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: 2px solid transparent;
	color: white;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.share-btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: 'Font Awesome 5 Brands', 'Font Awesome 5 Free';
	font-weight: 900;
	font-size: 20px;
	color: white;
}

.share-btn.facebook {
	background: linear-gradient(135deg, #1877f2, #145dbf);
	box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.share-btn.facebook::before {
	content: '\f09a';
}

.share-btn.twitter {
	background: linear-gradient(135deg, #1da1f2, #1a8cd8);
	box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.share-btn.twitter::before {
	content: '\f099';
}

.share-btn.reddit {
	background: linear-gradient(135deg, #ff4500, #ff3300);
	box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.share-btn.reddit::before {
	content: '\f1a1';
}

.share-btn.copy-link {
	background: linear-gradient(135deg, #666, #4a4a4a);
	box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
}

.share-btn.copy-link::before {
	content: '\f0c1';
	font-family: 'Font Awesome 5 Free';
}

.share-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.share-btn.copied {
	background: linear-gradient(135deg, #46b450, #3a9142);
}

.share-btn.copied::before {
	content: '\f00c';
	font-family: 'Font Awesome 5 Free';
}

/* Related Words */
.related-words-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.related-words-list li {
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.related-words-list li:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.related-words-list a {
	color: #323710;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.related-words-list a:hover {
	color: #aa0125;
}

.pos-indicator {
	color: #666;
	font-size: 0.9em;
	font-style: italic;
	font-weight: 400;
}

/* Cross-Promotion */
.promo-links {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.promo-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #f8f8f8;
	border-radius: 8px;
	text-decoration: none;
	color: #323710;
	transition: all 0.3s ease;
}

.promo-link:hover {
	background: #aa0125;
	color: white;
	transform: translateX(5px);
}

.promo-icon {
	font-size: 1.3em;
}

/* Navigation */
.dictionary-navigation {
	background: #f8f8f8;
	padding: 30px 0;
	border-top: 1px solid #ddd;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.nav-prev,
.nav-next {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 15px 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-decoration: none;
	color: #323710;
	transition: all 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
	background: #aa0125;
	color: white;
	border-color: #aa0125;
}

.nav-arrow {
	font-size: 1.2em;
}

.nav-text {
	display: flex;
	flex-direction: column;
}

.nav-label {
	font-size: 0.9em;
	opacity: 0.7;
}

.nav-title {
	font-weight: 600;
}

.nav-back {
	padding: 10px 20px;
	background: #007b98;
	color: white;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.3s ease;
}

.nav-back:hover {
	background: #006580;
}

/* ============================================
   Pagination
   ============================================ */
.dictionary-pagination {
	text-align: center;
	margin-top: 40px;
}

.dictionary-pagination .page-numbers {
	display: inline-block;
	padding: 10px 15px;
	margin: 0 5px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 5px;
	text-decoration: none;
	color: #323710;
	transition: all 0.3s ease;
}

.dictionary-pagination .page-numbers:hover {
	background: #aa0125;
	color: white;
	border-color: #aa0125;
}

.dictionary-pagination .current {
	background: #aa0125;
	color: white;
	border-color: #aa0125;
}

/* ============================================
   Loading States
   ============================================ */
.loading-more {
	text-align: center;
	padding: 20px;
	color: #666;
	font-style: italic;
}

/* ============================================
   Featured Content Blocks
   ============================================ */
.featured-content-blocks {
	padding: 80px 0;
	background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.content-blocks-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 40px;
}

.content-block {
	background: white;
	border-radius: 10px;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	transition: all 0.3s ease;
	overflow: hidden;
	border: 1px solid #f0f0f0;
}

.content-block:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.block-header {
	padding: 25px 30px;
	background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
	border-bottom: 2px solid var(--color-primary);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.block-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	color: var(--color-headline);
	font-family: 'Aleo', serif;
}

.view-all-link {
	color: var(--color-secondary);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
	font-size: 0.95rem;
}

.view-all-link:hover {
	color: var(--color-primary);
}

.block-content {
	padding: 30px;
}

/* Blog Posts Block */
.posts-carousel {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.carousel-item {
	display: flex;
	gap: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.carousel-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.item-thumbnail {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
}

.item-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.item-content {
	flex: 1;
}

.item-title {
	font-size: 1.1rem;
	margin: 0 0 8px;
	font-family: 'Aleo', serif;
}

.item-title a {
	color: var(--color-headline);
	text-decoration: none;
	transition: color 0.3s ease;
}

.item-title a:hover {
	color: var(--color-primary);
}

.item-excerpt {
	color: var(--color-text-light);
	font-size: 0.95rem;
	margin: 0 0 8px;
	line-height: 1.5;
}

.item-date {
	color: #999;
	font-size: 0.85rem;
}

/* Quiz Block */
.quiz-preview {
	text-align: center;
	padding: 20px;
	background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
	border-radius: 10px;
	margin-bottom: 20px;
}

.quiz-icon {
	font-size: 3rem;
	margin-bottom: 15px;
}

.quiz-title {
	font-size: 1.3rem;
	color: var(--color-headline);
	margin: 0 0 10px;
	font-family: 'Aleo', serif;
}

.quiz-description {
	color: var(--color-text);
	margin: 0 0 20px;
	line-height: 1.5;
}

.quiz-start-btn {
	display: inline-block;
	background: var(--color-secondary);
	color: white;
	padding: 12px 30px;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
}

.quiz-start-btn:hover {
	background: var(--color-primary);
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.quiz-stats {
	display: flex;
	justify-content: space-around;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.stat-item {
	text-align: center;
}

.stat-number {
	display: block;
	font-size: 1.8rem;
	font-weight: 600;
	color: var(--color-primary);
	font-family: 'Aleo', serif;
}

.stat-label {
	display: block;
	font-size: 0.9rem;
	color: var(--color-text-light);
	margin-top: 5px;
}

/* Culture Block */
.culture-feature {
	text-align: center;
	padding: 20px;
	background: linear-gradient(135deg, #fef3f0 0%, #fde8e4 100%);
	border-radius: 10px;
}

.culture-icon {
	font-size: 3rem;
	margin-bottom: 15px;
}

.culture-title {
	font-size: 1.3rem;
	color: var(--color-headline);
	margin: 0 0 20px;
	font-family: 'Aleo', serif;
}

.proverb-text {
	font-size: 1.4rem;
	font-style: italic;
	color: var(--color-primary);
	margin: 0 0 15px;
	padding: 20px;
	border-left: 4px solid var(--color-primary);
	background: white;
	font-family: 'Aleo', serif;
}

.proverb-meaning {
	color: var(--color-text);
	margin: 0 0 20px;
	line-height: 1.5;
}

.learn-more-link {
	color: var(--color-secondary);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.learn-more-link:hover {
	color: var(--color-primary);
}

/* Progress Block */
.progress-cta {
	text-align: center;
	padding: 30px;
	background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
	border-radius: 10px;
}

.progress-icon {
	font-size: 3rem;
	margin-bottom: 15px;
}

.progress-cta h3 {
	font-size: 1.3rem;
	color: var(--color-headline);
	margin: 0 0 15px;
	font-family: 'Aleo', serif;
}

.progress-cta p {
	color: var(--color-text);
	margin: 0 0 25px;
	line-height: 1.5;
}

.register-btn {
	display: inline-block;
	background: linear-gradient(135deg, var(--color-primary), #8a0120);
	color: white;
	padding: 15px 35px;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	font-size: 1.1rem;
}

.register-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(170, 1, 37, 0.3);
}

/* Empty Block State */
.empty-block {
	text-align: center;
	padding: 40px 20px;
	color: var(--color-text-light);
}

.empty-block p {
	margin: 0 0 20px;
	font-size: 1.1rem;
}

.cta-button {
	display: inline-block;
	background: var(--color-secondary);
	color: white;
	padding: 10px 25px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.cta-button:hover {
	background: var(--color-primary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
	.dictionary-hero .container {
		flex-direction: column;
		text-align: center;
	}
	
	.dictionary-hero-content {
		width: 100%;
		text-align: center;
		margin-bottom: 20px;
	}
	
	.dictionary-search-container {
		padding: 15px;
	}
	
	.dictionary-search-wrapper {
		margin: 0 auto;
		width: 100%;
	}
	
	.dictionary-hero-image {
		position: relative;
		right: auto;
		top: auto;
		transform: none;
		width: 80%;
		max-width: 300px;
		margin: 0 auto;
		opacity: 0.5;
	}
	
	.dictionary-title {
		font-size: 2em;
	}
	
	.alphabet-containers {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.dictionary-layout {
		grid-template-columns: 1fr;
	}
	
	.dictionary-sidebar {
		position: static;
	}
	
	.word-header-content {
		grid-template-columns: 1fr;
	}
	
	.samoan-word,
	.english-word {
		font-size: 2em;
	}
	
	.examples-columns {
		grid-template-columns: 1fr;
	}
	
	.nav-links {
		flex-direction: column;
		gap: 15px;
	}
	
	.nav-prev,
	.nav-next,
	.nav-back {
		width: 100%;
		justify-content: center;
	}
	
	.filter-toggle-mobile {
		display: block;
	}
	
	.filters-wrapper {
		display: none;
	}
	
	.filters-wrapper.mobile-open {
		display: flex;
		flex-direction: column;
	}
	
	.dictionary-entries {
		grid-template-columns: 1fr;
	}
}

/* ============================================
   Multiple Parts of Speech Support
   ============================================ */
.definitions-section.multiple-pos {
	margin-top: 30px;
}

.pos-entry {
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid #e5e5e5;
}

.pos-entry:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.pos-header {
	display: flex;
	align-items: baseline;
	gap: 15px;
	margin-bottom: 20px;
	font-family: 'Aleo', serif;
}

.pos-header .pos-indicator {
	background: #aa0125;
	color: white;
	padding: 5px 15px;
	border-radius: 5px;
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: lowercase;
}

.pos-header .pos-pronunciation {
	color: #666;
	font-size: 1rem;
	font-style: italic;
}

.multiple-pos .definitions-list {
	margin-left: 20px;
}

@media (max-width: 480px) {
	.dictionary-hero {
		padding: 40px 0;
	}
	
	.dictionary-search-field {
		padding: 15px;
		font-size: 1em;
	}
	
	.alphabet-nav {
		gap: 5px;
	}
	
	.letter-link {
		padding: 6px 10px;
		font-size: 0.9em;
	}
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
	.dictionary-navigation,
	.dictionary-sidebar,
	.share-section,
	.cross-promotion,
	.dictionary-filters,
	.dictionary-alphabet-nav,
	.audio-pronunciation button {
		display: none;
	}
	
	.dictionary-layout {
		grid-template-columns: 1fr;
	}
	
	.dictionary-single {
		background: white;
		color: black;
	}
	
	.samoan-word {
		color: black;
	}
	
	a {
		color: black;
		text-decoration: none;
	}
	
	.source-details {
		border: 1px solid black;
	}
	
	details[open] .source-content {
		display: block !important;
	}
}

/* ============================================
   English Word Entry Styling
   ============================================ */

.english-word {
    color: #007b98;
    font-family: 'Aleo', serif;
    font-size: 3rem;
    font-weight: 600;
    margin: 0;
}

.english-entry .dictionary-main-content .definition-card {
    margin-bottom: 30px;
}

.primary-translations {
    margin-bottom: 25px;
}

.primary-translations h3 {
    font-size: 1.1em;
    color: #323710;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.primary-translation {
    padding: 15px 20px;
    background: rgba(170, 1, 37, 0.05);
    border-left: 4px solid #aa0125;
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
}

.samoan-word-link {
    color: #aa0125;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: 600;
    transition: color 0.3s ease;
}

.samoan-word-link:hover {
    color: #8a0118;
    text-decoration: none;
}

.pos-indicator {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    margin-left: 10px;
}

.secondary-translations {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.secondary-translations h4 {
    font-size: 1em;
    color: #666;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.secondary-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.secondary-link {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    color: #007b98;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.secondary-link:hover {
    background: #007b98;
    color: white;
    text-decoration: none;
}

.usage-example {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
}

.usage-example h3 {
    color: #007b98;
    font-size: 1.1em;
    margin: 0 0 15px 0;
}

.example-sentences p {
    margin: 10px 0;
    line-height: 1.6;
}

.example-label {
    font-weight: 600;
    color: #374151;
    margin-right: 8px;
}

.english-example {
    color: #374151;
}

.samoan-example {
    color: #007b98;
    font-style: italic;
}

/* Blue part of speech badge for English entries */
.english-entry .dictionary-main-content .pos-indicator {
    background: #007b98;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: lowercase;
    font-style: italic;
    margin-left: 0;
    margin-bottom: 15px;
    display: block;
    width: fit-content;
}

/* Red dotted underline links for Samoan words on English pages */
.english-entry .dictionary-main-content .samoan-word-link {
    color: #aa0125;
    text-decoration: none;
    border-bottom: 2px dotted #aa0125;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    font-size: 1.3em;
    font-weight: 600;
    font-style: normal;
}

.english-entry .dictionary-main-content .samoan-word-link:hover {
    color: #8a0118;
    border-bottom-color: #8a0118;
    background-color: rgba(170, 1, 37, 0.05);
    text-decoration: none;
}

/* English entry definitions list styling to match Samoan entries */
.english-entry .dictionary-main-content .definitions-list {
    margin: 0 0 0 20px;
    padding: 0;
    list-style: none;
    counter-reset: translation-counter;
}

.english-entry .dictionary-main-content .definition-item {
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.english-entry .dictionary-main-content .definition-item:before {
    content: counter(translation-counter) ".";
    counter-increment: translation-counter;
    position: absolute;
    left: 0;
    top: 0;
    color: #007b98;
    font-weight: 600;
    font-size: 1.1em;
    font-style: normal;
}

.english-entry .dictionary-main-content .definition-main {
    margin-bottom: 0;
}

.english-entry .dictionary-main-content .definition-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Responsive adjustments for English entries */
@media (max-width: 768px) {
    .secondary-links {
        flex-direction: column;
    }
    
    .secondary-link {
        text-align: center;
    }
    
    .primary-translation {
        padding: 12px 15px;
    }
    
    .samoan-word-link {
        font-size: 1.2em;
    }
}

/* ============================================
   Cross-linking Styles
   ============================================ */
.definition-crosslink {
    color: #007b98; /* Brand teal blue */
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.definition-crosslink:hover {
    color: #f6b402; /* Brand golden yellow on hover */
    text-decoration-style: solid;
    background-color: rgba(246, 180, 2, 0.1);
    padding: 1px 3px;
    border-radius: 3px;
}

.definition-crosslink:focus {
    outline: 2px solid #f6b402;
    outline-offset: 2px;
    border-radius: 3px;
}

/* ============================================
   Letter Archive - Compact Word Cards
   ============================================ */
.words-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
}

.word-compact-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: visible; /* Fix: Keep visible to prevent border disappearing */
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.word-compact-card:hover {
    border-color: #007b98;
    box-shadow: 0 4px 12px rgba(0, 123, 152, 0.15);
    transform: translateY(-1px);
}

.word-card-link {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}

.word-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.word-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #323710;
    line-height: 1.3;
    flex: 1;
    margin-right: 8px;
}

.pos-badge-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #007b98;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

.word-card-translation {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.word-compact-card:hover .word-title {
    color: #007b98;
}

.word-compact-card:hover .word-card-translation {
    color: #555;
}

/* Responsive adjustments for compact cards */
@media (max-width: 768px) {
    .words-compact-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .word-card-link {
        padding: 14px;
    }
    
    .word-title {
        font-size: 1rem;
    }
    
    .word-card-translation {
        font-size: 0.85rem;
    }
}

/* ============================================
   TAXONOMY TAG TOOLTIPS
   ============================================ */

/* Tag links with tooltips */
.tag-link {
    position: relative;
    display: inline-block;
}

/* Hide tooltip by default */
.tag-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 5px;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

/* Tooltip arrow */
.tag-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Show tooltip on hover */
.tag-link:hover .tag-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Special styling for formality and word origin tags */
.formality-tag,
.word-origin-tag {
    background: var(--color-secondary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.formality-tag:hover,
.word-origin-tag:hover {
    background: var(--color-primary);
    color: white;
    text-decoration: none;
}

/* Ensure tooltips work on mobile */
@media (max-width: 768px) {
    .tag-tooltip {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        z-index: 9999;
    }
    
    .tag-tooltip::after {
        display: none;
    }
    
    /* Show tooltip on touch devices */
    .tag-link:active .tag-tooltip {
        opacity: 1;
        visibility: visible;
    }
}

/* ============================================
   TAXONOMY ARCHIVE PAGES
   ============================================ */

/* Letter Archive Layout - Essential Missing Structure */
.letter-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.letter-main-content {
    min-width: 0; /* Prevent grid overflow */
}

.letter-sidebar {
    position: sticky;
    top: 100px;
}

/* Remove red border from header area */
.letter-archive-header {
    padding: 50px 0 40px;
    background: #f8f9fa;
    text-align: center;
    /* REMOVED: border-bottom line */
}

/* Enhanced Header Styling for Taxonomy Archives */
.taxonomy-archive-page .letter-archive-header {
    padding: 50px 0 40px;
    background: #f8f9fa;
    text-align: center;
}

.taxonomy-archive-page .header-content {
    max-width: 800px;
    margin: 0 auto;
}

.taxonomy-archive-page .archive-title {
    font-family: 'Aleo', serif;
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.taxonomy-archive-page .archive-subtitle {
    font-size: 1.3rem;
    color: var(--color-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.taxonomy-archive-page .term-highlight {
    color: var(--color-primary);
    font-weight: 700;
    position: relative;
}

.taxonomy-archive-page .term-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    border-radius: 2px;
}

.taxonomy-archive-page .term-description {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-top: 20px;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Enhanced Sidebar Styling for Taxonomy Archives */
.letter-sidebar .sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.letter-sidebar .sidebar-section h3 {
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-bg-light);
    font-family: 'Aleo', serif;
}

/* Simple Link Lists for Formality and Origin */
.formality-links,
.origin-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formality-link,
.origin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.formality-link:hover,
.origin-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.formality-link.current,
.origin-link.current {
    color: var(--color-primary);
    font-weight: 600;
}

.formality-link .term-count,
.origin-link .term-count {
    font-size: 0.8rem;
    background: rgba(0, 123, 152, 0.1);
    color: var(--color-secondary);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 400;
}

.formality-link.current .term-count,
.origin-link.current .term-count {
    background: rgba(170, 1, 37, 0.1);
    color: var(--color-primary);
}

/* Quick Search Styling */
.sidebar-search-form {
    display: flex;
    gap: 8px;
    width: 100%; /* Ensure full width */
}

.sidebar-search-field {
    flex: 1;
    min-width: 0; /* Prevent overflow */
    padding: 8px 10px; /* Slightly reduced padding */
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Include padding in width calculation */
}

.sidebar-search-field:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.sidebar-search-submit {
    padding: 8px 12px; /* Reduced padding to match field */
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0; /* Prevent button from shrinking */
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.sidebar-search-submit:hover {
    background: var(--color-primary);
}

/* Category List */
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-link {
    display: block;
    padding: 10px 12px;
    background: var(--color-bg-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.category-link:hover {
    background: var(--color-secondary);
    color: white;
    text-decoration: none;
    border-left-color: var(--color-accent);
}

/* Promo Space Styling */
.promo-content {
    color: var(--color-text-light);
    line-height: 1.6;
}

.promo-content p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tip-box {
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border-left: 4px solid var(--color-secondary);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.tip-box strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legacy sidebar widget compatibility */
.letter-sidebar .sidebar-widget h3 {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-bg-light);
    padding-bottom: 8px;
}

.letter-sidebar .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.letter-sidebar .sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--color-bg-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.letter-sidebar .sidebar-link:hover {
    background: rgba(0, 123, 152, 0.1); /* Subtle teal background */
    color: var(--color-text);
    text-decoration: none;
    border-left-color: var(--color-secondary);
}

.letter-sidebar .sidebar-link.current {
    background: var(--color-primary);
    color: white;
    border-left-color: var(--color-secondary);
}

.letter-sidebar .sidebar-link .term-count {
    font-size: 0.85rem;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

.letter-sidebar .sidebar-link.current .term-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar content for descriptive text */
.letter-sidebar .sidebar-content {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.letter-sidebar .sidebar-content p {
    margin-bottom: 12px;
}

.letter-sidebar .sidebar-content p:last-child {
    margin-bottom: 0;
}

/* No words found page styling */
.no-words-found {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-bg-light);
    border-radius: 12px;
    margin: 40px 0;
}

.no-words-found h2 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.no-words-found p {
    color: var(--color-text-light);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.back-to-dictionary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-secondary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.back-to-dictionary:hover {
    background: var(--color-primary);
    color: white;
    text-decoration: none;
}

/* Mobile responsive for letter layout and taxonomy archives */
@media (max-width: 768px) {
    .letter-layout {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    
    .letter-sidebar {
        position: static; /* Remove sticky on mobile */
        order: 2; /* Put sidebar after content */
    }
    
    .taxonomy-archive-page .letter-archive-header {
        padding: 35px 0 30px;
    }
    
    .taxonomy-archive-page .archive-title {
        font-size: 2.2rem;
    }
    
    .taxonomy-archive-page .archive-subtitle {
        font-size: 1.1rem;
    }
    
    .taxonomy-archive-page .term-description {
        font-size: 1.1rem;
        margin-top: 15px;
    }
    
    .letter-sidebar .sidebar-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .letter-sidebar .sidebar-section h3 {
        font-size: 1.1rem;
    }
    
    .formality-link,
    .origin-link {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .sidebar-search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .sidebar-search-field,
    .sidebar-search-submit {
        width: 100%;
    }
    
    .category-link {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    .tip-box {
        padding: 12px;
    }
    
    .tip-box strong {
        font-size: 0.85rem;
    }
    
    .no-words-found {
        padding: 40px 15px;
    }
    
    .no-words-found h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .taxonomy-archive-page .letter-archive-header {
        padding: 25px 0 20px;
    }
    
    .taxonomy-archive-page .archive-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .taxonomy-archive-page .archive-subtitle {
        font-size: 1rem;
    }
    
    .taxonomy-archive-page .term-description {
        font-size: 1rem;
    }
    
    .letter-sidebar .sidebar-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .formality-link,
    .origin-link {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .category-link {
        padding: 8px;
        font-size: 0.9rem;
    }
}