/* Later gallery rules refine earlier layouts; retain their cascade order. */

/* Drone Aerial Imaging — Portfolio */

.portfolio-hero {
  background: linear-gradient(115deg, #031832 0%, #092e57 70%, #164d7c 100%);
  color: #fff;
  min-height: 340px;
  display: flex;
  align-items: center;
}

.portfolio-hero-content {
  padding: 75px 0;
}

.portfolio-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #9ed9ff;
  margin: 0 0 14px;
}

.portfolio-hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0 0 14px;
}

.portfolio-hero-tagline {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 16px;
}

.portfolio-hero-content > p:last-child {
  max-width: 630px;
  font-size: 15px;
  line-height: 1.75;
  color: #dceafa;
}

/* Introduction */

.portfolio-intro {
  text-align: center;
  padding: 65px 0;
  background: #fff;
}

.portfolio-eyebrow {
  color: #008bff;
  letter-spacing: 2px;
  font-weight: 800;
  font-size: 11px;
  margin: 0 0 12px;
}

.portfolio-intro h2,
.portfolio-section-heading h2,
.portfolio-future h2 {
  font-size: clamp(27px, 3vw, 37px);
  letter-spacing: -0.8px;
  margin: 0 0 15px;
}

.portfolio-intro p:last-child,
.portfolio-section-heading > p:last-child,
.portfolio-future > .container > p:last-child {
  max-width: 750px;
  color: #48607d;
  font-size: 15px;
  line-height: 1.8;
  margin: 0 auto;
}

/* Empty gallery */

.portfolio-gallery {
  background: #f1f5f9;
  padding: 75px 0;
}

.portfolio-empty {
  max-width: 760px;
  margin: 0 auto;
  padding: 75px 35px;
  background: #fff;
  border: 2px dashed #c9d8e8;
  border-radius: 12px;
  text-align: center;
}

.portfolio-empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #e9f4ff;
  color: #1689e8;
  font-size: 42px;
  line-height: 76px;
  margin: 0 auto 22px;
}

.portfolio-empty h2 {
  font-size: 29px;
  margin: 0 0 18px;
  color: #08274b;
}

.portfolio-empty p {
  max-width: 540px;
  margin: 0 auto 12px;
  color: #48607d;
  font-size: 15px;
  line-height: 1.75;
}

/* Categories */

.portfolio-categories {
  padding: 75px 0;
  background: #fff;
}

.portfolio-section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.portfolio-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.portfolio-category {
  padding: 30px;
  background: #f1f5f9;
  border: 1px solid #e2eaf3;
  border-radius: 9px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.portfolio-category:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(7, 31, 70, 0.09);
}

.portfolio-category-number {
  color: #008bff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.portfolio-category h3 {
  color: #08274b;
  font-size: 19px;
  line-height: 1.35;
  margin: 14px 0 12px;
}

.portfolio-category p {
  color: #48607d;
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
}

/* Future gallery features */

.portfolio-future {
  background: #edf4fa;
  padding: 65px 0;
  text-align: center;
}

/* Contact CTA */

.portfolio-bottom-cta {
  text-align: center;
  padding: 70px 0;
  background: linear-gradient(120deg, #031d3b, #0b3967);
  color: #fff;
}

.portfolio-bottom-cta h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin: 0 0 14px;
}

.portfolio-bottom-cta p:not(.portfolio-kicker) {
  font-size: 15px;
  color: #dceafa;
  margin: 0 0 25px;
}

/* Responsive */

@media (max-width: 900px) {
  .portfolio-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .portfolio-hero {
    min-height: 300px;
  }

  .portfolio-hero-content {
    padding: 55px 0;
  }

  .portfolio-intro,
  .portfolio-gallery,
  .portfolio-categories,
  .portfolio-future {
    padding: 45px 0;
  }

  .portfolio-empty {
    padding: 50px 22px;
  }

  .portfolio-category-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-bottom-cta {
    padding: 50px 0;
  }
}

