/*
Styles for the base sections of the Golden Armour
Website. Written by Braylyn Williams 2025
*/

/* universal selector */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* body selector */
body {
  background-color: rgb(73, 73, 72);
  color: #000000;
  font-family: "Merriweather", sans-serif;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease-in-out;
  line-height: 1.4;
}

.bold {
  font-weight: bold;
  font-size: 110%;
}

.bold-and-italic {
  font-weight: bold;
  font-style: italic;
  font-size: 110%;
}

.sublist {
  font-weight: normal;
  font-size: 100%;
}

.italic {
  font-style: italic;
  font-size: 110%;
}

.italic-center {
  text-align: center;
  font-style: italic;
}

.center {
  text-align: center;
}

.center-and-bold {
  text-align: center;
  font-weight: bold;
  font-size: 110%;
}

/* HEADER STYLING #################################### */

/* header element */
header {
  display: flex;
  background-color: #000000;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 0 20px;
  height: 100px;
  width: 100%;
}

/* header anchor selector */
header a,
footer a {
  text-decoration: none;
  color: rgb(235, 164, 34);
  transition: text-shadow 0.2s ease, color 0.2s ease;
}

header a:visited {
  color: rgb(235, 164, 34);
}

header a:hover {
  color: rgb(235, 164, 34);
}

header #left-vid,
header #right-pics {
  height: 130px;
  width: 200px;
  top: 50%;
  position: absolute;
  transform: translateY(-50%);
}

header #left-vid {
  left: 15%;
}

header #right-pics {
  right: 15%;
}

#welcome {
  text-align: center;
  color: rgb(255, 187, 60);
  filter: drop-shadow(1px 4px 0.1rem rgb(0, 0, 0));
  letter-spacing: 1px;
  padding: 5px;
  margin: 70px auto;
}

/* responsive to mobile */

/* NAV STYLING #################################### */
nav {
  background-color: rgb(196, 147, 55);
  width: 250px; /* Fixed width for desktop */
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  padding-top: 100px;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Hide horizontal scrolling */
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  text-align: left; /* Align menu items to the left */
  padding-bottom: 20px; /* Add bottom padding for better scrolling */
}

nav li {
  border-bottom: 1px solid #000000;
}

nav a {
  text-decoration: none;
  display: block;
  padding: 1em 2em;
  color: #ffffff;
  font-size: 1em; /* Standard font size for desktop */
  box-sizing: border-box;
}

nav a:hover {
  background-color: rgba(129, 91, 20, 0.84);
}

/* When menu is open */
nav.open {
  transform: translateX(0);
}

/* Hamburger Button */
.hamburger {
  position: fixed;
  top: 15px;
  left: 15px;
  color: rgb(196, 147, 55);
  background-color: #000000;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 24px;
  z-index: 1000;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* When menu is open, change hamburger symbol*/
.hamburger.open {
  background-color: rgba(196, 147, 55, 0.64);
  color: #ffffff;
}

/* Prevent content from being visible behind the menu */
body.menu-open {
  overflow: visible; /* Allow scrolling when menu is open */
}

/* Content area next to the nav */
#content,
#footer,
#header {
  padding: 20px;
  transition: margin-left 0.3s ease-in-out;
  width: 100%;
}

/* When nav is open, shift content */
#content.menu-open {
  width: calc(70% - 250px);
  margin-left: 250px;
}

#header.menu-open {
  width: calc(100% - 250px);
  margin-left: 250px;
}

#footer.menu-open {
  width: calc(100% - 250px);
  margin-left: 250px;
}

/* nav ul ul selector */
nav ul ul {
  position: relative;
  display: none;
  z-index: 9999;
  width: 100%;
}

/* li selector for nav ul ul */
nav ul ul li {
  display: block;
  background-color: rgb(196, 147, 55);
  text-align: left;
}

/* hover for li selector */
nav li.active > ul {
  display: block;
}

/* nav ul ul selector */
nav ul ul ul {
  position: relative;
  display: none;
}

/* li selector for nav ul ul */
nav ul ul ul li {
  display: block;
  background-color: rgb(196, 147, 55);
  text-align: left;
}

/* hover for li selector */
nav li:hover ul ul {
  display: block;
}

