/* Map Detail Page Styles */
.map-header {
	padding: 3rem 0;
	background-color: var(--bg-secondary);
	border-bottom: 1px solid var(--border-color);
	margin-top: 4rem;
}

.map-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
	color: var(--text-secondary);
	flex-wrap: wrap;
}

.map-meta i {
	margin-right: 0.25rem;
}

.map-type-badge {
	background-color: var(--accent-color);
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: 1rem;
	font-weight: bold;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.map-title {
	font-size: 2.5rem;
	font-weight: 800;
	margin-bottom: 1rem;
	color: var(--text-primary);
	line-height: 1.2;
	position: relative;
	padding-bottom: 0.5rem;
}

.map-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 80px;
	height: 4px;
	background-color: var(--accent-color);
	border-radius: 2px;
}

.map-description {
	font-size: 1.15rem;
	color: var(--text-secondary);
	max-width: 800px;
	line-height: 1.6;
	margin-top: 1.5rem;
}

.map-content-wrapper {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

@media (min-width: 1024px) {
	.map-content-wrapper {
		flex-direction: row;
		gap: 4rem;
	}

	.map-main-content {
		flex: 3;
	}

	.map-sidebar {
		flex: 1;
		position: sticky;
		top: 6rem;
		align-self: flex-start;
		max-height: calc(100vh - 7rem);
		overflow-y: auto;
	}
}

/* Main Content Sections */
.section {
	padding: 2rem 0;
}

h2 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 2rem 0 1.5rem;
	color: var(--text-primary);
	position: relative;
	padding-bottom: 0.5rem;
	text-align: center;
}

h2::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background-color: var(--accent-color);
	border-radius: 2px;
}

h3 {
	font-size: 1.4rem;
	font-weight: 600;
	margin: 1.5rem 0 1rem;
	color: var(--text-primary);
}

h4 {
	font-size: 1.2rem;
	font-weight: 500;
	margin: 1.25rem 0 0.75rem;
	color: var(--text-primary);
}

p {
	margin-bottom: 1.25rem;
	line-height: 1.7;
	color: var(--text-secondary);
}

/* Gamemode Selector */
.gamemode-selector {
	padding: 1.5rem;
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
}

.gamemode-selector h2 {
	text-align: center;
	font-size: 1.5rem;
	margin-top: 0;
	margin-bottom: 1.5rem;
}

.gamemode-buttons {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.gamemode-btn {
	padding: 0.75rem 1.5rem;
	border-radius: 0.5rem;
	background-color: var(--bg-tertiary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
	cursor: pointer;
	transition: all var(--transition-speed);
	font-size: 0.95rem;
	font-weight: 500;
}

.gamemode-btn:hover {
	background-color: var(--accent-color-light);
	border-color: var(--accent-color);
	transform: translateY(-2px);
}

.gamemode-btn.active {
	background-color: var(--accent-color);
	color: white;
	border-color: var(--accent-color);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Gamemode Content Sections */
.gamemode-section {
	display: none;
	animation: fadeIn 0.3s ease-out;
}

.gamemode-section.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Map Images */
.map-image {
	margin: 2rem 0;
	position: relative;
}

.map-image img {
	width: 100%;
	border-radius: 0.75rem;
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border-color);
	transition: transform 0.3s ease;
}

.map-image img:hover {
	transform: scale(1.01);
}

.map-image p {
	text-align: center;
	font-size: 0.9rem;
	color: var(--text-tertiary);
	margin-top: 0.5rem;
}

/* Feature Cards */
.feature-card {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
	transition: transform 0.3s ease;
}

.feature-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
}

.icon-wrapper {
	width: 60px;
	height: 60px;
	background-color: var(--accent-color-light);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.5rem;
	color: var(--accent-color);
	font-size: 1.5rem;
}

.feature-card h3 {
	text-align: center;
	margin-bottom: 1rem;
}

.feature-card p {
	text-align: center;
	font-size: 0.95rem;
}

/* Tables */
.guide-table {
	margin: 2rem 0;
	overflow-x: auto;
}

.guide-table table {
	width: 100%;
	border-collapse: collapse;
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: var(--shadow);
}

.guide-table th {
	background-color: var(--accent-color);
	color: white;
	padding: 0.75rem 1rem;
	text-align: left;
	font-weight: 500;
}

.guide-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border-color);
	color: var(--text-secondary);
}

.guide-table tr:last-child td {
	border-bottom: none;
}

.guide-table tr:hover td {
	background-color: var(--bg-tertiary);
}

