:root {
  --translator-bg: #f8f9fa; /* Lighter, cleaner background */
  --translator-card-bg: #ffffff;
  --translator-border: #e9ecef; /* Softer border color */
  --translator-card-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --translator-primary: #0b5f88; /* Pulled from header.css for consistency */
  --translator-primary-dark: #094c6d;
  --translator-text: #171a20;
  --translator-muted: #5c5f62;
  --translator-radius: 20px; /* Consistent border radius */
}

body {
  background-color: var(--translator-bg);
}

.translator-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.translator-hero {
  text-align: center;
  padding: 3rem 1.25rem 3rem;
  color: var(--translator-text);
  margin-top: 40px;
}

.translator-hero .eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--translator-primary);
  margin-bottom: 0.5rem;
}

.translator-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
}

.translator-hero p {
  max-width: 550px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--translator-muted);
  line-height: 1.6;
}

.translator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.translator-card {
  background: var(--translator-card-bg);
  border-radius: var(--translator-radius);
  padding: 2.5rem;
  box-shadow: var(--translator-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.translator-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.card-icon {
  font-size: 1.75rem;
  color: var(--translator-primary);
  line-height: 1;
}

.translator-card h3 {
  margin: 0;
  font-size: 1.6rem;
  font-family: 'Poppins', sans-serif;
}

.translator-card p {
  margin: 0 0 0.5rem;
  color: var(--translator-muted);
  line-height: 1.7;
  /* flex-grow: 1; <-- THIS LINE IS REMOVED */
}

/* Updated Button Styles */
.translator-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: var(--translator-primary);
  color: #fff;
  align-self: flex-start; /* Align button to the left */
}

.translator-btn:hover {
  background: var(--translator-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Updated Form Styles */
.listener-join__form {
  display: flex;
  flex-direction: column;
  margin-top: auto; /* Pushes form to the bottom of the card */
}

.input-with-icon {
  position: relative;
}

.listener-join__form input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.25rem; /* Make space for the icon */
  border-radius: 12px;
  border: 1px solid var(--translator-border);
  font-size: 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.listener-join__form input:focus {
  outline: none;
  border-color: var(--translator-primary);
  box-shadow: 0 0 0 4px rgba(11, 95, 136, 0.1);
}

.listener-join__form .icon-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: var(--translator-primary);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.listener-join__form .icon-btn:hover {
  background-color: var(--translator-primary-dark);
  transform: translateY(-50%) scale(1.05);
}

.listener-join__status {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #d93025; /* A more standard error color */
}

/* Responsive Styles */
@media (max-width: 768px) {
  .translator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .translator-card {
    padding: 2rem 1.5rem;
  }
  .translator-hero {
    padding: 2rem 1rem;
  }
}