/* Variabel CSS untuk tema */
:root {
	/* Warna kayu yang diberikan */
	--primary: #8b4513;
	--wood-light: #a0522d;
	--wood-accent: #cd853f;
	--wood-dark: #5d4037;
	--light: #f5f5dc;
	--dark: #3d2b1f;
	--gold: #d4af37;
	--gold-light: #ffd700;
	--arabic-font: "Scheherazade New", serif;

	/* Warna buku */
	--book-primary: #7a5c4d;
	--book-secondary: #8d6e63;
	--book-tertiary: #a1887f;
	--book-spine: #6d4c41;
	--book-highlight: #9c786c;
	--book-text: #f8f5f0;
	--book-pages: #f2e8d8;

	/* Dark mode variables */
	--bg-dark: #2a211c;
	--text-dark: #e0d6cc;
	--card-dark: #3a2d26;
	--border-dark: #5a4a41;

	/* Tekstur kayu */
	--wood-texture: url("https://www.transparenttextures.com/patterns/wood-pattern.png");

	/* Warna untuk aplikasi */
	--bg-color: var(--bg-dark);
	--text-color: var(--text-dark);
	--header-bg: rgba(42, 33, 28, 0.95);
	--card-bg: var(--card-dark);
	--search-bg: #4a3c34;
	--shadow: rgba(0, 0, 0, 0.5);
	--accent-color: var(--wood-accent);

	/* New color variables for better contrast */
	--soft-cream: #e8dcc3;
	--soft-gold: #d4af37;
	--dark-gold: #b8860b;
	--soft-wood-accent: #cd853f;
}

.light-mode {
	--bg-color: #f5ecd7;
	--text-color: #3d2b1f;
	--header-bg: rgba(230, 218, 196, 0.95);
	--card-bg: #e8dcc3;
	--search-bg: #d9cdb4;
	--shadow: rgba(0, 0, 0, 0.15);
	--accent-color: #8b4513;
}

/* Reset dan gaya dasar */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	transition:
		background-color 0.3s,
		color 0.3s,
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	min-height: 100vh;
	background-image: var(--wood-texture);
	background-size: 300px;
	padding-bottom: 2rem;
	overflow-x: hidden;
}

/* Header dan navigasi */
header {
	position: sticky;
	top: 0;
	background-color: var(--header-bg);
	backdrop-filter: blur(10px);
	padding: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 100;
	box-shadow: 0 2px 10px var(--shadow);
	border-bottom: 2px solid var(--wood-accent);
}

.nav-left,
.nav-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.btn-nav {
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1rem;
	padding: 0.5rem;
	border-radius: 4px;
}

.btn-nav:hover {
	background-color: var(--wood-accent);
	transform: translateY(-2px);
}

.btn-nav i {
	font-size: 1.2rem;
}

.btn-nav .text {
	display: none;
}

.page-title {
	font-size: 1.2rem;
	font-weight: 600;
	margin-left: 0.5rem;
	color: var(--wood-accent);
	font-family: var(--arabic-font);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50vw;
}

/* Tampilan utama - Mainshelf */
.mainshelf {
	padding: 1rem;
	max-width: 1400px;
	margin: 0 auto;
}

.shelf-title {
	margin: 1.5rem 0 0.5rem;
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--gold-light);
	padding: 0.5rem 1rem;
	background-color: rgba(93, 64, 55, 0.7);
	border-radius: 4px;
	display: inline-block;
	box-shadow: 0 3px 6px var(--shadow);
	font-family: var(--arabic-font);
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.bookshelf-container {
	background: linear-gradient(to bottom, var(--wood-light), var(--wood-dark));
	border-radius: 8px;
	padding: 1.5rem 1rem 1rem;
	margin-bottom: 2rem;
	box-shadow: 0 8px 16px var(--shadow);
	position: relative;
	overflow: hidden;
	background-image: var(--wood-texture);
	background-blend-mode: multiply;
}

.bookshelf-container::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 15px;
	background: linear-gradient(to bottom, var(--wood-light), var(--wood-dark));
	border-bottom: 2px solid var(--dark);
	border-radius: 8px 8px 0 0;
}

.bookshelf {
	display: flex;
	overflow-x: auto;
	padding: 1rem 0.5rem;
	gap: 1.5rem;
	scrollbar-width: thin;
	scrollbar-color: var(--wood-accent) transparent;
	min-height: 260px;
}

.bookshelf::-webkit-scrollbar {
	height: 8px;
}

