/* The gallery part of this code was based on a project from https://blog.logrocket.com/how-create-responsive-image-gallery-css-flexbox/ */
/* The project that was used can be found at https://by9sfe.csb.app/ */

/* ======================================
Responsive Image gallery Style rules
======================================*/

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700;800;900&display=swap');

:root {
  --navbar: rgba(230, 230, 230, 0.8);
  --navText: rgba(43, 43, 44, 0.7);
  --navText2:rgba(17, 19, 17, 0.8);
  --preOverlayLight: rgba(255, 255, 255, 0);
  --preOverlayDarkText: rgba(43, 43, 44, 0);
  --overlayLight: rgba(255, 255, 255, 0.9);
  --overlayDarkText: rgba(43, 43, 44, 1);
  --labelLightText: rgb(255, 255, 255);
  --labelDark: rgba(43, 43, 44, 0.85);
  --panelBorderMid: rgba(124, 124, 125, 0.45);
  --hamburgerMenu: rgba(230, 230, 230, 0.9);
  --tech: rgba(255, 255, 255, 0.4);

  --light-pink: #f0b7b1;
  --lime: #b6fc4c;

  /* colour palette from https://coolors.co/palette/ffa69e-faf3dd-b8f2e6-aed9e0-5e6472 */
  --pink: #ffa69e;
  --cream: #faf3dd;
  --light-blue: #b8f2e6;
  --mid-blue: #aed9e0;
  --grey: #626764;

  /* colour palette from https://coolors.co/palette/faf3dd-c8d5b9-8fc0a9-68b0ab-696d7d */
  --green1a: #fdfbf5;
  --green1: #faf3dd;
  --green2: #c8d5b9;
  --green2Ref: rgb(200, 213, 185);
  --green2b: #e7f1dd;
  --green2c: #fbfde3;
  --green3: #8fc0a9;
  --green3b: #aecebf;
  --green4: #68b0ab;
  --green4Ref: rgb(104, 176, 171);
  --green5: #696d7d;
  --green6: rgba(74, 90, 68, 0.7);

  --brown: #ac9a7a;
  --fawn: #c2b6a3;
}

.bold {
  font-weight: bold;
}

.bold-btn {
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Raleway', sans-serif;
  color: var(--navText);
}

.break-line {
  background-color: var(--brown);
  height: 1px;
}

.break-line2 {
  background-color: var(--fawn);
  height: 3px;
}

/* NAVBAR */

nav {
  background-color: #c8d5b9;
  background-size: cover;
  padding: 7px 0;
  z-index: 0;
  transition: background-color 3s ease;
}

.nav-container {
  /* outer container for all NAVBAR elements */
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 90vw; /* USE SAME SETTING for .nav-containter, .gallery-container, .focus-container & .footer-container */
  margin: 0 auto;
  padding: 0 20px; /* standard 20px side padding for all outer containers */
  overflow: hidden;
  min-height: 65px;
}

.nav-left {
  display: flex;
  align-items: center;
  height: inherit;
}

.navlist {
  display: flex;
  justify-content: flex-end;
  max-width: 700px;
}

.navlist p {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
}

.nav-btn {
  flex: 0 0 20px;
  text-align: center;
  margin: 0 4px; /* Any change made here should also be made to margin in .github-link-btn  */
  border-radius: 15px;
  padding: 5px 4px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  border: 1px var(--green3b) solid;
}

.nav-link {
  background-color: var(--green2b);
  color: var(--navText);
}

.nav-link:hover {
  background-color: var(--green1a);
  color: var(--navText2);
}

.external-nav-link {
  background-color: var(--green6);
  color: var(--green2b);
  text-decoration: none;
}

.external-nav-link:hover {
  background-color: var(--navText2);
  color: var(--lime);
}

.github-link-btn {
  background-color: var(--green1a);
  margin: 0 0 0 4px;
}

.github-link-btn:hover {
  background-color: var(--lime);
  border: 1px var(--navText2) solid;
}

.github-logo {
  max-width: 60px;
}

