/* Reserve space for fixed navbar (you already have --nav-h from earlier fix) */
:root { --nav-h: 64px; }
body { padding-top: var(--nav-h); }

/* CSS quick fix */
:root { --nav-h: 64px; } /* default navbar height; JS will update it if you have script below */

.carousel,
.carousel-inner,
.carousel-item { width: 100%; overflow: hidden; }

.carousel-item img {
  display: block;
  width: 100%;
  height: calc(100vh - var(--nav-h));   /* limit image height to viewport minus navbar */
  max-height: calc(100vh - var(--nav-h));
  object-fit: cover;                     /* preserves aspect ratio and fills area */
  object-position: center;
}

/* ===== HERO CAROUSEL SIZE CONTROL ===== */

/* tune this to how tall you want the hero */
/* :root {
  --hero-max-h: 520px;    try 480–600px depending on your taste 
} */

/* limit the carousel */
/* #heroCarousel {
  max-height: var(--hero-max-h);
  overflow: hidden;
} */

/* also limit inner parts */
/* #heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
  max-height: var(--hero-max-h);
} */

/* make every slide image fill the box without stretching */
/* #heroCarousel .carousel-item img {
  width: 100%;
  height: 100%;
  max-height: var(--hero-max-h);
  object-fit: cover;      fills the box, may crop a bit */
  /* object-position: center;
  display: block;
}
@media (max-width: 575.98px) {
  :root {
    --hero-max-h: 420px;
  }
} */


/* Sections */
.section { padding-block: 2rem; scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ---- Carousel: responsive, consistent, centered ---- */
.carousel-hero .frame {
  position: relative;
  width: 100%;
}

.carousel-hero .frame::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;           /* desktop/tablet default */
}

/* On small screens use a taller ratio so faces/text aren't cropped */
@media (max-width: 575.98px) {
  .carousel-hero .frame::before {
    aspect-ratio: 4 / 3;          /* friendlier for phones */
  }
}

/* Make the image fill the frame cleanly and center the crop */
.carousel-hero .frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;               /* fills without distortion */
  object-position: center center;  /* prevents "cut from top" */
}

/* Optional: if captions add unwanted vertical space on small screens */
@media (max-width: 575.98px) {
  .carousel-hero .carousel-caption { padding-bottom: .75rem; }
}

/* --- Services grid / card styles --- */
/* --- LIGHT MODE: Services grid / card styles --- */
.row.g-3 { --bs-gutter-x: .8rem; --bs-gutter-y: .8rem; }

/* thumbnail card wrapper */
.thumb-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  border: 0;
  background: #fff;               /* light card background */
  padding: 0;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  border-radius: 12px;
  transition: transform .28s ease, box-shadow .2s ease;
}

/* make the whole card look subtle on light bg */
.thumb-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(20, 30, 50, .06);
}

/* media area styling (light) */
.thumb-media {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg,#f7f9fb,#eef4f8);
  box-shadow: inset 0 -10px 24px rgba(4,22,35,.02);
}

/* image: remove darkening filter used in dark mode */
.thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;               /* show true image colors */
  transition: transform .32s ease;
}

/* caption area under the thumb (light) */
.thumb-caption {
  flex: 0 0 auto;
  height: 68px;
  box-sizing: border-box;
  padding: 12px 10px 10px;
  margin-top: 14px;
  background: transparent;
}

/* title/sub text (dark text for light background) */
.thumb-title {
  font-weight: 800;
  color: #111827;            /* dark gray */
  font-size: 1rem;
  margin: 0;
  text-shadow: none;
}
.thumb-sub {
  font-size: .66rem;
  letter-spacing: 1.2px;
  color: #6b7280;            /* muted gray */
  margin-top: 6px;
  font-weight: 700;
}

/* selected state — clear outline on light bg */
.thumb-card.is-selected {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(16, 24, 40, .08);
  border: 1px solid rgba(59,130,246,0.12); /* soft blue border */
}

/* Right detail panel: light card style */
.service-detail {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20,30,50,.04);
  color: #111827;
}

/* detail image slight rounding */
.service-detail img { border-radius: 8px; object-fit: cover; }

/* sticky panel on wide screens */
@media (min-width: 992px) {
  .service-detail { position: sticky; top: calc(var(--nav-h,64px) + 18px); }
}

/* remove dark overlay pseudo-element if present */
.card-media::after,
.thumb-media::after {
  background: none !important;
}

/* small tweaks on mobile */
@media (max-width: 575.98px) {
  .thumb-caption { height: 60px; padding: 8px; }
  .thumb-title { font-size: .96rem; }
}

#svcLongDesc {
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.7;
}

#svcLongDesc ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}

#svcLongDesc li {
  margin-bottom: 0.25rem;
}


/* ensure body/section background is light */
.section.bg-light { background: #fbfdff; } /* very subtle off-white */
body.dark-mode .thumb-card { background: transparent; }
body.dark-mode .thumb-media { background: none; }
body.dark-mode .thumb-img { filter: brightness(.62) saturate(.98); }
body.dark-mode .thumb-title { color: #fff; text-shadow: 0 6px 18px rgba(0,0,0,.45); }
body.dark-mode .thumb-sub { color: rgba(255,255,255,0.85); }
body.dark-mode .service-detail { background: #0f1724; color: #fff; }