.bookshelf::-webkit-scrollbar-track {
	background: transparent;
}

.bookshelf::-webkit-scrollbar-thumb {
	background-color: var(--wood-accent);
	border-radius: 4px;
}

.book {
	min-width: 170px;
	height: 250px;
	width: 170px;
	margin: 0 20px;
	border-radius: 4px 8px 8px 4px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	cursor: pointer;
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
	box-shadow:
		8px 8px 20px rgba(0, 0, 0, 0.4),
		inset 1px 0 0 rgba(255, 255, 255, 0.1);
	position: relative;
	overflow: hidden;
	transform-style: preserve-3d;
	perspective: 600px;
}

.book:hover {
	transform: translateY(-8px) rotate(1deg);
	box-shadow:
		12px 15px 25px rgba(0, 0, 0, 0.5),
		inset 1px 0 0 rgba(255, 255, 255, 0.1);
}

.book-pages {
	position: absolute;
	left: 0;
	top: 5px;
	bottom: 5px;
	width: 12px;
	background-color: var(--book-pages);
	border-right: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow:
		inset 3px 0 5px rgba(0, 0, 0, 0.1),
		1px 0 1px rgba(255, 255, 255, 0.2);
}

.book-spine {
	position: absolute;
	left: 12px;
	top: 0;
	bottom: 0;
	width: 18px;
	background: linear-gradient(
		to right,
		var(--book-spine),
		var(--book-highlight)
	);
	box-shadow:
		inset -3px 0 8px rgba(0, 0, 0, 0.3),
		inset 2px 0 2px rgba(255, 255, 255, 0.1);
	z-index: 2;
}

.book-cover {
	position: absolute;
	top: 0;
	left: 30px;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 1rem 0.8rem;
	background: linear-gradient(
		135deg,
		var(--book-primary),
		var(--book-secondary)
	);
	box-shadow:
		inset 2px 0 5px rgba(255, 255, 255, 0.1),
		inset -2px 0 5px rgba(0, 0, 0, 0.2);
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0 4px 4px 0;
	z-index: 1;
}

.book-cover::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: url("https://www.transparenttextures.com/patterns/soft-wallpaper.png");
	opacity: 0.05;
	pointer-events: none;
	border-radius: 0 4px 4px 0;
}

.book-title {
	font-weight: bold;
	font-size: 1.25rem;
	line-height: 1.4;
	color: var(--book-text);
	text-shadow:
		1px 1px 3px rgba(0, 0, 0, 0.7),
		0 0 5px rgba(0, 0, 0, 0.4);
	flex-grow: 0;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--arabic-font);
	padding: 0.5rem;
	z-index: 2;
	margin: 0;
	width: 100%;
	height: auto;
	letter-spacing: 0.5px;
}

.book-subtitle {
	font-size: 0.7rem;
	color: var(--book-text);
	text-align: center;
	background-color: rgba(0, 0, 0, 0.25);
	padding: 0.4rem;
	border-radius: 3px;
	z-index: 2;
	margin-top: 0.5rem;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.book-accented .book-cover {
	border-top: 2px solid var(--soft-gold);
	border-bottom: 2px solid var(--soft-gold);
	background: linear-gradient(135deg, #7a5c4d, #8d6e63);
}

.book-accented .book-title {
	color: var(--soft-cream);
}

.book::before {
	content: "";
	position: absolute;
	top: 0;
	left: 30px;
	right: 0;
	height: 40%;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
	z-index: 3;
	pointer-events: none;
	border-radius: 0 4px 0 0;
}

/* Tampilan List Book */
.listbook,
.detailbook {
	padding: 1rem;
	display: none;
	max-width: 1400px;
	margin: 0 auto;
}

.search-container {
	margin: 1.5rem 0;
	display: flex;
	gap: 0.5rem;
	background-color: rgba(93, 64, 55, 0.7);
	padding: 0.8rem;
	border-radius: 8px;
	box-shadow: 0 3px 6px var(--shadow);
	background-image: var(--wood-texture);
	background-blend-mode: multiply;
	width: 100%;
	max-width: 100%;
}

.search-input {
	flex-grow: 1;
	padding: 0.7rem 1rem;
	border: none;
	border-radius: 4px;
	background-color: var(--search-bg);
	color: var(--text-color);
	font-size: 0.95rem;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
	font-family: var(--arabic-font);
	min-width: 0;
}

.search-btn {
	background-color: var(--wood-accent);
	color: white;
	border: none;
	border-radius: 4px;
	padding: 0 1.2rem;
	cursor: pointer;
	font-weight: bold;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
	transition: background-color 0.2s;
	font-family: var(--arabic-font);
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
}

.search-btn .text {
	display: inline;
}

.search-btn .icon {
	display: none;
}

.search-btn:hover {
	background-color: var(--wood-light);
}

.book-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1.5rem;
}

.book-card {
	background-color: var(--card-bg);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 6px 12px var(--shadow);
	cursor: pointer;
	transition:
		transform 0.2s,
		box-shadow 0.2s;
	position: relative;
	height: 280px;
	width: 200px;
}

.book-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.book-card-image {
	height: 200px;
	background: linear-gradient(
		135deg,
		var(--book-color),
		var(--book-color-dark)
	);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.book-card-image::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 15px;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.25);
}

