/* Remove default margin and padding from body and html */
html,
body {
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    background-color: #141414;
    display: grid;
    min-width: 1024px;
    /* Ensures content is at least 1024px wide */
    overflow-x: auto;
    /* Allows horizontal scrolling if screen is smaller */
    background-color: whitesmoke;
    /* Enables smooth scrolling for all anchor links */
    scroll-behavior: smooth;
}

.index-layout {
    grid-template-columns: minmax(240px, 18.62%) 1fr minmax(240px, 18.62%);
    /* originally 18.62% 62.81% 18.62% */
    /* Ensure no unintended padding */
    box-sizing: border-box;
    display: grid;
    position: relative;
}

/* When screen width is less than 1024px, remove side columns
@media (max-width: 1024px) {
    .index-layout {
        grid-template-columns: 1fr;
    }
} */

/* .index-layout .left-content{
        grid-column: 1; 
    }  */

.index-layout .center-content {
    grid-column: 2;
    background-color: whitesmoke;
}

/* .index-layout .right-content{
        grid-column: 3;
    } */

.index-layout .center-right-content {
    grid-column: 2/4;
}

* {
    box-sizing: border-box;
}

.background {
    min-width: 0;
    /* Ensure backgrund extends to the viewport width */
    padding: 0;
    /* No padding needed for the background container */
    display: flex;
    justify-content: center;
    /* Center the container horizontally */
}

.sidebars-left {
    grid-column: 1;
    grid-row: 1/3;
    width: 100%;
    background-color: whitesmoke;
}

.sidebars-left-grid {
    display: grid;
    gap: 20px;
}

.sidebars-right-partial {
    grid-column: 3;
    grid-row: 2;
    width: 100%;
    background-color: whitesmoke;
}

.sidebars-right-full {
    grid-column: 3;
    grid-row: 1/3;
    width: 100%;
    background-color: whitesmoke;
}

.sidebars-right-partial .sidebars-right-grid {
    display: grid;
    gap: 20px;
}

.sidebars-right-full .sidebars-right-grid {
    display: grid;
    gap: 20px;
    margin-top: 50px;
}

.container {
    max-width: 950px;
    /* Max width for the content area */
    width: calc(100% - 40px);
    /* Ensure it takes up full width minus padding */
    background-color: #fff;
    /* White background for the content area */
    border-radius: 17px;
    /* Rounded corners */
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    /* Added shadow */
    margin: 10px 20px;
    /* Margin to provide space around the container */
    padding: 20px 0px;
    border: 1px solid rgba(0, 0, 0, .08);
    min-height: 740px;
    /* Ensure minimum height to prevent black space */
}

/* header {
        background-color: black;
        color: white;
        padding: 1% 1%;
        top: 0;
        width: 100%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        position: -webkit-sticky;
        position: sticky;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        z-index: 99;
    } */

.sidebars-left-item,
.sidebars-right-item {
    margin: 0 max(5%, 20px);
    /* used to be 20 instead of auto */
    z-index: 10;
    text-decoration: none;
    font-size: 16px;
    border-radius: 10px;
}

#sidebars-left-item2 {
    background: linear-gradient(135deg,
            /* Diagonal gradient (top-left to bottom-right) */
            #a9dffc 10%,
            /* Light blue at the center */
            #4b8abe 90%
            /* Primary blue at the end */
        );
    font-family: "Roboto", serif;
    font-weight: bold;
    margin-bottom: 20px;
}

#sidebars-left-item2 a {
    margin: 15px 15px 15px 15px;
    cursor: pointer;
    text-decoration: none;
    color: black;
    display: block;
    float: none;
    /* Ensure it doesn’t overlap */
}

.bias-card {
    position: relative;
    overflow: hidden;
    background: #111;
    padding: 200% 20px 20px;
    min-height: 320px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: "Roboto", serif;
}

.bias-card> :not(.bias-image-wrapper) {
    position: relative;
    z-index: 2;
}

.bias-card-heading h3 {
    color: white;
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.3;
}

.bias-card-heading p {
    margin: 0;
    color: lightgrey;
    line-height: 1.5;
    font-size: 0.95rem;
}

