/* ===== FAMILY DETAILS COMPONENT CSS ===== */

.family-details-section {
    padding: 30px;
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.family-section {
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.family-section:last-child {
    margin-bottom: 0;
}

.family-section .section-title {
    color: var(--heading-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.info-item {
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.info-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: var(--text-color);
    word-break: break-word;
    line-height: 1.5;
    font-weight: 500;
}

.info-occupation {
    margin-top: 4px;
    padding-left: 20px;
    position: relative;
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-occupation::before {
    content: '\f0b1';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.85em;
}

/* ==================== GENDER COLORS ==================== */
:root {
    --male-color: #4a90e2;
    --female-color: #e84393;
    --other-color: #6c5ce7;
}

/* ==================== SPOUSE INFORMATION STYLES ==================== */

.spouse-info {
    margin-top: 12px;
    padding: 12px 12px 12px 16px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent-color);
    position: relative;
}

/* Keep gender colors for the left border */
.spouse-info.male {
    border-left-color: var(--male-color);
}

.spouse-info.female {
    border-left-color: var(--female-color);
}

.spouse-info.other {
    border-left-color: var(--other-color);
}

/* Spouse Header */
.spouse-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.spouse-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Gender-specific label colors */
.spouse-info.male .spouse-label {
    color: var(--male-color);
}

.spouse-info.female .spouse-label {
    color: var(--female-color);
}

.spouse-info.other .spouse-label {
    color: var(--other-color);
}

.spouse-label i {
    font-size: 0.9em;
}

/* Spouse Name Wrapper */
.spouse-name-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.4;
}

.spouse-name {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.spouse-name i {
    font-size: 0.9em;
    opacity: 0.7;
}

/* Remove gender colors from names, only keep text color */
.spouse-name {
    color: var(--text-color);
}

/* Spouse Native Place */
.spouse-native {
    font-size: 0.8em;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.spouse-native i {
    font-size: 0.85em;
    opacity: 0.7;
}

/* Spouse Details Container */
.spouse-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Spouse Occupation - No duplicate icon */
.spouse-occupation {
    font-size: 0.88em;
    color: var(--text-secondary);
    line-height: 1.4;
    padding-left: 0;
}

.spouse-occupation i {
    font-size: 0.85em;
    margin-right: 4px;
    opacity: 0.8;
}

.spouse-occupation.male i {
    color: var(--male-color);
}

.spouse-occupation.female i {
    color: var(--female-color);
}

.spouse-occupation.other i {
    color: var(--other-color);
}

/* ==================== GENDER ICONS ==================== */

.gender-icon {
    font-style: normal;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 4px;
}

.male-icon::before {
    content: '\f222';
    color: var(--male-color);
}

.female-icon::before {
    content: '\f221';
    color: var(--female-color);
}

.other-icon::before {
    content: '\f229';
    color: var(--other-color);
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    .family-details-section {
        padding: 20px 15px;
    }

    .family-section {
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .family-section .section-title {
        font-size: 1.3em;
    }

    .spouse-name-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .spouse-native {
        margin-top: 4px;
    }
}