:root {
	--primary-color: #ff9100;
	--primary-dark: #e68200;
	--bg-primary: #ffffff;
	--bg-secondary: #f8f9fa;
	--text-primary: #1a1a1a;
	--text-secondary: #666666;
	--border-color: #e0e0e0;
	--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	--card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
	:not(.light-mode) :root {
		--bg-primary: #1a1a1a;
		--bg-secondary: #2d2d2d;
		--text-primary: #ffffff;
		--text-secondary: #b0b0b0;
		--border-color: #404040;
		--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
		--card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.5);
	}
}

html.dark-mode {
	--bg-primary: #1a1a1a;
	--bg-secondary: #2d2d2d;
	--text-primary: #ffffff;
	--text-secondary: #b0b0b0;
	--border-color: #404040;
	--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	--card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.5);
}

html.light-mode {
	--bg-primary: #ffffff;
	--bg-secondary: #f8f9fa;
	--text-primary: #1a1a1a;
	--text-secondary: #666666;
	--border-color: #e0e0e0;
	--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	--card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
	font-size: 16px;
	color: var(--text-primary);
	background-color: var(--bg-primary);
	text-align: justify;
	transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
	color: var(--text-primary);
}

a {
	transition: color 0.2s ease;
}

.navigation-bar {
	background-color: var(--bg-secondary);
	position: fixed;
	width: 100%;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid var(--border-color);
	box-shadow: var(--card-shadow);
	display: flex;
	flex-wrap: wrap;
	padding: 0 1rem;
}

.navigation-bar a {
	display: block;
	color: var(--text-primary);
	text-align: center;
	padding: 1rem 1.5rem;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	border-bottom: 3px solid transparent;
	transition: all 0.3s ease;
}

.navigation-bar a:hover {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
	transform: none;
}

.hamburger-menu {
	display: none;
	background: none;
	border: none;
	color: var(--text-primary);
	font-size: 1.5rem;
	cursor: pointer;
	padding: 1rem;
	transition: all 0.3s ease;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0.4rem;
}

.hamburger-menu span {
	display: block;
	width: 25px;
	height: 3px;
	background-color: var(--text-primary);
	border-radius: 3px;
	transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
	transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
	opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 0;
	flex: 1;
}

.nav-menu a {
	display: block;
	color: var(--text-primary);
	text-align: center;
	padding: 1rem 1.5rem;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	border-bottom: 3px solid transparent;
	transition: all 0.3s ease;
}

.nav-menu a:hover {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
	transform: none;
}

.theme-toggle {
	background: none;
	border: none;
	color: var(--text-primary);
	font-size: 1.2rem;
	cursor: pointer;
	padding: 1rem 1.5rem;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
}

.theme-toggle:hover {
	color: var(--primary-color);
	transform: scale(1.1);
}

.theme-toggle i {
	transition: all 0.3s ease;
}

.banner {
	display: flex;
	flex-direction: column;
	text-align: center;
	padding: 0 2rem;
	width: 100%;
	background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
	background-attachment: fixed;
	background-image: url("../img/MAX_80-1.png");
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.banner-content {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 900px;
	margin: 0 auto;
}

.calcium-title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	text-align: center;
	color: #ffffff;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.calcium-subtitle {
	text-align: center;
	font-size: clamp(1.1rem, 3vw, 1.5rem);
	font-weight: 600;
	margin: 0;
	color: #ffffff;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.calcium-subtitle.authors {
	font-weight: 400;
	font-size: clamp(0.9rem, 2vw, 1rem);
	margin-top: 1rem;
}

.calcium-subtitle.contact {
	font-weight: 400;
	font-size: clamp(0.9rem, 2vw, 1rem);
	margin-top: 0.5rem;
}

.main-container {
	width: 100%;
	padding: 3rem 1.5rem;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	text-align: left;
	max-width: 1200px;
	margin: 0 auto;
}

.footer {
	width: 100%;
	padding: 4rem 1.5rem;
	background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
	color: var(--text-primary);
	text-align: center;
	border-top: 2px solid var(--primary-color);
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
	margin-top: 3rem;
}

html.dark-mode .footer {
	background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
}

.anchor {
	margin-top: 3rem;
	scroll-margin-top: 80px;
}

.anchor h1 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	margin-top: 0;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 3px solid var(--primary-color);
	display: inline-block;
}

.anchor p {
	color: var(--text-secondary);
	line-height: 1.6;
	font-size: 1.05rem;
}

