/* ==========================================================================
   Fonts + Reset
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Unkempt:wght@700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', Arial, sans-serif;
  background: #f4f7f9;
}

/* ==========================================================================
   1) NAVBAR (always fixed to top)
   ========================================================================== */
.navbar.fixed-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100vw;
  background: #0b3d91;   /* primary blue */
  z-index: 1100;
  margin: 0;
  border-radius: 0;
}
.navbar-brand {
  font-family: 'Unkempt', cursive;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}
.navbar-brand .keep { color: #ffcc00; }
.navbar-brand .talking { color: #ffffff; }
.navbar.fixed-top .nav-link {
  color: #ffffff !important;
}
.navbar.fixed-top .nav-link:hover,
.navbar.fixed-top .nav-link:focus {
  color: #ffcc00 !important;
}
.navbar-toggler-icon { filter: invert(1); }

/* Add top-padding to body so content sits below navbar */
body {
  padding-top: 80px; /* height of the navbar */
}
@media (max-width: 575.98px) {
  body { padding-top: 70px; } /* if navbar is taller on mobile */
}

/* ==========================================================================
   2) FIXED SIDE BOXES (each 700px wide, never scrolls away)
   ========================================================================== */
.left-fixed {
  position: fixed;
  top: 120px;   /* 56px navbar + ~40px breadcrumb + ~24px gap */
  left: 10px;   /* small gap from viewport left */
  width: 700px; /* increased from 500px to 700px */
  z-index: 1040;
}
.right-fixed {
  position: fixed;
  top: 120px;    /* same as left-fixed */
  right: 10px;   /* small gap from viewport right */
  width: 700px;  /* increased from 500px to 700px */
  z-index: 1040;
}

/* Style cards inside these fixed boxes */
.left-fixed .card,
.right-fixed .card {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.left-fixed .card-header,
.right-fixed .card-header {
  background: #f8f9fa;
  font-weight: 600;
}
.left-fixed .card-body p,
.left-fixed .card-body ul,
.right-fixed .card-body p,
.right-fixed .card-body ul {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.left-fixed .card-body small,
.right-fixed .card-body small {
  color: #666;
}

/* Hide side panels on narrower screens */
@media (max-width: 991.98px) {
  .left-fixed,
  .right-fixed {
    display: none;
  }
}

/* ==========================================================================
   3) FIXED BREADCRUMB (using STICKY, so it does NOT overlap content)
   ========================================================================== */
.breadcrumb-wrapper {
  position: sticky;          /* “sticks” under navbar but stays in flow */
  top: 56px;                 /* 56px = height of navbar */
  z-index: 1050;             /* above thread cards but below navbar */
  background-color: #f4f7f9; /* same background as page */
  padding: 0.5rem 1rem;      /* vertical padding around breadcrumb */
  border-bottom: 1px solid #e0e0e0;
  text-align: left;

  /* push it in by the new 700px side panels (+ 10px gap + 40px breathing) */
  margin-left: calc(700px + 10px + 40px);  /* 750px left margin */
  margin-right: calc(700px + 10px + 40px); /* 750px right margin */
}

/* On narrower screens, collapse side panels and let breadcrumb span full width */
@media (max-width: 991.98px) {
  .breadcrumb-wrapper {
    margin-left: 10px !important;
    margin-right: 10px !important;
    width: calc(100% - 20px) !important;
  }
}

/* Force breadcrumb items onto one line, with “/” separators */
.breadcrumb-wrapper .breadcrumb {
  margin: 0;
  background: transparent;
  display: inline-block;   /* shrink to fit text */
  padding: 0;
  white-space: nowrap;
  overflow-x: auto;
}
.breadcrumb-wrapper .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: " / ";
  color: #555;
  padding: 0 0.25rem;
}
.breadcrumb-wrapper .breadcrumb .breadcrumb-item a {
  color: #0b3d91;
  text-decoration: none;
  font-size: 1rem;
}
.breadcrumb-wrapper .breadcrumb .breadcrumb-item a:hover,
.breadcrumb-wrapper .breadcrumb .breadcrumb-item a:focus {
  text-decoration: underline;
}
.breadcrumb-wrapper .breadcrumb .breadcrumb-item.active {
  color: #555;
  font-weight: 400;
  font-size: 1rem;
}

/* ==========================================================================
   4) CENTER THREAD LIST (pushes inward by 700px side panels + breathing)
   ========================================================================== */
.threads-container {
  display: flex;
  justify-content: center;

  /* left margin = 700px (left panel) + 10px gap + 40px breathing = 750px */
  margin-left: 750px;

  /* right margin = 700px (right panel) + 10px gap + 40px breathing = 750px */
  margin-right: 750px;

  /* Now that breadcrumb is sticky, ensure first thread sits below navbar + breadcrumb */
  padding-top: calc(56px /* navbar */ + 40px /* approx. breadcrumb height */ + 1rem);
  padding-bottom: 2rem; /* extra space at bottom */
}
.threads-wrapper {
  width: 100%;
  max-width: 900px;      /* cap center column at 900px */
}

/* On narrower screens, collapse side panels and let center fill */
@media (max-width: 991.98px) {
  .threads-container {
    margin-left: 10px;
    margin-right: 10px;
    padding-top: calc(70px /* mobile navbar */ + 40px /* breadcrumb */ + 1rem);
    display: block;
  }
  .threads-wrapper {
    max-width: none;
    width: 100%;
  }
}

/* ==========================================================================
   5) THREAD CARD STYLING (white boxes, extra padding & spacing)
   ========================================================================== */
.thread-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem 1.5rem;    /* breathing-room */
  margin-bottom: 1.25rem;  /* gap between cards */
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.thread-item:hover {
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
/* —— LEFT HALF OF THREAD CARD —— */
.thread-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;             /* space between checkbox, avatar, and text */
  min-width: 0;            /* allow text-ellipses */
}
.thread-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  margin-top: 0.25rem;     /* vertical align */
}
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.thread-content {
  display: flex;
  flex-direction: column;
  min-width: 0;            /* allow text-ellipses */
}
.thread-content .thread-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  margin-bottom: 0.35rem;
  font-size: 1.2rem;
}
.thread-content .thread-title.unread {
  font-weight: 600;
  color: #1a1a1a;
}
.thread-content .thread-title.read {
  font-weight: 400;
  color: #555;
}
.thread-content .thread-submeta {
  font-size: 0.9rem;
  color: #555;
}
/* —— RIGHT HALF OF THREAD CARD —— */
.thread-right {
  text-align: right;
  flex-shrink: 0;
  margin-left: 1.5rem;
  min-width: 160px;
}
.thread-right a {
  color: #0b3d91;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.97rem;
}
.thread-right a:hover,
.thread-right a:focus {
  text-decoration: underline;
}
.thread-right .forum-name {
  display: block;
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.3rem;
}

/* ==========================================================================
   6) PAGINATION (active page highlighted)
   ========================================================================== */
ul.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
ul.pagination li.page-item {
  margin: 0 0.15rem;
}
ul.pagination li.page-item .page-link {
  background-color: #ffffff !important;
  color:            #0b3d91   !important;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
}
ul.pagination li.page-item.active .page-link {
  background-color: #0b3d91 !important;
  border-color:     #0b3d91 !important;
  color:            #ffffff !important;
  font-weight:      700        !important;
  font-size:        1.2rem     !important;
}
ul.pagination li.page-item .page-link:hover,
ul.pagination li.page-item .page-link:focus {
  color: #0b3d91 !important;
  text-decoration: none;
}

/* ==========================================================================
   7) POST / THREAD PAGE (untouched except for aligning checkboxes)
   ========================================================================== */
.post-row {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 16px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.post-checkbox {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}
.post-author {
  background: #e9f1fb;
  border: 1px solid #d0d6db;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.9em;
  text-align: center;
}
.post-author img {
  max-width: 80px;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.post-author .username {
  font-weight: bold;
  margin-bottom: 0.25rem;
}
.post-author .user-title {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 0.5rem;
}
.post-author .stat {
  font-size: 0.85em;
  margin: 0.25rem 0;
}
.post-content {
  position: relative;
  padding: 16px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1rem;
  padding-right: 32px; /* leave space for the checkbox */
}
.post-meta {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   8) UTILITY: LINK STYLING + SMALL FIXES
   ========================================================================== */
.breadcrumb > .breadcrumb-item > a {
  color: #0b3d91;
}
.breadcrumb > .breadcrumb-item.active {
  color: #555;
}

/* ==========================================================================
   9) OPTIONAL: Adjust avatar size utility class
   ========================================================================== */
.avatar-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

/* ==========================================================================
   10) LOGIN PAGE (only applies when <body class="login">)
   ========================================================================== */

/* Override body padding (no fixed navbar on login page) */
body.login {
  padding-top: 0;
  background: #f4f7f9; /* match the rest of your site */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* The white “login box” */
body.login .box {
  background-color: #ffffff;
  width: 340px;             /* adjust as needed */
  padding: 30px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Heading inside the box */
body.login .box h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 26px;
  color: #0b3d91;
}

/* Error messages (red background, red border) */
body.login .box .error {
  background-color: #ffe5e5;
  border: 1px solid #ff9999;
  color: #cc0000;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Labels within login box */
body.login .box label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

/* Text Inputs */
body.login .box input[type="text"],
body.login .box input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

body.login .box input[type="text"]:focus,
body.login .box input[type="password"]:focus {
  border-color: #66afe9;
  outline: none;
}

/* Primary button (Log In) */
body.login .box .btn-primary {
  width: 100%;
  background-color: #0b3d91; /* match navbar color */
  color: #ffffff;
  border: none;
  padding: 12px 0;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

body.login .box .btn-primary:hover {
  background-color: #08316d; /* slightly darker */
}

/* Secondary button (Sign Up) */
body.login .box .btn-secondary {
  width: 100%;
  background-color: #6c757d;
  color: #ffffff;
  border: none;
  padding: 10px 0;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 15px; /* space above “Sign Up” */
}

body.login .box .btn-secondary:hover {
  background-color: #5a6268;
}

/* If you want the form and buttons stacked more tightly on small screens */
@media (max-width: 360px) {
  body.login .box {
    width: 90%;
    padding: 20px;
  }
}
/* Left “Forum Info” card: soft pastel blue */
.sidebar-static .card {
  background-color: #e3f2fd; /* very light blue */
  border: 1px solid #bbdefb;
}
.sidebar-static .card-header {
  background-color: #bbdefb; /* slightly deeper blue */
  color: #0b3d91;
  font-weight: 600;
}
.sidebar-static .card-body {
  background-color: #e3f2fd;
}

/* Right “Topic Options” card: soft pastel green */
.panel-static .card {
  background-color: #e8f5e9; /* very light green */
  border: 1px solid #c8e6c9;
}
.panel-static .card-header {
  background-color: #c8e6c9; /* slightly deeper green */
  color: #2e7d32;
  font-weight: 600;
}
.panel-static .card-body {
  background-color: #e8f5e9;
}
/* ensure avatars & gift icons scale */
.profile-avatar,
.gift-item img {
  max-width: 100%;
  height: auto;
}

/* tighten up the gift‐count badge */
.gift-count {
  position: static;
  transform: none;
  margin-top: -0.5rem;
}

/* modal gift grid */
.modal-gift-list .gift-item {
  /* adds some breathing room */
  padding: 0.5rem;
}