/* static/css/team/team_detail.css */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Hero Section */
.team-detail-hero {
    background: linear-gradient(135deg, #7b8ceb 0%, #8a5db8 100%);
    padding: 120px 0 40px 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.team-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.breadcrumb-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.breadcrumb {
    background: none;
    margin-bottom: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255, 255, 255, 0.6);
    padding-right: 0.5rem;
    font-weight: 600;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Main Content */
.team-detail-content {
    padding: 60px 0 80px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 70vh;
}

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

.team-profile {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.team-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* Profile Header */
.profile-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px;
    border-bottom: 2px solid #e9ecef;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.profile-photo-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 6px solid white;
    color: #6c757d;
    font-size: 5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profile-name {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.profile-title {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-degree {
    font-size: 1.1rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 20px;
}

.profile-stats {
    margin-bottom: 25px;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    color: #667eea;
    font-weight: 600;
    border: 2px solid #667eea;
    margin-right: 15px;
}

.profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.profile-actions .btn {
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    font-size: 0.95rem;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4c93);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    color: #667eea;
    border: 2px solid #667eea;
    background: white;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Profile Content */
.profile-content {
    padding: 40px;
}

.profile-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.profile-section h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
    padding-left: 20px;
    position: relative;
}

.profile-section h3::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 3px;
}

.section-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    background: #fdfdfd;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-content p {
    margin-bottom: 1.2rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Publications List */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.publication-item {
    background: #fdfdfd;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.publication-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.publication-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.publication-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.publication-title a:hover {
    color: #667eea;
}

.publication-meta {
    margin-bottom: 15px;
}

.publication-date {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.publication-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.publication-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.publication-actions .btn {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 5px 12px;
}

.btn-outline-success {
    color: #28a745;
    border: 1px solid #28a745;
    background: transparent;
}

.btn-outline-success:hover {
    background: #28a745;
    color: white;
    transform: translateY(-1px);
}

/* Sidebar */
.profile-sidebar {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    height: fit-content;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h4 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateX(5px);
}

.social-link.linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
    border: 1px solid rgba(0, 119, 181, 0.2);
}

.social-link.linkedin:hover {
    background: #0077b5;
    color: white;
}

.social-link.researchgate {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.social-link.researchgate:hover {
    background: #00d4aa;
    color: white;
}

.social-link.facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
    border: 1px solid rgba(24, 119, 242, 0.2);
}

.social-link.facebook:hover {
    background: #1877f2;
    color: white;
}

.social-link.instagram {
    background: rgba(225, 48, 108, 0.1);
    color: #e1306c;
    border: 1px solid rgba(225, 48, 108, 0.2);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stats-list .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-right: 0;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bootstrap Row/Col Fixes */
.row {
    margin-left: -15px;
    margin-right: -15px;
}

.row > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Bootstrap Icons Enhancement */
.bi {
    font-size: inherit;
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .profile-header {
        padding: 35px;
    }
    
    .profile-content {
        padding: 35px;
    }
    
    .profile-name {
        font-size: 2.5rem;
    }
}

@media (max-width: 1280px) {
    .profile-header {
        padding: 40px;
    }
}

@media (max-width: 992px) {
    .profile-header {
        padding: 30px;
    }
    
    .profile-content {
        padding: 30px;
    }
    
    .profile-name {
        font-size: 2.25rem;
    }
    
    .profile-photo,
    .profile-photo-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .profile-photo-placeholder {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .team-detail-hero {
        padding: 100px 0 30px 0;
    }
    
    .profile-header {
        padding: 25px;
        text-align: center;
    }
    
    .profile-content {
        padding: 25px;
    }
    
    .profile-name {
        font-size: 2rem;
        text-align: center;
    }
    
    .profile-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .profile-degree {
        text-align: center;
    }
    
    .profile-stats {
        text-align: center;
    }
    
    .profile-actions {
        justify-content: center;
        gap: 10px;
    }
    
    .profile-actions .btn {
        min-width: 120px;
        padding: 10px 20px;
    }
    
    .profile-photo,
    .profile-photo-placeholder {
        width: 120px;
        height: 120px;
        margin-bottom: 20px;
    }
    
    .profile-photo-placeholder {
        font-size: 3rem;
    }
    
    .profile-sidebar {
        margin-top: 30px;
        padding: 25px;
    }
    
    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .social-link {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .team-detail-content {
        padding: 40px 0 60px 0;
    }
    
    .team-profile {
        margin: 0 15px;
        border-radius: 15px;
    }
    
    .profile-header {
        padding: 20px;
    }
    
    .profile-content {
        padding: 20px;
    }
    
    .profile-name {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .profile-title {
        font-size: 1.1rem;
    }
    
    .profile-section h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .section-content {
        padding: 20px;
        font-size: 1rem;
    }
    
    .publication-item {
        padding: 20px;
    }
    
    .publication-title {
        font-size: 1.1rem;
    }
    
    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .profile-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .profile-sidebar {
        padding: 20px;
    }
    
    .sidebar-section h4 {
        font-size: 1.1rem;
    }
    
    .social-links {
        flex-direction: column;
    }
    
    .social-link {
        min-width: auto;
    }
    
    .publication-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .publication-actions .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .breadcrumb-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .profile-name {
        font-size: 1.5rem;
    }
    
    .profile-title {
        font-size: 1rem;
    }
    
    .profile-photo,
    .profile-photo-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .profile-photo-placeholder {
        font-size: 2.5rem;
    }
    
    .section-content {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .publication-item {
        padding: 15px;
    }
    
    .profile-stats .stat-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Focus States for Accessibility */
.btn:focus,
.social-link:focus,
.publication-title a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .team-detail-hero,
    .profile-actions,
    .social-links,
    .publication-actions {
        display: none;
    }
    
    .team-profile {
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 0;
    }
    
    .profile-header {
        background: white;
        border-bottom: 2px solid #ddd;
    }
    
    .profile-name {
        font-size: 1.8rem;
        color: #000;
    }
    
    .profile-title {
        color: #000;
    }
    
    .profile-section h3 {
        color: #000;
        page-break-after: avoid;
    }
    
    .profile-section h3::before {
        display: none;
    }
    
    .section-content {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    .publication-item {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .profile-sidebar {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    
}

/* Academic Profiles Section */
.academic-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.academic-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.academic-link:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
}

.academic-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Specific styling for each academic platform */
.academic-link.orcid {
    background-color: rgba(166, 206, 57, 0.1);
    border-color: rgba(166, 206, 57, 0.3);
}

.academic-link.orcid:hover {
    background-color: rgba(166, 206, 57, 0.2);
}

.academic-link.scopus {
    background-color: rgba(243, 110, 0, 0.1);
    border-color: rgba(243, 110, 0, 0.3);
}

.academic-link.scopus:hover {
    background-color: rgba(243, 110, 0, 0.2);
}

.academic-link.wos {
    background-color: rgba(30, 58, 138, 0.1);
    border-color: rgba(30, 58, 138, 0.3);
}

.academic-link.wos:hover {
    background-color: rgba(30, 58, 138, 0.2);
}

/* Make sure Web of Science icon is visible */
.academic-link.wos img {
    filter: invert(1);
    background-color: white;
    border-radius: 3px;
    padding: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .academic-link {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .academic-link img {
        width: 18px;
        height: 18px;
    }
}

/* Contact Information Section */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.contact-item i {
    color: #6c757d;
    font-size: 18px;
    width: 20px;
    flex-shrink: 0;
}

.contact-item a {
    color: #007bff;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Specific styling for email and phone icons */
.contact-item .bi-envelope {
    color: #000000;
}

.contact-item .bi-telephone {
    color: #000000;
}

/* Responsive design */
@media (max-width: 768px) {
    .contact-item {
        font-size: 14px;
    }
    
    .contact-item i {
        font-size: 16px;
        width: 18px;
    }
}


.qr-section {
    text-align: center;
}

.qr-display {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.qr-display.has-qr {
    border-color: #667eea;
    background: #f8f9fa;
}

.qr-loading,
.qr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-info {
    margin-bottom: 15px;
}

.qr-url-text {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.qr-actions {
    display: flex;
    justify-content: center;
}

.qr-actions .btn-sm {
    font-size: 0.85rem;
    padding: 8px 16px;
    min-width: 140px;
}

.qr-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* QR Code canvas styling */
#qrCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 10px;
}

/* Spinning animation for loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments for QR section */
@media (max-width: 768px) {
    .qr-display {
        padding: 15px;
        min-height: 180px;
    }
    
    .qr-actions .btn-sm {
        width: 100%;
    }
    
    #qrCanvas {
        padding: 8px;
    }
}

@media (max-width: 576px) {
    .qr-display {
        padding: 12px;
        min-height: 160px;
    }
    
    .qr-url-text {
        font-size: 0.8rem;
    }
    
    #qrCanvas {
        padding: 6px;
    }
}

/* Ensure QR section integrates well with existing sidebar styling */
.sidebar-section .qr-section {
    margin-top: 0;
}

/* Enhanced button styling for QR download */
.qr-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.qr-actions .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}
