@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600;700&display=swap');

:root {
	--white: hsl(0, 0%, 100%);
	--pink: hsl(275, 100%, 97%);
	--greyishPurple: hsl(292, 16%, 49%);
	--darkPurple: hsl(292, 42%, 14%);
	--boxshadow: hsla(292, 16%, 49%, 0.2);
}

* {
	box-sizing: border-box;
}

body::before {
	content: '';
	background-image: url(./public/background-pattern-desktop.svg);
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	height: 33%;
	width: 100%;
	position: absolute;
	top: 0;
}

body {
	background-color: var(--pink);
	font-family: 'Work Sans', 'sans-serif';
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	overflow-x: hidden;
	margin: 0;
	padding: 0 1.5rem;
}

.container {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.card {
	display: flex;
	flex-direction: column;
	color: var(--darkPurple);
	width: 600px;
	height: fit-content;
	background-color: var(--white);
	text-align: left;
	border-radius: 15px;
	box-shadow: var(--boxshadow) 0px 10px 24px;
	padding: 2.5rem;
	z-index: 0;
	margin: 5rem 0;
}

.card > .block:nth-last-child(n + 2) {
	border-bottom: 1px solid var(--pink);
}

h1 {
	margin: 0;
	color: var(--darkPurple);
	font-size: 3.5rem;
}

h2 {
	margin: 0;
	color: var(--darkPurple);
	font-size: 1.12rem;
}

p {
	margin: 1rem 0;
	color: var(--greyishPurple);
	font-size: 1rem;
	line-height: 1.5rem;
}

.header {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin: 0 0 1.3rem 0;
}

.header img {
	margin-right: 1.2rem;
}

.block:last-child > .question {
	margin-bottom: 0;
}

.question {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	margin: 1.4rem 0;
}

.question.clicked {
	margin: 1.4rem 0 0 0;
}

.question img {
	border: none;
	background-color: transparent;
	cursor: pointer;
}

.hidden {
	display: none;
}

footer {
	flex-shrink: 0;
	height: fit-content;
	padding: 0.5rem;
	text-align: center;
	color: var(--white);
	font-size: 0.8rem;
	border-top: 5px;
	background-color: var(--greyishPurple);
	width: 100vw;
}

footer a {
	text-decoration: none;
	color: var(--pink);
}

footer a:hover {
	color: var(--greyishPurple);
}

@media(max-width: 635px) {
	body::before {
		background-image: url(./public/background-pattern-mobile.svg);
	}

	body {
		padding: 0 1.5rem 0 1.5rem;
	}

	.card {
		width: 100%;
		padding: 1.5rem; 
	}

	.header {
		margin: 0;
	}

	.header img {
		width: 25px;
		height: 25px;
	}

	h1 {
		font-size: 2rem;
	}

	h2 {
		font-size: 1rem;
	}

	p {
		font-size: 0.83rem;
		line-height: 1.2rem;
	}

	.question {
		margin: 1rem 0;
	}
	
	.question.clicked {
		margin: 1.4rem 0 0 0;
	}
}