@import url('fonts.css');

/* ======================
   Variables & Base Styles
   ====================== */
   :root {
    --border-color: #f0f0f0;
    --border-width: 3px;
    --hover-red: rgb(209, 0, 0);
    --logo-height: 80px;
    --nav-height: 40px;
    --header-height: calc(var(--logo-height) + var(--nav-height));
    --grid-columns: 3;
    --grid-gap: 1rem;
    --text-stroke-color: rgba(0, 0, 0, 0.8);
    --text-stroke-x: 0.07em;
    --text-stroke-y: 0.07em;
    --text-stroke-blur: 0.5em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PP Radio Grotesk', sans-serif;
    font-size: 20px;
    
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* ==============
   Layout Styles
   ============== */

.container {
    max-width: 990px;
    margin: 0 auto;
    padding: 0 20px;
    /*position: relative;*/
    /*display: flex;*/
    /*justify-content: flex-start;*/
}

/* ==============
   Header Styles
   ============== */
.logo-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--logo-height);
    display: flex;
    align-items: center;
    background: white;
    border-bottom: var(--border-width) solid var(--border-color);
    z-index: 1001;
}

.logo-container {
    max-width: 990px;
    margin: 0 auto;
    position: relative;
    padding: 1.5rem 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: #000000;
    text-align: center;
    text-decoration: none;
}

.logo-red {
    color: var(--hover-red);
    font-size: 1.45rem;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

/* ==============
   Navigation
   ============== */
.main-nav {
    position: fixed;
    top: var(--logo-height);
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(255, 255, 255);
    padding-left: 0px;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    z-index: 1000;
    border-bottom: var(--border-width) solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.main-nav .container {
    position: relative;
    overflow: hidden;
}

.nav-list {
    display: flex;
    gap: 0.1rem;
    list-style: none;
    padding: 0rem 0rem;
    margin: 0rem;
}
/* Add left margin to only the first nav item so it isn’t obscured by the fade */
/*.nav-list li:first-child {
    margin-left: 20px;  /* Same as the fade overlay width */
  /*}*/
.nav-list::after {
    content: "";
    display: block;
    width: 50px;
    flex-shrink: 0;
}

.nav-scroll-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    max-width: 990px; /* Match container width */
    margin: 0 auto; /* Center the scroll wrapper */
}
.nav-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
/* Prevent link pointer events when dragging */
.nav-scroll-wrapper.dragging .nav-link {
    pointer-events: none;
}
.nav-list.dragging {
    cursor: grabbing;
}



.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #000000;
    font-weight: 900;
    border-radius: 0rem;
    transition: all 0.0s ease-in;
    border-bottom: 5px solid transparent; /* Add transparent border */
}

.nav-link:hover,
.nav-link.active-nav-link {
    color: var(--hover-red);
    border-bottom-color: var(--hover-red); /* Red underline */
    background-color: transparent;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 25px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1100;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hide hamburger when menu is open */
.mobile-menu-btn.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

/* New hamburger animation */
.mobile-menu-btn.active .menu-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.menu-bar {
    transition: all 0.2s ease;
    transform-origin: center;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -75%;
    width: 75%;
    height: 100vh;
    background: white;
    z-index: 1050;
    transition: transform 0.2s ease-in-out; /* Faster transition */
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    transform: translateX(100%);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #333;
    text-decoration: none;
}

.mobile-logo-red {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--hover-red);
    text-decoration: none;
}

.close-menu-btn {
    position: relative;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #000;
    font-weight: 900;
    transition: all 0.2s ease;
}

.mobile-nav-link.active-mobile-link {
    color: var(--hover-red) !important;
    position: relative;
}

/* Add red indicator bar for active item */
.mobile-nav-link.active-mobile-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--hover-red);
}

