/* ---- Existing styles kept as-is ---- */
@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url(/fonts/Inter-roman.latin.var.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter var';
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url(/fonts/Inter-italic.latin.var.woff2) format('woff2');
  font-named-instance: 'Italic';
}

body {
  font-family: 'Inter var', system-ui, sans-serif;
  margin: 0;
  background: #003562; /* deep blue background */
  color: #D4AF37;      /* yellow font */
  display: flex;
  justify-content: center;
}

.main-container {
  display: flex;
  background: transparent;
  max-width: none;
  width: 100%;
  padding: 40px;
  gap: 30px;
  align-items: stretch;
  margin: 0;
}

.sidebar {
  width: 20%;
  flex-shrink: 0;
}

.sidebar h2 {
  font-size: 20px;
  margin-bottom: 20px;
  font-variation-settings: 'wght' 750;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 30px;
}

.sidebar li {
  margin-bottom: 15px;
  border-bottom: 1px solid #D4AF37; /* 31072025 */
  height: 20px;
  padding-bottom: 5px; /* 31072025 */
}

.sidebar a {
  text-decoration: none;
  color: #D4AF37;
  font-size: 16px;
}

.sidebar a:hover {
  text-decoration: underline;
}

.divider {
  width: 2px;
  background: #D4AF37;
}

.content {
  flex: 1;
  max-width: none;
}

.blog-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 8px;
  margin-top: 10px;
  margin-bottom: 30px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  justify-content: center;
}

.blog-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-block;          /* ensure transform works cleanly */
}

.blog-title {
  font-size: 18px;
  font-weight: 600;
}

a {
  color: white;
}

/* Content spacing */
.content h1 {
  margin-bottom: 20px;
}

/* Link tags */
.content a {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 13px;
  border-radius: 4px;
  text-decoration: none;
  margin-right: 1px;
  margin-bottom: 2px;
  font-size: 0.95em;
  transition: background 0.3s ease, color 0.3s ease;
}
.content a:hover {
  background: #ffd700;
  color: #0a2d4d;
}

/* HR */
hr {
  border: none;
  height: 2px;
  background-color: #D4AF37;
  margin: 20px 0;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95em;
  background: rgba(255, 255, 255, 0.05);
  color: white;
}
table, th, td {
  border: 1px solid #D4AF37;
}
th, td {
  padding: 10px;
  text-align: left;
}
th {
  background: rgba(255, 215, 0, 0.1);
  font-weight: bold;
}
/* Reduce Title column width slightly */
.post-table th:nth-child(3),
.post-table td:nth-child(3) {
  width: 52%; /* adjust as per your preference */
}

/* Increase Created column width */
.post-table th:nth-child(4),
.post-table td:nth-child(4) {
  width: 12%; /* slightly more than default */
}

/* Reduce Title column width slightly */
.post-table th:nth-child(1),
.post-table td:nth-child(2),
.post-table td:nth-child(4),
.post-table td:nth-child(5),
.post-table td:nth-child(6),
.post-table td:nth-child(7) {
  text-align: center;
}

/* Code */
pre {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
}
pre code {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #ffffff;
}

/* Section headers */
.section-title {
  color: #D4AF37;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.4rem;
}

/* Description text */
.description-text {
  color: #f0f0f0;
  font-size: 1rem;
  line-height: 1.6;
}

.title-separator {
  border: none;
  height: 2px;
  background: #D4AF37;
  margin-bottom: 20px;
}

/* Post Header */
.post-header {
  display: inline-block;
}
.post-title {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
}
.short-separator {
  height: 1px;
  background: #D4AF37;
  margin: 5px 0;
  border-radius: 1px;
  width: 100%;
}
.post-date {
  font-size: 0.9rem;
  color: #cccccc;
  margin: 5px 0 15px 0;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
    width: 95%;
    padding: 20px 10px;
    gap: 20px;
  }
  .sidebar {
    width: 100%;
    border-bottom: 2px solid #D4AF37;
    padding-bottom: 10px;
    text-align: center;
  }
  .divider {
    width: 100%;
    height: 2px;
    background: #D4AF37;
  }
  .content {
    width: 100%;
    padding: 0 5px;
  }
  .post-title {
    font-size: 1.4rem;
  }
  .blog-badge {
    justify-content: center;
  }
}

