/* Professional construction theme — deep navy + warm yellow accent */
:root {
  --primary: #0b2540; /* deep navy */
  --accent: #f6a800; /* warm construction yellow */
  --muted: #6b7280;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --brand-font: "Playfair Display", serif;
  --ui-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(11, 37, 64, 0.06);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--ui-font);
  background: var(--bg);
  color: #16202b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Topbar */
.topbar {
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
}
.topbar a {
  color: #fff;
  text-decoration: none;
}

/* Navbar */
.header-nav .navbar {
  transition: all 0.2s ease;
  background: transparent;
}
.navbar-light .navbar-nav .nav-link {
  color: #374151;
  margin-right: 0.6rem;
  transition: color 0.15s;
}
.navbar-light .navbar-nav .nav-link:hover {
  color: var(--primary);
}
.navbar-light .navbar-nav .nav-link.active {
  color: var(--accent);
  font-weight: 700;
}

/* Brand */
.site-logo-img {
  height: 56px;
  width: auto;
}
.brand-name {
  font-family: var(--brand-font);
  font-weight: 700;
  color: var(--primary);
}
.brand-text small {
  color: var(--muted);
}

/* Buttons */
.btn-construct-primary {
  background: var(--accent);
  color: #111827;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  border: 0;
  box-shadow: 0 6px 18px rgba(11, 37, 64, 0.08);
}
.btn-construct-primary:hover {
  transform: translateY(-3px);
  transition: all 0.12s ease;
}

/* Hero / Breadcrumb (keeps your existing markup) */
.bg-breadcrumb,
.hero-construct {
  background: linear-gradient(
      90deg,
      rgba(11, 37, 64, 0.85),
      rgba(11, 37, 64, 0.45)
    ),
    url("../img/hero-bg.jpg") center/cover no-repeat;
  color: #fff;
}
.hero-construct {
  padding: 5.5rem 0;
  text-align: center;
}
.bg-breadcrumb .display-4 {
  font-family: var(--brand-font);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Sections & cards */
.card,
.feature-item,
.service-item,
.project-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Service content */
.service-content a.fs-4 {
  color: var(--primary);
  font-weight: 600;
}

/* Counters */
.counter-item-inner {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

/* Contact form (preserve existing markup) */
.contact-card {
  border-radius: var(--radius);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.95);
}
.site-footer a {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
}
.site-footer h5,
.site-footer h6 {
  color: #fff;
}
.site-footer .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
  .brand-text {
    display: none !important;
  }
  .site-logo-img {
    height: 44px;
  }
}

/* small utilities */
.navbar-shrink {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  box-shadow: 0 6px 22px rgba(11, 37, 64, 0.06);
}
.small-muted {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Force proper before/after thumbnail grid inside project-list */
.project-list .proj-before-row .proj-thumb {
  /* xs: 2 per row (col-6) */
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
}
@media (min-width: 576px) {
  /* sm and up: 3 per row (33.333%) */
  .project-list .proj-before-row .proj-thumb {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
  }
}

/* Ensure thumbnail images always fill their column */
.project-list .proj-before-row .proj-thumb img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover;
}

/* Ensure after-image fills its column but never overflows */
.project-list .after-image,
.card .after-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
  /* keep a visual max height so very tall images don't dominate layout */
  max-height: 360px;
}

/* If you want the after-image to scale down further on small screens, adjust max-height */
@media (max-width: 767.98px) {
  .project-list .after-image,
  .card .after-image {
    max-height: 240px;
  }
}

/* Strongly enforce thumbnail column sizes and image sizing inside project-list */
.project-list .proj-before-row,
.project-list .proj-before-row > .proj-thumb {
  box-sizing: border-box;
}

