/*
 * Adam Kohut Photography — the look of every page.
 * Colours, sizes and fonts are copied from the old Zenfolio theme.
 *
 * Two page layouts:
 *   body.home  — the home page: dark sidebar on the left, photo wall on the right.
 *   body.inner — every other page: banner + menu bar across the top.
 */

:root {
  --link: #989ca5;          /* normal link colour */
  --link-hover: #8796B7;    /* link colour under the mouse */
  --panel: #0f0f14;         /* near-black blue used for boxes, menus and footer */
  --edge: #293145;          /* thin border around menus */
  --accent: #495c87;        /* blue used for the footer's top line */
  --tile-border: #636673;   /* thin outline around each photo */
  --row-h: 220px;           /* smallest a row of gallery photos may be; rows stretch taller to fill the width */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #000 url(damask-bg.jpg) top center no-repeat fixed;
  color: #fff;
  font: 12px/1.6 Verdana, Geneva, Tahoma, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--link); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ================= photo wall ("justified rows") =================
 * Each photo carries its shape as --r (width divided by height). Photos in a row
 * grow in proportion to that shape, so every row fills the width at an even height,
 * with no cropping to speak of. */
.jgrid { display: flex; flex-wrap: wrap; }
.jgrid::after { content: ""; flex-grow: 1000000; } /* keeps the last row from stretching */
.jgrid a {
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--row-h));
  aspect-ratio: var(--r);
  border: 1px solid var(--tile-border);
  background: #111;
  overflow: hidden;
}
.jgrid img { width: 100%; height: 100%; object-fit: cover; }
.jgrid a:hover img { opacity: .88; }