/* Hamburger icon */
.hamburger {
  display: none;
  font-size: 2rem;
  color: #D4AF37;
  padding: 10px;
  cursor: pointer;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
}

/* Sidebar slide effect */
.sidebar {
  transition: transform 0.3s ease-in-out;
}

/* Mobile adjustments */
@media (max-width: 900px) {
  .hamburger {
    display: block;
    position: sticky;  /* moves along with content */
    top: 10px;         /* sticks only while in view */
    left: 10px;
    z-index: 1100;
    transition: left 0.3s ease;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 220px;
    background: #003562;
    padding: 20px;
    transform: translateX(-100%);
    z-index: 999;
    transition: transform 0.3s ease-in-out;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  body.sidebar-open .hamburger {
    position: fixed;   /* temporarily fix when sidebar is open */
    left: 230px;       /* offset for sidebar */
    top: 10px;
  }
  .divider {
    display: none;
  }
  .main-container {
    flex-direction: column;
    padding: 20px;
  }
  .content {
    padding-top: 0px; /* clears hamburger height */
  }
}

.hamburger span {
  display: block;
  height: 3px;
  width: 25px;
  margin: 5px 0;
  background: #D4AF37;
  transition: 0.4s;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Default (desktop) */
.mobile-blog-badge {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

/* Mobile only */
/*@media (max-width: 768px) {*/
/*  .mobile-blog-badge {*/
/*    display: flex;*/
/*    justify-content: center;*/
/*  }*/
/*  !* Hide sidebar badge on mobile *!*/
/*  .sidebar .blog-badge {*/
/*    display: none;*/
/*  }*/
/*}*/

/* Hide sidebar badge on mobile */
.blog-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.mobile-blog-badge {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

@media (max-width: 900px) {
  /*.mobile-blog-badge {*/
  /*  display: flex;*/
  /*  justify-content: center;*/
  /*}*/
  .sidebar.open .blog-badge {
    display: flex;
  }
  .sidebar:not(.open) .blog-badge {
    display: none;
  }
  /*.sidebar.open ~ .content .mobile-blog-badge {*/
  /*  display: none;*/
  /*}*/
  /* Ensure hamburger doesn’t overlap */
  .hamburger {
    top: 10px;
    left: 10px;
    z-index: 1100;
  }
}

.sidebar a i {
  margin-right: 8px;
  font-size: 1.1em;
  color: #D4AF37;
}

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
#searchBox {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #D4AF37;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
}
#searchBox::placeholder {
  color: #ccc;
}

.store-announcement {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.announcement-img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.announcement-content {
  flex: 1;
}

.announcement-title {
  font-size: 1.4rem;
  margin: 0 0 5px 0;
  font-weight: bold;
}

.announcement-tagline {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 10px;
}

/* Sidebar menu link icon alignment */
.sidebar ul li a {
    display: flex;            /* makes icon and text inline-flex */
    align-items: center;      /* vertically aligns icon with text */
    gap: 8px;                 /* consistent spacing between icon and text */
}

/* Normalize font icon sizes (Font Awesome) */
.sidebar ul li a i {
    font-size: 20px;          /* all icons same size */
    width: 20px;              /* reserve fixed width */
    text-align: center;       /* centers icon if narrower */
}

/* Normalize SVG icons if used */
.sidebar ul li a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.announcement-cover-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin: 20px 0;
    border-radius: 8px;
}

.thumbnail-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 24px;
    color: #D4AF37; /* matches your theme */
    flex-shrink: 0;
}
.store-announcement {
    display: flex;
    gap: 20px;
    align-items: center;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex; justify-content: center; align-items: center;
  z-index: 2000;
}
.modal-content {
  background: #003562;
  padding: 30px;
  border-radius: 8px;
  color: #D4AF37;
  text-align: center;
  width: 300px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.modal-content input {
  width: 100%;
  margin-bottom: 15px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #D4AF37;
  background: rgba(255,255,255,0.1);
  color: white;
}
.modal-content button {
  background: #D4AF37;
  color: #003562;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.modal-content button:hover {
  background: #ffdd55;
}

#quickAddForm input, #quickAddForm textarea, #quickAddForm select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #D4AF37;
  background: rgba(255,255,255,0.1);
  color: white;
}
#quickAddForm button {
  background: #D4AF37;
  color: #003562;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
#previewContainer {
  margin-top: 20px;
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 6px;
  color: white;
  max-width: 1000px;       /* match your form width */
  width: 100%;
  overflow-x: auto;        /* scroll if needed */
  white-space: pre-wrap;   /* wrap long lines */
  word-wrap: break-word;   /* break long words if needed */

  line-height: 10px;
  font-size: 12px;
  box-sizing: border-box;
}
#quickAddForm {
    display: flex;
    flex-direction: column;
    gap: 15px; /* spacing between fields */
}

