/* Real TCT photographs: deliberately isolated from the established site styles. */
.own-photo, .own-gallery, .photo-slide { min-width: 0; margin: 0; }
.own-photo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo-frame { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface); color: var(--ink); }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-contain .photo-frame img { object-fit: contain; }
.own-photo figcaption { padding: 12px 15px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.own-photo-stack { display: grid; gap: 24px; }
.own-photo-stack > * { width: 100%; min-width: 0; }
.detail-media.own-photo-stack .retained-illustration { min-height: 0; aspect-ratio: 3 / 2; border-radius: var(--radius); }
.own-gallery { position: relative; }
.photo-track { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--accent) var(--surface-2); border-radius: var(--radius); }
.photo-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.photo-slide .own-photo { height: 100%; }
.photo-slide figcaption { min-height: 63px; }
.photo-controls { display: none; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 10px; }
.own-gallery.gallery-ready .photo-controls { display: flex; }
.photo-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 22px; cursor: pointer; }
.photo-controls button:hover { background: var(--accent-soft); }
.photo-controls button:disabled { opacity: .4; cursor: default; }
.photo-count { color: var(--muted); font-size: 13px; min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.own-photo-grid { display: grid; gap: 18px; }
.four-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.four-photos .own-photo figcaption { padding: 10px 12px; }
.own-photo-section .section-heading { margin-bottom: 30px; }
.office-photo-layout > .page-width { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.office-photo-layout .section-heading { grid-column: 1 / -1; margin-bottom: 0; }
.address-photo { margin-top: 28px; }
.own-request-note { padding-left: 18px; border-left: 2px solid var(--accent); }
@media (max-width: 980px) { .four-photos { gap: 12px; } }
@media (max-width: 760px) {
  .four-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office-photo-layout > .page-width { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .office-photo-layout .section-heading { grid-column: auto; }
  .detail-media.own-photo-stack { grid-row: auto; padding-top: 0; gap: 20px; }
  .own-photo figcaption { padding: 10px 12px; }
}
@media (max-width: 430px) {
  .four-photos { gap: 10px; }
  .four-photos figcaption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .photo-track { scroll-behavior: auto; } }
.photo-controls button:focus-visible, .photo-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.photo-track { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.photo-frame img { -webkit-user-drag: none; user-select: none; }
.two-photos { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 900px; }
@media (max-width: 600px) { .two-photos { grid-template-columns: minmax(0,1fr); } }

.loxone-touch-photo .photo-frame img { object-fit: cover; object-position: center 46%; }

/* A decorative copy fills portrait margins; the main photograph stays complete. */
.photo-contain .photo-frame { isolation: isolate; }
.photo-contain .photo-frame .photo-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.15);
  opacity: .72;
  pointer-events: none;
}
.photo-contain .photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--surface);
  opacity: .22;
  pointer-events: none;
}
.photo-contain .photo-frame > img:not(.photo-background) { position: relative; z-index: 2; }
/* Setting this attribute restores plain light/dark margins without changing photos. */
:root[data-photo-fill="solid"] .photo-background,
:root[data-photo-fill="solid"] .photo-contain .photo-frame::before { display: none; }

.hero-photo-card .visual-frame { aspect-ratio: 3 / 2; }

/* Company milestones: concise headings and a continuous narrative. */
.company-history { align-self: start; }
.company-history > div { padding-bottom: 27px; }
.company-history h3 { margin: 7px 0 0; font-size: 18px; line-height: 1.4; font-weight: 400; }
.company-history .timeline-description { margin-top: 7px; font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 45ch; }
@media (max-width: 430px) { .company-history { padding-left: 27px; } .company-history > div::before { left: -33px; } }

/* All photo captions use the same left alignment in both languages. */
.own-photo figcaption { text-align: left; font-family: inherit; font-weight: 350; }

/* Modern image encoding with the existing WebP photograph as fallback. */
.hero-photo-card picture { display: block; width: 100%; height: 100%; }
