/* ====================================================
   HEADER STYLING - Full Bleed, No White Space
   ==================================================== */
   #header-container {
    width: 100%;
    background: #000;
    color: #fff;
    border-bottom: 3px solid #facc15;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

#articles > h2 {
    display: none;
}


#logo-title {
    max-width: 1000px;
    width: 100%;
    display: flex;
    align-items: center;
    margin: 0 auto;
    padding: 0 20px;
}

body {
    margin: 0;
    padding-top: 0px; /* Adjust as needed */
    width: 100%;
    overflow-x: hidden;
}

/* Logo and Site Title */
#logo {
    height: 40px;
    width: auto;
    max-width: 90px;
    margin-right: 15px;
}

#site-title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-right: 30px;
}

#site-title a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s ease-in-out;
}

#site-title a:hover {
    color: #facc15;
}

/* Navigation Menu */
#main-menu {
    flex-grow: 1;
    text-align: right;
}

#main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

#main-menu ul li {
    margin-left: 20px;
}

#main-menu ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

#main-menu ul li a:hover {
    background: #facc15;
    color: #111;
}

/* ====================================================
   FOOTER STYLING - Full Bleed, No White Space
   ==================================================== */
#footer-container {
    width: 100%;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    margin-top: auto;
}

#footer-container p {
    margin: 0;
}

/* ====================================================
   GLOBAL LAYOUT
   ==================================================== */
html {
    height: 100%;
    margin: 0;
    padding: 100px 0 0 0;
    display: flex;
    flex-direction: column;
}

#content-container {
    flex: 1;
    display: grid;
    grid-template-columns: 20% 60% 20%;
    max-width: 1300px;
    margin: 0px auto 0;
    gap: 20px;
    min-height: calc(100vh - 200px);
    box-sizing: border-box;
}

/* ====================================================
   SIDEBAR STYLING
   ==================================================== */
#left-sidebar, #right-sidebar {
    background: #f8f8f8;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#left-sidebar h3, #right-sidebar h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #222;
    border-bottom: 2px solid #facc15;
    padding-bottom: 5px;
}

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

#left-sidebar ul li {
    margin-bottom: 10px;
}

#left-sidebar ul li a {
    text-decoration: none;
    color: #444;
    font-weight: bold;
    background: #fff;
    padding: 8px 10px;
    display: block;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

#left-sidebar ul li a:hover {
    background: #facc15;
    color: #111;
}

/* ====================================================
   ARTICLE GRID & CARD STYLING
   ==================================================== */
#articles {
    padding: 0 5px 20px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(7, auto);
    gap: 10px;
    margin-bottom: 0px;
}


/* Grid adjustments based on screen size */
/* For large screens: force 3 columns and 7 rows */
@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(7, auto);
    }
}

/* For medium screens: 2 columns */
@media (max-width: 1023px) and (min-width: 769px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
}

/* For small screens: 1 column */
@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}


.news-article {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    min-height: 70%;
    margin-bottom: 0px;  /* Increase this value as needed */
}

.news-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.news-article img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.news-article h3 {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
    flex-grow: 1;
}

.news-article a {
    text-decoration: none;
    color: #222;
}

.news-article a:hover {
    color: #facc15;
}

.article-date {
    font-size: 14px;
    color: #000000;
    margin-top: 10px;
}

.article-author {
    font-size: 14px;
    color: #444;
    font-weight: bold;
    margin-top: 5px;
}

/* ====================================================
   CATEGORY HEADER STYLING
   ==================================================== */
   .category-header {
    margin: 10px 0 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #facc15;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the content */
    text-align: center;      /* Ensure text is centered */
    font-size: 22px;
    font-weight: bold;
    color: #111;
}


/* ====================================================
   SINGLE ARTICLE PAGE STYLING
   ==================================================== */
#article-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 25px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.7;
    font-family: 'EB Garamond', 'Georgia', serif;
}

#article-hero {
    text-align: left;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    margin-bottom: 10px;
}

.article-summary {
    font-size: 16px;
    color: #444;
    font-weight: 500;
    max-width: 90%;
    margin: 0 auto 15px;
    padding: 8px 12px;
    border-left: 3px solid #facc15;
    background: #f9f9f9;
    line-height: 1.4;
}

.article-meta {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    margin-bottom: 15px;
}

.article-author {
    font-weight: bold;
    color: #222;
}

#related-articles {
    margin-top: 3rem;
  }
  .related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    row-gap: 20px; /* Increase vertical gap */
    column-gap: 10px; /* Adjust horizontal gap if needed */
  }
  
  #related-articles .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    row-gap: 45px;  /* Increase vertical gap */
    column-gap: 5px; /* Optional: adjust horizontal gap */
  }
  
  .related-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: transform 0.2s ease;
  }
  .related-card:hover {
    transform: translateY(-4px);
  }
  .related-card img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
  }
  .related-card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
  }
  .related-card p {
    font-size: 0.9rem;
    color: #4b5563;
  }
  

/* ====================================================
   ARTICLE CONTENT
   ==================================================== */
#article-content {
    font-size: 16px;
    line-height: 1.7;
    color: #000;
    text-align: left;
}

#article-content p {
    margin-bottom: 18px;
}

#article-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-top: 30px;
    margin-bottom: 12px;
    border-bottom: 2px solid #facc15;
    padding-bottom: 4px;
}

#article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-top: 25px;
    margin-bottom: 8px;
}

#article-content blockquote {
    font-style: italic;
    color: #555;
    padding: 12px;
    border-left: 3px solid #facc15;
    background: #f8f8f8;
    margin: 18px 0;
}