/* Completed project gallery */
.portfolio-project {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
  gap: 34px;
  align-items: center;
  background: #fff;
  border: 1px solid #e2eaf3;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 12px 30px #071f4612;
}
.project-photo-wrap {
  min-width: 0;
}
.project-photo-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #061e3b;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}
.project-photo-button img {
  display: block;
  width: 100%;
  height: 390px;
  object-fit: cover;
}
.photo-expand {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: #061e3bdf;
  color: #fff;
  padding: 9px 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}
.project-details h3 {
  font-size: clamp(23px, 2.5vw, 31px);
  line-height: 1.2;
  margin: 0 0 14px;
  color: #071f46;
}
.project-details > p:not(.portfolio-eyebrow) {
  font-size: 14px;
  line-height: 1.8;
  color: #48607d;
}
.project-gallery-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 22px 0 14px;
}
.project-gallery-controls span {
  font-size: 13px;
  color: #48607d;
  font-weight: 700;
}
.gallery-arrow {
  border: 1px solid #bfd1e3;
  background: #fff;
  color: #071f46;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
}
.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background: #edf6ff;
}
.project-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.gallery-thumb {
  border: 3px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  background: #fff;
  cursor: pointer;
}
.gallery-thumb.is-selected {
  border-color: #008bff;
}
.gallery-thumb img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  display: block;
}
.portfolio-lightbox[hidden] {
  display: none;
}
.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 60px 18px 25px;
  background: rgba(1, 10, 23, 0.96);
  color: #fff;
}
.lightbox-figure {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 135px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox-figure figcaption {
  font-size: 13px;
  color: #dceafa;
}
.lightbox-close,
.lightbox-nav {
  border: 1px solid #ffffff66;
  color: #fff;
  background: #122d4c;
  border-radius: 5px;
  cursor: pointer;
}
.lightbox-close {
  position: absolute;
  top: 15px;
  right: 18px;
  font-size: 29px;
  width: 44px;
  height: 44px;
}
.lightbox-nav {
  flex: none;
  font-size: 23px;
  width: 45px;
  height: 55px;
}
@media (max-width: 850px) {
  .portfolio-project {
    grid-template-columns: 1fr;
  }
  .project-photo-button img {
    height: auto;
    aspect-ratio: 3/2;
  }
  .project-details {
    padding: 0 4px 8px;
  }
}
@media (max-width: 550px) {
  .portfolio-project {
    padding: 12px;
    gap: 20px;
  }
  .gallery-thumb img {
    height: 60px;
  }
  .portfolio-lightbox {
    padding-inline: 5px;
    gap: 3px;
  }
  .lightbox-nav {
    width: 32px;
    height: 44px;
  }
  .photo-expand {
    font-size: 11px;
  }
}

/* Multiple project galleries */
.portfolio-gallery .container > .portfolio-project + .portfolio-project {
  margin-top: 32px;
}
.portfolio-project[data-gallery="land"] .project-thumbnails {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 550px) {
  .portfolio-project[data-gallery="land"] .gallery-thumb img {
    height: 54px;
  }
}

/* Alternate portfolio project layouts */

/* Default: image on left, details on right */
.portfolio-project {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
}

/* Reversed: details on left, image on right */
.portfolio-project-reverse .project-photo-wrap {
  grid-column: 2;
  grid-row: 1;
}

.portfolio-project-reverse .project-details {
  grid-column: 1;
  grid-row: 1;
}

/* Mobile: image above details for both projects */
@media (max-width: 768px) {
  .portfolio-project {
    grid-template-columns: 1fr;
  }

  .portfolio-project-reverse .project-photo-wrap {
    grid-column: 1;
    grid-row: 1;
  }

  .portfolio-project-reverse .project-details {
    grid-column: 1;
    grid-row: 2;
  }
}

/* ======================================
   PROJECT 03 - RESIDENTIAL SITE 1
   ====================================== */

.residential-project {
  max-width: 1200px;
  margin: 70px auto;
  padding: 45px;
  background: #fff;
  border: 1px solid #e3eaf2;
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(10, 35, 65, 0.06);
}

.residential-project-heading {
  margin-bottom: 40px;
}

.project-eyebrow {
  display: block;
  margin-bottom: 12px;
  color: #0875c5;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.residential-project h2 {
  color: #09284a;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 15px;
}

.residential-project h3 {
  color: #09284a;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.residential-project p {
  color: #536579;
  line-height: 1.7;
}

.residential-gallery-section {
  margin-top: 40px;
}

.residential-gallery-section + .residential-gallery-section {
  padding-top: 40px;
  border-top: 1px solid #e3eaf2;
}

/* Cardinal 3x3 grid */

.cardinal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 25px;
}

