/* ================= Responsive & Layout ================= */
.navbar-brand {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
}

.language-selectors {
  display: flex;
  align-items: center; /* Keep dropdowns & icon vertically aligned */
  justify-content: center; /* Center the whole row */
  gap: 0.8rem; /* Even spacing between dropdowns and icon */
  flex-wrap: nowrap; /* Keep them in one line */
  margin-bottom: 1rem;
}
.swap-btn-container,
.swap-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-icon-container i {
  color: #00509e;
  font-size: 1.5rem;
  transition: transform 0.3s ease, font-size 0.3s ease;
}

.swap-btn-container {
  margin: 0;
}

.text-areas-container {
  display: flex;
  flex-direction: row; /* Always side by side */
  flex-wrap: nowrap;
  gap: 1rem;
  width: 100%;
  overflow-x: hidden;
}

.text-area-box {
  flex: 1 1 0;
  min-width: 0;
  transition: all 0.3s ease;
}

.translation-input,
.translation-output {
  min-height: 200px;
  background: #f8f9fa;
  border: none; /* remove the visible border */
  border-radius: 10px; /* keep or change to 0 if you want sharp edges */
  padding: 15px;
  flex: 1;
  width: 100%;
  animation: fadeIn 1s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* keep shadow */
}

.translation-input {
  background: white;
}

.sample-sentences .btn {
  white-space: normal;
  word-break: break-word;
}

/* ================= Mobile Responsive ================= */
@media (max-width: 768px) {
  /* Prevent stacking, allow shrinking */
  .text-areas-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.75rem;
    overflow-x: hidden; /* No horizontal scrollbars */
  }

  .text-area-box {
    flex: 1 1 0;
    min-width: 0;
    transition: all 0.3s ease;
  }

  .translation-input,
  .translation-output {
    min-height: 150px;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    padding: 10px;
  }
  .language-selectors {
    gap: 0.4rem; /* tighter spacing */
  }

  /* Dropdowns shrink */
  .stylish-select,
  .language-selectors select {
    font-size: 0.85rem;
    padding: 6px 8px;
    border-radius: 8px;
  }

  /* Center the swap icon */
  .swap-icon-container {
    justify-content: center;
    align-items: center;
    margin: 0 auto;
  }

  .swap-icon-container i {
    font-size: 1.2rem; /* smaller icon */
  }

  .swap-btn-container {
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
  }
}

/* ================= Larger Screens ================= */
@media (min-width: 769px) {
  .swap-btn-container,
  .swap-icon-container {
    order: 0;
    margin: 0;
    transform: rotate(0deg);
  }

  .text-areas-container {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .translation-input,
  .translation-output {
    flex: 1;
    min-width: auto;
  }

  .swap-icon-container i {
    font-size: 1.6rem;
  }
}

/* ================= Buttons & Inputs ================= */
.translate-btn {
  min-width: 120px; /* ensures button stays readable */
  padding: 10px 20px;
  background: linear-gradient(135deg, #002147, #00509e);
  border: none;
  color: white;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap; /* prevents text from breaking */
}

@media (max-width: 768px) {
  .translate-btn {
    font-size: 0.85rem; /* smaller text */
    padding: 8px 14px;
    min-width: 100px; /* still keeps text visible */
  }
}

.translate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 80, 158, 0.3);
}

.fancy-textarea,
.stylish-select {
  border-radius: 10px;
  border: 1px solid #ccc;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.fancy-textarea:focus,
.stylish-select:focus {
  border-color: #00509e;
  box-shadow: 0 0 0 3px rgba(0, 80, 158, 0.2);
}

.sample-sentences .btn-outline-secondary {
  border-color: #00509e;
  color: #002147;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.swap-btn:hover {
  background: #f0f4ff;
}

.next-btn {
  color: #00509e;
  font-weight: 500;
}

/* ================= Animations ================= */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.slide-down {
  animation: slideDown 0.8s ease forwards;
}

.hover-shadow {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-shadow:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.glow-btn:hover {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.pulse {
  animation: pulse 2s infinite ease-in-out;
}

/* ================= Keyframes ================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ================= Page Header ================= */
.page-header {
  background: linear-gradient(135deg, #002147, #00509e);
  color: #fff;
  padding: 40px 20px;
  border-radius: 0 !important;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: fadeInDown 1s ease forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🌈 Custom Styling for About Page */
.about-hero {
  background: linear-gradient(135deg, #002147, #00509e);
  color: white;
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  margin-bottom: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: fadeInDown 1s ease;
}

.about-section {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 1s ease;
}

.about-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.team-section {
  margin-top: 40px;
}

.team-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #002147;
}

.member-card {
  text-align: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s ease;
}

.member-card:hover {
  transform: translateY(-8px);
  background: #e9f2ff;
}

.member-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #00509e;
  margin-bottom: 10px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sample-sentences-dropdown .btn-outline-secondary {
  transition: all 0.3s ease;
}

.sample-sentences-dropdown .btn-outline-secondary:hover {
  background: linear-gradient(135deg, #002147, #00509e);
  color: #fff;
  transform: translateY(-2px);
}
.clipboard-icon:hover {
  color: #00509e;
  transition: color 0.2s;
}
@media (max-width: 576px) {
  .navbar-brand img {
    height: 40px; /* smaller logo on extra small screens */
  }
  .navbar-brand span {
    font-size: 0.85rem; /* smaller text */
  }
}
#inputText {
  resize: none !important;
  overflow: auto;
}
@media (max-width: 768px) {
  .translation-item {
    flex-direction: column !important; /* Stack vertically */
    align-items: flex-start !important; /* Left-align stars */
    gap: 0.25rem; /* Small spacing */
  }

  .translation-item .star-rating {
    margin-top: 4px; /* Slight gap below sentence */
    font-size: 24px; /* Slightly smaller stars for mobile */
  }
}

/* Mobile-only: make the toggler smaller */
@media (max-width: 576px) {
  .navbar-toggler {
    padding: 0.15rem 0.35rem; /* reduce button padding */
    font-size: 0.75rem; /* shrink icon inside (for some themes) */
    transform: scale(0.8); /* scale down overall size */
  }

  .navbar-toggler-icon {
    width: 1rem; /* default is 1.5rem */
    height: 1rem;
  }
}
/* ================= Translation Item & Star Rating ================= */
.translation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
  gap: 1rem; /* Space between text and stars */
}

/* Text container - allows growth but prevents pushing stars */
.translation-item > div:first-child {
  flex: 1; /* Take available space */
  min-width: 0; /* Allow text to shrink below content size */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Star container - keep fixed width, prevent wrapping */
.star-rating {
  flex-shrink: 0; /* Prevent stars from shrinking */
  white-space: nowrap; /* Keep stars in one line */
  cursor: pointer;
  font-size: 28px;
  min-width: fit-content; /* Ensure stars don't collapse */
}
