/* apply a natural box layout model to all elements, but allowing components to change */
/* credit to Paul Irish: https://www.paulirish.com/2012/box-sizing-border-box-ftw/ */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* Decorative styles. Background image, and decorative elements at top-right / bottom-left */
body {
	position: relative;
	margin: 0;
	height: auto; /* Scale with page content */
	min-height: 100vh; /* Set min-height to viewport height so that body is always atleast the size of the viewport. */
	background-image: url("images/repeating-chevrons.png");
	background-repeat: repeat;
	background-size: 50%;
}
/* body:before and body:after are used to render the decorative elements (top-right and bottom-left).
   These are setup in a way that scales slightly with screen size and always appear at the correct position, even when scrolling. */
body::before,
body::after {
  content: "";
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: -1;
  height: 100vh;
  min-height: 100px;
  min-width: 120px;
  max-height: 400px;
  max-width: 800px;
}
body::before {
  top: 0;
  right: 0;
  width: 22vw;
  background-image: url("images/leaves-top.png");
  background-position: right top;
}
body::after {
  bottom: 0;
  left: 0;
  width: 44vw;
  background-image: url("images/leaves-bottom.png");
  background-position: left bottom;
}
#header img {
	width: 300px;
	height: auto;
}

/* Heading styles */
h1 {
	font-family: "Garamond", serif;
	font-size: 22px;
	font-weight: bold;
	margin: 5px 0;
}
h2 {
	font-family: "Garamond", serif;
	font-size: 20px;
	margin: 3px 0;
	font-weight: bold;
}
h3 {
	font-family: "Garamond", serif;
	font-size: 18px;
	margin: 2px 0;
	font-weight: bold;
}

/* General text styles */
#span {
	font-family: "Arial", sans-serif;
	font-size: 12px;
}
p {
	font-family: "Arial", sans-serif;
	font-size: 16px;
}
.navigation {
	font-family: "Garamond", serif;
	font-size: 14px;
	user-select: none;
}
.navigationM {
	font-family: "Garamond", serif;
	font-size: 10px;
	user-select: none;
}
#footerContainer span {
	font-size: 10px;
}

/* Containers */
#pageContainer {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
}
#header {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 90%;
	margin-top: 15px;
	height: auto;
}
#navigationDiv {
	display: flex;
}
#pageHeadingContainer
{
	display: flex;
	justify-content: center;
	height: 40px;
	margin: 20px 0;
}
#contentContainer {
	width: 90%;
	flex: 1;
	min-height: 85%;
	margin-bottom: 60px; /* 60px of margin to make space for the footer */
}
#footerContainer {
	display: flex;
	justify-content: center;
	height: 20px;
	width: 100%;
	margin: 20px 0 10px 0;
	position: absolute; /* The footer is positioned absolutely at the bottom of the page, using bottom/left properties */
  	bottom: 0;
  	left: 0;
}

/* Navigation element containers */
#navHomeDiv {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 54px;
	height: 50px;
}
#navMenuDiv {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 54px;
	height: 50px;
}
#navGalleryDiv {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 67.5px;
	height: 50px;
}
#navAboutDiv {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 65px;
	height: 50px;
}
#navContactDiv {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 55px;
	height: 50px;
}

/* Navigation element styles */
#navigationDiv a:focus {
	border: 1px solid darkgray;
}
#navigationDiv a:link, #navigationDiv a:visited {
	color: black;
	font-style: normal;
	text-decoration: none;
}
.navItemDash {
	border-color: black;
	margin: 4px 0;
}
.navItemDashHidden {
	border-color: transparent;
	margin: 4px 0;
}
.navDashLine {
	width: 240px;
	margin: 10px 0;
}

/* These styles set the width of the navigation bar between the English/Maori nav text */
#navHomeDiv hr {
	width: 45px;
}
#navMenuDiv hr {
	width: 45px;
}
#navGalleryDiv hr {
	width: 60px;
}
#navContactDiv hr {
	width: 60px;
}
#navAboutDiv hr {
	width: 45px;
}

