/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles - Mobile First Approach */
.features-container {
  width: 100%;
  background-color: white;
  display: flex;
  min-height: 100%; /* Ensure container takes full height of its parent */
}

.features-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  min-height: 100%; /* Ensure wrapper takes full height of container */
}

.features-image {
  display: none;
  width: 100%;
  height: 100%; /* Ensure image container takes full height of wrapper */
  overflow: hidden;
}

.features-img {
  width: 100%;
  height: 100%; 
  object-fit: cover;
  /* object-position: center;  */
}

.features-content {
  width: 100%;
  background-color: #dddddd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
}

.features-title {
  font-size: 22px;
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-weight: 700;
  color: black;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  text-align: center;
  justify-content: center;
}

.features-title-highlight {
  color: #f59e0b;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  width: 100%;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: auto;
  text-align: center;
  padding-bottom: 0;
  background-color: transparent;
  border-radius: 0.5rem;
}

.feature-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.feature-icon svg {
  width: clamp(2rem, 6vw, 3rem);
  height: clamp(2rem, 6vw, 3rem);
  color: #3b82f6;
}

.feature-heading {
  font-size: 18px;
  font-weight: 600;
  color: black;
  margin-bottom: 0.5rem;
  margin-top: 0;
  line-height: 1.3;
  text-align: center;
}

.feature-description {
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  color: #4b5563;
  text-align: justify;
  margin: 0;
  line-height: 1.5;
  padding: 0;
}

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
  .features-content {
    padding: 0.75rem;
  }
  
  .features-grid {
    gap: 0.75rem;
  }
  
  .feature-card {
    padding: 0.75rem;
  }
  
  .features-title {
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
    text-align: left;
  }
  
  .features-image,
  .features-image.md-block {
    display: none !important;
  }
}

/* Specific fixes for 375px and 425px */
@media (min-width: 375px) and (max-width: 425px) {
  .features-image,
  .features-image.md-block {
    display: none !important;
  }
  
  .features-content {
    width: 100% !important;
    padding: 0.75rem;
  }
  
  .features-wrapper {
    flex-direction: column !important;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }
  
  .feature-card {
    padding: 0.5rem;
    min-height: auto;
  }
  
  .feature-heading {
    font-size: 0.75rem;
  }
  
  .feature-description {
    font-size: 0.6875rem;
  }
}

/* Medium Mobile Devices (481px - 768px) */
@media (min-width: 425px) and (max-width: 768px) {
  .features-image {
    display: none;
  }
  
  .features-content {
    width: 100%;
    padding: 1rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .feature-card {
    padding: 0.75rem;
  }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .features-wrapper {
    flex-direction: row;
    align-items: stretch;
    min-height: 50rem; /* Set a minimum height for image and content alignment */
  }
  
  .features-image {
    display: block;
    width: 50%;
    height: 100%; /* Full height of wrapper */
  }
  
  .features-img {
    width: 100%;
    height: 100%; /* Full height of image container */
    /* object-fit: cover;
    object-position: center; */
  }
  
  .features-content {
    width: 50%;
    padding: 1rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .features-title {
    text-align: left;
    justify-content: flex-start;
    flex-wrap: wrap;
    line-height: 1.2;
  }
}

/* Small Laptops (1025px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
  .features-wrapper {
    flex-direction: row;
    align-items: stretch;
    min-height: 50rem; /* Adjusted for consistent height */
  }
  
  .features-image {
    display: block;
    width: 50%;
    height: 100%; /* Full height of wrapper */
  }
  
  .features-img {
    width: 100%;
    height: 100%; /* Full height of image container */
    /* object-fit: cover;
    object-position: center; */
  }
  
  .features-content {
    width: 50%;
    padding: 1.25rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .feature-card {
    padding: 1rem;
    text-align: left;
    align-items: flex-start;
  }
  
  .feature-icon {
    justify-content: flex-start;
  }
  
  .feature-heading {
    text-align: left;
  }
  
  .features-title {
    text-align: left;
    justify-content: flex-start;
    flex-wrap: wrap;
    line-height: 1.2;
  }
}

/* Large Laptops and Desktops (1367px - 1920px) */
@media (min-width: 1367px) and (max-width: 1920px) {
  .features-wrapper {
    flex-direction: row;
    align-items: stretch;
    min-height: 50rem; /* Adjusted for consistent height */
  }
  
  .features-image {
    display: block;
    width: 50%;
    height: 100%; /* Full height of wrapper */
  }
  
  .features-img {
    width: 100%;
    height: 100%; /* Full height of image container */
    /* object-fit: cover;
    object-position: center; */
  }
  
  .features-content {
    width: 50%;
    padding: 1.5rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .feature-card {
    padding: 1.25rem;
    text-align: left;
    align-items: flex-start;
  }
  
  .feature-icon {
    justify-content: flex-start;
  }
  
  .feature-heading {
    text-align: left;
  }
  
  .features-title {
    text-align: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    line-height: 1.2;
  }
}

/* Extra Large Screens (1921px+) */
@media (min-width: 1921px) {
  .features-wrapper {
    flex-direction: row;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 50rem; /* Adjusted for consistent height */
  }
  
  .features-image {
    display: block;
    width: 50%;
    height: 100%; /* Full height of wrapper */
  }
  
  .features-img {
    width: 100%;
    height: 100%; /* Full height of image container */
    /* object-fit: cover;
    object-position: center; */
  }
  
  .features-content {
    width: 50%;
    padding: 2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
    text-align: left;
    align-items: flex-start;
  }
  
  .feature-icon {
    justify-content: flex-start;
  }
  
  .feature-heading {
    text-align: left;
  }
  
  .features-title {
    text-align: left;
    justify-content: flex-start;
    flex-wrap: wrap;
    line-height: 1.2;
  }
}

/* Utility Classes for HTML */
.md-block {
  display: block !important;
}

.md-flex-row {
  flex-direction: row !important;
}

.sm-grid-cols-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

.md-no-scroll {
  overflow: visible !important;
}

/* Print Styles */
@media print {
  .features-wrapper {
    flex-direction: column;
    min-height: auto;
  }
  
  .features-image {
    display: none;
  }
  
  .features-content {
    width: 100%;
    background-color: white;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}