.immigration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  /*grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); */
  gap: 20px;
  margin-top: 30px;
}

.immigration-card {
  background-color: #fff8ea !important;
  width: auto;
  padding: 30px;
  border-radius: 10px;
}

/* Stacks Badge on top of the Title Row */
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* Places Flag and Heading in one row */
.title-row {
  display: flex;
  flex-direction: row;
  align-items: center; /* Centers flag vertically with text */
  gap: 12px;
}

.flag-placeholder {
  /*background: linear-gradient(to right, #007a33 50%, #e0162b 50%)*/;
  flex-shrink: 0;
  width: 70px;
  height: 45px;
  transform: translate(0px, -4.82969px) rotate(0deg);
}

.flag-placeholder img{
    border-radius:0px !important;
}

.immi-badge {
  line-height: 2;
  display: inline-block;
  padding: 0px 8px !important;
  /* margin-bottom:2px; */
  font-size: 10px !important;
  font-weight: 400;
  color: #4a4a4a;
  background-color: #eee1d8;
  border-radius: 12px;
  align-self: flex-start;
  text-transform: capitalize;
  width: fit-content;
}

.immi-heading {
  margin: 0;
  font-size: 20px !important;
  color: #000;
  font-weight: 600;
  font-family: "Inter" !important;
}

/* Card Body & Button styles remain the same as your provided code */
.card-body {
  margin-bottom: 40px;
}

.info-row {
  margin-bottom: 0px;
  font-size: 1rem;
  color: #290f12;
  font-weight: 700;
}

.label {
  font-weight: 700;
}

.value {
  font-weight: 400;
  opacity: 0.85;
}

.discover-btn {
  background-color: #2e0d11 !important;
  color: #fff8ea;
  border: none;
  padding: 12px 35px;
  font-size: 15px;
  font-weight: 400;
  border-radius: 5px;
  cursor: pointer;
}

.discover-btn:hover {
  background-color: #2e0d11 !important;
  color: #fff8ea;
}

.segmented-option.loading {
  position: relative;
  color: transparent; /* hide text while loading */
}
.segmented-option.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-top: 2px solid #2e0d11;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


.segmented-option {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 4px;
  cursor: pointer;
  background: transparent !important;
  border: none;
  border-radius: 4px;
  font-weight: 400;
  color: #2E0D11 !important;
}

.segmented-option.active {
  background-color: #2E0D11 !important;
  color: #ECDECD !important;
}

/* --- Responsive Adjustments --- */

/* Tablet View (up to 1024px) */
@media (max-width: 1024px) {
  .immigration-grid {
    /* Overriding the 3-column layout */
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 15px;
  }
}

/* Mobile View (up to 768px) */
@media (max-width: 768px) {
  .immigration-grid {
    /* Stacking cards in a single column */
    grid-template-columns: 1fr !important;
    gap: 20px;
    margin-top: 20px;
  }

  .immigration-card {
    padding: 20px; /* Reducing padding slightly for smaller screens */
  }

  .immi-heading {
    font-size: 18px !important; /* Slightly smaller heading */
  }

  .flag-placeholder {
    width: 60px; /* Scaling down the flag */
    height: 40px;
  }

  .discover-btn {
    width: 100% !important; /* Making button full-width for easier tapping */
    padding: 12px 35px;
  }
}
