/* Youth Employability Zone (YEZ) Platform - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Forms */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Job Cards */
.job-card {
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
}

.job-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.job-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.job-meta i {
    margin-right: 0.25rem;
}

/* Job Description (rich text) */
.job-description {
    font-size: 1rem;
    line-height: 1.7;
}

.job-description h1,
.job-description h2,
.job-description h3,
.job-description h4,
.job-description h5,
.job-description h6 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.job-description p {
    margin-bottom: 1rem;
}

.job-description ul,
.job-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.job-description ul {
    list-style: disc outside;
}

.job-description ol {
    list-style: decimal outside;
}

.job-description ul ul {
    list-style: circle outside;
}

.job-description li {
    margin-bottom: 0.5rem;
}

.job-description a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Job Hero */
.job-hero {
    background: linear-gradient(180deg, rgba(13,110,253,0.05), rgba(13,110,253,0));
}

.job-hero-avatar {
    width: 72px;
    height: 72px;
    background: var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 0.25rem 0.5rem rgba(13,110,253,0.25);
    font-size: 28px;
}

.chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid transparent;
}

.chip-primary {
    color: var(--primary-color);
    background: rgba(13,110,253,0.08);
    border-color: rgba(13,110,253,0.2);
}

.chip-warning {
    color: #b58100;
    background: rgba(255,193,7,0.15);
    border-color: rgba(255,193,7,0.4);
}

/* Course Cards */
.course-card {
    border-left: 4px solid var(--success-color);
}

.course-card .card-title {
    color: var(--success-color);
    font-weight: 600;
}

.course-level {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.course-level.beginner {
    background-color: #d1ecf1;
    color: #0c5460;
}

.course-level.intermediate {
    background-color: #fff3cd;
    color: #856404;
}

.course-level.expert {
    background-color: #f8d7da;
    color: #721c24;
}

/* Marketplace Cards */
.marketplace-card {
    border-left: 4px solid var(--warning-color);
}

.marketplace-card .card-title {
    color: var(--warning-color);
    font-weight: 600;
}

.price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--success-color);
}

/* Profile */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
}

/* Dashboard */
.dashboard-stats {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Forum */
.forum-topic {
    border-left: 4px solid var(--info-color);
    margin-bottom: 1rem;
}

.forum-post {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.forum-post-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.forum-author {
    font-weight: 600;
    color: var(--primary-color);
}

.forum-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Notifications */
.notification-item {
    border-left: 4px solid var(--info-color);
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: var(--light-color);
    border-radius: 0.375rem;
}

.notification-item.unread {
    background-color: #e7f3ff;
    border-left-color: var(--primary-color);
}

/* Admin Panel */
.admin-sidebar {
    position: sticky;
    top: 0.2rem;
    height: calc(100vh - 2rem);
    max-height: calc(100vh - 2rem);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .card-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0;
    min-height: 0;
}

/* Custom scrollbar for admin sidebar - show on hover */
.admin-sidebar .card-body::-webkit-scrollbar {
    width: 0px;
    transition: width 0.3s ease;
}

.admin-sidebar .card-body:hover::-webkit-scrollbar {
    width: 20px;
}

.admin-sidebar .card-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.admin-sidebar .card-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.admin-sidebar .card-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbar - show on hover */
.admin-sidebar .card-body {
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
    transition: scrollbar-width 0.3s ease;
}

.admin-sidebar .card-body:hover {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

.admin-sidebar .nav {
    padding-bottom: 2rem;
}

.admin-sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.15s ease-in-out;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(13,110,253,0.12);
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.15s ease-in-out;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

/* Search */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-start-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-start-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-start-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.border-start-info {
    border-left: 4px solid var(--info-color) !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Global Layout: reduce horizontal padding site-wide */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Admin dashboard full-bleed layout */
.admin-dashboard {
    padding: 0 .40rem;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
}
