/* Compact (<1024px) fluid layout, mirrors the _buildCompact() branches in
   lib/sections/*.dart and lib/pages/landing_page.dart (gap = 64px). */

.compact-flow {
  --pad: 32px;
}
@media (max-width: 479px) {
  .compact-flow {
    --pad: 20px;
  }
}

.compact-section {
  padding: 0 var(--pad) 48px var(--pad);
  box-sizing: border-box; 
  width: 100%;
}

/* ---------- Hero ---------- */
.compact-hero-body {
  padding: 28px var(--pad) 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.compact-headline {
  font-size: 52px;
  line-height: 1.05;
}
@media (max-width: 479px) {
  .compact-headline {
    font-size: 40px;
  }
}
.compact-hero-subtext {
  font-size: 17px;
  line-height: 1.4;
  margin: 20px 0 0;
  white-space: normal;
}
.compact-hero-body .pill-btn {
  margin-top: 28px;
}
.compact-hero-video {
  width: 120%;
  aspect-ratio: 737 / 718;
  margin-top: -80px;
  margin-left: -40px; 
}
.compact-hero-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Stats bar ---------- */
.compact-stats-bar {
  background: var(--c-stats-bar-bg);
  padding: 56px var(--pad);
}
.compact-stats-heading {
  font-size: 34px;
  letter-spacing: 2px;
}
@media (max-width: 479px) {
  .compact-stats-heading {
    font-size: 28px;
  }
}
.compact-stats-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  margin-top: 40px;
}
.compact-stat {
  width: 160px;
  display: flex;
  flex-direction: column;
}
.compact-stat-number {
  font-size: 40px;
}
.compact-stat-label {
  font-size: 16px;
  margin-top: 8px;
  white-space: normal;
}

/* ---------- Stats cards ---------- */
.compact-section:has(.compact-impact-heading) {
  padding-top: 56px;
  text-align: center;
}
.compact-impact-heading {
  text-align: center;
  margin-top: 16px;
}
.compact-stat-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
  text-align: left;
}
.compact-card-number {
  font-size: 48px;
  margin-top: 20px;
}
.compact-card-title {
  font-size: 22px;
  margin-top: 8px;
}
.compact-card-body {
  font-size: 15px;
  margin-top: 8px;
}

/* ---------- What we do ---------- */
.compact-service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px; /* Restricts max size so cards don't stretch infinitely */
  margin: 32px auto 0 auto; /* The 'auto' left/right margins perfectly center the grid */
}
@media (min-width: 600px) {
  .compact-service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Our story ---------- */
/* Offsets scroll-to-target position so the fixed navbar (desktop) doesn't
   cover the top of the section when "About us" is tapped. */
#our-story {
  scroll-margin-top: 100px;
}
#our-story-c {
  scroll-margin-top: 80px;
}
.compact-story-band {
  background: var(--c-story-bg2);
  padding: 48px var(--pad);
}
.compact-story-heading {
  font-size: 32px;
  white-space: normal;
}
.compact-story-photo {
  width: 100%;
  aspect-ratio: 717 / 598;
  object-fit: cover;
  border-radius: 24px;
  margin-top: 32px;
}
.compact-timeline {
  position: relative;
  height: 335px;
  margin-top: 40px;
  left: -40px; /* Adjust this negative value to move it further left */
}
.compact-story-card {
  background: #fff;
  border-radius: 32px;
  padding: 28px;
}
.compact-story-card-heading {
  font-size: 32px;
}
.compact-story-card-body {
  font-size: 17px;
  margin-top: 24px;
}
.compact-story-card img {
  margin-top: 24px;
}

/* ---------- Team ---------- */
.compact-section:has(.compact-team-heading) {
  padding-top: 48px;
  padding-bottom: 48px;
}
.compact-team-heading {
  font-size: 34px;
}
.compact-team-subheading {
  font-size: 18px;
  margin-top: 16px;
}
.compact-team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 600px) {
  .compact-team-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.compact-team-grid img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

/* ---------- Contact ---------- */
#contact-c {
  padding-top: 48px;
  padding-bottom: 48px;
}
.compact-contact-heading {
  font-size: 30px;
  margin-top: 32px;
  white-space: normal;
}
/* Shared with contact.html's compact form */
.compact-contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 48px;
}
.compact-contact-form label {
  margin-top: 12px;
}
.compact-contact-form label:first-child {
  margin-top: 0;
}
.compact-contact-form .text-input,
.compact-contact-form .phone-input,
.compact-contact-form .message-box {
  width: 100%;
}
.compact-contact-form .send-btn {
  margin-top: 16px;
}

/* ---------- Footer ---------- */
.compact-footer {
  padding: 48px var(--pad);
}
.compact-footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  margin-top: 32px;
}
.compact-footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
  margin-top: 32px;
}
.compact-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 16px;
  margin-top: 24px;
}
