:root {
  --sidebar-width: 105px;
  --sidebar-transition: 0.3s;
  --main-color: #ff8800;
  --sidebar-background-color: #333;

  --section-color-1: #f6f6f6;
  --section-color-2: #e3e3e3;
  
  --title-color: rgba(0,0,0,80%);
  --icon-color: #000;
}
body.dark {
  --sidebar-background-color: #222;
  --section-color-1: #333;
  --section-color-2: #444;
  --title-color: #ddd;
  --icon-color: #fff;
}


/* === For Testing === */
section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 8vw;
  color: var(--title-color);
}
.home {
  background-color: var(--section-color-1);
}
.about {
  background-color: var(--section-color-2);
}
.services {
  background-color: var(--section-color-1);
}
.gallery {
  background-color: var(--section-color-2);
}
.testimonial {
  background-color: var(--section-color-1);
}
.contact {
  background-color: var(--section-color-2);
}


/* === Global Rules === */
* {
  box-sizing: border-box;
}

li {
  list-style: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}



/* === Scroll Bar === */
html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: #444;
}

::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 8px;
  opacity: 0.6;
}



/* === Side header === */
.side-header {
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  background-color: var(--sidebar-background-color);
  transition: var(--sidebar-transition);
  box-shadow: 0 0 10px #0000000c;
  user-select: none;
}

@media (max-width: 991px) {
  .side-header {
    transform: translateX(calc( 0px - var(--sidebar-width) ));
  }

  .side-header.open {
    transform: translateX(0px);
  }
}

/* logo */
.side-header .logo {
  width: 100%;
}

/* menu icon */
.menu-icon {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 31;
}

.menu-icon span {
  background-color: var(--icon-color) !important;
}

/* Nav */
nav {
  text-align: center;
  width: 100%;
}

nav span {
  display: block;
  cursor: pointer;
}

nav li {
  padding: 15px 4px;
  position: relative;
  cursor: pointer;
}

nav li::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 50%;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--sidebar-transition);
  opacity: 0;
}

body.dark nav li::before {
  background-color: var(--main-color);
}

nav li i {
  font-size: 20px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

nav li span {
  color: rgba(255,255,255,0.75);
}

nav li :where(i, span) {
  pointer-events: none;
  transition: var(--sidebar-transition);
}

nav li.active {
  pointer-events: none;
}

nav li.active, nav li:hover {
  background-color: #2a2a2a;
}

body.dark nav li.active,
body.dark nav li:hover {
  background-color: #1a1a1a;
}

nav li.active::before {
  opacity: 1;
  height: 100%;
}

nav li.active :where(i, span) {
  color: var(--main-color);
}

nav li:hover :where(i, span) {
  color: rgba(255,255,255,1);
}

nav li:hover::before {
  opacity: 0.2;
  height: 100%;
}

/* footer */
footer {
  margin-top: auto;
  text-align: center;
  padding: 0 6px;
}

footer p {
  color: #fff;
  font-size: 12px;
  margin: 8px 0;
}

footer p span {
  color: var(--main-color);
}

/* social icons */
.social-icons {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
}

.social-icons a {
  background-color: #444;
  padding: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--sidebar-transition);
}

.social-icons a i {
  color: rgba(255,255,255,0.75);
}

.social-icons a:hover i {
  color: rgba(255,255,255,1);
}

.social-icons a:hover {
  background-color: var(--main-color);
}



/* === Sections Wrapper === */
.sections-wrapper {
  padding-left: var(--sidebar-width);
  transition: var(--sidebar-transition);
}

@media (max-width: 991px) {
  .sections-wrapper {
    padding-left: 0;
  }
}


/* === go top button === */
.go-top-btn {
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0.75;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: var(--main-duration);
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  background-color: var(--main-color);
  border-radius: 6px;
  transition: 0.3s;
}

.go-top-btn.show {
  display: flex;
}

.go-top-btn:hover {
  opacity: 1;
}

.go-top-btn:hover i {
  animation: swing 0.3s alternate infinite ease-out;
}

@keyframes swing {
  to {
    transform: translateY(5px);
  }
}



/* === dark, light mode button === */
.theme-mode-btn {
  position: fixed;
  right: 0;
  top: 166px;
  z-index: 20;
  width: 30px;
  height: 30px;
  background-color: #333;
  border-radius: 6px 0 0 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid #ccc;
  border-right: none;
  opacity: 0.75;
}

body.dark .theme-mode-btn {
  border-color: #444;
}

#light {
  display: block;
  color: #999;
}
#dark {
  display: none;
  color: #fff;
}

body.dark #light {
  display: none;
}
body.dark #dark {
  display: block;
}
