/* Enhanced Profile Styles */
.profile-wrapper {

    padding-bottom: 2rem;

}



.profile-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.profile-header {
    padding-top: 0px;
    padding-bottom: 2rem;
    color: #fff;
}


.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.photo-edit-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-location {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    float: left;
}

.profile-friends {
    margin-left: 10px;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    float: left;
}

.profile-stats {
    margin-top: 2rem;
}

.stat-box {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 8px;
}

.profile_elements_top {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 5px;
}

.stat-box h5 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.stat-box small {
    opacity: 0.9;
}

.about-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.about-item:last-child {
    border-bottom: none;
}

.friend-thumbnail img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.profile-tabs .nav-link {
    color: #666;
    padding: 1rem 1.5rem;
    border: none;
    position: relative;
}

.profile-tabs .nav-link.active {
    color: #EE0000 !important;
    background: none;
    font-weight: 500;
}

.profile-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #EE0000 !important;
}

.post-input {
    border-radius: 20px;
    padding: 0.75rem 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .profile-cover-wrapper {
        height: 450px;
    }
    .profile-header {
        padding-top: 0px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }
    .card {

    }
    .col-lg-3 {

    }

    .col-lg-9 {
        padding-right: 0px !important;
    }

    .navbar-toggler {
        margin-right: 40px;
    }
}

.about-item {
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.about-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.about-item i {
    width: 20px;
    text-align: center;
}

.about-item .small {
    margin-left: 28px; /* align with text after icon */
}

.social-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.profile-stat-item {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
}

.stat-value {
    font-weight: 600;
    margin-right: 0.5rem;
    color: #fff;
}

.stat-label {
    color: inherit;
}

@media (max-width: 768px) {
    .social-stats {
        gap: 1rem;
    }

    .profile-stat-item {
        font-size: 0.85rem;
    }
}

.view-stats-container {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
    color: #333;
}

.section-header i {
    color: #E31837;
    font-size: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(227, 24, 55, 0.1);
    border-radius: 12px;
    margin-right: 1rem;
}

.stat-icon i {
    font-size: 1.25rem;
    color: #E31837;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.viewers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.viewer-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.viewer-item:hover {
    background: #f0f2f5;
}

.viewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.viewer-info {
    flex: 1;
}

.viewer-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.viewer-time {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.preview-block a{
    text-decoration: none !important;
    color: var(--primary-red) !important;
}

.preview-block .text-muted {
    color: #000 !important;
}

.preview-block {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    max-width: 100%;
}

.preview-block iframe {
    border: none;
    border-radius: 8px;
    width: 100%;
    height: 315px;
}

.preview-details {
    margin-top: 10px;
}

.preview-details h3 {
    font-size: 18px;
    margin: 0;
}

.preview-details p {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.preview-details a {
    font-size: 12px;
    color: #007bff;
    text-decoration: none !important;
}

.preview-block img {
    max-width:inherit !important;
}

.preview-image {
    height: 250px; /* Fixed height or use dynamic */
    background-size: contain; /* Ensures the entire image is visible */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents tiling */
    border-radius: 8px; /* Optional: Add rounded corners */
    margin-bottom: 10px; /* Spacing below the image */
}


#dismissPreview {
    position: absolute;
    right: 21px;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

#dismissPreview:hover {
    background-color: #c82333;
}
.no-posts-message {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 20px;
}




.profile-info {
    padding: 1.5rem;
    width: 100%;
}

.profile-info .d-flex {
    display: flex !important;
    justify-content: space-between;
    align-items: center !important;
    gap: 1.5rem;
    width: 100%;
}

.profile-photo-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.photo-edit-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-basic-info {
    flex-grow: 1;
    min-width: 0;
}

.profile-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.profile-username {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none !important;
}

.profile-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

.profile-cover-wrapper {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 200px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.9), rgba(156, 29, 35, 0.7)), url('/images/pattern1full.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: var(--primary-red);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    #navbarMain {
        z-index: 1;
        background-color: #FFF;
    }

    .profile-info .d-flex {
        flex-direction: column;
        text-align: center;
    }

    .profile-photo-wrapper {
        margin: 0 auto 1.5rem;
        width: 186px;
        height: 186px;
    }

    .profile-basic-info {

    }

    .profile-name {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        margin-top: -17px !important;
    }

    .profile-username {
        font-size: 1rem;
    }

    .profile-actions {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }


    .profile-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        padding: 1rem;
    }

    .profile-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .profile-tabs .nav-link {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }

    .profile-tabs .nav-link i {
        font-size: 1.2rem;
    }

}

