* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', 'Roboto', 'Noto Sans', system-ui, -apple-system, 'Microsoft YaHei', sans-serif;
	background-color: #f0f3f5;
	color: #1e2a2e;
	line-height: 1.5;
	overflow-x: hidden;
}

/* container with consistent padding */
.container {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
}

/* TYPOGRAPHY - scaled for mobile */
h1, h2, h3 {
	font-weight: 600;
	letter-spacing: -0.02em;
}

h1 {
	font-size: 1.9rem;
}

h2 {
	font-size: 1.6rem;
	border-left: 5px solid #2c6e2f;
	padding-left: 14px;
	margin-bottom: 1.2rem;
	color: #1a3b1c;
}

.section {
	padding: 2.5rem 0;
	border-bottom: 1px solid #dce4e6;
}

.section:last-child {
	border-bottom: none;
}

/* ========== TOP BAR (mobile-friendly) ========== */
.top-bar {
	background-color: #1e3a2f;
	color: #e6f0ea;
	font-size: 0.75rem;
	padding: 6px 0;
}

.top-bar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.gov-badge {
	font-weight: 500;
}

.lang-switch {
	display: flex;
	gap: 12px;
}

.lang-switch a {
	color: #cde3d9;
	text-decoration: none;
	font-size: 0.75rem;
}