/* Adjustments for larger mobile screen sizes. Increases text size slightly. */
@media screen and (min-width: 361px) and (max-width: 911px) {
	h1 {
		font-size: 26px;
	}
	h2 {
		font-size: 22px;
	}

	/* Navigation text styles */
	.navigation {
		font-size: 16px;
	}
	.navigationM {
		font-size: 12px;
	}

	/* Navigation element containers */
	#navHomeDiv {
		width: 60px;
	}
	#navMenuDiv {
		width: 60px;
	}
	#navGalleryDiv {
		width: 75px;
	}
	#navAboutDiv {
		width: 75px;
	}
	#navContactDiv {
		width: 75px;
	}
}

/* Adjustments for larger screen sizes (tablets, desktops) */
@media screen and (min-width: 912px) {
	h1 {
		font-size: 26px;
	}
	h2 {
		font-size: 22px;
	}
	.navigation {
		font-size: 18px;
	}
	.navigationM {
		font-size: 14px;
	}

	#header {
		display: grid;
		justify-content: center;
		align-items: start;
		max-width: 1000px;
		width: 85%;
		height: 170px;
		margin-top: 40px;
		grid-template-columns: 0.8fr 0.2fr;
		grid-template-rows: 0.8fr 0.2fr;
	}
	#contentContainer {
		max-width: 1000px;
		width: 85%;
		height: 100%;
	}
	#navigationDiv {
		margin-top: 15px;
	}
	#pageHeadingContainer
	{
		grid-row-start: 2;
		grid-column-start: 1;
		grid-column-end: 3;
	}

	.navDashLine {
		display: none;
	}

	/* Navigation element containers */
	#navHomeDiv {
		width: 65px;
	}
	#navMenuDiv {
		width: 70px;
	}
	#navGalleryDiv {
		width: 85px;
	}
	#navAboutDiv {
		width: 85px;
	}
	#navContactDiv {
		width: 85px;
	}

	#navHomeDiv hr {
		width: 50px;
	}
	#navMenuDiv hr {
		width: 50px;
	}
	#navGalleryDiv hr {
		width: 75px;
	}
	#navContactDiv hr {
		width: 75px;
	}
	#navAboutDiv hr {
		width: 55px;
	}
}

/*************************************** 
*******		Home Page	****************
****************************************/
#homeContainer {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
#mainImageContainer, #homeImage2, #homeImage3 {
	display: inline;
	overflow: hidden;
	border-radius: 33px;
}
#homeContainer img, #homeContainer picture {
	max-width: 100%;
	height: auto;
}
#mainImageContainer {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Styles for text elements on the main image on the home page */
#bannerTextContainer {
	/* Main banner text container */
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 80%;
	position: absolute; /* Takes element out of normal flow; allowing it to stack ontop of the image within the flexbox */
}
#gotoMenuButton > div {
	/* "EXPLORE OUR MENU" button */
	border-color: white;
	border: 1px solid white;
	height: 40px;
	padding: 10px;
	margin: 15px;
}
#gotoMenuButton > div > span {
	/* "EXPLORE OUR MENU" text */
	font-size: 16px;
	user-select: none;
}

/* Set link/visited states to be same as normal */
#gotoMenuButton:link, #gotoMenuButton:visited {
	color: black;
	text-decoration: none;
}
/* Add a clear focus outline for "EXPLORE OUR MENU" button */
#gotoMenuButton:focus {
	border: 1px solid lightgreen;
}

/* Custom text styles for the main image text */
#bannerTextContainer span, #bannerTextContainer h1 {
	color: white;
	text-align: center;
}
#bannerTextContainer h1 {
	font-size: 36px;
	margin: 3px 0;
}

#audioContainer {
	display: flex;
	flex-direction: column;
	align-self: flex-end;
	margin-bottom: 20px;
	max-width: 80%;
	position: absolute; /* Takes element out of normal flow; allowing it to stack ontop of the image within the flexbox */
}
#audioBtn {
	height: 50px;
	width: 50px;
	background: url("images/volume-off.svg");
	background-repeat: no-repeat;
	border: 0;
}
#audioBtn:hover {
	border: 0;
	margin: 0;
}
#audioBtn:focus {
	border: 1px solid black;
}

