/*--------------------------------------------------------------
CSS Reset
--------------------------------------------------------------*/
/*Reset helps to maintain consistency across browsers and devices by overwriting default css before utilising the rest of this file*/

html {
	font-family: sans-serif;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust:     100%;
}

body {
	margin: 0;
}


img {
	display: block;
	border: 0;
	width: 100%;
	height: auto;
}

/*--------------------------------------------------------------
Typography
--------------------------------------------------------------*/
/*Different key elements of the site have their fonts, font size and line height defined*/
body,
button,
input,
select,
textarea {
	color: #404040;
	font-family: 'Helvetica', Arial, sans-serif;
	font-size: 18px;
	line-height: 1.5;
}

h1,
h2,
h3 {
/*	removes margin and adds 1em, a unit of measurement relative to screensize padding to headings 1,2 and 3*/
	margin: 0;
	padding: 1em 0;
}

/*same for p, kept seperate for possible changes later*/
p {
	margin: 0;
	padding: 1em 0;
}

/*--------------------------------------------------------------
General styles
--------------------------------------------------------------*/

.site {
/*	Defines univeral style for the whole site*/
	background: #ededed;
	min-height: 100vh;
}

.masthead,
.main-content,
.sidebar,
.twin,
.footer {
/*	adds padding to different content areas of the site*/
	padding: 1em 2em;
}

.main-content {
	/*Adds a backgroud colour to the main content area*/
	background: white;
}
.masthead {
/*	Modifies the text colour and background colour of the header*/
	background: #2185C5;
	color: white;
	
/*These lines below allow the header to remain in a fixed position and scroll with the page, however it caused some issues with layout	*/
/*	position: fixed;*/
/*	width: 100%;*/
}

.sidebar {
/*	sidebar background colour*/
	background: #FF7F66;
}

.twin {
/*	Defines the colour of the first half of the bottom par*/
	background: #2185C5;
}

.twin:last-of-type {
/*	the last instance of twin in the html/php is set to a different colour*/
	background: #7ECEFD;
}

.colophon {
/*	Footer of the page*/
	padding: 2em;
	background: #3E454C;
	color: white;
}

.colophon a {
/*	changes colour of links in the footer*/
	color: white;
}

.colophon a:hover,
.colophon a:focus {
/*	when a is hovered over on the page a bottom border is added to the link to underline it showing that it is a link*/
	border-bottom: 1px solid white;
}

/*--------------------------------------------------------------
If no grid support, limit width to 50em and center align
--------------------------------------------------------------*/
@supports not (display: grid) {
	.site {
		max-width: 50em;
		margin: 0 auto;
	}
}

/*--------------------------------------------------------------
CSS Grid layout for wider screens, when browser supports grid:
--------------------------------------------------------------*/

@media screen and (min-width: 600px) {
	@supports (display: grid) {

		.site {
			display: grid;
			grid-template-columns: 1fr repeat(6, minmax(auto, 10em)) 1fr;
			grid-template-rows: minmax(1em, auto) 1fr auto minmax(1em, auto);
		}

		.masthead,
		.colophon {
			grid-column: span 8;
		}

		.main-content {
			grid-column: 2/6;
		}

		.sidebar {
			grid-column: 6/8;
		}

		.twin {
			grid-column: 2/5;
			grid-row: 3/4;
		}

		.twin:last-of-type {
			grid-column: 5/8;
		}

	}
}