/* ========== MAIN HEADER (sticky, compact) ========== */
.main-header {
	background-color: white;
	box-shadow: 0 2px 12px rgba(0,0,0,0.05);
	padding: 0.8rem 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-flex {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.logo-area {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.emblem {
	width: 52px;
	height: 52px;
	background: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.emblem img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.state-title h1 {
	font-size: 1.45rem;
	line-height: 1.2;
}

.state-title p {
	font-size: 0.7rem;
	color: #4a6270;
}

/* Mobile-first navigation: wrap + larger touch targets */
nav ul {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	gap: 14px;
	justify-content: flex-start;
}

nav a {
    text-decoration: none;
    color: #1e3a2f;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 0;
    display: inline-block;
    white-space: nowrap;
    border-bottom: 2px solid transparent;  /* ← Always there, invisible */
}

nav a:hover,
nav a:active {
    color: #2c6e2f;
    border-bottom-color: #2c6e2f;  /* Just changes color */
    text-shadow: 0 0 6px rgba(44, 110, 47, 0.1);
}

/* ========== HERO SECTION ========== */
.hero {
	background: linear-gradient(105deg, #eef5ea 0%, #d9e8d4 100%);
	padding: 2rem 0;
}

.hero-grid {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: center;
}

.hero-text {
	text-align: center;
	width: 100%;
}

.hero-text h1 {
	font-size: 1.8rem;
}

.hero-text .motto {
	font-style: italic;
	font-size: 1rem;
	color: #3b6e47;
	margin: 0.4rem 0 0.8rem;
}

.hero-flag {
	width: 100%;
	max-width: 260px;
	text-align: center;
	background: rgba(255,255,240,0.7);
	padding: 16px;
	border-radius: 24px;
	margin: 0 auto;
}

.flag-placeholder {
	width: 100%;
	max-width: 200px;
	margin: 0 auto;
	aspect-ratio: 3/2;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	background: #f0f0f0;
}

.flag-placeholder img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

button, .btn {
	background-color: #2c6e2f;
	color: white;
	border: none;
	padding: 10px 24px;
	border-radius: 40px;
	font-weight: 600;
	cursor: pointer;
	transition: 0.2s;
	font-size: 0.95rem;
}

.btn-small {
	font-size: 0.8rem;
	padding: 8px 18px;
	background-color: #4d7c5a;
}

/* ========== INFO GRID (mobile stacked) ========== */
.info-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 28px 0 20px;
}

.info-card {
	background: white;
	padding: 1.4rem;
	border-radius: 20px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	border: 1px solid #e2eddf;
	width: 100%;
}

.info-card h3 {
	font-size: 1.25rem;
	margin-bottom: 1rem;
	color: #2c6e2f;
	border-bottom: 1px solid #cbdcd2;
	padding-bottom: 8px;
}

.info-card p, .info-card li {
	font-size: 0.9rem;
}

.quick-links ul {
	list-style: none;
}

.quick-links li {
	margin: 10px 0;
	padding-left: 4px;
}

.quick-links a {
	text-decoration: none;
	color: #1e4663;
	font-weight: 500;
}

/* ========== NEWS SECTION ========== */
.news-item {
	background: white;
	padding: 1.2rem;
	margin-bottom: 1rem;
	border-radius: 16px;
	border-left: 5px solid #2c6e2f;
}

.news-date {
	font-size: 0.75rem;
	color: #6c7e89;
	margin-bottom: 6px;
}

.news-item h3 {
	font-size: 1.2rem;
	margin-bottom: 6px;
}

/* ========== DYNAMIC MAP (mobile iframe friendly) ========== */
.map-container {
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.1);
	background: #1e2a2e;
	width: 100%;
}

.map-container iframe {
	display: block;
	width: 100%;
	height: 50vh;
	min-height: 320px;
	border: none;
}

.map-legend {
	background: rgba(30, 42, 46, 0.85);
	backdrop-filter: blur(8px);
	padding: 6px 14px;
	border-radius: 40px;
	position: absolute;
	bottom: 12px;
	right: 12px;
	font-size: 0.7rem;
	color: #e0f0e4;
	display: flex;
	gap: 12px;
	pointer-events: none;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* ========== FOOTER (mobile optimized) ========== */
.footer {
	background-color: #122c21;
	color: #cbddcf;
	padding: 2rem 0 1.5rem;
	margin-top: 2rem;
	font-size: 0.85rem;
}

.footer-grid {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.footer-grid > div {
	width: 100%;
}

.footer h4 {
	margin-bottom: 12px;
	font-size: 1.1rem;
	color: #e2f0e6;
}

.footer a {
	color: #e2f0e6;
	text-decoration: none;
}

.social-icons {
	display: flex;
	gap: 20px;
	margin-top: 14px;
}

.social-icons a {
	display: inline-block;
	transition: transform 0.2s ease;
}

.social-icons img {
	width: 36px;
	height: 36px;
	display: block;
}

.copyright {
	text-align: center;
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid #2c543e;
	font-size: 0.75rem;
}

/* ========== RESPONSIVE TWEAKS (tablet & up) ========== */
@media (min-width: 640px) {
	.hero-grid {
		flex-direction: row;
		text-align: left;
	}
	.hero-text {
		text-align: left;
	}
	.hero-flag {
		max-width: 280px;
	}
	.info-grid {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 24px;
		flex-direction: row;
	}
	.footer-grid {
		flex-direction: row;
		justify-content: space-between;
	}
	.footer-grid > div {
		flex: 1;
	}
	nav ul {
		gap: 22px;
	}
}

@media (min-width: 768px) {
	.container {
		padding: 0 32px;
	}
	.map-container iframe {
		height: 65vh;
		min-height: 460px;
	}
	h1 {
		font-size: 2.2rem;
	}
	.state-title h1 {
		font-size: 1.8rem;
	}
}

/* larger touch targets for buttons/links on mobile */
@media (max-width: 550px) {
	nav a {
		font-size: 0.8rem;
		white-space: normal;
	}
	nav ul {
		gap: 12px;
	}
	.btn, .btn-small {
		width: auto;
		display: inline-block;
	}
	.hero-text button {
		margin-top: 16px;
	}
	.map-legend {
		font-size: 0.6rem;
		gap: 6px;
		bottom: 8px;
		right: 8px;
		padding: 4px 10px;
	}
	.social-icons img {
		width: 32px;
		height: 32px;
	}
}

/* extra small devices */
@media (max-width: 480px) {
	.logo-area {
		gap: 10px;
	}
	.emblem {
		width: 44px;
		height: 44px;
	}
	.state-title h1 {
		font-size: 1.25rem;
	}
	.state-title p {
		font-size: 0.65rem;
	}
	h2 {
		font-size: 1.4rem;
	}
}


/* ========== MOBILE TEXT ENLARGEMENT FIX ========== */
@media (max-width: 640px) {
	body {
		font-size: 18px;  /* Increases base text on phones */
		line-height: 1.55;
	}
	.info-card p, .info-card li, .news-item p {
		font-size: 1rem;  /* Ensures cards use the larger base */
	}
	.hero-text .motto {
		font-size: 1.1rem;
	}
}

/* ========== IMMIGRATION PAGE STYLES ========== */
.info-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	margin: 1.5rem 0;
}

.info-table th,
.info-table td {
	padding: 14px 16px;
	text-align: left;
	border-bottom: 1px solid #e2eddf;
}

.info-table th {
	background-color: #1e3a2f;
	color: white;
	font-weight: 600;
	width: 120px;
}

.info-table td {
	background-color: white;
}

.info-table tr:last-child td {
	border-bottom: none;
}

.visa-card {
	background: linear-gradient(135deg, #eef5ea 0%, #fff 100%);
	border-left: 5px solid #2c6e2f;
}

.application-form {
	background: white;
	border-radius: 28px;
	padding: 1.8rem;
	box-shadow: 0 8px 24px rgba(0,0,0,0.08);
	margin: 2rem 0 1rem;
}

.form-group {
	margin-bottom: 1.2rem;
}

.form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1e3a2f;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #cbdcd2;
	border-radius: 16px;
	font-size: 1rem;
	font-family: inherit;
	background: #fefefe;
	transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #2c6e2f;
	box-shadow: 0 0 0 3px rgba(44,110,47,0.1);
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.output-area {
	background: #1e2a2e;
	color: #e6f0ea;
	padding: 1.2rem;
	border-radius: 20px;
	font-family: monospace;
	font-size: 0.85rem;
	white-space: pre-wrap;
	word-wrap: break-word;
	margin: 1rem 0;
	max-height: 300px;
	overflow-y: auto;
}

.copy-btn {
	background-color: #2c6e2f;
	color: white;
	border: none;
	padding: 10px 24px;
	border-radius: 40px;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.9rem;
	margin-right: 12px;
}

.copy-btn:hover {
	background-color: #1e4a20;
}

.copy-success {
	background-color: #4d7c5a;
	padding: 6px 12px;
	border-radius: 40px;
	font-size: 0.8rem;
	display: inline-block;
}

.dept-badge {
	display: inline-block;
	background-color: #2c6e2f;
	color: white;
	padding: 4px 12px;
	border-radius: 40px;
	font-size: 0.75rem;
	margin-bottom: 12px;
}

@media (max-width: 640px) {
	.form-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.info-table th,
	.info-table td {
		padding: 10px 12px;
	}
}

/* 額外新聞頁面專屬樣式，保持與主風格一致 */
.news-header-badge {
	display: inline-block;
	background: #1e3a2f;
	color: #e6f0ea;
	padding: 0.3rem 1rem;
	border-radius: 40px;
	font-size: 0.75rem;
	margin-bottom: 1rem;
	letter-spacing: 1px;
}
.press-release-grid {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	margin: 2rem 0;
}
.press-card {
	background: white;
	border-radius: 28px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.05);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: 1px solid #e2eddf;
}
.press-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 30px -12px rgba(0,0,0,0.12);
}
.press-header {
	padding: 1.5rem 1.8rem 0.5rem 1.8rem;
	border-bottom: 2px solid #eef3ea;
}
.press-category {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	background: #e7f0e4;
	color: #1e5a2a;
	padding: 4px 12px;
	border-radius: 50px;
	margin-bottom: 12px;
	letter-spacing: 0.5px;
}
.press-title {
	font-size: 1.6rem;
	color: #1e3a2f;
	margin-bottom: 0.5rem;
	line-height: 1.3;
}
.press-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	font-size: 0.8rem;
	color: #5f737d;
	margin: 12px 0 8px;
	border-top: 1px solid #eef3ea;
	padding-top: 12px;
}
.press-meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.press-body {
	padding: 1.4rem 1.8rem 1.8rem 1.8rem;
}
.press-body p {
	margin-bottom: 1rem;
	font-size: 1rem;
	line-height: 1.55;
	color: #2a3b3f;
}
.read-more {
	color: #2c6e2f;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	border-bottom: 1px dashed #bdd6b0;
	transition: gap 0.2s;
}
.read-more:hover {
	gap: 12px;
	border-bottom-color: #2c6e2f;
}
.archive-sidebar {
	background: #fafcf8;
	border-radius: 28px;
	padding: 1.5rem;
	border: 1px solid #deecda;
	margin-bottom: 2rem;
}
.archive-sidebar h3 {
	font-size: 1.3rem;
	border-left: 4px solid #2c6e2f;
	padding-left: 12px;
	margin-bottom: 1rem;
}
.archive-list {
	list-style: none;
}
.archive-list li {
	margin: 12px 0;
	border-bottom: 1px solid #e2eddf;
	padding-bottom: 8px;
}
.archive-list a {
	text-decoration: none;
	color: #1e4663;
	font-weight: 500;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.archive-date {
	font-size: 0.7rem;
	color: #6f8f7a;
}
.featured-tag {
	background: #cbe5e0;
	font-size: 0.65rem;
	border-radius: 40px;
	padding: 2px 10px;
	margin-left: 10px;
	color: #1e5a4a;
}
@media (min-width: 900px) {
	.two-column-layout {
		display: flex;
		gap: 2.5rem;
	}
	.main-news-area {
		flex: 2.5;
	}
	.news-sidebar {
		flex: 1.2;
	}
}
@media (max-width: 899px) {
	.press-title {
		font-size: 1.4rem;
	}
	.press-header, .press-body {
		padding-left: 1.2rem;
		padding-right: 1.2rem;
	}
}
.btn-outline {
	background: transparent;
	border: 1.5px solid #2c6e2f;
	color: #2c6e2f;
	padding: 6px 18px;
	border-radius: 40px;
	font-weight: 600;
	transition: 0.2s;
	display: inline-block;
	text-decoration: none;
}
.btn-outline:hover {
	background: #2c6e2f;
	color: white;
}
.section-divider {
	margin: 2rem 0 1rem;
}