/* ===== BASE STYLES ===== */
:root {
  --primary: #1a7f75; /* Darker teal */
  --primary-dark: #12665e;
  --primary-light: #e0f2f1;
  --secondary: #2c3e50;
  --accent: #ff7043;
  --light-bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #555555;
  --border: #e0e0e0;
  --success: #2ecc71;
  --warning: #e74c3c;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1000px;
  --side-margin: 20px;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--light-bg);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-margin);
  width: 100%;
  box-sizing: border-box;
}

/* ===== NAVIGATION ===== */
.main-nav {
  background-color: var(--secondary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-margin);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: bold;
  font-size: 1.2rem;
  padding: 15px 0;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 15px 0;
  display: flex;
  align-items: center;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.nav-links a:hover {
  color: var(--primary-light);
}

.nav-links a i {
  margin-right: 8px;
}

.nav-links .active a {
  border-bottom-color: var(--primary);
  color: white;
  font-weight: 500;
}

/* ===== HEADER ===== */
.tool-header {
  background-color: var(--primary);
  color: white;
  padding: 30px 0;
  margin-bottom: 30px;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-margin);
}

.tool-header h1 {
  margin: 0;
  font-size: 2rem;
}

.tool-header p {
  margin: 8px 0 0;
  opacity: 0.9;
}

/* ===== CARD STYLES ===== */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 25px;
  overflow: hidden;
}

.card-header {
  background-color: var(--primary);
  color: white;
  padding: 15px 20px;
}

.card-header h2 {
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.card-header i {
  margin-right: 10px;
}

.card-body {
  padding: 20px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--secondary);
}

.modern-input, .modern-select, .modern-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 1em;
  box-sizing: border-box;
  transition: var(--transition);
  background-color: white;
}

.modern-input:focus, .modern-select:focus, .modern-textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 127, 117, 0.2);
}

.modern-textarea {
  min-height: 100px;
  resize: vertical;
}

/* ===== BUTTONS ===== */
.button-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 25px 0;
}

.btn-primary, .btn-secondary, .btn-action, .btn-continue {
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #1a252f;
  transform: translateY(-2px);
}

.btn-action {
  background-color: var(--light-bg);
  color: var(--secondary);
  border: 1px solid var(--border);
}

.btn-action:hover {
  background-color: #e0e5eb;
}

.btn-continue {
  background-color: var(--accent);
  color: white;
}

.btn-continue:hover {
  background-color: #f45c2c;
  transform: translateY(-2px);
}

button i {
  margin-right: 8px;
}

/* ===== RESPONSE BOXES ===== */
.response-box {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 15px;
  margin: 15px 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.info-row {
  display: flex;
  margin-bottom: 8px;
}

.info-label {
  font-weight: 600;
  min-width: 160px;
  color: var(--secondary);
}

.info-value {
  color: var(--text);
}

.error {
  color: var(--warning);
  font-weight: 500;
}

.success {
  color: var(--success);
  font-weight: 500;
}

.status-box {
  padding: 12px;
  margin: 15px 0;
  border-radius: var(--border-radius);
  background-color: #f8f9fa;
  border: 1px solid var(--border);
  font-size: 0.9em;
}

/* ===== PROGRESS BAR ===== */
#progressBar {
  width: 100%;
  background: #f0f0f0;
  margin: 15px 0;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  display: none;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#progressBar.active {
  display: block;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, 
    var(--primary), 
    #2a9d8f 20%, 
    #3ab7a8 40%, 
    var(--primary-dark) 60%, 
    var(--primary) 80%);
  background-size: 200% 100%;
  border-radius: 8px;
  transition: width 0.4s ease-out;
  animation: 
    progressPulse 1.5s ease-in-out infinite,
    progressShine 2s ease-in-out infinite;
  position: relative;
}

/* ===== NBC REFERENCES ===== */
.nbc-tip {
  font-size: 0.85em;
  color: var(--text-light);
  margin: 5px 0 0;
}

.nbc-tip a {
  color: var(--primary);
  text-decoration: none;
}

.nbc-tip a:hover {
  text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
@keyframes progressPulse {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes progressShine {
  0% { 
    opacity: 0;
    transform: translateX(-100%) skewX(-20deg); 
  }
  50% { opacity: 0.8; }
  100% { 
    opacity: 0;
    transform: translateX(100%) skewX(-20deg); 
  }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    padding: 10px;
  }
  
  .nav-logo {
    padding: 10px 0;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-around;
  }
  
  .nav-links li {
    margin: 0;
  }
  
  .nav-links a {
    padding: 10px 5px;
    font-size: 0.9em;
  }
  
  .button-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .button-group button {
    width: 100%;
  }
  
  .info-row {
    flex-direction: column;
  }
  
  .info-label {
    margin-bottom: 4px;
  }
}

/* Help Menu Styles */
.help-menu {
  position: relative;
}

.help-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  width: 400px;
  max-height: 500px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  z-index: 1000;
  overflow: hidden;
}

.help-menu:hover .help-dropdown {
  display: block;
}

.help-iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .help-dropdown {
    width: 300px;
    max-height: 400px;
    right: -50px;
  }
  
  .help-iframe {
    height: 400px;
  }
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--card-bg);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--border); /* Light border */
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: var(--text); /* Dark text color */
  padding: 12px 16px;
  display: block;
}

.dropdown-content a:hover {
  background-color: var(--primary-light);
  color: var(--secondary); /* Dark blue text on hover */
}