/* Person Media CSS */

/* Base Media Styles */
.section-container {
    background: var(--lp-section-bg, #ffffff) !important;
    padding: 0 !important;
    margin-bottom: 25px !important;
    border: var(--lp-section-border, 1px solid #e1e5e9) !important;
    border-radius: var(--lp-section-radius, 8px) !important;
    overflow: hidden !important;
    box-shadow: var(--lp-section-shadow, 0 1px 3px rgba(0,0,0,0.1)) !important;
}

.section-title {
    background: var(--lp-section-bg, #ffffff) !important;
    margin: 0 !important;
    padding: 18px 20px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--lp-heading-color, #2c3e50) !important;
    border-bottom: 1px solid var(--lp-border-color, #e1e5e9) !important;
    font-family: var(--lp-font-family, inherit) !important;
}

.hp-photos-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    padding: 20px !important;
}

.hp-photo-item {
    text-align: center !important;
    border: 1px solid var(--lp-border-color, #ddd) !important;
    border-radius: var(--lp-section-radius, 8px) !important;
    overflow: hidden !important;
    background: var(--lp-background-color, #ffffff) !important;
    transition: transform 0.2s ease !important;
}

.hp-photo-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.hp-photo-item img {
    width: 100% !important;
    height: 80px !important;
    object-fit: cover !important;
    display: block !important;
}

.hp-photo-title {
    padding: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--lp-text-color, #333) !important;
    background: #f9f9f9 !important;
    border-top: 1px solid var(--lp-border-color, #eee) !important;
    font-family: var(--lp-font-family, inherit) !important;
}

.hp-document-icon {
    width: 100% !important;
    height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f5f5f5 !important;
    border-radius: 8px 8px 0 0 !important;
    font-size: 2em !important;
}

/* Legacy Theme Overrides */
.hp-media.inherit-theme .section-container {
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
}

.hp-media.inherit-theme .section-title {
    background: #f5f5f5 !important;
    color: inherit !important;
    border-bottom: 1px solid #ddd !important;
    font-family: inherit !important;
    font-size: inherit !important;
}

.hp-media.inherit-theme .hp-photo-title {
    color: inherit !important;
    font-family: inherit !important;
}

/* Lightbox Styles */
.hp-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.9) !important;
    z-index: 10000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
}

.hp-lightbox img {
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
}

.hp-lightbox-close {
    position: absolute !important;
    top: 20px !important;
    right: 30px !important;
    color: white !important;
    font-size: 40px !important;
    cursor: pointer !important;
    z-index: 10001 !important;
}

.hp-lightbox-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: white !important;
    font-size: 30px !important;
    cursor: pointer !important;
    padding: 10px !important;
    background: rgba(0,0,0,0.5) !important;
    border-radius: 50% !important;
}

.hp-lightbox-prev { 
    left: 30px !important; 
}

.hp-lightbox-next { 
    right: 30px !important; 
}

/* Responsive */
@media (max-width: 768px) {
    .hp-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    .hp-photo-item img {
        height: 150px !important;
    }
    
    .section-title {
        padding: 15px !important;
        font-size: 16px !important;
    }
}