/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFCF9;
    color: #1F2937;
    padding-top: 80px;
    /* Space for fixed navbar */
}

h1,
h2,
h3,
.serif-font,
.font-serif,
blockquote {
    font-family: 'Merriweather', serif;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #FFE4E6;
    /* Rose-100 */
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-link {
    font-weight: 500;
    color: #4B5563;
    /* Gray-600 */
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    /* Rounded full */
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #E11D48;
    /* Rose-600 */
    background-color: #FFF1F2;
    /* Rose-50 */
}

/* Typography for Content */
.prose {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
}

.prose h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #be123c;
    /* Rose-700 */
}

.prose h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #b45309;
    /* Amber-700 */
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Catholic Themed Accents */
.text-gold-600 {
    color: #D97706;
}

.border-gold-200 {
    border-color: #FDE68A;
}

.bg-gold-50 {
    background-color: #FFFBEB;
}

.font-sacred {
    font-family: 'Playfair Display', serif;
}

/* Card & Chart Containers */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
    max-height: 400px;
}

@media (min-width: 768px) {
    .chart-container {
        height: 400px;
    }
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tabs */
.tab-active {
    border-bottom: 2px solid #E11D48;
    color: #E11D48;
    font-weight: 600;
}

.tab-inactive {
    color: #6B7280;
}

.tab-inactive:hover {
    color: #E11D48;
}

/* ===== Custom Animations ===== */
@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }
}

.animate-heartbeat {
    animation: heartbeat 2s infinite ease-in-out;
}

/* ===== Page Navigation (Bottom) ===== */
.page-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.nav-link-prev {
    color: #6B7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link-prev:hover {
    color: #E11D48;
}

.nav-btn-next {
    background-color: #D97706;
    /* Amber-600 / Gold */
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.nav-btn-next:hover {
    background-color: #B45309;
    /* Amber-700 */
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== TOC Sidebar ===== */
.toc-sidebar {
    position: sticky;
    top: 100px;
    background-color: #FAFAFA;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc-sidebar h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #374151;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E11D48;
}

.toc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-sidebar li {
    margin-bottom: 0.75rem;
}

.toc-sidebar a {
    display: block;
    color: #4B5563;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.toc-sidebar a:hover,
.toc-sidebar a.active {
    color: #E11D48;
    border-left-color: #E11D48;
    background-color: #FFF1F2;
}

/* ===== Academic Typography ===== */
.academic-body {
    font-family: 'Merriweather', 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #1F2937;
    text-align: justify;
    hyphens: auto;
}

.academic-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #881337;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #FECDD3;
}

.academic-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #92400E;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.academic-body p {
    margin-bottom: 1.25rem;
}

.academic-body blockquote {
    font-style: italic;
    border-left: 4px solid #E11D48;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #FFF1F2;
    border-radius: 0 8px 8px 0;
    color: #881337;
}

/* ===== APA References ===== */
.apa-references {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #E5E7EB;
}

.apa-references h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1.5rem;
}

.apa-references ul {
    list-style: none;
    padding: 0;
}

.apa-references li {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 2rem;
    text-indent: -2rem;
    color: #4B5563;
}

.apa-references li em {
    font-style: italic;
}

/* ===== Two-Column Layout for Content Pages ===== */
.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 1024px) {
    .content-layout {
        grid-template-columns: 250px 1fr;
        gap: 3rem;
    }
}

.main-content {
    min-width: 0;
}