/* Reset and base styles */
html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #222;
  box-sizing: border-box;
  font-size: 16px;
  overflow-x: hidden; /* Prevent horizontal scroll globally */
}

a {
  color: #3282e6;
  text-decoration: underline;
}

h1, h2, h3 {
  margin: 0 0 1rem 0;
  font-weight: 400;
}

h2 {
  color: red;
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.25rem;
  background: red;
  margin: 1rem auto 0 auto;
  border-radius: 2px;
}

.sf-section {
  padding: 4.5rem 1.5rem 3.5rem 1.5rem;
  max-width: 100%;
  margin: 0 auto;
  background: none;
}

.sf-section-alt {
  padding: 4.5rem 1.5rem 3.5rem 1.5rem;
  max-width: 100%;
  margin: 0 auto;
  background: #dbdbdb;
}

@media (max-width: 900px) {
  .sf-section {
    padding: 3rem 0.75rem 2.25rem 0.75rem;
  }
}

/* Header styles */
.sf-header {
  position: relative;
  background: url('impression-header.png') center/cover no-repeat;
  min-height: 100vh; /* Changed from 50vh to 100vh */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.sf-header-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 30, 40, 0.65);
  z-index: 1;
}
.sf-header-content {
  position: relative;
  z-index: 2;
  padding: 4.5rem 1.5rem 3.5rem 1.5rem;
  width: 100%;
  max-width: 43.75rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sf-logo {
  width: 13.75rem;
  max-width: 80vw;
  margin-bottom: 1.5rem;
}
.sf-header-lead {
  font-size: 1.25rem;
  font-weight: 300;
  margin-top: 1rem;
  margin-bottom: 0;
  color: #fff;
  line-height: 1.6;
}

.sf-header h1 {
  font-size: 2.7rem;
  font-weight: 500;
  letter-spacing: 0.0625rem;
  margin-bottom: 1rem;
  color: #fff;
  position: relative;
}

/* Red separation line under the header title */
.sf-header h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.25rem;
  background: red;
  margin: 1.25rem auto 1.25rem auto;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .sf-header-content {
    padding: 2rem 2vw 1.25rem 2vw;
  }
  .sf-header h1 {
    font-size: 1.25rem;
  }
  .sf-logo {
    width: 6rem;
    margin-bottom: 1rem;
  }
  .sf-header-lead {
    font-size: 0.95rem;
  }
  .sf-section,
  .sf-section-alt {
    padding: 1.25rem 1vw 0.75rem 1vw;
  }
  .sf-about {
    gap: 1.25rem;
  }
  .sf-about-block {
    padding: 0 0.5rem;
    margin: 0.75rem 0;
  }
  .sf-card-row {
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 0.5rem;
  }
  .sf-card {
    min-width: 0 !important;
    max-width: 28rem !important;
    width: 100% !important;
    padding: 1.25rem 1rem 1rem 1rem;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
  }
  .sf-card-img {
    width: 100%;
    height: 8rem;
    object-fit: cover;
    object-position: center;
    margin: 0 0 1.125rem 0;
    display: block;
    border-radius: 0;
    /* Ensure image is at the very top of the card */
    align-self: flex-start;
    background: #fff;
  }
}

/* Card image: always flush with card edges, 1:1 aspect ratio, contained */
.sf-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  margin: 0 0 1.125rem 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #eee;
  padding: 0; /* Ensure no padding */
}

/* Remove extra padding from the top of cards with images */
.sf-card:not(.sf-card-noimg) {
  padding-top: 0;
}