.longlink1 {
  flex-basis: 80px;
}
.longlink2 {
  flex-basis: 145px;
}
.shortlink1 {
  flex-basis: 50px;
}
.shortlink2 {
  flex-basis: 40px;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.burgerBar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--navText);
  z-index: 1;
}

nav h1 {
  font-size: 2.2rem;
  font-weight: normal;
  flex: 1 400px;
  color: var(--navText);
  transition: color 7s ease;
}

nav li {
  font-weight: bold;
}

.logo-image {
  max-width: 60px;
  margin-right: 15px;
  opacity: 0.7;
  transition: opacity 4s ease;
}

.logo-image:hover {
  opacity: 0.1;
}

.logo-image:hover ~ h1 {
  color: #adfe2f;
}

/* PANEL GALLERY */

#gallery-section {
  background-color: var(--green1);
  transition: background-color 3s ease;
}

.galleryContainer {
  /* outer container for all PANEL SECTION elements */
  padding: 40px 20px 40px; /* standard 20px side padding for all outer containers */
  max-width: 90vw; /* USE SAME SETTING for .nav-containter, .gallery-container, .focus-container & .footer-container */
  margin: 0 auto;
}

.image-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
}

.image-gallery > li {
  flex: 1 1 300px;
  position: relative;
  cursor: pointer;
  max-height: 300px;
}

.image-gallery li img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  vertical-align: middle;
  border-radius: 25px;
}

.panel-label {
  position: absolute;
  width: 100%;
  height: 20%;
  background-color: var(--labelDark);
  top: 0;
  left: 0;
  transition: all 0.8s ease-in-out;
  color: var(--labelLightText);
  border-radius: 25px 25px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 17px;
  font-size: 1.7rem;
  text-align: center;
}

.long-title-1 {
  font-size: 1.5rem;
}

.long-title-2 {
  font-size: 1.35rem;
}

.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--preOverlayLight);
  top: 0;
  left: 0;
  transition: all 0.4s ease-in-out;
  color: var(--preOverlayDarkText);
  border: 1px var(--panelBorderMid) solid;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  font-size: 1.1rem;
  text-align: center;
}

.long-text-1 {
  font-size: 1rem;
}

.short-text-1 {
  font-size: 1.2rem;
}

/* ACTIVE INFO PANELS */

.infoActiveOverlay {
  background-color: var(--overlayLight);
  color: var(--overlayLightText);
  border: 1px var(--labelDark) solid;
}

.infoActivepanel-label {
  background-color: var(--preOverlayLight);
  color: var(--preOverlayDarkText);
}

/* FOCUS SECTION (bottom section) */

#focus-section {
  background-color: var(--green3b);
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 40px 0 20px;
  align-items: center;
}

.focus-container {
  /* containing all FOCUS elements on both sides */
  display: flex;
  justify-content: space-between;
  /* align-items: start; */
  max-width: 90vw; /* USE SAME SETTING for .nav-containter, .gallery-container, .focus-container & .footer-container */
  padding: 0 20px; /* standard 20px side padding for all outer containers */
}

.focus-text {
  /* containing LEFT side TEXT title and para elements */
  flex: 1 1 150px;
  margin-right: 30px;
  display: flex;
  flex-direction: column;
}

#focus-heading {
  margin: 0 auto;
  margin-bottom: 15px;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--navText2);
}

#focus-subheading {
  margin-bottom: 15px;
  font-size: 1.6rem;
}

#technologies {
  background-color: var(--tech);
  padding: 3px 10px;
  border-radius: 15px;
  box-shadow: 0 0 5px 4px var(--tech); /* offset-x | offset-y | blur-radius | spread-radius | color */
  display: inline-flex;
  margin: 0 auto 10px;
}

#focus-para-1,
#focus-para-2 {
  margin: 0 auto;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.bottom-of-page-btn {
  text-align: center;
  margin: 0 auto;
  padding: 8px 15px;
  background-color: var(--green1);
  color: var(--green6);
  border-radius: 15px;
  border: 1px #ccc solid;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

.middle-btn {
  margin-left: 20px;
  margin-right: 20px; 
}

.focus-frame {
  /* conataining RIGHT side message and IFRAME elements */
  flex: 3 1 250px;
  padding: 0 0 30px;
}

#focus-page-message {
  text-align: center;
  margin: 0 auto;
  margin: -12px 0 8px;
  font-size: 0.9rem;
}

