@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');
/* General Reset and Root Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --liturgical-color: #ffffff;
    --liturgical-color-shade: #f0f0f0;
  --header-height: 80px; /* previously 120px */
  --footer-height: 60px; /* previously 100px */

    --clergy-card-width: 250px;
}

/* Fix scrollbar issue - hide scrollbars on body and html */
body, html {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    overflow: auto; /* Hide body scrollbar */
}

body.modal-open {
  overflow: hidden;
}
/* Liturgical Background Class */
.liturgical-bg {
    background-color: var(--liturgical-color);
    background: linear-gradient(135deg, var(--liturgical-color) 0%, var(--liturgical-color-shade) 100%);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    max-width: 1200px;
    margin: 0 auto;
}

header .header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Fix logo squeezing on desktop - add min-width */
header .logo {
    width: auto; /* Changed to auto to accommodate full logo */
    height: 70px; /* Increased height to prevent cropping */
    min-width: 80px; /* Prevent logo from getting squeezed below this width */
    background: transparent; /* Remove white background */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px; /* Add small padding to prevent edge cropping */
    overflow: hidden; /* Ensure rounded corners work properly */
    flex-shrink: 0; /* Prevent logo from shrinking when space is tight */
}

header .logo img {
    width: auto; /* Auto width to maintain aspect ratio */
    height: 100%;
    object-fit: contain; /* Use contain to show full logo without cropping */
    border-radius: 4px; /* Smaller radius since container has padding */
}

header .title h1 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 2px;
}

header .title p {
    font-size: 13px;
    opacity: 0.9;
}

.nav-desktop {
    display: flex;
    gap: 24px;
}

.nav-desktop a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-desktop a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

#mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: var(--liturgical-color);
    position: fixed;
    top: var(--header-height);
    width: 100%;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    color: white;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    font-weight: 500;
}

.mobile-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fix Issue 2: Main Content with proper scrollbar */
main {
    position: fixed;
    top: var(--header-height);
    bottom: var(--footer-height);
    left: 0;
    right: 0;
    overflow-y: auto; /* Only main content scrolls */
    overflow-x: hidden;
}

/* Remove hero-specific styling - make it a regular section */
.hero {
    background: #f8f9fa; /* Simple background instead of image */
    color: #333; /* Dark text instead of white */
    text-align: center;
    /* Remove all positioning, height, and overlay styles */
}

/* Remove hero overlay - no longer needed */
.hero-overlay {
    display: none;
}

.hero-content {
    /* Remove positioning and z-index - treat as normal content */
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 36px; /* Match section h3 size for consistency */
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--liturgical-color); /* Use liturgical color like other sections */
}

.hero-content h2 span {
    color: #ffd700;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #555; /* Match other section text color */
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--liturgical-color); /* Use liturgical color */
    color: white; /* White text on liturgical background */
}

.btn-primary:hover {
    background-color: var(--liturgical-color-shade);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--liturgical-color); /* Liturgical color text */
    border: 2px solid var(--liturgical-color); /* Liturgical color border */
}

.btn-secondary:hover {
    background-color: var(--liturgical-color);
    color: white;
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 30px 20px; /* Reduced from 60px to 30px */
    max-width: 1200px;
    margin: 0 auto;
}

.section h3 {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--liturgical-color);
    font-weight: 700;
}

