/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, p, ul, ol { margin: 0; padding: 0; }

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Outfit", var(--font-body);
  --color-ink: #141413;
  --color-muted: #5c5b56;
  --color-surface: #fcfaf5;
  --color-surface-2: #f3f0e8;
  --color-accent: #e4c400;
  --color-accent-soft: #f7e566;
  --color-accent-dark: #c4a800;
  --color-accent-ink: #2a2600;
  --color-wash: #fdf8e6;
  --color-nav: #1c1b19;
  --color-nav-border: rgba(255, 255, 255, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.12);
  --shadow-nav: 0 16px 48px rgba(0, 0, 0, 0.22);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   BASE / TYPOGRAPHY
   ============================================ */
html {
  background-color: #23221f;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink);
  background-color: #23221f;
  background-image:
    radial-gradient(1200px 500px at 50% -10%, rgba(228, 196, 0, 0.07), transparent 55%),
    url('../img/bg.png');
  background-repeat: no-repeat, repeat-x;
  background-position: top center, top center;
  margin: 0;
  /* Safe-area on body so insets use dark bg — not #page cream (fixes white strip under footer) */
  padding:
    max(0px, env(safe-area-inset-top))
    max(0px, env(safe-area-inset-right))
    max(0px, env(safe-area-inset-bottom))
    max(0px, env(safe-area-inset-left));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 26px; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

h2 {
  font-size: 1.35rem;
  padding-bottom: 10px;
}

h3 {
  font-size: 1.1rem;
  margin-top: 25px;
  margin-bottom: 12px;
}

/* ============================================
   LINKS & TRANSITIONS  (Report #10)
   ============================================ */
a {
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

img {
  transition: filter 0.25s ease, transform 0.25s ease;
}

/* ============================================
   PAGE
   ============================================ */
#page {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-surface);
  background-image:
    linear-gradient(180deg, rgba(252, 250, 245, 0) 0%, rgba(252, 250, 245, 0.55) 340px, var(--color-surface) 520px),
    url('../img/bg_image.jpg');
  background-repeat: no-repeat, no-repeat;
  background-position: top center, top center;
  background-size: auto, auto;
}

/* ============================================
   HEADER / PREMENU
   ============================================ */
#header {
  width: 100%;
  margin: 0;
  padding: 0;
}

#premenu {
  width: 100%;
  height: 100px;
  margin: 0;
  padding-top: 20px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.12) 100%),
    url('../img/headerbg.png') repeat-x;
}

/* ============================================
   NAVIGATION  (Report #2)
   ============================================ */
#menu {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: 960px;
  max-width: 94%;
  height: 56px;
  margin: 58px auto;
  padding-right: 8px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(40, 39, 36, 0.98) 0%, var(--color-nav) 100%);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-nav);
  border: 1px solid var(--color-nav-border);
  backdrop-filter: blur(8px);
}

/* Header contact: in-flow between logo and hamburger on mobile; above bar, right-aligned on desktop */
.header-contact {
  position: absolute;
  top: -70px;
  right: 0;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: flex-end;
}

.header-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: color 0.2s ease;
}

.header-contact a:hover {
  color: var(--color-accent-soft);
  opacity: 1;
}

.header-contact .header-phone {
  font-size: 18px;
  color: var(--color-accent-soft);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.header-contact .header-phone:hover {
  color: #fff;
}

.header-contact svg {
  flex-shrink: 0;
}

#menu img.logo {
  position: absolute;
  top: -50px;
  left: 0;
  max-width: 220px;
  height: auto;
  line-height: 166px;
  color: var(--color-accent);
  font-size: 40px;
}

.menu-brand-row {
  position: static;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
}

#menu .menu-brand-row h1 {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  margin: 0;
  padding: 0;
  min-height: 1px;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-nav-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 20px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-close {
  display: none;
}

#menu ul {
  flex: 0 0 auto;
  width: 620px;
  margin-left: auto;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 56px;
  gap: 0;
}

