/* Global Styles */
:root {
    --primary-color: #3a5a78;
    --secondary-color: #c19a6b;
    --accent-color: #8b4513;
    --light-bg: #f5f5f5;
    --dark-bg: #2c3e50;
    --text-color: #333;
    --light-text: #f5f5f5;
    --border-color: #ddd;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--accent-color);
    color: white;
}

.section {
    padding: 80px 0;
}

.alt-bg {
    background-color: var(--light-bg);
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

header h1 {
    color: white;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 15px;
}

nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 150px 0;
}

.hero h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Content Layout */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.text-content {
    flex: 1 1 60%;
    min-width: 300px;
}

.sidebar {
    flex: 1 1 30%;
    min-width: 250px;
}

.info-card, .quote-card, .family-tree-preview, .map-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.info-card h4, .quote-card h4, .family-tree-preview h4, .map-container h4 {
    color: var(--accent-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.info-card ul {
    list-style: none;
}

.info-card ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.info-card ul li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.quote-card blockquote {
    font-style: italic;
    border-left: 3px solid var(--secondary-color);
    padding-left: 15px;
    margin-bottom: 10px;
}

.quote-card cite {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--accent-color);
}

.tree-placeholder, .map-placeholder {
    background-color: var(--light-bg);
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    margin-top: 15px;
}

.placeholder-img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Gallery Section */
.gallery-container {
    text-align: center;
}

.gallery-notice {
    margin-bottom: 30px;
}

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

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-placeholder {
    background-color: var(--light-bg);
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gallery-placeholder i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* Timeline Section */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline {
    position: relative;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* Footer Styles */
footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1 1 300px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    box-shadow: var(--shadow);
    position: relative;
}

.close {
    color: var(--accent-color);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--secondary-color);
}

.family-tree-container {
    min-height: 500px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 5px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item::after {
        left: 21px;
    }
    
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .section {
        padding: 50px 0;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline::after {
        left: 21px;
    }
    
    .timeline-item::after {
        left: 11px;
    }
    
    .timeline-item:nth-child(even)::after {
        left: 11px;
    }
}