#quickAddForm label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

#quickAddForm input,
#quickAddForm select,
#quickAddForm textarea {
    width: 100%;        /* instead of 100% */
    max-width: 1000px;
  box-sizing: border-box;
  padding: 8px;
  margin-top: 5px;
  border-radius: 4px;
  border: 1px solid #D4AF37;
  background: rgba(255,255,255,0.1);
  color: white;
}

/* Submit button styling */
#quickAddForm button[type="submit"] {
    width: 100%;        /* instead of 100% */
    max-width: 1000px;
    padding: 8px 16px;
    background: #D4AF37;
    color: #003562;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}
#quickAddForm button[type="submit"]:hover {
    background: #FFD700;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;  /* match input fields */
  width: 100%;
  margin-bottom: 20px;
}

#logoutButton {
  padding: 8px 16px;
  background: #D4AF37;
  color: #003562;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

#logoutButton:hover {
  background: #FFD700;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    width: 100%;
    margin-bottom: 20px;
}

.header-actions {
    display: flex;
    gap: 15px;   /* space between Add and Logout */
}

#postAddBtn,
#postEditBtn {
  padding: 8px 16px;
  background: #D4AF37;
  color: #003562;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.blog-home-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit; /* uses the same text color as surrounding */
}

.blog-home-link:hover {
  opacity: 0.8;
}


.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#searchBox {
  padding: 6px 10px;
  border: 1px solid #D4AF37;
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 4px;
}

.filter-btn {
  background: #D4AF37;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: #003562;
}
.filter-btn:hover {
  background: #FFD700;
}

#tagFilter {
  padding: 5px;
  border-radius: 4px;
}

