/* Person Detail Page Styles */

.person-page {
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Person Header */
.person-header {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.person-main-info {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.person-photo-large {
    flex-shrink: 0;
}

.person-photo-large img {
    width: 200px;
    height: 200px;
    border-radius: 15px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.photo-placeholder-large {
    width: 200px;
    height: 200px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.photo-placeholder-large.m {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.photo-placeholder-large.f {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.photo-placeholder-large.u {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.person-details {
    flex: 1;
}

.person-details h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.nickname {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.vital-stats {
    margin-bottom: 2rem;
}

.vital-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.vital-stat .label {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
}

.vital-stat .value {
    font-weight: 600;
    color: var(--text-color);
}

.vital-stat .place {
    color: #666;
    font-style: italic;
}

.vital-stat .age {
    color: #888;
    font-size: 0.9rem;
}

.person-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.person-actions .btn {
    padding: 12px 24px;
    font-size: 1rem;
}

.person-notes {
    border-top: 2px solid #f0f0f0;
    padding-top: 2rem;
}

.person-notes h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.person-notes p {
    color: #555;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

/* Relationships Section */
.relationships-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 2.5rem;
}

.relationships-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.relationships-grid {
    display: grid;
    gap: 2.5rem;
}

.relationship-group h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.relationship-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.relationship-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.relationship-card:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.relationship-photo {
    text-align: center;
    margin-bottom: 1rem;
}

.relationship-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0 auto;
    color: white;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.photo-placeholder.m {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.photo-placeholder.f {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.photo-placeholder.u {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.relationship-info {
    text-align: center;
}

.relationship-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.relationship-info h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.relationship-info h4 a:hover {
    color: var(--accent-color);
}

.relationship-type {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dates {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.marriage-info, .marriage-place, .divorce-info {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.marriage-info {
    color: var(--success-color);
    font-weight: 500;
}

.divorce-info {
    color: var(--accent-color);
    font-weight: 500;
}

.no-relationships {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

/* Responsive Design */
@media (max-width: 968px) {
    .person-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .relationship-cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .person-page {
        padding: 1rem 0;
    }
    
    .person-header, .relationships-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .person-details h1 {
        font-size: 2rem;
    }
    
    .person-photo-large img,
    .photo-placeholder-large {
        width: 150px;
        height: 150px;
    }
    
    .photo-placeholder-large {
        font-size: 2.5rem;
    }
    
    .vital-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .vital-stat .label {
        min-width: auto;
    }
    
    .person-actions {
        justify-content: center;
    }
    
    .person-actions .btn {
        flex: 1;
        text-align: center;
        min-width: 140px;
    }
    
    .relationship-cards {
        grid-template-columns: 1fr;
    }
    
    .relationships-section h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .person-header, .relationships-section {
        padding: 1rem;
    }
    
    .person-details h1 {
        font-size: 1.7rem;
    }
    
    .person-photo-large img,
    .photo-placeholder-large {
        width: 120px;
        height: 120px;
    }
    
    .photo-placeholder-large {
        font-size: 2rem;
    }
    
    .person-actions {
        flex-direction: column;
    }
    
    .person-actions .btn {
        width: 100%;
    }
    
    .relationship-card {
        padding: 1rem;
    }
    
    .relationship-photo img,
    .photo-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .photo-placeholder {
        font-size: 1.1rem;
    }
}

/* Photo Gallery Section */
.photos-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 2.5rem;
    margin-top: 2rem;
}

.photos-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.photos-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0;
}

.person-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.gallery-image {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-caption {
    padding: 0.8rem;
    text-align: center;
}

.gallery-caption p {
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.8rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-date {
    padding: 0 0.8rem 0.8rem;
    text-align: center;
}

.gallery-date span {
    color: #666;
    font-size: 0.7rem;
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
}

.gallery-more {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.gallery-more p {
    color: #666;
    font-size: 0.95rem;
}

.gallery-more a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.gallery-more a:hover {
    color: var(--accent-color);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .photos-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .photos-section .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }
    
    .photos-section h2 {
        font-size: 1.6rem;
    }
    
    .person-photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }
    
    .gallery-image {
        width: 120px;
        height: 120px;
    }
    
    .gallery-image img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .photos-section {
        padding: 1rem;
    }
    
    .person-photo-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    
    .gallery-image {
        width: 100px;
        height: 100px;
    }
    
    .gallery-image img {
        width: 100px;
        height: 100px;
    }
    
    .gallery-caption {
        padding: 0.5rem;
    }
    
    .gallery-caption p {
        font-size: 0.7rem;
    }
    
    .gallery-date {
        padding: 0 0.5rem 0.5rem;
    }
    
    .gallery-date span {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }
}