/* Lingoscore - Light Theme Custom CSS */

/* Global Light Theme Variables */
:root {
    --naati-white: #ffffff;
    --naati-light-gray: #f9f9f9;
    --naati-gray: #f0f0f0;
    --naati-dark-text: #222222;
    --naati-primary-text: #2c2c2c;
    --naati-muted-text: #6c757d;
    --naati-navy: #003366;
    --naati-border: #dee2e6;
    --naati-light-border: #e9ecef;
    
    /* Brand Colors for Visual Enhancements */
    --brand-primary: #003399;
    --brand-secondary: #007bff;
    --brand-accent: #6f42c1;
    --brand-light-blue: #f3f8ff;
    --brand-light-gradient: #e6f3ff;
}

/* Fix navbar and logo loading - prevent layout shift */
.navbar {
    min-height: 72px;
}

.navbar-brand {
    min-width: 150px;
    min-height: 40px;
    /* Use logical property for RTL/LTR compatibility - logo stays on left in both modes */
    margin-inline-end: auto;
}

.navbar-brand img {
    display: block;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* Ensure menu stays on the right in both LTR and RTL */
.navbar-nav {
    margin-inline-start: auto !important;
}

/* Navbar Upgrade Button - Direction-Independent Styling */
.navbar-upgrade-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
}

.navbar-upgrade-btn i {
    margin: 0 !important;
}

/* =============================================================================
   USER SCENARIO STATUS BADGES - NEW FEATURE
   ============================================================================= */

.scenario-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scenario-card {
    position: relative;
}

.scenario-card .card-body {
    padding-bottom: 3rem; /* Make space for the status badge */
}

.status-completed {
    background-color: #d1f2eb;
    color: #0f5132;
    border: 1px solid #a7f3d0;
}

.status-in-progress {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffeaa7;
}

