/* =========================================================
   Home page only (sitepages/homepage.html)
   ========================================================= */

/* =========================================================
   0) Layout / containers (controls left-right margins)
   ---------------------------------------------------------
   Tune these to match your reference site feel:
   - --home-container-max: overall max width
   - --home-gutter: side padding on small screens
   ========================================================= */

:root {
  --home-container-max: 1180px; /* try 1140 / 1200 / 1280 */
  --home-gutter: 1rem;          /* try 0.75rem for tighter */
}

/* A helper you can optionally add in templates:
   <div class="home-wrap"> ... </div>
   If you keep using .container, this still helps by normalizing. */
.home-wrap,
.home .container,
.container.home-container {
  max-width: var(--home-container-max);
}

/* Optional: make containers feel a bit tighter on very wide screens */
@media (min-width: 1400px) {
  :root { --home-container-max: 1200px; }
}

/* Ensure comfortable gutters on small screens */
.home .container,
.container.home-container {
  padding-left: var(--home-gutter);
  padding-right: var(--home-gutter);
}

/* =========================================================
   1) HERO
   ========================================================= */

.home-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-hero.no-hero {
  background: #0f2f23; /* dark fallback so outline-light buttons are visible */
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.home-hero .container {
  position: relative;
  z-index: 2;
}

.home-hero-title {
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
  max-width: 20ch;
}

.home-hero-subtitle {
  color: rgba(255,255,255,.85);
  margin-top: .75rem;
  max-width: 60ch;
}

/* =========================================================
   2) COMPANY INTRO (prose block)
   ========================================================= */

.prose {
  max-width: 80ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   3) SERVICES (grid + round cover)
   ========================================================= */

.home-service-card {
  text-decoration: none;
  display: block;
  height: 100%;
  color: inherit;
}

.home-service-card-inner {
  height: 100%;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.home-service-card:hover .home-service-card-inner {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.home-service-thumb-wrap {
  display: grid;
  place-items: center;
}

.home-service-thumb {
  width: 180px;
  height: 180px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border-subtle, #e5e7eb);
  background: var(--surface-2, #f5f7f9);
}

@media (max-width: 576px) {
  .home-service-thumb {
    width: 160px;
    height: 160px;
  }
}

.home-service-thumb--placeholder {
  background: linear-gradient(135deg, rgba(0,115,71,.10), rgba(24,181,122,.10));
}

.home-service-title {
  font-weight: 600;
  color: var(--brand-strong, #004633);
  text-wrap: balance;
}

/* Optional: keep service rows aligned when titles wrap */
.home-service-title {
  min-height: 3.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   4) STATS
   ========================================================= */

.home-stats {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.home-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}

.home-stats .container {
  position: relative;
  z-index: 2;
}

/* If you want stronger contrast for stat text, keep it scoped */
.home-stats .stat {
  text-align: center;
  padding: .75rem .5rem;
}

.home-stats .stat .num {
  color: #fff;
  font-weight: 800;
  font-size: 3.0rem;
  line-height: 1.05;
}

.home-stats .stat .lbl {
  color: rgba(255,255,255,.85);
  margin-top: .25rem;
  font-size: 1.05rem;
}

/* =========================================================
   5) WHY CHOOSE (cards)
   ========================================================= */
.home-why .card {
  border-radius: 16px;
}

.home-why img {
  display: block;
}

.home-why-icon {
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto .75rem; /* centers the board */
}

.home-why-icon img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
}

.home-why .card-body {
  align-items: center;
  text-align: center;
}

.home-why .fw-semibold {
  width: 100%;
}

/* =========================================================
   6) TEAM (homepage preview)
   ========================================================= */

.home-team .rounded-circle {
  object-fit: cover;
}

/* Optional: make team names feel consistent */
.home-team .fw-semibold {
  text-wrap: balance;
}

.home-team-avatar img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* =========================================================
   7) PROJECTS (carousel)
   ========================================================= */

.home-projects-carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.10);
  background: #0b1f18;
}

.home-projects-topbtn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.home-projects-carousel .carousel-inner {
  border-radius: 18px;
}

.home-project-slide {
  display: block;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 992px) {
  .home-project-slide { min-height: 480px; }
  .home-team-avatar img { 
      width: 140px;
      height: 140px;
   }
}
@media (max-width: 576px) {
  .home-project-slide { min-height: 520px; }
}

.home-project-card {
  width: min(520px, calc(100% - 2rem));
  background: #fff;
  border-radius: 16px;
  padding: 1.15rem 1.15rem;
  position: absolute;
  right: 18px;
  bottom: 18px;
  border: 1px solid rgba(0,0,0,.06);
}

@media (max-width: 576px) {
  .home-project-card {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 14px;
  }
}

.home-project-title {
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--brand-strong, #004633);
}

/* meta rows + chips (scoped to the homepage project card) */
.home-project-meta .meta-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .35rem;
}

.home-project-meta .meta-label {
  font-weight: 700;
  font-size: .9rem;
  color: #111;
}

.home-project-meta .chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .20rem .55rem;
  font-size: .82rem;
  line-height: 1.2;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  color: #0f172a;
}

.home-project-meta .chip-group {
  background: rgba(0,70,51,.06);
  border-color: rgba(0,70,51,.18);
}

.home-project-meta .chip-tag {
  background: rgba(2,132,199,.06);
  border-color: rgba(2,132,199,.18);
}

/* carousel controls */
.home-projects-carousel .carousel-control-prev,
.home-projects-carousel .carousel-control-next {
  width: 10%;
  min-width: 56px;
}

.home-projects-carousel .carousel-indicators {
  margin-bottom: 10px;
}