.mobile-nav-link:hover {
    background-color: #f9f9f9;
    color: var(--hover-red);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease; /* Faster transition */
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==============
   Content Areas
   ============== */
.content {
    margin-top: var(--header-height);
    padding: 1rem 1rem;
    flex: 1;
}

/* Add consistent alignment for all elements */
.article-title,
.article-subtitle,
.article-date,
.article-hero,
.article-content {
    margin-left: 0;
    padding-left: 0;
    width: calc(100% - 40px); /* Account for container padding */
    max-width: 700px; /* Maintain original content width */
}

.article-hero + .article-content {
    margin-top: 0;
  }

article {
    margin-bottom: 2rem;
}

/* Add to existing image styles */
.article-hero img,
.article-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure consistent content width */
.article-hero,
.article-content > .content-block {
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Add top/bottom margins to content images */
.article-content .article-image {
    margin: 1.2rem 0;
}

/* Add spacing between image and caption */
.article-content .article-image img {
    margin-bottom: 0.4rem;
}

.article-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem;
    display: block;
}

.article-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-style: italic;
}

.article-date {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 1rem;
}

.article-meta {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px; /* Match article content */
    margin: 0; /* Remove auto margin */
    padding: 0;
}

.share-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s;
    border-radius: 4px;
}

.share-button:hover {
    color: var(--hover-red);
    background-color: #f9f9f9;
}

.share-button-text {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--hover-red);
    gap: 0.8rem;
    color: #000;
    font-weight: bold;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
    display: inline-flex; /* Keep natural width */
    white-space: nowrap; /* Prevent text wrapping */
}   

.share-button-icon {
    padding: 0.45rem; /* Increased by 50% from 0.3rem */
    border: 2px solid var(--hover-red); /* Add transparent border */
}

