@font-face {
    font-family: 'Jibberish';
    src: url('src/assets/Jibberish.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ============================================
   CSS VARIABLES - Color Palette
   ============================================ */
:root {
    --color-buttonPrimary: #333333;
    --color-buttonSecondary: #888888;
    --color-fontPrimary: #333333;
    --color-fontSecondary: #888888;
    --color-pageBackground: #f0f0f0;
    --color-cardBackground: #ffffff;
    --color-textboxBackground: #ffffff;
    --color-darkPageBg: #1a1a1a;
    --color-darkCardBg: #2a2218;
    --color-darkPaperBg: #fdfcf8;
    --color-darkFontPrimary: #ffffff;
    --color-darkFontSecondary: #cccccc;
    
    /* Semantic colors */
    --color-delete: #dc3545;
    --color-success: #2b8a3e;
    --color-warning: #f59f00;
    --color-info: #0066cc;
    --color-legislationTag: #d3f9d8;
    --color-legislationTagText: #1a6b2e;
    --color-projectTag: #dbe4ff;
    --color-projectTagText: #364fc7;
    --color-stageTag: #fff3bf;
    --color-stageTagText: #7d5a00;
    --color-progressBar: #4caf50;
    --color-border: #ccc;
    --color-shadow: rgba(0,0,0,0.1);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    max-width: 700px;
    margin: 0 auto;
    padding: 2px;
    background-color: var(--color-pageBackground);
    font-size: 21px;
}

@media (min-width: 1024px) {
    body {
        max-width: none;  /* Remove max-width constraint on large screens to allow full layout */
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-pageBackground);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    font-size: 48px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-fontPrimary);
    letter-spacing: 2px;
}

.loading-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.loading-percent {
    font-size: 12px;
    color: var(--color-fontSecondary);
    font-weight: 600;
}

h1 {
    color: var(--color-darkFontPrimary);
}

input {
    font-family: Arial, Helvetica, sans-serif;
    padding: 10px;
    width: 70%;
    font-size: 16px;
}

button {
    font-family: Arial, Helvetica, sans-serif;
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--color-buttonPrimary);
    color: white;
    border: none;
    cursor: pointer;
}

/* --- Feed Header --- */
#feedHeader {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 21px;
  margin-top: 0;
  padding-right: 16px;
  padding-left: 16px;
  min-height: 89px;
  position: sticky;
  top: 0;
  background: var(--color-pageBackground);
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Filter Dropdown --- */
.filter-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--color-cardBackground);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--color-shadow);
    z-index: 100;
    min-width: 180px;
    overflow: hidden;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 9px 16px;
    font-size: 13px;
    background: var(--color-cardBackground);
    color: var(--color-fontPrimary);
    border: none;
    border-radius: 0;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--color-pageBackground);
}


#filterBar {
    display: flex;
    flex-wrap: initial;
    gap: 8px;
}

.filter-btn {
    padding: 6px 14px;
    font-size: 13px;
    background-color: var(--color-buttonSecondary);
    color: var(--color-fontPrimary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.filter-btn:hover {
    background-color: #d0d0d0;
}

.filter-btn.active {
    background-color: var(--color-buttonPrimary);
    color: white;
    border-color: var(--color-buttonPrimary);
}

/* --- Posts / Cards --- */
.post {
  background: var(--color-cardBackground);
  border-radius: 8px;
  padding: 16px;
    padding-bottom: 16px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-left: 4px solid #524e4e;
  padding-bottom: 8px;
  border-right: 4px solid #524e4e;
  border-bottom: 2px solid #524e4e;
  margin-left: 13%;
  margin-right: 13%;
}

/* --- Folder Tiles (project & legislation cards in feed) --- */
.folder-tile {
    margin-bottom: 14px;
    border-radius: 6px 10px 10px 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.07);
    transition: transform 0.15s, box-shadow 0.15s;
}

.folder-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.13), 0 2px 6px rgba(0,0,0,0.08);
}

.folder-tile-tab {
    display: inline-block;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    border-radius: 6px 6px 0 0;
    margin-left: 12px;
    position: relative;
    top: 1px;
}