/*290725*/
/* ===== Mobile Specific Fixes ===== */
@media (max-width: 900px) {
  body, html {
    overflow-x: hidden; /* prevent any horizontal scrolling */
  }

  section.content {
    padding: 0 10px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* Wrap search and filter buttons for mobile */
  .title-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .title-bar input#searchBox {
    flex: 1 1 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .title-bar #tagFilter {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Code snippet fix (applies everywhere, safe for desktop too) */
pre, code {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: block;
  white-space: pre;
  box-sizing: border-box;
}

@media (max-width: 900px) {
    /*.mobile-blog-badge {*/
    /*    !*margin-top: 50px; !* pushes badge below hamburger menu *!*!*/
    /*    position: relative;*/
    /*    z-index: 1;*/
    /*}*/

    .nav-toggle {  /* hamburger menu */
        position: relative;
        z-index: 10; /* stays on top */
    }
}

/* -------------------- Global Layout -------------------- */
body {
  font-family: 'Inter var', system-ui, sans-serif;
  margin: 0;
  background: #003562;
  color: #D4AF37;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.main-container {
  flex: 1;
  box-sizing: border-box;
  width: 100%; /* ensure no overflow */
}

/* -------------------- Footer -------------------- */
.site-footer {
  background: #D4AF37;
  color: #003562;
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Wrapper for desktop & mobile content */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ---------- Desktop Footer ---------- */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  gap: 15px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: bold;
}

.footer-links a {
  color: #003562;
  font-size: 1.5rem;
  margin: 0 10px;
  transition: color 0.3s ease;
}
.footer-links a:hover {
  color: white;
}

/* ---------- Mobile Compact Footer ---------- */
.footer-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between; /* <-- arrow on far right */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  box-sizing: border-box;
}

.footer-mobile-bar .footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-toggle-arrow {
  margin-left: auto; /* ensures arrow stays far right */
  font-size: 1.5rem;
  cursor: pointer;
  animation: arrow-bounce 1.5s infinite;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ---------- Vertical Dock ---------- */
.footer-vertical-dock {
  position: fixed;
  bottom: -260px; /* hidden initially */
  right: 20px; /* hugs screen edge */
  width: 60px;
  background: #D4AF37;
  border-radius: 10px 10px 0 0;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: bottom 0.3s ease-in-out;
  z-index: 9999;
}
.footer-vertical-dock.open {
  bottom: 60px;
}
.footer-vertical-dock a {
  color: #003562;
  /*font-size: 1.5rem;*/
  /*margin: 0 10px;*/
  transition: color 0.3s ease;
}
.footer-vertical-dock a:hover {
  color: white;
}

/* ---------- Responsive Toggle ---------- */
@media (max-width: 900px) {
  .footer-content { display: none; }
  .footer-mobile-bar {
    display: flex;
    padding: 0 10px; /* reduce side padding */
  }
  .footer-mobile-bar .footer-left {
    flex: 1;  /* occupy full space for logo+name */
  }
  .footer-toggle-arrow {
    margin-left: auto; /* push arrow to far right */
  }
}
@media (min-width: 769px) {
  .footer-mobile-bar { display: none; }
}

/* Fix mobile blog badge link inheriting content styles */
.mobile-blog-badge .blog-home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mobile-blog-badge .blog-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-block;          /* ensure transform works cleanly */
}

.mobile-blog-badge .blog-title {
    font-size: 18px;
    font-weight: 600;
    color: #D4AF37; /* ensures text is visible */
}

/* Mobile only */
@media (max-width: 900px) {
    .mobile-blog-badge {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }
    .sidebar .blog-badge { display: none; }
    .sidebar.open ~ .content .mobile-blog-badge { display: none; }
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px;
  position: relative;
}

/* Card style */
.post-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* pushes title to bottom */
  background: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  height: 280px; /* fixed total height */
  position: relative;
}

/* Thumbnail wrapper */
.post-thumbnail {
  width: 100%;
  height: 180px;        /* fixed image height */
  object-fit: contain;  /* ensures full image visible */
  background: #000;     /* filler behind transparent/letterboxed images */
}

/* Title */
.post-card h3 {
  margin: 10px;
  font-size: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

/* Mobile (2 per row, proportionally smaller) */
@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 10px;
  }
  .post-card {
    height: 220px;
  }
  .post-thumbnail {
    height: 140px;
  }
  .post-card h3 {
    font-size: 0.5rem; /* smaller title text */
  }
}

/* 31072025 */
.sidebar ul li {
  opacity: 0;
  transform: translateX(-20px);
  animation: menuItemSlideIn 0.5s ease forwards;
}

.sidebar ul li:nth-child(1) { animation-delay: 0.2s; }
.sidebar ul li:nth-child(2) { animation-delay: 0.4s; }
.sidebar ul li:nth-child(3) { animation-delay: 0.6s; }
.sidebar ul li:nth-child(4) { animation-delay: 0.8s; }
.sidebar ul li:nth-child(5) { animation-delay: 1.0s; }
.sidebar ul li:nth-child(6)  { animation-delay: 1.2s; }
.sidebar ul li:nth-child(7)  { animation-delay: 1.4s; }
.sidebar ul li:nth-child(8)  { animation-delay: 1.6s; }

@keyframes menuItemSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide-up animation for post cards */
.post-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardSlideUp 0.6s ease forwards;
}

/* Delay each card slightly for a staggered effect */
.post-card:nth-child(1) { animation-delay: 0.2s; }
.post-card:nth-child(2) { animation-delay: 0.4s; }
.post-card:nth-child(3) { animation-delay: 0.6s; }
.post-card:nth-child(4) { animation-delay: 0.8s; }
.post-card:nth-child(5) { animation-delay: 1s; }
.post-card:nth-child(6) { animation-delay: 1.2s; }
.post-card:nth-child(7) { animation-delay: 1.4s; }
.post-card:nth-child(8) { animation-delay: 1.6s; }
.post-card:nth-child(9) { animation-delay: 1.8s; }
.post-card:nth-child(10) { animation-delay: 2s; }
.post-card:nth-child(11) { animation-delay: 2.2s; }
.post-card:nth-child(12) { animation-delay: 2.4s; }
.post-card:nth-child(13) { animation-delay: 2.6s; }
.post-card:nth-child(14) { animation-delay: 2.8s; }
.post-card:nth-child(15) { animation-delay: 3.0s; }
/* Add more nth-child if needed */

