/* Basic styles */
body {
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Light Mode */
body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.container {
    margin-right: auto;
    margin-left: auto;
    width: 100%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
}

/* Header styles */
/* Desktop Header Styles */
header {
    padding: 10px; 
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    /*margin-left: 20px;*/
    /*padding: 6px;*/
}

.header-left img{
    height:65px;
}

.logo {
    margin-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color:black; 
    text-decoration:none;
    font-size:20px;
}

/* Theme Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  margin-left: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  z-index: 2;
}

.light-icon {
  color: #f1c40f;
  font-size: 14px;
  z-index: 1;
}

.dark-icon {
  color: #2c3e50;
  font-size: 14px;
  z-index: 1;
}

input:checked+.slider {
  background-color: #34495e;
}

input:checked+.slider:before {
  transform: translateX(30px);
}

/* Desktop Navigation */
.header-right {
  display: flex;
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  position: relative;
  margin: 0 10px;
}

.menu a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  transition: 0.3s;
}

.menu a:hover {
  color: #4caf50;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 100;
  border-radius: 4px;
  padding: 10px 0;
  list-style: none;
}

.menu li:hover>.submenu {
  display: block;
}

.submenu .submenu {
  top: 0;
  left: 100%;
}

.submenu li {
  margin: 0;
  width: 100%;
}

.submenu a {
  padding: 8px 15px;
}

/* Mobile Menu Button - hidden on desktop */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* Dark Mode Styles */
body.dark-mode header {
  background: #1a1a1a;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode .menu a {
  color: #eee;
}

body.dark-mode .header-left a {
    color: #fff;
}

body.dark-mode .menu a:hover {
  color: #4caf50;
}

body.dark-mode .submenu {
  background: #222;
}

body.dark-mode .mobile-menu-toggle {
  color: #eee;
}

.search-container {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  /*margin-right: 20px;*/
}

input#searchBar {
  border: none;
  outline: none;
  background: transparent;
  width: 150px;
  transition: width 0.3s ease;
}

button.search {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

body.dark-mode input#searchBar {
  color: #eee;
}

body.dark-mode button.search {
  color: #eee;
}

@media(min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {

    .container {
        max-width: 960px;
        padding-left: 0px;
        padding-right: 0px;
    }

  .menu>li>a {
    padding: 10px 5px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {

    .container {
        max-width: 720px;
    }

  header {
    padding: 12px 15px;
  }

    .header-left {
        margin-left: 0px;
        padding: 0px;
    }

    .header-left img {
        height: 55px;
    }

  .switch {
    width: 50px;
    height: 26px;
    margin-left: 15px;
  }

  .slider:before {
    height: 18px;
    width: 18px;
  }

  input:checked+.slider:before {
    transform: translateX(24px);
  }

  .light-icon,
  .dark-icon {
    font-size: 12px;
  }

  /* Hide Desktop Menu */
  .header-right {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* height: calc(100vh - 60px); */
    overflow-y: auto;
  }

  body.dark-mode .header-right {
    background: #1a1a1a;
  }

  .header-right.active {
    display: block;
  }

  /* Vertical Mobile Menu */
  .menu {
    flex-direction: column;
    width: 100%;
  }

  .menu li {
    margin: 0;
    border-bottom: 1px solid #eee;
  }

  body.dark-mode .menu li {
    border-bottom: 1px solid #333;
  }

  .menu a {
    padding: 15px;
  }

  /* Show Mobile Menu Toggle */
  .mobile-menu-toggle {
    /*display: block;*/
    display: contents;
    position: absolute;
    right: 20px;
  }

  /* Submenu Styling for Mobile */
  .submenu {
    position: static;
    display: none;
    box-shadow: none;
    width: 100%;
    background: #f5f5f5;
    padding: 0;
  }

  body.dark-mode .submenu {
    background: #222;
  }

  .menu li.submenu-open>.submenu {
    display: block;
  }

  .submenu a {
    padding-left: 30px;
  }

  .submenu .submenu a {
    padding-left: 45px;
  }

  .menu i.fas {
    float: right;
    transition: transform 0.3s;
  }

  .menu li.submenu-open>a>i.fas {
    transform: rotate(180deg);
  }

  main {
    /*margin: 0px !important;*/
  }

  .search-container {
    margin-top: 0.5rem;
    width: 100%;
    margin-right: 0;
  }

  .searchForm {
    flex: 1;
  }

  input#searchBar {
    width: 95%;
  }
}

@media (max-width: 480px) {

    .container {
        max-width: 95%;
    }

    main {
        padding: 10px !important;
    }
    
  header {
    padding: 10px;
  }
    .header-left img {
        height: 45px;
    }

  .switch {
    width: 44px;
    height: 22px;
    margin-left: 10px;
  }

  .slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
  }

  input:checked+.slider:before {
    transform: translateX(22px);
  }

  .light-icon,
  .dark-icon {
    font-size: 10px;
  }

  .mobile-menu-toggle {
    right: 15px;
    font-size: 20px;
  }

  main {
    /*margin: 0px 14px !important;*/
  }

  .search-container {
    margin-top: 0.5rem;
    width: 100%;
    margin-right: 0;
  }

  input#searchBar {
    width: 88%;
  }
    .site-footer {
        flex-direction: column;
        gap: 12px;
    }

    .footer-left {
        padding-left: 0px !important;
    }

    .footer-right {
        padding-right: 0px !important;
    }
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Flex layout to push footer down */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Main grows to fill space */
main {
  flex: 1 0 auto;
  padding: 20px;
  /*margin: 0 140px;*/
}

header .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Footer styles */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px 0px 20px 0px;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
}

/* Links inside footer */
.site-footer a {
  color: #333;
  /*margin-right: 15px;*/
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-left {
    padding-left: 15px;
}

.footer-right {
    padding-right: 15px;
}
/* Dark Mode Footer */
body.dark-mode .site-footer {
    background-color: #121212;
    color: #f1f1f1;
    border-top: 1px solid #333;
}

body.dark-mode .site-footer a {
  color: #f1f1f1;
}

body.dark-mode .site-footer a:hover {
  color: #4caf50;
}


@media (max-width: 320px) {
  input#searchBar {
    width: 85%;
  }
}


@media (min-width: 769px) and (max-width: 945px) {
  .search-container {
    margin-top: 1rem;
    width: 100%;
    margin-right: 0;
  }

  .searchForm {
    flex: 1;
  }

  input#searchBar {
    width: 95%;
  }
}

.link-primary {
  text-decoration: none;
  color: #000000;
}

body.dark-mode .link-primary {
  color: #f1f1f1;
}

.link-primary:hover {
  text-decoration: none;
  color: #4caf50;
}

.link-secondary {
  text-decoration: none;
  color: #888;
}

body.dark-mode .link-secondary {
  color: #f1f1f1;
}

.link-secondary:hover {
  text-decoration: none;
  color: #4caf50;
}