.section p {
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* Grid Sections */
.grid-section .grid-container {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 40px;
}

.card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card .icon {
    font-size: 48px;
    color: var(--liturgical-color);
    margin-bottom: 16px;
}

.card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.card p {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.card ul li {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

/* Clergy Section */
.clergy-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

#prev-clergy, #next-clergy {
    background: var(--liturgical-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#prev-clergy:hover, #next-clergy:hover {
    background: var(--liturgical-color-shade);
    transform: scale(1.1);
}

.clergy-cards {
    display: flex;
    gap: 20px;
    overflow: hidden;
    flex: 1;
    justify-content: center;
}

/* Fix Issue 3: Make entire clergy card clickable, remove buttons */
.clergy-card {
    flex: 0 0 var(--clergy-card-width);
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer; /* Make it clear the card is clickable */
}

.clergy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); /* Enhanced hover effect */
}

.clergy-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.clergy-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.clergy-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* Remove view-bio button styles since we're removing the button */

.clergy-card.memoriam {
    opacity: 0.7;
    position: relative;
}

.clergy-card.memoriam::after {
    content: "🕊";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
}

/* Revert clergy bio modal to clean positioning */




.clergy-bio-modal {
  position: fixed;
  top: var(--header-height);
  bottom: var(--footer-height);
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.98); /* More opaque white */
  backdrop-filter: blur(2px); /* Add blur effect to background */
  display: none;
  overflow: hidden;

}

.clergy-bio-modal.active {
  display: block;
}

/* Also ensure the bio content has a solid background */
#bio-content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-top: 50px;
  overflow-y: auto;
  background: white; /* Solid white background */
}

#bio-content iframe {
  width: 100%;
  height: calc(100% - 50px);
  border: none;
  display: block;

}

.close-bio-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    background: white;
    color: #333;
    border: none;
    cursor: pointer;
    z-index: 10002;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.close-bio-button:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}


/* Contact Section */
.contact-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 60px 40px;
}

.contact-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 1fr;
    margin-top: 40px;
}