.anchor a {
	color: var(--primary-color);
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.anchor a:hover {
	opacity: 0.8;
	transform: scale(1.05);
}

.aligned-row {
	display: flex;
	width: 100%;
	flex-direction: row;
	align-items: center;
	justify-content: space-evenly;
	flex-wrap: wrap;
	gap: 2rem;
	margin-top: 2rem;
}

.logo {
	max-width: 200px;
	flex: 1 1 150px;
	min-width: 120px;
}

.logo img {
	width: 100%;
	height: auto;
	display: block;
}

.model {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	text-align: center;
	max-width: 300px;
	padding: 1.5rem;
	background-color: var(--bg-secondary);
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	color: inherit;
}

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

.model img {
	border: 2px solid var(--border-color);
	border-radius: 8px;
	max-height: 180px;
	width: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.model:hover img {
	transform: scale(1.02);
}

.dataset-row {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	gap: 2rem;
	padding-top: 1rem;
	flex-wrap: wrap;
}

.dataset-row a {
	color: inherit;
	text-decoration: none;
	flex: 1 1 280px;
	min-width: 250px;
	max-width: 350px;
}

.dataset {
	display: flex;
	flex-direction: column;
	position: relative;
	background-color: var(--bg-secondary);
	border-radius: 12px;
	border: 1px solid var(--border-color);
	transition: all 0.3s ease;
	height: 100%;
	overflow: hidden;
	min-height: 250px;
}

.dataset-row a:hover .dataset {
	transform: translateY(-6px);
	box-shadow: var(--card-shadow-hover);
	border-color: var(--primary-color);
}

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

.dataset-row a:hover .dataset img {
	transform: scale(1.05);
}

.dataset > div:first-child {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-weight: 700;
	font-size: 1.2rem;
	text-align: center;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
	width: 90%;
	z-index: 10;
}

.aligned-row a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
}

.aligned-row a:hover {
	opacity: 0.8;
	transform: scale(1.05);
	transition: color 0.2s ease;
}

.aligned-row a:hover {
	color: var(--primary-dark);
}

.valeria {
	text-align: center;
	color: var(--text-primary);
	background-color: var(--bg-secondary);
	padding: 1.5rem;
	border-top: 1px solid var(--border-color);
	font-size: 0.95rem;
}

.valeria a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.valeria a:hover {
	color: var(--primary-dark);
}

/* Table styling */
table {
	width: 100%;
	border-collapse: collapse;
	background-color: var(--bg-secondary);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--card-shadow);
	margin: 2rem 0;
}

thead {
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
	color: white;
	font-weight: 600;
}

th, td {
	padding: 1rem 1.5rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
}

tbody tr {
	transition: background-color 0.2s ease;
}

tbody tr:hover {
	background-color: var(--primary-color);
	color: white;
}

tbody tr:hover .download-icon {
	color: white;
}

/* Download icon */
.download-icon {
	font-size: 1.2rem;
	color: var(--text-secondary);
	cursor: pointer;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	text-decoration: none;
}

.download-icon:hover {
	color: var(--primary-color);
	transform: scale(1.1);
}

tbody tr:hover .download-icon:hover {
	color: white;
}

td:last-child {
	text-align: center;
}

/* Pagination buttons */
.pagination {
	text-align: center;
	margin-top: 2rem;
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
}

.pagination button {
	background-color: var(--primary-color);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
	background-color: var(--primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--card-shadow-hover);
}

.pagination button:disabled {
	background-color: var(--border-color);
	color: var(--text-secondary);
	cursor: not-allowed;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
	.main-container {
		padding: 2rem 1rem;
	}

	.aligned-row {
		gap: 1.5rem;
	}

	.model, .dataset {
		max-width: 100%;
	}

	th, td {
		padding: 0.75rem 1rem;
		font-size: 0.95rem;
	}
}

@media screen and (max-width: 768px) {
	.hamburger-menu {
		display: flex;
	}

	.nav-menu {
		position: absolute;
		top: 50px;
		left: 0;
		right: 0;
		width: 100%;
		background-color: var(--bg-secondary);
		flex-direction: column;
		align-items: stretch;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
	}

	.nav-menu.active {
		max-height: 300px;
	}

	.nav-menu a {
		padding: 1rem;
		border-bottom: 1px solid var(--border-color);
		border-right: none;
		text-align: left;
	}

	.nav-menu a:last-of-type {
		border-bottom: none;
	}

	.navigation-bar {
		padding: 0;
		flex-wrap: nowrap;
	}

	.navigation-bar a {
		padding: 0.75rem 1rem;
		font-size: 0.9rem;
	}

	.banner {
		padding: 0 1rem;
		background-size: cover;
	}

	.calcium-title {
		font-size: 1.8rem;
	}

	.calcium-subtitle {
		font-size: 1.1rem;
	}

	.main-container {
		padding: 1.5rem 1rem;
	}

	.aligned-row {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
		width: 100%;
	}

	.logo {
		max-width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.model {
		max-width: 100%;
	}

	.dataset-row {
		flex-direction: column;
		gap: 1rem;
	}

	.dataset-row a {
		max-width: 100%;
	}

	table {
		font-size: 0.9rem;
	}

	th, td {
		padding: 0.75rem 0.5rem;
	}

	.download-icon {
		font-size: 1rem;
	}

	.pagination button {
		padding: 0.6rem 1rem;
		font-size: 0.9rem;
	}

	.anchor h1 {
		font-size: 1.5rem;
	}

	.footer {
		padding: 2rem 1rem;
	}
}

@media screen and (max-width: 480px) {
	.hamburger-menu {
		padding: 0.75rem;
	}

	.hamburger-menu span {
		width: 20px;
		height: 2.5px;
	}

	.nav-menu {
		top: 50px;
	}

	.nav-menu.active {
		max-height: 250px;
	}

	.nav-menu a {
		padding: 0.75rem;
		font-size: 0.9rem;
	}

	.theme-toggle {
		padding: 0.75rem 1rem;
		font-size: 1.1rem;
	}

	.banner {
		padding: 0 1rem;
		min-height: 100vh;
		background-size: cover;
	}

	.calcium-title {
		font-size: 1.4rem;
	}

	.calcium-subtitle {
		font-size: 0.95rem;
	}

	.anchor h1 {
		font-size: 1.3rem;
	}

	.anchor p {
		font-size: 0.95rem;
	}

	table {
		font-size: 0.85rem;
	}

	th, td {
		padding: 0.5rem;
	}

	.pagination {
		gap: 0.25rem;
	}

	.pagination button {
		padding: 0.5rem 0.75rem;
		font-size: 0.8rem;
	}
}