.folder-tile-paper {
    background: var(--color-cardBackground);
    padding: 16px 18px 14px;
    border: 1px solid #e8e6e0;
    border-radius: 0 8px 8px 8px;
}

.folder-tile-stage {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.folder-tile-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.folder-tile-title a {
    color: var(--color-fontPrimary);
    text-decoration: none;
}

.folder-tile-title a:hover {
    text-decoration: underline;
}

.folder-tile-desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.folder-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #f0ede6;
}

.folder-tile-footer small {
    color: #aaa;
    font-size: 11px;
}

.folder-tile-footer small a {
    color: #888;
    text-decoration: none;
}

.folder-tile-footer .votes {
    margin-top: 0;
}

/* Keep old .post for regular text posts */
.project-card { display: none; } /* replaced by folder-tile */
.legislation-card { display: none; } /* replaced by folder-tile */

.post h3 {
    margin: 8px;
    font-size: 18px;
    padding-left: 5px;
}

.post h3 a {
    color: var(--color-fontPrimary);
    text-decoration: none;
}

.post h3 a:hover {
    text-decoration: underline;
}

.post p {
  margin: 13px 0px;
  color: var(--color-fontPrimary);
  font-size: 21px;
  background: var(--color-textboxBackground);
  min-height: 16px;
  border-radius: 8px;
  padding: 5px;
  border: 3px #6a6363;
  height: auto;
}

.post small {
    color: #888;
    font-size: 12px;
}

.post small a {
    color: #666;
}

/* --- Post Meta Row (tags) --- */
.post-meta-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tag-legislation {
    background-color: var(--color-legislationTag);
    color: var(--color-legislationTagText);
}

.tag-project {
    background-color: var(--color-projectTag);
    color: var(--color-projectTagText);
}

.tag-stage {
    background-color: var(--color-stageTag);
    color: var(--color-stageTagText);
}

/* --- Votes --- */
.votes {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.votes button {
  font-size: 21px;
  background: var(--color-buttonSecondary);
  color: var(--color-fontPrimary);
  border: 1px solid var(--color-border);
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  min-width: 89px;
  min-height: 55px;
}

.votes button:hover {
    background: #d0d0d0;
}

.votes span {
font-weight: bold;
  color: var(--color-fontPrimary);
  text-align: center;
  font-size: 34px;
  min-width: 89px;
}   

/* --- Comments --- */
.comment {
    background: var(--color-pageBackground);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 6px 0;
    border-left: 3px solid var(--color-border);
}

/* --- Modal --- */
#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Generic modal class for other modals like settings */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#modalContent {
    background: var(--color-cardBackground);
    padding: 0;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

/* Generic modal content styling - with dark theme for settings */
.modal-content {
    background: #1a1a1a;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    gap: 16px;
}

.modal-buttons-left {
    display: flex;
    gap: 8px;
}

.modal-tab-btn {
    padding: 8px 16px;
    background: var(--color-pageBackground);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.modal-tab-btn:hover {
    background: #e0e0e0;
}

.modal-tab-btn.active {
    background: var(--color-buttonPrimary);
    color: white;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: auto;
}

.modal-close-btn:hover {
    color: #000;
}

.modal-form {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
}

/* Settings Modal Tab Styles */
.settings-tab-btn {
    padding: 12px 16px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.settings-tab-btn:hover {
    color: #fff;
}

.settings-tab-btn.active {
    color: #fff;
    border-bottom: 2px solid #3b82f6;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.active {
    display: block;
}

.modal-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    background-color: var(--color-textboxBackground);
    color: var(--color-fontPrimary);
}

.modal-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    background-color: var(--color-textboxBackground);
    color: var(--color-fontPrimary);
}

.modal-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: var(--color-textboxBackground);
    color: var(--color-fontPrimary);
    cursor: pointer;
    box-sizing: border-box;
}

