

/* Paginator in DataTable */
.ui-datatable .ui-paginator {
    background: unset !important;
    border: none !important;
}

/* SelectOneMenu Label Alignment Fix */
.parallel-view-column-header .ui-selectonemenu .ui-selectonemenu-label {
    padding-top: -0;
    margin-top: -2px;
}

/* ========================================
   Typography - Headings
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #212529;
    margin-top: 0;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

/* Responsive heading sizes */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* ========================================
   Typography - Paragraphs
   ======================================== */

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ========================================
   Content Container
   ======================================== */

main {
    min-height: 60vh;
}

/* Outer container with padding - use on section or main */
.content-container {
    padding: 4rem 1rem;
}

/* Inner content wrapper with max-width - use inside content-container */
.content-wrapper {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.content-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-wide {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
}

/* Utility padding classes */
.padding-64 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.padding-32 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.padding-16 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* ========================================
   General Page Styles
   ======================================== */

.page-header {
    text-align: center;
    padding: 2rem 1rem;
}

.page-header h1 {
    margin: 1rem 0;
}

.page-header-subtitle {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.page-header-title {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

@media screen and (max-width: 768px) {
    .page-header-subtitle {
        font-size: 1.1rem;
    }

    .page-header-title {
        font-size: 2rem;
    }
}

/* ========================================
   Featured Document Section
   ======================================== */

.featured-document-section {
    background-color: #f8f9fa;
}

.featured-facsimile {
    margin: 0;
    padding: 0;
}

.featured-facsimile img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.featured-document-title {
    font-size: 1.5rem;
    color: #212529;
    margin-bottom: 1rem;
}

.featured-excerpt {
    color: #495057;
}

.featured-excerpt p {
    line-height: 1.7;
    font-size: 1rem;
}

.featured-document-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
}

.featured-document-link:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    color: white;
}

.featured-document-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

@media screen and (max-width: 768px) {
    .featured-document-title {
        font-size: 1.25rem;
    }
}

/* ========================================
   Hero Document Section (16:9 Format)
   ======================================== */

.hero-document-section {
    margin: 0;
    padding: 0;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-facsimile {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 90%;
    max-width: 980px;
}

.hero-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.hero-excerpt-section {
    background-color: white;
    padding: 3rem 1rem;
}

.hero-excerpt-section .content-wrapper {
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.hero-excerpt-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #212529;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}

.hero-cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
    color: white;
}

.hero-cta-button:focus {
    outline: 3px solid #007bff;
    outline-offset: 3px;
}

@media screen and (max-width: 768px) {
    .hero-image-container {
        height: 400px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-excerpt-text {
        font-size: 1rem;
    }

    .hero-cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-image-container {
        height: 300px;
    }

    .hero-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Slideshow Styles
   ======================================== */

.slideshow-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slideshow-slide {
    display: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.slideshow-slide img {
    display: block;
    width: 100%;
    height: auto;
}

.slideshow-slide figcaption {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

.slideshow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background-color 0.3s;
    z-index: 10;
}

.slideshow-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slideshow-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.slideshow-button-prev {
    left: 0;
}

.slideshow-button-next {
    right: 0;
}

/* ========================================
   Logo Grid
   ======================================== */

.logo-grid {
    display: grid;
    gap: 2rem;
    justify-items: center;
    align-items: center;
    margin-top: 2rem;
    grid-template-columns: repeat(2, 1fr);
}

.logo-item {
    width: 100%;
    max-width: 350px;
    text-align: center;
    margin: 0;
    padding: 0;
}

.logo-item img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

@media screen and (min-width: 1200px) {
    .logo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logo-item {
        max-width: 300px;
    }
}

@media screen and (max-width: 767px) {
    .logo-grid {
        grid-template-columns: 1fr;
    }

    .logo-item {
        max-width: 100%;
    }
}


/* ========================================
   CODE MIRROR OVERRIDES
   ======================================== */

.documentViewTextArea .CodeMirror {
    height: auto;
    border: none;
}


/* ========================================
   HERO CAROUSEL
   ======================================== */

.hero-carousel-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-carousel {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    gap: 1rem; /* Space between nav buttons and content */
}

/* Hero Slides */
.hero-slide {
    opacity: 1;
    transition: opacity 0.6s ease-in-out;
    width: 100%;
    flex: 1;
}

.hero-slide-hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Navigation Arrows - Full height click area, normal button visual */
.hero-carousel-nav {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 530px; /* Match facsimile height - full click area */
    width: 50px;
    flex-shrink: 0;
    z-index: 5;
    padding: 0;
}

/* Visual button inside the full-height click area */
.hero-carousel-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 80px;
    z-index: -1;
}

.hero-carousel-nav:hover::before {
    background: rgba(0, 0, 0, 0.8);
    height: 90px;
}

.hero-carousel-nav:active::before {
    transform: translate(-50%, -50%);
}

.hero-carousel-nav .material-symbols-outlined {
    font-size: 2rem;
    color: white;
    position: relative;
    z-index: 1;
}

.hero-carousel-prev {
    order: -1; /* Position before slides */
}

.hero-carousel-prev::before {
    border-radius: 0.5rem 0 0 0.5rem;
}

.hero-carousel-next {
    order: 1; /* Position after slides */
}

.hero-carousel-next::before {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Indicator Dots - Positioned below the content */
.hero-carousel-indicators {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    display: flex;
    gap: 0.75rem;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    justify-content: center;
    margin: 2rem auto 0;
    width: fit-content;
}

.hero-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-carousel-indicator:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.2);
}

.hero-carousel-indicator.active {
    background: #007bff;
    width: 32px;
    border-radius: 6px;
}

/* Featured Document Section Styling */
.featured-document-section h2 {
    margin-bottom: 2rem;
}

.featured-document-section h2 span:first-child {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
}

.featured-document-section h2 span:last-child {
    font-size: 1.8rem;
    font-weight: 600;
    color: #212529;
}

/* Featured Facsimile - Fixed height with object-fit */
.featured-facsimile {
    margin: 0;
    overflow: hidden;
    max-height: 530px;
    position: relative;
}

.featured-facsimile img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Animate large images slowly (ken burns effect) */
@keyframes kenBurns {
    0% {
        transform: scale(1);
        transform-origin: top center;
    }
    100% {
        transform: scale(1.1);
        transform-origin: bottom center;
    }
}

.featured-facsimile img {
    animation: kenBurns 20s ease-in-out infinite alternate;
}

/* Featured Excerpt Container - Same height as facsimile */
.featured-excerpt-container {
    position: relative;
    height: 530px;
    display: flex;
    flex-direction: column;
}

/* Featured Excerpt - Limited height with ellipsis, no scrollbar */
.featured-excerpt {
    flex: 1;
    overflow: hidden;
    padding: 1.5rem;
    padding-bottom: 5rem; /* Space for floating button */
    background: #f8f9fa;
    border-radius: 0.5rem;
    position: relative;
    mask-image: linear-gradient(to bottom, black 70%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 90%);
}

.featured-excerpt .tei-viewer {
    max-height: 100%;
    overflow: hidden;
}

.featured-excerpt .tei-viewer__content {
    display: -webkit-box;
    -webkit-line-clamp: 15; /* Show approximately 15 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Floating Action Button - Positioned absolutely over text */
.featured-document-link {
    position: absolute;
    bottom: 3rem;

    right: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    z-index: 2;
}

.featured-document-link:hover {
    background: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.5);
    text-decoration: none;
    color: white;
}

.featured-document-link:active {
    transform: translateY(-1px);
}

.featured-document-link .material-symbols-outlined {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Responsive Design */
@media screen and (max-width: 991px) {
    .hero-carousel {
        min-height: auto;
        padding-bottom: 3rem;
        flex-direction: column;
        gap: 0;
    }

    .hero-carousel-nav {
        position: absolute;
        min-height: auto;
        height: 60px;
        width: 60px;
        top: 50%;
        transform: translateY(-50%);
    }

    .hero-carousel-nav:hover {
        transform: translateY(-50%);
    }

    .hero-carousel-nav:active {
        transform: translateY(-50%);
    }

    .hero-carousel-prev {
        left: 0.5rem;
        order: 0;
        border-radius: 0.5rem;
    }

    .hero-carousel-next {
        right: 0.5rem;
        order: 0;
        border-radius: 0.5rem;
    }

    .featured-facsimile,
    .featured-facsimile img {
        height: 500px;
    }

    .featured-excerpt-container {
        height: auto;
        min-height: 400px;
    }

    .hero-carousel-nav .material-symbols-outlined {
        font-size: 1.5rem;
    }

    .hero-carousel-indicators {
        margin-top: 1.5rem;
        padding: 0.5rem 1rem;
    }

    .featured-document-link {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 767px) {
    .hero-carousel {
        min-height: auto;
        padding-bottom: 2rem;
    }

    .hero-carousel-nav {
        height: 50px;
        width: 50px;
    }

    .hero-carousel-prev {
        left: 0.25rem;
    }

    .hero-carousel-next {
        right: 0.25rem;
    }

    .featured-facsimile,
    .featured-facsimile img {
        height: 400px;
    }

    .featured-excerpt-container {
        height: auto;
        min-height: 300px;
    }

    .featured-document-section h2 span:first-child {
        font-size: 1rem;
    }

    .featured-document-section h2 span:last-child {
        font-size: 1.4rem;
    }

    .featured-excerpt {
        padding: 1rem;
        padding-bottom: 4.5rem;
    }

    .featured-excerpt .tei-viewer__content {
        -webkit-line-clamp: 10; /* Fewer lines on mobile */
    }

    .hero-carousel-nav .material-symbols-outlined {
        font-size: 1.25rem;
    }

    .hero-carousel-indicators {
        margin-top: 1rem;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .hero-carousel-indicator {
        width: 10px;
        height: 10px;
    }

    .hero-carousel-indicator.active {
        width: 24px;
    }

    .featured-document-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        left: 1rem;
        right: 1rem;
    }

    .featured-document-link .material-symbols-outlined {
        font-size: 1.25rem;
    }
}