/* Responsive: improved section and card spacing on mobile */
@media (max-width: 600px) {
  .sf-header-content {
    padding: 2rem 4vw 1.25rem 4vw;
  }
  .sf-section,
  .sf-section-alt {
    padding: 1.25rem 4vw 0.75rem 4vw;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
  .sf-about-block {
    padding: 0;
    margin: 0.75rem 0;
  }
  .sf-card-row {
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
  }
  .sf-card {
    min-width: 0 !important;
    max-width: 28rem !important;
    width: 100% !important;
    padding: 1.25rem 0.5rem 1rem 0.5rem;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
  
  }
  .sf-card-img {
    margin: 0 0 0.75rem 0;
    padding: 0;
  }
}

/* About section */
.sf-about {
  display: flex;
  gap: 3rem;
  justify-content: space-between;
  flex-wrap: wrap;
  background: none;
  max-width: 75rem;
  margin: 0 auto 2.5rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}
.sf-about-block {
  flex: 1 1 15.625rem;
  min-width: 15.625rem;
  margin: 1.125rem 0;
  padding: 0 2.5rem; /* Increased horizontal padding for better spacing */
  box-sizing: border-box;
}
.sf-about-full {
  flex-basis: 100%;
  max-width: 100%;
  width: 100%;
  margin-bottom: 2.5rem;
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 900px) {
  .sf-about {
    gap: 1.5rem;
    padding: 0 1rem;
  }
  .sf-about-block {
    padding: 0 1rem;
  }
  .sf-about-full {
    margin-bottom: 1.5rem;
  }
}
@media (max-width: 600px) {
  .sf-about {
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 4vw;
    margin: 0 0 1.5rem 0;
  }
  .sf-about-block {
    padding: 0;
    margin: 0.75rem 0;
  }
  .sf-about-full {
    margin-bottom: 1rem;
  }
}

/* Why Choose Us section */
.sf-section-alt.sf-why {

  text-align: center;
}
.sf-section-alt.sf-why h2 {
  color: red;
  margin-bottom: 2.5rem;
}
.sf-section-alt.sf-why .sf-card-row {
  display: flex;
  flex-direction: row;
  gap: 2.25rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 1100px) {
  .sf-section-alt.sf-why .sf-card-row {
    flex-wrap: wrap;
  }
}

/* Our Services section */
.sf-section.sf-services {
  text-align: center;
  width: 100%;
  position: static;
  left: auto;
  right: auto;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
.sf-section.sf-services h2 {
  color: red;
  margin-bottom: 2.5rem;
}
.sf-section.sf-services .sf-card-row {
  display: flex;
  flex-direction: row;
  gap: 2.25rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 1100px) {
  .sf-section.sf-services .sf-card-row {
    flex-wrap: wrap;
  }
}
.sf-section.sf-services .sf-card,
.sf-section.sf-services .sf-card-noimg {
  background: #fff;
}

/* Contact section */
.sf-contact {
  background: url('impression-header.png') center/cover no-repeat;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 3rem;
}
.sf-contact::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 30, 40, 0.65);
  z-index: 1;
}
.sf-contact-content {
  position: relative;
  z-index: 2;
  padding: 3rem 1.5rem 3rem 1.5rem;
  width: 100%;
  max-width: 43.75rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sf-contact h2 {
  color: #fff;
  margin-bottom: 1.5rem;
}
.sf-contact h2::after {
  background: #fff;
}
.sf-contact p {
  font-size: 1.15rem;
  color: #fff;
}
.sf-contact a {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  word-break: break-all;
}

/* Ensure .sf-card-row never overflows */
.sf-card-row {
  width: 100%;
  max-width: 75rem;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: auto;
}

/* Cards and images always fit container */
.sf-card,
.sf-card-noimg {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.sf-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  margin: 0 0 1.125rem 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #eee;
  padding: 0;
  max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .sf-card-row {
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .sf-about {
    flex-direction: column;
    gap: 0;
  }
}
@media (max-width: 600px) {
  .sf-card-row {
    flex-direction: column;
    align-items: center;
  }
  .sf-card, .sf-about-block {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .sf-section {
    padding: 1.5rem 2vw 1rem 2vw;
  }
}

/* If you want to override section-specific h2 styles, you can remove color: red from .sf-section-alt.sf-why h2 and .sf-section.sf-services h2 if present. */
.sf-section-alt.sf-why h2,
.sf-section.sf-services h2,
.sf-contact h2,
.sf-about-block h2 {
  color: red;
  font-weight: 700;
}