/* Main site styles and responsive rules */
html, body {
	overflow-x: hidden;
	max-width: 100vw;
}
.container {
	padding: 20px;
	max-width: 1000px;
	margin: 0 auto;
	position: relative;
	z-index: 2; /* ensure content sits above optional side image */
}

/* Thin sticky header styles */
.site-header {
	position: relative; /* keep in normal flow at top */
	z-index: 10;
	background: var(--header-bg, linear-gradient(180deg, rgba(7,17,39,0.92), rgba(11,22,40,0.92)));
	border-bottom: 1px solid rgba(255,255,255,0.03);
	height: 56px;
	display: flex;
	align-items: center;
}
.site-header .header-inner {
	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.header-left, .header-right {
	flex: 1 1 0;
	min-width: 0;
}
.header-center {
	flex: 0 0 auto;
	text-align: center;
}
.header-right {
	display: flex;
	justify-content: flex-end;
}
.header-logo { height: 36px; width: auto; border-radius: 6px; object-fit: contain; }
.site-title { font-weight: 700; font-size: 1rem; color: var(--text-color); }

/* Unified compact header action icons */
.header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.header-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: var(--text-color);
	cursor: pointer;
	transition: all 140ms ease;
	padding: 0;
}

.header-icon-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: translateY(-1px);
}

.header-icon-btn:active {
	transform: translateY(0);
}

.header-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	background: linear-gradient(135deg, var(--accent, #5ea8ff), var(--accent-2, #7c4dff));
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 8px;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	line-height: 1;
}

.header-badge:not(:empty) {
	display: flex;
}

/* Profile icon specific styles */
.header-icon-btn.profile-icon {
	padding: 2px;
	background: linear-gradient(135deg, var(--accent, #5ea8ff), var(--accent-2, #7c4dff));
	border: none;
}

.header-icon-btn.profile-icon:hover {
	box-shadow: 0 4px 12px rgba(92, 138, 255, 0.3);
	transform: translateY(-2px);
}

.header-profile-img { 
	width: 32px; 
	height: 32px; 
	border-radius: 6px; 
	object-fit: cover; 
	display: block;
	border: 2px solid var(--bg-0, #04050a);
}

.header-news {
	display: inline-block;
	padding: 6px 10px;
	margin-right: 8px;
	background: linear-gradient(180deg, var(--accent, #5ea8ff), var(--accent-2, #7c4dff));
	color: #071127;
	font-weight: 700;
	border-radius: 6px;
	text-decoration: none;
	box-shadow: 0 6px 14px rgba(92,138,255,0.12);
}
.header-news:hover { transform: translateY(-1px); }


.top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
}
.top-bar .left, .top-bar .center, .top-bar .right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.service {
	background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
	margin: 10px 0;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid rgba(255,255,255,0.03);
	box-shadow: 0 8px 20px rgba(0,0,0,0.45);
	display: flex;
	gap: 12px;
	align-items: center;
	transition: transform 140ms ease, box-shadow 140ms ease;
}
.service img {
	width: 150px;
	height: 150px;
	object-fit: contain;
	border-radius: 8px;
	flex: 0 0 150px;
	transition: transform 160ms ease, filter 160ms ease;
}
.service .info {
	flex: 1 1 auto;
	min-width: 0;
}
.service h2 { margin: 0 0 8px 0; font-size: 1.1rem; }
.service p { margin: 6px 0; }
.button-link {
	display: inline-block;
	padding: 8px 12px;
	background: linear-gradient(180deg, var(--visit-accent, #5ea8ff) 0%, var(--visit-accent-2, #7c4dff) 100%);
	color: var(--visit-text-color, #071127);
	text-decoration: none;
	border-radius: 8px;
	font-weight: 700;
	margin-top: 8px;
	box-shadow: 0 6px 14px rgba(92,138,255,0.12);
}
.button-link:hover { transform: translateY(-2px); }

.admin-login { text-align: center; margin-top: 20px; }
.login-form { margin-top: 10px; display: inline-block; text-align: left; max-width: 360px; width: 100%; }
.login-form label { display:block; margin-bottom:6px; }
.login-form input { width:100%; padding:10px; margin-bottom:10px; border-radius:4px; border:1px solid #333; }

/* Buttons default style (works with dark_theme.css overrides) */
button { padding: 10px 12px; border-radius: 4px; border: none; cursor: pointer; }

/* Responsive: compact card layout on small screens (smaller icons) */
@media (max-width: 600px) {
	/* Keep service list readable while reducing image footprint */
	.service { flex-direction: row; align-items: center; gap: 12px; }
	.service img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; flex: 0 0 80px; margin-right: 10px; }
	.service:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.5); }
	.service .info { min-width: 0; }
	.service h2 { margin: 0 0 4px 0; font-size: 1rem; }
	.service p { margin: 4px 0; }
	/* Keep the header locked to single row on mobile and keep top-bar content compact */
	.site-header .header-inner { padding: 0 10px; }
	.site-title { font-size: 0.95rem; }
	.top-bar { flex-direction: column; align-items: stretch; gap: 8px; }
	.top-bar .center { order: 0; text-align: left; }
	.top-bar .left, .top-bar .right { justify-content: flex-start; }
	.header-actions { gap: 2px; }
	.header-icon-btn { width: 32px; height: 32px; }
	.header-icon-btn svg { width: 18px; height: 18px; }
	.header-profile-img { width: 28px; height: 28px; }
	.container { padding: 12px; }
	.login-form { width: 100%; }
}

/* Newsletter input inline styling helper */
#newsletter-email { max-width: 220px; display: inline-block; }
#newsletter-sub-btn { margin-left: 6px; }

/* Slight spacing for status text */
.service-status { font-weight: 700; }
.service-status.is-online { color: green; }
.service-status.is-offline { color: red; }
.service-status.is-checking { color: #9aa3b2; }

/* Grid view for services: keeps descriptions readable by using min column width */
#services-list.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 16px;
	align-items: start;
}
#services-list.grid .service {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-height: 160px;
}
#services-list.grid .service img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	flex: none;
	border-radius: 8px;
}
#services-list.grid .service .info {
	padding-top: 10px;
}
#services-list.grid .service h2 { font-size: 1.05rem; }
#services-list.grid .service p { margin: 6px 0; }

/* In grid view center-align the Visit button and make it slightly wider */
#services-list.grid .service .button-link {
	display: block;
	width: 70%;
	max-width: 320px;
	margin: 12px auto 0;
	text-align: center;
	padding: 10px 16px; /* slightly larger tappable area */
}

/* Small screens: fall back to single column grid */
@media (max-width: 480px) {
	#services-list.grid { grid-template-columns: 1fr; }
	#services-list.grid .service img { height: 120px; }
}

/* Mobile: removed zoom/scale hack that caused horizontal overflow */