/* Tip Boxes */
.tip-box {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin: 2rem 0;
	border-left: 4px solid var(--accent-color);
	box-shadow: var(--shadow);
}

.tip-header {
	display: flex;
	align-items: center;
	margin-bottom: 1rem;
	gap: 0.75rem;
}

.tip-header i {
	color: var(--accent-color);
	font-size: 1.25rem;
}

.tip-header h3 {
	margin: 0;
	font-size: 1.25rem;
	color: var(--accent-color);
}

.tip-box p {
	margin-bottom: 0;
	font-size: 1rem;
}

/* Tank Type Cards */
.tank-type-card {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
	transition: transform 0.3s ease;
}

.tank-type-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
}

.tank-type-header {
	background-color: var(--accent-color);
	color: white;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.tank-type-header i {
	font-size: 1.25rem;
}

.tank-type-header h3 {
	margin: 0;
	font-size: 1.25rem;
}

.tank-type-content {
	padding: 1.5rem;
}

.tank-type-content h4 {
	font-size: 1.1rem;
	margin-bottom: 0.75rem;
}

/* Feedback Cards */
.feedback-card {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
}

.rating-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

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

.rating {
	color: var(--accent-color);
	margin: 0 0.5rem;
}

.feedback-item {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

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

.feedback-item i {
	font-size: 1.1rem;
	margin-top: 0.2rem;
}

.feedback-item.positive i {
	color: #4CAF50;
}

.feedback-item.negative i {
	color: #F44336;
}

/* Pro Tip Cards */
.pro-tip-card {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
}

.pro-tip-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent-color);
}

.pro-tip-header h4 {
	margin: 0;
	font-size: 1.1rem;
}

.pro-tip-header span {
	font-size: 0.85rem;
	color: var(--text-secondary);
}

.pro-tip-content p {
	margin-bottom: 0;
	font-style: italic;
}

/* FAQ Items */
.faq-container {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
	overflow: hidden;
}

.faq-item {
	border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
	border-bottom: none;
}

.faq-question {
	padding: 1.25rem 1.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.faq-question:hover {
	background-color: var(--bg-tertiary);
}

.faq-question h4 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 500;
}

.faq-question i {
	transition: transform 0.2s ease;
	color: var(--text-secondary);
}

.faq-item.active .faq-question i {
	transform: rotate(180deg);
}

.faq-answer {
	padding: 0 1.5rem;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
	padding: 0 1.5rem 1.5rem;
	max-height: 500px;
}

.faq-answer p {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

/* Video Cards */
.video-card {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
	transition: transform 0.3s ease;
}

.video-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
}

.video-thumbnail {
	position: relative;
	display: block;
	height: 0;
	padding-bottom: 56.25%;
	/* 16:9 aspect ratio */
	overflow: hidden;
}

.video-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
	transform: scale(1.05);
}

.play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	background-color: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent-color);
	font-size: 1.5rem;
	opacity: 0.9;
	transition: all 0.3s ease;
}

.video-card:hover .play-button {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
	padding: 1.25rem;
}

.video-info h4 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.video-info p {
	margin: 0.25rem 0;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

.video-description {
	margin-top: 0.5rem !important;
	font-size: 0.95rem !important;
	color: var(--text-secondary);
}

/* Action Buttons */
.action-buttons {
	gap: 2rem;
	margin-top: 2rem;
}

/* Sidebar Styles */
.map-sidebar {
	display: none;
}

.sidebar-card {
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
	margin-bottom: 1.5rem;
	transition: transform 0.3s ease;
}

.sidebar-card h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-top: 0;
	margin-bottom: 1.25rem;
	color: var(--text-primary);
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--accent-color);
}

.sidebar-card ul {
	padding-left: 0;
	list-style: none;
}

.sidebar-card li {
	margin-bottom: 0.75rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

.sidebar-card a {
	color: var(--text-primary);
	transition: color var(--transition-speed);
}

.sidebar-card a:hover {
	color: var(--accent-color);
}

.sidebar-card strong {
	color: var(--text-primary);
	font-weight: 500;
}

.related-guide {
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border-color);
	transition: transform 0.2s ease;
}

.related-guide:hover {
	transform: translateX(5px);
}

.related-guide:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.related-guide h4 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.related-guide p {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-bottom: 0;
}

/* Gallery */
.gallery-thumbnail {
	display: block;
	border-radius: 0.5rem;
	overflow: hidden;
	border: 1px solid var(--border-color);
	transition: transform var(--transition-speed);
	height: 120px;
}