.modal-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.modal-media-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.media-upload {
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-upload-label {
    padding: 8px 12px;
    background: #f59f00;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.media-upload-label:hover {
    background: #e08900;
}

.media-filename {
    font-size: 12px;
    color: #666;
}

.media-embed {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.media-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.modal-submit-container {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.modal-submit-btn {
    padding: 10px 32px;
    background: var(--color-buttonPrimary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-submit-btn:hover {
    background: #555;
}

/* --- Result (translator) --- */
#result {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--color-cardBackground);
    border-radius: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

/* --- Legislation Detail Grid --- */
.parliament-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #2b8a3e;
    font-size: 14px;
    text-decoration: none;
}

.parliament-link:hover {
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0 16px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: bold;
}

.detail-value {
    font-size: 15px;
    color: #222;
    font-weight: 500;
}

/* --- Tasks / Discussion --- */
.task {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 6px 0;
    border-left: 3px solid #dee2e6;
}

.task p {
    margin: 0 0 4px 0;
}

.task small {
    color: #999;
    font-size: 12px;
}

/* --- Floating post button --- */
#floatingPostBtn {
    position: fixed;
    right: 21px;
    bottom: 21px;
    width: 89px;
    height: 89px;
    border-radius: 50%;
    background: var(--color-buttonPrimary);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(59,130,246,0.24);
    border: none;
    cursor: pointer;
    z-index: 1200;
    transition: all 0.2s ease;
}

#floatingPostBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(59,130,246,0.32);
}

/* --- Floating top-left menu --- */
#floatingMenu {
    position: fixed;
    right: 16px;
    top: 16px;
    border-radius: 50%;
    z-index: 1300;
}
#menuBtn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #330c4b;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 8px 13px rgba(0,0,0,0.16);
    padding: 0px;
    transition: all 0.2s ease;
}

#menuBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 18px rgba(0,0,0,0.24);
}
#menuList {
    margin-top: 8px;
    background: var(--color-cardBackground);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
}
.menu-item {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--color-fontPrimary);
    font-weight: 600;
}
.menu-item:hover { background: #f3f4f6; }

.menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0;
}

.menu-section-label {
    display: block;
    padding: 8px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 700;
    margin-top: 4px;
}

/* --- Post header / avatar / actions --- */
.post-header {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 2px;
  font-size: 34px;
}
.avatar {
    width: 98px;
    height: 89px;
    border-radius: 50%;
    background: #ddd;
    color: var(--color-fontPrimary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 21px;
}
.post-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}
.post-meta .author {
    font-weight: 700;
    color: #222;
    flex: 0 0 auto;
}
.post-meta .time {
  color: #888;
  font-size: 13px;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.post-meta .follow-btn {
  flex-shrink: 0;
}
.post-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.post-action-btn {
  background: var(--color-buttonSecondary);
  border: #000;
  color: var(--color-fontPrimary);
  cursor: pointer;
  font-size: 21px;
  padding: 8px;
  border-radius: 5px;
  min-width: 89px;
  min-height: 55px;
}
.post-action-btn:hover { color: #111; }
.post-owner-actions { margin-left: auto; display:flex; gap:8px; }

/* --- Follow Button (on posts/feed) --- */
.follow-btn {
  font-size: 21px;
  padding: 8px 16px;
  background: var(--color-buttonPrimary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: auto;
  font-weight: 600;
  transition: background 0.2s ease;
}

.follow-btn:hover {
  background: #444;
}

/* --- Project creation modal --- */
#projectForm select {
    font-family: Arial, Helvetica, sans-serif;
    padding: 10px;
    width: 100%;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-textboxBackground);
    margin-bottom: 0;
    cursor: pointer;
    box-sizing: border-box;
}

#projectForm input,
#projectForm textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background-color: var(--color-textboxBackground);
    color: var(--color-fontPrimary);
}

#categoryQuestion input {
    width: 100%;
    box-sizing: border-box;
}

/* --- landing page --- */
#landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80vh;
    text-align: center;
    gap: 40px;
}

#landingLogo h1 {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -1px;
}

#landingButtons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 260px;
    margin: 0 auto;
}

/* Ensure buttons and content stay centered on all screen sizes */
@media (min-width: 768px) {
    #landing {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
}

#landingAuthBtn {
    padding: 14px 24px;
    font-size: 16px;
    background: var(--color-buttonPrimary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
}

#landingAuthBtn:hover {
    background: #444;
}

#landingGuestBtn {
    padding: 14px 24px;
    font-size: 16px;
    background: var(--color-cardBackground);
    color: var(--color-fontPrimary);
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
}

