/* =========================================================
   Büro & Objekt – Custom Theme
   CI: Weiß + Blau #004791
   Stack: Bootstrap 5 local
   ========================================================= */

/* ---------- CSS Variables (CI & Basics) ---------- */
:root {
  --bo-primary: #004791;
  --bo-primary-dark: #003766;
  --bo-text: #1a1a1a;
  --bo-muted: #6c757d;
  --bo-border: #e5e5e5;
  --bo-bg-light: #ffffff;

  /* Spacing for gallery */
  --bo-gap: 10px;
}

/* ---------- Global Base ---------- */
html { scroll-behavior: smooth; }

body.bo-page {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--bo-text);
  background-color: var(--bo-bg-light);
  line-height: 1.5;
}

/* Accessibility skip link */
.bo-skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.75rem 1rem;
  background: var(--bo-primary);
  color: #fff;
  z-index: 1000;
}

/* ---------- Container ---------- */
.bo-container { max-width: 1400px; }

/* Optional: use for full-width sections with small padding */
.bo-container-fluid {
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

/* ---------- Header / Navbar ---------- */
.bo-header { background-color: #fff; }

.navbar {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.bo-logo { display: block; }

.navbar-nav .nav-link {
  font-size: 1.15rem;
  color: var(--bo-text);
  padding: 0.5rem 0.75rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--bo-primary);
}

.navbar-nav .nav-link.active {
  color: var(--bo-primary);
  font-weight: 600;
}

/* Toggler: subtle border */
.navbar-toggler { border-color: rgba(0, 0, 0, 0.1); }

/* ---------- Links ---------- */
.bo-link {
  color: var(--bo-text);
  text-decoration: none;
}

.bo-link:hover,
.bo-link:focus { color: var(--bo-primary); }

/* ---------- Borders ---------- */
.border-top { border-top: 1px solid var(--bo-border) !important; }
.border-bottom { border-bottom: 1px solid var(--bo-border) !important; }

/* =========================================================
   HEADER – logo only + centered nav
   ========================================================= */

.bo-nav-wrap { position: relative; }

.bo-brand-logo {
  padding: 0;
  margin: 0;
  line-height: 1;
}

.bo-brand-logo img.bo-logo { 
  display: block; 
  height: clamp(60px, 8vw, 85px);
  width: auto;
}

.bo-main-nav .nav-link {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Mobile: keep default collapse alignment */
@media (max-width: 991.98px) {
  .bo-main-nav { text-align: left; }
}

/* =========================================================
   HERO FULL WIDTH (index)
   ========================================================= */

.bo-hero-full { background-color: #fff; }

.bo-hero-img-full {
  width: 100%;
  height: min(70vh, 720px);
  object-fit: cover;
}

.bo-hero-text {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   FOOTER
   ========================================================= */

.bo-footer { background-color: #fff; }

.bo-footer-links a {
  font-size: 0.85rem;
  color: var(--bo-text);
  text-decoration: none;
}

.bo-footer-links a:hover,
.bo-footer-links a:focus {
  color: var(--bo-primary);
  text-decoration: underline;
}

/* =========================================================
   PAGE INTRO (Portfolio, Index title, etc.)
   ========================================================= */

.bo-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bo-primary);
  margin: 0;
}

.bo-page-title-left { text-align: left; }

.bo-page-intro {
  max-width: 70ch;
  color: var(--bo-muted);
  font-size: 0.95rem;
}

.bo-page-intro-spacing { margin-top: 1.25rem; }

/* =========================================================
   INDEX – claim text under image
   ========================================================= */

.bo-hero-claim {
  max-width: 90ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 1rem;
  color: var(--bo-muted);
  line-height: 1.6;
}

.bo-hero-claim-strong {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: var(--bo-primary);
  font-weight: 600;
}

/* =========================================================
   PORTFOLIO GRID (main categories)
   ========================================================= */

.bo-portfolio-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.bo-portfolio-image {
  position: relative;
  overflow: hidden;
  background-color: #f2f2f2;
  aspect-ratio: 4 / 3;
}

.bo-portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.bo-portfolio-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bo-text);
  text-align: center;
}

.bo-portfolio-tile:hover .bo-portfolio-image img { transform: scale(1.04); }
.bo-portfolio-tile:hover .bo-portfolio-caption { color: var(--bo-primary); }

.bo-portfolio-grid-center { margin-top: 4rem; }

@media (min-width: 1400px) {
  .bo-portfolio-grid-center { margin-top: 5rem; }
}
@media (max-width: 991px) {
  .bo-portfolio-grid-center { margin-top: 3rem; }
}
@media (max-width: 576px) {
  .bo-portfolio-grid-center { margin-top: 2.5rem; }
}

/* Keep 4 items in one row; on smaller screens allow horizontal scroll */
@media (max-width: 991px) {
  .bo-portfolio-grid {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .bo-portfolio-grid > div { min-width: 220px; }
}

/* =========================================================
   GALLERY – 10 images (fixed layout like your mock)
   ========================================================= */

.bo-gallery-fixed{
  display: grid;
  gap: 14px;

  /* 5 columns: wide, narrow, wide, narrow, wide */
  grid-template-columns: 1.25fr 0.85fr 1.25fr 0.85fr 1.25fr;

  /* 6 “units” in height */
  grid-template-rows: repeat(8, 1fr);

  /* fixed collage height */
  height: clamp(420px, 55vh, 620px);

  /* IMPORTANT: makes spans pack correctly */
  grid-auto-flow: row dense;

  align-items: stretch;
}

.bo-gallery-fixed .bo-tile{
  border: 0;
  padding: 0;
  background: transparent;

  width: 100%;
  height: 100%;

  display: block;
  overflow: hidden;
  cursor: zoom-in;

  line-height: 0; /* prevents “strip” effects */
  border-radius: 0;
}

.bo-gallery-fixed .bo-tile img{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;

  background: #f2f2f2;
  transition: transform 250ms ease;
}

.bo-gallery-fixed .bo-tile:hover img{
  transform: scale(1.01);
}

/* Columns */
.bo-gallery-fixed .c1{ grid-column: 1; }
.bo-gallery-fixed .c2{ grid-column: 2; }
.bo-gallery-fixed .c3{ grid-column: 3; }
.bo-gallery-fixed .c4{ grid-column: 4; }
.bo-gallery-fixed .c5{ grid-column: 5; }

/* Spans */
.bo-gallery-fixed .bo-span-3{ grid-row: span 4; } /* normal */
.bo-gallery-fixed .bo-span-2{ grid-row: span 3; } /* shorter (3,7) */
.bo-gallery-fixed .bo-span-4{ grid-row: span 5; } /* taller  (4,8) */

/* RESPONSIVE */
@media (max-width: 992px){
  .bo-gallery-fixed{
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .bo-gallery-fixed .c1,
  .bo-gallery-fixed .c2,
  .bo-gallery-fixed .c3,
  .bo-gallery-fixed .c4,
  .bo-gallery-fixed .c5,
  .bo-gallery-fixed .bo-span-2,
  .bo-gallery-fixed .bo-span-3,
  .bo-gallery-fixed .bo-span-4{
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .bo-gallery-fixed .bo-tile{
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .bo-gallery-fixed .bo-tile img{
    height: 100% !important;
  }
}

@media (max-width: 576px){
  .bo-gallery-fixed{ grid-template-columns: 1fr; }
}

/* =========================================================
   LIGHTBOX (Bootstrap Modal styling)
   ========================================================= */

/* =========================
   LIGHTBOX – FULLSCREEN
   ========================= */

.bo-lightbox-modal {
  background: rgba(0,0,0,0.92);
}

.bo-lightbox {
  background: transparent;
  border: 0;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Center image */
.bo-lightbox-body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image keeps natural ratio */
.bo-lightbox-body img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Close button */
.bo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 20;
  filter: invert(1);
}

/* Arrows */
.bo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  padding: 0 16px;
  cursor: pointer;
  z-index: 20;
  opacity: 0.75;
}

.bo-lightbox-nav:hover {
  opacity: 1;
}

.bo-lightbox-prev { left: 10px; }
.bo-lightbox-next { right: 10px; }

/* =========================================================
   SERVICE PAGE (Portfolio – Service)
   ========================================================= */

.bo-service-spacer {
  height: clamp(16px, 3vh, 34px);
}

/* Titles above images, centered */
.bo-service-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bo-text);
  text-align: center;
  margin: 0 0 0.75rem 0;
}

/* Card wrapper */
.bo-service-card {
  height: 100%;
}

/* Framed image like mockup */
.bo-service-image {
  border: 1px solid rgba(0,0,0,0.35);
  background: #f2f2f2;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.bo-service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text under image */
.bo-service-text {
  margin-top: 1rem;
  text-align: center;
  color: var(--bo-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Slightly tighter on small screens */
@media (max-width: 576px) {
  .bo-service-text {
    text-align: left;
  }
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */

.bo-contact-spacer {
  height: clamp(8px, 2vh, 18px);
}

/* Layout simile a Über uns, ma un po’ più “centrato” */
.bo-contact-layout {
  display: grid;
  grid-template-columns: 1fr 0.42fr; /* immagine + info (più vicine) */
  gap: 18px;
  align-items: start;

  /* evita che i blocchi “scappino” ai lati su schermi larghi */
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.bo-contact-left,
.bo-contact-right {
  min-width: 0;
}

/* Image: NON troppo grande + NO border */
.bo-contact-media {
  border: 0;
  background: transparent;
  overflow: visible;

  /* limita altezza per evitare scroll */
  max-height: 52vh;
}

.bo-contact-media img {
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain; /* niente ritagli */
  display: block;
}

.bo-contact-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--bo-muted);
  line-height: 1.45;
}

/* Card testo (senza “box” visivo: coerente col tuo stile pulito) */
.bo-contact-card {
  background: transparent;
}

/* Titolo */
.bo-contact-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bo-primary);
  margin: 0 0 1rem 0;
}

/* Testi */
.bo-contact-text {
  color: var(--bo-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Orari (stile “lista compatta” a due colonne) */
.bo-contact-hours {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.bo-contact-hours-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bo-contact-hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.bo-contact-hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* CTA */
.bo-contact-actions {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.bo-map-btn {
  background: var(--bo-primary);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: 0.55rem 0.9rem;
}

.bo-map-btn:hover,
.bo-map-btn:focus {
  background: var(--bo-primary-dark);
  color: #fff;
}

.bo-map-note {
  font-size: 0.8rem;
  color: var(--bo-muted);
  line-height: 1.45;
  margin-top: 0.5rem;
}

/* Responsive: stack */
@media (max-width: 992px) {
  .bo-contact-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
  }

  .bo-contact-media,
  .bo-contact-media img {
    max-height: none;
  }
}

/* =========================================================
   ABOUT US PAGE
   ========================================================= */

.bo-about-spacer {
  height: clamp(6px, 1.5vh, 14px);
}

/* Layout */
.bo-about-layout {
  display: grid;
  grid-template-columns: 1fr 0.18fr; /* era 0.25fr */
  gap: 12px;                          /* era 20px → più vicina */
  align-items: start;
}

/* Columns */
.bo-about-left,
.bo-about-right {
  min-width: 0;
}

/* =========================
   MEDIA BASE (NO BORDER)
   ========================= */

.bo-about-media {
  background: transparent;   /* niente frame */
  overflow: visible;
  border: 0;
}

/* BIG image */
.bo-about-media-big {
  margin-bottom: 0.75rem;
}

/* BIG image behavior: NO CROP */
.bo-about-media-big img {
  width: 100%;
  height: auto;              /* important */
  max-height: 60vh;          /* evita immagini troppo alte */
  object-fit: contain;
  display: block;
}

/* SMALL image on the right */
.bo-about-media-small {
  max-width: 130px;   /* era 180px */
  margin-left: 5%;
  margin-top: 0.25rem;
}

/* SMALL image behavior: NO CROP */
.bo-about-media-small img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* =========================
   META & TEXT
   ========================= */

.bo-about-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.05rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--bo-text);
  text-align: center;
}

.bo-about-meta-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bo-about-meta-role {
  color: var(--bo-muted);
}

.bo-about-claim {
  text-align: center;
  font-weight: 600;
  color: var(--bo-text);
  font-size: 0.95rem;
  max-width: 90ch;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 992px) {
  .bo-about-layout {
    grid-template-columns: 1fr;
  }

  .bo-about-media-small {
    max-width: 240px;
    margin: 1.25rem auto 0;
  }

  .bo-about-meta {
    grid-template-columns: 1fr;
  }
}
