/* ITLearning LMS Frontend Styles */

:root {
    --primary-color: #003366;
    --secondary-color: #0052A3;
    --accent-color: #F4A460;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 4px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Container */
.itl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.itl-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.itl-header h1 {
    font-size: 28px;
    margin: 0;
}

.itl-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

/* Navigation */
.itl-nav {
    background-color: var(--secondary-color);
    padding: 0;
    margin-bottom: 30px;
}

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

.itl-nav li {
    margin: 0;
}

.itl-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    transition: background-color 0.3s ease;
}

.itl-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.itl-nav a.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Forms */
.itl-form {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.itl-form-group {
    margin-bottom: 20px;
}

.itl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.itl-form-group input,
.itl-form-group textarea,
.itl-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.itl-form-group input:focus,
.itl-form-group textarea:focus,
.itl-form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 163, 0.1);
}

.itl-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.itl-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.itl-btn-primary:hover {
    background-color: #002244;
}

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

.itl-btn-secondary:hover {
    background-color: #003d7a;
}

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

.itl-btn-success:hover {
    background-color: #218838;
}

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

.itl-btn-danger:hover {
    background-color: #c82333;
}

.itl-btn-block {
    display: block;
    width: 100%;
}

/* Cards */
.itl-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.itl-card-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.itl-card-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.itl-card-body {
    padding: 0;
}

.itl-card-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

/* Course Grid */
.itl-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.itl-course-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.itl-course-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    min-height: 100px;
    display: flex;
    align-items: center;
}

.itl-course-card-header h4 {
    margin: 0;
    font-size: 18px;
}

.itl-course-card-body {
    padding: 20px;
}

.itl-course-card-body p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.itl-course-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Progress Bar */
.itl-progress {
    background-color: #eee;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 10px 0;
}

.itl-progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Alerts */
.itl-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.itl-alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.itl-alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.itl-alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.itl-alert-info {
    background-color: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
}

/* Modules */
.itl-modules-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.itl-module-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.itl-module-item:last-child {
    border-bottom: none;
}

.itl-module-item:hover {
    background-color: #f9f9f9;
}

.itl-module-item h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.itl-module-item p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

/* eBook Content */
.itl-ebook-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    line-height: 1.8;
}

.itl-ebook-content h2,
.itl-ebook-content h3,
.itl-ebook-content h4 {
    color: var(--primary-color);
    margin: 20px 0 10px 0;
}

.itl-ebook-content p {
    margin: 0 0 15px 0;
}

.itl-ebook-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* YouTube Video */
.itl-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.itl-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Assessment */
.itl-assessment {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.itl-question {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.itl-question:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.itl-question-text {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.itl-question-options {
    margin-left: 20px;
}

.itl-question-option {
    margin-bottom: 10px;
}

.itl-question-option input[type="radio"],
.itl-question-option input[type="checkbox"] {
    margin-right: 10px;
}

.itl-question-option label {
    display: inline;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Signature Pad */
.itl-signature-pad {
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    margin: 20px 0;
    background: white;
}

/* Responsive */
@media (max-width: 768px) {
    .itl-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .itl-nav ul {
        flex-direction: column;
    }
    
    .itl-form {
        padding: 20px;
    }
    
    .itl-ebook-content {
        padding: 20px;
    }
}

/* Loading Spinner */
.itl-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Utility Classes */
.itl-mt-20 { margin-top: 20px; }
.itl-mb-20 { margin-bottom: 20px; }
.itl-p-20 { padding: 20px; }
.itl-text-center { text-align: center; }
.itl-text-right { text-align: right; }
.itl-text-muted { color: #999; }

/* Login Form Specific */
.itl-login-wrapper {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.itl-login-wrapper h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 24px;
}

.itl-divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.itl-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
}

.itl-divider span {
    background: white;
    padding: 0 10px;
    position: relative;
    z-index: 1;
    color: #666;
    font-size: 12px;
}

.itl-toggle-link {
    text-align: center;
    margin-top: 20px;
}

.itl-toggle-link a {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.itl-toggle-link a:hover {
    text-decoration: underline;
}

.itl-hidden {
    display: none !important;
}

.itl-alert {
    display: none;
}

.itl-alert.show {
    display: block;
}
.itl-d-none { display: none; }
.itl-d-block { display: block; }
.itl-d-flex { display: flex; }
.itl-flex-between { display: flex; justify-content: space-between; align-items: center; }