.book-card-title {
	color: var(--book-text);
	font-weight: bold;
	padding: 0 1rem;
	text-align: center;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
	z-index: 1;
	font-family: var(--arabic-font);
}

.book-card-content {
	padding: 0.8rem;
}

.book-card-author {
	font-size: 0.85rem;
	color: var(--wood-accent);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: var(--arabic-font);
}

/* Tampilan Detail Book */
.book-detail-header {
	text-align: center;
	margin-bottom: 2rem;
	padding: 2rem;
	background: linear-gradient(
		135deg,
		rgba(93, 64, 55, 0.4),
		rgba(109, 76, 65, 0.3)
	);
	border-radius: 12px;
	box-shadow: 0 8px 20px var(--shadow);
	position: relative;
	overflow: hidden;
}

.book-detail-header:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(
		90deg,
		var(--wood-light),
		var(--wood-accent),
		var(--wood-dark)
	);
}

.book-detail-header .detail-title {
	margin: 0 0 16px 0;
	font-size: 1.8rem;
	margin-bottom: 0.5rem;
	line-height: 1.3;
	text-align: center;
	letter-spacing: 1px;
	font-family: var(--arabic-font);
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
	border-bottom: 2px solid var(--wood-accent);
}

.book-detail-header .detail-subtitle {
	font-size: 2rem;
	color: var(--wood-accent);
	margin-bottom: 0.5rem;
	font-style: italic;
}

.book-detail-header .detail-meta {
	color: var(--text-color);
	background: rgba(0, 0, 0, 0.4);
	font-size: 1rem;
	padding: 1rem;
	border-radius: 8px;
	margin-top: 1rem;
	display: inline-block;
}

/* ===== MOBILE FIRST STYLING ===== */
.filter-toggle-wrapper {
	margin-top: 1rem;
}

.filter-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
}

.filter-toggle input[type="checkbox"] {
	display: none;
}

.toggle-slider {
	width: 40px;
	height: 20px;
	background-color: #ccc;
	border-radius: 20px;
	position: relative;
	transition: background-color 0.3s;
}

.toggle-slider:before {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: white;
	top: 2px;
	left: 2px;
	transition: transform 0.3s;
}

.filter-toggle input:checked + .toggle-slider {
	background-color: var(--accent-color);
}

.filter-toggle input:checked + .toggle-slider:before {
	transform: translateX(20px);
}

.filter-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-out;
}

.filter-content.show {
	max-height: 500px;
}

.filter-form {
	margin-top: 1rem;
	padding: 1rem;
	background-color: var(--card-bg);
	border-radius: 8px;
	border: 1px solid var(--border-color);
}

.filter-field {
	margin-bottom: 1rem;
}

.filter-field label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: bold;
}

.filter-input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	background-color: var(--search-bg);
	color: var(--text-color);
}

.filter-buttons {
	display: flex;
	gap: 0.5rem;
}

.btn-apply-filter,
.btn-reset-filter {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.btn-apply-filter {
	background-color: var(--accent-color);
	color: white;
}

.btn-reset-filter {
	background-color: #6c757d;
	color: white;
}

/* Header actions mobile styling */
.header-actions {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
	margin-top: 1.5rem;
	justify-content: center;
}

.book-content {
	background: transparent;
	border: none;
	padding: 0;
	box-shadow: none;
	margin: 0;
	width: 100%;
	border-radius: 0;
}

.book-content h2 {
	margin: 2rem 0 1.2rem;
	color: var(--wood-accent);
	font-size: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wood-accent);
	font-family: var(--arabic-font);
}

.book-content p {
	margin-bottom: 1.2rem;
	text-align: justify;
}

