/* General styling for the page */

* {
	box-sizing: border-box;
	font-family: "Raleway", sans-serif;
	padding: 0;
	margin: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: auto;
	max-width: 1400px;
	padding: 0 30px;
}

a {
	text-decoration: none;
	color: black;
}

h1 {
	font-size: 1.4em;
	margin: 10px 0;
}

h2 {
	font-size: 1.4em;
	font-weight: 700;
}

h3 {
	font-size: 1em;
}

/* Header with nav on the right */

header {
	display: flex;
	justify-content: space-between;
}

header img {
	width: 61px;
	margin: 20px 0;
	object-fit: contain;
}

nav {
	display: flex;
}

/* Nav links with color and border transition on hover */
nav a {
	display: block;
	font-weight: 500;
	padding: 40px 20px;
	border-top: 2px solid white;
	transition: border-color 0.3s, color 0.3s;
}

nav a:hover {
	color: #0065fc;
	border-top: 2px solid #0065fc;
}

/* Search form with label for input and search button */

form {
	display: flex;
	height: 50px;
	margin: 20px 0 40px 0;
}

label {
	background-color: #f2f2f2;
	border-radius: 15px 0 0 15px;
	padding: 16px 18px;
	font-size: 1.2em;
}

input,
form button {
	font-size: 1.2em;
	font-weight: 700;
}

input {
	border-top: 1px solid #f2f2f2;
	border-bottom: 1px solid #f2f2f2;
	border-right: 0;
	border-left: 0;
	padding-left: 17px;
}

/* Disabled outline on focus to match design model */
input:focus {
	outline: none;
}

form button {
	border: 0;
	background-color: #0065fc;
	color: white;
	border-radius: 0 15px 15px 0;
	padding: 14px 16px;
	cursor: pointer;
}

/* Hide search icon on desktop and tablet */
#search-icon {
	display: none;
}

/* Filters section with title and div containing all filters */

#filters-section {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 35px 0;
	max-width: 950px;
	gap: 20px;
}

#filters-section h2 {
	font-size: 1.2em;
	font-weight: 700;
}

/* Div containing all individual filters */
.filters {
	display: flex;
	justify-content: space-around;
	align-items: center;
	width: 100%;
}

/* Filter with background color transition on hover */
.filter {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.1em;
	font-weight: 700;
	border: 2px solid #d9d9d9;
	border-radius: 30px;
	padding: 14px 20px;
	background-color: white;
	cursor: pointer;
	transition: background-color 0.3s;
}

.filter:hover {
	background-color: #deebff;
}

.filter i {
	color: #0065fc;
}

#info {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 35px 0;
}

#info i {
	color: #0065fc;
	font-size: 0.7em;
	border: 1px solid #d9d9d9;
	border-radius: 20px;
	width: 24px;
	height: 24px;
	padding: 5px 9px;
}

/* General card design with shadow transition on hover */

.card {
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	border-radius: 20px;
	background-color: white;
	padding: 5px;
	transition: box-shadow 0.3s;
}

.card:hover {
	box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.3);
}

.card-description {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.card p {
	font-size: 0.9em;
}

.card i {
	font-size: 0.8em;
}

.euro {
	font-weight: 600;
}

.reached {
	color: #0065fc;
}

.unreached {
	color: #f2f2f2;
}

/* Card in the main hostings article */

.main {
	width: 31%;
	height: 210px;
	display: flex;
	flex-direction: column;
}

.main img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 15px 15px 0 0;
}

.main .card-description {
	padding: 8px 10px 5px 10px;
	height: 40%;
}

/* Card in the trending hostings article */

.trending {
	width: 100%;
	height: 31%;
	display: flex;
}

.trending img {
	width: 40%;
	height: 100%;
	object-fit: cover;
	border-radius: 15px 0 0 15px;
}

.trending .card-description {
	width: 60%;
	padding: 10px 5px 10px 15px;
}

.card-title p {
	margin-top: 5px;
}

/* General hostings div and containers for main and trending cards */

#hostings {
	display: flex;
	justify-content: space-between;
	margin: 35px 0;
}

.hostings-main,
.hostings-trending {
	height: 620px;
	background-color: #f2f2f2;
	border-radius: 20px;
	padding: 40px 40px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.hostings-main {
	width: 66%;
}

.hostings-trending {
	width: 32%;
}

#show-more {
	font-size: 1.2em;
	font-weight: 700;
}

.trending-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	margin-bottom: 20px;
}

.trending-title i {
	color: #0065fc;
	font-size: 1.2em;
}

