body {
	direction: rtl;
	background-color: #f9f9f9;
}

.page-wrap>.works {
	padding-top: 120px;
	padding-bottom: 60px;
}

.search-container {
	background-color: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	margin-bottom: 30px;
	display: flex;
	align-items: center;
}

/* Default RTL (Arabic) styles */
.search-form-modern {
	display: flex;
	align-items: center;
	gap: 15px;
	width: 100%;
}

.search-form-modern .form__item {
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	flex: none;
}

.search-form-modern .form__item:first-child {
	flex: 1;
}

.search-form-modern select,
.search-form-modern label {
	white-space: nowrap;
}

.search-form-modern .search-button-container {
	flex: none;
	display: flex;
	align-items: center;
}

.search-form-modern input[type="text"] {
	width: 100%;
	height: 50px;
	line-height: 50px;
	border-radius: 5px;
	border: 1px solid #ddd;
	background-color: #fff;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	padding: 0 15px;
	font-size: 16px;
	margin: 0;
}

.search-form-modern input[type="text"]:focus {
	border-color: #008000;
	box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.1);
	outline: none;
}

.search-form-modern button {
	height: 50px;
	line-height: 50px;
	border-radius: 5px;
	padding: 0 30px;
	font-size: 16px;
	font-weight: 500;
	background-color: #46A046;
	color: white;
	border: none;
	margin: 0;
	white-space: nowrap;
}

/* RTL (Arabic) styles */
html[dir="rtl"] .search-container {
	direction: rtl;
}

html[dir="rtl"] .search-form-modern {
	flex-direction: row;
}

html[dir="rtl"] .search-form-modern input[type="text"] {
	text-align: right;
}

/* LTR (English) styles */
html[dir="ltr"] .search-container {
	direction: ltr;
}

html[dir="ltr"] .search-form-modern {
	flex-direction: row-reverse;
}

html[dir="ltr"] .search-form-modern input[type="text"] {
	text-align: left;
}

.results-count {
	font-size: 1rem;
	color: #555;
	margin-bottom: 20px;
	padding: 10px 15px;
	background-color: #e9f5e9;
	border-radius: 5px;
	border-right: 4px solid #4CAF50;
}

html[dir="ltr"] .results-count {
	border-right: none;
	border-left: 4px solid #4CAF50;
}

.results-count strong {
	color: #4CAF50;
	font-weight: 600;
}

.results-table-container {
	overflow-x: auto;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.results-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0;
	min-width: 800px;
}