.bias-card-button {
    background: transparent;
    color: #f4ecd8;
    text-decoration: none;
    border-radius: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    width: fit-content;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.bias-card-button::after {
    content: '❯';
    margin-left: 12px;
    font-size: 1.1em;
}

.bias-card-button-active {
    background: linear-gradient(135deg, #f8d96a, #ebb349);
    color: #111;
    padding: min(10%, 16.7px);
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(239, 196, 81, 0.25);
}

.bias-card-button-inactive {
    background: transparent;
    color: #f8d96a;
    padding: min(10%, 15px);
    border-color: rgba(248, 217, 106, 0.9);
    border: 2px solid rgba(248, 217, 106, 0.9);
}

.bias-card-button:hover {
    transform: scale(1.05);
}

.bias-card-button-inactive:hover {
    box-shadow: 0 5px 15px rgba(239, 196, 81, 0.25);
}

.bias-image-wrapper {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(180deg, #101010 0%, #181818 100%);
    margin: 0;
    z-index: 0;
}

.bias-image-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bias-image {
    position: relative;
    transform: translateY(-20px);
    inset: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: 1;
}

.bias-image-off {
    opacity: 1;
    z-index: 2;
}

.bias-image-on {
    opacity: 0;
    z-index: 1;
}

.bias-image-wrapper.bias-image-active .bias-image-off {
    opacity: 0;
    z-index: 1;
}

.bias-image-wrapper.bias-image-active .bias-image-on {
    opacity: 1;
    z-index: 2;
}

.bias-image-placeholder {
    display: none;
}

.bias-visibility-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bias-visibility-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bias-visibility-count {
    min-width: 42px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.bias-visibility-count.bias-on {
    color: green;
}

.bias-visibility-count.bias-off {
    color: red;
}

.bias-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* Prevents the user from highlighting the image */
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* Internet Explorer/Edge */

    /* Prevents the 'ghost' image when trying to drag */
    -webkit-user-drag: none;

    /* Disables the long-press 'Save Image' menu on mobile */
    -webkit-touch-callout: none;
}

.bias-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

.bias-switch-image {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    pointer-events: none;
}

.join-telegram-button {
    background: linear-gradient(135deg, #2196f3, #00c6ff);
    /* Blue gradient */
    color: white;
    padding: 5px;
    margin: 15px;
    border-radius: 7px;
    text-align: center;
    transition: all 0.3s;
}

.join-telegram-button:hover {
    transform: scale(1.05);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.telegram-3d-icon {
    width: 70px;
    height: 70px;
    position: relative;
    left: 8px;
    top: -8px;
    float: right;
    /* Float image to the right */
}

/* Fixes conflicting system wrapper styles while preserving important layout positioning */
#sidebars-right-item1 {
    font-family: "Roboto", serif;
    font-weight: regular;
    border-radius: 16px;
    /* Syncs perfectly with container rounded corners */
    margin-top: 20px;
    /* Preserves your essential vertical margins */
    margin-bottom: 20px;
    overflow: hidden;
}

#sidebars-right-item1 .live-note-bubble-target a {
    margin: 10px;
    cursor: pointer;
    text-decoration: none;
    color: black;
    display: block;
    float: none;
}

/* Container adjustments - Deeply zoomed-out wallpaper and custom sage-green gradient wash */
.live-notes-container {
    position: relative;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #94b28a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
}

/* Smoothed, ultra-gradual fade-in blend masks matching image_465904.png */
.live-notes-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(to bottom, #94b28a 5%, rgba(148, 178, 138, 0.9) 35%, rgba(148, 178, 138, 0));
    z-index: 5;
    pointer-events: none;
}

.live-notes-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(to top, #94b28a 8%, rgba(148, 178, 138, 0.9) 40%, rgba(148, 178, 138, 0));
    z-index: 5;
    pointer-events: none;
}

/* Floating top capsule */
.live-notes-header {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(254, 254, 254, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    width: 85%;
    white-space: nowrap;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.online-indicator {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.online-indicator img {
    width: 100%;
    height: 100%;
    height: 48px;
    width: 48px;
    object-fit: contain;
}

.live-notes-title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: #111111;
    text-transform: none;
    letter-spacing: -0.2px;
}

/* Chat stream scroll listing region */
.live-notes-list {
    padding: 70px 10px 85px 24px;
    /* Balanced protective padding to keep tail clear of edges */
    max-height: 510px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Target only live note items inside the live notes list to beat line 1320 */
.live-notes-list .live-note-item {
    padding: 11px 14px;
    gap: 4px;
    color: #000000;
    background-color: #ffffff;
    position: relative;
    width: 94%;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;

    /* 1. FORCE THE LAYOUT (Overrides line 1320's display: block) */
    display: flex !important;
    flex-direction: column;

    /* 2. REMOVE GENERIC CARD BORDER (Overrides line 1320's border) */
    border: none !important;

    /* 3. APPLY CORRECT TELEGRAM CORNERS (Overrides line 1320's border-radius) */
    border-radius: 12px 12px 12px 0px !important;

    /* 4. SHADOWS */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Hover state override */
.live-notes-list .live-note-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

/* Invisible block click target layer - Handles full bubble clicking safely */
.live-note-bubble-target {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    /* Sits over the bubble base layout */
}

/* White Telegram-style tail */
.live-notes-list .live-note-item::before {
    content: "";
    position: absolute;
    left: -11px;
    bottom: 0;
    width: 12px;
    height: 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='16' viewBox='0 0 12 16'><path d='M12 0C12 6 8 12 0 16H12V0Z' fill='%23ffffff'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Strictly forced right-aligned date/time footer string layout */
.live-note-time {
    font-size: 11px;
    font-weight: 400;
    color: #707579;
    text-transform: lowercase;
    text-align: right;
    /* Aligns text block to the right */
    display: block;
    width: 100%;
    margin-top: 4px;
    position: relative;
    z-index: 2;
    /* Keeps text element layer on top */
}

/* Paragraph target - Structural multi-line text clamping configuration */
p.live-note-text {
    font-size: 14.5px;
    color: #000000;
    font-weight: 400;
    line-height: 1.4;
    word-wrap: break-word;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
    /* Sits above full bubble link layer */

    /* Enforced CSS Line clamping configuration rules */
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Inline markdown-parsed hyperlinks - Strict colorization only */
p.live-note-text a,
.text-with-link {
    color: #2481CC;
    /* Authentic Telegram blue accent color */
    text-decoration: none !important;
    font-weight: 500 !important;
    display: inline !important;
    /* Flows normally inside inline-box paragraph streams */
    position: relative;
    z-index: 3;
    /* Elevated priority so individual links remain clickable */
}

p.live-note-text a:hover,
.text-with-link:hover {
    text-decoration: underline !important;
}

/* Inline markdown blur spoilers */
.spoiler-text {
    background-color: #222;
    color: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: inline;
    position: relative;
    z-index: 3;
}

.spoiler-text:hover {
    color: #fff;
    background-color: transparent;
}

/* Attachment preview controls and contextual drop-wrappers */
.live-note-attachments {
    font-size: 12px;
    color: #2481CC;
    display: block;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2px;
}

.live-note-attachments:hover {
    text-decoration: underline;
}

.live-note-attachments-wrapper {
    position: relative;
    display: block;
    width: fit-content;
    z-index: 3;
    /* Elevated hover layout focus layer */
}

.attachment-preview {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.live-note-attachments-wrapper:hover .attachment-preview {
    display: block;
}

.preview-thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
}

.preview-image-thumbnail,
.preview-video-thumbnail {
    height: 60px;
    width: auto;
    max-width: 120px;
    flex: 0 0 auto;
    border-radius: 4px;
}

/* Floating bottom capsule button link layout */
.live-notes-show-all {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(254, 254, 254, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    border-radius: 24px;
    color: #111111;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    width: 85%;
    z-index: 10;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.live-notes-show-all:hover {
    background-color: #ffffff;
    transform: translateX(-50%) scale(1.02);
}

.nav-container-background {
    background-color: black;
    z-index: 200;
    height: 675px;
    position: static;
    /* Fix it to the left side */
}

#navContainer {
    padding: 20px 0;
    margin-top: 20px;
    color: white;
    background-color: #1e1c1c;
    width: auto;
    /* original width 230 */
    /* Flexbox for centering content */
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
}

#logo-link {
    display: flex;
    align-self: center;
}

#navContainer .logo {
    width: 75px;
    height: 75px;
    margin-top: 10px;
    cursor: pointer;
}

#navContainer .navigation-title-text {
    font-family: 'Lobster', serif;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 26px;
    color: white;
    font-weight: 400;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

#navContainer ul {
    padding: 0;
    list-style: none;
}

#navContainer li {
    display: block;
    /* Make the entire li clickable */
}

#navContainer .navigation-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    padding: min(10%, 15px);
    /* used to be 15px */
    margin-left: min(1%, 10px);
    /* used to be 10px */
    /* Ensures clickable area extends */
    width: 100%;
    /* Makes sure it takes the full width */
    font-size: 18px;
    font-family: "Roboto", serif;
}

#navContainer .navigation-icon {
    width: 25px;
    height: 25px;
    cursor: pointer;
    fill: #939393;
    filter: brightness(0.7);
    transition: all .3s ease;
    margin-right: 10px;
    /* Spacing between icon and text */
}


#navContainer li:hover .navigation-icon {
    filter: brightness(1);
    /* Makes the image appear brighter */
    transition: all 0.3s ease;
    /* Add margin for the text */
}

#navContainer ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#navContainer li:hover {
    background-color: #1a1818;
    /* Add margin for the text */
}

/* Dropdown Button */
.dropbtn {
    background-color: transparent;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/*Language selector */

/* General styles for the language selector */
.language-selector {
    position: absolute;
    right: 0px;
    top: 0px;
    /* Places the selector 20px from the right of the page */
    display: flex;
    /* Enables Flexbox for alignment */
    margin: 20px;
    background-color: #1e1c1c;
    /* Black with some transparency */
    padding: 5px;
    border-radius: 5px;
    z-index: 1000;
    /* Ensures it's above other elements */
    justify-content: center;
    /* Centers content horizontally */
    align-items: center;
    /* Centers content vertically */
    line-height: 1;
    /* Ensures the text has no extra spacing */
    vertical-align: middle;
    font-family: 'Roboto', serif;
}

.language-selector:hover {
    background-color: #1a1818;
}

.language-selector:hover img {
    filter: brightness(1);
    /* Makes the image appear brighter */
    transition: all 0.3s ease;
}

/* Style for the dropdown button */
.dropdown-button {
    background-color: transparent;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

.language-selector img {
    width: 24px;
    height: 24px;
    margin-right: 5px;
    vertical-align: middle;
    filter: brightness(0.7);
    /* Makes the image appear brighter */
    transition: all 0.3s ease;
    /* Ensures image aligns with the text */
}

/* Style for the dropdown menu */
.dropdown-menu {
    display: none;
    /* Hidden by default */
    position: absolute;
    /* Positioned relative to the button */
    top: 35px;
    right: 0;
    border-radius: 5px;
    background-color: #1e1c1c;
    /* Dark background */
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    font-family: 'Roboto', serif;
}

/* Dropdown menu links */
.dropdown-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
}

.dropdown-menu:hover {
    background-color: #444;
}

/* Show dropdown menu on button hover or click */
.language-selector:hover .dropdown-menu {
    display: block;
}

/* Other styles*/

/* Highlighted articles */
.highlighted-articles-grid {
    position: absolute;
    margin-top: 495px;
    color: white;
    padding: 20px;
    justify-content: flex-end;
    /* Aligns content to the bottom */
    z-index: 5;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1150px;
    margin: 0 20;
    justify-content: flex-end;
    /* Aligns content to the bottom */
}

/* General styling for grid-item */
.grid-item {
    position: relative;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    /* Smooth transition for hover effects */
    background-color: transparent;
    /* Default background */
    box-shadow: none;
    /* No shadow by default */
    cursor: pointer;
    /* Makes grid-item look clickable */
    font-family: 'Roboto', serif;
    font-size: 12px;
}

/* Make the grid-item fully clickable */
.grid-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    /* Inherit text color to keep the design consistent */
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    /* Ensure link is on top of other content */
}

/* Add hover effect to emphasize interaction */
.grid-item:hover {
    cursor: pointer;
    transform: translateY(-2px);
    /* Slight lift effect */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    /* Optional for extra polish */
}

/* Slim grey stick on top of grid-item */
.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 4px;
    /* Slim stick */
    background-color: grey;
    transition: all 0.3s ease;
}

.grid-item h3 {
    color: lightgrey;
    opacity: 0.9;
    z-index: 10;
    transition: color 0.3s ease;

    /* CRUCIAL: Keep this -webkit-box so it clips text and forces "ACADEMIC" to the next line */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2em;
    max-height: calc(1.2em * 6);

    /* Safe shadow that doesn't create the ugly dark box outline */
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.7));
}