.status-not-practiced {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.last-attempt-scores {
    border: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.last-attempt-scores .badge {
    font-size: 0.75rem;
    font-weight: 500;
}

.scenario-info-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.scenario-info-card .scenario-title {
    color: var(--naati-navy);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.scenario-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.score-preview {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* Body and Base Styles */
body {
    background-color: var(--naati-white) !important;
    color: var(--naati-dark-text) !important;
}

/* Recording Button Styles */
.btn-recording-start {
    color: #22c55e !important;
    border-color: #22c55e !important;
    background-color: transparent !important;
}

.btn-recording-start:hover {
    color: white !important;
    background-color: #22c55e !important;
    border-color: #22c55e !important;
}

.btn-recording-stop {
    color: #ef4444 !important;
    border-color: #ef4444 !important;
    background-color: transparent !important;
}

.btn-recording-stop:hover {
    color: white !important;
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.btn-recording-play {
    color: #f97316 !important;
    border-color: #f97316 !important;
    background-color: transparent !important;
}

.btn-recording-play:hover {
    color: white !important;
    background-color: #f97316 !important;
    border-color: #f97316 !important;
}

.btn-recording-play:disabled {
    color: var(--naati-muted-text) !important;
    border-color: var(--naati-muted-text) !important;
    opacity: 0.5 !important;
    cursor: pointer !important;
}

/* Play/Stop Toggle Button Styles */
.btn-play-toggle {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
}

.btn-play-toggle:hover {
    color: white !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.btn-play-toggle.playing {
    color: #6c757d !important;
    border-color: #6c757d !important;
    background-color: transparent !important;
}

.btn-play-toggle.playing:hover {
    color: white !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* Audio Controls Layout */
.audio-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Recording Status Indicators */
.recording-status {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.recording-status.recording {
    background: #fef2f2;
    color: #dc2626;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Segment Cards - Light Theme */
.segment-card {
    margin-bottom: 2rem;
    border: 1px solid var(--naati-border);
    border-radius: 0.5rem;
    background: var(--naati-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.segment-card .card-header {
    background: var(--naati-light-gray);
    border-bottom: 1px solid var(--naati-border);
    color: var(--naati-dark-text);
}

.segment-card .card-body {
    background: var(--naati-white);
    color: var(--naati-dark-text);
}

/* Transcription and Score Boxes */
.transcription-container, .score-container, .dialogue-box {
    background: var(--naati-white) !important;
    border: 1px solid var(--naati-light-border) !important;
    color: var(--naati-dark-text) !important;
}

/* Code/Prompt Areas */
.code-area, .prompt-area, pre, code {
    background-color: var(--naati-gray) !important;
    color: #333 !important;
    border: 1px solid var(--naati-border) !important;
}

/* Topic Cards */
.topic-card {
    background: var(--naati-white) !important;
    border: 1px solid var(--naati-border) !important;
    color: var(--naati-dark-text) !important;
}

.topic-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

/* Scenario Count Badge */
.scenario-count {
    background: rgba(0,51,102,0.1) !important;
    color: var(--naati-navy) !important;
}

/* Topic Icon Light Theme Fix */
.topic-icon {
    color: var(--naati-navy) !important;
}

/* Scenario Card Button Hover Effect */
.scenario-card .btn:hover {
    background-color: #002244 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.3);
}

/* Enhanced Hero Section Styles */
.hero-section {
    padding: 3rem 0;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 51, 102, 0.03) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.feature-highlight-card {
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.feature-highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.1) !important;
}

.feature-pill {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 51, 102, 0.1);
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--naati-dark-text);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.15);
}

.hero-description {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LOCKED: AI Scoring Horizontal Layout - Light Theme (FINAL VERSION) */
.modern-ai-scorecard {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.1) !important;
    padding: 20px !important;
    margin-top: 1rem;
    color: #212529 !important;
}

.scorecard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.scorecard-title {
    color: #6f42c1 !important; /* Dark purple for AI Score header */
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.scorecard-title i {
    color: #6f42c1 !important; /* Purple star icon */
}

.total-score {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745 !important; /* Green color for score points */
    margin: 0;
}

.total-score-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0;
}

/* LOCKED: Horizontal Score Components Layout - Light Theme */
.score-components {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .score-components {
        flex-direction: column;
    }
}

.score-component-card {
    flex: 1;
    padding: 20px 16px;
    text-align: center;
    border-right: 1px solid #e9ecef;
    position: relative;
}

.score-component-card:last-child {
    border-right: none;
}

.score-component-card.accuracy {
    background: #d4edda !important; /* Light green background */
}

.score-component-card.fluency {
    background: #d1ecf1 !important; /* Light teal background */
}

.score-component-card.grammar {
    background: #fff3cd !important; /* Light amber background */
}

.component-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #212529 !important;
}

.component-score {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 12px;
    color: white !important;
}

.component-score.accuracy {
    background: #28a745 !important; /* Green badge */
}

.component-score.fluency {
    background: #17a2b8 !important; /* Teal badge */
}

.component-score.grammar {
    background: #fd7e14 !important; /* Orange badge */
}

.component-text {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
    line-height: 1.4;
    margin-top: 8px;
    font-style: italic;
}

/* Per-Category Bilingual Feedback */
.component-feedback {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: left;
}

.feedback-item {
    margin-bottom: 10px;
}

.feedback-item:last-child {
    margin-bottom: 0;
}

.feedback-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.feedback-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #212529;
    font-weight: 400;
    font-style: normal;
}

.score-component-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.score-component-card.accuracy {
    border-left: 4px solid #28a745;
}

.score-component-card.fluency {
    border-left: 4px solid #17a2b8;
}

.score-component-card.grammar {
    border-left: 4px solid #fd7e14;
}

/* Removed duplicate rules - keeping only the main definitions above */

/* Collapsible Feedback */
.feedback-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.feedback-toggle {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.feedback-toggle:hover {
    color: #495057;
}

.feedback-toggle i {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.feedback-toggle.expanded i {
    transform: rotate(180deg);
}

.feedback-content {
    color: #212529 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: 1.6;
    margin-top: 0.75rem;
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.feedback-content.collapsed {
    display: none;
}

/* Demo Mode Styling */
.modern-ai-scorecard.demo-mode {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%) !important;
}

.modern-ai-scorecard.demo-mode .scorecard-title::after {
    content: " (Demo)";
    color: #6c757d;
    font-weight: normal;
    font-size: 0.875rem;
}

/* CRITICAL FEATURE: Total Scenario Score Display - NEVER CHANGE UNLESS EXPLICITLY REQUESTED */
.scenario-score-circle {
    position: relative;
    z-index: 10;
}

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid #e9ecef;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.score-circle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.score-value {
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 4px;
}

.score-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    text-align: center;
}

/* Color coding based on performance levels */
.score-circle.score-pass {
    border-color: #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
}

.score-circle.score-pass .score-value {
    color: #28a745;
}

.score-circle.score-pass .score-label {
    color: #155724;
}

.score-circle.score-borderline {
    border-color: #fd7e14;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf7 100%);
}

.score-circle.score-borderline .score-value {
    color: #fd7e14;
}

.score-circle.score-borderline .score-label {
    color: #8a4f00;
}

.score-circle.score-fail {
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.score-circle.score-fail .score-value {
    color: #dc3545;
}

.score-circle.score-fail .score-label {
    color: #721c24;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 1.4rem;
    }
    
    .score-label {
        font-size: 0.8rem;
    }
}

/* Audio Waveform */
.audio-waveform {
    background: var(--naati-gray) !important;
    border: 1px solid var(--naati-border) !important;
    color: var(--naati-dark-text) !important;
}

/* Progress Bars */
.progress {
    background: var(--naati-light-gray) !important;
}

.progress-bar {
    background: linear-gradient(90deg, var(--naati-navy), #0066cc) !important;
}

/* Alert and Status Messages */
.alert {
    border: 1px solid var(--naati-border) !important;
}

/* Cards and Containers */
.card {
    background: var(--naati-white) !important;
    border: 1px solid var(--naati-border) !important;
    color: var(--naati-dark-text) !important;
}

.card-header {
    background: var(--naati-light-gray) !important;
    border-bottom: 1px solid var(--naati-border) !important;
    color: var(--naati-dark-text) !important;
}

.card-body {
    background: var(--naati-white) !important;
    color: var(--naati-dark-text) !important;
}

/* Tables */
.table {
    color: var(--naati-dark-text) !important;
}

.table-dark {
    --bs-table-bg: var(--naati-light-gray) !important;
    --bs-table-color: var(--naati-dark-text) !important;
}

/* Forms */
.form-control, .form-select {
    background-color: var(--naati-white) !important;
    color: var(--naati-dark-text) !important;
    border: 1px solid var(--naati-border) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--naati-navy) !important;
    box-shadow: 0 0 0 0.2rem rgba(0,51,102,0.25) !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--naati-dark-text) !important;
}

/* Text Colors */
.text-muted {
    color: var(--naati-dark-text) !important;
    font-weight: normal !important;
}

/* Navigation Overrides */
.navbar-light .navbar-brand,
.navbar-light .navbar-nav .nav-link {
    color: var(--naati-dark-text) !important;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--naati-navy) !important;
}

.navbar .navbar-nav .nav-link.active {
    background: #e3f2fd !important;
    color: #0066cc !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    transition: all 0.2s ease !important;
}

.navbar .navbar-nav .nav-link {
    transition: all 0.2s ease !important;
    padding: 0.5rem 1rem !important;
}
/* Profile Dropdown Styling - Hover Based */
.dropdown-hover {
    position: relative;
}

.dropdown-hover .dropdown-menu {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    min-width: 200px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
}

.dropdown-hover:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.dropdown-item.text-danger:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Profile Icon Styling */
#profileDropdown {
    border: none;
    background: none;
    text-decoration: none;
    cursor: pointer;
}

#profileDropdown:hover {
    color: #0d6efd;
    text-decoration: none;
}

/* Remove Bootstrap dropdown arrow */
.dropdown-hover .nav-link::after {
    display: none !important;
}

/* Responsive Profile Menu */
@media (max-width: 767px) {
    .dropdown-hover .dropdown-menu {
        right: 0;
        left: auto;
    }
}

/* Footer Styling */
footer {
    color: #6c757d !important;
    font-size: 0.875rem;
}

footer a {
    color: #6c757d !important;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #495057 !important;
    text-decoration: underline !important;
}

/* Ensure footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
    footer .d-flex {
        gap: 0.5rem;
    }
    
    footer .text-muted.small {
        font-size: 0.8rem !important;
    }
}

/* Constrain navbar width and tighten vertical space */
.site-nav .nav-shell {
  max-width: 1200px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

/* Reduce navbar height */
.site-nav {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  min-height: 60px !important;
}


/* Center the main menu */
.site-nav .nav-center {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Keep right-side actions aligned right */
.site-nav .nav-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Optional: slightly smaller gap between all nav links */
.site-nav .navbar-nav .nav-link {
  padding-left: 8px !important;
  padding-right: 8px !important;
}


/* Keep navbar elements aligned and spaced */
.navbar .container,
.navbar .container-fluid {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Optional: center the main links if the markup allows a center group */
.nav-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

/* Keep CTA/auth area pinned right */
.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Make sure the navbar stays on top and visible */
nav.navbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
}

/* Reduce container max width on very wide screens so hero text isn't too stretched */
@media (min-width: 1200px) {
  .container.container--narrow, 
  .container-lg.container--narrow {
    max-width: 1100px;  /* adjust between 1040–1140 if needed */
  }
}

/* Navbar logo sizing */
.navbar .brand-logo {
  height: 40px;      /* default */
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .navbar .brand-logo {
    height: 48px;    /* desktop wordmark */
  }
}

@media (max-width: 575.98px) {
  .navbar .brand-logo {
    height: 28px;    /* compact mobile logo */
  }
}

/* Ensure navbar alignment */
.navbar .brand-link {
  margin-right: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* === NAVBAR LAYOUT FIX === */
.navbar .nav-shell {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 16px !important;
}

/* Ensure the collapse container sits in the center column */
.navbar .navbar-collapse {
  justify-content: center !important;
}

/* Tidy the nav items spacing */
.navbar .navbar-nav {
  gap: 24px !important;        /* desktop spacing */
}
@media (max-width: 991.98px) {
  .navbar .navbar-nav { gap: 16px !important; }  /* tablet */
}

/* Make action buttons (Upgrade / Login / Sign Up) align to the right automatically */
.navbar .nav-shell > :last-child {
  justify-self: end !important;
}

/* Prevent the center column from shrinking when buttons are long */
.navbar .navbar-collapse { min-width: 0 !important; }

/* === LOGO SIZING === */
.brand-link { display: inline-flex; align-items: center; gap: 10px; }

.brand-logo {
  height: 40px;            /* default */
  width: auto;
  display: block;
}

@media (max-width: 575.98px) {
  .brand-logo { height: 28px; }   /* mobile compact */
}

@media (min-width: 768px) {
  .brand-logo { height: 48px; }   /* desktop */
}

/* Keep the bar sticky and visually clean */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
}

/* Optional: crisper hover for nav links */
.navbar .nav-link {
  transition: color .15s ease, opacity .15s ease;
}
.navbar .nav-link:hover { opacity: .8; }

/* Optional: consistent button spacing on the right */
.navbar .btn,
.navbar a.btn {
  margin-left: 10px;
}

/* Kill any old overrides that try to center the whole container */
.navbar .container,
.navbar .container-fluid {
  justify-content: initial !important;
  gap: 0 !important;
}

/* Prevent any accidental full-screen overlay from blocking clicks */
body *[data-overlay],
.modal-backdrop,
.offcanvas-backdrop,
.toast-container {
  pointer-events: none;
}

.navbar, .navbar * ,
main, main * ,
footer, footer * {
  pointer-events: auto;
}

/* ============================================================================
   HOME PAGE ICON HOVER ANIMATIONS - CREATIVE & SMOOTH
   ============================================================================ */

/* How to Use Section - Step Icons with Creative Animations */
/* Step 1 - Listen: Gentle bounce effect on headphones */
.card:hover .fa-headphones {
    animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Step 2 - Record: Pulse effect on microphone */
.card:hover .fa-microphone {
    animation: iconPulse 0.8s ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Step 3 - Review: Rotate play button */
.card:hover .fa-play-circle {
    animation: iconRotate 0.6s ease-in-out;
}

@keyframes iconRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Step 4 - Repeat: Spin sync icon */
.card:hover .fa-sync-alt {
    animation: iconSpin 0.8s ease-in-out;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Feature Cards (Audio Playback, Voice Recording, AI Scoring) - Float effect */
.card:hover .fa-headphones.fa-3x,
.card:hover .fa-microphone.fa-3x,
.card:hover .fa-brain.fa-3x {
    animation: iconFloat 1s ease-in-out;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Core Capabilities Icons - Subtle scale effect */
.d-flex:hover .fa-microphone.fa-lg,
.d-flex:hover .fa-brain.fa-lg,
.d-flex:hover .fa-folder.fa-lg,
.d-flex:hover .fa-globe.fa-lg,
.d-flex:hover .fa-file-alt.fa-lg,
.d-flex:hover .fa-graduation-cap.fa-lg {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Hero Section Icons - Gentle pulse */
.hero-section .fa-brain,
.hero-section .fa-globe {
    transition: transform 0.3s ease;
}

.hero-section .d-flex:hover .fa-brain,
.hero-section .d-flex:hover .fa-globe {
    transform: scale(1.1);
}

/* =============================================================================
   PROGRESS TRACKING BADGES - NAATI CCL Visual Indicators
   ============================================================================= */

/* Circular Score Badges */
.rounded-circle.score-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.rounded-circle.score-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Status Badge Styling */
.scenario-status-badge,
.mock-test-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Progress Badge Container */
.position-absolute.top-0.end-0 {
    pointer-events: none;
}

.position-absolute.top-0.end-0 > div {
    pointer-events: auto;
}

/* Scenario Card Hover Effects */
.card.position-relative:hover .rounded-circle {
    transform: scale(1.08);
}

/* NAATI Color Badges with Shadows */
.badge.bg-danger {
    background-color: #dc3545 !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.badge.bg-success {
    background-color: #28a745 !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Score Circle with Yellow Text Fix */
.rounded-circle[style*="background-color: #ffc107"] {
    color: #000 !important;
}

/* Tooltip Styling */
.tooltip-inner {
    max-width: 250px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Responsive Badge Sizing */
@media (max-width: 768px) {
    .rounded-circle {
        width: 45px !important;
        height: 45px !important;
        font-size: 0.7rem !important;
    }
    
    .scenario-status-badge,
    .mock-test-status-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Progress Text Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scenario-progress-text {
    animation: fadeInUp 0.3s ease;
}

/* =============================================================================
   VISUAL ENHANCEMENTS - Color, Depth, and Modern UI
   ============================================================================= */

/* 1. HERO SECTION ENHANCEMENT - Gradient Background Container */
.hero-gradient-container {
    background: linear-gradient(135deg, var(--brand-light-gradient) 0%, var(--brand-light-blue) 50%, #ffffff 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 51, 153, 0.08);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-gradient-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* 2. ALTERNATING SECTION BACKGROUNDS */
.section-bg-white {
    background-color: #ffffff;
}

.section-bg-light-gray {
    background-color: var(--naati-light-gray);
    padding: 3rem 0;
}

.section-bg-light-blue {
    background-color: var(--brand-light-blue);
    padding: 3rem 0;
}

/* 3. ENHANCED CARD SHADOWS AND HOVER EFFECTS */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 51, 153, 0.12) !important;
    border-color: rgba(0, 123, 255, 0.2) !important;
}

.card.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Feature Cards Special Styling */
.feature-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 51, 153, 0.06);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 51, 153, 0.15);
}

/* 4. BUTTON GRADIENTS AND ENHANCEMENTS */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #002266 0%, #0056b3 100%);
    box-shadow: 0 8px 24px rgba(0, 51, 153, 0.3);
    transform: translateY(-2px);
}

/* Upgrade to Pro Button - Extra Special */
.btn-primary[onclick*="Stripe"],
.btn-primary[id*="upgrade"],
#navbar-upgrade-btn {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%) !important;
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.3) !important;
}

.btn-primary[onclick*="Stripe"]:hover,
.btn-primary[id*="upgrade"]:hover,
#navbar-upgrade-btn:hover {
    background: linear-gradient(135deg, #002266 0%, #5a2d9a 100%) !important;
    box-shadow: 0 10px 32px rgba(111, 66, 193, 0.4) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.3);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(0, 51, 153, 0.25);
    transform: translateY(-2px);
}

/* 5. NAVBAR SHADOW AND POLISH */
.navbar {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98) !important;
}

/* 6. FOOTER STYLING */
footer {
    background: linear-gradient(180deg, #f8f9fa 0%, var(--brand-light-blue) 100%);
    border-top: 1px solid rgba(0, 51, 153, 0.1);
}

/* ADDITIONAL POLISH - Badges and Icons */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Step Number Circles */
.rounded-circle[style*="background-color"] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.card:hover .rounded-circle[style*="background-color"] {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Transitions */
.container > .row,
.container > .text-center {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================================================
   ENHANCED COLOR SYSTEM - Premium SaaS Visual Polish
   ============================================================================ */

/* 1. SECTION BACKGROUND PATTERNS - Alternating for visual interest */

/* Light gradient background - subtle color transition */
.section-bg-gradient {
    background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 100%);
    position: relative;
}

/* Accent background - soft colored section */
.section-bg-accent {
    background: rgba(0, 51, 153, 0.02);
    border-top: 1px solid rgba(0, 51, 153, 0.08);
    border-bottom: 1px solid rgba(0, 51, 153, 0.08);
    position: relative;
}

/* Premium gradient background - for special sections */
.section-bg-premium {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.03) 0%, rgba(0, 123, 255, 0.03) 100%);
    position: relative;
}

/* 2. VISUAL SECTION DIVIDERS - Subtle separation elements */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 51, 153, 0.15) 50%, transparent 100%);
    margin: 4rem auto;
    max-width: 600px;
}