.results-table th,
.results-table td {
	padding: 12px 15px;
	text-align: right;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

html[dir="ltr"] .results-table th,
html[dir="ltr"] .results-table td {
	text-align: left;
}

.results-table th {
	background-color: #f8f9fa;
	color: #333;
	font-weight: 600;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.results-table tbody tr:nth-child(even) {
	background-color: transparent;
}

.results-table tbody tr:hover {
	background-color: #f1f1f1;
}

.expand-btn {
	cursor: pointer;
	background-color: #e7f3e7;
	color: #4CAF50;
	border: none;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	font-size: 1.1rem;
	font-weight: bold;
	line-height: 26px;
	text-align: center;
	transition: all 0.3s ease;
	padding: 0;
	margin: 0 auto;
	display: block;
}

.expand-btn:hover {
	background-color: #d0e9d0;
	color: #367c39;
}

.expand-btn.expanded {
	background-color: #f8d7da;
	color: #dc3545;
}

.additional-info {
	display: none;
	background-color: #fdfdfe;
}

.additional-info td {
	padding: 15px 20px;
	border-bottom: 1px solid #e0e0e0;
}

.info-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 25px;
	font-size: 0.9rem;
}

.info-item {
	display: flex;
	gap: 5px;
}

.info-item .red-text {
	color: #dc3545;
	font-weight: 600;
}

.info-item .black-text {
	color: #333;
}

.pagination-container {
	margin-top: 30px;
	text-align: center;
}

.pagination {
	display: inline-flex;
	list-style: none;
	padding: 0;
	margin: 0;
	border-radius: 5px;
	overflow: hidden;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	background: #fff;
}

.pagination a {
	display: inline-block;
	padding: 10px 15px;
	text-decoration: none;
	color: #4CAF50;
	background-color: #fff;
	border-left: 1px solid #eee;
	transition: all 0.3s ease;
	font-size: 0.9rem;
	min-width: 40px;
	text-align: center;
}

html[dir="ltr"] .pagination a {
	border-left: none;
	border-right: 1px solid #eee;
}

.pagination a:first-child {
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
}

.pagination a:last-child {
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	border-left: none;
}

html[dir="ltr"] .pagination a:first-child {
	border-radius: 0;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

html[dir="ltr"] .pagination a:last-child {
	border-radius: 0;
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
	border-right: none;
}

.pagination a.active {
	background-color: #4CAF50;
	color: white;
	font-weight: 600;
	cursor: default;
}

.pagination a:hover:not(.active):not(.disabled) {
	background-color: #e9f5e9;
}

.pagination a.disabled {
	color: #ccc;
	background-color: #f8f8f8;
	cursor: not-allowed;
	pointer-events: none;
}

@media (max-width: 767px) {
	.page-wrap>.works {
		padding-top: 100px;
	}

	.search-container {
		padding: 20px;
	}

	.search-form-modern {
		flex-direction: column;
		align-items: stretch;
		
	}

	.search-form-modern input[type="text"] {
		height: 45px;
		line-height: 43px;
	}

	.search-form-modern button {
		height: 45px;
		line-height: 43px;
		width: 100%;
	}

	.results-table th,
	.results-table td {
		padding: 10px 12px;
		font-size: 0.85rem;
	}

	.info-grid {
		gap: 8px 15px;
		font-size: 0.85rem;
	}

	.info-item {
		width: 100%;
	}

	.pagination a {
		padding: 8px 12px;
		font-size: 0.85rem;
		min-width: 35px;
	}
}

@media (max-width: 480px) {
	.results-table th,
	.results-table td {
		padding: 8px 10px;
	}

	.expand-btn {
		width: 24px;
		height: 24px;
		font-size: 1rem;
		line-height: 22px;
	}

	.pagination a {
		padding: 6px 10px;
		min-width: 30px;
	}
}

/* Language-specific styles */
html[dir="ltr"] .results-count {
	direction: ltr;
	text-align: left;
}

html[dir="ltr"] .search-form-modern {
	flex-direction: row;
}

html[dir="ltr"] .search-form-modern input[type="text"] {
	text-align: left;
}

html[dir="ltr"] .search-button-container {
	order: 2;
}

html[dir="ltr"] .results-table th,
html[dir="ltr"] .results-table td {
	direction: ltr;
	text-align: left;
}

html[dir="ltr"] .results-table th:nth-child(4),
html[dir="ltr"] .results-table td[data-label="Readability Level"],
html[dir="ltr"] .results-table th:last-child,
html[dir="ltr"] .results-table td:last-child {
	text-align: center;
}

html[dir="ltr"] .pagination-container,
html[dir="ltr"] .pagination {
	direction: ltr;
}

html[dir="ltr"] .info-grid {
	direction: ltr;
	text-align: left;
}

/* RTL (Arabic) specific styles */
html[dir="rtl"] .search-form-modern {
	flex-direction: row;
}

html[dir="rtl"] .search-form-modern input[type="text"] {
	text-align: right;
}

html[dir="rtl"] .search-button-container {
	order: 1;
}

/* Custom dropdown style for search form */
.search-form-modern select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #46A046;
  border-radius: 5px;
  padding: 0 40px 0 15px; /* space for arrow */
  height: 50px;
  font-size: 16px;
  color: #333;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(70, 160, 70, 0.05);
  background-image: url("data:image/svg+xml;utf8,<svg fill='green' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 8l3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 20px 20px;
  width: 200px;
  min-width: 120px;
  max-width: 250px;
}

html[dir="rtl"] .search-form-modern select {
  background-position: right 10px center;
  padding: 0 15px 0 40px;
}

.search-form-modern select:focus {
  border-color: #008000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.1);
  background-image: none;
}

/* Custom dark dropdown style for search form */
.custom-dropdown {
  background-color: #444;
  color: #fff;
  border: 1px solid #222;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0 40px 0 15px;
  height: 50px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-image: none !important; /* Remove the green arrow */
}

/* Add margin to search type label */
.search-form-modern label[for="searchType"] {
  margin-right: 15px !important;
  margin-left: 0;
  white-space: nowrap;
  font-weight: 500;
  color: #333;
}

/* RTL specific margin for search type label */
html[dir="rtl"] .search-form-modern label[for="searchType"] {
  margin-right: 15px !important;
  margin-left: 0;
}

/* LTR specific margin for search type label */
html[dir="ltr"] .search-form-modern label[for="searchType"] {
  margin-left: 15px !important;
  margin-right: 0;
}

.custom-dropdown:focus {
  border-color: #46A046;
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 160, 70, 0.15);
}

.custom-dropdown option {
  background: #333;
  color: #fff;
}