/*
Theme Name:     DavidCFreeman.co.uk Theme
Theme URI:      http: //example.com/
Description:    DavidCFreeman.co.uk Theme
Author:         DavidCFreeman.co.uk
Author URI:     http: //www.davidcfreeman.co.uk
Template:       twentyten
Version:        0.1.0
*/

/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* main */

html {
  height: 100%;
}

body {
  color: #333;
  font-family: Arial, Helvetica;
  font-size: 12px;
  height: 100%;
  padding: 20px;
}

#access {
  display: none;
}

#wrapper {
  height: 100%;
  position: relative;
  width: 920px;
}

#header {
  left: 0px;
  position: absolute;
  top: 0px;
}

#main #container {
  float: right;
  width: 660px;
}

#primary {
  float: left;
  margin-top: 70px;
  width: 260px;
}

#footer {
  position: fixed; display: inline-block; bottom: 0px; left: 20px;
  padding-bottom: 20px;
  padding-top: 20px;
}
#footer:before {
  background: #fff;
  content: '';
  display: block;
  opacity: 0.8;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 0;
}
.admin-bar #footer {

}

#colophon {
  position: relative;
}

.widget_nav_menu h3 {
  display: none;
}
.widget_nav_menu ul li {
  padding-bottom: 13px;
}
.widget_nav_menu ul li a {
  color: #333;
  text-decoration: none;
}
.widget_nav_menu ul li a:hover {
  text-decoration: underline;
}
.widget_nav_menu ul li.current_page_item a {
  text-decoration: underline;
}

#site-title span a {
  color: #2388be;
  font-size: 1.8em;
  font-weight: bold;
  text-decoration: none;
}

h2.entry-title, h1.entry-title {
  font-size: 1.6em;
}
.entry-title {
  margin-bottom: 1em;
}

p {
  line-height: 1.3em;
  margin: 1em 0;
}

#site-description {
  padding-top: 5px;
}

.gallery {
  width: 680px;
}
.gallery-item {
  border: 1px solid #EEE;
  float: left;
  margin-bottom: 15px;
  margin-right: 15px;
  width: 150px;
}
.gallery-item a {
  cursor: zoom-in;
}
.gallery br {
  display: none;
}

.gallery:after, #main:after {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
  font-size: 0;
}

#site-info a {
  color: #333;
  text-decoration: none;
}
#site-info a:hover {
  text-decoration: underline;
}

iframe {
  background: #FFF;
}

/* mobile menu toggle button — hidden on desktop, existing sidebar nav is
   always visible there so no toggle is needed */
.menu-toggle {
  display: none;
}

/* share links (replaces the old Facebook Like embed) */
.share-links {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}
.share-link {
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  display: inline-flex;
  gap: 6px;
  padding: 5px 10px;
  text-decoration: none;
}
.share-link:hover {
  background: #f5f5f5;
}
.share-link svg {
  flex-shrink: 0;
}

/* lightbox for gallery images */
.lightbox-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
}
.lightbox-overlay.is-open {
  display: flex;
}
body.lightbox-locked {
  overflow: hidden;
}
.lightbox-image {
  max-height: 90vh;
  max-width: 88vw;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  padding: 8px 14px;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-close {
  position: absolute;
  right: 20px;
  top: 20px;
}
.lightbox-prev {
  left: 20px;
  position: absolute;
}
.lightbox-next {
  position: absolute;
  right: 20px;
}

/* ==========================================================================
   Responsive layout
   Everything above this point is untouched and governs the design at its
   original 920px+ width. Below here, the fixed-pixel layout is overridden
   with a fluid one for narrower viewports. Same visual design, no fixed
   widths forcing zoom/horizontal scroll on phones and tablets.
   ========================================================================== */

@media (max-width: 920px) {
  body {
    padding: 15px;
  }

  #wrapper {
    height: auto;
    width: 100%;
  }

  #header {
    position: static;
  }

  #branding {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .menu-toggle {
    align-items: center;
    background: #2388be;
    border: none;
    border-radius: 4px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
  }
  .menu-toggle-bars,
  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    background: #fff;
    border-radius: 2px;
    content: '';
    display: block;
    height: 2px;
    width: 20px;
  }
  .menu-toggle-bars {
    position: relative;
  }
  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    position: absolute;
    left: 0;
  }
  .menu-toggle-bars::before {
    top: -6px;
  }
  .menu-toggle-bars::after {
    top: 6px;
  }
  .menu-toggle-label {
    font-size: 11px;
  }

  #main {
    display: flex;
    flex-direction: column;
  }

  #main #container {
    float: none;
    order: 2;
    width: 100%;
  }

  #primary {
    display: none;
    float: none;
    margin-top: 20px;
    order: 1;
    width: 100%;
  }
  #primary.is-open {
    display: block;
  }

  #footer {
    display: block;
    position: static;
    padding: 20px 0 0;
  }
  #footer:before {
    display: none;
  }

  .share-links {
    justify-content: center;
  }

  /* bigger, centred gallery images on mobile — served images are now the
     larger 'medium' size (see functions.php), not just CSS-upscaled thumbnails */
  .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .gallery-item {
    margin-right: 0;
    width: calc(50% - 8px);
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 22px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .gallery-item {
    width: 100%;
  }
}
