/*All content below has been created or edited with the help of OpenAI. (2024). ChatGPT (November 2024 version) [Large language model]. https://chat.openai.com/ */
/* Content below has been created or edited with the help of Worthy, P. (2024). Guides [Instructional manual]. University of Queensland. */

/* Navigation and grid*/
#navigation-bar {
  display: grid; /* turn this element into a grid container */
  height: 100vh; /* make the grid container take up 100% ofthe window height */

  /* define the grid structure, and content of cells */
  grid-template-areas:
  "header header header"
  "nav nav nav"
  "main main main"
  "foot foot foot";

  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto 1fr auto;
}

header {
  display: flex; /* Be able to align more flexibily*/
  padding: 5px;
  grid-area: header;
}

/* Grid container layout */
#gridcontainer {
  display: grid; /* Turns element into grid container so its children (grid items) can be arranged into rows and columns.*/
  height: 100vh;
    grid-template-areas: /* Define a visual layout of grid items using named areas */
    "header header header"
    "nav nav nav"
    "main main main"
    "foot foot foot";
  grid-template-columns: 1fr 1fr 1fr; /* set the column widths, 1 fr, equal share of the available space in the grid container.*/
  grid-template-rows: auto auto 1fr auto; /*set the row height, auto - automatically adjust based on the content within them, 1fr will take up remaining space*/
}

main {
  display: flex;
  flex-direction: column;
  padding-bottom: 1px;
  grid-area: main;
}

/* Hamburger menu */
.ham-menu {
  display: none; 
  flex-direction: column; 
  bottom: 55px;
  width: 40px;
  margin-left: auto;
  position: relative;
  z-index: 2000;
}

/* Style each bar */
.ham-menu span {
  height: 4px;
  width: 70%;
  background-color: var(--text-color); /* Default bar color */
  border-radius: 25px;
  margin: 2px 0; /* Space between bars */
  transition: .3s ease;
}

/* Active state styles */
.ham-menu.active span {
  background-color: var(--primary-color); /* Change color when active */
}

.ham-menu.active span:nth-child(1) {
  top: 50%; /* Adjust the first bar */
  transform: translate(-10%, 300%) rotate(45deg); /* Rotate to form X */
}

.ham-menu.active span:nth-child(2) {
  opacity: 0; /* Hide the middle bar */
  height: 0;
  margin: 0;
}

.ham-menu.active span:nth-child(3) {
  top: 50%; /* Adjust the third bar */
  transform: translate(-10%, 120%) rotate(-45deg); /* Rotate to form X */
}

/* off-screen-menu */
.off-screen-menu {
  background-color:  rgba(244, 242, 247, 0.915);
  height: 100vh;
  width: 100%;
  max-width: 450px;
  position: fixed;
  top: 0;
  right: -450px; /* Hidden off-screen */
  display: flex;
  flex-direction: column;
  align-items: center; 
  text-align: left;
  font-size: 3rem;
  transition: .3s ease;
  z-index: 1000; /* Ensure this is lower than the hamburger menu */
}

.off-screen-menu.active {
  right: 0; /* Slide in from the right */
  flex-direction: column;
  list-style-type: none; /* Remove bullet points */
  width: 60%; /* Make the list take the full width of the menu */
}

.off-screen-menu ul{
  margin-top: 30%;
}

.off-screen-menu li {
  width: 100%; /* Ensure each item takes full width */
}

.off-screen-menu a {
  display: block; /* Make each link a block element */
  padding: 15px; /* Add padding for better touch targets */
  color: #000; /* Change text color */
  text-decoration: none; /* Remove underline from links */
  margin-left: 15%;
}

/* Hover effect for links */
.off-screen-menu a:hover {
  background-color: rgba(0, 0, 0, 0.1); /* Change background on hover */
}

/* nav */
nav {
  padding: 1rem;
  display: flex;
}

/* Main photo on homepage*/
.container {
  position: relative;
  text-align: center;
  color: white;
  height: 600px;
  padding-bottom: 5%;
}

.container img{
  height: 100%;
  object-fit: cover;
}

/* Emergency numbers on homepage */
.title-container {
  display: flex;
  align-items: center;
  gap: 100px;     
  background-color: var(--primary-color); 
  padding: 0 10.5%;
  padding-top: 5%;
}

.title-container{
  display: flex;
  width: 100%;
  align-items: flex-start;
}