#article-content img {
    max-width: 100%;
    border-radius: 5px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#article-content iframe {
    max-width: 100%;
    border-radius: 5px;
    margin: 15px 0;
}

#article-content a {
    color: #0056b3;
    font-weight: bold;
    text-decoration: none;
}

#article-content a:hover {
    text-decoration: underline;
    color: #003399;  /* Even deeper blue on hover */
}

/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */
@media (max-width: 768px) {
    #article-container {
        padding: 20px;
    }
    .article-header h1 {
        font-size: 30px;
    }
    .article-summary {
        font-size: 14px;
    }
    #article-content {
        font-size: 15px;
    }
    #article-content h2 {
        font-size: 22px;
    }
    #article-content h3 {
        font-size: 18px;
    }
}

/* ====================================================
   CATEGORY PAGE STYLING
   ==================================================== */
   .section-header {
    text-align: center;
    margin: 5px auto 5px;
    max-width: 800px;
    padding: 10px;
    background-color: #f8f8f8;
    border-bottom: 3px solid #facc15;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    padding-bottom: 10px;
  }

#category-container {
    max-width: 950px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

#category-hero {
    text-align: center;
    margin-bottom: 30px;
}

.category-header h1 {
    font-size: 34px;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
}

.category-summary {
    font-size: 18px;
    color: #444;
    font-weight: 500;
    max-width: 80%;
    margin: 0 auto 15px;
    line-height: 1.6;
}

.hidden-tags {
    display: none;
}

.expand-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin-top: 10px;
    display: block;
}

.expand-btn:hover {
    background-color: #0056b3;
}

.hidden-tags {
    display: none;
}

#tag-list:not(.expanded) li:nth-child(n+31) {
    display: none;
}

#tag-list.expanded li {
    display: list-item;
}


.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination .current {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}


/* ====================================================
   POSTS GRID (Alternate Layout)
   ==================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 0px 0;
}

.post-card {
    border: 1px solid #ccc;
    padding: 16px;
}

.post-image {
    width: 100%;
    height: auto;
    display: block;
}

.post-title {
    margin-top: 1em;
    font-size: 1.2rem;
}

.post-summary {
    margin-top: 0.5em;
}

.post-author {
    font-style: italic;
    margin-top: 0.5em;
}

/* ====================================================
   ARTICLE NAVIGATION STYLING
   ==================================================== */
.article-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.nav-button {
    pointer-events: auto;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.8rem 1.5rem;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease-in-out;
}

.prev-button {
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.next-button {
    right: 30px;
    background: linear-gradient(135deg, #ffcc00, #ff6600);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

.next-button:hover {
    background: linear-gradient(135deg, #ffaa00, #ff4400);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.6);
    transform: translateY(-2px);
}

/* ====================================================
   SOCIAL SHARE ICONS
   ==================================================== */
.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    white-space: nowrap;
}

.social-share p {
    margin: 0;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(32px, 4vw, 44px);
    height: clamp(32px, 4vw, 44px);
    border-radius: 50%;
    overflow: hidden;
    background: #f4f4f4;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
    flex-shrink: 1;
}

.social-share a img {
    width: clamp(16px, 2vw, 24px);
    height: clamp(16px, 2vw, 24px);
    display: block;
}

.social-share a:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.social-share a:hover img {
    opacity: 0.85;
}

/* ====================================================
   SWIPE INSTRUCTION STYLING
   ==================================================== */
#swipe-instructions {
    display: none;
    position: fixed;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    animation: fadeOut 5s ease-in-out forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@media (pointer: coarse) {
    .prev-button,
    .next-button {
        display: none !important;
    }
    #swipe-instructions {
        position: fixed;
        bottom: 5vh;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 8px 15px;
        border-radius: 8px;
        font-size: 14px;
        text-align: center;
        opacity: 0;
        transition: opacity 1s ease-in-out;
        pointer-events: none;
        display: block;
    }
    .swipe-fade {
        animation: fadeOut 5s ease-in-out forwards;
    }
}

/* ====================================================
   MEDIA QUERY: HIDE NEXT BUTTON ON TOUCH DEVICES
   ==================================================== */
@media (pointer: coarse) {
    .next-button {
        display: none !important;
    }
    #swipe-instructions {
        display: block !important;
    }
}

/* ====================================================
   RESPONSIVE DESIGN - Mobile & Tablet
   ==================================================== */
/* Tablets */
@media (max-width: 1024px) {
    #content-container {
        grid-template-columns: 25% 75%;
    }
    #right-sidebar {
        display: none;
    }
    #main-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    #main-menu ul li {
        margin: 5px;
    }
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        margin: 20px 0;
    }
    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
    .news-article img {
        height: 160px;
    }
    body {
        padding-top: 50px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    #header-container {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    #logo-title {
        justify-content: center;
    }
    #main-menu {
        text-align: center;
    }
    #content-container {
        grid-template-columns: 100%;
    }
    #left-sidebar {
        display: none;
    }
    body {
        padding-top: 50px;
    }
    .posts-grid,
    .article-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        margin: 20px 0;
    }
}

/* Extra Small Mobile */
@media (max-width: 380px) {
    #header-container {
        padding: 5px 0;
    }
    #logo {
        height: 30px;
        max-width: 70px;
        margin-right: 10px;
    }
    #site-title {
        font-size: 18px;
        margin-right: 15px;
        letter-spacing: 0.5px;
    }
    #main-menu ul {
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 10px;
    }
    #main-menu ul li {
        margin-left: 10px;
    }
    #main-menu ul li a {
        font-size: 12px;
        padding: 5px 8px;
        border-radius: 3px;
    }
    body {
        padding-top: 20px;
    }
}