.contact-info h4, .contact-form h4 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--liturgical-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.reveal-all-btn {
    background: var(--liturgical-color);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reveal-all-btn:hover {
    background: var(--liturgical-color-shade);
}

.contact-value {
    color: #333;
}

.contact-value.hidden {
    color: var(--liturgical-color);
    text-decoration: underline;
    cursor: pointer;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    text-align: left;
}

.contact-info i {
    color: var(--liturgical-color);
    width: 20px;
}

.contact-reveal {
    cursor: pointer;
    color: var(--liturgical-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.contact-reveal:hover {
    color: var(--liturgical-color-shade);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--liturgical-color);
}

.contact-form button {
    background: var(--liturgical-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background: var(--liturgical-color-shade);
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background-color: var(--liturgical-color);
    background: linear-gradient(135deg, var(--liturgical-color) 0%, var(--liturgical-color-shade) 100%);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2px 6px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.footer-content {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 4px;
}

.footer-text-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin: 0 10px;
}

#footer-text {
    font-size: 11px;
    white-space: nowrap;
    transition: transform 0.3s ease;
    line-height: 1.4;
    color: white; /* Ensure consistent color */
}

.footer-arrow {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.footer-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Fix Issue 5: Footer subtext color consistency */
.footer-subtext {
    font-size: 10px;
    color: white; /* Match footer-text color */
    opacity: 1; /* Remove opacity difference to match footer-text */
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: 72px;
        --footer-height: 60px;
    }
    
    .nav-desktop {
        display: none;
    }
    
    #mobile-menu-button {
        display: block;
    }
    
    .hero-content h2 {
        font-size: 28px; /* Match responsive section h3 size */
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section {
        padding: 40px 16px;
    }
    
    .section h3 {
        font-size: 18px;
    }
    
    .grid-section .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-section {
        padding: 40px 20px;
    }
    
    .clergy-cards {
        gap: 10px;
    }
    
    .clergy-card {
        flex: 0 0 220px;
        padding: 16px;
    }
    
    header .title h1 {
        font-size: 18px;
    }
    
    header .title p {
        font-size: 11px;
    }
    
    header .logo {
        width: auto; /* Keep auto width for mobile too */
        height: 60px; /* Increased from 60px to prevent cropping on mobile */
        padding: 1px; /* Smaller padding for mobile */
    }
    
    #footer-text {
        font-size: 10px;
    }
    
    .footer-subtext {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 24px; /* Match mobile section h3 size */
    }
    
    .section h3 {
        font-size: 18px;
    }
    
    .clergy-card {
        flex: 0 0 200px;
        padding: 12px;
    }
    
    .clergy-card img {
        height: 150px;
    }
    
    .clergy-container {
        gap: 8px;
    }
    
    #prev-clergy, #next-clergy {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Clergy Bio Page Styles */
.clergy-bio {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    min-height: 100vh;
}

.clergy-header {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e1e5e9;
}

.clergy-photo {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.clergy-info h1 {
    font-size: 28px;
    color: var(--liturgical-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.clergy-info h2 {
    font-size: 20px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.clergy-info p {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.in-memoriam {
    font-size: 20px;
}

.bio-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.bio-text p {
    margin-bottom: 16px;
    text-align: justify;
}

#exit-bio {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--liturgical-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#exit-bio:hover {
    background: var(--liturgical-color-shade);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .clergy-header {
        flex-direction: column;
        text-align: center;
    }
    
    .clergy-photo {
        width: 150px;
        height: 180px;
    }
    
    .clergy-info h1 {
        font-size: 24px;
    }
    
    .clergy-info h2 {
        font-size: 18px;
    }
}

/* Article Page Styles */
.article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.article-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: #333;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--liturgical-color);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-author {
    font-style: italic;
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    font-weight: 500;
}

.article-quotes {
    background: #f8f9fa;
    border-left: 4px solid var(--liturgical-color);
    padding: 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.article-quotes p {
    font-style: italic;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.article-quotes p:last-child {
    margin-bottom: 0;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--liturgical-color);
    margin: 32px 0 16px 0;
    border-bottom: 2px solid rgba(107, 70, 193, 0.1);
    padding-bottom: 8px;
}

.article-body p {
    margin-bottom: 16px;
    text-align: justify;
    font-size: 16px;
}

/* Footnote styles */
.footnote-ref {
    color: var(--liturgical-color);
    text-decoration: none;
    font-weight: 600;
}

.footnote-ref:hover {
    text-decoration: underline;
}

.footnote-ref sup {
    font-size: 0.85em;
}

#footnotes {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e1e5e9;
    font-size: 14px;
}

#footnotes h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--liturgical-color);
    margin-bottom: 20px;
}

#footnotes ol {
    padding-left: 0;
    margin-left: 0;
     list-style-type: none;
}

#footnotes li {
    margin-bottom: 12px;
    /* REMOVE THE HANGING INDENT CSS */
    /*
    padding-left: 2em;
    position: relative;
    */
    
    /* ADD A NEW PADDING TO INDENT THE ENTIRE LIST ITEM */
    padding-left: 1em; /* Adjust this value as needed */
    scroll-margin-top: calc(var(--header-height) + 20px);
}

#footnotes li.highlight,
#footnotes li:target {
    background: rgba(107, 70, 193, 0.06);
    border-left: 3px solid var(--liturgical-color);
    padding-left: 16px;
    transition: background-color 0.25s ease;
}


.backref {
    text-decoration: none;
    margin-left: 8px;
    color: var(--liturgical-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    font-size: 12px;
    cursor: pointer;
}

.backref:hover {
    background: rgba(107, 70, 193, 0.06);
    text-decoration: none;
}

.backref sup {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1.6;
}

#main-content {
    position: fixed; /* keep fixed! */
    z-index:1;
    top: var(--header-height);
    bottom: var(--footer-height);
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
  contain: layout;
  z-index: 1;
}
#main-content.lock-scroll {
  overflow: hidden;
}




/* Scroll to top button for article */
#scroll-to-top {
    position: fixed;
    right: 20px;
    bottom: calc(var(--footer-height) + 20px);
    z-index: 60;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--liturgical-color);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    pointer-events: none;
    border: none;
    font-size: 18px;
}

#scroll-to-top.show {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

#scroll-to-top:hover {
    transform: translateY(-3px);
}

.scroll-button {
    position: fixed;
    right: 20px;
    z-index: 60;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--liturgical-color);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    border: none;
    font-size: 18px;
    opacity: 0;
    pointer-events: none; /* default hidden */
}

