@charset "UTF-8";

@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
	--soft-orange: hsl(35, 77%, 62%);
	--soft-red: hsl(5, 85%, 63%);

	--off-white: hsl(36, 100%, 99%);
	--grayish-blue: hsl(233, 8%, 79%);
	--dark-grayish-blue: hsl(236, 13%, 42%);
	--very-dark-blue: hsl(240, 100%, 5%);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	padding: 0px 20px;
}

body {
	margin: auto;
	max-width: 1000px;
	padding: 50px 0px 0px;
	width: 100%;
	min-height: 100vh;

	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	gap: 16px;

	font-family: "Inter", Arial, Helvetica, sans-serif;
	background-color: var(--off-white);
}

a {
	color: inherit;
	text-decoration: none;
	transition: all 0.15s ease-in-out;

	&:hover {
		color: var(--soft-red);
	}
}

.hidden {
	display: none !important;
}

header {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.9em;
	color: var(--dark-grayish-blue);

	ul {
		list-style: none;

		display: flex;
		gap: 24px;
	}
}

main {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: auto 1fr;
	gap: 20px;

	p {
		color: var(--dark-grayish-blue);
		line-height: 22px;
	}

	section {
		grid-column: 1 / 3;
		grid-row: 1 / 2;

		display: flex;
		flex-direction: column;
		gap: 20px;

		img {
			height: 260px;
			width: 100%;
			object-fit: cover;
			width: 100%;
		}

		#section-wrapper {
			width: 100%;
			display: flex;
			justify-content: space-between;
			gap: 16px;

			h1 {
				color: var(--very-dark-blue);
				font-size: 3.1em;
				line-height: 45px;
				width: 50%;
			}

			div {
				width: 50%;
				display: flex;
				flex-direction: column;
				gap: 16px;
				align-items: flex-start;

				p {
					font-size: 0.9em;
				}

				a {
					letter-spacing: 2px;
					color: var(--very-dark-blue);
					font-weight: bold;
					padding: 10px 20px;
					margin-top: auto;
					background-color: var(--soft-red);
					text-transform: uppercase;
					font-size: 0.8em;

					&:hover {
						color: var(--off-white);
						background-color: var(--very-dark-blue);
					}
				}
			}
		}
	}

	aside {
		padding: 24px 20px;
		color: var(--off-white);
		background-color: var(--very-dark-blue);
		grid-column: 3 / 4;
		grid-row: 1 / 2;

		display: flex;
		flex-direction: column;
		gap: 12px;

		h2 {
			font-size: 2em;
			color: var(--soft-orange);
		}

		a {
			&:hover {
				color: var(--soft-orange);
			}
		}

		.card-news {
			padding: 12px 0px 24px;
			display: flex;
			flex-direction: column;
			gap: 8px;

			h3 {
				font-size: 1em;
			}

			p {
				color: var(--grayish-blue);
				font-size: 0.9em;
			}

			&:not(:last-of-type) {
				border-bottom: 1px solid var(--dark-grayish-blue);
			}

			&:last-of-type {
				padding-bottom: 0;
			}
		}
	}

	#container-cards {
		grid-column: 1 / -1;
		width: 100%;
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(267px, 1fr));
		grid-template-rows: 1fr;
		gap: 20px;
		margin-top: 24px;
		justify-items: start;

		.card {
			display: flex;
			justify-content: center;
			align-items: center;
			gap: 16px;

			img {
				height: 100%;
				object-fit: cover;
			}

			h4 {
				font-size: 0.95em;
				color: var(--very-dark-blue);
			}

			a {
				&:hover {
					color: var(--soft-red);
				}
			}

			.card-text {
				display: flex;
				flex-direction: column;
				align-items: flex-start;
				justify-content: flex-end;
				gap: 8px;

				p {
					font-size: 0.84em;
				}
			}

			span {
				color: var(--soft-red);
				font-size: 1.65em;
				font-weight: 600;
			}
		}
	}
}

footer {
	font-size: 0.9em;
	margin-top: 50px;
	width: 100%;
	background-color: var(--very-dark-blue);
	color: var(--off-white);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 5px;

	a {
		font-weight: 600;
		color: var(--soft-red);
		position: relative;
		z-index: 0;
		transition: all 0.2s ease-in-out;

		&::before {
			content: "";
			position: absolute;
			transition: all 0.15s ease-in-out;
			background-color: var(--off-white);
			height: 100%;
			width: 0%;
			bottom: 0;
			left: -2px;
			z-index: -1;
		}

		&:hover {
			color: var(--very-dark-blue);

			&::before {
				width: calc(100% + 5px);
			}
		}
	}
}
