
/* the menu buttons only exist for narrow windows */
.nb-menu-toggle, .nb-sub-toggle { display: none; }
/* Responsive layout for the static neurobureau.org archive.
   The Neutica theme is fixed at 985px wide; on the old WordPress site phones got Jetpack's separate
   mobile theme instead. This file makes the archive follow the window width:
     - up to 1000px: single-column layout (phones, tablets, narrow browser windows)
     - 761-1000px:   same, kept to a comfortable reading width and centred, 3 gallery images per row
     - over 1000px:  the original desktop design, centred in the window */

@media (max-width: 1000px) {
html, body { overflow-x: hidden; }
body { min-width: 0 !important; -webkit-text-size-adjust: 100%; }
#ntca-grid { display: none !important; }

/* every fixed-width container becomes fluid */
#page { width: auto !important; margin: 0 !important; padding: 0 14px !important; box-sizing: border-box; }
#page #masthead, #page #masthead #branding, #page #main, #page #colophon,
#page #main #primary, #page #main #primary #content, #page #main #secondary,
#column_wrapper, #column_wrapper .aside, #main .hentry:not(.featured), .home #featured-slider,
#main .hentry .entry-header, #main .hentry .entry-meta, #main .hentry .entry-header .entry-title,
#main .hentry.full .entry-header, #main .hentry.full .entry-header .entry-title,
#main .hentry.full .entry-header .entry-meta, #main .hentry.full .entry-content,
.single #content .hentry .entry-header, .single #content .hentry .entry-header .entry-title,
.single #content .hentry .entry-header .entry-meta, .single #content .hentry .entry-content,
.page #content .hentry .entry-header, .page #content .hentry .entry-header .entry-title,
.page #content .hentry .entry-content, .page-title, .archive-meta, #comments, #comments #respond,
#comments .commentlist li.comment article.comment .comment-content,
#colophon .site-copyright, #colophon .site-info,
.navigation, .paging-navigation, .post-navigation, .attachment-nav,
#main .hentry .entry-summary blockquote, #main .hentry .entry-content blockquote,
#main .hentry .entry-summary .page-links, #main .hentry .entry-content .page-links,
#main .hentry .entry-summary .gallery, #main .hentry .entry-content .gallery,
#main .hentry .entry-summary ul#archives-page, #main .hentry .entry-content ul#archives-page,
#main .hentry .entry-summary ul li.content-column, #main .hentry .entry-content ul li.content-column {
  width: auto !important; max-width: 100% !important; float: none !important;
  margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box;
}
#page #main #secondary { margin-top: 30px !important; }
#main .hentry .entry-header, #main .hentry .entry-meta { margin-left: 0 !important; }
#main .hentry .entry-header .entry-title { margin: 0 0 6px !important; }
#main .hentry.full .entry-header .entry-title,
.single #content .hentry .entry-header .entry-title,
.page #content .hentry .entry-header .entry-title { font-size: 30px !important; line-height: 1.1 !important; padding: 0 !important; }
#main .hentry .entry-summary blockquote, #main .hentry .entry-content blockquote { font-size: 19px !important; }

/* header: as on desktop - white banner with the logo on the right, blue site title over its left side */
#masthead { margin-bottom: 12px !important; }
#masthead #branding, #masthead hgroup#branding {
  width: auto !important; height: auto !important; display: block !important;
  background-color: #ffffff !important; padding: 0 !important; margin: 0 !important; position: relative;
}
#masthead #branding .header-image, #masthead .header-image {
  position: relative !important; top: auto !important; left: auto !important; z-index: 1;
  display: block !important; width: 100% !important; height: auto !important; max-width: none !important;
}
#masthead .site-title {
  display: block !important; position: absolute !important; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 3 !important; width: 72% !important; margin: 0 !important; padding: 0 !important;
  font-size: 30px !important; line-height: 1.05 !important; letter-spacing: -1px !important;
}
#masthead .site-title a { padding: 0 6px !important; }
#masthead .site-description { display: none !important; }
#masthead .site-logo { display: block !important; width: auto !important; }
#masthead img { max-width: 100% !important; height: auto !important; }

/* menu: a "Menu" button opens the full list; items with sub-pages get a toggle (mobile-nav.js).
   Every sub-menu is shown in the flow (never the hover-only dropdown), so no link is unreachable. */
#masthead #access { margin: 0 !important; background: #0071a2; }
#access .menu, #secondary #access .menu, #column_wrapper #access .menu {
  display: block !important; width: auto !important; min-height: 0 !important; height: auto !important;
  padding: 0 !important; font-size: 17px !important;
}
#access .menu ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
#access .menu li { float: none !important; display: block !important; position: relative !important; margin: 0 !important; }
#access .menu li a { display: block !important; padding: 10px 52px 10px 12px !important; margin: 0 !important;
  border-top: 1px solid rgba(255,255,255,0.18); }
#access .menu li ul.sub-menu, #access .menu li ul.children {
  position: static !important; top: auto !important; left: auto !important; width: auto !important;
  box-shadow: none !important; -webkit-box-shadow: none !important; display: block !important;
}
#access .menu li ul li a { padding-left: 28px !important; font-size: 16px !important; font-weight: 600; }
#access .menu li ul li ul li a { padding-left: 44px !important; font-size: 15px !important; font-weight: 500; }
#access .menu li ul li ul li ul li a { padding-left: 60px !important; }

