/* Page Setup + Mixins */
@import url(reset.css);
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }

.cf:before,
.cf:after {
  content: " ";
  /* 1 */
  display: table;
  /* 2 */ }

.cf:after {
  clear: both; }

.cf {
  *zoom: 1; }

/* General Styles */
body {
  background: #fefcf1;
  color: #303030;
  font-family: 'Open Sans', sans-serif;
  position: relative;
  left: 0;
  -webkit-font-smoothing: antialiased !important; }

html.no-js #fallback-nav {
  display: block; }
html.no-js .fade {
  display: none; }
html.no-js #navicon {
  display: none; }

html.js #fallback-nav {
  display: none; }

#fallback-nav {
  float: right; }
  #fallback-nav li {
    display: inline-block; }
    #fallback-nav li a {
      display: inline-block;
      padding: 10px;
      text-decoration: none;
      color: #303030;
      border: 1px solid #f8da5f; }
      #fallback-nav li a:hover, #fallback-nav li a.current {
        background: #fae590;
        border: 1px solid #e7bc0a; }

header {
  background: #f8da5f;
  padding: 20px;
  z-index: 0; }

h1 {
  font-weight: bold;
  font-size: 2.3em;
  font-family: 'Montserrat', sans-serif;}

h2 {
  font-size: 2em;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif; }

#main-content {
  max-width: 580px;
  margin: 50px auto;
  padding: 0 30px; }

article {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 5px solid #f8da5f; }

.date {
  color: #999;
  font-size: 0.8em;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 20px;
  display: inline-block; }

#main-nav p {
  font-size: 0.7em;
  line-height: 1.4em; }

#main-nav a {
  color: #34495e; }
  a:hover {
    color: #587ca0; }

h2 a {
  text-decoration: none; }

.older {
  background: #34495e;
  color: white;
  padding: 10px;
  text-decoration: none;
  margin-bottom: 20px; }
  .older:hover {
    color: white;
    background: #587ca0; }

#navicon {
  float: right;
  font-size: 2em;
  text-decoration: none;
  position: relative;
  z-index: 9; }

#navicon.open {
  color: white; }
  #navicon.open:hover {
    color: #e6e6e6; }


.close-btn {
background: #000000;
}










/* Nav container: use stable viewport height to prevent jump on tap */
#main-nav {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -moz-box-orient: vertical;
  -moz-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  max-height: 85vh;
  z-index: 50;
  top: -100vh;
  position: fixed;
  background: #222;
  text-align: center;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  overflow-y: auto;
  height: auto;
}














/* Equal-height menu items that fill the column */


#main-nav a {
  /* Button distribution */
flex: 0 0 auto;
  min-height: 0;            /* allow shrinking when many items */
  
  /* Center label */
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;

  /* Touch-target & text */
  box-sizing: border-box;
  padding: 10px 16px;
  line-height: 1.2;
  font-size: 14px;          /* avoids iOS auto-zoom */

  /* Visuals */
  color: #fff;
  text-decoration: none;
  border-top: 1px solid #555;



  /* Kill mobile tap quirks without changing layout */
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  outline: none;
  touch-action: manipulation;
  user-select: none;

  /* Prevent subpixel jiggle on press */
  transform: translateZ(0);
}

/* Active/focus states that don't affect height */
#main-nav a:focus,
#main-nav a:active {
  background: #3c3c3c;
  outline: none;
}

/* Hover/current without size change */
#main-nav a:hover,
#main-nav a.current {
  background: #3c3c3c;
}








/* Folder title row */
.nav-folder-title {
  display: flex;
  color: #fff;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px; /* match your existing <a> padding */
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  font-size: 16px;
}

.nav-folder-title:hover {
  background: rgba(255,255,255,0.1); /* adjust to match your hover style */
}

/* Arrow rotates when open */
.folder-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.7em;
}

.nav-folder.open .folder-arrow {
  transform: rotate(180deg);
}

/* Hidden by default, slides open */
.nav-folder-items {
  display: none;
  overflow: hidden;
}

/* Indent sub-items slightly */
.nav-folder-items a div {
  padding-left: 0px; /* adds visual hierarchy */
}












/* Optional: replace the real border with an inset shadow so borders don't
   "steal" height from the equal flex math (purely cosmetic) */
/*
#main-nav a {
  border-top: none;
  box-shadow: inset 0 1px 0 #555;
}
*/















.fade {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #000;
  opacity: 0.5; }
