.container {
  width: 100%;
  max-width: 1280px; /* Common container width from Figma (e.g. 0:67) */
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px; /* Responsive padding */
  padding-right: 20px; /* Responsive padding */
}

.page-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden; /* To contain elements like full-width backgrounds if any part extends */
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-section {
  position: relative;
  width: 100%;
  height: 718px; /* As per 0:65 height */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden; /* Ensures the image doesn't overflow if it's larger */
}

.hero-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Corresponds to background-size: cover */
  z-index: 1;
}

.hero-content-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px; /* Approximate gap between text block and search bar */
  padding: 20px; /* Basic padding for smaller screens */
  width: 100%;
  max-width: 1024px; /* Width of text content 0:69 */
}

.hero-text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px; /* Gap from style_7 (between badge and heading) and style_6 (between heading group and subtitle) */
  /* Here, using 24px from style_6 as the primary gap for simplicity */
}

.hero-title {
  /* style_9 */
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 60px;
  letter-spacing: -0.96px;
  margin: 0; /* Reset default margins */
}

.hero-subtitle {
  /* style_10 */
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 30px;
  margin: 0; /* Reset default margins */
  max-width: 1024px; /* As per 0:73 width */
}



@media (max-width: 768px) {
  .hero-section {
    height: auto; /* Adjust height for smaller screens */
    padding-top: 100px; /* Ensure content visible below potential fixed header */
    padding-bottom: 60px;
  }
  .hero-title {
    font-size: 36px; /* Responsive font size */
    line-height: 44px;
  }
  .hero-subtitle {
    font-size: 16px; /* Responsive font size */
    line-height: 24px;
  }
  .search-form {
    max-width: 90%;
  }
}

/* CSS for section section:filters */
.filters-section {
  padding-top: 77px; /* Gap from hero (919 - 842) */
  padding-bottom: 79px; /* Gap to blog posts (1048 - 969) */
  background-color: #ffffff; /* From parent 0:64 */
}

.filter-navigation {
  /* style_36 */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center; /* Center buttons */
  gap: 26px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.filter-button {
  /* Common styles, specific from style_38 (inactive) and style_39 (text) */
  padding: 14px 28px; /* Approximate padding to achieve 50px height and content fit */
  height: 50px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background-color: #ffffff;
  color: #b22325; /* Text color from style_39 */
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px; /* Matches text height */
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  min-width: 155px; /* From Figma node 0:95 etc. */
  display: flex;
  justify-content: center;
  align-items: center;
}

.filter-button.active {
  /* style_37 (active bg) and style_40 (active text) */
  background-color: #b22325;
  border-color: #b22325;
  color: #ffffff;
}

.filter-button:hover:not(.active) {
  background-color: #f0f0f0; /* Simple hover for non-active */
}

@media (max-width: 768px) {
  .filter-navigation {
    gap: 10px; /* Smaller gap for wrapped buttons */
    justify-content: flex-start;
  }
  .filter-button {
    min-width: auto; /* Allow buttons to shrink */
    padding: 10px 15px;
    font-size: 14px;
  }
  .filters-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

/* CSS for section section:blog-posts */
.blog-posts-section {
  padding-bottom: 71px; /* Gap to footer (2358 - 2287) */
  background-color: #ffffff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(350px, 1fr)
  ); /* Responsive grid */
  gap: 70px 70px; /* Row gap (1707-1628=79px, using 70px for consistency with column gap) & Column gap */
}

.blog-card {
  /* style_17, style_25, style_31 are similar: bg, border-radius, box-shadow, overflow */
  transition: box-shadow .3s;
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08),
    0px 4px 6px -2px rgba(16, 24, 40, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px; /* Fixed height from Figma */
}

.blog-card:hover {
  box-shadow: 10px 10px 45px rgba(29, 22, 22, 0.418); 
  .arrow-button .arrow span {
    animation: animate 2s infinite;
  }
}

.card-image {
  /* style_18, style_24, style_26 etc. */
  width: 100%;
  height: 35%; /* Fixed height from Figma */
  object-fit: cover;
  /* border-radius: 15px 15px 0px 0px; -- Handled by overflow:hidden on card and image being first child */
}

.card-content {
  /* Derived padding: top 63px, sides 24px, bottom 61px */
  padding: 24px; /* Simplified padding, can be more precise */
  /* style_19 (flex column, gap 12px) - applies between category and title-wrapper */
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1; /* Allows content to fill remaining space */
}

.card-description{
  height: 50%;
}

.card-category {
  /* style_20 */
  color: #b22325;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  text-align: left;
  margin: 0;
}

.card-title-wrapper {
  /* style_21 (flex row, gap 16px) */
  display: flex;
  flex-direction: row;
  justify-content: space-between; /* Pushes icon to the right */
  align-items: flex-start; /* Align items at the start of the cross axis */
  gap: 16px;
}

.card-title {
  /* style_22 */
  color: rgba(27, 27, 27, 0.8);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  text-align: left;
  margin: 0;
  flex-grow: 1; /* Allows title to take available space */
}


/* CSS for section section:footer */
.footer-section {
  /* style_34 */
  background-color: #a5a5a5;
  padding-top: 125px; /* y_text (2483) - y_footer_bg (2358) */
  padding-bottom: 125px; /* Symmetrical padding, adjust as needed */
  /* Footer height is 510px. 510 - 125 - 125 = 260 for content. Text height is 30px. */
}

.footer-content-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start; /* Align columns to the start */
  gap: 100px; /* Approximate gap, adjust as needed */
  flex-wrap: wrap;
}

.footer-heading {
  /* style_35 */
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 30px;
  text-align: left;
  margin: 0 0 16px 0; /* Margin below heading */
}

/* arrow */
.arrow-button{
  border-color:#e6e0e000;
}
.arrow-button:hover .arrow span {
  animation: animate 2s infinite;
}
.arrow {
  margin-left: 50%;
  transform: translate(-50%, -50%);
  transform: rotate(270deg);
  cursor: pointer;
}

.arrow span {
  display: block;
  width: 1vw;
  height: 1vw;
  border-bottom: 5px solid rgb(245, 181, 181);
  border-right: 5px solid rgba(133, 8, 8, 0.336);
  transform: rotate(45deg);
  margin: -5px;
}

.arrow span:nth-child(2) {
  animation-delay: -0.2s;
}

.arrow span:nth-child(3) {
  animation-delay: -0.4s;
}

@keyframes animate {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-10px, -10px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(10px, 10px);
  }
}
/* --end--arrow--*/

@media (max-width: 1200px) {
  .blog-grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr; /* Stack cards on smaller screens */
    gap: 30px;
  }
  .blog-card {
    height: auto; /* Allow card height to adjust to content */
  }
  .card-image {
    height: 250px; /* Adjust image height for smaller cards */
  }
  .card-title {
    font-size: 20px;
    line-height: 28px;
  }
  .blog-posts-section {
    padding-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .footer-section {
    padding-top: 60px;
    padding-bottom: 60px;
  }
  .footer-content-container {
    flex-direction: column;
    gap: 30px;
    align-items: center; /* Center columns on mobile */
    text-align: center;
  }
  .footer-heading {
    text-align: center;
  }
}