/* XS: two per row */
.project-list .proj-before-row > .proj-thumb {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

/* SM and up: three per row */
@media (min-width: 576px) {
  .project-list .proj-before-row > .proj-thumb {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
  }
}

/* Ensure thumbnail images fill their container and never exceed 100% */
.project-list .proj-before-row .proj-thumb img,
.project-list .proj-before-row .proj-thumb picture,
.project-list .proj-before-row .proj-thumb video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
}

/* Ensure after images fill their column */
.project-list .after-image,
.card .after-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
  /* keep a visual max height so layout remains pleasant */
  max-height: 360px !important;
}

/* Smaller screens: reduce after-image max-height */
@media (max-width: 767.98px) {
  .project-list .after-image,
  .card .after-image {
    max-height: 240px !important;
  }
}

/* Remove any unwanted margins that could make thumbnails look small */
.project-list .proj-before-row > .proj-thumb img {
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure thumbnail columns inside project-list never collapse to full width */
.project-list .proj-before-row {
  margin-left: -0.35rem;
  margin-right: -0.35rem;
}
.project-list .proj-before-row .proj-thumb {
  box-sizing: border-box;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  /* XS: 2 per row (50%) */
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
}

/* SM and up: 3 per row (33.333%) */
@media (min-width: 576px) {
  .project-list .proj-before-row .proj-thumb {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
  }
}

/* If the theme or other CSS sets .col-sm-4 to display:block width:100%, the above !important overrides it.
   Also explicitly override .col-sm-4 inside project-list to be safe. */
.project-list .col-sm-4 {
  flex: 0 0 33.333333% !important;
  max-width: 33.333333% !important;
  width: 33.333333% !important;
}

/* Ensure thumbnail images always fill their container */
.project-list .proj-thumb img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
}

/* Ensure after-image fills its column fully */
.project-list .after-image,
.card .after-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
  max-height: 360px !important;
}

/* Smaller screens: reduce after-image max-height */
@media (max-width: 767.98px) {
  .project-list .after-image,
  .card .after-image {
    max-height: 240px !important;
  }
}

/* Padding for before-thumbnails without breaking width calculations */
.project-list .proj-thumb-img {
  padding: 5px !important;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Logo improvements: preserve aspect, avoid stretching, and scale nicely */
.navbar-brand-site {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.15rem 0;
}
.site-logo-img {
  max-height: 64px; /* visual height for desktop */
  width: auto !important;
  height: auto !important;
  display: block;
  object-fit: contain;
  /* avoid blurry scaling if the source is small:
	   ensure the image is not upscaled beyond natural size */
  max-width: 220px;
}

/* Inline SVG logo styling */
.navbar-brand-site .logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45); /* semi-transparent black panel behind SVG */
  box-shadow: 0 6px 18px rgba(11, 37, 64, 0.08);
}

.site-logo-svg {
  display: block;
  width: 160px; /* desktop width */
  height: auto;
  max-height: 64px;
}

/* ensure SVG text and shapes remain crisp on high-DPI */
.site-logo-svg {
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
}

/* responsive scaling */
@media (max-width: 991.98px) {
  .site-logo-svg {
    width: 130px;
    max-height: 48px;
  }
  .navbar-brand-site .logo-wrap {
    padding: 5px 6px;
  }
}
@media (max-width: 575.98px) {
  .site-logo-svg {
    width: 110px;
    max-height: 40px;
  }
  .navbar-brand-site .logo-wrap {
    padding: 4px 6px;
  }
}

/* Slightly adjust for large / small screens */
@media (min-width: 1200px) {
  .navbar-brand-site .logo-wrap .site-logo-img {
    height: 56px;
  }
}
@media (max-width: 575.98px) {
  .navbar-brand-site .logo-wrap .site-logo-img {
    height: 40px;
  }
}

/* Ensure image itself keeps its aspect and sits on the dark background cleanly */
.navbar-brand-site .logo-wrap .site-logo-img {
  display: block;
  height: 48px;
  width: auto !important;
  object-fit: contain;
  background: transparent;
}