#menu ul li {
  position: relative;
  padding: 0 16px;
  line-height: 56px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style-type: none;
}

#menu ul li a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s ease;
  position: relative;
  display: inline-block;
}

#menu ul li a::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.28s var(--ease-out);
}

#menu ul li a:hover {
  color: #fff;
  opacity: 1;
}

#menu ul li a:hover::after {
  width: 100%;
}

#menu ul li.active a {
  color: var(--color-accent-soft);
  font-weight: 800;
}

#menu ul li.active a::after {
  width: 100%;
  background: var(--color-accent);
}

/* ============================================
   SERVICE CARDS / TABS  (Report #3, #5, #10)
   ============================================ */
#tabs {
  width: 960px;
  max-width: 94%;
  margin: 0 auto;
  clear: both;
  margin-top: 280px;
  display: flex;
  gap: 15px;
}

#tabs .offer_image {
  height: 120px;
  display: block;
  overflow: hidden;
}

#tabs .offer_image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#tabs a {
  color: black;
  text-decoration: none;
}

#tabs > a {
  flex: 1;
  display: block;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.2s ease;
  background: #fff;
}

#tabs > a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

#tabs > a:hover .offer_image img {
  transform: scale(1.05);
}

#tabs div a img {
  margin: 0;
  padding: 0;
}

#tabs div p {
  background: white;
  margin: 0;
  padding: 12px 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 90px;
  color: #444;
}

#tabs h2 {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-soft) 100%);
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-accent-ink);
}

/* ============================================
   MAIN CONTENT AREA  (Report #4, #5)
   ============================================ */
#premain {
  clear: both;
  width: 100%;
  margin-bottom: 0;
  padding-top: 36px;
  padding-bottom: 48px;
  background: linear-gradient(180deg, var(--color-surface) 0%, #fff 120px);
  position: relative;
}

/* Inner pages: push content below hero, add card-like appearance */
html:not(#index-page) #premain {
  margin-top: 200px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.1);
}

/* Homepage: keep natural flow after tabs */
html#index-page #premain {
  margin-top: 0;
}

#main {
  width: 960px;
  max-width: 94%;
  margin: 0 auto;
  display: flex;
  gap: 30px;
}

#main h2, #main h1 {
  line-height: 1.3;
  vertical-align: middle;
}

#main h1 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-family: var(--font-display);
  font-weight: 800;
  padding-bottom: 16px;
  margin-bottom: 28px;
  letter-spacing: -0.03em;
  color: var(--color-ink);
  border-bottom: none;
  position: relative;
}

#main h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(12rem, 55%);
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-soft) 100%);
}

#main h2 img {
  vertical-align: bottom;
}

#main h2.border {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ============================================
   CONTENT  (Report #4)
   ============================================ */
#content {
  flex: 1;
  min-width: 0;
  font-size: 15px;
}

#content h2, #content h3, #sidebar h2 {
  padding-left: 10px;
  margin-bottom: 4px;
}

#content h3 {
  margin-top: 14px;
  margin-bottom: 8px;
}

/* Section titles below page h1 (e.g. Reference dates, Ceník blocks) — skip image titles */
#content > h2:not(:has(img)) {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(228, 196, 0, 0.35);
  letter-spacing: -0.02em;
}

#content > h1 + h2:not(:has(img)) {
  margin-top: 8px;
}

#content p {
  margin-top: 0;
  padding-left: 10px;
  padding-top: 0;
  line-height: 1.65;
  margin-bottom: 12px;
}

#content ul {
  padding-left: 30px;
  margin-bottom: 16px;
}

#content ul li {
  line-height: 1.7;
  margin-bottom: 4px;
}

/* Image gallery paragraphs: when a <p> contains only images/links, display as grid */
#content p:has(> a[data-lightbox]:first-child) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding-left: 10px;
  margin-bottom: 20px;
  align-items: stretch;
}

#content p:has(> a[data-lightbox]:first-child) a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid #ddd;
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