@keyframes cardSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Global slide-up animation for announcement items */
.announcement-content {
  opacity: 0;
  transform: translateY(30px);
  animation: listItemSlideUp 0.6s ease forwards;
}

/* Stagger effect for up to 10 items */
.announcement-content:nth-child(1)  { animation-delay: 0.2s; }
.announcement-content:nth-child(2)  { animation-delay: 0.4s; }
.announcement-content:nth-child(3)  { animation-delay: 0.6s; }
.announcement-content:nth-child(4)  { animation-delay: 0.8s; }
.announcement-content:nth-child(5)  { animation-delay: 1.0s; }
.announcement-content:nth-child(6)  { animation-delay: 1.2s; }
.announcement-content:nth-child(7)  { animation-delay: 1.4s; }
.announcement-content:nth-child(8)  { animation-delay: 1.6s; }
.announcement-content:nth-child(9)  { animation-delay: 1.8s; }
.announcement-content:nth-child(10) { animation-delay: 2.0s; }

@keyframes listItemSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content {
  opacity: 0;
  transform: translateY(20px);
  animation: detailSlideUp 0.5s ease forwards;
}

@keyframes detailSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tpstore-logo {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

.tpstore-listing-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
}

.page-title {
    display: flex;
    align-items: center;  /* vertically center logo and text */
    gap: 10px;            /* space between logo and text */
    /*margin: 0;            !* remove default margin if needed *!*/
}

@media (max-width: 900px) {
  .tpstore-listing-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }
}
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem; /* space above bottom bar */
}

.back-btn {
  text-decoration: none;
  font-weight: 500;
  color: #0077cc;
}

.back-btn:hover {
  text-decoration: underline;
}

.post-views {
  font-size: 0.9rem;
  color: #888;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-views i {
  color: #666;
}

/* For listing page inline style */
.post-date .separator {
  margin: 0 6px;
  color: #ccc;
}
.post-date .post-views {
  font-size: 0.9rem;
  color: #888;
}