/* Contact us form on Contact Page and text on About page*/
.contact-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 70%;
  margin: 5% auto;
  padding: 20px;
  gap: 20px;
}

.contact-container2 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 70%;
  margin: 0 auto;
  padding: 20px;
  margin-top: 10%;
  gap: 20px;
}

/* Contact Us form*/
.title-container-contact {
  flex: 1;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

.title-container-contact h2 {
  font-size: 20px;
  margin-bottom: 20px;
  width: 90%;
}

.title-container-contact h3 {
  font-size: 10px;
  width: 90%;
}

.title-container-contact p {
  font-size: 10px;
  font-weight: 400;
  width: 90%;
}

/* Contact Page Text*/
.container-headings {
  padding: 0;
  padding-top: 20px;
}

.container-headings p {
  font-size: 12px;
  padding: 0;
  margin-bottom: 5%;
}

.title-container-contact img {
  max-width: 600px;
  width: 100%;
  height: auto;
}

/* Form on Add Events Page*/
.form {
  flex: 1;
}

.form form {
  display: flex;
  flex-direction: column;
}

.form label {
  margin: 10px 0 5px;
  font-weight: bold;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 15px;
}

.form button {
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.form button:hover {
  background-color: var(--hover-color);
}

/* Image and text on About page */
.contact-container2 .container-headings {
  text-align: left;
  padding-top: 25%;
}

/* Emergency contact text in Homepage*/
.title-container h1 {
  color: var(--background-color);
  padding: 0;
  text-align: left;
  font-size: 40px;
}

.title-container h3 {
  color: var(--background-color);
  padding: 0;
  text-align: left;
}

.emergency-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 5% 10%;
}

.emergency-container div {
  padding: 20px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.emergency-numbers{
  background-color: var(--primary-color);
}

.emergency-container h2 {
  padding: 0;
  color: white;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
}

.emergency-container p {
  padding: 5px 0 0;
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}

.rescue { background-color: #E3170A; }
.hospital { background-color: #64B7B6; color: black; }
.parents { background-color: #F6AE2D; }
.police { background-color: #072AC8; }
.firefighter { background-color: #f77f00; }
.friends { background-color: #AC7DDB; }


/* Guides list on Safety Guides page*/
.article-list {
  display: flex;
  flex-direction: column;
  gap: 25px; /* Space between articles */
  width: 80%;
  max-width: 800px;
  margin: 0 auto;
  margin-top: 5%;
}

/* Styling for each guide on safety guides page */
.article {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.article-details {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.article-info {
  max-width: 70%;
}

.article-info h3 {
  font-size: 20px;
  margin: 5px 0;
  padding: 0;
}

.article-info p {
  color: #555;
  margin: 5px 0; 
  padding: 0;
}

.article-meta {
  margin-top: 10px; 
  font-size: 0.9em;
  color: #777;
}

.article-image img {
  width: 400px;
  height: 250px;
  object-fit: cover;
  border-radius: 5px;
}

/* Description and read more button styling */
.author {
  font-size: 0.9em; 
  color: #555; 
}

.read-button {
  display: inline-block;
  padding: 10px 15px; 
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px; 
  transition: background-color 0.3s;
}

.read-button:hover {
  background-color: var(--hover-color);
}

.notification-btn button{
  padding: 5px 10px;
  margin: 0;
  font-size: 12px;
  color: var(text-color);
  text-decoration: none;
  border-radius: 5px; 
  margin-top: 10px;
  transition: background-color 0.3s;
}

/* Styling for visa page */
.guide-top {
  display: flex;
  align-items: center;
  padding-left: 5%;
  background-color: black;
}

.guide-info {
  flex: 1; /* Allow the text to take up available space */
  padding-right: 70px; /* Add some space between text and image */
  color: var(--background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-image img {
  max-width: 100%;
  height: 600px;
}

.guide-details {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.guide-info h3 {
  font-size: 40px; 
  font-weight: 600;
  margin: 5px 0; 
  padding: 0;
  color: var(--background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-info p {
  margin: 5px 0; /* Margin around the description */
  font-weight: 400;
  font-style: italic;
  padding: 0;
  color: var(--background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-meta {
  margin-top: 10px; 
  font-size: 12px;
  padding-left: 15%;
}

.guide .author{
  font-style: normal;
  font-weight: 12px;
}

.guide .description{
  font-size: 20px;
  font-weight: 400;
}

.guide-text{
  padding: 5% 10%;
}

.guide-text h2{
  padding: 0;
  padding-top: 5%;
  padding-left: 10%;
  font-weight: 700;
  font-size: 22px;
}

.guide-text h3{
  font-size: 20px;
  font-weight: 600;
  padding: 1% 10%;
}

.guide-text p{
  font-size: 16px;
  padding: 0;
  padding-top: 0.5%;
  padding-bottom: 2%;
  padding-left: 10%;
  padding-right: 10%;
  font-weight: 400;
}

.guide-end .guide-meta{
  padding: 0;
  padding-top: 5%;
  padding-left: 18%;
  font-weight: 500;
  font-size: 15px;
}

.guide-end span{
  padding: 0;
  padding-right: 2%;
}

/* Newsletter signup feature on Read More Page*/
.signup-container {
  margin: 20px;
}

button.signup-button {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 10px;
  border: 2px solid white;
}

.signup-button:hover {
  background-color: darken(var(--primary-color), 10%); 
}

.signup-message {
  margin-top: 10px;
  color: var(--primary-color); 
  font-weight: 600;
}

.newsletter{
  text-align: center;
  flex-direction: column;
  justify-content: center;
  background-color: var(--primary-color);
  padding: 5% 0;
  margin-top: 5%;
}

.newsletter h2{
  padding: 0;
  padding-bottom: 2%;
  font-size: 35px;
  font-weight: 700;
  text-align: center;
  color: var(--background-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.newsletter p{
  padding: 0;
  padding-bottom: 2%;
  font-size: 14px;
  font-weight: 400;
  color: var(--background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h2.read-more-page {
  font-size: 18px;
  font-weight: 600;
}

.newsletter .read-more-footer{
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Footer styling */
.footer {
  grid-area: foot;
  background-color: black; 
  color: white; 
  padding: 30px 0px;
  text-align: center; 
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

footer h2{
  font-family: Poppins;
  color: var(--background-color);
  padding-left: 20%;
  padding-right: 20%;
  margin-top: 2%;
}

.footer p {
  margin: 0;
  font-family: Poppins;
  padding-left: 20%;
  padding-right: 20%;
  font-weight: 400;
  font-size: 14px;
  color: var(--background-color);
}

.footer-links {
  display: flex;
  margin-top: 10px;
  padding: 0;
  gap:20px;
  padding-left: 20%;
}

.footer-links a {
  color: white; 
  margin: 5px 0; 
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline; 
}

.read-more-container{
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2% 2%;
  margin-bottom: 5%;
}

/* Guide Cards in read more section of read more page and visa page */
.guide-cards {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2% 2%;
}

.guide-card-details {
  flex: 1;
  max-width: 35%;
  padding-bottom: 3%;
  padding-left: 3%;
  padding-top: 3%;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1), 0px 6px 20px rgba(0, 0, 0, 0.1); /* Creates a soft floating effect */
  transition: box-shadow 0.3s ease; /* Adds a smooth shadow transition */
}

.guide-card-info {
  max-width: 70%;
}

.guide-card-info h3 {
  font-size: 20px;
  margin: 5px 0; 
  padding: 0;
}

.guide-card-info p {
  color: #555;
  margin: 5px 0;
  padding: 0;
}

.guide-card-meta {
  margin-top: 10px;
  font-size: 0.9em;
  color: #777;
}

.guide-card-image img {
  width: 300px; 
  height: 200px; 
  object-fit: cover;
}

.read-more-page h2{
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-card-read-more{
  padding: 0;
  padding-top: 15%;
}

/* Comment section of read more page and visa page */
.comments-section {
  margin: 0 auto;
  width: 60%; 
  padding: 10px;
  border-radius: 8px;
}

.comments-section .comment {
  display: flex;
  align-items: center;
  margin-bottom: 10px; 
  border: 1px solid #e0e0e0; 
  padding: 10px;
  border-radius: 8px;
}

.comment-text {
  margin-left: 10px; 
  width: calc(100% - 80px); 
}

.profile-icon {
  width: 70px; 
  height: 70px;
  border-radius: 50%; 
}

.username {
  font-weight: 600;
  font-size: 12px;
}

.comment p {
  margin: 0;
  margin-top: 2%;
  padding: 0;
  font-weight: 400;
}

.guide-end .view-comments-button {
  margin-left: 40%;
  margin-bottom: 5%;
  padding: 1% 1%;
}

.reply-button {
  color: black;
  padding: 0 10px;
  border-radius: 5px;
  cursor: pointer; 
  float: right; 
  background-color: none;
}

/* Media query for mobile */
@media only screen and (max-width: 600px) {

  /* Hamburger menu */
  .hamburger {
    display: flex; /* Show hamburger menu on mobile */
  }

  .ham-menu {
    display: flex;
  }

  /* Main photo on homepage*/
  .container {
    height: 300px;
    margin-top: 10%;
    margin-bottom: 10%;
  }

  .container img{
    width: 100%;
    height: 300px;
  }

  .title-container{
    width: 100%;
    padding: 10%;
    padding-top: 15%;
    /* margin-top: 10%; */
    gap: 0;
  }

  .title-container img{
    width: 200px;
    height: 200px;
    padding-right: 2%;
  }

  .title-container h1{
    font-size: 20px;
  }

  /* Heading styles */
  .title-container h3{
    font-size: 15px;
  }

  .title-container-contact{
    width: 100%;
    gap: 0;
    flex-direction: column;
  }

  .title-container-contact img{
    width: 300px;
    height: auto;
  }

  .title-container-contact h1{
    font-size: 20px;
  }

  .title-container-contact h2{
    font-size: 15px;
    margin: 0;
    padding: 0;
    margin-bottom: 5%;
  }

  .title-container-contact h3{
    font-size: 15px;
  }

  /* Emergency section on homepage */
  .emergency-container {
    display: flex;
    flex-direction: column;
    margin: 10px;
  }

  .emergency-container div {
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .emergency-container h2{
    font-size: 12px;
    text-align: center;
  }
  
  .emergency-container p{
    font-size: 10px;
    text-align: center;
    margin-bottom: 10px;
  }

  .top-left{
    width: 90%;
    top: 70%;
  }

  .top-left h1{
    font-size: 18px;
    padding: 0;
    padding-left: 10%;
    margin: 0;
    margin-bottom: 2%;
  }

  .top-left h3{
    font-size: 12px;
    padding: 0;
    padding-left: 10%;
  }

  /* Guides on Safety Guides page */
  .article-list {
    width: 90%;
    margin: 0;
  }
  
  /* Styling for each article */
  .article {
    display: flex;
    justify-content: space-between; 
    border-bottom: 1px solid #e0e0e0; /* Separator line */
    padding-bottom: 20px; 
    margin-bottom: 20px;
    margin-right: 10%;
    width: 75%;
  }
  
  .article-details {
    width: 75%;
  }
  
  .article-info {
    width: 100%;
    margin: 0;
    margin-left: 8%;
  }
  
  .article-info h3 {
    font-size: 14px;
  }
  
  .article-info p {
    color: #555;
    font-size: 10px;
  }
  
  .article-meta {
    width: 160px;
  }
  
  .article-image img {
    width: 200px; 
    height: 140px;
    margin: 0;
    margin-left: 5%;
  }

  .read-more{
    padding: 0;
    padding-top: 20%;
  }

  a.button{
    padding: 0;
    padding: 3px 8px;
    bottom: 10%;
    font-size: 12px;
    border-radius: 5px;
  }
  
  .read-button:hover {
    background-color: var(--hover-color);
  }

  /* Guides in visa page */
  .guide-top {
    display:flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    margin: 0;
    margin-top: 50px;
    padding: 0;
  }

  .guide-info {
    flex: 1; /* Allow the text to take up available space */
    height: 100px;
    color: var(--background-color);
    text-align: center;
    display: flex;
    justify-content: center;
    padding: 5% 0;
    margin-bottom: 5%;
  }

  .guide-image img {
    width: 100%;
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    padding: 0;
    margin: 0;
  }

  .guide-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 5px;
    margin-top: 15%;
    text-align: center;
  }

  .guide .author{
    font-style: normal;
    font-weight: 12px;
  }

  .guide .description{
    font-size: 20px;
    font-weight: 400;
  }

  .guide-text{
    justify-content: center;
    align-items: center;
    margin-bottom: 5%;
  }

  .guide-text h2{
    padding: 0;
    padding-top: 5%;
    font-weight: 700;
    font-size: 18px;
  }

  .guide-text h3{
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    padding-top: 5%;
    padding-bottom: 2%;
  }

  .guide-text p{
    font-weight: 400;
    padding: 0;
    padding-top: 5%;
    padding-bottom: 2%;
    font-size: 12px;
  }
  
  .guide-end .guide-meta{
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    margin-top: 15px;
    margin-left: 10%;
    font-weight: 400;
    font-size: 12px;
  }

  /* Comments section on Visa Page */
  .guide-end .view-comments-button{
    margin: 5% 0;
    padding: 2px 2px;
    width: 40%;
    font-size: 12px;
  }

  .comments-section{
    margin: 0;
    margin-left: 7%;
  }

  .comments-section .comment{
    width: 300px;
  }

  .reply-button{
    font-size: 10px;
    margin-top: 5%;
  }

  /* Newsletter sign up on Visa Page */
  .signup-container {
    margin: 20px;
  }

  button.signup-button {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: var(--background-color); 
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid var(--background-color);
    background-color: var(--primary-color);
    transition: background-color 0.3s ease;
  }

  .signup-button:hover {
    background-color: darken(var(--primary-color), 10%);
  }

  .signup-message {
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 600;
  }

  .newsletter{
    text-align: center;
    flex-direction: column;
    justify-content: center;
    margin-top: 15%;
  }

  .newsletter h2{
    font-size: 25px;
  }

  .newsletter p{
    padding-bottom: 5%;
    padding-left: 14%;
    padding-right: 14%;
    font-size: 12px;
  }

  .rm-footer{
    width: 400px;
  }

  .rm-footer input[type="text"]::placeholder {
    font-size: 12px;
    color: var(--border-color);
}

  .rm-footer .searchInput{
    width: 350px;
  }

  .rm-footer .signup-button{
    width: 90px;
    font-size: 12px;
  }

  .newsletter .read-more-footer{
    text-align: center;
    display: flex;
    justify-content: center;
  }

  /* Guide Cards in read more section of read more page and visa page */
  .guide-cards {
    flex-direction: column;
  }

  .guide-card-details {
    width: 100%;
    max-width: 90%;
    margin-left: 5%;
  }

  .guide-card-info h3 {
    font-size: 18px;
    font-weight: 600;
    width: 300px;
  }

  .guide-card-info p {
    font-size: 12px;
    font-weight: 400;
  }

  .guide-card-read-more{
    padding: 0;
    padding-top: 10%;
    padding-bottom: 5%;
  }

  .guide-card-read-more .button {
    padding: 5px 10px;
    margin: 0;
    margin-bottom: 20px;
  }

  /* Footer Styling */
  .footer {
    grid-area: foot;
    background-color: black;
    color: white;
    padding: 30px 0px; 
    text-align: center;
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  footer h2{
    font-size: 15px;
    text-align: center;
    padding-bottom: 0;
  }
  
  .footer p {
    font-size: 11px;
  }

  .footer-links {
    display: flex;
    padding-left: 30%;
    gap: 10px;
  }
  
  .footer-links a {
    font-size: 10px;
  }

  /* Contact Us Form o Contact Page */
  .contact-container {
    display: block;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    margin-left: 7%;
    width: 100%;
  }

  .contact-container img{
    margin-left: 3%;
  }

  .contact-title{
    margin-top: 30%;
  }

  .login-title{
    margin-top: 30%;
  }

  .privacy-title h1{
    font-size: 20px;
    margin-top: 20%;
  }

  .title-container-contact,
  .form {
      width: 100%;
  }

  .form input[type="text"],
  .form input[type="email"],
  .form textarea {
    width: 90%;
  }

    .form form {
    display: flex;
    flex-direction: column;
    padding-left: 5%;
    margin-bottom: 15%;
  }

  .form button{
    margin: 0;
    width: 90%;
    margin-bottom: 3%;
  }

  .contact-container{
    width: 90%;
    align-items: center;
    justify-content: center;
  }

  /* Text and image on About page*/
  .contact-container2 {
    width: 90%;
  }

  .contact-container2 img{
    margin-bottom: 15%;
    margin-right: 5%;
  }

  .container-headings{
    padding: 5%;
  }
  
  .contact-container2 .container-headings {
    padding: 5%;
    padding-top: 10%;
    padding-bottom: 20%;
  }
}
