/* Global Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Base Section Styles */
.u-section-1 {
  background-image: none;
}

.u-section-1 .u-sheet-1 {
  min-height: 1976px;
}

.u-section-1 .u-text-1 {
  font-size: 3.75rem;
  margin: 60px auto 0;
}

/* Repeater Grid */
.u-section-1 .u-repeater-1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px; /* Default gap for large screens */
  min-height: 1625px;
  margin: 66px 0 0;
}

/* Image Container */
.u-section-1 .image-container {
  width: 100%;
  height: 250px; /* Fixed height for uniformity */
  overflow: hidden;
  position: relative;
}

.u-section-1 .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image covers the container without distortion */
  object-position: center; /* Centers the image */
  cursor: pointer;
}

/* List Items */
.u-section-1 [class^="u-list-item-"] {
  box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.2);
  background-image: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px; /* Fixed height */
}


/* Container Layouts */
.u-section-1 [class^="u-container-layout-"] {
  padding: 0 0 50px;
}

/* Text Styles */
.u-section-1 .u-text-2,
.u-section-1 .u-text-4,
.u-section-1 .u-text-6,
.u-section-1 .u-text-8,
.u-section-1 .u-text-10,
.u-section-1 .u-text-12,
.u-section-1 .u-text-14,
.u-section-1 .u-text-16,
.u-section-1 .u-text-18,
.u-section-1 .u-text-20 {
  font-size: 1.625rem;
  margin: 30px 30px 0;
}

.u-section-1 .u-text-3,
.u-section-1 .u-text-5,
.u-section-1 .u-text-7,
.u-section-1 .u-text-9,
.u-section-1 .u-text-11,
.u-section-1 .u-text-13,
.u-section-1 .u-text-15,
.u-section-1 .u-text-17,
.u-section-1 .u-text-19 {
  font-style: italic;
  margin: 20px 30px 0;
}

/* Buttons */
.u-section-1 [class^="u-btn-"] {
  background-image: none;
  text-transform: uppercase;
  font-size: 0.875rem;
  font-weight: 700;
  margin: 20px auto 0;
  padding: 0;
}

.u-section-1 .u-btn-10 {
  border-style: solid;
  font-style: italic;
}

/* Modal Styles */
/* ... (Keep existing modal styles) */
/* Modal Image */
.modal-content {
  display: block;
  margin: auto;
  max-width: 85%; /* Allows the image to fill up more screen space */
  max-height: 85%; /* Ensures the image scales without going off the screen */
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain; /* Ensures the image keeps its aspect ratio and fits in the modal */
}

/* Modal Background */
.modal {
  display: none;
  position: fixed;
  z-index: 9999; /* Ensure the modal is on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Slightly darker background */
  text-align: center;
  overflow-y: auto; /* Allow scrolling for large images */
  justify-content: center;
  align-items: center;
}

/* Close Button */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive Styles */

/* Large Screens (1200px and up) */
@media (max-width: 5000px) {
  .u-section-1 .u-repeater-1 {
    grid-template-columns: repeat(3, 1fr);
    min-height: 800px;
    gap: 16px; /* Larger gap for spacious layout */
  }

  .u-section-1 .image-container {
    height: 200px; /* Adjust as needed */
  }

/* Image Style */
.u-section-1 .image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensures the whole image fits within the container */
}

  .u-section-1 .u-text-14 {
    margin-top: -200px;
  }

  .u-section-1 .u-text-15 {
    margin-top: 21px;
  }

  /* Adjust margins for texts */
  .u-section-1 [class^="u-text-"] {
    margin-left: 20px;
    margin-right: 20px;
  }
}

/* Medium Screens (992px to 1199px) */
@media (max-width: 991px) {
  .u-section-1 .u-repeater-1 {
    grid-template-columns: repeat(2, 1fr);
    min-height: 1000px;
    gap: 16px; /* Moderate gap */
  }

  .u-section-1 .image-container {
    height: 220px; /* Adjust as needed */
  }

  .u-section-1 [class^="u-text-"] {
    margin-top: 293px;
  }

  .u-section-1 [class^="u-container-layout-"] {
    padding-bottom: 30px;
  }
}

/* Small Screens (max-width: 767px) */
@media (max-width: 767px) {
  .u-section-1 .u-repeater-1 {
    grid-template-columns: 1fr;
    grid-template-row: 0.5fr;

  }

  /* Ensure list items adjust height based on content */
  .u-section-1 [class^="u-list-item-"] {
    width: 100%;
    height: auto; /* Allow height to adjust based on content */
    display: flex; /* Use flexbox to control card layout */
    flex-direction: column; /* Stack content vertically */
    justify-content: space-between; /* Space content appropriately */
  }

  /* Adjust image container height */
  .u-section-1 .image-container {
    height: 200px; /* Fixed height for the image container */
    overflow: hidden; /* Prevent content from expanding the height */
  }

  /* Adjust margins for text inside the card */
  .u-section-1 [class^="u-text-"] {
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 20px;
    margin-bottom: 20px; /* Add margin at the bottom to create space */
  }
}

/* Extra Small Screens (575px and below) */
@media (max-width: 575px) {
  .u-section-1 .u-text-1 {
    font-size: 2.25rem;
  }

  .u-section-1 .image-container {
    height: 180px; /* Adjust as needed */
  }

  .u-section-1 [class^="u-text-"] {
    margin-left: 0;
    margin-right: 0;
  }

  .u-section-1 .u-text-14,
  .u-section-1 .u-text-16,
  .u-section-1 .u-text-18 {
    margin-top: 279px;
  }

  /* Ensure gap remains small on extra small screens */
  .u-section-1 .u-repeater-1 {
    gap: 8px;
  }
}
