/* Modern Family History Site - Updated 2025 */

/* Modern CSS Variables */
:root {
    /* Updated Color Palette - Modern & Sophisticated */
    --primary-color: #2D3561;        /* Deep navy blue */
    --primary-light: #4A5895;        
    --secondary-color: #C17B5D;      /* Warm terracotta */
    --secondary-light: #D99982;
    --accent-color: #E8A87C;         /* Soft gold */
    --accent-dark: #C17B5D;
    
    /* Neutral Colors */
    --text-color: #2C3E50;
    --text-light: #5D6D7E;
    --bg-color: #F5F7FA;
    --bg-secondary: #FFFFFF;
    --border-color: #E1E8ED;
    
    /* Modern Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #E8E8E8;
        --text-light: #B8B8B8;
        --bg-color: #1A1A1A;
        --bg-secondary: #2A2A2A;
        --border-color: #3A3A3A;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--bg-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll offset for anchor links to account for sticky navigation */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Height of sticky navigation + some padding */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }

/* Page Headers - Unified Style */
.page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 3px solid var(--accent-color);
}

.page-header h1 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.page-header .page-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Article specific header adjustments */
.article-header.page-header {
    margin-bottom: var(--spacing-lg);
}

.article-header .article-meta {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    margin: var(--spacing-sm) 0;
    text-align: center;
    display: block;
    width: 100%;
}

.article-header .video-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin: var(--spacing-sm) 0;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

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

a:hover {
    color: var(--accent-dark);
}

/* Modern Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.site-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-sm);
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.site-title a {
    color: white;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.site-title a:hover {
    opacity: 0.9;
}

.site-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 400;
    font-style: italic;
    position: relative;
    z-index: 1;
    font-family: 'Playfair Display', Georgia, serif;
}

/* Modern Navigation */
/* ============================================
   NAVIGATION - Standard Hugo Approach
   ============================================ */

.navigation {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.navigation .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

/* Hide menu toggle by default (desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Desktop navigation menu */
.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Main Content */
.main-content {
    padding: var(--spacing-xl) 0;
    min-height: 70vh;
}

/* Modern Hero Section */
.hero-section {
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-xl);
}

.hero-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 800;
}

.hero-text {
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-light);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    padding: 0 var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--bg-color) 0%, white 100%);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base);
}

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

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

/* Modern Grid Layouts */
.biographies-grid,
.items-grid,
.events-grid,
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

/* Modern Cards */
.biography-card,
.item-card,
.event-card,
.link-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.biography-card::before,
.item-card::before,
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.biography-card:hover::before,
.item-card:hover::before,
.event-card:hover::before {
    transform: scaleY(1);
}

.biography-card:hover,
.item-card:hover,
.event-card:hover,
.link-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.link-card {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    background: linear-gradient(135deg, white 0%, var(--bg-color) 100%);
}

.biography-card h3,
.item-card h3,
.event-card h3,
.link-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 3.9rem; /* 2 lines * 1.3 line-height * 1.5rem font-size */
    position: relative;
    cursor: help;
}

.biography-card h3:hover,
.item-card h3:hover,
.event-card h3:hover {
    overflow: visible;
    -webkit-line-clamp: unset;
    background: white;
    z-index: 10;
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-sm);
    margin: calc(-1 * var(--spacing-sm));
    border-radius: var(--radius-sm);
}

.link-card h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    -webkit-line-clamp: unset;
    overflow: visible;
}

.link-card p {
    color: var(--text-light);
    line-height: 1.6;
}

.bio-image,
.item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-base);
}

.biography-card:hover .bio-image,
.item-card:hover .item-image {
    transform: scale(1.05);
}

.bio-years,
.item-years {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.bio-preview,
.item-description,
.event-card p {
    color: var(--text-light);
    line-height: 1.7;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.biography-card .btn,
.item-card .btn,
.event-card .btn {
    margin-top: auto;
    align-self: center;
    width: fit-content;
}

/* Modern Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(45, 53, 97, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 53, 97, 0.4);
}

.btn--secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(193, 123, 93, 0.3);
}

.btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 123, 93, 0.4);
}

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

/* Modern Sections */
section {
    margin: var(--spacing-xl) 0;
}

section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-md);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Highlights Section */
.highlights-section,
.quick-links {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin: var(--spacing-xl) 0;
}

/* Single Content Page */
.single-content {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.article-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-weight: 800;
}

.article-meta {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    display: block;
    width: 100%;
}

.article-description {
    color: var(--text-light);
    font-size: 1.15rem;
    font-style: italic;
    margin-top: var(--spacing-md);
    line-height: 1.7;
}

.article-image {
    text-align: center;
    margin: var(--spacing-xl) 0;
}

.article-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content h2 {
    color: var(--primary-color);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

.article-content h3 {
    color: var(--secondary-color);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.article-content h4 {
    color: var(--text-color);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.article-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
}

.article-content ul,
.article-content ol {
    margin: var(--spacing-md) 0 var(--spacing-md) var(--spacing-lg);
}

.article-content li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.article-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Related People */
.related-people {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--secondary-color);
}

.related-people h3 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
}

.related-people ul {
    list-style: none;
}

.related-people li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.related-people li:last-child {
    border-bottom: none;
}

/* Page Navigation */
.page-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
    gap: var(--spacing-md);
}