#landingGuestBtn:hover {
    border-color: #999;
    background: #f8f8f8;
}

/* ============================================
   JIBBERISH GUEST MODE
   Applies Jibberish font site-wide for guests
   ============================================ */

body.jibberish,
body.jibberish input,
body.jibberish button,
body.jibberish textarea,
body.jibberish p,
body.jibberish h1,
body.jibberish h2,
body.jibberish h3,
body.jibberish span,
body.jibberish a,
body.jibberish label,
body.jibberish select {
    font-family: Jibberish, sans-serif;
}

#sharePopover {
    display: none;
    position: absolute;
    z-index: 2000;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.15));
}

.share-popover-inner {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.share-popover-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    padding: 4px 10px 6px;
}

.share-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    background: none;
    color: #222;
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}

.share-option:hover {
    background: #f4f4f4;
    color: #000;
}

/* ============================================
   COMMENT FOOTER (for share button on comments)
   ============================================ */

.comment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.comment-share-btn {
    background: none;
    border: none;
    font-size: 13px;
    color: #aaa;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.comment-share-btn:hover {
    color: #555;
    background: #f0f0f0;
}
#filterBar {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    margin-top:34px;
}

#filterDropdownWrap {
  position: relative;
  display: inline-block;
}

/* The single toggle button */
#filterToggleBtn {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 8px;
  font-size: 21px;
  font-weight: 600;
  background: var(--color-buttonSecondary);
  color: var(--color-fontPrimary);
  border: 1.5px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
  min-height: 55px;
}

#filterToggleBtn:hover {
    border-color: #aaa;
    background: #f8f8f8;
}

#filterIcon {
  font-size: 21px;
}

#filterChevron {
    font-size: 10px;
    color: #888;
}

/* The main dropdown panel */
.filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--color-cardBackground);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 16px var(--color-shadow);
    z-index: 500;
    min-width: 170px;
    padding: 6px;
    overflow: visible;
}

.filter-panel.open {
    display: block;
}

/* Top-level items in the panel */
.filter-panel-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    background: none;
    color: var(--color-fontPrimary);
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}

.filter-panel-item:hover {
    background: #f4f4f4;
}

.filter-panel-item.active {
    background: var(--color-buttonPrimary);
    color: white;
}

.filter-panel-item.active:hover {
    background: #333;
}

/* The Projects row that has a sub-panel */
.filter-panel-group {
    position: relative;
}

.filter-panel-item.has-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-chevron {
    font-size: 10px;
    color: #aaa;
}

/* Sub-panel for bills */
.filter-sub-panel {
    display: none;
    position: absolute;
    left: calc(100% + 4px);
    top: 0;
    background: var(--color-cardBackground);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 16px var(--color-shadow);
    min-width: 170px;
    padding: 6px;
    z-index: 501;
}

.filter-sub-panel.open {
    display: block;
}

.filter-sub-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    background: none;
    color: var(--color-fontPrimary);
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}

.filter-sub-item:hover {
    background: #f4f4f4;
}

.filter-sub-item.active {
    background: var(--color-buttonPrimary);
    color: white;
}

.filter-sub-item.active:hover {
    background: #333;
}

/* Standardized Tag Container - Two Column Layout */
.project-tag-container {
    display: flex;
    align-items: stretch;
    border-radius: 6px;
    margin: 6px 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.project-tag-container:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.project-tag-container a {
    display: flex;
    align-items: stretch;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* Left Column: Tag/Badge */
.project-tag-badge {
    padding: 8px 12px;
    width: auto;
    min-width: 233px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 21px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Right Column: Title */
.project-tag-title {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: 600;
    font-size: 21px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.1);
}

/* Legacy project-tag for backwards compatibility */
.project-tag {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    margin: 6px 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-tag a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
}

.filter-sub-divider {
    height: 1px;
    background: #eee;
    margin: 4px 8px;
}

/* Footer - centered alignment */
footer {
    text-align: center;
    padding: 20px;
    color: #999;
}

footer p {
    margin: 0;
}

/* Mobile responsive - remove post horizontal margins on small screens */
@media (max-width: 1023px) {
    .post {
        margin-left: 0;
        margin-right: 0;
    }
}