/* ✅ General Styling */
body {
  font-family: 'Tajawal', Arial, sans-serif;
  direction: rtl;
  text-align: center;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

/* ✅ Sticky Navbar */
.navbar {
  background-color: #343a40;
  padding: 10px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

/* ✅ Sticky Footer */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  background-color: #343a40;
  padding: 10px 0;
  color: white;
}

/* ✅ Push Main Content Below Sticky Header */
.main-content {
  margin-top: 80px;
  margin-bottom: 80px;
}

/* ✅ Mobile Icons Menu */
.mobile-icons {
  display: flex;
  gap: 15px;
}

.nav-icon {
  color: white;
  font-size: 1.4rem;
  text-decoration: none;
  transition: 0.3s;
}

.nav-icon:hover {
  color: #ffc107;
}

/* ✅ Back Button */
.back-btn {
  background: transparent;
  color: #87CEEB;
  border: 1px solid white;
  font-size: 1.5rem;
  padding: 5px 10px;
  margin-right: 5px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.back-btn.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ✅ Poem Line */
.poem-line {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 20px auto;
  padding: 15px;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poem-section-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.poem-section {
  width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  text-align: center;
  font-size: clamp(3.2rem, 2.5vw, 2rem);
  font-feature-settings: "liga" 1; /* Ensure ligatures are enabled */
}

.new-line .poem-section {
  color: red !important;
  font-weight: bold;
}

.edit-btn {
  margin-right: 10px;
  min-width: 80px;
}

.audio-recorder {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.audio-recorder .btn {
  min-width: 90px;
}

audio {
  width: 100%;
  max-width: 350px;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-primary {
  margin-bottom: 20px;
  width: 140px;
  max-width: 130px;
  background: linear-gradient(135deg, #5FA8D3, #1E78B4);
  padding: 1px;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
  background-color: #5FA8D3;
  color: white;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

/* ✅ Responsive */
@media (max-width: 768px) {
  .poem-section-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%; 
    
  }
  .poem-line {
    width: 95%;
    padding: 12px; 
  }

  .poem-section {
    font-size: 0.3rem;
    flex-direction: column;
    gap: 6px;
    width: 160px; 
  }

  .audio-recorder {
    flex-direction: column;
  }

  .audio-recorder .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .poem-section {
    font-size: 1.5rem;
  }

  audio {
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .navbar-nav {
    flex-direction: column;
    text-align: right;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .poem-section {
    font-size: 1rem; /* Adjust font size for better readability */
    line-height: 1.4; /* Improve spacing between lines */
    padding: 10px; /* Add padding to avoid text being too close to edges */
  }
}

.poem-sections-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 10px;
}

.record-timeline {
  font-size: 0.9rem;
  color: #555;
}

/* Chart Container */
.card canvas {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Reports Section */
.card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p.display-6 {
    font-size: 2rem;
    font-weight: bold;
    color: #1161ee;
}