/* Adapt home page elements to a larger size (tablet, desktop) */
@media screen and (min-width: 800px) {
	#homeContainer {
		display: grid;
		gap: 20px;
		grid-template-columns: 0.5fr 0.5fr;
		grid-template-rows: 0.7fr 0.3fr;
	}
	#mainImageContainer {
		grid-column-start: 1;
		grid-column-end: 3;
		display: flex;
		align-items: center;
	}
	#homeImage2 {
		grid-row-start: 2;
		grid-column-start: 1;
		grid-column-end: 2;
	}
	#homeImage3 {
		grid-row-start: 2;
		grid-column-start: 2;
		grid-column-end: 3;
	}
}

/*************************************** 
*******		Menu Page	****************
****************************************/
#menuContainer {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
}

.menuGroup {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px;
	padding: 10px;
	border-radius: 33px;
	height: 500px;
	width: 95%;
	max-width: 300px;
	background-color: #A1C49F70; /* Alpha of .44 */
	box-shadow: 10px 10px 5px rgba(0,0,0,0.25);
}
.menuGroup h2 {
	padding-bottom: 10px;
}

.menuItem {
	/* A grid is used to provide more control over how much space each part of the menu item takes up (name should be 80%, while price has 20%) */
	display: grid;
	grid-template-columns: 8fr 2fr;
	margin: 2px;
	padding: 0 10px;
	width: 100%;
}
.menuItem > span + span {
	/* Menu Item price */
	grid-column-start: 2;
	font-weight: bold;
	text-align: right;
}

/* Adapt menu screen for larger screens by making menu groups appear side-by-side */
@media screen and (min-width: 720px) {
	#menuContainer {
		flex-direction: row;
	}
}

/*************************************** 
*******		Gallery Page	************
****************************************/
#galleryTop {
	display: flex;
	flex-direction: column;
	align-items: center;
}
#galleryContainer {
	display: grid;
	align-items: center;
	grid-template-columns: 1fr 200fr 1fr;
	grid-template-rows: 200fr 1fr;
	max-width: 1000px;
	max-height: 700px;
	border-radius: 33px;
	border: 1px solid #7BCACE;
	overflow: hidden;
	background-color: #A1C49F70; /* Alpha of .44 */
	box-shadow: 10px 10px 5px rgba(0,0,0,0.25);
}
#imageContainer {
	grid-column-start: 1;
	grid-column-end: 4;
	grid-row-start: 1;
	grid-row-end: 3;
	height: 100%;
	width: 100%;
}
#galleryImg {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
#galleryPrev {
	grid-column-start: 1;
	grid-column-end: 2;
	grid-row-start: 1;
	grid-row-end: 2;
	margin-left: 10px;
	height: 40px;
	width: 40px;
	background: url("images/arrow_back.svg");
	background-position: center;
	border: 0;
}
#galleryNext {
	grid-column-start: 3;
	grid-column-end: 4;
	grid-row-start: 1;
	grid-row-end: 2;
	margin-right: 15px;
	height: 50px;
	width: 30px;
	background: url("images/arrow_forward.svg");
	background-position: center;
	border: 0;
}
#galleryPrev:focus, #galleryNext:focus {
	border: 1px solid darkgray;
}
#galleryPrev:hover, #galleryNext:hover {
	cursor: pointer;
}

#galleryIndicator {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-content: center;
	grid-column-start: 2;
	grid-column-end: 3;
	grid-row-start: 2;
	grid-row-end: 3;
	justify-self: center;
	margin-bottom: 10px;
	height: 20px;
	width: 100px;
}
#galleryIndicator div {
	margin: 5px;
	background-color: lightgray;
	width: 15px;
	height: 15px;
	border-radius: 100px;
}
#galleryMobileWarning {
	color: red;
	margin-bottom: 20px;
}

/* Hide the warning if the screen is large enough or the user is in landscape mode */
@media screen and (min-width: 500px), (orientation: landscape) {
	#galleryMobileWarning {
		display: none;
	}
}

/* Adapt gallery elements to landscape mode, clamping its size to fit within the viewport */
@media screen and (max-width: 920px) and (orientation: landscape) {
	#galleryContainer {
		max-width: 95vw;
		max-height: 95vh;
	}
	#imageContainer {
		display: flex;
		justify-content: center;
		max-width: auto;
		max-height: 95vh;
		width: auto;
	}
	#galleryImg {
		height: 95vh;
		width: auto;
	}
}

