:root {
    --border-primary-color: rgb(229, 231, 235);
}

html {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { 
    font-family: ui-sans-serif, system-ui, sans-serif; 
    letter-spacing: -0.03em;
}

body { 
    font-family: 'Poppins', sans-serif; 
    scroll-behavior: smooth;
}

h1 { 
    font-size: 1.5rem; 
    line-height: 1.2; 
}

/* Article summary sizing */
#article-summary {
    font-size: 1.25rem; /* ~text-xl */
    line-height: 1.7;
}
@media (min-width: 768px) {
    #article-summary {
        font-size: 1.5rem; /* ~text-2xl */
    }
}

/* Page-scoped content widths (do not affect home) */
main.article-page .container { /* article detail page */
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

footer {
    background-color: #d9f1f1;
    border-top: 2px solid #fff;
}

footer a {
    color: rgb(25, 69, 166);

    transition: color 0.5s ease; 
}
footer a:hover {
    color: #E20613;
}
#article-image {
    max-height: 600px !important;
}

#article-meta, .article-meta {
    color: grey;
}

/* Legacy content compatibility: centered paragraph + image should stay centered */
.article-content p[style*="text-align: center" i] > img,
.article-content p[align="center"] > img,
.prose p[style*="text-align: center" i] > img,
.prose p[align="center"] > img {
    margin-left: auto;
    margin-right: auto;
}


.text-menu { 
    transition: color 0.3s ease; 
}

.hero-text {
    mix-blend-mode: difference;
    position: relative;
    text-shadow: 0 2px 2px rgba(0,0,0,0.1), 0 4px 14px rgba(0,0,0,0.1);
    color: white;
    display: inline-block;
    padding: 0 10px;
}

#hero {
    position: relative;
    overflow: hidden;
}

#hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* HR styling */
hr {
    border: 0;
    height: 1px;
    background-color: #94979b;
    margin: 1.5rem 0;
}

.borderTop {
    border-top: 1px solid #d3d7dc;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* Ribbon badge colors - hollow style with borders */
.bg-blue-500 {
    background-color: transparent !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    color: #3b82f6 !important;
}

.bg-green-500 {
    background-color: transparent !important;
    border: 2px solid rgba(34, 197, 94, 0.3) !important;
    color: #22c55e !important;
}

/* Ribbon badges should not be full width */
.masonry-body span.rounded-full,
span.bg-blue-500,
span.bg-green-500 {
    display: inline-block !important;
    width: auto !important;
    max-width: fit-content !important;
}

/* Modern button styles */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    flex-direction: row-reverse;
}

.button-rounded {
    border-radius: 0.5rem;
}

.button-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.button-blue {
    background-color: #3b82f6;
    color: white;
}

.button-blue:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.button-blue:active {
    transform: translateY(0);
}

.button-reveal {
    position: relative;
    overflow: visible;
}

.button-reveal i,
.button-reveal .icon-angle-right {
    transition: transform 0.3s ease;
    display: inline-block;
}

.button-reveal:hover i,
.button-reveal:hover .icon-angle-right {
    transform: translateX(4px);
}

.tright {
    text-align: right;
}

/* Legacy button/box styles */
.boxBlueMed {
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.boxBlueMed::after {
    content: ">";
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1.2em;
    font-weight: 400;
}

.boxBlueMed:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.boxBlueMed:hover::after {
    transform: translateX(4px);
}

.btnSmall {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Pagination styling */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.pagination li {
    list-style: none;
}

.pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.5rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.pagination li a:hover:not(.disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.pagination li.active a {
    background-color: #1e40af;
    border-color: #1e40af;
    color: white;
    font-weight: 600;
}

.pagination li a.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    color: #9ca3af;
}

.pagination-prev a,
.pagination-next a {
    font-size: 1rem;
    min-width: 2.5rem;
    color: #3b82f6;
}

.pagination li:first-child a,
.pagination li:nth-child(2) a,
.pagination li:nth-last-child(2) a,
.pagination li:last-child a {
    border-radius: 0.25rem;
}

.pagination li span {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
    font-weight: 400;
}

/* Responsive pagination - Mobile: show ±1 page */
@media (max-width: 767px) {
    .pagination-page-desktop,
    .pagination-page-tablet,
    .pagination-ellipsis-desktop,
    .pagination-ellipsis-tablet {
        display: none !important;
    }
}

/* Responsive pagination - Tablet: show ±2 pages */
@media (min-width: 768px) and (max-width: 1023px) {
    .pagination-page-desktop,
    .pagination-page-mobile,
    .pagination-ellipsis-desktop,
    .pagination-ellipsis-mobile {
        display: none !important;
    }
}

/* Responsive pagination - Desktop: show ±4 pages */
@media (min-width: 1024px) {
    .pagination-page-tablet,
    .pagination-page-mobile,
    .pagination-ellipsis-tablet,
    .pagination-ellipsis-mobile {
        display: none !important;
    }
}

.search-page-module {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
}

.search-page-form {
    margin-bottom: 1.5rem;
}

.search-page-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 720px;
}

.search-page-input-wrap input {
    flex: 1 1 auto;
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #fff;
    font-size: 1rem;
    color: #111827;
}

.search-page-input-wrap input:focus {
    outline: 0;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-page-input-wrap button {
    height: 50px;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 0.5rem;
    background-color: #1e40af;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-page-input-wrap button:hover {
    background-color: #1d4ed8;
}

.search-page-status {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.search-page-empty {
    margin: 0 0 1.5rem;
    color: #4b5563;
}

.search-hit-highlight {
    background-color: #fde68a;
    color: #111827;
    padding: 0 0.1em;
    border-radius: 0.2em;
}

@media (max-width: 767px) {
    .search-page-input-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .search-page-input-wrap button {
        width: 100%;
    }
}
