/* ===== Section Wrapper ===== */
.house-section {
  background-color: #f8f9fb;
  display: flex;
  align-items: flex-start;
}

/* ===== Container ===== */
.content-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  width: 100%;
  margin: 0 160px;
  padding: 80px 0;
}

/* ===== Text Section ===== */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.text-section h1 {
  width: 100%;
  max-width: 418px;
}

.text-section p {
  font-size: var(--blurb-size);
  font-weight: 300;
  font-family: var(--font-henry);
  text-align: left;
}

/* ===== Image Grid ===== */
.image-grid {
  flex: 1;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  gap: 20px;
  align-items: start;
  justify-content: start;
}

.image-grid img {
  border-radius: 10px;
  object-fit: cover;
  justify-self: end;
  align-self: start;
}

.img-top {
  grid-column: 2;
  grid-row: 1;
  width: 500px;
}

.img-middle {
  grid-column: 1;
  grid-row: 2;
  width: 360px;
}

.img-bottom {
  grid-column: 2;
  grid-row: 2;
  width: 560px;
}

/* ===== Reversed Section ===== */
.reversed-section {
  background-color: #f8f9fb;
  display: flex;
  align-items: center;
}

.reversed-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  width: 100%;
  margin: 0 160px;
  padding: 0 40px;
}

.reversed-text {
  flex: 1;
  max-width: 520px;
}

.reversed-text p {
  font-size: var(--blurb-size);
  font-weight: 300;
  font-family: var(--font-henry);
  text-align: left;
}

.reversed-text p br {
  display: block;
  margin-bottom: 10px;
}

/* === Image Grid (Left) === */
.reversed-images {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 560px;
  grid-template-rows: auto auto;
  gap: 40px;
  align-items: start;
  justify-content: start;
}

.reversed-img {
  border-radius: 10px;
  object-fit: cover;
  justify-self: start;
  align-self: start;
}

.reversed-top {
  grid-column: 1;
  grid-row: 1;
  width: 480px;
}

.reversed-middle {
  grid-column: 1;
  grid-row: 2;
  width: 360px;
}

.reversed-bottom {
  grid-column: 2;
  grid-row: 2;
  width: 560px;
}

/* ===== Heritage Section ===== */
.heritage-wrapper {
  display: flex;
  flex-direction: column;
  margin: 0 160px;
  padding: 80px 0;
  gap: 40px;
}

.heritage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.heritage-header h1 {
  color: var(--color-primary-blue);
}

.heritage-content {
  display: flex;
  flex-direction: column;
  gap: 39px;
}

.image-heritage {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.heritage-content img {
  width: 160px;
}

.heritage-text {
  max-height: 720px;
  overflow-y: auto;
  scrollbar-color: #002349 transparent;
  padding-right: 78px;
}

.heritage-text p {
  font-size: var(--blurb-size);
  font-weight: 300;
  font-family: var(--font-henry);
  text-align: left;
}

/* ===========================
   HERITAGE SECTION RESPONSIVE
=========================== */

/* Tablets (≤ 1024px) */
@media (max-width: 1024px) {
  .heritage-wrapper {
    margin: 0 80px;
    padding: 60px 0;
    gap: 30px;
  }

  .heritage-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .image-heritage {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }

  .image-heritage img {
    width: 30%;
    max-width: 200px;
  }

  .heritage-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
  }

  .heritage-content img {
    width: 140px;
  }

  .heritage-text {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .heritage-text p {
    font-size: 18px;
  }

   .content-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 60px;
    margin: 0 80px;
    padding: 60px 0;
  }

  .text-section {
    align-items: flex-start;
    text-align: left;
    gap: 30px;
  }

  .text-section h1 {
    max-width: 100%;
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
    gap: 20px;
    justify-items: center;
    width: 100%;
  }

  .image-grid img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .img-top,
  .img-middle,
  .img-bottom {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
  }

   .reversed-container {
    flex-direction: column;
    align-items: center;
    margin: 0 80px;
    padding: 60px 0;
    gap: 40px;
  }

  .reversed-images {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    justify-items: center;
  }

  .reversed-img {
    width: 100% !important;
    max-width: 100%;
    height: auto;
  }

  .reversed-text {
    text-align: center;
    max-width: 700px;
  }

  .reversed-text p {
    font-size: 17px;
    line-height: 1.6;
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  .heritage-wrapper {
    margin: 0 40px;
    padding: 40px 0;
    gap: 20px;
  }

  .image-heritage {
    justify-content: center;
    gap: 16px;
  }

  .image-heritage img {
    width: 45%;
    max-width: 160px;
  }

  .heritage-content img {
    width: 120px;
  }

  .heritage-text p {
    font-size: 16px;
    line-height: 1.6;
  }

  .content-container {
    flex-direction: column;
    margin: 0 40px;
    padding: 40px 0;
    gap: 40px;
  }

  .text-section {
    gap: 20px;
    text-align: center;
    align-items: center;
  }

  .text-section h1 {
    font-size: 32px;
  }

  .text-section p {
    font-size: 16px;
    line-height: 1.6;
  }

  .image-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    justify-items: center;
  }

  .image-grid img {
    width: 80%;
    max-width: 400px;
    height: auto;
  }

   .reversed-container {
    flex-direction: column;
    align-items: center;
    margin: 0 40px;
    padding: 40px 0;
    gap: 30px;
  }

  .reversed-images {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    justify-items: center;
  }

  .reversed-img {
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
  }

  .reversed-text {
    text-align: center;
    max-width: 600px;
  }

  .reversed-text p {
    font-size: 16px;
    line-height: 1.7;
  }

  .slider-mobile {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
  }

  .slider-mobile::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .slider-mobile img {
    flex: 0 0 80%;
    max-width: 80%;
    border-radius: 10px;
    object-fit: cover;
    scroll-snap-align: center;
    transition: transform 0.4s ease;
  }

  .slider-mobile img:active {
    transform: scale(0.98);
  }
}

/* Small Mobile (≤ 480px) */
@media (max-width: 480px) {
  .heritage-wrapper {
    margin: 0 20px;
    padding: 30px 0;
  }

  .heritage-header h1 {
    font-size: 26px;
    text-align: center;
  }

  .image-heritage {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .image-heritage img {
    width: 80%;
    max-width: 280px;
  }

  .heritage-content {
    align-items: center;
    text-align: center;
  }

  .heritage-content img {
    width: 100px;
  }

  .heritage-text {
    padding-right: 0;
  }

  .heritage-text p {
    font-size: 15px;
  }
   .content-container {
    margin: 0 20px;
    padding: 30px 0;
    gap: 30px;
  }

  .text-section h1 {
    font-size: 26px;
  }

  .text-section p {
    font-size: 15px;
  }

  .image-grid img {
    width: 100%;
    max-width: 340px;
  }
  .reversed-container {
    margin: 0 20px;
    padding: 30px 0;
    gap: 25px;
  }

  .reversed-img {
    width: 100%;
    max-width: 340px;
  }

  .reversed-text p {
    font-size: 15px;
  }
}
