/* Review draft for the existing Twenty Ten site. Load after the parent CSS. */

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  background: #eee9e1;
  color: #302923;
}

#wrapper {
  width: min(1016px, calc(100% - 32px));
  margin: 24px auto;
  padding: 0 28px;
  border: 1px solid #ded5c9;
  box-shadow: 0 14px 42px rgba(47, 35, 24, .08);
}

#branding, #main, #colophon, #access,
#access .menu-header, #access div.menu {
  width: auto;
}

#header { padding-top: 26px; }
#branding { overflow: hidden; }
#site-title {
  float: none;
  width: auto;
  margin: 0;
  font: 600 clamp(27px, 3vw, 36px)/1.15 Georgia, serif;
}
#site-title a { color: #2e2924; }
#site-description {
  float: none;
  clear: none;
  width: auto;
  margin: 7px 0 22px;
  color: #725e4c;
  font: italic 16px/1.4 Georgia, serif;
}
#branding img {
  float: none;
  width: 100%;
  height: clamp(150px, 20vw, 208px);
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 3px 3px 0 0;
}

#access {
  float: none;
  margin: 0;
  background: #352d26;
  border-radius: 0 0 3px 3px;
}
#access div.menu { margin: 0; }
#access .menu > ul {
  display: flex;
  flex-wrap: wrap;
  width: auto;
  margin: 0;
  padding: 0 8px;
}
#access .menu > ul > li { float: none; }
#access a {
  color: #f7f0e6;
  padding: 13px 16px;
  line-height: 1.35;
  font-size: 14px;
}
#access li:hover > a, #access li:focus-within > a,
#access ul li.current_page_item > a,
#access ul li.current_page_ancestor > a {
  background: #62412f;
  color: #fff;
}
#access ul li:focus-within > ul { display: block; }
#access ul ul { top: 45px; }
#access ul ul a { background: #352d26; }

#main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: clamp(28px, 4vw, 52px);
  padding: 38px 6px 24px;
  overflow: visible;
}
#container, #primary {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  overflow: visible;
}
#content { margin: 0; }
#content, #content input, #content textarea {
  color: #302923;
  font-size: 17px;
  line-height: 1.65;
}
#content .entry-title {
  color: #302923;
  font: 600 clamp(28px, 3vw, 34px)/1.2 Georgia, serif;
  margin-bottom: 14px;
}
.entry-content { padding-top: 0; }
#content p { margin-bottom: 20px; }
#content a { color: #8a452b; }
#content a:hover { color: #542a1a; }
#content img, #content video {
  max-width: 100%;
  height: auto;
}
#content audio { display: block; width: 100%; max-width: 100%; height: 54px; }
.home #content .entry-content > p strong { font-weight: 400; }
.home #content .entry-content > p:first-child {
  font-size: 20px;
  line-height: 1.5;
}
.home #content .ngg-galleryoverview { margin: 26px auto 8px; }
.home #content .slideshowlink { margin: 8px auto 0; text-align: center; }

#primary #search-2, #primary #nav_menu-2, #primary #meta-2 { display: none; }
#primary .widget-title {
  color: #604b3c;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 12px;
}
#primary .widget-container { margin-bottom: 28px; }
#primary .ngg-widget { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#primary .ngg-widget a, #primary .ngg-widget img { display: block; width: 100%; height: auto; }
#primary .textwidget { color: #66594d; line-height: 1.55; }

#footer, #colophon { width: auto; }
#colophon { border-top: 1px solid #d8cdbf; }
#site-info, #site-generator { float: none; width: auto; }
#site-generator { margin-top: 8px; }

@media (max-width: 740px) {
  #wrapper {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 0 16px;
  }
  #header { padding-top: 20px; }
  #site-title { font-size: clamp(25px, 7vw, 32px); }
  #site-description { margin-bottom: 16px; font-size: 15px; }
  #branding img { height: 150px; }
  #access .menu > ul { padding: 4px; }
  #access a { padding: 11px 12px; font-size: 14px; }
  #access .page_item_has_children { flex-basis: 100%; }
  #access .page_item_has_children > ul,
  #access .page_item_has_children:hover > ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: static;
    float: none;
    width: 100%;
    padding: 0 4px 8px;
    box-shadow: none;
    background: transparent;
  }
  #access .page_item_has_children > ul li { float: none; min-width: 0; }
  #access .page_item_has_children > ul a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    padding: 8px 2px;
    background: #473930;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }
  #main { display: block; padding: 28px 2px 20px; }
  #content .entry-title { font-size: 29px; }
  #content { font-size: 16px; line-height: 1.6; }
  #primary {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #d8cdbf;
  }
  #primary .ngg-widget { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
  #primary .ngg-widget { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content img.alignleft { float: none; display: block; margin: 0 0 14px; }
}
