/*
 * AncestryCodex - Global Light Theme Styles
 * Apply to all views - Light mode only
 */

/* ============================================
   Cards - Base
   ============================================ */

.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   Avatars
   ============================================ */

.avatar-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-md { width: 40px; height: 40px; font-size: 16px; }
.avatar-lg { width: 80px; height: 80px; font-size: 32px; }

.avatar-male { background: #e3f2fd; color: #1976d2; }
.avatar-female { background: #fce4ec; color: #c2185b; }
.avatar-unknown { background: #f5f5f5; color: #757575; }
.avatar-private { background: #fff3e0; color: #ff9800; }

/* ============================================
   Privacy States - Living
   ============================================ */

.state-living {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #fff 100%);
    border-color: #4caf50;
    border-style: dashed;
}

.state-living:hover {
    border-color: #2e7d32;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.state-living .text-state { color: #1b5e20; }

/* ============================================
   Privacy States - Private
   ============================================ */

.state-private {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 50%, #fff 100%);
    border-color: #ff9800;
    border-style: dashed;
}

.state-private:hover {
    border-color: #f57c00;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.state-private .text-state { color: #e65100; }
.state-private .details-state { color: #f57c00; font-style: italic; }

/* ============================================
   Privacy States - Deceased
   ============================================ */

.state-deceased {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    opacity: 0.85;
}

.state-deceased:hover {
    opacity: 1;
    border-color: #9e9e9e;
}

.state-deceased .text-state { color: #616161; }

/* ============================================
   Family Cards
   ============================================ */

.family-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
}

.family-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #c9a55c;
    transform: translateY(-2px);
}

.family-card.has-children { border-left: 3px solid #28a745; }
.family-card.no-children { border-left: 3px solid #6c757d; }

.family-card.living {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #fff 100%);
    border-color: #4caf50;
    border-style: dashed;
}
.family-card.living:hover { border-color: #2e7d32; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2); }
.family-card.living .partner-name { color: #1b5e20; }

.family-card.private {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 50%, #fff 100%);
    border-color: #ff9800;
    border-style: dashed;
}
.family-card.private:hover { border-color: #f57c00; box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2); }
.family-card.private .partner-name { color: #e65100; }
.family-card.private .family-details { color: #f57c00; font-style: italic; }

.family-card.deceased {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    opacity: 0.85;
}
.family-card.deceased:hover { opacity: 1; border-color: #9e9e9e; }
.family-card.deceased .partner-name { color: #616161; }

.family-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.family-avatars { display: flex; gap: -8px; }
.family-id { font-size: 0.75rem; color: #adb5bd; font-weight: 500; }

/* ============================================
   Partner Elements
   ============================================ */

.partner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.partner-avatar.male { background: #e3f2fd; color: #1976d2; }
.partner-avatar.female { background: #fce4ec; color: #c2185b; }
.partner-avatar.unknown { background: #f5f5f5; color: #757575; }
.partner-avatar.private { background: #fff3e0; color: #ff9800; }
.partner-avatar:nth-child(2) { margin-left: -12px; }
.partner-avatar.lg { width: 80px; height: 80px; font-size: 32px; margin: 0 auto 15px; }

.partner-names { margin-bottom: 10px; }
.partner-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.partner-icon { width: 20px; text-align: center; }

.partner-name {
    font-weight: 600;
    color: #1a1c2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.partner-name.unknown { color: #adb5bd; font-style: italic; }
.partner-name.private-name { color: #ff9800; font-style: italic; }
.partner-name.lg { font-size: 1.25rem; margin-bottom: 10px; text-align: center; }

.partner-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.2s ease;
}
.partner-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }
.partner-card.male { border-top: 4px solid #1976d2; }
.partner-card.female { border-top: 4px solid #c2185b; }
.partner-card.private { border-top: 4px solid #ff9800; background: linear-gradient(135deg, #fff8e1 0%, #fff 100%); }

.partner-details { font-size: 0.9rem; color: #6c757d; }
.partner-details dt { font-weight: 500; color: #495057; }

/* ============================================
   Family Details
   ============================================ */

.family-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #6c757d;
    border-top: 1px solid #f1f1f1;
    padding-top: 10px;
}

.family-detail { display: flex; align-items: center; gap: 4px; }
.family-detail i { font-size: 14px; }

.family-header-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
}

.marriage-icon { font-size: 48px; color: #c9a55c; text-align: center; }

/* ============================================
   Children Elements
   ============================================ */

.children-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}
.children-badge.none { background: #f5f5f5; color: #9e9e9e; }

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.child-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.child-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); border-color: #c9a55c; }
.child-card.living { background: linear-gradient(135deg, #e8f5e9 0%, #fff 100%); border-color: #4caf50; border-style: dashed; }
.child-card.private { background: linear-gradient(135deg, #fff8e1 0%, #fff 100%); border-color: #ff9800; border-style: dashed; }

.child-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.child-avatar.male { background: #e3f2fd; color: #1976d2; }
.child-avatar.female { background: #fce4ec; color: #c2185b; }
.child-avatar.unknown { background: #f5f5f5; color: #757575; }

/* ============================================
   Individual Cards
   ============================================ */

.individual-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
}
.individual-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); border-color: #c9a55c; transform: translateY(-2px); }
.individual-card.male { border-left: 3px solid #1976d2; }
.individual-card.female { border-left: 3px solid #c2185b; }
.individual-card.unknown { border-left: 3px solid #757575; }

.individual-card.living {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #fff 100%);
    border-color: #4caf50;
    border-style: dashed;
}
.individual-card.private {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 50%, #fff 100%);
    border-color: #ff9800;
    border-style: dashed;
}
.individual-card.deceased {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    opacity: 0.85;
}
.individual-card.deceased:hover { opacity: 1; }

.individual-card.living .individual-dates { color: #2e7d32; font-weight: 600; }
.individual-card.living .individual-name { color: #1b5e20; }
.individual-card.private .individual-dates { color: #f57c00; font-style: italic; }
.individual-card.private .individual-name { color: #e65100; }
.individual-card.deceased .individual-name { color: #616161; }
.individual-card.deceased .individual-dates { color: #9e9e9e; }

.individual-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
}
.individual-avatar img { width: 100%; height: 100%; object-fit: cover; }
.individual-avatar.male { background: #e3f2fd; color: #1976d2; }
.individual-avatar.female { background: #fce4ec; color: #c2185b; }
.individual-avatar.unknown { background: #f5f5f5; color: #757575; }
.individual-avatar.has-image { background: #f0f0f0; }

/* Privacy blur for guests viewing living individuals */
.individual-avatar.privacy-blur img { filter: blur(6px); }
.individual-avatar.privacy-blur { position: relative; }
.individual-avatar.privacy-blur::after {
    content: '\eece';
    font-family: 'remixicon';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}

.individual-name {
    font-weight: 600;
    color: #1a1c2e;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.individual-dates { font-size: 0.85rem; color: #6c757d; }

.individuals-grid-wrapper { scrollbar-width: thin; scrollbar-color: #c9a55c #f1f1f1; }
.individuals-grid-wrapper::-webkit-scrollbar { width: 8px; }
.individuals-grid-wrapper::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.individuals-grid-wrapper::-webkit-scrollbar-thumb { background: #c9a55c; border-radius: 4px; }
.individuals-grid-wrapper::-webkit-scrollbar-thumb:hover { background: #c4a23e; }

.loading-spinner { display: none; text-align: center; padding: 20px; }

/* ============================================
   Timeline
   ============================================ */

.event-timeline { position: relative; padding-left: 30px; }
.event-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.event-item { position: relative; padding-bottom: 20px; }
.event-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #c9a55c;
    border: 2px solid #fff;
}
.event-item:last-child { padding-bottom: 0; }

/* ============================================
   Grid Layouts
   ============================================ */

.families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.individuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

/* ============================================
   Scrollbar
   ============================================ */

.custom-scrollbar { scrollbar-width: thin; scrollbar-color: #c9a55c #f1f1f1; }
.custom-scrollbar::-webkit-scrollbar { width: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #c9a55c; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #c4a23e; }

.families-grid-wrapper { scrollbar-width: thin; scrollbar-color: #c9a55c #f1f1f1; }
.families-grid-wrapper::-webkit-scrollbar { width: 8px; }
.families-grid-wrapper::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.families-grid-wrapper::-webkit-scrollbar-thumb { background: #c9a55c; border-radius: 4px; }
.families-grid-wrapper::-webkit-scrollbar-thumb:hover { background: #c4a23e; }

/* ============================================
   Search & Filter
   ============================================ */

.search-box { position: relative; }
.search-box .form-control { padding-left: 40px; }
.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.letter-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; }
.letter-nav .btn { padding: 2px 8px; font-size: 12px; min-width: 28px; }
.letter-nav .btn.active { background-color: #c9a55c; border-color: #c9a55c; color: #1a1c2e; }

/* ============================================
   No Results
   ============================================ */

.no-results { text-align: center; padding: 40px; color: #6c757d; }

/* ============================================
   Profile Header
   ============================================ */

.profile-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.profile-avatar.male { background: #e3f2fd; color: #1976d2; }
.profile-avatar.female { background: #fce4ec; color: #c2185b; }
.profile-avatar.unknown { background: #f5f5f5; color: #757575; }

/* ============================================
   Story Cards
   ============================================ */

.story-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.story-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); transform: translateY(-4px); }
.story-card-image { height: 200px; object-fit: cover; width: 100%; }
.story-card-body { padding: 20px; }

/* ============================================
   Blog Cards
   ============================================ */

.blog-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.blog-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }

/* ============================================
   Calendar
   ============================================ */

.calendar-event { background: #e3f2fd; border-left: 3px solid #1976d2; padding: 8px 12px; border-radius: 4px; margin-bottom: 8px; }
.calendar-event.birth { background: #e8f5e9; border-left-color: #4caf50; }
.calendar-event.death { background: #fce4ec; border-left-color: #c2185b; }
.calendar-event.marriage { background: #fff8e1; border-left-color: #ff9800; }

/* ============================================
   Profile Header - Individual Page
   ============================================ */

.profile-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 2rem 0;
    margin: -1.5rem -1.5rem 1.5rem;
}

.profile-avatar-wrapper {
    position: relative;
    cursor: pointer;
}

.profile-avatar-wrapper:hover .avatar-upload-overlay { opacity: 1; }

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 24px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    overflow: hidden;
}

.profile-avatar i {
    font-family: 'remixicon' !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.profile-avatar svg { width: 48px; height: 48px; fill: currentColor; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar.male { background: linear-gradient(135deg, #1976d2, #42a5f5); color: #fff; }
.profile-avatar.female { background: linear-gradient(135deg, #c2185b, #f06292); color: #fff; }
.profile-avatar.unknown { background: linear-gradient(135deg, #616161, #9e9e9e); color: #fff; }
.profile-avatar.has-image { background: none; border-color: rgba(255,255,255,0.5); }

/* Vital Stats */
.vital-stat { text-align: center; padding: 0.5rem 1rem; }
.vital-stat .label { font-size: 0.75rem; color: rgba(255,255,255,0.7); text-transform: uppercase; }
.vital-stat .value { font-size: 1.1rem; color: #fff; font-weight: 600; }

/* Privacy/Status Badges */
.privacy-badge {
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

.deceased-badge {
    background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

/* ============================================
   Relationship Cards
   ============================================ */

.relationship-card {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.relationship-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.relationship-card.living {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #fff 100%);
    border-color: #4caf50;
    border-style: dashed;
}

.relationship-card.living:hover { border-color: #2e7d32; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2); }
.relationship-card.living .fw-medium { color: #1b5e20; }
.relationship-card.living .text-muted { color: #2e7d32 !important; font-style: italic; }

.relationship-card.deceased {
    background-color: #f8f9fa;
    border-color: #ced4da;
    opacity: 0.85;
}

.relationship-card.deceased:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); border-color: #adb5bd; }
.relationship-card.deceased .fw-medium { color: #6c757d; }
.relationship-card.deceased .text-muted { color: #868e96 !important; }

.relationship-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f0f2f5;
    color: #6c757d;
}

.relationship-card.living .relationship-avatar { background: linear-gradient(135deg, #a5d6a7, #81c784); color: #1b5e20; }
.relationship-card.deceased .relationship-avatar { background: #e0e0e0; color: #9e9e9e; }

.gender-icon { font-size: 14px; margin-left: 4px; }
.gender-icon.male { color: #1976d2; }
.gender-icon.female { color: #c2185b; }
.gender-icon.unknown { color: #757575; }

/* ============================================
   Relationship Grid Cards
   ============================================ */

.rel-grid-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rel-grid-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #c9a55c;
    transform: translateY(-2px);
}

.rel-grid-card.private {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #fff 100%);
    border-color: #4caf50;
    border-style: dashed;
}

.rel-grid-card.private:hover { border-color: #2e7d32; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2); }
.rel-grid-card.private .rel-grid-dates { color: #2e7d32; font-style: italic; }
.rel-grid-card.private .rel-grid-name { color: #1b5e20; }

.rel-grid-card.deceased {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    opacity: 0.85;
}

.rel-grid-card.deceased:hover { opacity: 1; border-color: #9e9e9e; }
.rel-grid-card.deceased .rel-grid-name { color: #616161; }
.rel-grid-card.deceased .rel-grid-dates { color: #9e9e9e; }

.rel-grid-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.rel-grid-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rel-grid-avatar.male { background: #e3f2fd; color: #1976d2; }
.rel-grid-avatar.female { background: #fce4ec; color: #c2185b; }
.rel-grid-avatar.unknown { background: #f5f5f5; color: #757575; }
.rel-grid-avatar.has-image { background: #f0f0f0; }

.rel-grid-card.private .rel-grid-avatar:not(.has-image) { background: linear-gradient(135deg, #a5d6a7, #81c784); color: #1b5e20; }
.rel-grid-card.deceased .rel-grid-avatar:not(.has-image) { background: #e0e0e0; color: #9e9e9e; }

.rel-grid-info { flex: 1; min-width: 0; overflow: hidden; }

.rel-grid-name {
    font-weight: 600;
    color: #1a1c2e;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rel-grid-dates {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ============================================
   Event Timeline - Enhanced
   ============================================ */

.event-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #c9a55c;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #c9a55c;
}

.event-item.birth::before { background: #4caf50; box-shadow: 0 0 0 2px #4caf50; }
.event-item.death::before { background: #9e9e9e; box-shadow: 0 0 0 2px #9e9e9e; }
.event-item.marriage::before { background: #e91e63; box-shadow: 0 0 0 2px #e91e63; }
.event-item.divorce::before { background: #ff5722; box-shadow: 0 0 0 2px #ff5722; }
.event-item.burial::before { background: #795548; box-shadow: 0 0 0 2px #795548; }
.event-item.baptism::before { background: #03a9f4; box-shadow: 0 0 0 2px #03a9f4; }

.event-item.family-event {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.05) 0%, transparent 100%);
    border-left: 3px solid rgba(13, 110, 253, 0.3);
    padding-left: 1rem;
    margin-left: -1rem;
    border-radius: 0 8px 8px 0;
}

.event-item.family-event::before { background: #0d6efd; box-shadow: 0 0 0 2px #0d6efd; opacity: 0.7; }
.event-item.family-event.death::before { background: #6c757d; box-shadow: 0 0 0 2px #6c757d; opacity: 0.7; }
.event-item.family-event.birth::before { background: #198754; box-shadow: 0 0 0 2px #198754; opacity: 0.7; }

/* ============================================
   Media Grid - Masonry Layout
   ============================================ */

.media-grid {
    columns: 6 120px;
    column-gap: 0.75rem;
}

@media (max-width: 1200px) { .media-grid { columns: 5 110px; } }
@media (max-width: 992px) { .media-grid { columns: 4 100px; } }
@media (max-width: 576px) { .media-grid { columns: 3 80px; } }

.media-item {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.media-item img { width: 100%; height: auto; display: block; }
.media-item .media-img { cursor: pointer; }

.media-item .profile-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 1;
}

.media-item.is-profile { border: 3px solid #4CAF50; }
.media-item.is-tagged { border: 3px solid #2196F3; }

/* Privacy blur for media */
.media-item.privacy-blur img { filter: blur(8px); transition: filter 0.3s ease; }
.media-item.privacy-blur .media-title-overlay { backdrop-filter: blur(4px); }
.media-item.privacy-blur::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
    pointer-events: none;
}

.profile-avatar.privacy-blur img,
.profile-avatar.privacy-blur svg { filter: blur(8px); }

.profile-avatar.privacy-blur .privacy-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}

.profile-avatar.privacy-blur .privacy-lock-overlay svg {
    filter: none;
    width: 2rem;
    height: 2rem;
    fill: rgba(255,255,255,0.8);
}

.rel-card.privacy-blur img,
.family-member-avatar.privacy-blur img,
.rel-grid-avatar.privacy-blur img { filter: blur(6px); }

.media-item .tagged-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 1;
}

.media-item .group-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 1;
}

.media-item .media-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.media-item:hover .media-actions { opacity: 1; }

.media-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
}

.media-action-btn.edit-media-btn { background: #fff; color: #1976d2; }
.media-action-btn.edit-media-btn:hover { background: #1976d2; color: #fff; }
.media-action-btn.delete-media-btn { background: #fff; color: #dc3545; }
.media-action-btn.delete-media-btn:hover { background: #dc3545; color: #fff; }

.media-item .media-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 0.5rem 0.4rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    line-height: 1.2;
}

.media-item:hover .media-title-overlay { opacity: 1; }

.media-item .media-type-icon {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.media-item .video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.media-item:hover .video-play-overlay {
    background: rgba(220,53,69,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.media-placeholder { color: #9e9e9e; font-size: 2rem; }

/* ============================================
   Media Tagging
   ============================================ */

.tagged-person {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.tagged-person.primary-tag {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #90caf9;
}

.tag-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.tag-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tag-avatar.male { background: #e3f2fd; color: #1976d2; }
.tag-avatar.female { background: #fce4ec; color: #c2185b; }
.tag-avatar.unknown { background: #f5f5f5; color: #757575; }

.tag-search-results {
    position: absolute;
    z-index: 1050;
    width: calc(100% - 2rem);
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
}

.tag-search-results.show { display: block; }

.tag-search-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.tag-search-item:hover { background: #f8f9fa; }
.tag-search-item:last-child { border-bottom: none; }

.tag-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.tag-remove-btn:hover { background: #fee2e2; }

.tagged-people-list { max-height: 200px; overflow-y: auto; }

/* ============================================
   Sources & Notes
   ============================================ */

.source-item {
    background: #f8f9fa;
    border-left: 3px solid #c9a55c;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
}

.note-item {
    background: #fffde7;
    border-left: 3px solid #ffc107;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
}

/* ============================================
   Info Labels & Values
   ============================================ */

.info-label {
    font-size: 0.65rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.1rem;
}

.info-value { font-size: 0.85rem; color: #212529; }

.vital-info-card .mb-3 { margin-bottom: 0.6rem !important; }
.vital-info-card .card-body { padding: 0.75rem; }

/* Life places map */
#lifePlacesMap { height: 200px; border-radius: 0.375rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem; color: #9e9e9e; }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; }

/* ============================================
   Cropper.js - Avatar Upload
   ============================================ */

#avatarCropperContainer .cropper-view-box,
#avatarCropperContainer .cropper-face { border-radius: 50%; }

#avatarCropperContainer .cropper-view-box { box-shadow: 0 0 0 1px #39f; outline: 0; }
#avatarCropperContainer .cropper-dashed { display: none; }

/* ============================================
   Modal Privacy
   ============================================ */

#mediaViewModal .modal-body.privacy-active #mediaViewImage,
#mediaViewModal .modal-body.privacy-active #mediaViewVideo { filter: blur(15px); }

#mediaViewModal .privacy-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#mediaViewModal .privacy-message { text-align: center; color: white; padding: 2rem; }

/* ============================================
   Story Components
   ============================================ */

.story-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0ab39c;
}

.story-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ab39c 0%, #099885 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.story-style-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.story-header {
    background: linear-gradient(135deg, rgba(10, 179, 156, 0.1) 0%, rgba(10, 179, 156, 0.05) 100%);
    border-radius: 12px;
    padding: 2rem;
}

.story-avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #0ab39c;
    box-shadow: 0 4px 15px rgba(10, 179, 156, 0.3);
}

.story-avatar-placeholder-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ab39c 0%, #099885 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
    box-shadow: 0 4px 15px rgba(10, 179, 156, 0.3);
}

.story-content { font-size: 1.1rem; line-height: 1.8; }
.story-content p { margin-bottom: 1.5rem; }

.story-meta {
    border-left: 3px solid #0ab39c;
    padding-left: 1rem;
}

.ai-generate-section {
    background: linear-gradient(135deg, rgba(10, 179, 156, 0.1) 0%, rgba(10, 179, 156, 0.05) 100%);
    border: 1px dashed #0ab39c;
    border-radius: 8px;
    padding: 1.5rem;
}

.style-option { cursor: pointer; transition: all 0.2s ease; }
.style-option:hover { border-color: #0ab39c !important; }
.style-option.selected { border-color: #0ab39c !important; background: rgba(10, 179, 156, 0.1); }

/* ============================================
   Blog Components
   ============================================ */

.blog-image { height: 200px; object-fit: cover; }

.category-badge {
    background: linear-gradient(135deg, #405189, #6366f1);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-card { border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

.popular-post-img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }

.tag-cloud .badge { font-weight: 400; padding: 6px 12px; transition: all 0.2s; }
.tag-cloud .badge:hover { background: #405189 !important; color: #fff !important; }

.archive-link, .category-link { color: #6c757d; transition: all 0.2s; }
.archive-link:hover, .category-link:hover { color: #405189; padding-left: 5px; }

.post-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-hero img { width: 100%; height: 400px; object-fit: cover; }

.post-hero-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #405189, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 14px;
}

.author-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1.5rem;
}

.author-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }

.post-content { font-size: 16px; line-height: 1.8; }
.post-content p { margin-bottom: 1.5rem; }
.post-content h2, .post-content h3, .post-content h4 { margin-top: 2rem; margin-bottom: 1rem; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }

.post-content blockquote {
    border-left: 4px solid #405189;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
}

.tag-list { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.related-post-card { transition: transform 0.2s; }
.related-post-card:hover { transform: translateY(-3px); }

.related-post-img { height: 150px; object-fit: cover; border-radius: 8px; }

.comment-item {
    border-left: 3px solid #405189;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.comment-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }

/* ============================================
   Calendar Components
   ============================================ */

/* Event Type Colors */
.fc-event,
.fc-event *,
.fc-event a,
.fc-event span,
.fc-event div,
.fc-event .fc-event-title,
.fc-event .fc-event-main,
.fc-event .fc-event-main-frame,
.fc-event .fc-event-title-container,
.fc-daygrid-event,
.fc-daygrid-event *,
.fc-daygrid-event a,
.fc-daygrid-event span,
.fc-daygrid-event div,
.fc-daygrid-block-event .fc-event-title,
.fc-daygrid-dot-event .fc-event-title,
.fc-h-event .fc-event-title,
.fc-v-event .fc-event-title,
.fc-event-title,
.fc-event-main-frame {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3) !important;
    font-size: 0.7rem !important;
}

.fc-daygrid-event { padding: 1px 4px !important; margin-bottom: 1px !important; border-radius: 3px !important; }
.fc-daygrid-block-event .fc-event-main { padding: 1px 3px !important; }
.fc-daygrid-event-dot { display: none !important; }
.fc-daygrid-dot-event { background: inherit !important; }

.fc-event.birthday { background: #047857 !important; border-color: #047857 !important; }
.fc-event.remembrance-birthday, .fc-event.remembrance_birthday { background: #4b5563 !important; border-color: #4b5563 !important; }
.fc-event.in-memoriam, .fc-event.in_memoriam { background: #b45309 !important; border-color: #b45309 !important; }
.fc-event.anniversary { background: #be185d !important; border-color: #be185d !important; }
.fc-event.memorial-anniversary, .fc-event.memorial_anniversary { background: #6b7280 !important; border-color: #6b7280 !important; }
.fc-event.custom { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }

/* Remove scrollbar from calendar */
.fc { overflow: visible !important; }
.fc-scroller { overflow: visible !important; }
.fc-scroller-liquid-absolute { position: relative !important; overflow: visible !important; }
.fc-view-harness { overflow: visible !important; }
.fc .fc-scroller-harness { overflow: visible !important; }
.fc-daygrid-body { overflow: visible !important; }
.fc-scrollgrid { overflow: visible !important; }
.fc-scrollgrid-section-body > td { overflow: visible !important; }

/* Legend colors */
.legend-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.legend-item:hover { transform: translateX(3px); }

.legend-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; flex-shrink: 0; }
.legend-birthday { background-color: #10b981; }
.legend-memorial { background-color: #6b7280; }
.legend-anniversary { background-color: #ec4899; }
.legend-death { background-color: #374151; }
.legend-custom { background-color: #6366f1; }

/* Stats cards */
.stat-card {
    background: linear-gradient(135deg, #405189, #6366f1);
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-label { opacity: 0.8; font-size: 13px; }

/* Upcoming events */
.upcoming-event {
    display: flex;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.upcoming-event:hover { background: #e9ecef; transform: translateX(3px); }

.upcoming-event .event-date {
    min-width: 40px;
    text-align: center;
    padding: 6px;
    border-radius: 6px;
    margin-right: 10px;
}

.upcoming-event .event-date .day { font-size: 14px; font-weight: 700; line-height: 1; }
.upcoming-event .event-date .month { font-size: 9px; text-transform: uppercase; opacity: 0.8; }
.upcoming-event .event-details { flex: 1; }
.upcoming-event .event-title { font-weight: 600; font-size: 12px; margin-bottom: 2px; line-height: 1.3; }
.upcoming-event .event-type { font-size: 10px; color: #6c757d; }

/* Calendar styling */
.fc .fc-toolbar-title { font-size: 1.25rem; font-weight: 600; }
.fc .fc-button-primary { background-color: #405189; border-color: #405189; }
.fc .fc-button-primary:hover { background-color: #2d3a65; border-color: #2d3a65; }
.fc .fc-button-primary:not(:disabled).fc-button-active { background-color: #6366f1; border-color: #6366f1; }
.fc-day-today { background: rgba(99, 102, 241, 0.1) !important; }

/* Event modal */
.event-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.event-type-badge.birthday { background: #d1fae5; color: #047857; }
.event-type-badge.memorial { background: #e5e7eb; color: #374151; }
.event-type-badge.in-memoriam { background: #fef3c7; color: #92400e; }
.event-type-badge.anniversary { background: #fce7f3; color: #be185d; }
.event-type-badge.custom { background: #dbeafe; color: #1e40af; }

/* ============================================
   Timeline Components
   ============================================ */

.timeline { position: relative; padding: 0; list-style: none; }

.timeline:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
    left: 31px;
    margin: 0;
}

.timeline > li {
    position: relative;
    margin-bottom: 50px;
    padding-left: 80px;
}

.timeline > li:before,
.timeline > li:after { content: " "; display: table; }
.timeline > li:after { clear: both; }

.timeline > li .timeline-panel {
    position: relative;
    width: 100%;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.timeline > li .timeline-badge {
    position: absolute;
    left: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    font-size: 14px;
    line-height: 30px;
    color: #fff;
    z-index: 100;
}

.timeline > li .timeline-badge.birth { background-color: #0ab39c; }
.timeline > li .timeline-badge.death { background-color: #f06548; }
.timeline > li .timeline-badge.marriage { background-color: #405189; }

.decade-header { position: relative; margin: 30px 0 30px 80px; }

.decade-header h4 {
    display: inline-block;
    padding: 5px 15px;
    background: #405189;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   Search Components
   ============================================ */

.search-hero {
    background: linear-gradient(135deg, #405189 0%, #2a3f7c 100%);
    padding: 60px 0;
    color: white;
}

.search-hero h1 { color: #ffffff !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.text-white-75 { color: rgba(255,255,255,0.85) !important; }
.search-input-lg { font-size: 1.25rem; padding: 1rem 1.5rem; border-radius: 50px; }
.search-btn-lg { padding: 1rem 2rem; border-radius: 50px; font-size: 1.1rem; }
.surname-tag, .place-tag { transition: all 0.2s; }
.surname-tag:hover, .place-tag:hover { transform: scale(1.05); }
.recent-search-item { transition: background-color 0.2s; }
.recent-search-item:hover { background-color: rgba(64, 81, 137, 0.1); }

/* ============================================
   Photo Gallery Components
   ============================================ */

.media-gallery { column-count: 6; column-gap: 1rem; }

@media (max-width: 1800px) { .media-gallery { column-count: 5; } }
@media (max-width: 1600px) { .media-gallery { column-count: 4; } }
@media (max-width: 1400px) { .media-gallery { column-count: 3; } }
@media (max-width: 992px) { .media-gallery { column-count: 2; } }
@media (max-width: 576px) { .media-gallery { column-count: 1; } }

.media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    break-inside: avoid;
    margin-bottom: 1.25rem;
}

.media-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.media-wrapper { position: relative; overflow: hidden; cursor: pointer; }
.media-wrapper img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.media-card:hover .media-wrapper img { transform: scale(1.03); }

.document-placeholder {
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    color: #666;
}

.document-placeholder i { font-size: 4rem; margin-bottom: 0.5rem; }

.document-placeholder .file-ext {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(0,0,0,0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2.5rem 1rem 1rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-card:hover .media-overlay { opacity: 1; }

.media-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-card:hover .media-actions { opacity: 1; }

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.action-btn:hover { transform: scale(1.1); }
.action-btn.edit-btn:hover { background: #3b82f6; color: white; }
.action-btn.delete-btn:hover { background: #ef4444; color: white; }

.type-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.photo { background: rgba(34, 197, 94, 0.9); color: white; }
.type-badge.document { background: rgba(59, 130, 246, 0.9); color: white; }
.type-badge.video { background: rgba(239, 68, 68, 0.9); color: white; }
.type-badge.audio { background: rgba(168, 85, 247, 0.9); color: white; }
