/* =============================================================================
   Portál drah AŽD - Frontend styles
   ============================================================================= */

:root {
	--color-primary: #1c6fb7;
	--color-primary-dark: #155a96;
	--color-text: #333;
	--color-text-light: #666;
	--color-text-muted: #999;
	--color-white: #fff;
	--color-bg: #f5f7fa;
	--color-border: #e0e5eb;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--transition: 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--color-text);
	background: linear-gradient(to right, #06182f 0, #153359 100%);
	min-height: 100vh;
}

#bodyImg {
	position: fixed;
	inset: 0;
	min-width: 99%;
	min-height: 99%;
	object-fit: cover;
	opacity: 0.05;
	-webkit-mask-image: linear-gradient(to bottom, #000, transparent);
	mask-image: linear-gradient(to bottom, #000, transparent);

	pointer-events: none;
	z-index: -1;
}

/* Container */
.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* =============================================================================
   Header
   ============================================================================= */
.header {
	/*background: rgba(255, 255, 255, 0.95);*/
	backdrop-filter: blur(10px);
	box-shadow: var(--shadow-md);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
	gap: 20px;
}

/* Logo */
.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--color-primary);
	flex-shrink: 0;
}

.logo img {
	height: 40px;
	width: auto;
}

.logo-text {
	font-size: 1.125rem;
	font-weight: 600;
	white-space: nowrap;
}

/* Navigation */
.main-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

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

.nav-item a {
	display: block;
	padding: 8px 16px;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 500;
	border-radius: var(--radius-sm);
	transition: background var(--transition), color var(--transition);
}

.nav-item a:hover {
	background: rgba(28, 111, 183, 0.1);
	color: var(--color-primary);
}

.nav-item.active a {
	background: var(--color-primary);
	color: var(--color-white);
}

/* Header Actions */
.header-actions {
	flex-shrink: 0;
}

.btn-login {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	color: var(--color-white);
	text-decoration: none;
	font-weight: 500;
	border-radius: var(--radius-sm);
	transition: background var(--transition), color var(--transition);
}

.btn-login:hover {
	background: rgba(28, 111, 183, 0.1);
	color: var(--color-primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	padding: 4px;
	background: none;
	border: none;
	cursor: pointer;
}

.mobile-menu-toggle span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--color-text);
	border-radius: 1px;
	transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-toggle.open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================================
   Main Content
   ============================================================================= */
.main-content {
	padding: 40px 0;
	min-height: calc(100vh - 70px - 60px);
}

/* Page Header */
.page-header {
	margin-bottom: 32px;
}

.page-header h1 {
	margin: 0 0 8px;
	font-size: 2rem;
	font-weight: 700;
	color: var(--color-white);
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-header .lead {
	margin: 0;
	font-size: 1.125rem;
	color: rgba(255, 255, 255, 0.85);
}

.page-header .date-window-info {
	margin: 8px 0 0;
	padding: 8px 14px;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.9);
	background: rgba(255, 255, 255, 0.15);
	border-radius: var(--radius-sm);
	display: inline-block;
}

/* Breadcrumb */
.breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 0.875rem;
}

.breadcrumb a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color var(--transition);
}

.breadcrumb a:hover {
	color: var(--color-white);
}

.breadcrumb .separator {
	color: rgba(255, 255, 255, 0.5);
}

.breadcrumb .current {
	color: var(--color-white);
}

/* =============================================================================
   Sections Grid
   ============================================================================= */
.sections-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.section-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 32px 24px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: var(--radius-lg);
	text-decoration: none;
	color: var(--color-text);
	box-shadow: var(--shadow-md);
	transition: transform var(--transition), box-shadow var(--transition);
}

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

.section-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
	background: rgba(28, 111, 183, 0.1);
	border-radius: 50%;
	color: var(--color-primary);
}

.section-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	text-align: center;
}

/* =============================================================================
   Documents List
   ============================================================================= */
.documents-group {
	margin-bottom: 32px;
}

.documents-group:last-child {
	margin-bottom: 0;
}

.documents-group-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 16px;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--color-white);
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-md);
	border-left: 4px solid var(--color-primary);
}

.documents-group-title svg {
	opacity: 0.8;
}

.documents-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.document-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	transition: box-shadow var(--transition);
}

.document-item:hover {
	box-shadow: var(--shadow-md);
}

.document-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: rgba(28, 111, 183, 0.1);
	border-radius: var(--radius-sm);
	color: var(--color-primary);
}

/* Date Badge - kalendářový styl */
.document-date-badge {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--color-white);
	border: 2px solid var(--color-border);
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.document-date-badge .date-day {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--color-text);
}

.document-date-badge .date-month {
	font-size: 0.625rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--color-text-muted);
}

/* Dnešní datum - zelené zvýraznění */
.document-date-badge.today {
	border-color: #28a745;
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.document-date-badge.today .date-day {
	color: #155724;
}

.document-date-badge.today .date-month {
	color: #28a745;
}

/* Zvýraznění celého řádku pro dnešní dokument */
.document-item.is-today {
	box-shadow: 0 0 0 2px #28a745, var(--shadow-sm);
}

.document-info {
	flex: 1;
	min-width: 0;
}

.document-title {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-text);
}

.document-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.875rem;
	color: var(--color-text-muted);
}

.document-filename {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.document-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.document-actions .btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	color: var(--color-text-light);
	text-decoration: none;
	transition: background var(--transition), color var(--transition);
}

.document-actions .btn-view:hover {
	background: rgba(28, 111, 183, 0.1);
	color: var(--color-primary);
}

.document-actions .btn-download:hover {
	background: rgba(40, 167, 69, 0.1);
	color: #28a745;
}

/* Empty State */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 60px 20px;
	text-align: center;
	background: rgba(255, 255, 255, 0.95);
	border-radius: var(--radius-lg);
	color: var(--color-text-muted);
}

.empty-state svg {
	margin-bottom: 16px;
	opacity: 0.5;
}

.empty-state p {
	margin: 0;
	font-size: 1rem;
}

/* =============================================================================
   Footer
   ============================================================================= */
.footer {
	padding: 20px 0;
	background: rgba(0, 0, 0, 0.2);
}

.footer p {
	margin: 0;
	text-align: center;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.7);
}

/* =============================================================================
   Alerts
   ============================================================================= */
.alert {
	padding: 12px 16px;
	margin-bottom: 20px;
	border-radius: var(--radius-sm);
	font-size: 0.9375rem;
}

.alert-success {
	background: #d4edda;
	color: #155724;
}

.alert-warning {
	background: #fff3cd;
	color: #856404;
}

.alert-error {
	background: #f8d7da;
	color: #721c24;
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 768px) {
	.header .container {
		height: 60px;
	}

	.logo-text {
		display: none;
	}

	.main-nav {
		position: fixed;
		top: 60px;
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--color-white);
		padding: 20px;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
	}

	.main-nav.open {
		transform: translateX(0);
	}

	.nav-list {
		flex-direction: column;
		gap: 4px;
	}

	.nav-item a {
		padding: 12px 16px;
	}

	.btn-login span {
		display: none;
	}

	.mobile-menu-toggle {
		display: flex;
	}

	.page-header h1 {
		font-size: 1.5rem;
	}

	.sections-grid {
		grid-template-columns: 1fr;
	}

	.document-item {
		flex-wrap: wrap;
	}

	.document-info {
		flex-basis: calc(100% - 64px);
	}

	.document-actions {
		flex-basis: 100%;
		justify-content: flex-end;
		margin-top: 8px;
		padding-top: 12px;
		border-top: 1px solid var(--color-border);
	}
}