/* Ensure dropdown menus are displayed correctly */
nav ul ul {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background-color: rgb(196, 147, 55);
  padding: 0;
  margin: 0;
  list-style: none;
  width: 200px;
}

nav ul li:hover > ul {
  display: block;
}

nav ul ul li {
  border-bottom: 1px solid #000000;
}

nav ul ul a {
  padding: 10px 15px;
  color: #ffffff;
}

nav ul ul a:hover {
  background-color: rgba(129, 91, 20, 0.84);
}

/* Hide nav for larger screens */
@media (min-width: 768px) {
  nav {
    transform: translateX(-100%);
  }

  /* nav ul selector */
  nav ul {
    flex-flow: row nowrap;
    justify-content: space-around;
    padding-right: 2em;
  }

  /* nav list item */
  nav li {
    width: 12em;
    border-bottom: none;
    position: relative;
  }

  /* nav ul ul dropdown menu */
  nav ul ul {
    padding-top: 10px;
    position: absolute;
  }

  /* li in nav ul ul selector */
  nav ul ul li {
    border-bottom: 1px solid rgba(129, 91, 20, 0.84);
  }
}

/* MOBILE VIEW (Fullscreen Menu) */
@media (max-width: 768px) {
  nav {
    width: 100%; /* Full width for mobile */
  }

  nav ul {
    text-align: center; /* Center menu items */
  }

  nav a {
    font-size: 1.5em; /* Larger font for better readability */
    padding: 1.5em;
  }
}

/* DESKTOP VIEW (Sidebar Menu) */
@media (min-width: 769px) {
  nav {
    width: 250px; /* Fixed width for desktop */
  }

  #content.menu-open,
  #header.menu-open,
  #footer.menu-open {
    margin-left: 250px; /* Shift content to the right */
    width: calc(100% - 250px);
  }
}

/* CONTENT STYLING #################################### */

/* content div */
#content {
  margin: auto;
  padding: 25px 10px;
  width: 80%;
  flex: 1;
}

#welcome {
  text-align: center;
  color: rgb(235, 164, 34);
}

.grid-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  background-color: rgb(73, 73, 72);
}

.grid-item {
  background-color: rgb(182, 181, 171);
  padding: 15px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.grid-item img {
  height: 170px;
  width: 170px;
  filter: drop-shadow(0 0 0.75rem rgb(0, 0, 0));
}

.maincont {
  background-color: rgb(182, 181, 171);
  padding: 15px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease-in-out;
  margin-bottom: 30px;
}

.maincont h1,
.maincont h2 {
  text-align: center;
}

.headerShields {
  height: 60px;
  margin: 50px;
}

.shieldbackground {
  position: relative;
  padding: 20px;
}

.shieldbackground::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/media/blankshield.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.2;
  z-index: 0;
}

.shieldbackground h1,
.shieldbackground h2,
.shieldbackground ul,
.shieldbackground ol,
.shieldbackground h3,
.shieldbackground h4,
.shieldbackground p {
  position: relative;
  z-index: 1;
  padding: 10px;
}

.shieldbackground h1,
.shieldbackground h2,
.shieldbackground h3,
.shieldbackground h4 {
  text-align: center;
}

#center-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.right {
  text-align: right;
}

.left {
  text-align: left;
}

.grid-item:hover {
  box-shadow: 0px 0px 25px rgb(196, 147, 55);
  transform: translateY(-10px);
}

.grid-item a {
  text-decoration: none;
}

.grid-item a:link {
  color: #000000;
}

.grid-item a:visited {
  color: #000000;
}

.grid-item a:hover {
  color: #000000;
}

span #smiley {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.horizontal-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0;
  margin: auto;
  width: 90%;
  list-style: disc;
  padding-left: 20px;
}

.horizontal-list li {
  margin: 0;
  padding: 5px 10px;
  text-align: left;
  min-width: 200px;
  display: list-item;
  margin-left: 0;
}

.center-list {
  margin: auto;
  width: 60%;
  max-width: 600px;
  text-align: left;
  list-style-position: inside;
}

@media (max-width: 700px) {
  .grid-container {
    flex-direction: column;
  }

  .horizontal-list {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .horizontal-list li {
    min-width: auto;
    width: 100%;
    text-align: left;
  }
}

/* Category row styling */
.category-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  width: 80%;
  margin: auto;
}

