/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Family Planning colors - Sky Blue, Green, Orange theme */
  --primary-color: #0EA5E9; /* Sky Blue */
  --secondary-color: #10B981; /* Green */
  --accent-color: #F97316; /* Orange */

  --text-color: #1a1a1a;
  --light-text: #ffffff;

  --success-color: #10B981;
  --error-color: #EF4444;

  --gray-bg: #f4f6f8;
  --glass-bg: linear-gradient(
    145deg,
    rgba(14, 165, 233, 0.12),
    rgba(16, 185, 129, 0.08)
  );

  --white-bg: #ffffff;
}
/* Overall Page Styles */
body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  min-height: 100vh;
  background: linear-gradient(270deg, #f8f9fa, #e9ecef);
  background-size: 400% 400%;
  animation: bgAnim 10s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0;
  margin: 0;
}

@keyframes bgAnim {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Header with logo */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo img {
  max-height: 60px;
  max-width: 180px;
  margin-right: 10px;
  object-fit: contain;
}

.logo-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  transition: transform 0.3s ease;
}

.logo-text:hover {
  transform: scale(1.05);
}

/* Main container */
.container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0 auto;
}

.card {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  text-align: center;
  margin-bottom: 22px;
  color: var(--light-text);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-text {
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Call button styles */
#callButton {
  padding: 15px 40px;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  background: var(--light-text);
  color: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  margin: 20px auto;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

#callButton:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 2s infinite;
}

#callButton:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#callButton:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Enhanced Glassmorphism Effects for other cards if needed */
.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.125);
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5),
    0 12px 48px rgba(0, 0, 0, 0.2);
}

/* 3D Avatar Effects */
.avatar-container {
  perspective: 1000px;
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}

.avatar {
  transform-style: preserve-3d;
  transition: transform 0.6s ease, box-shadow 0.3s ease;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.avatar:hover {
  transform: rotateY(180deg);
  box-shadow: 0 0 20px var(--accent-color);
}

/* Real-time Transcript Box */
.transcript-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-height: 400px;
  overflow-y: auto;
}