.share-icon {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.share-button-icon .share-icon {
    width: 1.5rem; /* Increased by 50% from 1.2rem */
    height: 1.5rem; /* Increased by 50% from 1.2rem */
}

.share-section {
    max-width: 700px; /* Match article content */
    margin: 2rem 0 0; /* top spacing only */
    padding: 0;
    display: flex;
    justify-content: center; /* Center horizontally */
    margin-bottom: 1rem !important; /* Reduce bottom spacing */
}

.article-page > .article-content:last-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.article-header {
    max-width: 700px; /* Match article content width */
    margin: 0;
    padding: 0;
}

.article-container {
    display: block;
}

.article-content {
    margin-top: var(--header-height);
    padding: 1rem 1rem;
    max-width: 700px;
    line-height: 1.3;
}



.article-content .related-articles {
    margin-top: 0 !important;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.article-page {
    max-width: 990px;
    margin: 0 0 0 20px; /* Match container padding */
    padding: 1rem 20px;
}

.content-text_block p {
    margin: 1em 0;
}

/* Add spacing to crossheads */
.content-crosshead h3 {
    margin: 1.5em 0 1em;
    font-weight: bold;
    font-size: 1.25rem;
}

/* Quote styling */
.content-quote {
    margin: 1.5rem 0;
}

.quote-text {
    display: inline;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: bold;
    box-shadow: 
        -6px 0 0 #e2e2e2,
        6px 0 0 #e2e2e2;
    box-decoration-break: clone;
    padding: 0.15rem 0;
    background-color: #e2e2e2;
}

.quote-author {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.return-home-button {
    background-color: var(--hover-red);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    display: inline-block;
    margin-top: 20px;
}

.responsive-iframe {
    width: 100%;
    aspect-ratio: 3/4;  /* Adjust according to the aspect ratio of the embed */
    border: 0;
    height: 100%;
}

.instagram-embed {
    width: 100%;
    max-width: 540px;
    min-width: 326px;
    /*min-height: 400px;    Add this */
    height: auto;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    background-color: #fff;
    display: block;
    margin: 2rem 0;
}

.instagram-media {
    width: 100% !important;
    margin: 1rem 0;
}

.bluesky-embed-iframe {
    transition: height 0.3s ease;
    min-height: 300px; /* initial min-height */
}

/* Truth Social Embed */
.truthsocial-embed-container {
    margin: 1.5rem auto;
    max-width: 600px;
    width: 100%;
}

.truthsocial-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Initial aspect ratio */
    height: 0;
    overflow: hidden;
}

.truthsocial-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 400px; /* Minimum height */
}

/* Allow embed.js to adjust height */
.truthsocial-embed.truthsocial-embed-loaded {
    min-height: 0;
    height: auto;
}

.infobox {
    background-color: #e2e2e2; /* light grey */
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.infobox-title {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* DATAWRAPPER EMBED */
.datawrapper-embed-container {
    position: relative;
    width: 100%;
    margin: 1.5rem auto;
    max-width: 800px;
}

.datawrapper-embed-container iframe {
    min-width: 100% !important;
    border: none !important;
}

.embed-spinner {
    display: block;
    width: 30px;  /* 50% larger */
    height: 30px; /* 50% larger */
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top: 3px solid #000;
    animation: spin 1s linear infinite;
    margin: 15px auto; /* Increased margin for better spacing */
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ======================
   List Styles
   ====================== */
.content-list {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.content-list ul {
    list-style-type: disc;
}

.content-list li {
    margin-bottom: 0.5rem;
}

/* Match text block styling */
.content-list li p {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

/* share button */

.share-preview {
    margin-bottom: 20px;
    text-align: center;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0px;
    margin-bottom: 0px;
}

.share-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    text-decoration: none;
    color: var(--hover-red);
    font-weight: 900;
    transition: background 0.2s;
    text-align: center;
}

.share-option:hover {
    background: none !important;
}

.close-share-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f9f9f9;
    border: none;
    border-radius: 4px;
    color: var(--hover-red);
    font-weight: 900;
    cursor: pointer;
    transition: background 0.2s;
}

.close-share-btn:hover {
    background: none !important;
}

.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
}

.share-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: white;
    z-index: 2001;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 0;
    border-radius: 0;
}

.share-preview-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.share-preview-category {
    font-size: 0.85rem;
    color: var(--hover-red);
    padding: 10px 20px 0;
    font-weight: bold;
    text-transform: uppercase;
}

.share-preview-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    line-height: 1.3;
    padding: 10px 20px 20px;
    margin: 0;
}

.share-options {
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--border-color);
}

.share-option {
    display: block;
    padding: 15px 20px;
    text-align: left;
    background: #fff;
    border: none;
    border-bottom: 3px solid var(--border-color);
    text-decoration: none;
    color: var(--hover-red);
    font-weight: normal;
    transition: none;
    width: 100%;
    box-sizing: border-box;
}

.close-share-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: #fff;
    border: none;
    color: var(--hover-red);
    font-weight: normal;
    cursor: pointer;
    text-align: center;
    transition: none;
}

/* center article content after 1590px */
@media (min-width: 1590px) {

    .article-page {
        margin: 0 auto; /* Center container */
        padding: 1rem 20px 1rem 0; /* Remove left padding */
    }

    /* Reset all content elements to full container width */
    .article-title,
    .article-subtitle,
    .article-date,
    .article-hero,
    .article-content {
        width: 100%;
        padding-left: 0;
        margin-left: 0;
    }

    /* Keep original 700px width but remove lateral constraints */
    .article-content {
        max-width: 700px;
        margin-right: auto;
        margin-left: 0; /* Align with title/image */
        padding-left: 0;
    }

    /* Ensure hero image matches content width */
    .article-hero {
        max-width: 700px;
        margin-left: 0;
    }
}

.article-image {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
    border-radius: 0px;
}

.image-caption {
    font-size: 0.7rem;
    color: #666;
    text-align: left;
    margin-bottom: 0rem;
    font-weight: 200;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--grid-gap);
    padding: 0rem;
    max-width: 990px;
    margin: 0 auto;
    grid-auto-rows: 300px;
}