/* with JavaScript: collapsed until opened */
.nb-nav-js #masthead #access .menu { display: none !important; }
.nb-nav-js #masthead #access.nb-menu-open .menu { display: block !important; }
.nb-nav-js #masthead #access .menu li > ul.sub-menu,
.nb-nav-js #masthead #access .menu li > ul.children { display: none !important; }
.nb-nav-js #masthead #access .menu li.nb-open > ul.sub-menu,
.nb-nav-js #masthead #access .menu li.nb-open > ul.children { display: block !important; }
.nb-menu-toggle {
  display: block !important; width: 100%; text-align: left; background: #0071a2; color: #ffffff;
  border: 0; padding: 12px; font: 600 18px "Helvetica Neue", Helvetica, Arial, sans-serif; cursor: pointer;
}
.nb-sub-toggle {
  display: block !important; position: absolute; right: 0; top: 0; width: 48px; height: 44px;
  background: transparent; color: #ffffff; border: 0; border-left: 1px solid rgba(255,255,255,0.18);
  font-size: 18px; cursor: pointer; z-index: 2;
}
li.nb-open > .nb-sub-toggle { transform: rotate(180deg); border-left: 0; border-right: 1px solid rgba(255,255,255,0.18); }
#access .menu li.current-menu-item > .nb-sub-toggle, #access .menu li.current-menu-parent > .nb-sub-toggle { color: #000000; }
#searchformBar { float: none !important; width: auto !important; margin: 8px 0 !important; }
#searchformBar input[type="text"], #searchformBar input[type="search"] { width: 100% !important; box-sizing: border-box; }

/* home page slideshow: hidden on phones, as on the original Jetpack mobile site
   (the same posts are listed below it) */


/* (kept in case the slideshow is shown: one slide per row, text under the picture) */
.home #featured-slider #flexslider-container { padding: 0 !important; max-height: none !important; }
.home #featured-slider #flexslider-container .hentry {
  height: auto !important; padding: 10px !important; box-sizing: border-box;  /* width is set by the slideshow script */
}
.home #featured-slider #flexslider-container .hentry .entry-header,
.home #featured-slider #flexslider-container .hentry .entry-header .entry-title,
.home #featured-slider #flexslider-container .hentry .entry-header .entry-summary,
.home #featured-slider #flexslider-container .hentry .entry-image {
  float: none !important; width: auto !important;
}
.home #featured-slider #flexslider-container #slide-list, .flex-control-nav, .flex-direction-nav { display: none !important; }

/* media never wider than the screen */
img, video, iframe, embed, object { max-width: 100% !important; }
img { height: auto !important; }
.wp-caption, .wp-caption img { width: auto !important; max-width: 100% !important; }
#page .alignleft, #page .alignright,
#main .hentry .entry-summary .alignleft, #main .hentry .entry-content .alignleft,
#main .hentry .entry-summary .alignright, #main .hentry .entry-content .alignright {
  float: none !important; display: block !important; margin: 10px auto !important;
}
table { display: block; max-width: 100%; overflow-x: auto; }
pre { white-space: pre-wrap; word-wrap: break-word; }

/* Jetpack tiled galleries (the brain-art galleries): two images per row */
.tiled-gallery, .tiled-gallery .gallery-row { width: auto !important; height: auto !important; }
.tiled-gallery .gallery-row { display: flex !important; flex-wrap: wrap; }
.tiled-gallery .gallery-group { display: contents !important; }
.tiled-gallery .tiled-gallery-item { width: 48% !important; height: auto !important; margin: 1% !important; float: none !important; }
.tiled-gallery .tiled-gallery-item img { width: 100% !important; height: auto !important; margin: 0 !important; }
.tiled-gallery .tiled-gallery-caption { width: auto !important; }

/* classic WordPress and NextGEN galleries */
#main .hentry .entry-summary .gallery .gallery-item, #main .hentry .entry-content .gallery .gallery-item,
#main .hentry .gallery-columns-3 .gallery-item { width: 48% !important; margin: 1% !important; }
.ngg-galleryoverview { overflow: visible !important; }
.ngg-gallery-thumbnail-box { width: 48% !important; margin: 1% !important; }
.ngg-gallery-thumbnail img { max-width: 100% !important; }

/* previous/next navigation stacks */
.navigation .nav-previous, .navigation .nav-next,
.paging-navigation .nav-previous, .paging-navigation .nav-next,
.post-navigation .nav-previous, .post-navigation .nav-next,
.attachment-nav .nav-previous, .attachment-nav .nav-next {
  float: none !important; max-width: none !important; text-align: left !important; font-size: 18px;
}
}

@media (min-width: 761px) and (max-width: 1000px) {
  #page { max-width: 760px !important; margin: 0 auto !important; padding: 0 20px !important; }
  #masthead .site-title { font-size: 44px !important; }
  .tiled-gallery .tiled-gallery-item,
  #main .hentry .entry-summary .gallery .gallery-item, #main .hentry .entry-content .gallery .gallery-item,
  .ngg-gallery-thumbnail-box { width: 31.3% !important; }
}

@media (min-width: 1001px) {
  body { min-width: 0 !important; }
  #page { width: 985px !important; margin: 0 auto !important; }
}