/* Show state (for scroll-to-top) */
.scroll-button.show {
    opacity: 1;
    pointer-events: auto;
}

/* Hover effect */
.scroll-button:hover {
    transform: translateY(-3px);
}

#scroll-to-top {
    bottom: calc(var(--footer-height) + 20px); /* above footer */
}

#scroll-to-toc {
    bottom: 120px; /* manual offset for ToC */
}


/* Article Page Styles */
.article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.article-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: #333;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--liturgical-color);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-author {
    font-style: italic;
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    font-weight: 500;
}

.article-quotes {
    background: #f8f9fa;
    border-left: 4px solid var(--liturgical-color);
    padding: 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.article-quotes p {
    font-style: italic;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.article-quotes p:last-child {
    margin-bottom: 0;
}

.citation {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--liturgical-color);
    margin: 32px 0 16px 0;
    border-bottom: 2px solid rgba(107, 70, 193, 0.1);
    padding-bottom: 8px;
}

.article-body p {
    margin-bottom: 16px;
    text-align: justify;
    font-size: 16px;
}

.article-body blockquote {
    border-left: 4px solid var(--liturgical-color);
    padding: 16px 20px;
    margin: 24px 0;
    background: #f8f9fa;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
    margin-bottom: 8px;
    font-size: 15px;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Footnote styles */
.footnote-ref {
    color: var(--liturgical-color);
    text-decoration: none;
    font-weight: 600;
}

.footnote-ref:hover {
    text-decoration: underline;
}

.footnote-ref sup {
    font-size: 0.85em;
}

#footnotes {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e1e5e9;
    font-size: 14px;
}

#footnotes h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--liturgical-color);
    margin-bottom: 20px;
}

#footnotes ol {
    list-style-type: none; /* Removes the default numbers */
    padding-left: 0;       /* Removes default browser padding */
    margin-left: 0;        /* Removes default browser margin */
}

#footnotes li {
    display: flex;         /* Enables Flexbox on each list item */
    margin-bottom: 12px;   /* Retains your existing spacing */
}

#footnotes li .backref {
    flex-shrink: 0;        /* Prevents the number from shrinking */
    margin-right: 1em;     /* Adds space between the number and the text */
}

#footnotes li p {
    flex-grow: 1;          /* Allows the text to take up the remaining space */
}
#footnotes li sup {
    /* REMOVE THE ABSOLUTE POSITIONING */
    /*
    position: absolute;
    left: 0;
    */
    /* Keep the other styles */
    font-size: 0.85em; /* This font size is inherited from a different rule, but good to keep */
}
#footnotes li.highlight,
#footnotes li:target {
    background: rgba(107, 70, 193, 0.06);
    border-left: 3px solid var(--liturgical-color);
    padding-left: 16px;
    transition: background-color 0.25s ease;
}

.backref {
    text-decoration: none;
    margin-left: 8px;
    color: var(--liturgical-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    font-size: 12px;
    cursor: pointer;
}

.backref:hover {
    background: rgba(107, 70, 193, 0.06);
    text-decoration: none;
}

.backref sup {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1.6;
}

/* Scroll to top button for article */
#scroll-to-top {
    position: fixed;
    right: 20px;
    bottom: calc(var(--footer-height) + 20px);
    z-index: 60;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--liturgical-color);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    pointer-events: none;
    border: none;
    font-size: 18px;
}

#scroll-to-top.show {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

#scroll-to-top:hover {
    transform: translateY(-3px);
}

/* Active navigation link */
.nav-desktop a.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Mobile responsive for article */
@media (max-width: 768px) {
    .article-container {
        margin: 10px;
        padding: 20px 16px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .article-body p {
        font-size: 15px;
    }
    
    #scroll-to-top {
        width: 44px;
        height: 44px;
        right: 16px;
        bottom: calc(var(--footer-height) + 16px);
    }
}