.article-card {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    padding: 0rem;
    background-color: #e0e0e0;
}

.article-card-title {
    display: inline;
    padding: 0;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    line-height: 1.2; 
    background: rgb(116, 0, 0);
    box-shadow: 
        -2px 0 0 rgba(116, 0, 0, 1),
        2px 0 0 rgba(116, 0, 0, 1); /* Expand background horizontally */
    box-decoration-break: clone; /* Continuous background across lines */
    color: white !important;
    font-size: 1.2rem;
    letter-spacing: -0.00em; /* Tighten spacing if needed */
    margin-top: 0;
}

.card-link {
    display: block;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.content-overlay {
    padding: 0.25rem;
    bottom: 0;
    left: 0;
    right: 0;
    /*background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.8) 100%);*/
    color: white;
    position: absolute;
}

.article-card:hover {
    transform: scale(1.00);
}

/* Span modifiers */
.article-card.span-2 {
    grid-column: span 2;
    grid-row: span 2;
}
.article-card.span-2 .article-card-title {
    font-size: 2rem;
    line-height: 1.2; /* Adjust if needed */
}

.article-card.span-3 {
    grid-column: span 3;
    grid-row: span 2;
}
.article-card.span-3 .article-card-title {
    font-size: 2.5rem;
    line-height: 1.2; /* Adjust if needed */
}

.article-card-category {
    display: block;
}

.article-card-category span {
    display: inline; /* Background only on text */
    padding: 0 0.15rem;
    background: black;
    color: white;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
    /* Add background extension for multi-line text */
    box-shadow: 
        -2px 0 0 black,
        2px 0 0 black;
    box-decoration-break: clone;
}

.article-card.span-2 .article-card-category span{
    font-size: 1rem;
    padding: 0 0.25rem; /* Added bottom padding */
}

.article-card.span-3 .article-card-category span{
    font-size: 1.2rem;
    padding: 0 0.25rem; /* Added bottom padding */
}

.article-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-box {
    background-color: var(--border-color);
    color: #000000;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 900;
    text-decoration: none;
}

/* Tag-page */

.tag-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.tag-header {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    border-bottom: var(--border-width) solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--hover-red);
}

.tag-article-list {
    display: grid;
    gap: 0.25rem;
}

.tag-article-card {
    position: relative; /* Creates positioning context */
    width: 100%;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.5rem;
    overflow: hidden; /* Contain absolute positioned children */
    margin: 0.5rem;
}

.tag-article-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.tag-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
    color: inherit;
}

.tag-article-content {
    grid-template-columns: 0.8fr 1fr;
    display: grid;
    gap: 0.5rem;
    align-items: flex-start;
    column-gap: 1rem;
}

.tag-text-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.tag-image-container {
    height: auto;
    position: relative;
    aspect-ratio: 16/9;
}

.tag-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-article-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #000000;
}

.tag-article-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.tag-article-date {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0;
}

/* Related articles grid */

.related-articles-header {
    font-size: 1.3rem;
    font-weight: 200;
    margin-bottom: 1.5rem;
    font-style: italic;
    padding-left: 0; /* Add this */
    margin-left: 0; /* Add this */
}

.related-articles-header::after {
    content: '';
    display: block;
    width: 2rem;
    height: 5px;
    background-color: var(--hover-red);
    margin-top: 0.5rem;
}

.related-articles-grid {
    margin: 0rem;  /* centers grid and adds some vertical spacing */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
  
.related-article-card {
    display: flex;
    align-items: flex-start;
    background: #fff;
    text-decoration: none;
    color: inherit;
    padding: 0rem;
}
  
.related-article-image {
    flex-shrink: 0;
    width: 50%;     /* square image width */
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-right: 1rem;
}
  
.related-article-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 5;
    -webkit-line-clamp: 5; /* Limits to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.2; /* Adjust as needed */
    max-height: calc(1.2em * 5); /* Ensures it doesn't exceed 2 lines */
}