.cardinal-cell {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #e9eff5;
}

.cardinal-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cardinal-cell button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.cardinal-cell button:hover img {
  transform: scale(1.04);
}

.cardinal-cell img {
  transition: transform 0.2s ease;
}

.cardinal-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #09284a;
  color: white;
  gap: 10px;
}

.cardinal-center svg {
  width: 60px;
  height: 60px;
}

.cardinal-center span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Surrounding area gallery */

.surround-gallery {
  margin-top: 25px;
}

.surround-featured {
  position: relative;
  background: #09284a;
  border-radius: 12px;
  overflow: hidden;
}

.surround-main-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  cursor: zoom-in;
}

.surround-prev,
.surround-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(9, 40, 74, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}

.surround-prev {
  left: 12px;
}
.surround-next {
  right: 12px;
}

.surround-gallery-bottom {
  margin-top: 16px;
}

.surround-count {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #09284a;
}

.surround-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.surround-thumb {
  width: 100px;
  height: 70px;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.surround-thumb.active {
  border-color: #0875c5;
}

.surround-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .residential-project {
    margin: 35px 15px;
    padding: 20px;
  }

  .cardinal-grid {
    gap: 5px;
  }

  .cardinal-center svg {
    width: 36px;
    height: 36px;
  }

  .cardinal-center span {
    font-size: 0.6rem;
  }

  .surround-thumb {
    width: 75px;
    height: 55px;
  }
}

/* ==========================================
   PROJECT 03 - SURROUNDING AREA LAYOUT
   ========================================== */

.surround-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.3fr);
  gap: 28px;
  align-items: center;
  width: 100%;
}

.surround-details {
  min-width: 0;
}

.surround-details h3 {
  margin-bottom: 12px;
}

.surround-details p {
  margin-bottom: 24px;
  line-height: 1.7;
}

.surround-gallery {
  min-width: 0;
  width: 100%;
  margin-top: 0;
}

.surround-featured {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #09284a;
}

.surround-main-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #09284a;
}

.surround-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.surround-thumb {
  width: 100%;
  height: 90px;
  overflow: hidden;
  border-radius: 7px;
  border: 2px solid transparent;
  cursor: pointer;
}

.surround-thumb.active {
  border-color: #ff7500;
}

.surround-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .surround-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .surround-details {
    order: 2;
  }

  .surround-gallery {
    order: 1;
  }
}

/* ==========================================
   CARDINAL VIEWS - FEATURED IMAGE ON LEFT
   ========================================== */

