/**
 * @file  plugins/themes/default/styles/pages/indexJournal.less
 *
 * Copyright (c) 2014-2021 Simon Fraser University
 * Copyright (c) 2003-2021 John Willinsky
 * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
 *
 * @brief Styles applying to the front page of the journal
 * @link templates/frontend/pages/indexJournal.tpl
 */
.pkp_page_index {

	.homepage_image,
	.additional_content {
		margin-left: -@base;
		margin-right: -@base;

		@media (min-width: @screen-phone) {
			margin-left: -@double;
			margin-right: -@double;
		}

		@media (min-width: @screen-desktop) {
			margin-left: -@triple;
			margin-right: -@triple;
		}
	}

	.homepage_image {

		img {
			display: block;
			width: 100%;
			height: auto;
		}

		@media (min-width: @screen-desktop) {
			margin-top: -@triple; // flush with top nav
		}
	}

	.homepage_about {
		padding-top: @triple;
		padding-bottom: @triple;

		h2 {
			margin-top: -@base
		}
	}

	.cmp_announcements {
		.pkp_helpers_clear();
		border-top: @bg-border;
		border-bottom: @bg-border;

		h2 {
			&:extend(.pkp_screen_reader all);
		}

		> .obj_announcement_summary {
			position: relative;
			padding: @triple @base;
		}

		.more {
			position: relative;

			.obj_announcement_summary {
				padding: @base;
			}

			h4 {
				font-size: @font-sml;
			}
		}

		@media(min-width: @screen-phone) {

			> .obj_announcement_summary,
			.more .obj_announcement_summary {
				padding-left: @double;
				padding-right: @double;
			}
		}

		@media(min-width: @screen-tablet) {

			> .obj_announcement_summary {
				float: left;
				width: 65%;

				// Right border
				&:before {
					content: ' ';
					position: absolute;
					top: 0;
					right: -1px;
					width: 1px;
					height: 100%;
					border-left: @bg-border;
				}
			}

			.more {
				float: right;
				width: 35%;
				padding-top: @double;
				padding-bottom: @double;

				// Left border
				&:before {
					content: ' ';
					position: absolute;
					top: 0;
					left: 0;
					width: 1px;
					height: 100%;
					border-left: @bg-border;
				}
			}
		}

		@media(min-width: @screen-desktop) {

			> .obj_announcement_summary,
			.more .obj_announcement_summary {
				padding-left: @triple;
				padding-right: @triple;
			}
		}
	}

	.current_issue {

		.current_issue_title {
			margin: @double 0;
			font-weight: @bold;
		}

		.read_more {
			.cmp_button_text(@fa-var-chevron-right);
			margin-bottom: @double;
		}

		@media(min-width: @screen-tablet) {

			.section:last-child {
				margin-bottom: 0;
			}
		}
	}

	.additional_content {
		padding: @triple @base 0 @base;
		border-top: @bg-border;

		@media (min-width: @screen-phone) {
			padding-left: @double;
			padding-right: @double;
		}

		@media (min-width: @screen-desktop) {
			padding-left: @triple;
			padding-right: @triple;
		}

		> p:first-child {
			margin-top: 0;
		}

		> p:last-child {
			margin-bottom: 0;
		}
	}

	@media(min-width: @screen-tablet) {

		.cmp_announcements + .additional_content {
			border-top: none;
		}
	}
}