.related-article-category {
    font-size: 0.7rem;
    color: var(--hover-red);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    display: block;
    font-weight: 600;
}

/* Adjust existing title spacing */
.related-article-title {
    margin-top: 0.2rem;
    /* Keep existing styles but reduce top margin */
}

.other-articles {
    margin-top: 1.5rem;
    padding-top: 1rem;
/*     border-top: 3px solid var(--border-color);
 */}

/* ======================
   About Page Styles
   ====================== */
.about-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: left;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--hover-red);
}

.about-content {
    line-height: 1.6;
    text-align: left;
}

.about-text {
    line-height: 1.6;
    text-align: left;
}

.about-text b {
    font-size: 1.2rem;
}

.about-text br + br {
    display: block;
    content: "";
    margin-top: 1.5rem;
}

.about-text > b:last-child {
    display: block;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    text-align: center;
    color: var(--hover-red);
}

/* ==============
   Footer
   ============== */
.main-footer {
    background: #ffffff;
    color: #000000;
    padding: 1rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 990px;
    position: relative;
    /* Match container behavior */
    margin: 0 auto;
    padding: 0 20px;
}

/* Add thick red border at top (same as header) */
.footer-border {
    height: 5px;
    background-color: var(--hover-red);
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Match header logo styling */
.footer-logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: #000000;
    margin-bottom: 1.5rem;
}

.footer-logo-red {
    color: var(--hover-red);
    font-size: 2.2rem;
    font-weight: 900;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #000000;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 900;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.0s ease;
}

/* Match nav hover effects */
.footer-link:hover {
    color: var(--hover-red);
}

.footer-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--hover-red);
}