.modal {
	display: none; /* Hidden by default */
	position: fixed; /* Stay in place */
	z-index: 1; /* Sit on top */
	left: 0;
	top: 0;
	width: 100%; /* Full width  (refers to background so must be full screen to allow closing the modal when clicking outside) */ 
	height: 100%; /* Full height */
	overflow: auto; /* Enable scroll if needed */
	background-color: rgb(0,0,0); /* Fallback color */
	background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  }
  
  /* Modal Content/Box */
  .modal-content {
	background-color: #fefefe;
	margin: 15% auto; /* 15% from the top and centered */
	padding: 20px;
	border: 1px solid #888;
	width: 500px; 
  }
  
  /* The Close Button */
  .close {
	color: rgb(255, 255, 255);
	float: right;
	font-size: 28px;
	font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
	color: black;
	text-decoration: none;
	cursor: pointer;
  }	

  /* Alligns the login button to the top right and gives it a hover effect */
  .loginModalButton{
	  background-color: #4CAF50; /* Green */
	  border: none;
	  color: white;
	  padding: 15px 32px;
	  text-align: center;
	  text-decoration: none;
	  font-size: 16px;
	  position: absolute;
	  top: 10px;
	  right: 10px;
	  transition-duration: 0.2s;
  }

  .loginModalButton:hover, .button1:hover{
/*	  When the login buttom is hovered over and any button of the class button 1, background colour changes*/
	  background-color: #07631e;
  }

  .modal-header {
/*	  Header of the modal adds padding around it, and makes the background and text colour distinct*/
	padding: 2px 16px;
	background-color: #5cb85c;
	color: white;
  }

  .modal-footer {
/*	  kept consistent with header*/
	padding: 2px 16px;
	background-color: #5cb85c;
	color: white;
  }
  
  .button1{
/*	  Multipurpose button class for many buttons on the site*/
	background-color: #4CAF50; /* Green */
	border: none;
	color: white;
	padding: 15px 32px;
	text-align: center;
	text-decoration: none;
	font-size: 16px;
	top: 10px;
	right: 10px;
	transition-duration: 0.2s;
}

.logo{
/*	Alters the size  of the logo to properly fit on the site for many different devices using the em unit*/
	height: 2em;
	width: 2em;
/*	position relative to object around it rather than the entire page*/
	position: relative;
	left: 1%;
/*	logo floats to the left of its container*/
	float: left;
}

.site-title{
/*	moves the site title to the left and keeps it inline witht the logo properly.*/
	float: left;
	margin-left: 20px;
	top: 20px;
	padding: 0;
}

/*Container for the profile picture to display the dropdown
floated to the right to seperate it from logo*/
/*profile refers to the overall container and avatar refers only to the profile picture.*/
.profile, .avatar{
	width: 3em;
	height: 3em;
	position: relative;
	float: right;
	border-radius: 50%;
	
}


/*Defines CSS for the avatar featured on the profile page*/
.profileAvatar{
	width: 10em;
	height: 10em;
	position: relative;
	float: right;
	border-radius: 50%;
	bottom: 1.5em;
}
/*CSS for the content of the dropdown, ensuring it stays inline and is interactive*/
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  overflow: auto;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  right:1em;
  top: 3em;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}


/*Creates an interactive feel by using hover effects on the links of the dropdown*/
.dropdown-content a:hover {background-color: #ddd;}

/*Show class for showing and hiding the dropdown using JS*/
.show {display: block;}


.profileHeader{
/*Header for the background of the profile page	*/
/*	Changes background colour and adds some padding using relative units to make it consistent between different devices*/
	background-color:#2185C5;
	padding: 2em;
	color:white;
/*	makes sure the object sits right at the top of the screen*/
	top: 0;
}

/*Css for the profile picture image on the profile page*/
.profileHeaderImg{
	align-content: center;
/*	the position of the object is relative to its container*/
	position: relative;
/*	border radius of 50% turns the image into a circle*/
	border-radius: 50%;
}

/*Adds some css to the follow people pages search bar*/
.followSearchDiv input[type='text'] {
	padding: 6px;
	margin-top: 8px;
	font-size: 17px;
}

/*Css for the title of each post, adds a border and fixes the height*/
.postTitle{
	border-bottom: solid #000 1px;
	height: 40px;
	background-color: #2185C5;
	color: white;
}

/*Css for the post container to put a border around each post*/
.postContainer{
	border: solid #000 1px;
}

/*Adds some padding to the description div giving it some better spacing*/
.postDesc{
/*	min-height: 150px*/
	padding:20px;
	background-color:#114465;
	color: white;
}

/*For the bottom 3 elements of the post ensuring that they are kept inline with eachother and at a consistent size */
.postLocation , .postTime , .userID{
	position: relative;
	width:10%;
	height: 15px;
	border: solid #000 1px;
	font-size: 12px;
	display: table-cell;
	background-color: #2185C5;
	color: white;
}

/*For the image of each post, keeps the size consistent*/
.postImg{
	display: inline-block;
	height:100%;
	width:auto;
	object-fit: scale-down;
	float: left;
}

/*Div containing the images, also helps with sizing of images.*/
.postImgDiv{
	height: 10vw;
	text-align: center;
}

.username, .firstName, .lastName{
	padding-left: 3px;
	border-right: solid #000 1px;
	height: 3em;
	width: 6em;
	display: inline-block;
}

#addFriend{
	float:right;
}

.map{
	height:200px;
	width:100%;
}