/* 2. Block the global text-shadow from messing up your grid items */
#highlighted-article .grid-item h3 span,
#highlighted-article .grid-item {
    text-shadow: none !important;
}

/* Highlighted grid-item styles
    .grid-item.active {
         background-color: rgba(128, 0, 128, 0.05);
        border-radius: 10px; Optional for a softer look 
    } */

/* Purple stick when grid-item is active */
.grid-item.active::before {
    background-color: #d500f9;
    height: 5px;
    border-radius: 4px;
    box-shadow: 0 0 10px 4px rgba(128, 0, 128, 0.5);
    /* Slightly thicker stick */
}

/* Highlighted h3 color */
.grid-item.active h3 {
    color: white;
    opacity: 1;
}


.type-date {
    display: inline-grid;
    grid-auto-flow: column;
    grid-template-columns: auto;
    /* Each item takes up width based on its content */
    gap: 5px;
    margin-top: auto;
    /* Push the type-date div to the bottom */
    font-size: 12px;
    color: #ccc;
}

.highlighted-content {
    position: relative;
    z-index: 2;
    margin-top: 150px;
    /* Ensure the content stays above the background and vignette */
    text-align: left;
    /* Horizontally center the text */
    margin-right: 150px;
    margin-left: 20px;
    height: fit-content;
    font-family: 'Roboto', serif;
    position: relative;
}

