/* profile2.css - Modern Styles for Employee Profile Revamp - COMSATS Blue Color Scheme */

/* Typography & Layout */
body {
    background-color: #f8fafc !important; /* Soft light slate background */
}

.profile-container {
    margin-top: 10px;
    margin-bottom: 40px;
}

/* Sidebar Card Style */
.profile-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.profile-sidebar-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}

.profile-img-container {
    position: relative;
    width: 140px;
    height: 170px;
    margin: 0 auto 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 3px solid #ffffff;
    outline: 1px solid #cbd5e1;
    background-color: #f1f5f9;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-img-container:hover .profile-img {
    transform: scale(1.05);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003366; /* COMSATS Blue */
    margin-bottom: 4px;
    text-align: center;
}

.profile-designation {
    font-size: 1rem;
    color: #334155;
    font-weight: 600;
    text-align: center;
}

.profile-dept {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    margin-bottom: 16px;
}

/* Badge Styling */
.badge-hec-approved {
    background-color: #eff6ff; /* Light Blue */
    color: #003366; /* COMSATS Blue */
    border: 1px solid #dbeafe;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto;
    width: fit-content;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.badge-hec-approved i {
    font-size: 0.85rem;
}

.employment-status-badge {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    display: block;
    text-align: center;
    margin-top: 10px;
}

/* Contact Info list */
.contact-info-list {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    width: 28px;
    height: 28px;
    background-color: #f1f5f9;
    color: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.contact-info-item:hover .contact-info-icon {
    background-color: #eff6ff;
    color: #003366;
}

.contact-info-text {
    color: #475569;
    word-break: break-all;
    line-height: 1.4;
}

.contact-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
}

.btn-send-msg {
    background-color: #003366;
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 51, 102, 0.2);
}

.btn-send-msg:hover {
    background-color: #002244;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 51, 102, 0.3);
}

/* Content Area Cards */
.profile-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.profile-content-card h2, 
.profile-content-card h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-left: 4px solid #003366; /* COMSATS Blue */
    padding-left: 12px;
}

/* Biography / Description Section */
.bio-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.bio-content {
    max-height: 150px;
    overflow: hidden;
    color: #334155;
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: justify;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bio-content.expanded {
    max-height: 2000px; /* Large enough height to fit content */
}

.bio-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 90%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bio-content.expanded + .bio-fade {
    opacity: 0;
    visibility: hidden;
}

.btn-bio-toggle {
    background: none;
    border: none;
    color: #003366;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}

.btn-bio-toggle:hover {
    background-color: #eff6ff;
}

.btn-bio-toggle i {
    transition: transform 0.3s ease;
}

.btn-bio-toggle.expanded i {
    transform: rotate(180deg);
}

/* Timeline styles (Qualifications & Experience) */
.custom-timeline {
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
    border-left: 2px solid #e2e8f0;
}

.custom-timeline.single-item {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.custom-timeline.single-item .timeline-marker {
    display: none !important;
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -41px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 4px solid #003366;
    box-shadow: 0 0 0 4px #eff6ff;
    z-index: 2;
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-marker {
    background-color: #003366;
    transform: scale(1.1);
}

.timeline-content {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-content {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03) !important;
    border-color: #cbd5e1;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.timeline-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
}

.timeline-subtitle span {
    display: inline !important;
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #003366;
    background-color: #eff6ff;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Edit / Delete action buttons in items */
.item-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.item-actions:empty {
    display: none !important;
}

.btn-item-edit, .btn-item-delete {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-item-edit {
    background-color: #f1f5f9;
    color: #475569;
}
.btn-item-edit:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.btn-item-delete {
    background-color: #eff6ff;
    color: #003366;
    border: none;
    cursor: pointer;
}
.btn-item-delete:hover {
    background-color: #dbeafe;
    color: #002244;
}

/* Table styles for GridViews (styled as cards) */
.modern-grid {
    border-collapse: separate !important;
    border-spacing: 0 12px !important;
    width: 100% !important;
}

.modern-grid tbody tr {
    background-color: #f8fafc !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.modern-grid tbody tr:hover {
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}

.modern-grid td {
    padding: 14px 16px !important;
    border: 1px solid #f1f5f9 !important;
    border-style: solid none !important; /* Only top and bottom borders */
    font-size: 0.9rem;
    color: #334155;
    vertical-align: top;
    line-height: 1.5;
}

/* First and last cell rounded corners for the spacing layout */
.modern-grid td:first-child {
    border-left: 1px solid #f1f5f9 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    font-weight: 700;
    color: #003366;
    width: 40px;
    text-align: center;
    background-color: #eff6ff;
}

.modern-grid td:last-child {
    border-right: 1px solid #f1f5f9 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Links inside tables (Abstract, DOI, External) styled as badges */
.badge-pub-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    padding: 4px 8px;
    border-radius: 12px;
    text-decoration: none !important;
    margin-right: 6px;
    margin-top: 6px;
    transition: all 0.2s ease;
}

.badge-pub-link:hover {
    background-color: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

/* Collapsible publication card elements */
.pub-cat-container {
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.pub-cat-header {
    background: #f8fafc;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.pub-cat-badge {
    background-color: #003366;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.pub-cat-body {
    padding: 10px 20px;
}

.btn-pub-expand {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    border-top: 1px solid #f1f5f9;
    color: #003366;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-pub-expand:hover {
    background-color: #eff6ff;
}

.btn-pub-expand i {
    transition: transform 0.2s ease;
}

.btn-pub-expand.expanded i {
    transform: rotate(180deg);
}

/* Alert boxes */
.cui-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.cui-alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.cui-alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
}

/* Timeline Span Block Display to Prevent Gaps */
.custom-timeline span {
    display: block;
}

.custom-timeline .timeline-subtitle span {
    display: inline !important;
}

.custom-timeline br {
    display: none !important;
}
