/* family-tree-style.css */

/* Define variables if not already in main.css, or override specific ones */
:root {
    --color-background-light: #FDFDFD; /* A very light background for content areas */
    --color-text-dark: #333333;
    --color-accent: #800020; /* Deep Burgundy, or your chosen accent */
    --color-light-border: #E0E0E0;
    --font-heading: 'Lora', serif;
    --font-body: 'Open Sans', sans-serif;
}

body {
    background-color: var(--color-background-light);
    color: var(--color-text-dark);
}

.page-header {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--color-background-light);
    border-bottom: 1px solid var(--color-light-border);
}

.breadcrumbs {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5em;
    color: var(--color-accent);
    margin-top: 0;
    margin-bottom: 0;
}

.main-content {
    max-width: 850px;
    margin: 30px auto;
    padding: 0 20px;
}

.intro-section {
    font-size: 1.1em;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tree-display-section {
    text-align: center;
    margin-bottom: 60px;
}

.main-tree-drawing {
    display: inline-block; /* Allows auto margins for centering */
    max-width: 100%;
    border: 1px solid var(--color-light-border);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden; /* Ensures border-radius applies to image */
    margin: 0; /* Override default figure margin */
    padding: 10px; /* Inner padding like a mat */
    background-color: white;
}

.main-tree-drawing img {
    display: block; /* Remove extra space below image */
    max-width: 100%; /* Ensure image fits */
    height: auto;
    border-radius: 4px; /* Slightly rounded corners for the image itself */
}

.photo-caption {
    font-family: var(--font-body);
    font-size: 0.95em;
    color: #555;
    margin-top: 15px;
    line-height: 1.5;
    text-align: center;
}

.photo-credit {
    display: block; /* Puts credit on its own line */
    font-size: 0.85em;
    margin-top: 5px;
    color: #777;
}

/* --- Gilda's Legacy Section --- */
.gilda-legacy-section {
    background-color: #FDF9F3; /* A warm, slightly different background */
    padding: 60px 20px;
    margin-bottom: 60px;
    border-top: 1px solid var(--color-light-border);
    border-bottom: 1px solid var(--color-light-border);
    text-align: center; /* Default center for smaller screens */
}

.gilda-info-block {
    display: flex;
    flex-direction: column; /* Stack vertically on small screens */
    align-items: center; /* Center items when stacked */
    gap: 25px; /* Space between photo and text */
    max-width: 700px;
    margin: 0 auto;
}

.gilda-photo {
    flex-shrink: 0; /* Don't shrink photo */
    margin: 0; /* Remove default figure margin */
}

.gilda-photo img {
    width: 200px; /* Fixed width for profile photo */
    height: 200px; /* Fixed height for profile photo */
    object-fit: cover; /* Ensures image covers area without distorting */
    border-radius: 50%; /* Makes it a circle */
    border: 3px solid var(--color-accent); /* Elegant border */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gilda-text-content {
    text-align: center; /* Center text on smaller screens */
    max-width: 400px;
}

.gilda-text-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8em;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.gilda-text-content p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 30px;
}

.gilda-links {
    display: flex;
    flex-wrap: wrap; /* Allow links to wrap on small screens */
    justify-content: center;
    gap: 20px; /* Space between buttons */
    margin-top: 20px;
}

/* Re-use elegant-button styles or define them here */
.elegant-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--color-accent);
    color: white;
    font-family: var(--font-heading);
    font-size: 1em;
    text-decoration: none;
    border: 1px solid var(--color-accent);
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.elegant-button:hover {
    background-color: #660010; /* A darker burgundy */
    border-color: #660010;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* --- Contribute Section (Optional) --- */
.contribute-section {
    padding: 40px 20px;
    text-align: center;
    background-color: #FDFDFD;
    border-top: 1px dashed var(--color-light-border); /* Subtle separator */
    margin-top: 40px;
}

.contribute-section h3 {
    font-family: var(--font-heading);
    font-size: 1.6em;
    color: var(--color-text-dark);
    margin-bottom: 20px;
}


/* --- Responsive Adjustments --- */
@media (min-width: 768px) {
    .gilda-info-block {
        flex-direction: column; /* Side-by-side on larger screens */
        text-align: center; /* Align text left when side-by-side */
        gap: 30px; /* instead of 40px */
    }

    .gilda-text-content {
        text-align: center;
    }

    .gilda-links {
        justify-content: flex-start; /* Align buttons left when side-by-side */
    }
}

@media (max-width: 600px) {
    .page-title {
        font-size: 1.8em;
    }
    .intro-section,
    .gilda-text-content p {
        font-size: 1em;
    }
    .gilda-links {
        flex-direction: column; /* Stack buttons on very small screens */
        justify-content: center;
    }
    
    .elegant-button {
        width: 80%; /* Make buttons wider on small screens */
        max-width: 300px;
    }
}