/**
 * Full-width image frames with object-fit: cover (fills box, same size).
 * Brand partner logos are excluded — they use contain (see #brand-partners).
 */

/* Brand logos — full logo visible, never cropped */
#brand-partners .brands-row img {
  width: 180px;
  max-width: 100%;
  height: 72px;
  object-fit: contain !important;
  object-position: center;
}

@media (max-width: 640px) {
  #brand-partners .brands-row img {
    width: min(150px, 38vw) !important;
    height: 64px !important;
    object-fit: contain !important;
  }
}

/* Page hero banners — full width, edge-to-edge cover (all inner pages) */
.page-hero {
  width: 100%;
  max-width: 100%;
  background: #0f1b2d;
  overflow: hidden;
}

.page-hero img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

/* —— Project cards —— */
.project-img {
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  overflow: hidden;
  position: relative;
  background: #e8eaed;
  display: block;
}

.project-img img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

/* —— Gallery modal (interior / building) —— */
.viewer-main-frame {
  position: relative;
  width: 100%;
  height: min(480px, 52vh);
  min-height: 280px;
  overflow: hidden;
  background: #e8eaed;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.viewer-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0f1b2d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 8px 24px rgba(15, 27, 45, 0.18);
  transition: background 0.2s, transform 0.2s;
}

.viewer-nav-btn:hover {
  background: #c9a84c;
  transform: translateY(-50%) scale(1.04);
}

.viewer-nav-prev {
  left: 14px;
}

.viewer-nav-next {
  right: 14px;
}

.viewer-main {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center;
  display: block;
}

.viewer-thumb {
  width: 88px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  background: #e8eaed;
}

.viewer-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

/* —— Commercial work detail —— */
.commercial-work-detail .viewer-main-frame,
.commercial-work-detail .main-image {
  width: 100%;
}

.commercial-work-detail .main-image {
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
}

.commercial-work-detail .thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
}

/* —— Commercial works grid cards —— */
.commercial-works .card {
  width: 100%;
  height: 220px;
  min-height: 220px;
  overflow: hidden;
  background: #e8eaed;
  display: block;
}

.commercial-works .card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

/* —— Homepage gallery —— */
.gallery-item {
  width: 100%;
  overflow: hidden;
  background: #e8eaed;
  min-height: 260px;
}

.gallery-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

/* —— Projects page —— */
.project-banner {
  width: 100%;
  height: 200px;
  min-height: 200px;
  overflow: hidden;
  background: #e8eaed;
}

.project-banner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

.projects-grid .project-img img,
.section .project-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* —— How it works —— */
.step-img {
  width: 100% !important;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  object-fit: cover !important;
  object-position: center;
  display: block;
  background: #e8eaed;
}

/* —— Index working steps + about —— */
.step-panel-img {
  width: 100% !important;
  height: 100% !important;
  min-height: 420px;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

.about-img {
  width: 100% !important;
  height: 520px;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

/* —— Commercial projects cards —— */
.inst-card {
  width: 100%;
  overflow: hidden;
  background: #e8eaed;
}

.inst-card img,
.gallery-images img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

.gallery-images img {
  height: 210px;
}

/* Lightbox — full image when zoomed (not cropped) */
.lightbox-inner img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: min(92vh, 1000px);
  object-fit: contain !important;
}

@media (max-width: 640px) {
  .project-img {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }

  .viewer-thumb {
    width: 72px;
    height: 48px;
  }
}
