@import "./fonts/index.fonts.css";

main.content {

    .tags,
    .categories {
	width: 100%;
	text-transform: uppercase;
	font-size: 1.1rem;
	display: flex;
	font-weight: 600;
	letter-spacing: 0.1rem;
	flex-wrap: wrap;
	justify-content: space-between;
	user-select: none;

	.tag,
	.category {
	    flex: 0 0 auto;
	    min-width: 25%;
	    text-align: center;

	    input {
		display: none;
	    }

	    input:checked + span {
		text-decoration: underline;
	    }

	    span {
		cursor: pointer;

		&:hover {
		    opacity: 0.8;
		}
	    }
	}

	.section.clear {
	    width: 100%;
	    display: flex;
	    justify-content: flex-end;
	    margin: 0.5em 0;

	    .button.clear {
		min-width: 25%;
		text-align: center;
	    }

	    input {
		display: none;
	    }

	    input:checked + span {
		text-decoration: underline;
	    }
	}
    }

    .separator {
	margin: 1em 0;
	display: flex;
	width: 100%;
	user-select: none;

	.line {
	    border: solid 1px var(--dark-main-color);
	    flex: 1 1 auto;
	    margin: 1rem 0;
	    opacity: 0.8;
	}

	.text {
	    flex: none;
	    margin: auto 1em;
	    font-weight: 200;
	}
    }

    .posts {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	width: 100%;

	.card {
	    flex: 0 0 auto;
	    width: 30%;
	    max-height: 400px;
	    margin: 20px 0;
	    
	    &.first {
		width: 49%;
	    }

	    &:hover {
		.title {
		    background-position: -100%;
		}

		img {
		    scale: 1.1;
		}
	    }

	    .category {
		text-transform: uppercase;
		margin-top: 1.25rem;
		font-weight: 600;
		font-size: 0.95rem;
		letter-spacing: 0.1em;
	    }

	    .title {
		font-family: "Gunken", serif;
		font-size: 1.3rem;
		margin-top: 0.5rem;
		width: fit-content;
		background-position: 0%;
		background-size: 200%;
		background-image: linear-gradient(to right, var(--light-main-color) 50%, transparent 50%), 
		    linear-gradient(var(--title-highlight-color) 0%, var(--title-highlight-color) 100%);
		transition: background-position 0.5s;
	    }

	    .image {
		width: 100%;
		height: 70%;
		border-radius: 15px;
		overflow: hidden;
		
		img{
		    width: 100%;
		    height: 100%;
		    object-fit: cover;
		    transition: scale 0.5s;
		}
	    }

	    .info {
		margin-top: 0.5rem;
		font-size: 1rem;
		letter-spacing: -0.1em;

		.date {
		    i.nf {
			margin-right: 0.5rem;
		    }
		}

		.read-time {
		    margin-left: 0.5rem;
		}
	    }
	}
    }
}

@media screen and (max-width: 1000px) {
    main.content {
	padding: 0 4vw;

	.logo {
	    margin: 2vw 0;

	    .image.container {
		height: 9vw;
	    }
	}
	.separator {
	    margin: 1.4vw 0;

	    .text {
		font-size: 2.8vw;
	    }
	}

	.posts {
	    margin: 2vw 0;

	    .card {
		.category {
		    font-size: 1.5vw;
		}

		.title {
		    font-size: 2vw;
		}

		.info {
		    font-size: 1.6vw;
		}
	    }
	}

	.more {
	    font-size: 1.9vw;
	}
    }
}

@media screen and (max-width: 780px) {
    main.content {

	.logo {

	    .image.container {
	    }
	}

	.separator {

	    .text {
		font-size: 1.5em;
	    }
	}

	.tags,
	.categories {
	    .tag,
	    .category {
		margin: 0 10px;
	    }
	}

	.posts {
	    flex-direction: column;
	    max-height: none;
	    margin: 0;

	    .card {
		flex: 1 1 0;
		width: 100%;
		min-height: 350px;
		max-height: 350px;
		margin: 0;

		.image {
		    img {
			height: calc(350px * 0.7);
		    }
		}

		.category {
		    font-size: 1em;
		    margin-top: 0.5em;
		}

		.title {
		    font-size: 1.4em;
		}

		.info {
		    font-size: 1em;
		}

		&.first {
		    width: 100%;
		}
	    }
	}

	.more {
	    font-size: 1.4em;
	}
    }
}