#content p:has(> a[data-lightbox]:first-child) a:hover {
  border-color: var(--color-accent);
  transform: scale(1.02);
}

#content p:has(> a[data-lightbox]:first-child) img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: none;
}

/* Regular inline images (not in gallery paragraphs) */
#content p img, img.lightbox {
  border-radius: 10px;
  border: 4px solid #ddd;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

#content p img:hover, img.lightbox:hover {
  border-color: var(--color-accent);
}

#content blockquote {
  padding: 12px 20px;
  font-style: oblique;
  margin: 8px 10px 16px;
  font-size: 15px;
  border-left: 3px solid var(--color-accent);
  background: var(--color-wash);
  border-radius: 0 6px 6px 0;
}

/* ============================================
   LAST JOBS (Homepage photo strip)
   ============================================ */
#lastjobs {
  margin-bottom: 28px;
}

#lastjobs ul {
  background: linear-gradient(145deg, var(--color-surface-2) 0%, #ebe6dc 100%);
  padding: 16px;
  margin: 0;
  list-style: none;
  display: flex;
  gap: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#lastjobs ul img {
  width: 142px;
  height: auto;
  margin: 0;
  padding-left: 0;
  border-radius: 10px;
  border: 3px solid #ccc;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

#lastjobs ul img:hover {
  border-color: var(--color-accent);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

#lastjobs ul li {
  display: inline-block;
  margin: 0;
  padding: 0;
  flex: 1;
}

#lastjobs ul li a {
  display: block;
}

#lastjobs ul li img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
  width: 300px;
  flex-shrink: 0;
  padding: 0 0 8px 8px;
}

#sidebar h2.border {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom-color: rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

/* ============================================
   TAG CLOUD  (Report #11 - Pill style)
   ============================================ */
#sidebar .tags {
  margin: 12px 0 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#sidebar .tags .tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 20px;
  color: #444;
  transition: background 0.2s ease, border-color 0.2s ease;
  line-height: 1.4;
}

#sidebar .tags .tag:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #111;
}

/* Override old tag1-5 varying sizes -- uniform pills now */
#sidebar .tags .tag1,
#sidebar .tags .tag2,
#sidebar .tags .tag3,
#sidebar .tags .tag4,
#sidebar .tags .tag5 {
  font-size: 12px;
  color: #444;
  text-shadow: none;
}

/* ============================================
   SERVICES LIST (Services overview page)
   ============================================ */
ul.services {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

ul.services li {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

ul.services a {
  text-decoration: none;
  font-size: 1.15rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #fff 0%, var(--color-surface) 100%);
  box-shadow: var(--shadow-sm);
  transition: background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.2s ease, transform 0.2s var(--ease-out);
}

ul.services a:hover {
  background: #fff;
  border-color: color-mix(in srgb, var(--color-accent) 35%, transparent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  opacity: 1;
}

ul.services a img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid #ddd;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

ul.services a:hover img {
  border-color: var(--color-accent);
}

ul.services.services-toc {
  margin-bottom: 8px;
}

.service-section {
  scroll-margin-top: 96px;
}

.service-section + .service-section {
  margin-top: 40px;
  padding-top: 32px;
}

#content .service-section h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(228, 196, 0, 0.35);
}

/* ============================================
   PRICE TABLE  (Report #6)
   ============================================ */
table.pricelist {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

table.pricelist td, table.pricelist th {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

table.pricelist tr {
  background: #fff;
}

table.pricelist tr:nth-child(odd) {
  background: #fafafa;
}

table.pricelist th {
  text-align: right;
  width: 120px;
  font-weight: 600;
  color: #333;
  border-left: 3px solid var(--color-accent);
}

table.pricelist td {
  color: #555;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.25rem;
  border-radius: var(--radius-md);
  scrollbar-gutter: stable;
}

.table-scroll .pricelist {
  width: max-content;
  min-width: 100%;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
#main .flash {
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
}

#main .flash.success {
  background: var(--color-accent);
  color: black;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

/* ============================================
   FOOTER  (Report #7, #5)
   ============================================ */
#prefooter {
  background: #181716;
  width: 100%;
  margin: 0;
  position: relative;
  border-top: 4px solid var(--color-accent);
  overflow-x: hidden;
}

#footer {
  width: 960px;
  max-width: 94%;
  margin: 0 auto;
  color: white;
  padding: 32px 12px 40px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px min(48px, 5vw);
  align-items: start;
}

#footer a {
  text-decoration: none;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

#footer a:hover {
  color: var(--color-accent);
  opacity: 1;
}

#footer > div {
  font-size: 14px;
  min-width: 0;
}