.book-content-item {
	background: linear-gradient(
		135deg,
		rgba(93, 64, 65, 0.2),
		rgba(109, 76, 65, 0.1)
	);
	border-radius: 10px;
	padding: 1.5rem;
	margin: 1.5rem 0;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
	width: 100%;
}

.book-content-item::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--wood-accent),
		transparent
	);
}

.book-content-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.content-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.2rem;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid rgba(205, 133, 63, 0.3);
	width: 100%;
}

.content-title {
	font-size: 1.4rem;
	font-weight: bold;
	color: var(--gold-light);
	font-family: var(--arabic-font);
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
	flex: 1;
}

.content-number {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	background: linear-gradient(135deg, var(--wood-accent), var(--wood-dark));
	color: white;
	border-radius: 50%;
	font-weight: bold;
	font-size: 1.2rem;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.content-body {
	margin: 1.2rem;
	width: 100%;
}

/* Gaya untuk tombol deskripsi */
.btn-description {
	background: linear-gradient(to right, var(--wood-accent), var(--wood-dark));
	color: white;
	border: none;
	padding: 0.8rem;
	border-radius: 30px;
	cursor: pointer;
	font-weight: bold;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transition: all 0.3s ease;
	font-size: 0.9rem;
}

.btn-description:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-description i {
	font-size: 1.1rem;
}

/* Gaya untuk deskripsi surah */
#description-container {
	display: none;
	background-color: var(--card-bg);
	border-radius: 12px;
	padding: 1.5rem;
	margin-top: 1rem;
	position: relative;
}

.description-title {
	color: var(--gold-light);
	text-align: center;
	margin-bottom: 1.2rem;
	font-family: var(--arabic-font);
	font-size: 1.4rem;
	padding-bottom: 0.8rem;
	border-bottom: 2px solid var(--wood-accent);
}

.description-content {
	font-size: 1rem;
	line-height: 1.6;
	text-align: justify;
	background: rgba(93, 64, 55, 0.2);
	padding: 1.2rem;
	border-radius: 8px;
	border-left: 3px solid var(--wood-accent);
}

.btn-close {
	position: absolute;
	top: 0;
	right: 0;
	background: var(--wood-dark);
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	width: 40px;
	height: 40px;
	padding: 0;
}

.btn-close:hover {
	background: var(--wood-accent);
	transform: scale(1.05);
}

/* Teks "Tutup" disembunyikan secara default (mobile) */
.close-text {
	display: none;
}

.surah-description {
	animation: slideIn 0.3s ease-out forwards;
}

.surah-description.closing {
	animation: slideOut 0.3s ease-in forwards;
}

/* ===== FILTER CONTAINER ===== */
.filter-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-bottom: 2rem;
	padding: 1.5rem;
	background-color: var(--card-bg);
	border-radius: 10px;
	box-shadow: 0 4px 12px var(--shadow);
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.filter-group label {
	font-weight: 600;
	color: var(--wood-accent);
	font-size: 0.9rem;
}

.filter-group select {
	padding: 0.8rem;
	border: 1px solid var(--wood-accent);
	border-radius: 6px;
	background-color: var(--search-bg);
	color: var(--text-color);
	font-size: 1rem;
	width: 100%;
}

.filter-submit {
	background: linear-gradient(to right, var(--wood-accent), var(--wood-dark));
	color: white;
	border: none;
	padding: 1rem;
	border-radius: 6px;
	font-weight: bold;
	cursor: pointer;
	margin-top: 0.5rem;
	transition: all 0.3s ease;
}

.filter-submit:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* ===== SCHOOL CARD ===== */
.school-card {
	background-color: var(--card-bg);
	border-radius: 10px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 4px 10px var(--shadow);
	transition: all 0.3s ease;
	cursor: pointer;
}

.school-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.school-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.school-name {
	font-weight: bold;
	font-size: 1.2rem;
	color: var(--gold-light);
}