/* For home card fixed view counter */
.post-card {
  position: relative;
}
.post-card .post-views-fixed {
  position: absolute;
  bottom: 8px;
  right: 10px; /* change to left if you prefer */
  font-size: 0.85rem;
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-card .post-views-fixed i {
  color: #fff;
  font-size: 0.8rem;
}

.post-date .separator {
  margin: 0 6px;
  color: #ccc;
}
.reading-time {
  color: #666;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.reading-time i {
  font-size: 0.85rem;
}

.share-buttons {
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.share-buttons span {
  font-weight: 600;
}
.share-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,0.1); /* same background for all */
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.share-btn i {
  font-size: 1.3rem;
}

/* icon colors */
.share-btn.twitter { color: #1DA1F2; }
.share-btn.linkedin { color: #0A66C2; }
.share-btn.whatsapp { color: #25D366; }
.share-btn.copy-link { color: #888; }

.share-btn:hover {
  background: #D4AF37;
  color: white;
}

/* Toast popup */
#copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFD700;   /* deep blue */
  color: #0056b3;        /* yellow text */
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}
#copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px); /* slight slide-up */
}

.related-posts {
  margin-top: 3rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem;
}

/* When only one card */
.related-grid:has(.related-card:only-child) {
  grid-template-columns: repeat(3, minmax(150px, 1fr)); /* force same structure */
  justify-content: center;
}

.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.related-thumbnail {
  width: 100%;
  height: 70%;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.related-card h4 {
  font-size: 0.9rem;
  margin: 0.5rem;
  color: #fff;
}

.snippet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* pushes button to far right */
    margin-bottom: 0.5rem;
}

.code-section-title {
    margin: 0;
    font-weight: bold;
    font-size: 1.5rem;
    color: #D4AF37; /* your yellow */
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #D4AF37;
    color: #002B45;
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.copy-btn:hover {
    background: #002B45;
    color: #FFD700;
    transform: scale(1.1);
}

/* For screens <= 600px (adjust breakpoint if needed) */
@media (max-width: 900px) {
  .related-grid:not(:has(.related-card:only-child)) {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Single card → fix width and keep centered */
  .related-grid:has(.related-card:only-child) {
    grid-template-columns: 1fr;
    justify-content: center;
  }
  .related-grid > .related-card:only-child {
    max-width: 150px;
    margin: 0 auto;
  }

  /* ↓ Reduce font sizes inside cards ↓ */
  .related-card {
    font-size: 0.85rem; /* ~14px if base is 16px */
  }
  .related-card h3,
  .related-card h4 {
    font-size: 0.5rem; /* smaller headings */
  }
  .related-card p {
    font-size: 0.75rem; /* smaller body text */
  }
}
.footer-subscribe-bar {
  display: flex;
  justify-content: flex-end;  /* move to right end */
  align-items: center;
  gap: 10px;
  background: #002B50; /* same as footer top strip */
  padding: 0 20px;     /* horizontal padding only */
  height: 60px;        /* match footer height */
}

.footer-subscribe-bar .subscribe-label {
  font-weight: 600;
  color: #D4AF37;
}

.footer-subscribe-bar form {
  display: flex;
  gap: 8px;
}

.footer-subscribe-bar input {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  outline: none;
  width: 220px;
}

.footer-subscribe-bar button {
  background: #D4AF37;
  color: #003562;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.footer-subscribe-bar button:hover {
  background: #FFD700;
}

.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  color: #D4AF37;  /* theme yellow */
  background-color: #003562;             /* theme blue text */
  text-align: center;
  border-radius: 4px;
  padding: 10px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
}
.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}
.notify-btn {
  background: transparent;
  border: none;
  color: #D4AF37;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.3s;
}
.notify-btn:hover {
  color: #FFD700;
}

@media (max-width: 900px) {
  .footer-subscribe-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #002B50; /* match theme */
    flex-wrap: wrap; /* allows wrapping if screen is very narrow */
  }

  .footer-subscribe-bar .subscribe-label {
    font-size: 14px;
    margin: 0;
    color: #D4AF37;
    white-space: nowrap;
  }

  .footer-subscribe-bar form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0;
  }

  .footer-subscribe-bar input {
    width: 130px; /* reduced width for mobile */
    padding: 6px 8px;
    font-size: 13px; /* smaller input font */
  }

  .footer-subscribe-bar button {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Mobile-friendly markdown tables */
@media (max-width: 900px) {
  .post-body table,
  .description-text table {
    display: block;              /* allow overflow to work */
    width: 100%;
    overflow-x: auto;            /* horizontal scroll */
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255,255,255,0.1); /* optional frame */
    border-radius: 6px;                               /* optional */
    margin: 0.5rem 0 1rem;
  }

  .post-body table th,
  .post-body table td,
  .description-text table th,
  .description-text table td {
    white-space: nowrap;         /* keep columns; enables horizontal scroll */
  }
}

/* egg behaves like a normal footer icon */
.footer-links .egg {
  position: relative;
  color: #003562;     /* same deep blue as others */
  /*font-size: 18px;    !* match size of other icons *!*/
  line-height: 1;
    display: inline-flex;
    text-decoration: none !important;
}

/* subtle breathing glow */
.footer-links .egg::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 36px; height: 36px;   /* glow halo only */
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(212,175,55,0.45);
  animation: egg-breathe 2.8s ease-in-out infinite;
  z-index: -1; /* sits behind icon */
}

/* optional shimmer */
.footer-links .egg::before {
  content: "";
  position: absolute; top: 0; left: -150%;
  width: 80%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  animation: egg-shimmer 6s ease-in-out infinite;
  pointer-events: none;
}

/* keyframes (same as before) */
@keyframes egg-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.35); }
  50%      { box-shadow: 0 0 12px 5px rgba(212,175,55,0.22); }
}
@keyframes egg-shimmer {
  0%   { left: -150%; opacity: 0; }
  10%  { opacity: 1; }
  25%  { left: 150%; opacity: 0; }
  100% { left: 150%; opacity: 0; }
}

