/* ============================= */
/* 🔹 General Page Styling */
/* ============================= */

/* Ensure container is properly responsive */
.container {
    max-width: 900px;
    margin: auto;
}

/* ============================= */
/* 🔹 Header Section - Fixes Spacing Between Logo & Text */
/* ============================= */
.header-container {
    display: flex;
    align-items: center; /* ✅ Centers logo and text vertically */
    justify-content: flex-start; /* ✅ Aligns content to the left */
    padding: 15px 20px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: auto;
    gap: 15px; /* ✅ Reduces the gap between logo and text */
}

/* ✅ Adjust logo size and remove excessive spacing */
.logo-container img {
    width: 100px; /* ✅ Slightly smaller for better balance */
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

/* ✅ Ensure company text aligns well */
.company-info {
    text-align: left;
    flex-grow: 1; /* ✅ Allows text to take available space */
}

/* ✅ Title */
.company-info h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

/* ✅ Description */
.company-info p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

/* ============================= */
/* 🔹 Hero Section Styling */
/* ============================= */
.hero-section {
    max-width: 900px;
    margin: 20px auto;
    padding: 40px 20px;
    background-color: #cfdde0;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Adjust button spacing */
.cta-buttons a, .cta-buttons button {
    margin: 10px 8px;
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 10px;
}

/* ============================= */
/* 🔹 Features Section */
/* ============================= */
.features {
    margin-top: 40px;
}

.features .feature-icon {
    font-size: 2.5rem;
    color: #17a2b8;
}

.features h3 {
    font-size: 1.4rem;
    color: #343a40;
}

.features p {
    font-size: 1rem;
    color: #6c757d;
}

/* ============================= */
/* 🔹 Footer Section */
/* ============================= */
footer {
    margin-top: 40px;
    padding: 15px 0;
    background-color: #cfdde0;
    color: #343a40;
    text-align: center;
}

/* Footer links */
footer .btn-link {
    font-size: 14px;
    margin: 0 10px;
}

/* ============================= */
/* 🎤 Voice Controls - Bottom Sticky Bar */
/* ============================= */
#voice-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 10px;
    text-align: center;
    z-index: 1000;
}

/* 🎛️ Voice Controls Container */
#voice-controls .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* 🎤 Individual Buttons */
#voice-controls button {
    min-width: auto;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    border: none;
    transition: transform 0.2s ease-in-out;
}

/* Button Colors */
#toggleVoiceFeatures { background-color: #6ffc0d; } /* Blue */
#start-record-btn { background-color: #ffc107; } /* Yellow */
#speak-btn { background-color: #28a745; } /* Green */
#resetLanguageBtn { background-color: #dc3545; } /* Red */

/* Hover Effects */
#toggleVoiceFeatures:hover { background-color: #0056b3; }
#start-record-btn:hover { background-color: #e0a800; }
#speak-btn:hover { background-color: #218838; }
#resetLanguageBtn:hover { background-color: #c82333; }

/* Language Badge */
#selectedLanguageLabel {
  font-weight: 600;

  /* Already has .badge & .bg-secondary from HTML, but you can override colors if desired */
}

/* Speed Label & Select */
#speechSpeed {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid #007bff;
  background-color: #f0f9ff; /* Light, pleasant background */
  color: #0056b3;
  transition: background-color 0.3s;
  text-align: center;
  width: auto;
  max-width: 80px;
}

#speechSpeed:hover {
  background-color: #e0f1ff;
}

#speechSpeed:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Optionally style the label for Speed */
#voice-controls label[for="speechSpeed"] {
  margin-bottom: 0;
  color: #0056b3;
  font-weight: bold;
}


/* Media Query for Mobile */
@media (max-width: 576px) {
  /* Force the voice control buttons to remain in a single horizontal row
     and ensure the first element is flush left (visible) */
  #voice-controls .container {
    flex-wrap: nowrap !important;
    overflow-x: auto; /* Enable horizontal scrolling if needed */
    justify-content: flex-start !important;
  }
  /* Optionally, adjust button and select sizes for a cleaner mobile look */
  #voice-controls button,
  #voice-controls select,
  #voice-controls label {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* 🔴 Voice Status Indicator */
#voice-status {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
    display: none;
}

/* ============================= */
/* 🎚 Speech Speed Control Styling */
/* ============================= */
.voice-speed-control {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 123, 255, 0.2);
    width: 100%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

/* Speaker Icon for Label */
.voice-speed-control label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 5px;
}

.voice-speed-control label i {
    margin-right: 8px;
    font-size: 16px;
    color: #007bff;
}

/* 🎚 Dropdown Styling */
.voice-speed-control select {
    padding: 8px;
    font-size: 14px;
    border-radius: 8px;
    background-color: #e9f5ff;
    border: 1px solid #007bff;
    color: #0056b3;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease-in-out;
    text-align: center;
}

/* Hover & Focus Effects */
.voice-speed-control select:hover { background-color: #d9edff; }
.voice-speed-control select:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* ============================= */
/* 🔔 Flashing Alert */
/* ============================= */
.flashing-alert {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  background-color: #0d31fc;
  animation: flash 1s infinite alternate;
  border-radius: 8px;
  padding: 15px;
}

@keyframes flash {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Ensure the alert is hidden by default (JS will control display) */
#voiceAlert {
  display: none;
}

/* Style for the language select button */
#languageSelectBtn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
}
