/* DSDCertify - Custom Styles */
/* Professional DSD Certification Platform */
/* A Draco Staff Development Company */

:root {
    --primary-color: #1a4f7a;
    --primary-dark: #0d3a5c;
    --primary-light: #2d6a9f;
    --secondary-color: #28a745;
    --accent-color: #ffc107;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #1a4f7a 0%, #2d6a9f 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    padding-top: 76px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
}

/* Enhanced Navbar */
.navbar-main {
    background: linear-gradient(135deg, #0d3a5c 0%, #1a4f7a 100%) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar-main.scrolled {
    padding: 8px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.navbar-brand {
    font-size: 1.4rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover .brand-icon {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-main .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85) !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-main .nav-link:hover {
    color: #fff !important;
}

.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-main .nav-link:hover::after {
    width: 60%;
}

.btn-cta-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-cta-header:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: #fff !important;
}

.btn-cta-header i {
    transition: transform 0.3s ease;
}

.btn-cta-header:hover i {
    transform: translateX(3px);
}

/* Hero Section */
.hero-section {
    background: var(--bg-gradient);
    color: white;
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="2"/></svg>') repeat;
    background-size: 100px;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-price {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-color);
}

.hero-price-note {
    font-size: 1rem;
    opacity: 0.8;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    height: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Curriculum Section */
.curriculum-section {
    background: var(--bg-light);
}

.module-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.module-card:hover {
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
}

.module-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

/* Pricing Section */
.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--primary-color);
}

.pricing-card.featured::before {
    content: 'BEST VALUE';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 40px;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.pricing-amount {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pricing-period {
    color: var(--text-muted);
    font-size: 1rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i {
    color: var(--secondary-color);
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

/* FAQ Section */
.faq-section .accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.faq-section .accordion-button {
    font-weight: 600;
    padding: 20px 25px;
    background: white;
}

.faq-section .accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.faq-section .accordion-body {
    padding: 20px 25px;
    line-height: 1.7;
}

/* Auth Forms */
.auth-container {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    background: var(--bg-light);
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin: 40px auto;
}

.auth-header {
    background: var(--bg-gradient);
    color: white;
    padding: 40px;
    text-align: center;
}

.auth-header h2 {
    margin-bottom: 10px;
}

.auth-body {
    padding: 40px;
}

.form-control, .form-select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 79, 122, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* Dashboard Styles */
.dashboard-header {
    background: var(--bg-gradient);
    color: white;
    padding: 40px 0;
}

.progress-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--secondary-color) var(--progress, 0%), #e9ecef var(--progress, 0%));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
}

.progress-circle span {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    height: 100%;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Course Content */
.course-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.course-module-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-module-item:hover,
.course-module-item.active {
    background: var(--bg-light);
}

.course-module-item.completed {
    background: rgba(40, 167, 69, 0.1);
}

.course-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Certificate Preview */
.certificate-preview {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 40px;
    position: relative;
}

.certificate-preview::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(26, 79, 122, 0.3);
    border-radius: 4px;
    pointer-events: none;
}

.certificate-seal {
    width: 100px;
    height: 100px;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

/* Admin Dashboard */
.admin-sidebar {
    background: var(--primary-dark);
    min-height: calc(100vh - 76px);
    color: white;
}

.admin-nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.admin-nav-link i {
    width: 24px;
    margin-right: 12px;
}

/* Buttons */
.btn-primary {
    background: var(--bg-gradient);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 79, 122, 0.3);
    background: var(--primary-dark);
}

.btn-success {
    background: var(--secondary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
}

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

/* Utilities */
.section-padding {
    padding: 100px 0;
}

.text-gradient {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--bg-gradient);
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Quiz Styles */
.quiz-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: rgba(26, 79, 122, 0.05);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(26, 79, 122, 0.1);
}

.quiz-option.correct {
    border-color: var(--secondary-color);
    background: rgba(40, 167, 69, 0.1);
}

.quiz-option.incorrect {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-price {
        font-size: 3rem;
    }
    
    .pricing-amount {
        font-size: 3rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .auth-body {
        padding: 30px;
    }
}

/* Footer Styles */
.footer-section {
    margin-top: auto;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-brand i {
    font-size: 1.5rem;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.hover-white:hover {
    color: #fff !important;
}

.bg-black {
    background-color: #111 !important;
}

.text-primary {
    color: var(--primary-light) !important;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 10px rgba(0,0,0,0.1);
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid;
    min-width: 320px;
}

.toast-notification.toast-success {
    border-left-color: #28a745;
}

.toast-notification.toast-error {
    border-left-color: #dc3545;
}

.toast-notification.toast-warning {
    border-left-color: #ffc107;
}

.toast-notification.toast-info {
    border-left-color: #17a2b8;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.toast-success .toast-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.toast-error .toast-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.toast-warning .toast-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.toast-info .toast-icon {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: #2c3e50;
}

.toast-message {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #495057;
}

.toast-notification.hiding {
    animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Tooltip Enhancements */
.tooltip {
    font-family: var(--font-primary);
    font-size: 0.8rem;
}

.tooltip-inner {
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Button Enhancements */
.btn {
    position: relative;
    transition: all 0.3s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    box-shadow: 0 4px 14px rgba(26, 79, 122, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(26, 79, 122, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.35);
    transform: translateY(-1px);
}

.btn-danger {
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
}

/* Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 79, 122, 0.15);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.invalid-feedback {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.invalid-feedback::before {
    /* §1.1 — emoji prohibited. fa-triangle-exclamation (U+F071) via Font Awesome. */
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #adb5bd;
}

.empty-state h5 {
    color: #495057;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    max-width: 300px;
    margin: 0 auto;
}

/* Confirmation Modal */
.modal-confirm .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-confirm .modal-body {
    text-align: center;
    padding: 30px;
}

.modal-confirm .modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.modal-confirm .modal-icon.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.modal-confirm .modal-icon.danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.modal-confirm .modal-footer {
    border-top: none;
    justify-content: center;
    gap: 10px;
}

/* Module Navigation Buttons - Enhanced Styling */
.module-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
    border-top: 2px solid #e9ecef;
    margin-top: 40px;
    background: linear-gradient(to bottom, transparent, rgba(248, 249, 250, 0.5));
}

.module-nav-buttons .btn {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-module-prev {
    background: #fff;
    border: 2px solid #dee2e6;
    color: #495057;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-module-prev:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.btn-module-prev:active {
    transform: translateX(-2px);
}

.btn-module-prev i {
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.btn-module-prev:hover i {
    transform: translateX(-4px);
}

.btn-module-next {
    background: linear-gradient(135deg, #1a4f7a 0%, #2d6a9f 100%);
    border: none;
    color: #fff;
    min-width: 180px;
    box-shadow: 0 4px 15px rgba(26, 79, 122, 0.35);
}

.btn-module-next:hover {
    background: linear-gradient(135deg, #0d3a5c 0%, #1a4f7a 100%);
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(26, 79, 122, 0.45);
    color: #fff;
}

.btn-module-next:active {
    transform: translateX(2px);
}

.btn-module-next i {
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.btn-module-next:hover i {
    transform: translateX(4px);
}

.btn-module-complete {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: #fff;
    min-width: 220px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.35);
    font-size: 1.05rem;
}

.btn-module-complete:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.45);
    color: #fff;
}

.btn-module-complete:active {
    transform: translateY(-1px);
}

.btn-module-complete i {
    transition: transform 0.3s ease;
    font-size: 1.2em;
}

.btn-module-complete:hover i {
    transform: scale(1.2);
}

.badge-completed {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.module-nav-center {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Module Locking Styles */
.module-locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.module-locked:hover {
    background: #f8f9fa !important;
}

.course-module-item.module-locked .bi-lock-fill {
    font-size: 0.9rem;
}

/* Print Styles for Certificate */
@media print {
    .no-print {
        display: none !important;
    }
    
    .certificate-preview {
        border: none;
        box-shadow: none;
    }
    
    .footer-section {
        display: none;
    }
    
    .toast-container {
        display: none;
    }
}

/* ============================================
   Loading States & Skeleton Loaders
   ============================================ */

/* Skeleton Loader Base */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 100%; }

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.loading-spinner.dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--primary-color);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading .btn-text {
    visibility: hidden;
}

/* Page Loading Overlay */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.page-loading-content {
    text-align: center;
}

.page-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Saving Indicator */
.saving-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 30px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.saving-indicator.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.saving-indicator i {
    font-size: 1rem;
}

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

/* ============================================
   Custom Confirm Modal (replaces browser confirm)
   ============================================ */

.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
}

.confirm-modal-icon.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #f0ad4e;
}

.confirm-modal-icon.danger {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.confirm-modal-icon.info {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #212529;
}

.confirm-modal-message {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.confirm-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 100px;
}

.confirm-modal-btn-cancel {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.confirm-modal-btn-cancel:hover {
    background: #e9ecef;
}

.confirm-modal-btn-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.confirm-modal-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}

.confirm-modal-btn-confirm.primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #3d5a80 100%);
}

.confirm-modal-btn-confirm.primary:hover {
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.35);
}

/* ============================================
   Lazy Loading Images
   ============================================ */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"][src] {
    opacity: 1;
}

.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* ============================================
   Consistent Button & Badge Styles (Global)
   ============================================ */

.btn-consistent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-consistent:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-consistent-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #3d5a80 100%);
    color: white;
}

.btn-consistent-primary:hover {
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-consistent-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-consistent-success:hover {
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-consistent-outline {
    background: white;
    color: #495057;
    border: 1.5px solid #dee2e6;
}

.btn-consistent-outline:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

.badge-consistent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-consistent-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.badge-consistent-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #3d5a80 100%);
    color: white;
}

.badge-consistent-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
}

.badge-consistent-secondary {
    background: #6c757d;
    color: white;
}

/* ============================================
   Mobile Responsiveness Enhancements
   ============================================ */

@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .toast-notification {
        min-width: auto;
        width: 100%;
    }
    
    .confirm-modal {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .confirm-modal-buttons {
        flex-direction: column;
    }
    
    .confirm-modal-btn {
        width: 100%;
    }
    
    .saving-indicator {
        left: 20px;
        right: 20px;
        bottom: 10px;
        justify-content: center;
    }
    
    .skeleton-card {
        padding: 1rem;
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 10001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .skeleton {
        animation: none;
        background: #e0e0e0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-consistent,
    .badge-consistent {
        border: 2px solid currentColor;
    }
    
    .toast-notification {
        border: 2px solid;
    }
}

/* Professional Pricing Box */
.pricing-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    max-width: 340px;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.pricing-header {
    background: linear-gradient(135deg, #1a4f7a 0%, #2d6a9f 100%);
    padding: 16px 24px;
}
.pricing-label {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
.pricing-body {
    padding: 32px 28px;
}
.pricing-amount {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 8px;
}
.price-currency {
    font-size: 1.8rem;
    font-weight: 600;
    color: #28a745;
    margin-top: 8px;
    margin-right: 4px;
}
.price-value {
    font-size: 4.5rem;
    font-weight: 700;
    color: #28a745;
    line-height: 1;
}
.pricing-period {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 24px;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
}
.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    font-size: 0.95rem;
}
.pricing-features li:last-child {
    border-bottom: none;
}
.pricing-features i {
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}
.pricing-security {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Polished Admin Tabs */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    gap: 5px;
}
.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
    font-weight: 500;
    color: #6c757d;
    background: #f8f9fa;
    transition: all 0.2s ease;
}
.nav-tabs .nav-link:hover {
    background: #e9ecef;
    color: #1a4f7a;
}
.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #1a4f7a 0%, #2d6a9f 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 79, 122, 0.3);
}

/* ---------------------------------------------------------------------------
   Touch targets (v5.158.757)
   ---------------------------------------------------------------------------
   Footer and utility links rendered at their text height -- 14-17 elements per
   page measured under 32px tall. Guidance puts a comfortable touch target at
   44px, and a lot of this audience reads on a phone. Padding is added only at
   phone widths so the desktop layout is untouched; the link keeps its own
   hit area rather than relying on the list item.
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .footer-links a,
    .footer-section a,
    .navbar-main .nav-link,
    .auth-body a,
    .footer-bottom a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    /* The list already spaces rows; without this the taller links double up. */
    .footer-links li {
        margin-bottom: 0;
    }

    /* Inline links inside running prose keep their natural height -- growing
       them would break the line box. */
    .auth-body p a,
    .footer-section p a {
        display: inline;
        min-height: 0;
    }
}