.footer-text {
    text-align: right;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

/* ======================
   Responsive Design
   ====================== */

@media (min-width: 990px) and (max-width: 1589px) {
    .container,
    .logo-container,
    .main-nav .container { /* Add navigation container */
        margin: 0; 
        max-width: 990px;
    }

    .container {
        padding: 0 !important; /* Force override */
    }

    /* Add navigation scroll wrapper adjustment */
    .nav-scroll-wrapper {
        max-width: 990px;
        margin: 0 auto;
    }

    /* Remove any leftover horizontal padding */
    .nav-list {
        padding-left: 0;
    }

    /* Remove navigation centering */
    .main-nav {
        justify-content: flex-start; /* Change from center */
        padding-left: 20px; /* Match container padding */
    }

    /* Constrain scroll wrapper to container width */
    .nav-scroll-wrapper {
        max-width: 990px;
        margin: 0; /* Remove auto margin */
        padding-right: 20px; /* Match container padding */
    }

    /* Adjust article page alignment */
    .article-page {
        margin-left: 0;
        padding-left: 1rem;
        width: calc(100% - 1rem);
    }

    /* Add this rule to remove container padding */
    .article-page > .container {
        padding-left: 0;
        margin-left: 0;
    }

    .article-title,
    .article-subtitle,
    .article-date,
    .article-hero,
    .article-content {
        width: 100%;
        max-width: 700px;
        padding-left: 0;
        margin-left: 0;
    }

    /* Remove any residual padding from container */
    /* Remove container padding for article pages */
    .article-page .container {
        padding: 0;
        margin: 0 0 0 20px;
    }

    .footer-content {
        margin: 0 0 0 20px;
        padding: 0;
        max-width: 990px;
    }



}

@media (max-width: 989px) {
    :root {
        --logo-height: 50px;
        --nav-height: 35px;
        --header-height: calc(var(--logo-height) + var(--nav-height));
        --grid-columns: 2;
        
    }

    .article-header,
    .article-meta,
    .share-section {
        width: calc(100% - 40px); /* Account for container padding */
    }

    .article-header,
    .article-meta {
        width: 100%; /* Full width on smaller screens */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-red {
        font-size: 1rem;
    }

    .logo-container {
        padding: 0.5rem 0;
    }

    .nav-list {
        gap: 0;
    }
    
    .article-card.span-2,
    .article-card.span-3 {
        grid-column: span 1;
    }

    .content-overlay {
        padding: 0.75rem;
    }

    .article-title {
        font-size: 1.6rem;
    }
    
    .article-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .article-page {
        padding: 1rem 0 !important;
    }
    
    .article-title,
    .article-subtitle,
    .article-date,
    .article-hero,
    .article-content {
        width: 100%;
        max-width: none;
    }

    /* Unified mobile content padding */
    .content,
    .article-grid {
        padding: 1rem 0;
    }

    .about-title {
        font-size: 2rem;
    }

    .footer-logo {
        font-size: 1.8rem;
    }

    .footer-content {
        padding: 0 20px;
    }

}

/* MOBILE SIZE */
@media (max-width: 500px) {
    :root {
        --grid-gap: 0.25rem; /* This controls BOTH vertical and horizontal spacing */
        --header-height: var(--logo-height);
    }

    .main-nav {
        display: none;
    }

    .share-button {
        padding: 0.3rem;
    }

    .share-modal {
        width: 95%;
    }

    .share-options {
        grid-template-columns: 1fr;
    }
    
    .article-header,
    .article-meta,
    .share-section {
        width: calc(100% - (2 * var(--grid-gap))); /* Use mobile spacing */
    }
    
    .share-button-text {
        padding: 0.7rem 1.2rem;
        font-size: 1rem;
    }
    
    .share-icon {
        width: 1rem;
        height: 1rem;
    }

    .share-button-icon {
        padding: 0.45rem; /* Maintain increased size on mobile */
    }
    
    .share-button-icon .share-icon {
        width: 1.5rem; /* Adjusted for mobile */
        height: 1.5rem; /* Adjusted for mobile */
    }

    .share-section {
        margin: 2.5rem 0 1.5rem;
        padding: 0 var(--grid-gap);
    }

    .content {
        margin-top: var(--logo-height);
        padding: 0 0 1rem 0;
    }

    .article-content {
        margin-top: var(--logo-height);
    }

    .infobox {
        line-height: 1.2; /* Reduced from 1.6 */
    }

    .container {
        padding: 0 0px;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: var(--grid-gap);
        padding: 0; /* Add gap ONLY as side padding */
        margin: 0 auto; 
        width: 100%; 
        box-sizing: border-box; /* Prevent overflow */
    }

    .article-card {
        aspect-ratio: 4/3;
        width: 100%; /* Full width of grid column */
        margin: 0; /* Remove auto margins */
    }

    .article-card.span-2,
    .article-card.span-3 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .content-overlay {
        padding: 0.4rem;
        bottom: 5%;
    }

    /* Reset span-specific title sizes */
    .article-card.span-2 .article-card-title,
    .article-card.span-3 .article-card-title {
        font-size: 1.2rem !important; /* Match default mobile size */
        line-height: 1.2;
        box-shadow: 
            -2px 0 0 rgba(116, 0, 0, 1),
            2px 0 0 rgba(116, 0, 0, 1);
    }

    /* Ensure all titles use same size */
    .article-card-title {
        font-size: 1.2rem;
        line-height: 1.2;
        padding-left: 0.1rem;
        padding-right: 0.1rem;
        padding-bottom: 0.1rem;
        /* Compensate for reduced padding in box-shadow */
        box-shadow: 
            -2px 0 0 rgba(116, 0, 0, 1),
            2px 0 0 rgba(116, 0, 0, 1);
    }

    .article-card-category span {
        font-size: 0.8rem;
        padding: 0 0.1rem;
    }
    
    .article-card.span-2 .article-card-category span,
    .article-card.span-3 .article-card-category span{
        font-size: 0.8rem;
    }

    /* Add this to your mobile query */
    .article-page {
        margin: 0 !important; /* Override original left margin */
        padding: 1rem var(--grid-gap) !important;
    }

    .article-title,
    .article-subtitle,
    .article-date,
    .article-hero,
    .article-content {
        width: calc(100% - (2 * var(--grid-gap))); /* Account for new padding */
        padding: 0 var(--grid-gap); /* Add equal side padding */
        margin-left: auto;
        margin-right: auto;
    }

    .article-image {
        margin: 0.5rem 0; /* Maintain vertical spacing */
    }

    /* Fix container inheritance */
    .article-page .container {
        padding: 0 !important;
        margin: 0 !important;
    }

    .article-tags,
    .related-articles {
        width: calc(100% - (2 * var(--grid-gap)));
        padding: 0 var(--grid-gap);
        margin-left: auto;
        margin-right: auto;
    }

    /* Fix tag box alignment */
    .tag-box {
        margin-left: 0;
        margin-right: 0.25rem;
    }

    .related-articles-grid {
        grid-template-columns: 1fr; /* Single column container */
        gap: var(--grid-gap);
        max-width: 100% !important;
        padding: 0 0; 
    }

    .related-article-card {
        display: flex;
        flex-direction: row; /* Keep horizontal layout */
        width: 100%;
        padding: 0;
    }

    .related-article-image {
        width: 40% !important; /* Narrower square */
        aspect-ratio: 1/1; /* Perfect square */
        flex-shrink: 0;
        margin-right: var(--grid-gap);
    }

    .related-article-content {
        flex: 1; /* Take remaining space */
        min-width: 0; /* Allow text truncation */
        padding-left: 0.5rem;
    }

    .related-article-title {
        line-clamp: 3;
        -webkit-line-clamp: 3; /* Optimize line count */
        max-height: calc(1.2em * 3);
        font-size: 0.85rem; /* Slightly smaller text */
        line-height: 1.3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tag-article-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0; /* Remove gap between articles */
        padding: 0; /* Remove padding */
        margin-top: 0rem; /* Small top margin only */
    }

    .tag-article-card {
        padding: 0.5rem var(--grid-gap); /* Add padding inside cards */
        border-bottom: 1px solid var(--border-color); /* Add separator between articles */
        margin: 0; /* Remove margins */
    }

    .tag-article-content {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
        margin: 0; /* Remove margins */
    }

    .tag-image-container {
        width: 40%;
        height: auto;
        aspect-ratio: 1/1;
        flex-shrink: 0;
        margin: 0; /* Remove margins */
    }

    .tag-article-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .tag-text-content {
        width: 60%;
        padding: 0;
        margin: 0; /* Remove margins */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .tag-article-title {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem; /* Reduce space before date */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        line-clamp: 4;
        -webkit-line-clamp: 4; /* Show only 2 lines for title */
        overflow: hidden;
        line-height: 1.3;
        font-weight: 900;
    }

    .tag-article-subtitle {
        display: none; /* Keep subtitle hidden */
    }

    .tag-article-date {
        display: block; /* Show date below title */
        font-size: 0.7rem !important;
        color: #666;
        margin-top: 0;
        line-height: 1.2;
        margin-top: auto;
        padding-top: 0.5rem;
    }

    .tag-container {
        padding: 0.5rem; /* Minimal top/bottom padding */
    }
    
    .tag-header {
        padding-bottom: 0.5rem; /* Reduce header spacing */
        margin-bottom: 0.25rem; /* Reduce header spacing */
    }

    .about-title {
        font-size: 1.8rem;
    }
    
    .about-content {
        padding: 0 0.5rem;
    }

    .footer-logo {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-links {
        gap: 1rem;
    }

    .footer-border {
        margin-bottom: 0.5rem;
    }

}

/* ======================
   Utility Classes
   ====================== */
.nav-hidden {
    transform: translateY(calc(-1 * (var(--nav-height) + var(--border-width))));
}