.school-type {
	background-color: var(--wood-accent);
	color: white;
	padding: 0.3rem 0.8rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

.school-address {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 1rem;
	color: var(--text-color);
	opacity: 0.9;
}

.school-address i {
	margin-top: 0.2rem;
}

.school-details {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5rem;
	font-size: 0.9rem;
}

/* Style untuk link Google Maps */
.map-link {
	display: inline-block;
	color: white !important;
	text-decoration: none;
	padding: 4px 6px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 0.8rem;
	margin: 5px 0;
	transition: all 0.3s ease;
	box-shadow: 0 6px 8px rgba(26, 115, 232, 0.3);
	letter-spacing: 0.5px;
}

/* Efek hover pada link */
.map-link:hover {
	background: #0d62cb;
	transform: translateY(-3px);
	box-shadow: 0 7px 14px rgba(26, 115, 232, 0.4);
}

/* Efek aktif saat diklik */
.map-link:active {
	transform: translateY(1px);
}

/* Icon peta */
.map-link::before {
	content: "📍";
	margin-right: 10px;
	font-size: 1.4rem;
}

/* Kartu Pesantren - Styling Mobile First */
.card {
	background: var(--bg-color);
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
	border: 1px solid #d7ccc8;
	position: relative;
	overflow: hidden;
	background-image: var(--wood-texture);
	background-blend-mode: overlay;
	margin-bottom: 1.5rem;
	animation: fadeIn 0.5s ease-out forwards;
	max-width: 400px;
	width: 100%;
}

.card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(
		90deg,
		var(--wood-light),
		var(--wood-accent),
		var(--wood-dark)
	);
}

.card-header {
	text-align: center;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid rgba(205, 133, 63, 0.3);
}

.card-name {
	font-size: 1.8rem;
	color: var(--gold-light);
	margin-bottom: 0.5rem;
	font-family: var(--arabic-font);
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
	line-height: 1.3;
}

.card-code {
	color: var(--text-color);
	background: rgba(93, 64, 55, 0.4);
	padding: 0.5rem 1rem;
	border-radius: 20px;
	display: inline-block;
	font-size: 0.85rem;
	margin-top: 0.5rem;
}

.code-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.copy-btn {
	background: rgba(255, 255, 255, 0.3);
	border: none;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	color: #5d4037;
}

.copy-btn:hover {
	background: rgba(255, 255, 255, 0.5);
	transform: scale(1.1);
}

.copy-btn:active {
	transform: scale(0.95);
}

.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltiptext {
	visibility: hidden;
	width: 80px;
	background-color: #554;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	padding: 5px;
	position: absolute;
	z-index: 1;
	bottom: 125%;
	left: 50%;
	margin-left: -40px;
	opacity: 0;
	transition: opacity 0.3s;
	font-size: 12px;
}

.tooltip .tooltiptext::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #555 transparent transparent transparent;
}

.tooltip.show tooltiptext {
	visibility: visible;
	opacity: 1;
}