.cardinal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.cardinal-featured {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.cardinal-details {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .cardinal-layout {
    grid-template-columns: 1fr;
  }

  .cardinal-featured {
    grid-column: 1;
    grid-row: 1;
  }

  .cardinal-details {
    grid-column: 1;
    grid-row: 2;
  }
}

/* Cardinal image navigation */

.cardinal-navigation {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cardinal-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: #09284a;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cardinal-arrow:hover {
  background: #0875c5;
}

.cardinal-arrow:focus-visible {
  outline: 3px solid #ff7500;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .cardinal-preview-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ======================================
   CARDINAL VIEWS - TWO COLUMN LAYOUT
   ====================================== */

@media (min-width: 769px) {
  .cardinal-layout {
    display: grid;
    grid-template-columns:
      minmax(0, 1.3fr)
      minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    width: 100%;
  }

  .cardinal-featured {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .cardinal-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  .cardinal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

/* Cardinal thumbnail sizing */

.cardinal-cell {
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
}

.cardinal-cell button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
}

.cardinal-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile layout */

@media (max-width: 768px) {
  .cardinal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .cardinal-featured,
  .cardinal-details {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
  }

  .cardinal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
}

/* Highlight selected Cardinal Views thumbnail */

.cardinal-cell button.is-selected {
  outline: 3px solid #ff7500;
  outline-offset: -3px;
}

.cardinal-cell button:focus-visible {
  outline: 3px solid #0875c5;
  outline-offset: -3px;
}

/* ======================================
   RESIDENTIAL PROPERTY AERIAL VIDEO
   ====================================== */

.portfolio-video-project {
  background: #fff;
  border: 1px solid #e2eaf3;
  border-radius: 14px;
  padding: 28px;
  margin: 32px 0;
  box-shadow: 0 10px 30px rgba(7, 31, 70, 0.06);
}

.portfolio-video-heading {
  margin-bottom: 24px;
}

.portfolio-video-heading h3 {
  color: #09284a;
  font-size: clamp(23px, 2.5vw, 30px);
  margin: 0 0 12px;
}

.portfolio-video-heading p {
  color: #48607d;
  font-size: 14px;
  line-height: 1.8;
  max-width: 750px;
}

.portfolio-video-wrapper {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #09284a;
}

.portfolio-video-wrapper video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

@media (max-width: 768px) {
  .portfolio-video-project {
    padding: 16px;
  }
}

/* ======================================
   FLOATING PORTFOLIO SIDE NAVIGATION
   ====================================== */

html {
  scroll-behavior: smooth;
}

.portfolio-side-nav {
  position: fixed;
  left: 18px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;

  display: flex;
  flex-direction: column;
  gap: 8px;

  width: 160px;
  padding: 16px 12px;

  background: #09284a;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.portfolio-side-nav-title {
  color: #b8cee6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  margin-bottom: 5px;
}

.portfolio-side-nav a {
  display: block;
  padding: 10px 9px;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;

  transition: background 0.2s ease;
}

.portfolio-side-nav a:hover,
.portfolio-side-nav a:focus-visible {
  background: #ff7500;
  color: #ffffff;
}

/* Scroll targets */
#residential-site1,
#residential-video,
#sunset-hdr,
#land-hdr {
  scroll-margin-top: 90px;
}

/* Compact navigation on tablets */
@media (max-width: 1100px) {
  .portfolio-side-nav {
    left: 8px;
    right: auto;
    width: 125px;
    padding: 12px 8px;
  }
}

.portfolio-side-nav a {
  font-size: 11px;
  padding: 8px 6px;
}

/* Removed an inactive mobile rule discarded by the original CSS parser. */

/* Offset for sticky navigation */
#residential-site1,
#residential-video,
#sunset-hdr,
#land-hdr,
#orthomosaic {
  scroll-margin-top: 110px;
}

/* ======================================
   DEDICATED PORTFOLIO NAVIGATION COLUMN
   ====================================== */

.portfolio-page-layout {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
}

.portfolio-content {
  min-width: 0;
}

/* Navigation stays within its own column */
.portfolio-page-layout .portfolio-side-nav {
  position: sticky;
  top: 110px;
  left: auto;
  right: auto;
  transform: none;
  width: 100%;
  box-sizing: border-box;
}

/* Tablets */
@media (max-width: 1100px) and (min-width: 769px) {
  .portfolio-page-layout {
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 16px;
  }

  .portfolio-page-layout .portfolio-side-nav {
    width: 100%;
    left: auto;
    right: auto;
  }
}

/* Mobile: navigation returns above the projects */
@media (max-width: 768px) {
  .portfolio-page-layout {
    display: block;
  }

  .portfolio-page-layout .portfolio-side-nav {
    position: sticky;
    top: 90;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    margin-bottom: 24px;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .portfolio-page-layout .portfolio-side-nav a {
    flex: 1 1 40%;
  }
}

/* ======================================
   PROJECT 05 - ORTHOMOSAIC MAPPING
   ====================================== */

.portfolio-orthomosaic-project {
  background: #ffffff;
  border: 1px solid #e2eaf3;
  border-radius: 14px;
  padding: 28px;
  margin: 32px 0;
  box-shadow: 0 10px 30px rgba(7, 31, 70, 0.06);
}

/* Project heading */

.orthomosaic-heading {
  margin-bottom: 24px;
}

.orthomosaic-heading h2 {
  color: #09284a;
  font-size: clamp(24px, 2.5vw, 32px);
  margin: 0 0 12px;
}

.orthomosaic-heading p {
  color: #48607d;
  font-size: 14px;
  line-height: 1.8;
  max-width: 800px;
}

/* Main gallery container */

.orthomosaic-gallery {
  width: 100%;
  padding: 20px;
  background: #f0f4f9;
  border: 1px solid #e2eaf3;
  border-radius: 10px;
  box-sizing: border-box;
}

/* Large image */

.orthomosaic-viewer {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.orthomosaic-viewer img {
  display: block;
  width: 100%;
  max-height: 650px;
  object-fit: contain;
}

/* Left / right arrows */

.orthomosaic-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
}

.orthomosaic-controls button {
  background: #09284a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 18px;
  cursor: pointer;
}

.orthomosaic-controls button:hover,
.orthomosaic-controls button:focus-visible {
  background: #ff7500;
}

#orthomosaic-count {
  font-size: 13px;
  font-weight: 600;
  color: #09284a;
}

/* Selected image details */

.orthomosaic-image-details {
  margin: 12px 0 18px;
}

#orthomosaic-image-title {
  color: #09284a;
  font-size: 20px;
  margin: 0 0 6px;
}