/* container for two-column layout */
.two-column-container {
  display: flex;
  gap: 30px;
  margin: 10px auto;
  justify-content: center;
  align-items: flex-start;
  width: 70%;
  max-width: 700px;
}

.two-column-left,
.two-column-right {
  flex: 1;
  max-width: 48%;
}

.two-column-left ol,
.two-column-right ol,
.two-column-left ul,
.two-column-right ul {
  margin: 0;
  padding-left: 20px;
}

/* Legacy support - keep benefits classes for backward compatibility */
.benefits-container {
  display: flex;
  gap: 30px;
  margin: 20px auto;
  justify-content: center;
  align-items: flex-start;
  width: 80%;
  max-width: 900px;
}

.benefits-left,
.benefits-right {
  flex: 1;
  max-width: 48%;
}

.benefits-left ol,
.benefits-right ol {
  margin: 0;
  padding-left: 20px;
}

/* Responsive design for two-column containers */
@media (max-width: 768px) {
  .two-column-container,
  .benefits-container {
    flex-direction: column;
    gap: 20px;
  }

  .two-column-left,
  .two-column-right,
  .benefits-left,
  .benefits-right {
    max-width: 100%;
  }
}

.category-row a {
  text-decoration: none;
}

.category-item {
  position: relative;
  width: 100px;
  height: 100px;
  text-align: center;
}

.category-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover img {
  transform: scale(1.05);
  box-shadow: 0px 0px 15px rgba(255, 215, 0, 0.7);
}

.category-name {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 5px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .category-row {
    flex-direction: column;
    align-items: center;
  }

  .category-item {
    width: 80%;
    height: auto;
  }

  .maincont {
    padding: 10px;
  }

  .shieldbackground h1,
  .shieldbackground h2,
  .shieldbackground p {
    font-size: 1.2em;
  }

  .category-item img {
    width: 200px;
    height: 200px;
  }

  .category-name {
    font-size: 20px;
    padding: 1px 3px;
  }

  header h1 {
    text-align: center;
    padding-top: 20px;
  }

  .headerShields {
    display: none;
  }

  /* Mobile menu enhancements for all pages */
  nav {
    width: 280px; /* Fixed width instead of full screen for better UX */
    overflow-y: auto; /* Enable vertical scrolling on mobile */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

  nav ul {
    padding-bottom: 30px; /* Extra bottom padding for mobile scrolling */
  }

  /* Hamburger menu improvements */
  .hamburger {
    font-size: 28px;
    padding: 12px 18px;
    border-radius: 5px;
    z-index: 1001;
    position: fixed !important;
    top: 15px;
    left: 15px;
  }

  /* Mobile body menu-open behavior */
  body.menu-open {
    overflow: visible; /* Allow scrolling on mobile when menu is open */
    position: static; /* Remove fixed positioning to allow natural scrolling */
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Extra small screens menu adjustments */
  nav {
    width: 100%; /* Full width for mobile consistency */
    padding-top: 70px;
    overflow-y: auto; /* Ensure scrolling on small screens */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile devices */
  }

  nav ul {
    padding-bottom: 40px; /* Extra bottom padding for small screen scrolling */
  }

  /* Hamburger positioning for small screens */
  .hamburger {
    top: 10px;
    left: 10px;
    font-size: 24px;
    padding: 10px 15px;
  }

  /* Mobile body menu-open behavior for small screens */
  body.menu-open {
    overflow: visible; /* Allow scrolling on mobile when menu is open */
    position: static; /* Remove fixed positioning to allow natural scrolling */
    width: 100%;
  }
}

/* FOOTER STYLING #################################### */

#footer {
  background-color: #000000;
  color: #ffffff;
  text-align: center;
  padding: 10px 0;
  width: 100%;
}

/* ID selector for the back to top link */
#backToTop {
  text-decoration: none;
  color: rgb(196, 147, 55);
}

.footer-separator {
  border: none;
  border-top: 2px solid rgba(235, 165, 34, 0.623);
  width: 400px;
  margin: 20px auto;
  opacity: 0.9;
}