#footer h3 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 14px;
  padding-left: 10px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  margin-top: 0;
}

#footer ul {
  padding-left: 10px;
  margin: 0;
  list-style: none;
}

#footer ul li {
  list-style-type: none;
  padding: 0;
  margin: 0;
  line-height: 1.55;
}

#footer ul li + li {
  margin-top: 6px;
}

#footer ul li a {
  display: inline-block;
  padding: 3px 0;
  line-height: 1.5;
}

/* ============================================
   QUICK CONTACT FORM  (Report #7)
   ============================================ */
.quickcontact input[type=text],
.quickcontact input[type=email],
.quickcontact textarea {
  border: 1px solid #444;
  background: #272727;
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  border-radius: 4px;
  transition: border-color 0.2s ease;
}

.quickcontact input[type=text]:focus,
.quickcontact input[type=email]:focus,
.quickcontact textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}

.quickcontact textarea {
  min-height: 40px;
  min-width: 200px;
  resize: vertical;
}

.quickcontact button[type=submit] {
  background: linear-gradient(180deg, var(--color-accent-soft) 0%, var(--color-accent) 100%);
  color: var(--color-accent-ink);
  border: 0;
  cursor: pointer;
  padding: 10px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  transition: filter 0.2s ease, transform 0.15s ease;
  float: right;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.quickcontact button[type=submit]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.quickcontact input[type=text]::placeholder,
.quickcontact input[type=email]::placeholder,
.quickcontact textarea::placeholder {
  color: #888;
}

.quickcontact > form > div {
  position: relative;
  margin-bottom: 6px;
}

/* ============================================
   COPYRIGHT
   ============================================ */
#precopyright {
  background: url('../img/copyrightbg.png') repeat-x;
  height: 46px;
  margin: 0;
  color: white;
}

#copyright {
  width: 960px;
  max-width: 94%;
  margin: 0 auto;
  position: relative;
  font-size: 12px;
}

#copyright a {
  color: white;
}

#copyright img.logo {
  position: absolute;
  top: -26px;
  left: 0px;
}

#copyright span {
  margin: 0;
  position: absolute;
  top: 15px;
  left: 100px;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  touch-action: manipulation;
}