.section-divider-thick {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 51, 153, 0.2) 50%, transparent 100%);
    margin: 5rem auto;
    max-width: 400px;
}

/* 3. COLORED INFORMATION CONTAINERS - For key content */

.info-container-primary {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.06) 0%, rgba(0, 123, 255, 0.06) 100%);
    border-left: 4px solid var(--brand-primary);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 51, 153, 0.08);
    transition: all 0.3s ease;
}

.info-container-primary:hover {
    box-shadow: 0 4px 20px rgba(0, 51, 153, 0.12);
    transform: translateX(4px);
}

.info-container-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.06) 0%, rgba(34, 139, 58, 0.06) 100%);
    border-left: 4px solid #28a745;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.08);
}

.info-container-accent {
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.06) 0%, rgba(90, 45, 154, 0.06) 100%);
    border-left: 4px solid var(--brand-accent);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(111, 66, 193, 0.08);
}

/* 4. PREMIUM CARD ENHANCEMENTS - Beyond basic cards */

.premium-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 51, 153, 0.12);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 51, 153, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-card:hover::before {
    opacity: 1;
}

.premium-card:hover {
    box-shadow: 0 8px 32px rgba(0, 51, 153, 0.15);
    transform: translateY(-6px);
    border-color: rgba(0, 123, 255, 0.3);
}

