/* Catholic Academic Color Palette - Beige/Taupe Scheme */
:root {
    --bg-primary: #F5F1E8;
    /* Cream background */
    --bg-secondary: #FDFBF7;
    /* Off-white */
    --bg-accent: #EAE3D8;
    /* Beige light */

    --text-primary: #2D2D2D;
    /* Charcoal */
    --text-secondary: #4A4A4A;
    /* Dark gray */
    --text-muted: #7A6F65;
    /* Warm gray */

    --accent-primary: #9B8B7E;
    /* Taupe */
    --accent-hover: #85766A;
    /* Taupe dark */

    --border-light: #E5DDD2;
    /* Beige border */
    --border-medium: #D4C8BD;
    /* Beige medium */
    --border-dark: #9B8B7E;
    /* Taupe */
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.serif {
    font-family: 'Merriweather', serif;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* Academic Typography Improvements */
p {
    line-height: 1.9;
    text-align: justify;
    hyphens: auto;
    margin-bottom: 1.25rem;
}

p.leading-relaxed {
    line-height: 2;
}

/* Headings - Academic Style */
h1 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 {
    line-height: 1.3;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

h3 {
    line-height: 1.4;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

h4,
h5,
h6 {
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* Academic Blockquotes */
blockquote {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2rem 0;
    border-left: 4px solid var(--accent-primary);
    background-color: var(--bg-accent);
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.9;
}

blockquote:before {
    content: '"';
    position: absolute;
    left: 0.5rem;
    top: -0.25rem;
    font-size: 4rem;
    color: var(--border-medium);
    font-family: Georgia, serif;
    opacity: 0.3;
    line-height: 1;
}

blockquote p {
    margin-bottom: 0.5rem;
}

/* Footnotes and References */
.footnote {
    font-size: 0.875rem;
    color: var(--text-muted);
    vertical-align: super;
    line-height: 0;
}

.reference {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Enhanced Lists */
ul li,
ol li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

/* Academic Citations */
.citation {
    font-size: 0.9rem;
    color: var(--text-muted);
    background-color: var(--bg-accent);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-style: italic;
}

/* Emphasis Styles */
em {
    color: var(--text-secondary);
    font-style: italic;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 350px;
    max-height: 400px;
}

.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(155, 139, 126, 0.1), 0 2px 4px -1px rgba(155, 139, 126, 0.06);
}

.active-tab {
    border-bottom: 2px solid #D97706;
    color: #92400E;
    font-weight: 600;
}

.inactive-tab {
    color: #9CA3AF;
}

.step-line {
    position: absolute;
    left: 19px;
    top: 30px;
    bottom: -30px;
    width: 2px;
    background-color: #FDE68A;
    z-index: 0;
}

.step-item:last-child .step-line {
    display: none;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Scroll margin for sections to account for fixed nav */
.scroll-mt-20 {
    scroll-margin-top: 5rem;
}

/* Line clamp utilities */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.line-clamp-none {
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* Hover effects */
.hover-rise {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-rise:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(155, 139, 126, 0.3);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-accent);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .step-line {
        left: 19px;
    }
}

/* Section Decorative Elements */
section {
    position: relative;
}

.section-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Gradient Dividers */
.gradient-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
    margin: 2rem 0;
}

/* Enhanced Shadows */
.deep-shadow {
    box-shadow: 0 10px 40px -10px rgba(155, 139, 126, 0.2),
        0 4px 6px -2px rgba(155, 139, 126, 0.1);
}

/* Stat Numbers */
.stat-number {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Fix line-clamp compatibility */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.line-clamp-none {
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* ============================================ */
/* Tailwind Color Overrides - Beige/Taupe Palette */
/* ============================================ */

/* Background Colors */
.bg-amber-50,
.bg-\[\#FDFBF7\] {
    background-color: var(--bg-secondary) !important;
}

.bg-amber-100 {
    background-color: var(--bg-accent) !important;
}

.bg-amber-300 {
    background-color: var(--border-medium) !important;
}

.bg-amber-600 {
    background-color: var(--accent-primary) !important;
}

.bg-amber-700 {
    background-color: var(--accent-hover) !important;
}

.bg-amber-800,
.bg-amber-900 {
    background-color: var(--text-primary) !important;
}

/* Text Colors */
.text-amber-50 {
    color: var(--bg-secondary) !important;
}

.text-amber-300 {
    color: var(--border-medium) !important;
}

.text-amber-600 {
    color: var(--text-muted) !important;
}

.text-amber-700 {
    color: var(--accent-primary) !important;
}

.text-amber-800 {
    color: var(--text-secondary) !important;
}

.text-amber-900 {
    color: var(--text-primary) !important;
}

/* Border Colors */
.border-amber-200 {
    border-color: var(--border-light) !important;
}

.border-amber-300 {
    border-color: var(--border-medium) !important;
}

.border-amber-500,
.border-amber-600 {
    border-color: var(--accent-primary) !important;
}

.border-amber-700 {
    border-color: var(--accent-hover) !important;
}

/* Hover States */
.hover\:bg-amber-200:hover {
    background-color: var(--border-light) !important;
}

.hover\:text-amber-900:hover {
    color: var(--text-primary) !important;
}

/* Selection */
.selection\:bg-amber-200::selection {
    background-color: var(--border-light) !important;
}

.selection\:text-amber-800::selection {
    color: var(--text-secondary) !important;
}