/*
Theme Name: Texas Rules of Evidence - Yale Blue
Description: Modern professional theme with Yale blue colors and complete rule listings
Version: 3.5
Author: Manus AI
*/

/* Import Google Fonts - Manrope for headings, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables for modern design with Yale blue */
:root {
    --yale-blue: #0e5698;
    --royal-blue: #03183d;
    --light-blue: #3282b8;
    --primary-dark: #1A1A1A;
    --secondary-dark: #2D2D2D;
    --text-light: #666666;
    --text-dark: #1A1A1A;
    --white: #FFFFFF;
    --light-gray: #F8F8F8;
    --border-color: #E5E5E5;
    --accent-blue: #4A90E2;
    --accent-purple: #7B68EE;
    --accent-teal: #50C9C3;
    --background-primary: #ffffff;
    --background-secondary: #f8f8f8;
    --background-tertiary: #f1f1f1;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.7;
}ar(--background-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* Typography - Sharp, modern fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { 
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin: 2rem 0 1rem 0;
    border-left: none !important;
    padding-left: 0 !important;
}
h3 { 
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.7;
}

a {
    color: var(--yale-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Header Styles - UXpert-inspired */
.site-header {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--yale-blue) 100%);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.site-title {
    text-align: center;
    font-size: 3.2rem;
    font-weight: 800;
    margin: 0;
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-title a:hover {
    color: var(--white);
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Content Area */
.main-content {
    display: flex;
    gap: 3rem;
    margin: 3rem 0;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Homepage Styles */
.homepage .main-content {
    display: block;
}

.homepage-intro {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0;
    background: none;
    color: var(--text-primary);
    position: relative;
}

.hero-section {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--yale-blue) 100%);
    padding: 6rem 2rem;
    margin: -3rem -2rem 4rem -2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero-effective-date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.25rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

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

.hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.section-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.toc-card {
    background: var(--background-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--royal-blue), var(--yale-blue));
}

.toc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--yale-blue);
}

.toc-card h2 {
    color: var(--primary-dark);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.01em;
}

.rule-list {
    list-style: none;
    padding: 0;
}



.rule-list a,
.toc-card .rule-list a {
    color: var(--text-light) !important;
    text-decoration: none !important;
    padding: 1rem 1.25rem !important;
    display: block !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.3s ease !important;
    border-left: 3px solid transparent !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    background-color: rgba(248, 248, 248, 0.8) !important;
    border: 1px solid var(--border-color) !important;
}

.rule-list a:hover,
.toc-card .rule-list a:hover {
    background-color: rgba(14, 86, 152, 0.1) !important;
    color: var(--yale-blue) !important;
    border-left-color: var(--yale-blue) !important;
    transform: translateX(6px) !important;
    font-weight: 600 !important;
    border-color: var(--yale-blue) !important;
}

/* Sidebar Styles */
.sidebar {
    width: 350px;
    background: var(--background-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    height: fit-content;
    position: sticky;
    top: 6rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.sidebar h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.01em;
}

.sidebar h3 a {
    color: var(--yale-blue);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.sidebar h3 a:hover {
    color: var(--primary-dark);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
    display: block;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background-color: rgba(245, 166, 35, 0.05);
    color: var(--yale-blue);
    border-left-color: var(--yale-blue);
    transform: translateX(4px);
    font-weight: 600;
}

.sidebar-nav a.current {
    background-color: var(--yale-blue);
    color: var(--white);
    border-left-color: var(--primary-dark);
    font-weight: 600;
}

/* Rule Content Styles */
.rule-content {
    background: var(--background-primary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.rule-title {
    color: var(--primary-dark);
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border: none !important;
    border-left: none !important;
    border-bottom: none !important;
    font-weight: 800;
    line-height: 1.2;
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.02em;
}

.rule-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-family: 'Manrope', sans-serif;
}

.rule-text p {
    margin-bottom: 1rem;
}

.rule-text h3, .rule-text h4 {
    color: var(--primary-dark);
    margin: 2.5rem 0 1.25rem 0;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.01em;
}

.rule-text h3 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.rule-text h4 {
    font-size: 1.3rem;
}

.rule-text strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.rule-text ol, .rule-text ul {
    margin: 2rem 0;
    padding-left: 2.5rem;
}

.rule-text li {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Notes and Comments */
.notes-comments {
    background: linear-gradient(135deg, var(--background-tertiary) 0%, var(--background-secondary) 100%);
    padding: 2rem;
    margin-top: 3rem;
    border-left: 5px solid var(--yale-blue);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: var(--shadow-sm);
}

.notes-comments h4 {
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Footer */
.site-footer {
    background: #0e5698 !important;
    color: #FFFFFF !important;
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
}

.site-footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.site-footer a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Force footer to be yale blue */
footer, .site-footer, footer.site-footer {
    background: #0e5698 !important;
    background-color: #0e5698 !important;
}

footer *, .site-footer *, footer.site-footer * {
    color: #FFFFFF !important;
}

/* Force all headings to have no border */
h1, h2, h3, h4, h5, h6, 
.rule-title, .rule-content h1, .rule-content h2, .rule-content h3,
article h1, article h2, article h3, .content h1, .content h2, .content h3 {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    padding-left: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {{
    .container {
        padding: 0 1.5rem;
    }
    
    .sidebar {
        width: 320px;
    }
    
    .toc-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 1024px) {
    .main-content {
        gap: 2rem;
    }
    
    .sidebar {
        width: 300px;
        padding: 2rem;
    }
    
    .rule-content {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-top: 2rem;
        padding: 2rem;
    }
    
    .site-title {
        font-size: 2.25rem;
    }
    
    .rule-title {
        font-size: 2rem;
    }
    
    .rule-content {
        padding: 2rem;
    }
    
    .hero-section {
        padding: 4rem 1.5rem;
        margin: -3rem -1rem 3rem -1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1.1rem;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .toc-card {
        padding: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.875rem;
    }
    
    .hero-section {
        padding: 3rem 1rem;
        margin: -3rem -1rem 2rem -1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-stat-number {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .rule-title {
        font-size: 1.75rem;
    }
    
    .rule-content {
        padding: 1.5rem;
    }
    
    .sidebar {
        padding: 1.5rem;
    }
    
    .toc-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .site-header,
    .site-footer {
        display: none;
    }
    
    .main-content {
        display: block;
    }
    
    .rule-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .rule-title {
        font-size: 18pt;
        page-break-after: avoid;
    }
    
    .rule-text h3,
    .rule-text h4 {
        page-break-after: avoid;
    }
}

/* Focus and Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--yale-blue);
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rule-content,
.toc-card {
    animation: fadeIn 0.6s ease-out;
}

/* Selection Styles */
::selection {
    background-color: var(--yale-blue);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--yale-blue);
    color: var(--white);
}

/* Hierarchical indentation with modern styling */
/* Level 0 - Base level (no padding-left) */
.rule-content p:not([style*="padding-left"]) {
    border-left: 4px solid #e0e7ff;
    background: linear-gradient(to right, #f0f4ff 0%, #ffffff 100%);
    padding: 1rem 1.25rem;
    padding-left: 1.5rem !important;
    margin: 0.75rem 0;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rule-content p:not([style*="padding-left"]):hover {
    border-left-color: var(--yale-blue);
    background: linear-gradient(to right, #e0e7ff 0%, #f8faff 100%);
    box-shadow: 0 2px 6px rgba(14, 86, 152, 0.1);
    transform: translateX(2px);
}

/* Level 1 - First indentation (40px) */
.rule-content p[style*="padding-left: 40px"] {
    padding-left: 2.5rem !important;
    border-left: 4px solid #93c5fd;
    background: linear-gradient(to right, #dbeafe 0%, #f0f9ff 100%);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.08);
    transition: all 0.3s ease;
}

.rule-content p[style*="padding-left: 40px"]:hover {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, #bfdbfe 0%, #dbeafe 100%);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.15);
    transform: translateX(2px);
}

/* Level 2 - Second indentation (80px) */
.rule-content p[style*="padding-left: 80px"] {
    padding-left: 4rem !important;
    border-left: 4px solid #5eead4;
    background: linear-gradient(to right, #ccfbf1 0%, #f0fdfa 100%);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(20, 184, 166, 0.08);
    transition: all 0.3s ease;
}

.rule-content p[style*="padding-left: 80px"]:hover {
    border-left-color: #14b8a6;
    background: linear-gradient(to right, #99f6e4 0%, #ccfbf1 100%);
    box-shadow: 0 3px 8px rgba(20, 184, 166, 0.15);
    transform: translateX(2px);
}

/* Level 3 - Third indentation (120px) */
.rule-content p[style*="padding-left: 120px"] {
    padding-left: 5.5rem !important;
    border-left: 4px solid #c4b5fd;
    background: linear-gradient(to right, #ede9fe 0%, #faf5ff 100%);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.08);
    transition: all 0.3s ease;
}

.rule-content p[style*="padding-left: 120px"]:hover {
    border-left-color: #8b5cf6;
    background: linear-gradient(to right, #ddd6fe 0%, #ede9fe 100%);
    box-shadow: 0 3px 8px rgba(139, 92, 246, 0.15);
    transform: translateX(2px);
}

/* Level 4 - Fourth indentation (160px) */
.rule-content p[style*="padding-left: 160px"] {
    padding-left: 7rem !important;
    border-left: 4px solid #fda4af;
    background: linear-gradient(to right, #fecdd3 0%, #fff1f2 100%);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(244, 63, 94, 0.08);
    transition: all 0.3s ease;
}

.rule-content p[style*="padding-left: 160px"]:hover {
    border-left-color: #f43f5e;
    background: linear-gradient(to right, #fda4af 0%, #fecdd3 100%);
    box-shadow: 0 3px 8px rgba(244, 63, 94, 0.15);
    transform: translateX(2px);
}

/* Level 5 - Fifth indentation (200px) */
.rule-content p[style*="padding-left: 200px"] {
    padding-left: 8.5rem !important;
    border-left: 4px solid #fcd34d;
    background: linear-gradient(to right, #fef3c7 0%, #fefce8 100%);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1.25rem;
    margin: 0.75rem 0;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.08);
    transition: all 0.3s ease;
}

.rule-content p[style*="padding-left: 200px"]:hover {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fde68a 0%, #fef3c7 100%);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.15);
    transform: translateX(2px);
}

/* Navigation between rules - modern button styling */
.rule-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0 2rem 0;
    padding: 2.5rem 0 0 0;
    border-top: 2px solid var(--border-color);
}

.nav-previous, .nav-next {
    display: flex;
    flex-direction: column;
}

.nav-link {
    text-decoration: none;
    padding: 1.75rem 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--yale-blue) 0%, var(--royal-blue) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    border-color: var(--yale-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(14, 86, 152, 0.25);
}

.nav-link:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 86, 152, 0.2);
}

.nav-direction {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--yale-blue);
    margin-bottom: 0.75rem;
    font-family: 'Manrope', sans-serif;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.nav-link:hover .nav-direction {
    color: rgba(255, 255, 255, 0.9);
}

.nav-title {
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'Manrope', sans-serif;
    color: var(--text-dark);
    line-height: 1.4;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.nav-link:hover .nav-title {
    color: var(--white);
}

/* Add arrow icons to navigation buttons */
.nav-previous .nav-link::after {
    content: '←';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    color: var(--white);
}

.nav-previous .nav-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

.nav-next .nav-link::after {
    content: '→';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    color: var(--white);
}

.nav-next .nav-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}

/* Adjust text alignment for navigation */
.nav-previous .nav-link {
    text-align: left;
    padding-left: 2rem;
}

.nav-next .nav-link {
    text-align: right;
    padding-right: 2rem;
}


/* FINAL OVERRIDES - MUST BE LAST */
* h1, * h2, * h3, * h4, * h5, * h6 {
    border: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    padding-left: 0 !important;
}

body h1, body h2, body h3, body h4, body h5, body h6 {
    border: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    padding-left: 0 !important;
}

html body footer, html body .site-footer {
    background: #0e5698 !important;
    background-color: #0e5698 !important;
}

html body footer *, html body .site-footer * {
    color: #FFFFFF !important;
}