/* Premium card with gradient border effect */
.premium-card-gradient {
    background: #ffffff;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    box-shadow: 0 6px 24px rgba(0, 51, 153, 0.12);
    transition: all 0.3s ease;
}

.premium-card-gradient .card-inner {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
}

.premium-card-gradient:hover {
    box-shadow: 0 10px 40px rgba(0, 51, 153, 0.18);
    transform: translateY(-4px);
}

/* 5. COLORED ACCENT BLOCKS - For CTAs and important sections */

.accent-block-primary {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.08) 0%, rgba(0, 123, 255, 0.08) 100%);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 51, 153, 0.15);
    position: relative;
    overflow: hidden;
}

.accent-block-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.accent-block-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

/* 6. STATS/KPI ENHANCEMENTS - For dashboard-style sections */

.stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: rgba(0, 123, 255, 0.3);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 7. FEATURE HIGHLIGHT BOXES - For showcasing features */

.feature-highlight {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.04) 0%, rgba(0, 123, 255, 0.04) 100%);
    border: 2px solid rgba(0, 51, 153, 0.1);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 123, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-highlight:hover::before {
    opacity: 1;
}

.feature-highlight:hover {
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 51, 153, 0.1);
}

/* 8. SECTION HEADERS WITH COLORED UNDERLINES */