.card-details {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.detail-item {
	display: flex;
	align-items: flex-start;
	gap: 0.8rem;
	padding: 0.8rem;
	background: rgba(93, 64, 55, 0.3);
	border-radius: 8px;
	transition: all 0.3s ease;
}

.detail-item:hover {
	background: rgba(93, 64, 55, 0.4);
	transform: translateX(5px);
}

.detail-icon {
	color: var(--wood-accent);
	font-size: 1.2rem;
	min-width: 24px;
	padding-top: 2px;
}

.detail-content {
	flex: 1;
}

.detail-label {
	font-size: 0.85rem;
	color: var(--wood-accent);
	margin-bottom: 0.2rem;
	font-weight: 500;
}

.detail-value {
	font-size: 1rem;
	color: var(--text-color);
	line-height: 1.4;
}

.kyai-section {
	background: rgba(212, 175, 55, 0.1);
	border-left: 3px solid var(--gold);
}

.location-section {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.loading {
	text-align: center;
	padding: 3rem;
	color: var(--wood-accent);
}

.loading i {
	font-size: 3rem;
	margin-bottom: 1rem;
	display: block;
	animation: spin 1s linear infinite;
}

/* ======= Book Detail Item ======= */
/* Mobile First Styling */
.book-detail-item {
	background-color: var(--card-bg);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	box-shadow: 0 4px 12px var(--shadow);
	border: 1px solid var(--wood-accent);
	background-image: var(--wood-texture);
	background-blend-mode: overlay;
}

.list-item-header {
	display: flex;
	align-items: center;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--wood-accent);
}

.list-item-number {
	background: linear-gradient(to bottom, var(--wood-accent), var(--wood-dark));
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	margin-right: 16px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.list-item-title {
	color: var(--wood-accent);
	font-size: 1.2rem;
	line-height: 1.3;
	text-align: center;
	font-weight: bold;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.book-detail-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.verse-item .book-detail-content {
	padding: 0;
	margin: 0;
	background: linear-gradient(
		135deg,
		rgba(78, 52, 46, 0.1),
		rgba(109, 76, 65, 0.15)
	);
	border-radius: 8px;
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
	max-width: 100%;
}

.verse-arabic {
	font-size: 2.8rem;
	text-align: right;
	line-height: 2.2;
	margin-bottom: 1rem;
	font-family: var(--arabic-font);
	color: var(--text-color);
	padding: 1rem;
	background: rgba(0, 0, 0, 0.4);
	border-radius: 8px;
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
	position: relative;
}

.verse-arabic:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.03"><path fill="%238D6E63" d="M10,10 Q30,5 50,20 T90,10 Q70,40 50,30 T10,50 Q30,60 50,50 T90,70 Q70,90 50,80 T10,90"/></svg>');
	pointer-events: none;
}

.content-latin {
	font-style: italic;
	border-left: 3px solid var(--wood-accent);
	border-top: 1px solid var(--wood-accent);
	font-size: 1.1rem;
	line-height: 1.6;
	color: var(--text-color);
	margin: 0 0 16px 0;
	padding: 10px;
	background-color: rgba(93, 64, 55, 0.2);
	border-radius: 6px;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
}

.content-translation {
	color: var(--text-color);
	font-size: 1.1rem;
	margin-bottom: 1rem;
	line-height: 1.6;
	padding: 1rem 0.5rem;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 8px;
}

.verse-item .verse-arabic,
.verse-item .content-latin,
.verse-item .content-translation {
	width: 100%;
	box-sizing: border-box;
}

.content-audio {
	padding: 1rem;
	background: rgba(93, 64, 55, 0.2);
	border-radius: 8px;
	text-align: center;
	width: 100%;
	display: block;
}

.content-audio audio {
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	border-radius: 20px;
	background: var(--search-bg);
}

.book-cover-section {
	text-align: center;
	padding: 10px;
	background-color: rgba(93, 64, 55, 0.2);
	border-radius: 8px;
}

.book-cover-image {
	position: relative;
	display: inline-block;
	margin-bottom: 16px;
}

.book-cover-image img {
	width: 100%;
	max-width: 250px;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
	transition: transform 0.3s ease;
	border: 2px solid var(--wood-dark);
	object-fit: cover;
	background-color: #f5f5f5;
}

.book-cover-image img[src*="placeholder"] {
	border: 1px solid #e0e0e0;
	display: flex;
	align-items: center;
	.justify-content: center;
	font-size: 0.8rem;
	color: #999;
}

.book-cover-image:hover img {
	transform: scale(1.03) rotate(1deg);
}

.book-cover-effect {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		135deg,
		rgba(141, 110, 99, 0.1) 0%,
		rgba(109, 76, 65, 0.2) 100%
	);
	border-radius: 4px;
	pointer-events: none;
}

.btn-download-book {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: linear-gradient(to bottom, var(--wood-accent), var(--wood-dark));
	color: white;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 500;
	transition: all 0.3s ease;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-download-book:hover {
	background: linear-gradient(to bottom, var(--wood-light), var(--wood-accent));
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.book-info-section {
	flex: 1;
}

.book-summary h3,
.book-details h3,
.book-tags h3,
.book-buy-links h3 {
	margin: 0 0 12px 0;
	color: var(--gold-light);
	font-size: 1.3rem;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--wood-accent);
	font-family: var(--arabic-font);
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.book-summary p {
	line-height: 1.6;
	color: var(--text-color);
	margin: 0 0 16px 0;
	padding: 10px;
	background-color: rgba(93, 64, 55, 0.2);
	border-radius: 6px;
	border-left: 3px solid var(--wood-accent);
}

.book-meta-info {
	margin-bottom: 20px;
	padding: 10px;
	background-color: rgba(93, 64, 55, 0.15);
	border-radius: 6px;
}

.book-author,
.book-publisher {
	margin-bottom: 8px;
	color: var(--text-color);
}

.book-author a,
.book-publisher a {
	color: var(--wood-accent);
	text-decoration: none;
	font-weight: 500;
}

.book-author a:hover,
.book-publisher a:hover {
	text-decoration: underline;
	color: var(--gold-light);
}

.detail-grid {
	display: grid;
	gap: 8px;
	margin-bottom: 20px;
	padding: 10px;
	background-color: rgba(93, 64, 55, 0.15);
	border-radius: 6px;
}

.detail-grid div {
	display: flex;
	flex-wrap: wrap;
}

.detail-grid strong {
	min-width: 100px;
	color: var(--gold-light);
	font-weight: 600;
}

.detail-grid span {
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
}

.detail-grid div:not(:last-child) {
	padding-bottom: 5px;
	border-bottom: 1px dashed rgba(205, 133, 63, 0.3);
}

.tags-container {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.tag {
	padding: 6px 12px;
	background: linear-gradient(to bottom, var(--wood-accent), var(--wood-dark));
	color: white;
	text-decoration: none;
	border-radius: 20px;
	font-size: 0.85rem;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tag:hover {
	background: linear-gradient(to bottom, var(--wood-light), var(--wood-accent));
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.buy-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.btn-buy {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: linear-gradient(to bottom, #27ae60, #219653);
	color: white;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 500;
	transition: all 0.3s ease;
	width: fit-content;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-buy:hover {
	background: linear-gradient(to bottom, #219653, #1e8449);
	transform: translateY(-2px);
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.light-mode .book-detail-item {
	border: 1px solid var(--wood-accent);
}

.light-mode .book-summary p,
.light-mode .book-meta-info,
.light-mode .detail-grid {
	background-color: rgba(240, 230, 210, 0.5);
}

.light-mode .book-detail-header h1,
.light-mode .book-summary h3,
.light-mode .book-details h3,
.light-mode .book-tags h3,
.light-mode .book-buy-links h3 {
	color: var(--wood-dark);
}

.light-mode .detail-grid strong {
	color: var(--wood-dark);
}

/* Placeholder styling */
.book-cover-image img[src*="placeholder"] {
	border: 1px solid #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	color: #999;
}

/* Tambahkan di file CSS utama */
mark {
	background-color: yellow;
	color: black;
	font-weight: bold;
	padding: 1px 3px;
	border-radius: 6px;
}

.sm-year::after {
	content: "SM";
	color: var(--dark-gold);
	padding: 0.15rem;
}

.m-year::after {
	content: "M";
	color: var(--wood-light);
	padding: 0.15rem;
}

.isa-year {
	color: #c27b14;
	font-weight: bold;
}

/* Animasi */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	100% {
		transform: rotate(360deg);
	}
}

/* Animasi untuk deskripsi surah */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.animated {
	animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive design untuk mobile */
@media (max-width: 767px) {
	.btn-nav .text {
		display: none;
	}

	.page-title {
		font-size: 1rem;
		max-width: 40vw;
	}

	.shelf-title {
		font-size: 1.3rem;
		margin: 1.2rem 0 0.8rem;
		padding: 0.5rem;
	}

	.book {
		min-width: 140px;
		height: 200px;
		width: 140px;
		margin: 0 10px;
	}

	.book-title {
		font-size: 0.85rem;
	}

	.search-container {
		padding: 0.8rem;
		margin: 1rem 0;
	}

	.search-input {
		padding: 0.7rem 1rem;
		font-size: 0.9rem;
	}

	.search-btn {
		padding: 0 1rem;
	}

	.search-btn .text {
		display: none;
	}

	.search-btn .icon {
		display: block;
	}

	.book-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 1rem;
	}

	.book-card {
		height: 240px;
		width: 160px;
	}

	.book-card-image {
		height: 170px;
	}

	.book-card-title {
		font-size: 0.9rem;
	}

	.book-detail-header {
		padding: 1rem;
		gap: 1.5rem;
	}

	.book-cover-large {
		width: 140px;
		height: 210px;
	}

	.book-cover-large-title {
		font-size: 1rem;
	}

	.book-meta h1 {
		font-size: 1.4rem;
	}

	.book-meta .label {
		width: 80px;
	}

	.book-content {
		padding: 1.2rem;
		font-size: 0.95rem;
	}

	.book-content h2 {
		font-size: 1.2rem;
		margin: 1.5rem 0 1rem;
	}

	.content-arabic {
		font-size: 2.6rem;
	}

	.book-content-item {
		padding: 1.5rem;
	}

	.contet-title {
		font-size: 1.2rem;
	}

	.content-header {
		gap: 10px;
	}

	.verse-item .verse-arabic {
		font-size: 2.6rem;
		line-height: 2;
	}

	.btn-description {
		padding: 0.7rem 1.2rem;
		font-size: 0.9rem;
	}

	#description-container {
		padding: 1.5rem;
	}

	.description-content {
		padding: 1.2rem;
	}

	.description-title {
		font-size: 1.4rem;
	}
}

/* Responsive design untuk tablet */
@media (min-width: 768px) {
	.btn-nav .text {
		display: inline;
	}

	.page-title {
		font-size: 1.5rem;
		max-width: 60vw;
	}

	.shelf-title {
		font-size: 1.8rem;
		margin: 2rem 0 1rem;
	}

	.book {
		min-width: 180px;
		height: 240px;
		width: 180px;
	}

	.book-title {
		font-size: 1.1rem;
	}

	.book-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}

	.book-card {
		height: 320px;
		width: 240px;
	}

	.book-card-image {
		height: 230px;
	}

	.book-detail-header {
		flex-direction: row;
	}

	.book-cover-large {
		align-self: flex-start;
		width: 220px;
		height: 320px;
	}

	.book-cover-large-title {
		font-size: 1.4rem;
	}

	.search-container {
		margin: 2rem auto;
		max-width: 600px;
	}

	.search-btn .text {
		display: inline;
	}

	.search-btn .icon {
		display: none;
	}

	#description-container {
		padding: 2rem;
		margin-top: 1.5rem;
	}

	.description-title {
		font-size: 1.6rem;
		margin-bottom: 1.5rem;
	}

	.description-content {
		font-size: 1.1rem;
		padding: 1.5rem;
	}

	.btn-description {
		padding: 0.8rem 1.5rem;
		font-size: 1rem;
	}

	.btn-description i {
		font-size: 1.2rem;
	}

	.btn-close {
		padding: 0.5rem 1rem;
		width: auto;
		height: auto;
		border-radius: 30px;
		gap: 0.5rem;
	}

	.close-text {
		display: inline;
		font-size: 1rem;
		font-weight: 500;
	}

	.filter-toggle-wrapper {
		display: inline-block;
		margin-left: 15px;
		width: auto;
	}

	.filter-content {
		position: absolute;
		top: 100%;
		right: 0;
		width: auto;
		min-width: 350px;
		z-index: 100;
	}

	.filter-inputs {
		flex-direction: row;
		align-items: center;
	}

	.filter-inputs input {
		width: 120px;
	}

	.filter-inputs span {
		display: inline;
		color: #666;
		margin: 0 5px;
	}

	.filter-actions {
		margin-top: 15px;
	}

	.btn-filter {
		flex: none;
		padding: 8px 16px;
		font-size: 0.9rem;
	}

	.header-actions {
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		width: auto;
	}

	.filter-container {
		grid-template-columns: repeat(2, 1fr);
	}

	.school-details {
		grid-template-columns: repeat(3, 1fr);
	}

	.pesantren-card {
		padding: 2rem;
	}

	.pesantren-name {
		font-size: 2.2rem;
	}

	.pesantren-details {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 1.2rem;
	}

	.detail-item {
		margin-bottom: 0;
	}

	.book-detail-item {
		padding: 24px;
	}

	.book-detail-header h1 {
		font-size: 2.2rem;
	}

	.book-detail-content {
		flex-direction: row;
		align-items: flex-start;
	}

	.verse-item .book-detail-content {
		padding: 2rem;
		flex-direction: column;
	}

	.verse-arabic {
		font-size: 2.8rem;
		line-height: 2.5;
	}

	.content-audio audio {
		max-width: 600px;
	}

	.book-cover-section {
		flex: 0 0 280px;
		text-align: left;
		padding: 15px;
	}

	.book-info-section {
		padding-left: 24px;
	}

	.buy-links {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

@media (min-width: 992px) {
	.mainshelf,
	.listbook,
	.detailbook {
		padding: 2rem;
	}

	.book-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}

	#description-container {
		max-width: 800px;
		margin: 2rem auto;
		padding: 2.5rem;
	}

	.description-title {
		font-size: 1.8rem;
	}

	.description-content {
		font-size: 1.15rem;
		line-height: 1.8;
	}

	.btn-close {
		padding: 0.6rem 1.2rem;
		font-size: 1.3rem;
	}

	.close-text {
		font-size: 1.1rem;
	}

	.filter-container {
		grid-template-columns: repeat(4, 1fr);
	}

	.filter-group:last-child {
		grid-column: span 4;
	}

	.filter-submit {
		margin-top: 1.5rem;
	}
}

/* ===== LARGE DESKTOP STYLING ===== */
@media (min-width: 1024px) {
	.search-container {
		max-width: 800px;
	}

	.filter-content {
		min-width: 400px;
	}

	.filter-inputs input {
		width: 140px;
	}

	.book-cover-section {
		flex: 0 0 320px;
	}

	.book-cover-image img {
		max-width: 280px;
	}

	.content-audio audio {
		max-width: 800px;
	}

	.pesantren-card {
		max-width: 800px;
		width: 100%;
	}

	.pesantren-name {
		font-size: 2.5rem;
	}
}
