/* ============================================
   FAMILY HISTORY WEBSITE - UNIVERSAL STYLES
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Uncial+Antiqua&display=swap');

/* Color Palette - Easy to customize */
:root {
    --primary-color: #2c4a3e;      /* Deep forest green */
    --secondary-color: #8b7355;    /* Warm brown */
    --accent-color: #c9a959;       /* Gold accent */
    --light-bg: #f5f2eb;           /* Cream background */
    --dark-text: #333333;          /* Main text */
    --light-text: #ffffff;         /* Light text */
    --border-color: #d4c5b0;       /* Subtle borders */
    
    /* Font families */
    --font-gaelic: 'Uncial Antiqua', cursive;
    --font-body: 'EB Garamond', Georgia, serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    background-color: #ffffff;
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e0e0e0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-gaelic);
    color: #009A44;  /* Kelly green */
    text-decoration: none;
    font-size: 1.6rem;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-contact {
    font-family: var(--font-gaelic);
    color: #009A44;  /* Kelly green */
    text-decoration: none;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.nav-contact:hover {
    opacity: 0.7;
}

/* Hide the old nav-links on all pages */
.nav-links {
    display: none;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #009A44;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   MAIN CONTENT AREAS
   ============================================ */

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}
/* Page Titles */
.page-title {
    font-family: var(--font-gaelic);
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 1rem;
}

.page-subtitle {
    font-family: var(--font-body);
    text-align: center;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

/* Content Sections */
.content-section {
    background-color: var(--light-text);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--accent-color);
}

.content-section h2 {
    font-family: var(--font-gaelic);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-section p {
    font-family: var(--font-body);
    margin-bottom: 1rem;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

.landing-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.landing-logo {
    max-width: 300px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.landing-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.landing-text {
    margin-top: 2rem;
    color: var(--secondary-color);
    font-style: italic;
    font-size: 1.2rem;
}

.landing-hint {
    margin-top: 1rem;
    color: var(--accent-color);
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
<style>
/* Table of Contents Search Styles */
.toc-search-container {
    max-width: 500px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
}

.toc-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.toc-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #8B7355;
    border-radius: 8px;
    background-color: #FFFEF9;
    color: #2C2416;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.toc-search-input:focus {
    outline: none;
    border-color: #6B5344;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.2);
}

.toc-search-input::placeholder {
    color: #8B7355;
    opacity: 0.7;
}

.toc-search-icon {
    position: absolute;
    left: 0.875rem;
    font-size: 1.1rem;
    pointer-events: none;
    opacity: 0.7;
}

.toc-search-results {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6B5344;
    min-height: 1.5rem;
}

/* Highlight matching text */
.toc-highlight {
    background-color: #F5E6D3;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Hide non-matching items when searching */
.toc-hidden {
    display: none !important;
}

/* Style for sections with no visible items */
.toc-section-hidden {
    display: none !important;
}

/* Smooth transition for showing/hiding */
.toc-main-section,
.toc-subsections li {
    transition: opacity 0.2s ease;
}

/* Clear search button - appears when there's text */
.toc-search-clear {
    position: absolute;
    right: 0.875rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #8B7355;
    opacity: 0.7;
    padding: 0.25rem;
    line-height: 1;
    display: none;
}

.toc-search-clear:hover {
    opacity: 1;
}

.toc-search-clear.visible {
    display: block;
}
</style>

.toc-list {
    list-style: none;
    font-family: var(--font-body);
}

.toc-item {
    margin-bottom: 1rem;
}

.toc-link {
    display: block;
    padding: 1rem 1.5rem;
    background-color: var(--light-text);
    border-left: 4px solid var(--accent-color);
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
}

.toc-link:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding-left: 2rem;
}

.toc-link-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.toc-link-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ============================================
   PHOTO GALLERY
   ============================================ */

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

.photo-card {
    background-color: var(--light-text);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-5px);
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-caption {
    padding: 1rem;
    text-align: center;
    font-family: var(--font-body);
}

.photo-caption h3 {
    font-family: var(--font-gaelic);
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.photo-caption p {
    font-family: var(--font-body);
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ============================================
   REFERENCES PAGE
   ============================================ */

.reference-item {
    background-color: var(--light-text);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    font-family: var(--font-body);
}

.reference-item h3 {
    font-family: var(--font-gaelic);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.reference-item p {
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
}

.reference-link {
    font-family: var(--font-body);
    color: var(--accent-color);
    text-decoration: none;
}

.reference-link:hover {
    text-decoration: underline;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-info {
    text-align: center;
    padding: 2rem;
    font-family: var(--font-body);
}

.contact-email-btn {
    display: inline-block;
    font-family: var(--font-gaelic);
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.contact-email-btn:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PRIVACY POLICY
   ============================================ */

.privacy-section {
    margin-bottom: 2rem;
    font-family: var(--font-body);
}

.privacy-section h2 {
    font-family: var(--font-gaelic);
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.4rem;
}

.privacy-section p {
    font-family: var(--font-body);
    margin-bottom: 1rem;
}

.last-updated {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    font-family: var(--font-body);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    font-family: var(--font-body);
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 1rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    font-family: var(--font-body);
    font-size: 0.9rem;
    opacity: 0.8;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-btn {
        display: block;
    }

    .page-title {
        font-size: 2rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }

.decorative-divider {
    text-align: center;
    margin: 2rem 0;
    color: var(--accent-color);
    font-size: 1.5rem;
}
