/*
Theme Name: CBS Custom Theme
Author: C.B.Snow/ChatGPT
Version: 1.0
*/

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: #ccc; font-family: sans-serif; }

/* Layout */
.page-wrapper {
  display: flex;
#  border-left: 30px solid #ccc;
#  border-right: 30px solid #ccc;
#  padding: 5px 0;
  background-color: white;
  max-width: 750px;
  margin: 5px auto;
  min-height: calc(100vh - 10px);
  border: 5px double #888;
}

.sidebar {
  width: 150px;
  background-color: #0080FF;
  background-image: url("img/background.png");
  color: white;
  padding-top: 60px;
  z-index: 1;
#  border: 3px solid black;
  flex-shrink: 0; #workaround to keep sidebar from shinking to 120px
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu a {
  display: block;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-menu a:hover {
#  color: #ffcc00;
  color: #aaa;
}

.sidebar-menu li.menu-item-has-children > a::after {
  content: " >";
  float: right;
  font-size: 14px;
  color: #ccc;
}

.sidebar-menu ul {
  display: none;
  padding-left: 15px;
  background-color: #0080FF;
}

.sidebar-menu li:hover > ul {
  display: block;
}

.sidebar-menu ul li a {
  display: block;
  padding: 10px 15px;
  background-color: #0080FF;
  color: white;
  transition: transform 0.2s ease;
}

.sidebar-menu ul li a:hover {
  transform: translateX(10px);
#  color: #ffcc00;
  color: #aaa;
}

/* Main section */
.right-content { display: flex; flex-direction: column; flex: 1; }
.logo-wrapper { text-align: center; background-color: white; padding: 10px 0; }
.logo-img { height: 120px; width: auto; max-width: 100%; }

.menu-toggle {
  display: none !important;
}

.main {
  flex: 1;
  padding: 0;
}

.content-inner {
  max-width: 750px;
  margin: 0 auto;
  width: 100%;
}

/* Footer */
.site-footer {
  padding: 15px 20px;
  background-color: #ffffff;
  border-top: 1px solid #ccc;
  color: #c0c0c0;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-footer a {
  color: #c0c0c0;
  text-decoration: none;
}

.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 85%; /* make it tall enough for all but about.html */
  
  height: 0;
  overflow: hidden;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
    padding: 0;
    margin: 0;
    border: none;
  }

  .sidebar {
    position: absolute;
    top: 50px;
    left: 0;
    width: 150px;
    background-color: #0080FF;
    z-index: 9999;
    transform: translateY(-140%);
    transition: transform 0.3s ease;
  }

  .sidebar.active {
    transform: translateY(0);
  }

  .menu-toggle {
    display: block !important;
    background-color: #0080FF;
    color: white;
    font-size: 24px;
    padding: 10px;
    border: none;
    width: 100%;
    text-align: left;
    z-index: 10000;
    position: relative;
  }

  .main {
    margin-left: 0;
  }
}

.sidebar-menu .current-menu-item > a,
.sidebar-menu .current_page_item > a,
.sidebar-menu .current-menu-ancestor > a {
  color: black;
  font-weight: bold;
}

.sidebar-bottom-link {
  padding: 10px 15px;
  text-align: center;
#  background-color: #0066cc;
}

.sidebar-bottom-link a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.sidebar-bottom-link a:hover {
  text-decoration: underline;
}

.sidebar { /* to make the sidebar-bottom-link go to the bottom */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* ? pushes one child to top, one to bottom */
  height: 100vh;
}

