/*
Theme Name: ROMsNSP Switch
Theme URI: https://romsnsp.com/
Author: ROMsNSP Dev
Description: A modern, highly optimized video game ROM directory theme for Nintendo Switch emulators, inspired by switch-rom.today. Features a fast and responsive layout, custom game specifications grids, and responsive views.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: romsnsp
*/

/* ==========================================
   1. CORE GLOBAL STYLES & TYPOGRAPHY
   ========================================== */
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	background-color: #f8fafc;
	color: #1f2937;
	margin: 0;
	padding: 0;
}

a {
	color: #2563eb;
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: #1d4ed8;
}

* {
	box-sizing: border-box;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 20px;
	padding-left: 20px;
}

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

.text-white {
	color: #ffffff;
}

.bg-dark {
	background-color: #111827;
}

.bg-orange {
	background-color: #f26522;
}

/* ==========================================
   2. HEADER & NAVIGATION STYLES
   ========================================== */
.site-header {
	background-color: #ffffff;
	border-bottom: 1px solid #e2e8f0;
	padding: 15px 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	gap: 20px;
}

.header-brand {
	flex-shrink: 0;
}

.site-logo {
	font-size: 24px;
	font-weight: 700;
	color: #111827;
	display: flex;
	align-items: center;
	gap: 6px;
}

.site-logo .logo-highlight {
	color: #f26522;
}

.header-nav {
	display: flex;
	align-items: center;
}

.nav-menu-list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
}

.nav-menu-list a {
	color: #4b5563;
	font-weight: 500;
	font-size: 15px;
	transition: color 0.15s ease;
}

.nav-menu-list a:hover {
	color: #f26522;
}

.header-search {
	flex-shrink: 0;
	width: 250px;
}

.search-input-wrapper {
	position: relative;
	display: flex;
}

.header-search-input {
	width: 100%;
	padding: 8px 36px 8px 12px;
	font-size: 14px;
	border: 1px solid #cbd5e1;
	border-radius: 9999px;
	outline: none;
	background-color: #f8fafc;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.header-search-input:focus {
	border-color: #f26522;
	background-color: #ffffff;
}

.header-search-submit {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font-size: 14px;
}

/* ==========================================
   3. HERO SECTION
   ========================================== */
.hero-section {
	background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
	padding: 45px 0;
	border-bottom: 1px solid #e2e8f0;
	text-align: center;
}

.hero-title {
	font-size: 32px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 15px 0;
	letter-spacing: -0.02em;
}

.hero-subtitle {
	font-size: 16px;
	color: #475569;
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.6;
}

.hero-subtitle strong {
	color: #0f172a;
}

/* ==========================================
   4. ROM DIRECTORY & SECTION CARDS
   ========================================== */
.roms-section {
	margin-top: 40px;
	margin-bottom: 40px;
}

.section-header-block {
	padding: 12px 20px;
	border-radius: 6px 6px 0 0;
	margin-bottom: 20px;
}

.section-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Responsive Custom ROM Grids */
.rom-grid {
	display: grid;
	gap: 20px;
}

/* Latest Grid: 6 Columns on Desktop */
.grid-6-cols {
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
	.grid-6-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
	.grid-6-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
	.grid-6-cols { grid-template-columns: repeat(6, 1fr); }
}

/* Popular Grid: Dense Grid */
.grid-12-cols {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
}

@media (min-width: 640px) {
	.grid-12-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
	.grid-12-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
	.grid-12-cols { grid-template-columns: repeat(6, 1fr); }
}

/* ROM Cards Details */
.rom-card {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rom-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
	border-color: #cbd5e1;
}

.card-link {
	display: block;
	color: inherit;
}

.card-image-wrapper {
	position: relative;
	aspect-ratio: 2 / 3;
	background-color: #f1f5f9;
	width: 100%;
	overflow: hidden;
}

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

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

.card-placeholder-image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	width: 100%;
	color: #94a3b8;
	font-size: 14px;
}

.card-info {
	padding: 12px;
	text-align: center;
}

.card-title {
	font-size: 14px;
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 6px 0;
	line-height: 1.3;
	height: 2.6em; /* Limit to 2 lines of text */
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.card-badge {
	display: inline-block;
	background-color: #f1f5f9;
	color: #64748b;
	font-size: 11px;
	font-weight: 500;
	padding: 2px 8px;
	border-radius: 9999px;
}

.no-posts-found {
	background: #ffffff;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	padding: 40px;
	text-align: center;
	color: #64748b;
}

/* ==========================================
   5. EMULATORS SECTION (2X2 Grid Block)
   ========================================== */
.emulators-section {
	margin-top: 40px;
	margin-bottom: 40px;
}

.emulators-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 768px) {
	.emulators-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.emulator-box {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.emu-icon-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.emu-icon-title h3 {
	font-size: 18px;
	margin: 0;
	color: #1e293b;
	font-weight: 600;
}

.emu-logo {
	font-size: 20px;
}

.emu-desc {
	font-size: 14px;
	color: #4b5563;
	margin: 0 0 16px 0;
	line-height: 1.6;
}

.emu-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.emu-badge {
	font-size: 12px;
	color: #f26522;
	background-color: #fff3eb;
	border: 1px solid #ffd8c2;
	padding: 2px 10px;
	border-radius: 4px;
	font-weight: 500;
}

/* ==========================================
   6. FAQS SECTION
   ========================================== */
.faqs-section {
	margin-top: 40px;
	margin-bottom: 50px;
}

.faq-container {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
}

.faq-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 25px;
	margin-bottom: 25px;
}

.faq-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}