#orthomosaic-image-description {
  color: #48607d;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* Thumbnail gallery */

.orthomosaic-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.orthomosaic-thumb {
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.orthomosaic-thumb:hover {
  border-color: #a5b8cd;
}

.orthomosaic-thumb.active {
  border-color: #ff7500;
}

.orthomosaic-thumb img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: contain;
}

/* Mobile layout */

@media (max-width: 768px) {
  .portfolio-orthomosaic-project {
    padding: 16px;
  }

  .orthomosaic-gallery {
    padding: 12px;
  }

  .orthomosaic-thumb img {
    height: 75px;
  }

  #orthomosaic-image-title {
    font-size: 18px;
  }
}

/* ======================================
   ORTHOMOSAIC LAYOUT FIX
   ====================================== */

@media (min-width: 769px) {
  .portfolio-orthomosaic-project .orthomosaic-gallery {
    display: grid !important;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) !important;
    gap: 28px;
    align-items: center;
  }

  .portfolio-orthomosaic-project .orthomosaic-viewer {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  .portfolio-orthomosaic-project .orthomosaic-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }
}

/* Keep mobile stacked */
@media (max-width: 768px) {
  .portfolio-orthomosaic-project .orthomosaic-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .portfolio-orthomosaic-project .orthomosaic-viewer,
  .portfolio-orthomosaic-project .orthomosaic-details {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Compact portfolio introduction so projects appear sooner. */
.portfolio-hero {
  min-height: 0;
}

.portfolio-hero-content {
  padding: 24px 0;
}

.portfolio-hero .portfolio-kicker {
  margin-bottom: 8px;
}

.portfolio-hero h1 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 8px;
}

.portfolio-hero-tagline {
  font-size: 17px;
  margin: 0 0 8px;
}

.portfolio-hero-content > p:last-child {
  margin: 0;
  line-height: 1.5;
}

.portfolio-intro {
  padding: 20px 0;
}

.portfolio-intro .portfolio-eyebrow {
  margin-bottom: 6px;
}

.portfolio-intro h2 {
  font-size: clamp(23px, 2.5vw, 29px);
  margin-bottom: 8px;
}

.portfolio-intro p:last-child {
  line-height: 1.5;
}

.portfolio-gallery {
  padding-top: 24px;
}

.portfolio-gallery > .container > .portfolio-section-heading {
  margin-bottom: 20px;
}