.iframe-container {
  position: relative;
  width: 100%;
  min-height: 20vh;
  border: 1px var(--labelDark) solid;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.6);
  padding-bottom: calc(45%);
  transition: padding-bottom 1s ease;
}
.iframe-container iframe {
  background-color: var(--cream);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* TECHNOLOGIES ICON SPACING */

.left-space-1 {
  margin-left: 1px;
}

.left-space-2 {
  margin-left: 2px;
}

.left-right-space-minus {
  margin: 0 -6px;
}

#bottom-btns {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* FOOTER */

footer {
  background-color: var(--green5);
  padding: 15px 0;
  text-align: center;
}

.footer-container {
  max-width: 90vw; /* USE SAME SETTING for .nav-containter, .gallery-container, .focus-container & .footer-container */
  margin: 0 auto;
}

footer p {
  font-size: 0.8rem;
  color: #fff;
}

/* RESPONSIVE */

@media (max-width: 2300px) {
  .iframe-container {
    padding-bottom: calc(50%);
  }
}

@media (max-width: 2200px) {
  .iframe-container {
    padding-bottom: calc(60%);
  }
}

@media (max-width: 1900px) {
  .iframe-container {
    padding-bottom: calc(70%);
  }
  #focus-para-1,
  #focus-para-2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 1750px) {
  .iframe-container {
    padding-bottom: calc(80%);
  }
  #focus-para-1,
  #focus-para-2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 1600px) {
  .iframe-container {
    padding-bottom: calc(90%);
  }
  #focus-para-1,
  #focus-para-2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 1500px) {
  .iframe-container {
    padding-bottom: calc(90%);
  }
}

@media (max-width: 1400px) {
  .iframe-container {
    padding-bottom: calc(90%);
  }
  .navContainer {
    max-width: 100vw;
  }
  nav h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 1330px) {
  #focus-para-1,
  #focus-para-2 {
    font-size: 1rem;
  }
}

@media (max-width: 1250px) {
  .iframe-container {
    padding-bottom: calc(60%);
    width: 90vw;
  }
  .focus-container {
    flex-direction: column;
    align-items: center;
  }
  #focus-page-message {
    margin: 20px 15px 8px;
  }
  #focus-heading,
  #focus-para-1,
  #focus-para-2 {
    text-align: center;
  }
  #focus-para-1,
  #focus-para-2 {
    font-size: 1rem;
  }
}

@media (max-width: 1100px) {
  nav h1 {
    display: none;
  }
}

@media (max-width: 980px) { /* Initiate hamburger menu */
  nav h1 {
    display: block;
  }
  nav {
    padding: 0;
  }
  .hamburger {
    display: block;
  }
  .hamburger.active .burgerBar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .burgerBar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .burgerBar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .navlist {
    position: fixed;
    top: -100%;
    gap: 0;
    flex-direction: column;
    background-color: var(--hamburgerMenu);
    width: 100%;
    max-width: 1000px;
    text-align: center;
    transition: opacity 0.8s ease;
    z-index: 1;
    padding-top: 10px;
    opacity: 0;
  }
  .nav-btn {
    margin: 2px 0;
    flex: 1 1 40px;
  }
  .navlist.active {
    left: 0;
    top: 65px;
    opacity: 1;
  }
  .github-logo {
    max-width: 25px;
  }
}

@media (max-width: 650px) {
  .iframe-container {
    width: 95vw;
  }
}

@media (max-width: 620px) {
  #bottom-btns {
    flex-direction: column;
  }
  .middle-btn {
    margin: 10px auto;
  }
  .bottom-of-page-btn {
    min-width: 100%;
    padding: 8px 25px;
  }
}

@media (max-width: 370px) {
  nav h1 {
    font-size: 1.4rem;
    padding: 5px 10px;
    text-align: center;
  }
  .logo-image {
    margin: 0;
  }
}

@media (max-width: 270px) {
  nav h1 {
    font-size: 1.2rem;
  }
  .logo-image {
    max-width: 40px;
  }
}