@media (min-width: 768px) {
	.faq-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

.faq-item {
	display: flex;
	flex-direction: column;
}

.faq-question {
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.faq-answer {
	font-size: 14px;
	color: #4b5563;
	margin: 0;
	line-height: 1.6;
}

/* ==========================================
   7. SINGLE ROM VIEW (Inner Layout)
   ========================================== */
.single-rom-page {
	padding-top: 30px;
	padding-bottom: 60px;
}

.rom-breadcrumbs {
	font-size: 14px;
	color: #64748b;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.rom-breadcrumbs a {
	color: #64748b;
}

.rom-breadcrumbs a:hover {
	color: #f26522;
}

.crumb-separator {
	color: #cbd5e1;
}

.crumb-current {
	color: #0f172a;
	font-weight: 500;
}

/* Information Container Flexbox */
.main-info-block {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 25px;
	display: flex;
	flex-direction: column;
	gap: 30px;
	margin-bottom: 40px;
}

@media (min-width: 768px) {
	.main-info-block {
		flex-direction: row;
	}
}

.info-left {
	flex: 0 0 240px;
	max-width: 240px;
	align-self: flex-start;
	width: 100%;
}

@media (max-width: 767px) {
	.info-left {
		max-width: 100%;
		display: flex;
		justify-content: center;
	}
}

.single-cover-image {
	width: 100%;
	max-width: 240px;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	border: 1px solid #e2e8f0;
}

.single-cover-placeholder {
	width: 240px;
	height: 330px;
	background-color: #f1f5f9;
	color: #94a3b8;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	font-size: 16px;
	text-align: center;
}

.info-right {
	flex: 1;
}

.title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.single-rom-title {
	font-size: 26px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
	line-height: 1.2;
}

.format-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 4px;
	letter-spacing: 0.05em;
}

.nsp-badge {
	background-color: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.xci-badge {
	background-color: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.rating-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

.rating-row .stars {
	font-size: 16px;
}

.rating-row .rating-text {
	font-size: 13px;
	color: #64748b;
}

/* Specs Table styling */
.meta-data-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 25px;
}

.meta-data-table th, .meta-data-table td {
	padding: 10px 14px;
	text-align: left;
	border-bottom: 1px solid #f1f5f9;
}

.meta-data-table th {
	width: 180px;
	color: #64748b;
	font-weight: 500;
	font-size: 14px;
}

.meta-data-table td {
	color: #1e293b;
	font-size: 14px;
}

.firmware-tag {
	background-color: #f26522;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
}

.title-id-code {
	font-family: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, monospace;
	background-color: #f1f5f9;
	color: #334155;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
}

/* Green Download Button */
.download-button-wrapper {
	margin-top: 25px;
}

.btn-download-green {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #10b981;
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-download-green:hover {
	background-color: #059669;
	color: #ffffff;
	transform: translateY(-1px);
}

.btn-download-green:active {
	transform: translateY(1px);
}

.btn-download-disabled {
	display: inline-block;
	background-color: #cbd5e1;
	color: #64748b;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 6px;
	border: none;
	cursor: not-allowed;
}

/* Screenshots Block */
.screenshots-block {
	margin-bottom: 40px;
}

.block-title {
	font-size: 20px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 20px 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #e2e8f0;
}

.screenshot-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
}

@media (min-width: 640px) {
	.screenshot-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.screenshot-item {
	aspect-ratio: 16 / 9;
	background-color: #f1f5f9;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.game-screenshot {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.screenshot-item:hover .game-screenshot {
	transform: scale(1.03);
}

/* About Game Description Block */
.about-game-block {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 40px;
}

.game-description-content {
	font-size: 15px;
	line-height: 1.7;
	color: #334155;
}

.game-description-content p {
	margin-top: 0;
	margin-bottom: 16px;
}

.game-description-content p:last-child {
	margin-bottom: 0;
}

/* Comments Template Area */
.comments-block-wrapper {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 25px;
}

/* ==========================================
   8. FOOTER STYLES
   ========================================== */
.site-footer {
	background-color: #111625;
	color: #cbd5e1;
	padding-top: 60px;
	border-top: 4px solid #f26522;
}

.footer-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 40px 20px;
}

@media (min-width: 768px) {
	.footer-container {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

.brand-desc-col {
	display: flex;
	flex-direction: column;
}

.footer-brand-logo {
	color: #ffffff;
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 15px 0;
}

.footer-brand-description {
	font-size: 14px;
	line-height: 1.6;
	color: #94a3b8;
	margin: 0 0 20px 0;
	max-width: 440px;
}

.footer-social-wrapper {
	display: flex;
	gap: 12px;
}

.social-circle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: #1e2538;
	color: #cbd5e1;
	font-size: 12px;
	font-weight: 600;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.social-circle-icon:hover {
	background-color: #f26522;
	color: #ffffff;
	transform: scale(1.05);
}

.footer-col-title {
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 20px 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	position: relative;
	padding-bottom: 8px;
}

.footer-col-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 30px;
	height: 2px;
	background-color: #f26522;
}

.footer-menu-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-menu-links a {
	color: #94a3b8;
	font-size: 14px;
	transition: color 0.15s ease, padding-left 0.15s ease;
}

.footer-menu-links a:hover {
	color: #ffffff;
	padding-left: 4px;
}

/* Bottom Strip */
.footer-copyright-strip {
	background-color: #0b0f19;
	border-top: 1px solid #1e2538;
	padding: 20px 0;
}

.copyright-text {
	font-size: 13px;
	color: #64748b;
	margin: 0;
}

.copyright-text .highlight {
	color: #ffffff;
	font-weight: 500;
}