/*************************************** 
*******		About Page	****************
****************************************/
#aboutContainer {
	display: grid;
	justify-items: center;
	justify-content: center;
	grid-template-columns: 1fr;
	grid-template-rows: auto auto 4fr; /* Paragraph -> Heading -> Video -> Images */
}
#aboutParagraphContainer {
	grid-row-start: 1;
	margin: 10px;
}
#aboutImageContainer {
	grid-row-start: 4;
}
#aboutContainer h2 {
	grid-row-start: 2;
	justify-self: center;
	margin: 10px 0 30px 0;
}
#aboutImageContainer {
	display: flex;
	flex-direction: column;
}
#aboutImageContainer img {
	margin: 10px 0;
	width: 300px;
	height: 169px;
	object-fit: cover;
	border-radius: 33px;
}
#aboutVideoPlayerContainer {
	display: flex;
	justify-items: center;
	grid-row-start: 3;
}
#aboutVideoPlayerContainer iframe {
	border-radius: 33px;
	width: 300px;
	height: 169px;
}

/* The following media queries are for adjusting the video player size for different screen mobile screen sizes */
@media screen and (min-width: 360px) {
	#aboutVideoPlayerContainer iframe, #aboutImageContainer img {
		width: 340px;
		height: 190px;
	}
}
@media screen and (min-width: 420px) {
	#aboutVideoPlayerContainer iframe, #aboutImageContainer img {
		width: 400px;
		height: 225px;
	}
}
@media screen and (min-width: 480px) {
	#aboutVideoPlayerContainer iframe {
		width: 460px;
		height: 259px;
	}
}
@media screen and (min-width: 560px) {
	#aboutVideoPlayerContainer iframe {
		width: 540px;
		height: 303px;
	}
}
/* Change the image container to show the images horizontally (medium sized screens) */
@media screen and (min-width: 780px) {
	#aboutImageContainer {
		flex-direction: row;
	}
	#aboutImageContainer img {
		width: 280px;
		height: 200px;
		margin: 10px;
	}
	#aboutVideoPlayerContainer iframe {
		width: 560px;
		height: 315px;
	}
}
/* Adjust element sizes and layout for desktop sized screens */
@media screen and (min-width: 1080px) {
	#aboutContainer {
		display: grid;
		justify-items: center;
		grid-template-columns: 2fr 7fr 3fr; /* Paragraph -> Heading -> Video on left, Images on right (spanning 2 rows) */
		grid-template-rows: 3.3fr 1fr 4fr; /* Paragraph -> Heading -> Video */
	}
	#aboutParagraphContainer {
		grid-row-start: 1;
		grid-column-start: 2;
		margin: 10px;
	}
	#aboutImageContainer {
		flex-direction: column;
		margin-left: 20px;
		grid-row-start: 1;
		grid-row-end: 4;
		grid-column-start: 3;
	}
	#aboutImageContainer img {
		margin: 10px 0;
		width: 300px;
		height: 200px;
	}
	#aboutContainer h2 {
		grid-row-start: 2;
		grid-column-start: 2;
		justify-self: center;
	}
	#aboutVideoPlayerContainer {
		grid-row-start: 3;
		grid-column-start: 2;
	}
	#aboutVideoPlayerContainer iframe {
		width: 560px;
		height: 315px;
	}
}

/*************************************** 
*******		Contact Page	************
****************************************/
#contactContainer {
	/* Set to flex - column direction (mobile layout) */
	display: flex;
	flex-direction: column;
	align-items: center;
}
#contactDetailsContainer {
	margin-bottom: 20px;
}
#contactMapContainer iframe {
	margin-top: 20px;
	width: 290px;
	height: 290px;
}

/* Adapt contact layout to larger mobiles */
@media screen and (min-width: 359px) {
	/* Make the map bigger */
	#contactMapContainer iframe {
		width: 320px;
		height: 320px;
	}
}

/* Adapt contact layout to larger screens (tablets/desktops) */
@media screen and (min-width: 912px) {
	/* Switch contactContainer to use flex-direction: row; displaying both details and the map on the same row */
	#contactContainer {
		flex-direction: row;
		justify-content: center;
		align-items: normal;
	}
	/* Add a tiny bit of margin around the details */
	#contactDetailsContainer {
		min-width: 280px;
		margin: 20px;
	}
	/* Make the map wider to make better use of the availbale screen space */
	#contactMapContainer iframe {
		width: 500px;
		height: 320px;
	}
}
