/* You can add any other custom styles you have above this line */


/* === HOMEPAGE STYLES === */

.hero-section {
    padding: 100px 0;
    border-radius: 15px; 
    background: #000428; 
    background: -webkit-linear-gradient(to right, #004e92, #000428); 
    background: linear-gradient(to right, #004e92, #000428); 
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.content-section {
    padding: 40px 0;
}

.section-title {
    font-weight: 700;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #0d6efd; 
}

.content-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.content-card .card-title {
    font-weight: 600;
    color: #004e92;
}

.content-card .card-footer {
    padding-top: 0;
}


/* === VIDEO THUMBNAIL PLACEHOLDER STYLES === */

.video-thumbnail-placeholder {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail-placeholder img {
    width: 100%;
    transition: transform 0.3s ease;
}

.video-thumbnail-placeholder:hover img {
    transform: scale(1.05);
}

.play-icon-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.play-icon-overlay i {
    color: #fff;
    text-shadow: 0 0 15px rgba(0,0,0,0.7);
}

.video-thumbnail-placeholder:hover .play-icon-overlay {
    opacity: 1;
}


/* === SCROLLING QUOTES STYLES (FINAL CORRECTED VERSION) === */

.scrolling-quotes-container {
    width: 100%;
    overflow: hidden;
    background-color: #f8f9fa;
    padding: 15px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    white-space: nowrap; 
}

.scrolling-quotes {
    display: inline-block; 
    padding-left: 100%; 
    will-change: transform;
    animation: marquee 90s linear infinite;
    font-size: 1.1rem;
}

/* Base style for each quote span */
.scrolling-quotes span {
    margin: 0 40px; 
    display: inline-block;
    font-weight: 500;
    color: #495057; /* A default color */
}

/* Quote Colors - MORE SPECIFIC SELECTORS */
.scrolling-quotes-container .scrolling-quotes span:nth-child(4n + 1) {
    color: #0d6efd; /* Bootstrap Blue */
}
.scrolling-quotes-container .scrolling-quotes span:nth-child(4n + 2) {
    color: #6f42c1; /* Bootstrap Purple */
}
.scrolling-quotes-container .scrolling-quotes span:nth-child(4n + 3) {
    color: #198754; /* Bootstrap Green */
}
.scrolling-quotes-container .scrolling-quotes span:nth-child(4n + 4) {
    color: #dc3545; /* Bootstrap Red */
}


/* Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}


/* === DASHBOARD ENHANCEMENT STYLES === */

/* --- General Dashboard Layout --- */
.dashboard-header {
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: #f8f9fa;
    border-radius: .3rem;
}

.dashboard-header h1 {
    font-weight: 700;
    color: #343a40;
}

/* --- Dashboard Summary Cards (WITH COLORS) --- */
.dashboard-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap; 
}

.summary-card {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    flex: 1; 
    min-width: 200px;
    color: #ffffff;
    border: none;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.dashboard-summary .summary-card:nth-of-type(1) {
    background: linear-gradient(45deg, #4e73df, #224abe);
}
.dashboard-summary .summary-card:nth-of-type(2) {
    background: linear-gradient(45deg, #1cc88a, #13855c);
}
.dashboard-summary .summary-card:nth-of-type(3) {
    background: linear-gradient(45deg, #36b9cc, #2a96a5);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.summary-value {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

/* --- Overall Progress Bar --- */
.progress-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    margin-bottom: 2.5rem;
}

.progress-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #198754;
    border-radius: 10px;
    transition: width 0.6s ease-in-out;
}

/* --- Quiz History Cards --- */
.quiz-history h2 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #343a40;
}

.quiz-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.quiz-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #004e92;
}

.quiz-info .score {
    margin: 0 0 10px 0;
    color: #6c757d;
}

.quiz-action {
    text-align: right;
    flex-shrink: 0;
}

/* --- Status Badges --- */
.status-badge {
    padding: 5px 12px;
    border-radius: 50rem;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.not-attempted { background-color: #6c757d; }
.status-badge.passed { background-color: #198754; }
.status-badge.failed { background-color: #dc3545; }


/* --- Action Buttons (FINAL HOVER FIX) --- */
.quiz-action .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none !important;
    color: white !important;
    font-weight: bold;
    border: none;
    cursor: pointer;
    opacity: 1 !important; 
    transition: background-color 0.2s ease, transform 0.2s ease; 
}

.quiz-action .btn:hover {
    opacity: 1 !important;
    transform: translateY(-2px);
}

.btn-start { background-color: #0d6efd; }       
.btn-start:hover { background-color: #0b5ed7 !important; }

.btn-view-cert { background-color: #198754; }   
.btn-view-cert:hover { background-color: #157347 !important; }

.btn-retake { background-color: #ffc107; color: #000 !important; } 
.btn-retake:hover { background-color: #ffb500 !important; }



/* === LOGIN & REGISTER PAGE STYLES === */

/* Full-page container to manage layout */
.login-container {
    display: flex;
    min-height: calc(100vh - 56px); /* Full viewport height minus navbar */
    width: 100%;
    align-items: stretch;
}

/* MODIFIED: Left Column: Branding Section (WITH NEW BACKGROUND IMAGE) */
.login-branding {
    flex-basis: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;

    /* Background Image Rules with NEW, SOFTER OVERLAY */
    background-image: 
        linear-gradient(to right, rgba(86, 58, 158, 0.7), rgba(52, 91, 153, 0.8)),
        url('../img/ai-background.jpg');
    background-size: cover;
    background-position: center center;
}

/* Add a subtle background pattern for texture */
.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: pan-background 60s linear infinite;
}

@keyframes pan-background {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

.branding-content {
    text-align: center;
    z-index: 2;
}

/* Right Column: Form Section */
.login-form-wrapper {
    flex-basis: 50%;
    background-color: #f4f7fc; /* A very light, clean blue-grey */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.form-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.form-card h2 {
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.form-card p {
    margin-bottom: 30px;
    color: #666;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
}

.form-control {
    height: 48px;
    border-radius: 6px;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 78, 146, 0.25); /* Focus ring matches brand color */
    border-color: #004e92;
}

.form-actions {
    margin-top: 30px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Media Query for smaller screens */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
    }
    .login-branding {
        flex-basis: auto;
        padding: 60px 20px;
        min-height: 250px; /* Ensure it doesn't collapse */
    }
    .login-form-wrapper {
        flex-basis: auto;
    }
}


/* === SITE FOOTER STYLES (UPDATED FOR PROMINENCE) === */

/* These body rules enable a "sticky footer" */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* This pushes the footer to the bottom on short pages */
main {
    flex-grow: 1;
}

.site-footer {
    background-color: #343a40; /* Dark background to match your navbar */
    padding: 2rem 0; /* Increased padding for more space */
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: #ffffff; /* Changed to bright white */
    font-size: 1.1rem; /* Made the font larger */
    font-weight: 700; /* Made the font bold */
    letter-spacing: 0.5px; /* Added some letter spacing for a premium feel */
}


/* === HELPER CLASSES === */

/* Add a subtle shadow to text on top of the background image */
.text-with-shadow {
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
}


/* === CONTINUE LEARNING CARD STYLES === */

.continue-learning-card {
    background-color: #e9f5ff; /* A light, inviting blue */
    border: 1px solid #bde0ff;
    border-left: 5px solid #0d6efd; /* A strong blue left border to draw attention */
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.retry-quiz-card {
    background-color: #fff8e1; /* A warning/amber color */
    border-color: #ffecb3;
    border-left-color: #ffc107; /* Bootstrap Warning Yellow */
}

.retry-quiz-card .continue-learning-info h4 {
    color: #b78100;
}

.welcome-journey-card {
    background-color: #f3e9ff; /* A fresh, welcoming purple */
    border-color: #dcbde0;
    border-left-color: #6f42c1; /* Bootstrap Purple */
}

.welcome-journey-card .continue-learning-info h4 {
    color: #5a359a;
}

.continue-learning-card.all-done {
    background-color: #e7fff3; /* A celebratory light green */
    border-color: #b3f5d5;
    border-left-color: #198754;
}

.continue-learning-info h4 {
    margin: 0 0 5px 0;
    font-weight: 700;
    color: #0a58ca;
}

.continue-learning-card.all-done .continue-learning-info h4 {
    color: #146c43;
}

.continue-learning-info p {
    margin: 0;
    font-size: 1.1rem;
}


/* === ONBOARDING PAGE STYLES === */

.onboarding-card {
    text-align: center;
}

.level-selection {
    margin: 30px 0;
}

.level-card {
    margin-bottom: 15px;
}

/* Hide the default radio button */
.level-card input[type="radio"] {
    display: none;
}

.level-card label {
    display: block;
    padding: 20px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.level-card label:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

/* Style for when a card is selected */
.level-card input[type="radio"]:checked + label {
    border-color: #0d6efd;
    background-color: #e9f5ff;
    box-shadow: 0 0 0 2px #0d6efd;
}

.level-title {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.level-desc {
    color: #6c757d;
}


/* === ADMIN USER MANAGEMENT STYLES (CORRECTED) === */

.admin-action-group {
    display: flex;
    align-items: center; /* This is the key for vertical alignment */
    gap: 0.5rem; /* This creates space between the forms */
}

.form-password-reset {
    display: flex;
    flex-grow: 1; /* Makes the password form take up all available space */
    gap: 0.5rem; /* Adds space between the input and the 'Update' button */
}
/* === TEXT-TO-SPEECH PLAYER STYLES === */

#tts-player {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tts-label {
    font-weight: 600;
    color: #495057;
}

.tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tts-btn:hover {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.tts-btn i {
    font-size: 0.9em;
}

#tts-play {
    color: #198754; /* Green */
    border-color: #198754;
}
#tts-play:hover {
    background-color: #198754;
    border-color: #198754;
}

#tts-pause {
    color: #ffc107; /* Yellow */
    border-color: #ffc107;
}
#tts-pause:hover {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
}

#tts-stop {
    color: #dc3545; /* Red */
    border-color: #dc3545;
}
#tts-stop:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}
/* === LOGIN BRANDING FOOTER === */

.branding-footer {
    position: absolute; /* Positions it relative to the .login-branding container */
    bottom: 20px; /* 20px from the bottom */
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7); /* Slightly transparent white for an elegant look */
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.branding-footer p {
    margin: 0;
}