@media (max-width: 480px) {
    .profile-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .profile-actions .btn {
        padding: 0.5rem 1rem;
    }

    .profile-cover-wrapper {
        height: 428px;
    }
}



/* Shimmer animation - more visible */
@keyframes shimmer {
    0% {
        background-position: -200% -200%, 0 0, 15px 15px, 0 0, center, center;
    }
    50% {
        background-position: 0% 0%, 0 0, 15px 15px, 0 0, center, center;
    }
    100% {
        background-position: 200% 200%, 0 0, 15px 15px, 0 0, center, center;
    }
}

/* Alternative version with more dramatic effect */
.profile-cover-wrapper.dramatic {
    background:
        /* Animated light streaks */
        linear-gradient(
            45deg,
            transparent 0%,
            rgba(99, 102, 241, 0.1) 20%,
            rgba(168, 85, 247, 0.15) 40%,
            rgba(236, 72, 153, 0.1) 60%,
            transparent 100%
        ),
            /* Mesh gradient */
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
            /* Base dark gradient */
        linear-gradient(
            135deg,
            #0a0b0f 0%,
            #1a1f2e 30%,
            #2d3450 60%,
            #1a1c23 100%
        );

    background-size:
        300% 300%,
        200% 200%,
        250% 250%,
        180% 180%,
        100% 100%;

    animation: dramatic-flow 12s ease-in-out infinite;
}

@keyframes dramatic-flow {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 100% 100%, 0% 100%, center;
    }
    33% {
        background-position: 100% 100%, 50% 50%, 0% 0%, 100% 0%, center;
    }
    66% {
        background-position: 50% 50%, 100% 100%, 50% 50%, 50% 50%, center;
    }
}

.profile-location a {
    color:#FFFFFF !important;
}

@media (max-width: 768px) {

    .profile-wrapper {
        padding-bottom: 70px !important;
    }

    .profile-tabs {
        /* Core styles for a fixed bottom bar */
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1060; /* Keeps it on top of other content */

        /* Visual styling for the bar */
        display: flex;
        justify-content: space-around;
        background-color: #ffffff;
        border-top: 1px solid #e0e0e0;
        padding: 0.35rem 0;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.08);

        /* Ensure it doesn't try to scroll horizontally as a tab group */
        overflow-x: visible; /* Or 'hidden' if you are certain items will always fit */
        flex-wrap: nowrap;
    }

    /* Styling for individual tab items within the fixed bar */
    .profile-tabs .nav-item {
        flex: 1 1 0; /* Distribute space equally among tab items */
        text-align: center;
    }

    .profile-tabs .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.25rem;
        font-size: 0.7rem;
        color: #6c757d;
        height: 100%;
        line-height: 1.2;
        border: none;
        border-radius: 0;
    }

    .profile-tabs .nav-link i {
        font-size: 1.1rem;
        margin-bottom: 0.15rem;
        margin-right: 0 !important; /* Center icon above text */
    }

    .profile-tabs .nav-link.active {
        color: var(--primary-red) !important;
        background-color: transparent;
        font-weight: 500;
    }

    /* Remove the desktop-style active indicator line */
    .profile-tabs .nav-link.active::after {
        display: none;
    }

    /* If you had specific scrollbar styles for horizontal tabs,
       they might not be needed or can be set to 'auto' or 'none' */
    .profile-tabs::-webkit-scrollbar {
        display: auto; /* Or 'none' */
    }
}