.gallery-thumbnail:hover {
	transform: scale(1.05);
	border-color: var(--accent-color);
}

.gallery-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.gallery-thumbnail:hover img {
	transform: scale(1.1);
}

/* Mobile Sidebar Content (Show sidebar on desktop) */
@media (min-width: 1024px) {
	.map-sidebar {
		display: block;
	}

	.mobile-sidebar-content {
		display: none;
	}
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
	.map-header {
		padding: 2.5rem 0;
		margin-top: 3.5rem;
	}

	.map-title {
		font-size: 2rem;
	}

	.map-description {
		font-size: 1.05rem;
	}

	.gamemode-selector {
		padding: 1.25rem;
	}

	.gamemode-buttons {
		gap: 0.5rem;
	}

	.gamemode-btn {
		padding: 0.6rem 1.25rem;
		font-size: 0.9rem;
	}

	.map-sidebar {
		display: none;
	}
}

@media (max-width: 640px) {
	.map-header {
		padding: 2rem 0;
		margin-top: 3rem;
	}

	.map-title {
		font-size: 1.75rem;
	}

	.map-meta {
		font-size: 0.85rem;
		gap: 0.75rem;
	}

	.map-description {
		font-size: 1rem;
	}

	.gamemode-buttons {
		flex-direction: column;
		gap: 0.5rem;
	}

	.gamemode-btn {
		width: 100%;
	}

	.feature-card {
		padding: 1.25rem;
	}

	.icon-wrapper {
		width: 50px;
		height: 50px;
		font-size: 1.25rem;
	}

	.action-buttons {
		flex-direction: column;
	}
}

/* Fix for iOS scrolling */
@supports (-webkit-touch-callout: none) {
	.map-sidebar {
		position: -webkit-sticky;
	}
}

/* Dark/Light Theme Variables */
:root {
	--transition-speed: 0.2s;
	--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Gallery Modal Styles */
.gallery-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.active {
	opacity: 1;
	visibility: visible;
}

.gallery-modal-content {
	position: relative;
	width: 90%;
	max-width: 1200px;
	height: 90vh;
	display: flex;
	flex-direction: column;
}

.gallery-main-image-container {
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	margin: 0 50px;
}

#galleryMainImage {
	max-width: 100%;
	max-height: calc(90vh - 120px);
	object-fit: contain;
	transition: transform 0.3s ease;
	cursor: zoom-in;
}

#galleryMainImage.zoomed {
	transform: scale(1.5);
	cursor: zoom-out;
}

.gallery-image-caption {
	position: absolute;
	bottom: 10px;
	left: 0;
	width: 100%;
	text-align: center;
	color: white;
	padding: 10px;
	background-color: rgba(0, 0, 0, 0.6);
	font-size: 0.9rem;
}

.gallery-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background-color: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	color: white;
	font-size: 1.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
	z-index: 10;
}

.gallery-nav-btn:hover {
	background-color: var(--accent-color);
}

.gallery-prev-btn {
	left: 10px;
}

.gallery-next-btn {
	right: 10px;
}

.gallery-close-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	background-color: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	color: white;
	font-size: 1.25rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
	z-index: 10;
}

.gallery-close-btn:hover {
	background-color: var(--accent-color);
}

.gallery-thumbnails-container {
	display: flex;
	gap: 10px;
	padding: 15px 0;
	overflow-x: auto;
	margin-top: 10px;
	align-items: center;
	justify-content: center;
}

.gallery-thumbnail-item {
	width: 80px;
	height: 60px;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.3s ease;
	flex-shrink: 0;
}

.gallery-thumbnail-item.active {
	border-color: var(--accent-color);
}

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

/* Mobile Gallery Styles */
@media (max-width: 768px) {
	.gallery-modal-content {
		width: 95%;
		height: 95vh;
	}

	.gallery-main-image-container {
		margin: 0 30px;
	}

	#galleryMainImage {
		max-height: calc(95vh - 120px);
	}

	.gallery-nav-btn {
		width: 40px;
		height: 40px;
		font-size: 1.25rem;
	}

	.gallery-thumbnail-item {
		width: 60px;
		height: 45px;
	}
}

@media (max-width: 480px) {
	.gallery-main-image-container {
		margin: 0 10px;
	}

	.gallery-nav-btn {
		width: 35px;
		height: 35px;
		font-size: 1rem;
	}

	.gallery-thumbnail-item {
		width: 50px;
		height: 37px;
	}
}