/* Mobile responsive for article */
@media (max-width: 768px) {
    .article-container {
        margin: 10px;
        padding: 20px 16px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .article-body p {
        font-size: 15px;
    }
    
    #scroll-to-top {
        width: 44px;
        height: 44px;
        right: 16px;
        bottom: calc(var(--footer-height) + 16px);
    }
}

/* ===========================
   Articles Page Specific Styles
   =========================== */

   /* Articles Page Specific Styles */
.articles-container {
    max-width: 800px;
    margin: 0 auto;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.articles-container h2 {
    color: var(--liturgical-color);
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.articles-list {
    list-style-type: disc;
    padding-left: 30px;
    line-height: 1.8;
    margin: 0;
}

.article-item {
    margin-bottom: 20px;
}

.article-link {
    color: var(--liturgical-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    display: block;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: var(--liturgical-color-shade);
    text-decoration: underline;
}

.article-author {
    font-size: 16px;
    font-weight: normal;
    color: #666;
    display: block;
    margin-top: 4px;
    font-style: italic;
}

.article-subtitle {
    font-size: 16px;
    font-weight: normal;
    color: #666;
    display: block;
    margin-top: 2px;
    line-height: 1.3;
}

/* Responsive adjustments for Articles page */
@media (max-width: 768px) {
    .articles-container {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .articles-container h2 {
        font-size: 24px;
    }
    
    .articles-list {
        padding-left: 20px;
    }
    
    .article-link {
        font-size: 16px;
    }
    
    .article-author,
    .article-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .articles-container {
        padding: 20px 16px;
    }
    
    .articles-container h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .articles-list {
        padding-left: 16px;
    }
    
    .article-item {
        margin-bottom: 16px;
    }
}

/* ===========================
   Statement Page Specific Styles
   =========================== */

.statement-container {
    max-width: 900px;
    margin: 0 auto;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 50px 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.statement-main-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--liturgical-color);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.3;
}

.statement-subtitle {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.statement-subtitle-detail {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.4;
}

.statement-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--liturgical-color);
    margin: 40px 0 20px 0;
    border-bottom: 2px solid rgba(107, 70, 193, 0.1);
    padding-bottom: 8px;
}

.statement-section-title:first-of-type {
    margin-top: 20px;
}

.statement-text {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;
    text-align: left !important; /* Changed from justify to left */
    max-width: 100%;
}

.statement-list {
    margin: 20px 0;
    padding-left: 0;
    max-width: 100%;
    list-style: none; /* Remove default bullets */
}

.statement-list li {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.statement-list li:before {
    content: "•";
    color: var(--liturgical-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.statement-address {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--liturgical-color);
    font-style: normal;
    line-height: 1.6;
}

.statement-address strong {
    color: var(--liturgical-color);
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.statement-address br + br {
    display: block;
    content: "";
    margin-top: 6px;
}

.statement-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #856404;
    line-height: 1.6;
}

.statement-note p {
    margin: 0;
    font-size: 15px;
}

/* Responsive adjustments for Statement page */
@media (max-width: 768px) {
    .statement-container {
        margin: 10px;
        padding: 40px 25px;
    }
    
    .statement-main-title {
        font-size: 28px;
    }
    
    .statement-subtitle {
        font-size: 16px;
    }
    
    .statement-subtitle-detail {
        font-size: 14px;
    }
    
    .statement-section-title {
        font-size: 20px;
    }
    
    .statement-text {
        font-size: 15px;
        text-align: left;
    }
    
    .statement-list li {
        font-size: 15px;
    }
    
    .statement-address {
        padding: 16px;
    }
    
    .statement-address strong {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .statement-container {
        padding: 30px 20px;
    }
    
    .statement-main-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .statement-section-title {
        font-size: 18px;
        margin: 30px 0 16px 0;
    }
    
    .statement-text {
        font-size: 14px;
    }
    
    .statement-list li {
        font-size: 14px;
        padding-left: 16px;
    }
}