.main-cards {
	display: flex;
	justify-content: space-between;
	row-gap: 25px;
	flex-wrap: wrap;
}

.trending-cards {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 90%;
}

/* Activities section */

#activities {
	margin: 60px 0;
}

#activities h2 {
	margin-bottom: 20px;
}

.activities-cards {
	display: flex;
	justify-content: space-between;
}

.activity {
	width: 23%;
	height: 450px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 0;
}

.activity img {
	width: 100%;
	height: 88%;
	object-fit: cover;
	border-radius: 20px 20px 0 0;
}

.activity h3 {
	display: flex;
	align-items: center;
	height: 12%;
	padding: 0 20px;
}

/* Footer with lists of links */

footer {
	display: flex;
	background-color: #f2f2f2;
	justify-content: flex-start;
	padding: 45px 70px;
}

footer section {
	width: 34%;
}

footer li {
	list-style: none;
	margin-bottom: 12px;
}

footer h3 {
	margin-bottom: 20px;
}

footer a:hover {
	text-decoration: underline;
}

/* Media query for tablet */
@media screen and (min-width: 768px) and (max-width: 992px) {
	#filters-section {
		gap: 10px;
		max-width: 820px;
	}

	/* Reduced filter size to better fit tablet screen */
	.filter {
		font-size: 1em;
		padding: 10px 12px;
		gap: 8px;
	}

	#hostings {
		flex-direction: column;
		gap: 50px;
	}

	.hostings-main {
		width: 100%;
	}

	.hostings-trending {
		width: 100%;
		height: 290px;
	}

	.trending-cards {
		flex-direction: row;
		height: auto;
	}

	.trending {
		width: 31%;
		height: 150px;
	}

	.trending .card-description {
		padding: 5px 5px 8px 10px;
	}

	.activity {
		width: 22%;
		height: 270px;
	}

	.activity img {
		height: 80%;
	}

	.activity h3 {
		height: 20%;
		padding: 0 15px 0 20px;
	}

	footer {
		padding: 45px 0 45px 70px;
	}
}

/* Media query for mobile */
@media screen and (max-width: 767px) {
	/* Removed left and right padding so content uses all width */
	body {
		padding: 0;
	}

	header {
		flex-direction: column;
		align-items: center;
	}

	nav {
		width: 100%;
	}

	/* Switched border top to bottom and default color to light grey */
	nav a {
		width: 50%;
		text-align: center;
		padding: 20px 0;
		border-top: 0;
		border-bottom: 3px solid #f2f2f2;
	}

	nav a:hover {
		color: #0065fc;
		border-top: 0;
		border-bottom: 3px solid #0065fc;
	}

	#intro {
		margin: 25px 20px;
	}

	form {
		width: 100%;
		margin: 35px 0;
		padding: 0 20px;
	}

	input {
		width: 90%;
	}

	/* Hide search text to display icon */
	#search-text {
		display: none;
	}

	#search-icon {
		display: block;
	}

	#filters-section {
		flex-direction: column;
		align-items: flex-start;
		padding: 0 20px;
	}

	.filters {
		flex-wrap: wrap;
		justify-content: space-between;
		row-gap: 15px;
	}

	.filter {
		width: 48%;
		height: 40px;
		font-size: 0.7em;
		padding: 12px 9px;
		gap: 5px;
	}

	.filter i {
		font-size: 1.2em;
	}

	#info {
		padding: 0 20px;
	}

	#info i {
		font-size: 0.8em;
	}

	/* Reverse column to show trending before main */
	#hostings {
		flex-direction: column-reverse;
	}

	.hostings-main,
	.hostings-trending {
		width: 100%;
		border-radius: 0;
		padding: 30px 20px;
	}

	.hostings-main {
		height: auto;
		background-color: white;
		gap: 20px;
		padding-bottom: 0;
	}

	/* Added max width to cards to prevent too long cards on large phone screen */
	.card {
		max-width: 450px;
		align-self: center;
	}

	.main-cards {
		flex-direction: column;
		gap: 20px;
	}

	.main {
		width: 100%;
	}

	#activities {
		padding: 0 20px;
	}

	.activities-cards {
		flex-direction: column;
		gap: 25px;
	}

	.activity {
		width: 100%;
		height: 200px;
	}

	.activity img {
		height: 75%;
	}

	.activity h3 {
		height: 25%;
	}

	footer {
		flex-direction: column;
		gap: 40px;
		padding: 45px 30px;
	}

	footer section {
		width: 100%;
	}
}
