/* Talent Roster Styles - Simplified Design with Aggressive Specificity */

/* Wrapper - very specific to override Divi */
.ne-talent-roster-wrapper,
div.ne-talent-roster-wrapper,
.et_pb_section div.ne-talent-roster-wrapper {
    max-width: 1400px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
}

/* Roster Grid - Grid of cards with high specificity */
.ne-talent-roster-grid,
div.ne-talent-roster-grid,
.ne-talent-roster-wrapper .ne-talent-roster-grid,
.et_pb_section .ne-talent-roster-wrapper .ne-talent-roster-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 30px !important;
    margin-top: 30px !important;
}

/* Talent Card - Simplified with headshot on left, content on right */
.ne-talent-roster-grid .ne-talent-card,
div.ne-talent-roster-grid div.ne-talent-card {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    height: 100% !important;
}

.ne-talent-roster-grid .ne-talent-card:hover,
div.ne-talent-roster-grid div.ne-talent-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.ne-talent-roster-grid .ne-talent-card .ne-talent-card-inner,
div.ne-talent-card div.ne-talent-card-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    height: 100% !important;
    min-height: 280px !important;
}

/* Headshot Container (left side) with maximum specificity */
.ne-talent-roster-grid .ne-talent-card .ne-talent-headshot-container,
div.ne-talent-card div.ne-talent-headshot-container {
    position: relative !important;
    width: 140px !important;
    min-width: 140px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
}

.ne-talent-headshot-container .ne-talent-headshot-link,
div.ne-talent-headshot-container a.ne-talent-headshot-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

.ne-talent-headshot-container .ne-talent-headshot-link .ne-talent-headshot,
.ne-talent-headshot-container .ne-talent-headshot-link img.ne-talent-headshot {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform 0.3s !important;
}

.ne-talent-headshot-link:hover .ne-talent-headshot {
    transform: scale(1.05) !important;
}

.ne-talent-headshot-container .ne-talent-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 10px !important;
}

/* Content (right side) with maximum specificity */
.ne-talent-card .ne-talent-content,
div.ne-talent-card div.ne-talent-content {
    padding: 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* Name with high specificity */
.ne-talent-content .ne-talent-name,
.ne-talent-content h3.ne-talent-name,
div.ne-talent-content h3.ne-talent-name {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #333 !important;
    line-height: 1.3 !important;
}

/* Gallery Thumbnails with MAXIMUM specificity */
.ne-talent-content .ne-talent-gallery,
div.ne-talent-content div.ne-talent-gallery,
.ne-talent-card .ne-talent-content .ne-talent-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 8px !important;
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.ne-talent-gallery .ne-gallery-thumb-link,
.ne-talent-gallery a.ne-gallery-thumb-link,
div.ne-talent-gallery a.ne-gallery-thumb-link {
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    background: #f0f0f0 !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: relative !important;
}

.ne-gallery-thumb-link .ne-gallery-thumb,
.ne-gallery-thumb-link img.ne-gallery-thumb,
a.ne-gallery-thumb-link img.ne-gallery-thumb {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform 0.3s !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.ne-gallery-thumb-link:hover .ne-gallery-thumb {
    transform: scale(1.1) !important;
}

/* IMDb Link with MAXIMUM specificity */
.ne-talent-content .ne-talent-imdb,
div.ne-talent-content div.ne-talent-imdb {
    margin-top: auto !important;
    padding-top: 10px !important;
    border-top: 1px solid #eee !important;
}

.ne-talent-imdb .ne-imdb-link,
.ne-talent-imdb a.ne-imdb-link,
div.ne-talent-imdb a.ne-imdb-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 16px !important;
    background: #f5c518 !important;
    color: #000 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
    width: auto !important;
    max-width: 150px !important;
}

.ne-imdb-link:hover,
a.ne-imdb-link:hover {
    background: #e6b514 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.4) !important;
    color: #000 !important;
    text-decoration: none !important;
}

/* IMDb Logo SVG with MAXIMUM specificity */
.ne-imdb-link .ne-imdb-logo,
.ne-imdb-link svg.ne-imdb-logo,
a.ne-imdb-link svg.ne-imdb-logo,
.ne-talent-imdb .ne-imdb-link svg.ne-imdb-logo {
    height: 32px !important;
    width: auto !important;
    max-height: 32px !important;
    max-width: 100px !important;
    display: block !important;
}

.ne-imdb-text {
    font-family: 'Arial', sans-serif !important;
    letter-spacing: 0.5px !important;
}

/* Empty State */
.ne-no-talent {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 768px) {
    .ne-talent-roster-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ne-talent-card-inner {
        flex-direction: column;
        min-height: auto;
    }

    .ne-talent-headshot-container {
        width: 100%;
        height: 300px;
    }

    .ne-talent-content {
        padding: 15px;
    }

    .ne-talent-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .ne-talent-roster-wrapper {
        padding: 0 15px;
    }

    .ne-talent-roster-grid {
        gap: 15px;
    }

    .ne-talent-content {
        gap: 12px;
    }
}

/* GLightbox Custom Styling - Constrained to Image Size with Blur */
/* Override GLightbox defaults to fit content instead of full screen */

/* Backdrop with blur effect */
.glightbox-container .goverlay,
.glightbox-container .goverlay::before {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background: rgba(0, 0, 0, 0.75) !important;
}

/* Container - allow content-based sizing instead of full screen */
.glightbox-container .ginner-container {
    width: auto !important;
    height: auto !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
}

/* Slide container - fit to image */
.glightbox-container .gslide {
    width: auto !important;
    height: auto !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
}

/* Media container - constrain to image size with rounded corners */
.glightbox-container .gslide-media {
    width: auto !important;
    height: auto !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

/* Image itself - maintain aspect ratio with rounded corners */
.glightbox-container .gslide-image img {
    width: auto !important;
    height: auto !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    border-radius: 12px !important;
    object-fit: contain !important;
}

/* Remove max-width constraint on inner image wrapper */
.glightbox-container .gslide-image {
    max-width: none !important;
    max-height: none !important;
}

/* Navigation buttons - position outside rounded image */
.glightbox-container .gnext,
.glightbox-container .gprev {
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.glightbox-container .gnext:hover,
.glightbox-container .gprev:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.1) !important;
}

/* Close button - match navigation style */
.glightbox-container .gclose {
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.glightbox-container .gclose:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.1) rotate(90deg) !important;
}

/* Title (talent name) styling - overlay on bottom of image, not pushing image up */
.glightbox-container .gslide-description {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%) !important;
    padding: 40px 20px 20px 20px !important;
    pointer-events: none !important;
}

.glightbox-container .gslide-title {
    background: none !important;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .glightbox-container .gslide-media,
    .glightbox-container .gslide-image img {
        max-width: 98vw !important;
        max-height: 90vh !important;
        border-radius: 8px !important;
    }

    .glightbox-container .gnext,
    .glightbox-container .gprev {
        width: 40px !important;
        height: 40px !important;
    }

    .glightbox-container .gclose {
        width: 35px !important;
        height: 35px !important;
    }
}
