/* Custom Styles for SARS AI Training Website */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
}

.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.hero-video-wrapper {
    max-width: 700px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Feature Icons */
.feature-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Day Icon Large */
.day-icon-large {
    font-size: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: -30px;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
}

/* Schedule Table */
.schedule-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.schedule-table .table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.time-col {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
}

/* Quiz Cards */
.quiz-question {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.quiz-option {
    padding: 10px 15px;
    margin: 5px 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.quiz-option.correct {
    background: #d4edda;
    border-color: var(--success-color);
}

/* Case Study Cards */
.case-study-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.case-study-card:hover {
    border-left-width: 8px;
}

/* Assessment Form */
.assessment-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rating-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rating-option {
    width: 40px;
    height: 40px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-option:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Progress Bar */
.progress-custom {
    height: 25px;
    border-radius: 15px;
}

.progress-custom .progress-bar {
    font-weight: 600;
    line-height: 25px;
}

/* Badges */
.badge-custom {
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Accordion Styles */
.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

/* Navigation Active State */
.navbar-nav .nav-link.active {
    font-weight: 600;
    border-bottom: 3px solid white;
}

/* Footer Links */
footer a:hover {
    color: white !important;
    text-decoration: underline !important;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }

    .hero-video-wrapper {
        max-width: 100%;
    }
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        page-break-inside: avoid;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Table Styles */
.table-custom {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table-custom thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

/* List Group Custom */
.list-group-custom .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.list-group-custom .list-group-item:hover {
    border-left-color: var(--primary-color);
    background-color: #f8f9fa;
}

/* Alert Styles */
.alert-custom {
    border-left: 4px solid;
    border-radius: 0 5px 5px 0;
}

/* Loading Spinner */
.spinner-custom {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Tooltip Custom */
.tooltip-inner {
    background-color: var(--dark-color);
    padding: 10px 15px;
}

/* Modal Styles */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Code Block Styles */
pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Section Dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 40px 0;
}

/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050;
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.chatbot-toggle:hover {
    background: #0b5ed7;
}

.chatbot-panel {
    width: 320px;
    max-width: calc(100vw - 30px);
    height: 420px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
}

.chatbot-panel.open {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-messages {
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    overflow-y: auto;
}

.chatbot-message {
    margin-bottom: 10px;
    display: flex;
}

.chatbot-message span {
    padding: 8px 12px;
    border-radius: 14px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 0.92rem;
}

.chatbot-message.bot span {
    background: white;
    color: #212529;
    border: 1px solid #e9ecef;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.user span {
    background: var(--primary-color);
    color: white;
}

.chatbot-input {
    border-top: 1px solid #dee2e6;
    padding: 10px;
    background: white;
}

.chatbot-input form {
    display: flex;
    gap: 8px;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 10px;
}

.chatbot-input button {
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
}

@media (max-width: 576px) {
    .chatbot-widget {
        right: 12px;
        bottom: 12px;
    }

    .chatbot-panel {
        width: calc(100vw - 24px);
        height: 60vh;
    }
}