.transcript-box.visible {
  transform: translateX(0);
  animation: slideInBounce 0.5s ease-out;
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.transcript-content {
  font-size: 0.9rem;
  line-height: 1.4;
}

@keyframes slideInBounce {
  0% {
    transform: translateX(120%);
  }
  60% {
    transform: translateX(-10%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Sentiment Indicator */
.sentiment-indicator {
  position: absolute;
  bottom: 100px;
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.sentiment-bar {
  height: 100%;
  width: 50%;
  transition: all 0.3s ease;
}

.sentiment-label {
  position: absolute;
  top: -25px;
  width: 100%;
  text-align: center;
  color: var(--light-text);
  font-size: 0.8rem;
}

/* Call Controls */
.call-controls {
  position: fixed;
  bottom: 30px;
  display: flex;
  gap: 15px;
}

.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Ring box container */
#ringBox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  display: none;
  z-index: 9999;
}

/* Content wrapper for centering */
.ring-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

/* Timer styling */
.timer {
  font-size: 3.5rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 20px 0;
  display: none;
  font-weight: 300;
}

/* Call status */
.call-status {
  font-size: 1.5rem;
  color: white;
  margin: 20px 0;
  white-space: pre-line;
  text-align: center;
  font-weight: 500;
}

/* End call button */
#endCallBtn {
  display: none;
  padding: 15px 40px;
  font-size: 1.2rem;
  background: var(--error-color);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10000;
  pointer-events: auto;
  margin: 20px auto;
  font-weight: 600;
}

#endCallBtn:hover {
  background: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#endCallBtn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#endCallBtn i {
  margin-right: 10px;
}

/* Wave animations */
.wave {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: waveAnim 2s infinite;
}

.wave:nth-child(2) {
  animation-delay: 0.5s;
}
.wave:nth-child(3) {
  animation-delay: 1s;
}

@keyframes waveAnim {
  0% {
    width: 0px;
    height: 0px;
    opacity: 0.8;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}

/* Sound Wave Animation */
.sound-wave {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.sound-bar {
  width: 5px;
  height: 30px;
  background: white;
  animation: soundAnim 1s infinite;
}

.sound-bar:nth-child(1) {
  animation-delay: 0s;
}
.sound-bar:nth-child(2) {
  animation-delay: 0.2s;
}
.sound-bar:nth-child(3) {
  animation-delay: 0.4s;
}
.sound-bar:nth-child(4) {
  animation-delay: 0.6s;
}
.sound-bar:nth-child(5) {
  animation-delay: 0.8s;
}

@keyframes soundAnim {
  0% {
    height: 30px;
  }
  50% {
    height: 60px;
  }
  100% {
    height: 30px;
  }
}

/* Loader Styles */
.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-dot {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  margin: 0 5px;
  animation: bounce 0.6s infinite alternate;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.loader-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  to {
    transform: translateY(-10px);
  }
}

/* Notification Styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}

.notification {
  padding: 15px 20px;
  border-radius: 8px;
  animation: slideIn 0.5s ease-out, fadeOut 0.5s ease-out 4.5s forwards;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification i {
  margin-right: 10px;
}

.notification.success {
  background: var(--success-color);
  color: white;
}

.notification.error {
  background: var(--error-color);
  color: white;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 50;
  font-size: 0.9rem;
  color: var(--text-color);
}
  gap: 20px;
  padding: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.social-icon {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--accent-color);
}

/* Responsive styles */
@media (min-width: 1200px) {
  .container {
    max-width: 800px;
  }

  .chat-card {
    max-width: 900px;
  }

  .chat-messages {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px 15px;
    min-height: 70px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .logo img {
    max-height: 50px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .tab-navigation {
    padding: 6px;
    gap: 6px;
    margin-right: 0;
    margin-left: 0 !important;
    justify-content: center;
    flex-wrap: wrap;
    width: 100% !important;
    max-width: 100% !important;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    flex: 0 1 auto;
  }

  .card {
    padding: 20px;
  }

  .timer {
    font-size: 2.5rem;
  }

  .avatar-container {
    width: 100px;
    height: 100px;
  }

  .tab-content {
    padding-top: 90px;
    min-height: calc(100vh - 140px);
  }

  .chat-card {
    max-width: 100%;
  }

  .chat-messages {
    height: calc(100vh - 280px);
    padding: 16px;
  }

  .message-content {
    max-width: 85%;
    padding: 14px 16px;
  }

  .chat-input-container {
    gap: 8px;
  }

  .chat-input {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .send-btn {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .footer {
    position: static;
    padding: 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .header {
    flex-wrap: wrap;
  }
  #callButton {
    font-size: 1rem;
    padding: 12px 30px;
  }

  #endCallBtn {
    font-size: 1rem;
    padding: 12px 30px;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .avatar-container {
    width: 80px;
    height: 80px;
  }

  .avatar {
    font-size: 2rem;
  }

  .tab-navigation {
    gap: 6px;
    padding: 6px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    flex: 0 0 auto;
  }

  .chat-messages {
    height: calc(100vh - 300px);
    padding: 12px;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .message-content {
    max-width: 95%;
    padding: 12px 14px;
  }

  .chat-input {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .send-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }
}

/* ===== TAB NAVIGATION STYLES ===== */
.tab-navigation {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-direction: row !important;
  gap: 8px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(16, 185, 129, 0.15)) !important;
  padding: 8px 12px !important;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
  border: 2px solid rgba(14, 165, 233, 0.3) !important;
  flex: 0 0 auto;
  margin-left: auto !important;
  position: static !important;
  z-index: 9999 !important;
}

.tab-btn {
  padding: 10px 24px !important;
  border: none !important;
  background: var(--white-bg) !important;
  color: var(--text-color) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border-radius: 50px !important;
  transition: all 0.3s ease;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  position: static !important;
}

.tab-btn i {
  font-size: 0.95rem;
}

.tab-btn:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.1)) !important;
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--light-text);
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.25);
}

.tab-content {
  display: none;
  width: 100%;
  padding-top: 100px;
  min-height: calc(100vh - 200px);
}

.tab-content.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* ===== CHATBOT STYLES ===== */
.chat-card {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.chat-messages {
  height: 450px;
  overflow-y: auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin: 20px 0;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(14, 165, 233, 0.1);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.bot-message,
.user-message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.bot-message .message-avatar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.user-message .message-avatar {
  background: linear-gradient(135deg, var(--accent-color), #FBBF24);
  color: white;
}

.message-content {
  max-width: 70%;
  padding: 15px 20px;
  border-radius: 20px;
  line-height: 1.6;
  word-wrap: break-word;
}

.bot-message .message-content {
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 20px 20px 20px 5px;
}

.user-message .message-content {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.15), rgba(251, 191, 36, 0.1));
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 20px 20px 5px 20px;
  text-align: right;
}

.message-content p {
  margin: 0 0 8px 0;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.urdu-text {
  font-size: 0.95rem;
  color: #555;
  margin-top: 5px;
}

.sindhi-text {
  font-size: 1rem;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Alvi Nastaleeq", serif;
}

.welcome-message {
  border: 2px solid var(--primary-color);
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.05));
}

.chat-input-container {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.chat-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid rgba(14, 165, 233, 0.3);
  border-radius: 50px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  background: white;
  transition: all 0.3s ease;
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.send-btn {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 5px 20px rgba(14, 165, 233, 0.4);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.typing-indicator {
  display: flex;
  gap: 8px;
  padding: 15px 20px;
  margin: 10px 0;
  width: fit-content;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 20px;
}

.typing-dot {
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}