.section-header {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 2px;
}

/* 9. CTA BUTTON ENHANCEMENTS - Beyond basic buttons */

.btn-cta-special {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    color: white;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 8px 24px rgba(111, 66, 193, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-cta-special::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-cta-special:hover::before {
    left: 100%;
}

.btn-cta-special:hover {
    box-shadow: 0 12px 40px rgba(111, 66, 193, 0.4);
    transform: translateY(-3px);
    color: white;
}

/* 10. BADGE UPGRADES - More premium looking badges */

.badge-premium {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.25);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-gradient-glow {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(245, 87, 108, 0.4);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 6px 24px rgba(245, 87, 108, 0.6);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-gradient-container {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .feature-card:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .card:hover {
        transform: translateY(-2px);
    }
    
    .section-divider {
        margin: 3rem auto;
    }
    
    .info-container-primary,
    .info-container-success,
    .info-container-accent {
        padding: 1.25rem;
    }
    
    .accent-block-primary,
    .accent-block-gradient {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
}


/* =============================================================================
   SCENARIO BADGES - RTL/LTR POSITIONING
   ============================================================================= */

/* Position badges on the right for LTR, left for RTL (logical positioning) */
.scenario-badges {
    inset-inline-end: 16px;
}

/* Back button alignment - left for Arabic (RTL), left for English (LTR) */
[dir="rtl"] .btn-outline-primary {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

[dir="ltr"] .btn-outline-primary {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

/* Force back button to physical left side for both LTR and RTL */
.scenario-back-button-wrapper {
    text-align: left !important;
}

[dir="rtl"] .scenario-back-button-wrapper {
    text-align: left !important;
}

/* Force practice navigation buttons to physical left side for both LTR and RTL */
.practice-nav-buttons-wrapper {
    text-align: left !important;
}

[dir="rtl"] .practice-nav-buttons-wrapper {
    text-align: left !important;
}

/* Force practice segment area to LTR for consistent experience in both languages */
#segment-container {
    direction: ltr !important;
    text-align: left !important;
}

[dir="rtl"] #segment-container {
    direction: ltr !important;
    text-align: left !important;
}

/* Ensure all practice elements stay left-aligned */
[dir="rtl"] #segment-container * {
    text-align: left !important;
}

[dir="rtl"] #segment-container .text-center {
    text-align: center !important;
}

[dir="rtl"] #segment-container .text-end {
    text-align: right !important;
}
