/**
 * Instagram Type Gallery - Frontend Styles
 * Designed to match Instagram's profile layout
 */

/* ========================================
   Profile Section Styles
   ======================================== */

/* Profile Wrapper - Flexbox Layout */
.itg-profile-wrapper,
.row.spacing {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 30px;
    padding: 30px 0;
}

/* Profile Image Container with Gradient Border */
.col-md-4.col-sm-5.col-xs-12.text-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.itg-profile-image-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.itg-profile-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* Profile Image Styling */
.img-circle {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50% !important;
    object-fit: cover;
    padding: 5px !important;
    border: 3px solid #ddd !important;
    background: linear-gradient(145deg, #fff5f0 0%, #fff0f5 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Profile Content Area */
.itg-profile-content,
.col-md-8.col-sm-7.col-xs-12.itg-spacing {
    flex: 1;
    min-width: 280px;
}

/* Profile Header - Title and Button Row */
.itg-profile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Make title and follow button appear inline */
.col-md-6.col-sm-6.col-xs-12.itg-spacing {
    display: inline-flex;
    align-items: center;
    padding: 0;
    width: auto !important;
    float: none !important;
}

.col-md-6.col-sm-6.col-xs-12:not(.itg-spacing) {
    display: inline-flex;
    align-items: center;
    padding: 0;
    width: auto !important;
    float: none !important;
}

/* Title Styling */
h1.custom-title,
h3.custom-title {
    font-size: 28px !important;
    font-weight: 300 !important;
    margin: 0 !important;
    line-height: 1.2;
    color: #262626;
    display: inline-block;
}

/* Follow Button Styling */
.follow-btn {
    display: inline-block;
    margin-left: 20px;
}

.btn.btn-info.custom-btn,
.custom-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 24px !important;
    background: linear-gradient(135deg, #0095f6 0%, #00c6ff 100%) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: none !important;
    cursor: pointer;
    width: auto !important;
    box-shadow: 0 2px 8px rgba(0, 149, 246, 0.3);
}

.btn.btn-info.custom-btn:hover,
.custom-btn:hover {
    background: linear-gradient(135deg, #0086e0 0%, #00b4e6 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 149, 246, 0.4);
}

.custom-btn i {
    font-size: 16px;
    margin-right: 4px;
}

/* Profile Bio/Description */
.custome-div {
    padding: 0 0 15px;
}

.custome-div p.text-justify {
    margin: 0;
    color: #262626;
    font-size: 15px;
    line-height: 1.6;
}

/* Stats Section */
.counts.ifg-stats {
    font-size: 16px;
    color: #262626;
    padding-right: 25px;
    display: inline-block;
}

.counts.ifg-stats b,
.counts.ifg-stats b a {
    color: #0095f6 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-right: 3px;
    font-size: 17px;
}

.counts.ifg-stats b a:hover {
    color: #00c6ff !important;
}

.counts.ifg-stats:last-child {
    padding-right: 0px;
}

/* Spacing/Padding fix for profile content columns */
.col-md-12.col-sm-12.col-xs-12.itg-spacing {
    width: 100%;
    padding: 0;
    margin-top: 10px;
}

/* Remove extra br tags spacing */
.col-md-8.col-sm-7.col-xs-12.itg-spacing br {
    display: none;
}

.spacing {
    padding: 30px 0;
}

/* ========================================
   Gallery Grid Styles
   ======================================== */

.all-images {
    display: flex;
    flex-wrap: wrap;
    margin: 20px -2px 0 -2px;
}

.single-image {
    /* padding is controlled dynamically by shortcode.php based on spacing setting */
    overflow: hidden;
}

.single-image .thumbnail,
.single-image img.thumbnail {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: cover;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #fafafa;
}

/* Note: Hover effects are handled by hover.css library when enabled */

.single-image a {
    display: block;
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */

@media (max-width: 991px) {
    .row.spacing {
        gap: 20px;
    }

    h1.custom-title,
    h3.custom-title {
        font-size: 24px !important;
    }
}

@media (max-width: 767px) {
    .row.spacing {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .col-md-4.col-sm-5.col-xs-12.text-center,
    .col-md-8.col-sm-7.col-xs-12.itg-spacing {
        width: 100%;
        text-align: center;
    }

    .col-md-6.col-sm-6.col-xs-12.itg-spacing,
    .col-md-6.col-sm-6.col-xs-12:not(.itg-spacing) {
        display: block;
        width: 100% !important;
        text-align: center;
        margin-bottom: 15px;
    }

    .follow-btn {
        margin-left: 0;
        margin-top: 15px;
    }

    .custome-div {
        text-align: center;
    }

    .counts.ifg-stats {
        display: inline-block;
    }
}

@media (max-width: 575px) {

    h1.custom-title,
    h3.custom-title {
        font-size: 20px !important;
    }

    .counts.ifg-stats {
        padding-right: 15px;
        font-size: 14px;
    }

    .counts.ifg-stats b,
    .counts.ifg-stats b a {
        font-size: 15px;
    }

    .img-circle {
        width: 120px !important;
        height: 120px !important;
    }

    .btn.btn-info.custom-btn,
    .custom-btn {
        padding: 6px 18px !important;
        font-size: 13px !important;
    }
}

/* ========================================
   Pagination Styles
   ======================================== */

.holder {
    margin: 20px 0;
    text-align: center;
}

/* ========================================
   Loading Animation
   ======================================== */

.loading {
    background-color: #f0f0f0;
    min-height: 150px;
}

/* ========================================
   Lightbox Enhancements
   ======================================== */

.ekko-lightbox .modal-content {
    border-radius: 8px;
    overflow: hidden;
}

.ekko-lightbox .modal-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    padding: 10px 15px;
    background: #f8f9fa;
}

.ekko-lightbox .modal-header .modal-title {
    order: 2;
    flex: 1;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
    padding-right: 15px;
}

.ekko-lightbox .modal-header .close,
.ekko-lightbox .modal-header button.close {
    order: 1;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #333;
    opacity: 0.7;
    background: transparent;
    border: none;
    cursor: pointer;
}

.ekko-lightbox .modal-header .close:hover,
.ekko-lightbox .modal-header button.close:hover {
    opacity: 1;
}

.ekko-lightbox .modal-body {
    padding: 0;
    position: relative;
}

.ekko-lightbox .modal-footer {
    border-top: none;
    padding: 10px 15px;
}

/* Lightbox Navigation Arrows */
.ekko-lightbox .ekko-lightbox-nav-overlay {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.ekko-lightbox .ekko-lightbox-nav-overlay a {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    text-decoration: none;
    color: #fff;
    font-size: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ekko-lightbox .ekko-lightbox-nav-overlay a:hover {
    opacity: 1;
}

.ekko-lightbox .ekko-lightbox-nav-overlay a:first-child::before {
    content: '‹';
    font-size: 60px;
    font-weight: 300;
}

.ekko-lightbox .ekko-lightbox-nav-overlay a:last-child::before {
    content: '›';
    font-size: 60px;
    font-weight: 300;
}

/* Alternative navigation using glyphicons/icons if available */
.ekko-lightbox .ekko-lightbox-nav-overlay a span {
    display: none;
}