/* Container for the image */
/* Styles for the highlighted article section */
/* 3. Keep your global section rules for the rest of the layout */
/* 3. Your main background wrapper rules */
#highlighted-article {
    position: relative;
    display: flex;
    background-size: cover;
    background-position: center;
    height: 675px;
    color: white;
    background-blend-mode: multiply;
    overflow: hidden;
}

/* 4. This now safely targets only your main large featured text elements */
#highlighted-article span {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

/* The vignette effect (always visible) */
.highlighted-article::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle, transparent 0%, rgba(0, 0, 0, 0.6) 80%),
        /* Radial gradient for soft edges */
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 90%, rgba(0, 0, 0, 0.9) 100%),
        /* Vertical gradient from center */
        linear-gradient(to left, rgba(0, 0, 0, 0) 90%, rgba(0, 0, 0, 0.9) 100%);
    /* Horizontal gradient from center */
    z-index: 1;
    /* Above the image */
    pointer-events: none;
    /* Ensure it doesn't block interaction */
}

.highlighted-title a {
    font-size: 36px;
    font-weight: bold;
    color: inherit;
    text-decoration: none;
    font-family: 'Roboto', serif;
    margin-top: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.highlighted-title {
    align-items: center;
    /* Vertically center children */
    gap: 8px;
    /* Optional: space between title and indicator */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 2. Position the source above the text block without pushing content down */
.highlighted-source {
    position: absolute;
    margin-top: 20px;
    top: -140px;
    display: block;

    /* Typography & Core Colors */
    font-family: inherit;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);

    /* Underline Configurations */
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    /* 👈 FIX: Forcing lower opacity bypasses the pixel-snapping bug */
    text-underline-offset: 2px;

    /* Handles all animations (switch, fade, slide, and hover) smoothly both ways */
    transition: all 0.3s ease;
}

/* Safe clean up if no image source is present, without breaking transitions */
.highlighted-source:empty {
    opacity: 0 !important;
    pointer-events: none;
}

.highlighted-source a {
    color: inherit;
    text-decoration: inherit;
}

/* 👈 FIX: Hovering the block now transitions BOTH text and underline to white together */
.highlighted-source:hover {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.6);
}

