/* Ruposen Rengastukku — site styles
   Look & feel follows the old site (1000px white sheet on a concrete
   texture, black nav bar, Patua One headings) but is responsive. */

:root {
  --sheet: 1000px;
  --text: #373737;
  --heading: #222;
  --muted: #666;
  --line: #ddd;
  --link: #1982d1;
  --nav-a: #252525;
  --nav-b: #0a0a0a;
  --accent: #f2c500;
  --gutter: 7.6%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 300 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fff url("../img/bg3.jpg") no-repeat left top fixed;
}
h1, h2, h3, h4 {
  font-family: "Patua One", Georgia, serif;
  font-weight: 400;
  color: var(--heading);
  line-height: 1.3;
  margin: 0 0 .5em;
}
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 1.2em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
strong { font-weight: 700; }
.clear { clear: both; }
.hidden { display: none !important; }

/* ---------- page sheet ---------- */
#page {
  width: var(--sheet);
  max-width: 100%;
  margin: 2em auto;
  background: #fff;
  box-shadow: 0 0 6px 0 #777;
}
@media (max-width: 1040px) { #page { margin: 0 auto; } }

/* ---------- header ---------- */
#branding { border-top: 2px solid #bbb; position: relative; }
#branding .header-image { display: block; }
#branding .header-image img { display: block; width: 100%; height: auto; }

#access {
  background: #222;
  background: linear-gradient(var(--nav-a), var(--nav-b));
  box-shadow: 0 6px 7px rgba(50, 50, 50, .36);
  position: relative;
}
#access ul { list-style: none; margin: 0; padding: 0 0 0 calc(var(--gutter) - .8125em); display: flex; flex-wrap: wrap; }
#access a {
  display: block; color: #eee; font-size: 13px; line-height: 3.333em;
  padding: 0 1.2125em; text-decoration: none;
}
#access a:hover, #access a:focus { background: #f9f9f9; color: #373737; }
#access li.current a { font-weight: 700; }
#nav-toggle {
  display: none; background: none; border: 0; color: #eee; font: inherit;
  font-size: 15px; padding: 12px 18px; width: 100%; text-align: left; cursor: pointer;
}
#nav-toggle::before { content: "\2630\00a0\00a0"; }
@media (max-width: 640px) {
  #nav-toggle { display: block; }
  #access ul { display: none; flex-direction: column; padding: 0; border-top: 1px solid #333; }
  #access.open ul { display: flex; }
  #access a { line-height: 2.8em; padding-left: 18px; }
}

/* ---------- main ---------- */
#main { padding: 1.625em var(--gutter) 3em; min-height: 300px; }
.entry-title { padding: 15px 0 .3em; font-size: 26px; }
.page-header .entry-title { margin-bottom: 1em; }
.loading { color: var(--muted); padding: 2em 0; }

/* two-column layouts */
.cols { display: flex; gap: 40px; align-items: flex-start; }
.cols > * { min-width: 0; }
.cols .col-main { flex: 1 1 55%; }
.cols .col-side { flex: 1 1 40%; }
@media (max-width: 760px) { .cols { flex-direction: column; gap: 1.5em; } }

/* ---------- home ---------- */
.home-logos { border: 1px solid #ddd; padding: 4px; background: #fff; margin-bottom: 1.5em; }
.home-logos img { display: block; width: 100%; }
.home-intro h2 { font-size: 20px; margin-top: .4em; }
.weather { margin-top: 2.5em; }
.weather h2 { font-size: 18px; text-transform: uppercase; }
.weather .weather-link { display: flex; align-items: center; gap: 1.2em; }
.weather .weather-link img { width: 59px; height: auto; border: 1px solid #ddd; padding: 6px; background: #fff; }
.stock-heading { font-size: 20px; line-height: 1.5; margin-bottom: 1.5em; }

/* ---------- price tables (products, services, contacts) ---------- */
.price-table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 15px; }
.price-table th {
  text-align: left; font-size: 10px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line);
}
.price-table td { padding: 8px 8px; border-bottom: 1px solid #eee; vertical-align: top; }
.price-table tr:nth-child(even) td { background: #fafafa; }
.price-table td.price, .price-table td.size { white-space: nowrap; }
.table-note { font-size: 13px; color: var(--muted); }
.table-note.emph { font-weight: 700; color: var(--text); }

/* ---------- posts ---------- */
.post { margin-bottom: 3em; padding-bottom: 2em; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post .entry-title a { color: var(--heading); }
.post .entry-title a:hover { color: var(--link); text-decoration: none; }
.post .entry-date { display: block; font-size: 12px; color: var(--muted); margin: -.4em 0 1.2em; }
.post .entry-content { overflow: hidden; }
.post .entry-content h2 { font-size: 18px; margin: 1em 0 .4em; clear: none; }
.block-image { margin: 0 0 1.5em; }
.block-image img { display: block; border: 1px solid #ddd; padding: 6px; background: #fff; }
.block-image figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.block-image.align-left { float: left; margin: .3em 1.6em .8em 0; }
.block-image.align-right { float: right; margin: .3em 0 .8em 1.6em; }
.block-image.align-center { margin-left: auto; margin-right: auto; text-align: center; }
.block-image.align-center img { margin: 0 auto; }
.block-text { clear: none; }
.block-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 0 0 1.5em; clear: both; }
.block-grid figure { margin: 0; text-align: center; }
.block-grid img { display: block; width: 100%; border: 1px solid #ddd; padding: 4px; background: #fff; }
.block-grid figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 520px) {
  .block-image.align-left, .block-image.align-right { float: none; margin: 0 0 1.2em; }
}
.post-nav { margin-top: 2em; font-size: 14px; }
.post-list-empty { color: var(--muted); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gallery a { display: block; border: 1px solid #ddd; padding: 5px; background: #fff; }
.gallery a:hover { border-color: #999; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 12px; color: var(--muted); padding: 4px 2px 0; }
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex;
  align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; padding: 2vw;
}
.lightbox img { max-width: 96vw; max-height: 90vh; box-shadow: 0 0 30px #000; }
.lightbox .cap { position: absolute; bottom: 3vh; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* ---------- contact ---------- */
.contact-table { width: auto; min-width: 330px; }
.contact-table td.role { font-weight: 700; }
@media (max-width: 400px) { .contact-table { min-width: 0; } }
.map-image { display: inline-block; border: 1px solid #ddd; padding: 6px; background: #fff; }
.map-image img { display: block; width: 141px; }

/* ---------- footer ---------- */
#colophon { clear: both; }
#supplementary {
  border-top: 1px solid var(--line); padding: 1.625em var(--gutter);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3em;
}
@media (max-width: 760px) { #supplementary { grid-template-columns: 1fr; gap: 1.5em; } }
.widget-title {
  color: var(--muted); font-family: inherit; font-size: 10px; font-weight: 500;
  letter-spacing: .1em; line-height: 2.6em; text-transform: uppercase; margin: 0;
}
.widget { font-size: 13px; }
.widget ul { list-style: square; margin: 0; padding-left: 1.2em; }
.widget li { margin-bottom: .4em; }
.widget li a { font-weight: 700; color: var(--heading); }
.widget li a:hover { color: var(--link); }
.fb-link { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--heading); }
.fb-link svg { width: 20px; height: 20px; fill: #1877f2; }
#site-generator {
  background: #f9f9f9; border-top: 1px solid var(--line); color: var(--muted);
  font-size: 12px; line-height: 2.2em; padding: 2.2em .5em; text-align: center;
}
#site-generator a { color: var(--heading); font-weight: 700; }