.blog-logo,
.mobile-blog-badge .blog-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-block;
  will-change: transform;
}

@keyframes coin-bounce {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-10px) scale(1.04); }
  60%  { transform: translateY(0) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blog-logo,
  .mobile-blog-badge .blog-logo {
    animation: none !important;
    transform: none !important;
  }
}

.emoji-raindrop {
  position: fixed;
  top: -40px;
  opacity: .95;
  pointer-events: none;
  user-select: none;
  z-index: 2147483647;
  will-change: top, margin-left, transform;
  width: var(--size, 32px);
  height: var(--size, 32px);

  animation:
    emoji-fall var(--dur,6s) linear forwards,
    emoji-sway var(--sway,3s) ease-in-out infinite alternate,
    emoji-spin var(--spin,4s) linear infinite;
}

.emoji-raindrop img {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes emoji-fall {
  0%   { top:-40px; opacity:.95; }
  100% { top:110vh; opacity:.9; }
}

@keyframes emoji-sway {
  0%   { margin-left:-12px; }
  100% { margin-left:  12px; }
}

@keyframes emoji-spin {
  from { transform: rotate(var(--rot,0deg)); }
  to   { transform: rotate(calc(var(--rot,0deg) + var(--turn,360deg))); }
}

/* Coffee cup base */
.footer-links .coffee-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;   /* same as other icons */
  color: #003562;      /* deep blue (match theme) */
  text-decoration: none;
}

/* Size the actual icon */
.footer-links .coffee-link i{
  font-size: 1.5rem;     /* same size as your other icons */
  /*line-height: 1;*/
}

.footer-links .coffee-link:hover {
  color: #FFD700;      /* gold on hover */
}

/* Steam animation fix */
.footer-links .coffee-link .steam {
  position: absolute;
  left: 50%;              /* center over cup by default */
  transform: translateX(-50%);
  top: -10px;             /* rise above cup */
  width: 6px;
  height: 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: steam-rise 2.5s ease-in-out infinite;
  opacity: 0;
  pointer-events: none;   /* don’t interfere with clicks */
  display: block;         /* avoid inline underscores */
}

.footer-links .coffee-link .steam:nth-child(2) {
  left: 60%;
  animation-delay: 0.6s;
}
.footer-links .coffee-link .steam:nth-child(3) {
  left: 40%;
  animation-delay: 1.2s;
}

@keyframes steam-rise {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  30%  { opacity: 0.7; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

/* Make dock render above the footer and allow steam to overflow */
.site-footer { position: relative; z-index: 10000; }
.footer-vertical-dock { z-index: 10001; overflow: visible; }

/* Icon links render cleanly (no stray underline/baseline) */
.footer-vertical-dock a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}

/* Steam anchors should be positioning context */
.footer-vertical-dock .coffee-link { position: relative; }

/* Tighter steam position for the dock (so it doesn't hit the cap) */
.footer-vertical-dock .coffee-link .steam {
  top: -6px;               /* was -10px */
}

/* Hide steam when dock is collapsed */
.footer-vertical-dock:not(.open) .steam { display: none; }

/* Ensure steam animates properly in vertical dock */
.footer-vertical-dock .coffee-link {
  position: relative; /* positioning context */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Steam floats above the mug */
.footer-vertical-dock .coffee-link .steam {
  position: absolute;
  bottom: 100%;          /* anchor directly above the cup */
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: steam-rise 2.5s ease-in-out infinite;
  opacity: 0;
}

/* Adjust multiple streams */
.footer-vertical-dock .coffee-link .steam:nth-child(2) {
  left: 60%;
  animation-delay: 0.6s;
}
.footer-vertical-dock .coffee-link .steam:nth-child(3) {
  left: 40%;
  animation-delay: 1.2s;
}

.dl-container {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* space between button and badge */
  flex-wrap: wrap; /* allow stacking on small screens */
}

.dl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFD700, #FFC107);
  color: #003562;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.dl-badge i {
  color: #003562;
}
.dl-badge {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 215, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}