.highlighted-type {
    display: inline-block;
    font-weight: bold;
    font-family: 'Roboto', serif;
    font-size: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.highlighted-date {
    display: inline-block;
    font-size: 14px;
    font-family: 'Roboto', serif;
    color: grey;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Button styles for the lower-right corner */
.highlighted-button {
    position: absolute;
    bottom: 0px;
    top: 450px;
    right: 50px;
    font-size: 22px;
    z-index: 2;
}

.highlighted-button-link {
    display: inline-block;
    padding: 15px 30px;
    /* Increased padding for a bigger button */
    background: linear-gradient(45deg, #7c4dff, #d500f9, #7c4dff);
    background-size: 200% 200%;
    background-position: 0% 50%;
    /* More contrasting colors */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    /* Slightly more rounded corners */
    box-shadow: 0 0 10px rgba(117, 43, 255, 0.5);
    /* Glow effect */
    transition: all .3s ease, background-position 3s ease;
    /* Added transition for glow and scale */
    will-change: transform, background;
}

.highlighted-button-link:hover {
    /* Swapped colors for hover effect */
    transform: scale(1.1);
    /* Slightly increase size on hover */
    box-shadow: 0 0 20px rgba(117, 43, 255, 1);
    background-position: 100% 50%;
    transition: all .3s ease, background-position 3s ease;
    /* More intense glow on hover */
}

.more-info {
    text-align: center;
    /* Center the text and arrow */
    position: absolute;
    /* Position it relative to the container */
    bottom: 10px;
    /* Position above the button */
    color: white;
    /* Text color */
    font-family: sans-serif;
}

.down-arrow {
    margin-top: -10px;
    /* Space between text and arrow */
    width: 30px;
    /* Adjust the size of the arrow */
    height: auto;
    /* Maintain aspect ratio */
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
    font-family: 'Roboto', serif;
}

/* @media (max-width: 1024px) {
        .content-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 640px) {
        .content-grid {
            grid-template-columns: repeat(1, 1fr);
        }
    } */

.publication-section {
    margin: 20px 0;
    font-family: 'Roboto', serif;
}

.publication-section-heading {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Roboto', serif;
    margin-top: 24px;
    margin-bottom: 0;
}

.publication-section-subheading {
    font-size: 16px;
    color: grey;
    font-style: italic;
    font-family: 'Roboto', serif;
    margin-bottom: 20px;
}

.publication-section-button-text {
    font-size: 16px;
    color: grey;
    font-family: 'Roboto', serif;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.publication-section-button {
    font-size: 16px;
    color: grey;
    font-family: 'Roboto', serif;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #d9d9d9;
    color: #979696;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.publication-section-button:hover {
    background-color: #979696;
    color: white;
    transition: all 0.3s ease;
}

/* Style for video preview (non-playable) */
.video-preview {
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    /* Disable interaction */
}


/* General styling for news, article, and opinion items */
.news-item,
.article-item,
.opinion-item,
.academic-item,
.live-note-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    transition: all .3s ease;
    text-decoration: none;
    color: inherit;
    /* Ensure text inherits the parent color */
    text-decoration: none;
    /* Remove underlines or other decorations */
    display: block;
    /* Make the entire article clickable */
    cursor: pointer;
    /* Show a pointer cursor to indicate a clickable element */
}

.news-item:hover,
.article-item:hover,
.opinion-item:hover,
.academic-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* only grid live notes get a shadow */
.content-grid .live-note-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.news-item a,
.article-item a,
.opinion-item a,
.academic-item a,
.live-note-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.news-item img,
.article-item img,
.opinion-item img,
.academic-item img,
article.live-note-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.news-item .news,
.article-item .article,
.opinion-item .opinion,
.academic-item .academic,
.live-note-item .live-note {
    margin-bottom: 8px;
}

.news-item .title,
.article-item .title,
.opinion-item .title,
.academic-item .title,
.live-note-item .title {
    color: inherit;
    text-decoration: none;
    display: block;
    font-size: 20px;
    color: black;
    margin-top: 8px;
}

.news-item .date,
.article-item .date,
.opinion-item .date,
.academic-item .date,
.live-note-item .date {
    color: inherit;
    text-decoration: none;
    display: block;
    font-size: 12px;
    color: grey;
    margin-top: auto;
}

/* Wrapper for the image to keep it at the back */
/* .highlighted-article-image-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    } */

/* Overlay for all content */
.highlighted-article-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    /* Add spacing between overlay children */
    padding: 40px 60px;
    box-sizing: border-box;
}

/* Make sure .highlighted-image stays at the back */
.highlighted-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.highlighted-image.fade-in {
    opacity: 1;
}

.video-indicator {
    display: inline-flex;
    align-items: center;
    font-family: 'Roboto', serif;
    background-color: red;
    color: white;
    padding: 5px 8px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    margin-left: 12px;
    margin-bottom: 11px;
    position: static;
    vertical-align: middle;
    /* Add this for inline alignment */
    line-height: 1;
    /* Prevent extra vertical space */

}

.video-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
    /* Add this for dot alignment */
}

/* Safe clean up if no image source is present, without breaking transitions */
.video-indicator:empty {
    opacity: 0 !important;
    pointer-events: none;
}


.content {
    font-family: 'Roboto', serif;
    margin-left: 3%;
    margin-right: 3%;
    margin-bottom: 3%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Styles for different text types */
.news {
    color: #FF2E2E;
    font-weight: bold;
    font-family: 'Roboto', serif;
}

.opinion {
    color: orange;
    font-weight: bold;
    font-family: 'Roboto', serif;
}

.article {
    color: #438afc;
    font-weight: bold;
    font-family: 'Roboto', serif;
}

.academic {
    color: burlywood;
    font-weight: bold;
    font-family: 'Roboto', serif;
}

.live-note {
    color: green;
    font-weight: bold;
    font-family: 'Roboto', serif;
}

main-text {
    font-family: 'Roboto', serif;
}

/* Base styles for padding with responsive adjustment */
main-text .opinion,
main-text .article,
main-text .news,
main-text .academic,
main-text .live-note,
main-text .caption-text,
main-text .information,
main-text .warning,
main-text .error,
main-text .quote,
main-text .heading-text,
main-text .subheading-text,
main-text .sub-subheading-text,
main-text .info-text,
main-text p,
main-text .tags-section,
main-text .pdf-toolbar,
main-text .table-of-contents {
    margin-left: clamp(4px, 5vw + 1rem, 80px);
    margin-right: clamp(4px, 5vw + 1rem, 80px);
    scroll-margin-top: 50px;
}

main-text .heading-text {
    font-family: 'Roboto', serif;
    font-size: 24px;
    color: inherit;
    margin-bottom: 10px;
    font-weight: bold;
}

main-text .heading-text-with-link {
    font-family: 'Roboto', serif;
    text-decoration: underline;
    color: inherit;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2481CC;
}

main-text .subheading-text {
    font-family: 'Roboto', serif;
    font-size: 22px;
    margin-bottom: 10px;
}

main-text .sub-subheading-text {
    font-family: 'Roboto', serif;
    font-size: 18px;
    margin-bottom: 5px;
}

main-text p {
    font-family: 'Roboto', serif;
    color: #333;
    font-size: 18px;
    line-height: 150%;
    flex: 1;
    /* Ensures text takes up the remaining space */
}

main-text .text-with-link {
    font-family: 'Roboto', serif;
    text-decoration: none;
    color: #2481CC;
    font-size: 18px;
    line-height: 150%;
}

main-text .info-text {
    font-family: 'Roboto', serif;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

main-text .info-text-with-link {
    font-family: 'Roboto', serif;
    text-decoration: underline;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

main-text .spoiler-text {
    font-family: 'Roboto', serif;
    font-size: 18px;
    line-height: 150%;
    flex: 1;
    color: #333;
    text-shadow: none;
    filter: blur(3px);
    background-color: transparent;
    cursor: pointer;
    transition: filter 0.2s ease;
}

main-text .spoiler-text.revealed {
    filter: none;
    color: inherit;
}

main-text .main-image {
    display: block;
    margin: 0 auto;
    align-items: center;
    border-radius: 13px;
    max-height: 500px;
    max-width: 95%;
}

main-text .main-video {
    display: block;
    margin: auto;
    max-width: 95%;
    margin-bottom: 10px;
    border-radius: 13px;
    object-fit: cover;
    /* Ensures the video fits nicely within the container */
}

main-text .image {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 500px;
    border-radius: 14px;
    margin-bottom: 10px;
    padding-left: 5px;
    padding-right: 5px;
}

main-text .pdf-container {
    margin: 1rem 0;
}

main-text .pdf-toolbar {
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
}

main-text .pdf-open,
main-text .pdf-download {
    display: inline-block;
    padding: 8px 16px;
    background-color: #438afc;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

main-text .pdf-open:hover,
main-text .pdf-download:hover {
    background-color: #2e5fbf;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

main-text .pdf-frame {
    width: 100%;
    height: 850px;
    border: none;
}

main-text .caption-text {
    font-family: 'Roboto', serif;
    text-align: center;
    line-height: 110%;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 10px;
}

main-text .caption-text-with-link {
    font-family: 'Roboto', serif;
    text-align: center;
    text-decoration: underline;
    line-height: 95%;
    font-size: 14px;
    color: #7f8c8d;
}

main-text .quote {
    font-family: 'Roboto', serif;
    background-color: #f0e6ff;
    line-height: 140%;
    padding: 10px 20px 10px 45px;
    /* Adjusted padding for the entire quote block */
    border-radius: 7px;
    position: relative;
    border-left: 7px solid #9966ff;
    margin-bottom: 10px;
}

main-text .quote-text-with-link {
    font-family: 'Roboto', serif;
    line-height: 140%;
    position: relative;
    text-decoration: none;
    color: #7333cc;
}

main-text .quote::before {
    content: "🗨️";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

main-text .information {
    font-family: 'Roboto', serif;
    background-color: #0091ff37;
    line-height: 140%;
    padding: 10px 20px 10px 45px;
    /* Adjusted padding for the entire quote block */
    border-radius: 7px;
    position: relative;
    border-left: 7px solid #00aaff;
    margin-bottom: 10px;
}

main-text .information-text-with-link {
    font-family: 'Roboto', serif;
    line-height: 140%;
    position: relative;
    text-decoration: none;
    color: rgb(0, 60, 255);
}

main-text .information::before {
    content: "ℹ️";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

main-text .warning {
    background-color: #fff3cd;
    border: 1px solid #e5d39b;
    padding: 10px 20px 10px 45px;
    /* Adjusted padding for the entire quote block */
    border-radius: 7px;
    position: relative;
    border-left: 6px solid #d39e00;
    margin-bottom: 10px;
}

main-text .warning::before {
    content: "⚠️";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

main-text .error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px 20px 10px 45px;
    /* Adjusted padding for the entire quote block */
    border-radius: 7px;
    position: relative;
    border-left: 6px solid #a92631;
    margin-bottom: 10px;
}

main-text .error::before {
    content: "🛑";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

main-text .tags-section {
    margin-top: 20px;
}

main-text .related-topics-tags {
    display: flex;
    justify-content: flex-end;
    /* Aligns tags to the right */
    gap: 10px;
}

main-text .related-topic-tag,
.tag-option {
    display: inline-block;
    background-color: #d9d9d9;
    color: #979696;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, .08);
    cursor: pointer;
    transition: all 0.3s ease;
}

main-text .related-topic-tag:hover,
.tag-option:hover {
    background-color: #979696;
    color: white;
}

/* Table of Contents Styles */

main-text .table-of-contents {
    background-color: #f0f4f8;
    /* Light, airy grayish-blue */
    border: 1px solid #d9e2ec;
    /* Soft border to define the edges */
    padding: 0;
    margin-top: 24px;
    margin-bottom: 24px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    /* Softer, elegant shadow */
    box-sizing: border-box;
    overflow: hidden;
}

main-text .toc-title {
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    margin: 0;
    padding: 16px 20px;
    background-color: transparent;
    /* Changed */
    color: #334155;
    border-bottom: none;
    /* Changed */
    flex-grow: 1;
    /* Pushes the arrow to the right */
}

main-text .toc-list {
    counter-reset: section;
    list-style-type: none;
    padding: 12px 10px;
    /* Gives the list items some breathing room inside the box */
    margin: 0;
    display: flex;
    flex-direction: column;
}

main-text .toc-list li {
    margin: 2px 0;
    padding: 10px 14px;
    border-radius: 8px;
    counter-increment: section;
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
    /* REQUIRED for the clickable overlay */
}

/* Updated ::before element to include a smooth color transition */
main-text .toc-list li::before {
    content: counter(section) ".";
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    /* Softens the number color so it doesn't overpower the text */
    min-width: 24px;
    flex-shrink: 0;
    transition: color 0.2s ease;
    /* Added smooth transition for the color */
}

main-text .toc-list a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    /* Matches the li border-radius */
}

/* NEW: Styles for the retractable header */
main-text .toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e1e7ef;
    border-bottom: 1px solid #d9e2ec;
    cursor: pointer;
    /* Shows the user they can click it */
    padding-right: 20px;
    transition: background-color 0.2s ease;
}

main-text .toc-header:hover {
    background-color: #d2dbe5;
    /* Slight hover effect for the header */
}

/* NEW: The toggle arrow icon */
main-text .toc-toggle-icon {
    transition: transform 0.3s ease;
    /* Smooth rotation */
}

/* NEW: The collapsible container */
main-text .toc-collapsible {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

main-text .toc-collapsible-inner {
    overflow: hidden;
    /* Hides the content as it shrinks */
}

/* NEW: Collapsed state styles applied via JavaScript */
main-text .table-of-contents.collapsed .toc-collapsible {
    grid-template-rows: 0fr;
}

main-text .table-of-contents.collapsed .toc-header {
    border-bottom-color: transparent;
    /* Removes the line when closed */
}

main-text .table-of-contents.collapsed .toc-toggle-icon {
    transform: rotate(180deg);
    /* Points the arrow upwards */
}

/* 
   Unique Number Colors on Hover 
   Each nth-child represents an item in your list (1st, 2nd, 3rd, etc.)
*/
main-text .toc-list li:nth-child(1):hover::before {
    color: #ef4444;
    /* Rose Red */
}

main-text .toc-list li:nth-child(2):hover::before {
    color: #3b82f6;
    /* Bright Blue */
}

main-text .toc-list li:nth-child(3):hover::before {
    color: #10b981;
    /* Emerald Green */
}

main-text .toc-list li:nth-child(4):hover::before {
    color: #f59e0b;
    /* Warm Amber */
}

main-text .toc-list li:nth-child(5):hover::before {
    color: #8b5cf6;
    /* Vibrant Purple */
}

main-text .toc-list li:nth-child(6):hover::before {
    color: #ec4899;
    /* Pink */
}

main-text .toc-list li:nth-child(7):hover::before {
    color: #0ea5e9;
    /* Light Blue/Cyan */
}

main-text .toc-list li:hover {
    background-color: #e2e8f0;
    /* Soft hover highlight */
    transform: translateX(4px);
    /* Stylish little nudge to the right */
}

main-text .toc-list a {
    text-decoration: none;
    color: #1e293b;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    display: inline;
    width: auto;
    flex: 1;
}

main-text .toc-list li:hover a {
    color: #0f172a;
    /* Darkens the text slightly on hover for contrast */
}

/* Existing styles assumed to be present, adding tag filter specific styles */
.tag-filter-container {
    margin-bottom: 1rem;
}

.tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 10px;
}

.tag-option.active {
    background-color: #007bff;
    color: white;
}

footer {
    background-color: black;
    text-align: center;
    padding: 1%;
    position: relative;
    bottom: 0;
    width: 1fr;
    height: fit-content;
    font-family: "Roboto", serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
}

/* .footer-grid-item {

    } */

.footer-grid-item-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.footer-grid-item-list li {
    margin-bottom: 10px;
}

.footer-text {
    text-decoration: none;
    color: #7d7d7d;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-text:hover {
    color: white;
}

.footer-bold-text {
    text-decoration: none;
    font-weight: bold;
    color: #b5b5b5;
    font-size: 14px;
}

/* This keeps your general footer text as is */
.footer-below-text {
    text-decoration: none;
    color: #b5b5b5;
    text-align: center;
    width: 100%;
}

/* This targets the link specifically */
.footer-below-text a {
    color: inherit;
    /* Inherits #b5b5b5 from the parent */
    text-decoration: underline;
    /* Adds the underline back to the link only */
    transition: all 0.3s ease;
}

/* Optional: Keep it looking the same when hovered */
.footer-below-text a:hover {
    color: #ffffff;
    /* Slight change on hover so user knows it's clickable */
}


/* Gallery Container */
.gallery-container {
    position: relative;
    max-width: 90%;
    margin: auto;
    margin-bottom: 20px;
}

/* Stage reserves a fixed-size box for the active media so swapping
   between an image and a video (different aspect ratios) doesn't
   shift the surrounding article layout. The box is bounded by both
   an aspect-ratio and a max-height so tall videos still fit. */
.gallery-stage {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 500px;
    /* Keep the fixed stage for stable navigation controls, but let the
       page background show through around media with a different ratio. */
    background-color: transparent;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Image Display */
.gallery-main-image,
.gallery-main-video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: contain;
    cursor: pointer;
    transition: all .3s ease;
}

/* Thumbnail Container */
.gallery-thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Individual Thumbnail */
.gallery-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 5px;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
    transform: scale(1.1);
}

/* Navigation Buttons - round, semi-transparent, with a glassy backdrop */
.gallery-nav-button {
    position: absolute;
    top: 50%;
    /* Position the button over the image area, not the thumbnails row.
       The stage is capped at 500px max-height; we anchor to the
       gallery-container's top with a slight offset so it lands roughly
       on the image. */
    transform: translateY(calc(-50% - 30px));
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.gallery-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(calc(-50% - 30px)) scale(1.05);
}

.gallery-nav-button svg {
    display: block;
}

.gallery-nav-button.left {
    left: 14px;
}

.gallery-nav-button.right {
    right: 14px;
}

/* Zoom Overlay */
.gallery-zoom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 97;
}

.gallery-zoom-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
}

.gallery-zoom-overlay.active {
    display: flex;
}

/* Close (X) button in the zoom overlay - grey by default, white on hover */
.gallery-zoom-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(220, 220, 220, 0.85);
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    z-index: 98;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.gallery-zoom-close:hover {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.05);
}

.gallery-zoom-close svg {
    display: block;
}

/* Styles for the video container */
.video-container {
    display: block;
    margin: auto;
    max-width: 90%;
    margin-bottom: 10px;
    padding-left: 5px;
    padding-right: 5px;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.all-publications-container {
    margin: 20px 0;
}

.all-publications-text {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Roboto', serif;
    margin: 0;
}

.filter-button {
    position: relative;
    font-family: 'Roboto', serif;
}

.sort-button {
    text-align: center;
    position: relative;
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', serif;
}

.filter-option,
.sort-option {
    background-color: transparent;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
}

.filter-option:hover,
.filter-option.active,
.sort-option:hover,
.sort-option.active {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* Existing styles from the provided document */
/* ... (all previous CSS remains unchanged) ... */

/* Styles for sub-headings */
.all-publications-text p {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Roboto', serif;
    /* margin-bottom: 20px; */
}

.tag-filter-container span,
.type-filter-container span,
.sort-button span {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Roboto', serif;
    display: block;
}

/* Styles for type buttons container */
.type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 10px;
}

/* Specific styles for type filter buttons */
.filter-option-news {
    color: red;
    background-color: white;
    font-weight: bold;
    font-family: 'Roboto', serif;
    border: 1px solid red;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option-news.active {
    color: white;
    background: linear-gradient(to right, #ff0000, #ff6666);
    border: none;
}

.filter-option-article {
    color: #438afc;
    background-color: white;
    font-weight: bold;
    font-family: 'Roboto', serif;
    border: 1px solid #438afc;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option-article.active {
    color: white;
    background: linear-gradient(to right, #438afc, #85b9fd);
    border: none;
}

.filter-option-opinion {
    color: #ffa500;
    background-color: white;
    font-weight: bold;
    font-family: 'Roboto', serif;
    border: 1px solid #ffa500;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option-opinion.active {
    color: white;
    background: linear-gradient(to right, #ffa500, #ffc766);
    border: none;
}

.filter-option-academic {
    color: burlywood;
    background-color: white;
    font-weight: bold;
    font-family: 'Roboto', serif;
    border: 1px solid burlywood;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option-academic.active {
    color: white;
    background: linear-gradient(to right, burlywood, #c7b39a);
    border: none;
}

.filter-option-live-note {
    color: green;
    background-color: white;
    font-weight: bold;
    font-family: 'Roboto', serif;
    border: 1px solid green;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option-live-note.active {
    color: white;
    background: linear-gradient(to right, green, rgb(61, 255, 47));
    border: none;
}

/* Live Note Article Display Styling */
.live-note-date {
    font-size: 14px;
    font-weight: bold;
    color: #228B22;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    display: block;
}

.live-note-full-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 20px 0;
    padding: 20px;
    background-color: #f0f8f0;
    border-left: 4px solid #228B22;
    border-radius: 4px;
}

/* Override general active style for filter-options if needed */
/* .filter-option:hover, */
/* .filter-option.active { */
/* Remove or adjust general active styles to avoid conflicts */
/* For example, remove background-color: rgba(0,0,0,0.1); if conflicting */
/* } */