:root {
	--main-first-color: hsl(220, 85%, 43%);
}

.test {
	height: 200px;
	background-color: antiquewhite;
	margin: 40px 0;
}

.test:last-child {
	margin-bottom: 0;
}

* {
	margin: 0;
}

body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	max-width: 1240px;
	margin: 0 auto;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

p {
	font-size: 16px;
	line-height: 1.7;
}

a {
	text-decoration: none;
	color: var(--main-first-color);
}

nav {
	display: flex;
	position: sticky;
	top: 0;
	padding: 0 clamp(12px, -21.333px + 8.333vw, 62px);
	background-color: hsl(0, 0%, 100%);
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.05);
	z-index: 1;
}

nav a,
nav .dropdown-text {
	color: hsl(0, 0%, 0%);
}

#logo img {
	vertical-align: middle;
	margin: 14px 20px 14px 0;
	width: 32px;
	height: 32px;
}

.dropdown {
	position: relative;
	cursor: default;
}

nav > a:hover,
.dropdown:hover > .dropdown-text {
	color: var(--main-first-color);
}

.dropdown:hover > .dropdown-text::after {
	filter: brightness(0) saturate(100%) invert(31%) sepia(97%) saturate(1389%) hue-rotate(196deg) brightness(82%) contrast(95%);
}

nav > a:not(#logo),
.dropdown-text {
	display: inline-flex;
	height: 100%;
	align-items: center;
	font-size: 16px;
	padding: 0 15px 0 15px;
}

nav > a:not(#logo) {
	height: initial;
}

.dropdown-text::after {
	position: relative;
	top: -1px;
	content: "";
	background-image: url(/images/caret-down.svg);
	width: 18px;
	height: 18px;
	margin-left: 5px;
}

.dropdown-content {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	left: 0;
	bottom: 0;
	transform: translateY(100%);
	background-color: hsl(0, 0%, 100%);
	box-shadow: 0 3px 5px hsla(0, 0%, 0%, 0.25);
	transition: 0.15s 0.1s ease-in;
}

.dropdown:hover > .dropdown-content {
	visibility: visible;
	opacity: 1;
	transition: 0.15s 0.1s ease-out;
}

.dropdown-content a {
	display: inline-block;
	box-sizing: border-box;
	width: 100%;
	padding: 15px;
	white-space: nowrap;
	color: hsl(0, 0%, 0%);
}

#lang {
	display: flex;
	flex-grow: 1;
	justify-content: end;
}

#lang .dropdown-content {
	margin-left: -5px;
}

#content {
	display: flex;
	gap: 45px;
	margin: 40px clamp(12px, -21.333px + 8.333vw, 62px);
}

main {
	width: 75%;
}

#main-header h1 {
	font-size: 30px;
	margin-bottom: 20px;
}

.program-table {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(370px, 100%), 1fr));
	gap: 40px;
	margin: 30px 0 45px;
}

.program-element {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.program-element img {
	vertical-align: middle;
	width: 72px;
	height: 72px;
}

.program-header a {
	font-size: 21px;
	text-decoration: underline;
}

.program-element p {
	margin-top: 10px;
}

.program-list .program-element {
	margin: 30px 0;
	padding-bottom: 10px;
	border-bottom: 1px solid hsl(0, 0%, 85%);
}

#page-header {
	display: flex;
	gap: 20px;
	margin-bottom: 32px;
}

#page-header img {
	align-self: flex-start;
	width: 72px;
	height: 72px;
	min-width: 72px;
	min-height: 72px;
}

#page-header h1 {
	font-size: 30px;
	margin: 1px 0 9px;
}

#page-header p {
	margin: 0;
}

#program-description {
	margin-bottom: 16px;
}

#table-and-image {
	display: flex;
	justify-content: space-between;
	gap: 25px;
	align-items: flex-start;
	margin: 30px 0;
}

table {
	border-collapse: collapse;
	flex-grow: 1;
	font-size: 14px;
}

table th {
	text-align: left;
}

table th,
table td {
	padding: 12px;
	border-bottom: 1px solid hsla(0, 0%, 75%, 0.50);
}

table th {
	padding-left: 8px;
}

#table-and-image img {
	max-width: 50%;
	height: auto;
}

h2 {
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 15px;
}

a h3 {
	color: var(--main-first-color);
}

ul {
	margin: 20px 0 30px;
}

ul li {
	margin-bottom: 12px;
	line-height: 20px;
}

.download-button {
	display: block;
	width: fit-content;
	padding: 12px 16px;
	color: var(--main-first-color);
	border: 1px solid var(--main-first-color);
	border-radius: 5px;
	margin: 20px 0;
	font-size: 20px;
}

#download-links a {
	display: flex;
	align-items: center;
	max-width: max-content;
	gap: 10px;
	margin-bottom: 20px;
}

#download-links img {
	width: 24px;
	height: 24px;
}

aside {
	width: 25%;
	height: min-content;
}

aside h3 {
	font-size: 22px;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid hsl(0, 0%, 75%);
}

aside .program-element {
	margin-bottom: 12px;
	font-size: 16px;
	padding-bottom: 7px;
	border-bottom: 1px solid hsl(0, 0%, 85%);
}

aside .program-element img {
	width: 35px;
	height: 35px;
	margin-right: 12px;
}

footer {
	text-align: center;
	background-color: var(--main-first-color);
}

footer p {
	margin: 0;
	padding: 20px;
	color: hsl(0, 0%, 100%);
}

.ad {
	margin: 40px 0;
}

.ad:last-child,
.program-table:last-child {
	margin-bottom: 0;
}

@media (hover) {

	a,
	a h3,
	.dropdown .dropdown-text,
	.dropdown-text::after {
		transition: color 0.2s, background-color 0.2s;
	}

	.dropdown-text::after {
		transition: filter 0.1s;
	}

	.dropdown-content a:hover,
	.dropdown-content a#current:hover {
		color: hsl(0, 0%, 100%);
		background-color: var(--main-first-color);
	}

	a h3:hover,
	a:hover {
		color: hsl(220, 90%, 30%);
	}

	.download-button:hover {
		color: hsl(0, 0%, 100%);
		background-color: var(--main-first-color);
	}
}

@media (max-width: 1000px) {

	main,
	aside {
		width: initial;
	}

	#content {
		flex-direction: column;
	}

	#table-and-image {
		flex-direction: column;
		align-items: center;
	}

	table {
		width: min(600px, 100%);
	}

	#table-and-image img {
		max-width: initial;
		width: min(420px, 100%);
	}
}