/* User Profile Styles */
/* Gallery Hover Effects */
.gallery-item:hover .position-absolute {
    opacity: 1 !important;
}

/* Profile Card Hover Effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Info Cards Hover Effects */
.bg-light {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.bg-light:hover {
    background-color: #f8f9fa !important;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* User Icon Animation */
.bi-person-circle {
    transition: color 0.3s ease;
}

.bi-person-circle:hover {
    color: #0d6efd !important;
}

/* Avatar Styles */
.rounded-circle {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rounded-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Profile Image Card Styles - Custom για profile images */
.profile-image-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Profile Info Body - Specific styling */
.profile-info-body {
    padding: 1.5rem;
}

.profile-member-since-inline {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.profile-publications-section {
    padding-top: 0.5rem;
}

.profile-publications-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Profile Bio Content - Specific styling */
.profile-bio-content {
    background: #fff;
}

.profile-image-top {
    width: 100%;
    flex-shrink: 0;
}

.profile-image-body {
    flex: 1 1 auto;
    background: #fff;
}

.profile-image-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #212529;
}

.profile-image-text {
    margin-bottom: 0.75rem;
    color: #6c757d;
}

/* Video Profile Card Styles */
.video-profile-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.video-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.video-thumbnail {
    width: 100%;
    flex-shrink: 0;
    height: 200px;
    object-fit: cover;
}

.video-profile-body {
    flex: 1 1 auto;
    background: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100px;
}

.video-profile-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
    flex-grow: 1;
}

.video-profile-title a {
    text-decoration: none;
    color: inherit;
}

.video-profile-title a:hover {
    text-decoration: underline;
    color: #0d6efd;
}

/* Tab Navigation Enhancement */
.nav-tabs .nav-link {
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

/* Mobile Gallery Fixes */
@media (max-width: 576px) {
    /* Profile member since inline - stack σε mobile */
    .profile-member-since-inline {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }

    .profile-member-since-inline i {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem;
    }

    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .card-header h4 {
        font-size: 1.1rem;
    }

    /* Profile info cards σε 2 στήλες στο mobile */
    #info .col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* Μικρότερο padding για info cards στο mobile */
    #info .d-flex.p-3 {
        padding: 0.75rem !important;
    }

    #info .d-flex h6.small {
        font-size: 0.75rem !important;
    }

    #info .d-flex i {
        font-size: 1.2rem !important;
    }

    .gallery-item .profile-image-top {
        height: 150px !important;
    }

    .gallery-item {
        margin-bottom: 0.5rem;
    }

    .tab-content .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    /* Εξασφάλιση ότι οι εικόνες είναι ορατές στο mobile */
    .gallery-item,
    .gallery-item .profile-image-card,
    .gallery-item .profile-image-top {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Mobile specific για profile image cards */
    .profile-image-card {
        border-radius: 0.25rem;
        margin-bottom: 0.5rem;
    }

    .profile-image-body {
        padding: 0.75rem !important;
    }

    .profile-image-title {
        font-size: 0.875rem;
    }

    /* Mobile specific για video cards */
    .video-profile-card {
        min-height: 350px;
        margin-bottom: 1rem;
    }

    .video-thumbnail {
        height: 200px !important;
        object-fit: cover;
    }

    .video-profile-body {
        padding: 1rem !important;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .video-profile-title {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    /* Better spacing for video info */
    .video-profile-card .d-flex {
        margin-top: auto;
    }

    /* Επιπλέον εξασφαλίσεις για mobile */
    #images-content {
        display: block !important;
        visibility: visible !important;
    }

    #images-content .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    #images-content .col-6 {
        display: block !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Γενικές εξασφαλίσεις για gallery images - ΟΛΕΣ οι συσκευές */
#images-content {
    display: block !important;
    visibility: visible !important;
}

#images-content .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

#images-content .col-6,
#images-content .col-sm-6,
#images-content .col-md-4,
#images-content .col-lg-3 {
    display: block !important;
    visibility: visible !important;
}

.gallery-item,
.gallery-item .profile-image-card,
.gallery-item .profile-image-top {
    display: block !important;
    visibility: visible !important;
}

/* Bootstrap tabs - ensuring proper functionality */
.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
}

/* Force visibility for active tabs */
.tab-pane.active.show {
    display: block !important;
    opacity: 1 !important;
}

.lightbox-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.8);
    color: white;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* User Profile Bio Section Styles */
.bio-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.bio-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}

.bio-display p {
    line-height: 1.6;
    font-size: 1rem;
}

#bioTextarea {
    resize: vertical;
    min-height: 100px;
    font-size: 0.95rem;
    line-height: 1.6;
}

#bioTextarea:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.bio-char-counter {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Edit button hover effect */
#editBioBtn {
    transition: all 0.2s ease;
}

#editBioBtn:hover {
    transform: translateY(-1px);
}

/* Success alert animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bio-success-alert {
    animation: slideDown 0.3s ease;
}