.lightbox-content {
  position: relative;
  max-width: min(90vw, 100%);
  max-height: min(90vh, 100%);
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: max(4px, env(safe-area-inset-top));
  right: max(4px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  color: black;
  font-weight: bold;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.lightbox-close:hover {
  transform: scale(1.05);
  background: var(--color-accent-dark);
}

/* ============================================
   REFERENCE GALLERY  (Report #9)
   ============================================ */
.reference-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.reference-gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 3px solid rgba(0, 0, 0, 0.08);
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.reference-gallery a:hover {
  border-color: color-mix(in srgb, var(--color-accent) 70%, #fff);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.reference-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  cursor: pointer;
  border: none;
  border-radius: 0;
}

/* ============================================
   IFRAME EMBED (contact page map)
   ============================================ */
#content iframe {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  margin-top: 12px;
  border: 4px solid #ddd;
}

/* ============================================
   CLEANER (legacy - kept for safety)
   ============================================ */
.cleaner { clear: both; }

/* ============================================
   CONTACT PAGE CARD LAYOUT
   ============================================ */
.contact-card {
  background: linear-gradient(165deg, #fff 0%, var(--color-surface-2) 100%);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 28px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-sm);
}

.contact-card h2 {
  padding-left: 0 !important;
  margin-bottom: 18px;
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}

.contact-info .contact-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
}

.contact-info .contact-label {
  color: #888;
  font-size: 13px;
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-info .contact-value {
  font-weight: 600;
  font-size: 15px;
  color: #222;
}

.contact-info .contact-value a {
  color: #222;
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  transition: border-color 0.2s;
}

.contact-info .contact-value a:hover {
  border-color: #333;
  opacity: 1;
}

.contact-map {
  margin: 28px 0 0;
  padding: 0;
  max-width: 100%;
}

.contact-map a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-map a:hover {
  border-color: color-mix(in srgb, var(--color-accent) 40%, rgba(0, 0, 0, 0.1));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.contact-map img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: none !important;
  border-radius: 0;
  vertical-align: middle;
}

/* ============================================
   SERVICES PAGE ENHANCED
   ============================================ */
ul.services a .service-desc {
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 6px;
  line-height: 1.5;
}

ul.services a .service-text {
  display: flex;
  flex-direction: column;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  #tabs > a,
  #tabs > a:hover,
  #tabs .offer_image img,
  #tabs > a:hover .offer_image img,
  ul.services a:hover,
  .reference-gallery a:hover {
    transform: none;
    transition-duration: 0.01ms;
  }

  .nav-toggle-bar {
    transition: none;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  #menu {
    width: 90%;
    max-width: 960px;
  }

  #tabs {
    width: 90%;
    max-width: 960px;
  }

  #main {
    width: 90%;
    max-width: 960px;
  }

  #footer {
    width: 90%;
    max-width: 960px;
  }

  #copyright {
    width: 90%;
    max-width: 960px;
  }

  #tabs {
    flex-wrap: wrap;
  }

  #tabs > a {
    flex: 1 1 calc(50% - 15px);
    min-width: 250px;
  }

  .reference-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-info {
    grid-template-columns: 1fr;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  #premenu {
    height: auto;
    padding-top: 10px;
    padding-bottom: 0;
  }

  #menu {
    height: auto;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 8px 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .menu-brand-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    flex: 0 1 auto;
  }

  .menu-brand-row h1 {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
  }

  #menu .menu-brand-row h1 {
    width: auto;
    max-width: 42%;
  }

  #menu img.logo {
    position: static;
    display: block;
    height: 56px;
    width: auto;
    margin-bottom: 0;
  }

  .nav-toggle {
    display: flex;
    width: 40px;
    height: 40px;
  }

  .header-contact {
    position: static;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    padding: 6px 2px 2px;
    flex-wrap: wrap;
    gap: 6px 12px;
    row-gap: 4px;
    min-width: 0;
  }

  .header-contact .header-contact-icon {
    width: 15px;
    height: 15px;
  }

  .header-contact a {
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
  }

  .header-contact .header-phone {
    font-size: 15px;
  }

  body.nav-open .header-contact {
    padding: 8px 4px 6px;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: rgba(0, 0, 0, 0.14);
  }

  body:not(.nav-open) #menu #main-nav,
  body:not(.nav-open) #menu .nav-close {
    display: none !important;
  }

  body.nav-open #menu {
    padding-bottom: 6px;
  }

  body.nav-open #menu #main-nav {
    display: flex !important;
    position: static;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100% !important;
    max-width: none !important;
    height: auto;
    min-height: 0;
    margin: 6px 0 0 !important;
    padding: 0;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid var(--color-nav-border);
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
    gap: 0;
    list-style: none;
  }

  body.nav-open #menu #main-nav li {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    line-height: normal;
    text-align: left;
    width: 100%;
  }

  body.nav-open #menu #main-nav li a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
  }

  body.nav-open #menu #main-nav li a::after {
    display: none;
  }

  body.nav-open #menu #main-nav li.active a {
    color: var(--color-accent-soft);
  }

  body.nav-open #menu .nav-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
    border: 1px solid var(--color-nav-border);
    border-top: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  body.nav-open #menu .nav-close:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
  }

  .service-section {
    scroll-margin-top: 88px;
  }

  #tabs {
    flex-direction: column;
    margin-top: 120px;
    gap: 10px;
  }

  #tabs > a {
    flex: 1 1 100%;
  }

  #tabs > a > div {
    display: flex;
    flex-direction: row;
    align-items: stretch;
  }

  #tabs .offer_image {
    width: 100px;
    height: auto;
    flex-shrink: 0;
  }

  #tabs .offer_image img {
    width: 100px;
    height: 100%;
    object-fit: cover;
  }

  #tabs h2 {
    font-size: 14px;
    padding: 6px 12px;
  }

  #tabs div p {
    font-size: 12px;
    padding: 4px 12px 8px;
    min-height: 0;
  }

  #main {
    flex-direction: column;
    gap: 20px;
  }

  #sidebar {
    width: 100%;
  }

  html:not(#index-page) #premain {
    margin-top: 100px;
    border-radius: 12px 12px 0 0;
  }

  #main h1 {
    font-size: 24px;
  }

  #lastjobs ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  #lastjobs ul li {
    flex: 0 0 calc(50% - 6px);
  }

  #lastjobs ul li img {
    height: 90px;
  }

  #footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 16px 32px;
  }

  #copyright img.logo {
    position: static;
    display: inline-block;
    height: 36px;
    width: auto;
    vertical-align: middle;
  }

  #copyright span {
    position: static;
    display: inline;
    margin-left: 10px;
    vertical-align: middle;
  }

  #precopyright {
    height: auto;
    padding: 12px 0;
  }

  .reference-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  ul.services a {
    font-size: 16px;
    gap: 14px;
    padding: 8px;
  }

  ul.services a img {
    width: 80px;
    height: 60px;
  }

  .service-desc {
    font-size: 13px !important;
  }

  table.pricelist td, table.pricelist th {
    padding: 8px 10px;
    font-size: 14px;
  }

  table.pricelist th {
    width: auto;
    min-width: 80px;
  }

  #content iframe {
    height: 260px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 18px 20px;
  }

  /* Inline image galleries: fill grid cells (no fixed px — avoids empty space beside thumbs) */
  #content p:has(> a[data-lightbox]:first-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-left: 0;
  }

  #content p:has(> a[data-lightbox]:first-child) a {
    border-width: 2px;
    border-radius: 8px;
  }

  #content p:has(> a[data-lightbox]:first-child) img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 5px;
  }

  #content p {
    padding-left: 0;
  }

  #content h2, #content h3, #sidebar h2 {
    padding-left: 0;
  }

  #content ul {
    padding-left: 20px;
  }
}

/* Small mobile (< 480px) */
@media (max-width: 480px) {
  body.nav-open #menu #main-nav li a {
    font-size: 13px;
    padding: 5px 8px;
    min-height: 38px;
  }

  .header-contact {
    flex-direction: column;
    gap: 2px;
    align-items: center;
  }

  #tabs {
    margin-top: 80px;
  }

  .reference-gallery {
    gap: 6px;
  }

  ul.services a {
    font-size: 15px;
  }

  ul.services a img {
    width: 70px;
    height: 52px;
  }

  #lastjobs ul li {
    flex: 0 0 calc(50% - 6px);
  }

  #lastjobs ul li img {
    height: 70px;
  }
}

/* Very narrow: one column for service galleries so photos stay large enough */
@media (max-width: 380px) {
  #content p:has(> a[data-lightbox]:first-child) {
    grid-template-columns: 1fr;
  }
}

/* Desktop: mobile-only menu controls */
@media (min-width: 769px) {
  .nav-close {
    display: none !important;
  }
}