/* ================= home page ================= */
.home-shell { display: flex; flex: 1 0 auto; align-items: stretch; }
.sidebar {
  width: 280px;
  flex: 0 0 280px;
  background: rgba(15, 15, 20, .85);
  padding: 120px 0 40px;
  position: relative;
  z-index: 20;
}
.sidebar-logo img { width: 280px; height: auto; margin: 0 auto; }
.side-menu {
  list-style: none;
  margin: 20px 20px 0;
  padding: 12px 0;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  text-align: center;
}
.side-menu > li + li { border-top: 1px solid #050510; margin: 0 12px; }
.side-menu > li:first-child { margin: 0 12px; }
.side-menu > li > a, .side-menu .menu-label {
  display: inline-block;
  line-height: 24px;
  padding: 2px 19px;
  color: var(--link);
  cursor: pointer;
}
.side-menu > li > a:hover, .side-menu .has-sub:hover .menu-label,
.side-menu .has-sub:focus-within .menu-label {
  color: #fff;
  background: #22252e;
  text-decoration: none;
}
.side-menu .dd { font-size: 8px; margin-left: 4px; vertical-align: 1px; }
.side-menu .has-sub { position: relative; }
.side-menu .submenu {
  display: none;
  position: absolute;
  left: 78%;
  top: 0;
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--panel);
  border: 1px solid var(--edge);
  text-align: left;
  white-space: nowrap;
}
.side-menu .has-sub:hover .submenu, .side-menu .has-sub:focus-within .submenu { display: block; }
.side-menu .submenu a { display: block; color: #fff; line-height: 30px; padding: 0 14px; font-size: 13px; }
.side-menu .submenu a:hover { background: #22252e; text-decoration: none; }

.sidebar-about { padding: 30px 18px 0; line-height: 1.6; }
.sidebar-about p { margin: 0 0 40px; }
.sidebar-about p:first-child { margin-bottom: 36px; }

.home-main { flex: 1 1 auto; min-width: 0; }
.jgrid-home { --row-h: 270px; }

/* ================= banner + menu bar (all other pages) ================= */
.site-header {
  height: 61px;
  background: #313745 url(header-gloss.png) repeat-x top left;
  border-bottom: 1px solid #3f4a70;
  padding-left: 18px;
  overflow: hidden;
}
.header-logo img { width: 511px; height: 60px; max-width: calc(100vw - 36px); object-fit: contain; object-position: left center; }

.menubar { background: #121212; border-bottom: 1px solid #3f4a70; position: relative; z-index: 20; }
.menubar > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.menubar > ul > li { position: relative; }
.menubar > ul > li > a, .menubar .menu-label {
  display: block;
  padding: 2px 20px;
  line-height: 20px;
  color: #b5b5b5;
  cursor: pointer;
}
.menubar > ul > li > a:hover, .menubar .has-sub:hover .menu-label,
.menubar .has-sub:focus-within .menu-label { color: #fff; text-decoration: none; }
.menubar .dd { font-size: 7px; margin-left: 5px; vertical-align: 2px; }
.menubar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--edge);
  white-space: nowrap;
}
.menubar .has-sub:hover .submenu, .menubar .has-sub:focus-within .submenu { display: block; }
.menubar .submenu a { display: block; color: #fff; line-height: 24px; padding: 0 16px; }
.menubar .submenu a:hover { background: #22252e; text-decoration: none; }

/* ================= text pages (Headshots, Real Estate, About...) ================= */
.page { width: 945px; max-width: calc(100% - 32px); margin: 0 auto; padding: 14px 0 30px; flex: 1 0 auto; }
.page h1 { font-size: 16px; font-weight: normal; color: #b9bbc4; text-align: center; margin: 18px 0 12px; }
.page h1 strong { color: #b9bbc4; }
.page hr { border: 0; height: 1px; background: #2a2b31; margin: 8px 0; }
.page p { margin: 12px 0; }
.page .center { text-align: center; }
.page .lead { font-size: 14px; }
.page .small { font-size: 11px; }
.page u { text-decoration: underline; }
.page table.prices { border-collapse: collapse; margin: 12px auto; }
.page table.prices td { border: 1px solid #1f1f1f; padding: 8px 8px; min-width: 130px; }

/* photo on one side, text on the other */
.row { display: flex; align-items: center; gap: 28px; margin: 36px 3%; }
.row .pic { flex: 0 1 582px; }
.row .txt { flex: 1 1 0; font-size: 14px; }
.row .txt p { margin: 12px 0; }
.full-text { margin: 12px 3%; font-size: 14px; }
.framed { border: 1px solid #2a2b31; }
.jump-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; margin: 40px 0 60px; text-align: center; }
.jump-links a { width: 160px; }

/* Real Estate page slideshow: photos stacked, one faded in at a time */
.inline-slideshow { position: relative; aspect-ratio: 1100 / 732; border: 1px solid #2a2b31; background: #000; margin: 30px 1% 20px; }
.inline-slideshow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.2s ease; }
.inline-slideshow img.on { opacity: 1; }
.wide-pic { margin: 30px 0; }

/* older content pages (About, Contact, Blog, wedding and product pages) */
.wrap { width: 945px; max-width: calc(100% - 32px); margin: 0 auto; flex: 1 0 auto; }
.page-head { padding: 26px 0 8px; }
.page-head h1 { margin: 0 0 6px; font-size: 22px; font-weight: normal; color: #b9bbc4; }
.breadcrumb { color: #b9bbc4; font-size: 12px; }
.breadcrumb a { color: #b9bbc4; }
.content-page { padding: 14px 0 60px; font-size: 13px; }
.content-page h2 { margin-top: 2em; font-size: 16px; font-weight: normal; }
.content-page table { border-collapse: collapse; margin: 1.2em 0; }
.content-page table td, .content-page table th { border: 1px solid #2a2b31; padding: 8px 14px; text-align: left; }
.blog-list article { padding: 20px 0; border-bottom: 1px solid #2a2b31; }
.blog-list h2 { margin: 0 0 4px; font-size: 16px; font-weight: normal; }
.blog-meta { color: #b9bbc4; font-size: 11px; margin-bottom: 8px; }
.blog-post { padding: 8px 0 60px; max-width: 700px; font-size: 13px; }
.blog-post p { white-space: pre-line; }
.gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 14px 0 60px; }
.gallery-list .card { background: var(--panel); overflow: hidden; color: inherit; }
.gallery-list .card:hover { text-decoration: none; }
.gallery-list .card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.gallery-list .card-body { padding: 10px 12px; }
.gallery-list .card h3 { margin: 0 0 4px; font-size: 13px; }
.gallery-list .card p { margin: 0; color: #b9bbc4; font-size: 11px; }

/* ================= gallery pages ================= */
.gallery-page { padding: 0 40px 30px; flex: 1 0 auto; }
.gallery-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 31px;
  margin: 10px 0 12px;
  border-bottom: 1px solid #1f1f1f;
}
.gallery-titlebar h1 { font-size: 15px; font-weight: normal; margin: 0; }
.btn {
  font: 12px Verdana, Geneva, Tahoma, sans-serif;
  color: #fff;
  background: #72798a;
  border: 0;
  height: 24px;
  padding: 0 12px;
  cursor: pointer;
}
.btn:hover { background: var(--accent); }
.gallery-desc { background: var(--panel); color: #9599a6; padding: 30px; margin-bottom: 8px; }

/* ================= bottom of page ================= */
.copyright { text-align: center; padding: 12px 0; margin-bottom: 12px; }
.site-footer {
  background: var(--panel);
  border-top: 2px solid var(--accent);
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 16px 30px;
}
.site-footer a { color: #dadada; padding: 5px 8px; }
.site-footer .sep { color: var(--accent); }

/* ================= full-screen photo viewer ================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay > img { max-width: 94vw; max-height: 86vh; object-fit: contain; }
.lightbox-bar { margin-top: 10px; display: flex; gap: 16px; align-items: center; color: #b9bbc4; font-size: 11px; }
.lightbox-play { background: none; border: 1px solid #3a3d4a; color: #b9bbc4; font: 11px Verdana, sans-serif; padding: 3px 10px; cursor: pointer; }
.lightbox-play:hover { color: #fff; border-color: #72798a; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #b9bbc4;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 10px 16px;
  line-height: 1;
}
.lightbox-close { top: 6px; right: 10px; font-size: 1.8rem; }
.lightbox-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: #fff; }

/* ================= phones and narrow windows ================= */
@media (max-width: 800px) {
  :root { --row-h: 150px; }
  .jgrid-home { --row-h: 150px; }
  .home-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-basis: auto; padding: 30px 0 10px; }
  .sidebar-logo img { width: 240px; }
  .side-menu .submenu { position: static; border: 0; background: none; text-align: center; }
  .sidebar-about { padding: 20px 20px 0; }
  .sidebar-about p { margin-bottom: 16px; }
  .menubar > ul { justify-content: center; }
  .menubar > ul > li > a, .menubar .menu-label { padding: 4px 10px; }
  .gallery-page { padding: 0 8px 20px; }
  .row { flex-direction: column; margin: 24px 0; }
  .row.pic-right { flex-direction: column-reverse; }
  .row .pic { flex-basis: auto; }
  .full-text, .row .txt { font-size: 13px; margin-left: 0; margin-right: 0; }
}
