/* assets/css/style.css
   CosmoArk Main Stylesheet
   Professional networking platform styling
*/

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary-color: #0a66c2;
    --primary-dark: #004182;
    --primary-light: #e7f1ff;
    --secondary-color: #70b5f9;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #191919;
    --light-color: #f3f2ef;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ============================================
   Global Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--gray-600) !important; }

/* ============================================
   Navigation
   ============================================ */
.navbar-cosmo {
    background: #ffffff;
    box-shadow: var(--box-shadow);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    color: var(--gray-700) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color) !important;
}

.nav-link i {
    font-size: 1.25rem;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary-cosmo {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary-cosmo:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-hover);
}

.btn-outline-primary-cosmo {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 8px 20px;
    border-radius: 24px;
    transition: var(--transition);
}

.btn-outline-primary-cosmo:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-icon {
    padding: 8px 12px;
    border-radius: 50%;
}

/* ============================================
   Cards
   ============================================ */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: white;
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.sidebar-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.post-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--box-shadow-hover);
}

/* ============================================
   Profile Sections
   ============================================ */
.profile-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    margin-top: -60px;
    margin-bottom: 1rem;
}

.profile-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.blue-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ============================================
   Forms
   ============================================ */
.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-300);
    padding: 0.625rem 0.75rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.input-group-text {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
}

/* ============================================
   Feed & Posts
   ============================================ */
.comment-box {
    background: var(--gray-100);
    border-radius: 24px;
    padding: 10px 16px;
    border: none;
    width: 100%;
    resize: none;
}

.comment-box:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.post-media {
    border-radius: var(--border-radius);
    max-width: 100%;
    margin-top: 1rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.post-action-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--gray-600);
}

.post-action-btn:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.like-btn.liked {
    color: var(--primary-color);
}

/* ============================================
   Comments Section
   ============================================ */
.comment-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.comment-item:hover {
    background-color: var(--gray-100);
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.comment-text {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.comment-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   Connection Suggestions
   ============================================ */
.suggestion-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.suggestion-card:hover {
    background-color: var(--gray-100);
}

.suggestion-info {
    flex: 1;
}

.suggestion-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.suggestion-title {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* ============================================
   Company Page
   ============================================ */
.company-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.company-logo {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    object-fit: contain;
    background: white;
    padding: 10px;
    margin-top: -50px;
    margin-bottom: 1rem;
    border: 3px solid white;
    box-shadow: var(--box-shadow);
}

.job-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.job-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--box-shadow-hover);
}

.job-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.job-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* ============================================
   Admin Dashboard
   ============================================ */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ============================================
   Loading & Animations
   ============================================ */
.loader {
    border: 3px solid var(--gray-200);
    border-top: 3px 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); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    min-width: 300px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .profile-cover {
        height: 120px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        margin-top: -40px;
    }
    
    .company-cover {
        height: 120px;
    }
    
    .company-logo {
        width: 70px;
        height: 70px;
        margin-top: -35px;
    }
    
    .post-card {
        padding: 0.75rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .btn-primary-cosmo {
        padding: 6px 16px;
        font-size: 0.875rem;
    }
    
    .post-action-btn {
        padding: 0.375rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar-cosmo, .sidebar-card, .post-actions, .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    body {
        background: white;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.cursor-pointer {
    cursor: pointer;
}

.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;
}

.z-index-1 { z-index: 1; }
.z-index-2 { z-index: 2; }
.z-index-3 { z-index: 3; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.bg-primary-light { background-color: var(--primary-light); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-200 { background-color: var(--gray-200); }

.rounded-12 { border-radius: 12px; }
.rounded-16 { border-radius: 16px; }
.rounded-20 { border-radius: 20px; }