.page-navigation a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.page-navigation a:hover {
    background: var(--bg-color);
    color: var(--secondary-color);
    transform: translateX(5px);
}

.page-navigation .prev-link:hover {
    transform: translateX(-5px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Family Tree */
.family-tree-controls {
    margin-bottom: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

#familyTreeNetwork {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: white;
}

.family-tree-legend,
.timeline-legend {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.family-tree-legend h3,
.timeline-legend h3 {
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.family-tree-legend h3::after,
.timeline-legend h3::after {
    display: none;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs);
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.legend-line {
    width: 40px;
    height: 0;
    border-top: 3px solid;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Timeline */
.timeline-info {
    margin-top: var(--spacing-lg);
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    border-top: 4px solid var(--accent-color);
}

.footer p {
    color: rgba(255, 255, 255, 0.9);
}

/* Gallery Enhancements */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.gallery-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    padding: var(--spacing-md);
}

.gallery-caption {
    padding: var(--spacing-md);
}

.gallery-caption h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
    font-size: 1.25rem;
}

.gallery-year {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: var(--spacing-sm);
    }
    
    .nav-link {
        text-align: center;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .biographies-grid,
    .items-grid,
    .events-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .single-content {
        padding: var(--spacing-md);
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .page-navigation {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .legend-items {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .navigation,
    .footer,
    .family-tree-controls,
    .btn {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    body {
        background: white;
    }
    
    .single-content,
    .hero-section,
    .highlights-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Video Embeds */
.youtube-embed {
    margin: 2rem 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-caption {
    text-align: center;
    margin-top: var(--spacing-sm);
    color: var(--text-light);
    font-style: italic;
    font-size: 0.95rem;
}

/* Accessibility */
.btn:focus,
.nav-link:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Back to Top Button Enhancement */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 999;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px; /* Offset for header/spacing to ensure content is visible */
}

/* Footnotes styling */
.footnotes {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.footnotes ol {
    padding-left: var(--spacing-lg);
}

.footnotes li {
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.footnotes li:target {
    background-color: rgba(193, 123, 93, 0.1);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    animation: highlight-footnote 2s ease;
}

@keyframes highlight-footnote {
    0% {
        background-color: rgba(193, 123, 93, 0.3);
    }
    100% {
        background-color: rgba(193, 123, 93, 0.1);
    }
}

/* Footnote reference links in text */
.footnote-ref {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.footnote-ref:hover {
    color: var(--primary-color);
}

/* Back to content link in footnotes */
.footnote-backref {
    text-decoration: none;
    color: var(--secondary-color);
    margin-left: var(--spacing-xs);
    transition: color var(--transition-fast);
}

.footnote-backref:hover {
    color: var(--primary-color);
}

/* ============================================
   TABLE OF CONTENTS - Standard Hugo Approach
   ============================================ */

.table-of-contents {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.08) 0%, rgba(193, 123, 93, 0.08) 100%);
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.toc-details {
    cursor: pointer;
}

.toc-summary {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.toc-summary::-webkit-details-marker {
    display: none;
}

.toc-summary svg {
    flex-shrink: 0;
}

.toc-content {
    padding: var(--spacing-md) 0 0 0;
}

.toc-content nav {
    padding: 0;
}

.toc-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-content ul ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.toc-content li {
    margin: 0.5rem 0;
}

.toc-content a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.toc-content a:hover {
    background: rgba(193, 123, 93, 0.1);
    color: var(--secondary-color);
    padding-left: 1rem;
}

.toc-content a.active {
    background: rgba(193, 123, 93, 0.15);
    color: var(--secondary-color);
    font-weight: 600;
    border-left: 3px solid var(--secondary-color);
    padding-left: calc(1rem - 3px);
}

/* ============================================
   MOBILE NAVIGATION - Standard Responsive Approach
   ============================================ */

@media (max-width: 768px) {
    /* Show menu toggle button on mobile */
    .menu-toggle {
        display: flex;
    }
    
    /* Hamburger animation when active */
    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Mobile navigation menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 85%;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        padding: 4rem 1.5rem 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    /* Show menu when active */
    .nav-menu.active {
        right: 0;
    }
    
    /* Mobile menu items */
    .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        font-size: 1.05rem;
        text-align: left;
    }
    
    .nav-link.active {
        border-left: 3px solid var(--primary-color);
        padding-left: calc(1rem - 3px);
    }
    
    /* TOC adjustments for mobile */
    .table-of-contents {
        padding: var(--spacing-sm);
    }
    
    .toc-summary {
        font-size: 1rem;
    }
    
    .toc-content a {
        font-size: 0.9rem;
        padding: 0.4rem 0.5rem;
    }
}
