/*
 * Import nib
 */
/*
 * Grab a custom font from Google
 */
@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;700&family=Quicksand:wght@400;500;700&family=Cabin:wght@400&family=PT+Sans:wght@400&display=swap");
/*
 * Nib provides a CSS reset
 */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-weight: inherit;
  font-style: inherit;
  font-family: inherit;
  font-size: 100%;
  vertical-align: baseline;
}
body {
  line-height: 1;
  color: #000;
  background: #fff;
  font-family: 'PT Sans', sans-serif;
  background-color: #faf9f0;
}
ol,
ul {
  list-style: none;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  vertical-align: middle;
}
caption,
th,
td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}
a img {
  border: none;
}
/*
 * Store the main color and
 * background color as variables
 */
header {
  font-family: 'Verdana', sans-serif;
  padding: 30px 10px;
  color: #fff;
  font-size: 25px;
  text-align: center;
/*
   * Note the use of the `main-color`
   * variable and the `darken` function
   */
  background-color: #fa5b4d;
  border-bottom: 1px solid #df1806;
  text-shadow: 0px -1px 0px #df1806;
}
.container {
  width: 1000px;
  margin: 50px auto;
  overflow: visible;
  display: flex;
  gap: 20px;
}
/* Menu on the left side */
.container.menu-left {
  flex-direction: row-reverse;
}
.main-content {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.main-content p {
  margin-bottom: 20px;
}
.sidebar {
  width: 200px;
  flex-shrink: 0;
}
.sidebar .widget {
/*
     * Note the lack of vendor
     * prefixes here. Nib will
     * add them for us
     */
  border-radius: 3px;
  border: 1px solid #ccc;
  background-color: #faf9f0;
  -webkit-box-shadow: inset 0px 0px 0px 3px rgba(255,255,255,0.8), 0px 3px 0px -2px rgba(0,0,0,0.1);
  box-shadow: inset 0px 0px 0px 3px rgba(255,255,255,0.8), 0px 3px 0px -2px rgba(0,0,0,0.1);
}
.sidebar .widget h1 {
  font-family: 'Comfortaa', 'Quicksand', sans-serif;
  margin: 13px 10px 4px;
  padding-bottom: 10px;
  border-bottom: 1px dotted #ddd;
  border-radius: 2px 2px 0px 0px;
  margin-bottom: 10px;
}
.sidebar .widget p {
  font-size: 13px;
  padding: 0px 10px;
  margin-bottom: 10px;
}

/* Menu list styling */
.menu-list {
  padding: 0 10px;
  margin-bottom: 10px;
}

.menu-item {
  line-height: 1.8;
}

.menu-item a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.menu-item a:hover .menu-text {
  text-decoration: underline;
}

.menu-icon {
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-right: 6px;
  flex-shrink: 0;
}

.menu-text {
  color: #f00;
}

.menu-auth {
  font-size: 12px;
}

.menu-auth .user-greeting {
  color: #666;
  font-style: italic;
}

p {
  line-height: 1.8;
}
footer {
  width: 1000px;
  margin: 50px auto;
  border-top: 1px dotted #ccc;
  padding-top: 5px;
  font-size: 13px;
}
a:active {
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}
a:link {
  color: #f00;
}
a:visited {
  color: #f00;
}

/* Page title styling */
h2.page-title {
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e74c3c;
  color: #2c3e50;
  font-family: 'Comfortaa', 'Quicksand', sans-serif;
}

.page-content {
  line-height: 1.8;
  margin-top: 20px;
  padding-top: 10px;
}

.page-content p {
  margin-bottom: 1em;
}

/* Quill editor content styles for website display */
.page-content pre.ql-syntax,
.page-content .ql-code-block-container {
  background-color: #23241f;
  color: #f8f8f2;
  border-radius: 3px;
  padding: 15px;
  margin: 1em 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.page-content code {
  background-color: #f4f4f4;
  color: #c7254e;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
}

.page-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

.page-content blockquote {
  border-left: 4px solid #e74c3c;
  margin: 1em 0;
  padding: 10px 20px;
  background-color: #f9f9f9;
  color: #666;
  font-style: italic;
}

.page-content h1, .page-content h2, .page-content h3,
.page-content h4, .page-content h5, .page-content h6 {
  margin: 1em 0 0.5em;
  font-family: 'Quicksand', sans-serif;
  color: #2c3e50;
}

.page-content h1 { font-size: 2em; }
.page-content h2 { font-size: 1.5em; }
.page-content h3 { font-size: 1.3em; }
.page-content h4 { font-size: 1.1em; }

.page-content ul, .page-content ol {
  margin: 1em 0;
  padding-left: 2em;
}

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

.page-content ol {
  list-style-type: decimal;
}

.page-content li {
  margin-bottom: 0.5em;
}

.page-content img {
  max-width: 100%;
  height: auto;
}

.page-content a {
  color: #e74c3c;
  text-decoration: underline;
}

.page-content .ql-align-center {
  text-align: center;
}

.page-content .ql-align-right {
  text-align: right;
}

.page-content .ql-align-justify {
  text-align: justify;
}

.page-content .ql-indent-1 { padding-left: 3em; }
.page-content .ql-indent-2 { padding-left: 6em; }
.page-content .ql-indent-3 { padding-left: 9em; }

.page-content strong, .page-content b {
  font-weight: bold !important;
}

.page-content em, .page-content i {
  font-style: italic !important;
}

.page-content u {
  text-decoration: underline !important;
}

.page-content s {
  text-decoration: line-through !important;
}

/* Inline code - monospace without dark background */
.page-content .ql-font-monospace {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
  background-color: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
}

.page-content sub {
  vertical-align: sub;
  font-size: smaller;
}

.page-content sup {
  vertical-align: super;
  font-size: smaller;
}

/* Mobile menu toggle button - hidden on desktop */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 3px;
  background-color: #fff;
  position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 3px;
  background-color: #fff;
  left: 0;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-menu-overlay.active {
  display: block;
}

/* Header positioning for mobile toggle */
.header-content {
  position: relative;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  header {
    padding: 20px 10px;
    font-size: 20px;
  }

  .container {
    width: auto;
    margin: 20px 15px;
    flex-direction: column;
  }

  .main-content {
    order: 1;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background-color: #faf9f0;
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 20px 10px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .sidebar.mobile-open {
    right: 0;
  }

  .sidebar .widget {
    margin-bottom: 20px;
  }

  footer {
    width: auto;
    margin: 30px 15px;
  }

  body.menu-open {
    overflow: hidden;
  }

  /* Prevent horizontal scroll on mobile */
  html, body {
    overflow-x: hidden;
  }

  .page-content pre.ql-syntax,
  .page-content .ql-code-block-container {
    padding: 10px;
    font-size: 12px;
  }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
  header {
    padding: 15px 10px;
    font-size: 18px;
  }

  .container {
    margin: 15px 10px;
  }

  h2.page-title {
    font-size: 1.4em;
  }
}

/* ============ BLOG STYLES ============ */

/* Blog cards */
.blog-card {
  background: transparent;
  border-bottom: 1px solid #ddd;
  padding: 20px 0;
  margin-bottom: 0;
}

.blog-card:last-child {
  border-bottom: none;
}

.blog-card-title {
  margin: 0 0 10px;
  font-size: 1.4em;
  font-family: 'Comfortaa', 'Quicksand', sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-card-title a {
  color: #2c3e50;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: #e74c3c;
}

/* Admin edit buttons */
.admin-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 12px;
  color: #999;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  margin-left: 8px;
  transition: all 0.2s;
  vertical-align: middle;
}

.admin-edit-btn:hover {
  color: #667eea;
  background: #fff;
  border-color: #667eea;
}

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

.page-title-container .page-title {
  margin-bottom: 0;
  flex: 1;
}

.blog-card-excerpt {
  line-height: 1.6;
  color: #444;
  margin-bottom: 15px;
}

.blog-card-excerpt p:last-child {
  margin-bottom: 0;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dotted #ddd;
  margin-top: 5px;
}

.blog-card-read-more {
  display: inline-block;
  color: #e74c3c;
  font-weight: bold;
  text-decoration: none;
}

.blog-card-read-more:hover {
  text-decoration: underline;
}

.blog-card-meta {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 15px;
}

.blog-card-author {
  font-weight: bold;
}

/* Blog post page */
.blog-breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.blog-breadcrumb a {
  color: #e74c3c;
}

.blog-post-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dotted #ddd;
}

.blog-post-meta span {
  margin-right: 15px;
}

.blog-post-author {
  font-weight: bold;
}

.blog-post-updated {
  font-style: italic;
}

.blog-post-content {
  margin-bottom: 30px;
}

/* Comments section */
.blog-comments {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e74c3c;
}

.blog-comments h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.3em;
  margin-bottom: 20px;
  color: #2c3e50;
}

.comments-count {
  font-weight: normal;
  color: #666;
}

.comments-list {
  margin-bottom: 30px;
}

.comment {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Nested reply levels with distinct colors */
.comment-reply {
  margin-left: 25px;
  margin-top: 12px;
  border-left: 3px solid #3498db;
  background: #f8fafc;
  position: relative;
}

.comment-reply::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 20px;
  width: 12px;
  height: 2px;
  background: #3498db;
}

/* Level 2 nesting */
.comment-reply .comment-reply {
  border-left-color: #9b59b6;
  background: #faf8fc;
}

.comment-reply .comment-reply::before {
  background: #9b59b6;
}

/* Level 3 nesting */
.comment-reply .comment-reply .comment-reply {
  border-left-color: #1abc9c;
  background: #f7fcfb;
}

.comment-reply .comment-reply .comment-reply::before {
  background: #1abc9c;
}

/* Level 4+ nesting */
.comment-reply .comment-reply .comment-reply .comment-reply {
  border-left-color: #f39c12;
  background: #fffcf5;
}

.comment-reply .comment-reply .comment-reply .comment-reply::before {
  background: #f39c12;
}

.comment-replies {
  margin-top: 12px;
  padding-top: 5px;
}

.comment-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.comment-author {
  font-weight: bold;
  color: #2c3e50;
}

.comment-date {
  color: #666;
  flex-grow: 1;
}

.comment-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.comment-reply-btn,
.comment-quote-btn {
  font-size: 12px;
  padding: 2px 8px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.comment-reply-btn:hover,
.comment-quote-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.comment-edit-btn {
  font-size: 12px;
  padding: 2px 8px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 3px;
  color: #856404;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.comment-edit-btn:hover {
  background: #ffc107;
  color: #212529;
}

.comment-delete-btn {
  font-size: 12px;
  padding: 2px 8px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 3px;
  color: #721c24;
  cursor: pointer;
  transition: all 0.2s;
}

.comment-delete-btn:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.comment-content {
  line-height: 1.5;
  color: #444;
  font-size: 0.9em;
}

/* Quote (BBCode [quote]) styling - distinct from replies */
.comment-content blockquote {
  background: linear-gradient(135deg, #fef9e7 0%, #fdf6e3 100%);
  border-left: 4px solid #f1c40f;
  border-radius: 0 6px 6px 0;
  padding: 12px 15px;
  margin: 12px 0;
  font-style: normal;
  position: relative;
  box-shadow: 0 1px 3px rgba(241, 196, 15, 0.2);
}

.comment-content blockquote::before {
  content: '❝';
  position: absolute;
  top: -8px;
  left: 8px;
  font-size: 24px;
  color: #f1c40f;
  opacity: 0.7;
}

.comment-content blockquote cite {
  display: block;
  font-weight: 600;
  font-style: normal;
  margin-bottom: 6px;
  color: #b7950b;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #e8d9a0;
}

/* Nested quotes */
.comment-content blockquote blockquote {
  background: #fff8dc;
  border-left-color: #d4ac0d;
  margin: 10px 0 10px 10px;
  font-size: 0.95em;
}

.comment-content blockquote blockquote::before {
  display: none;
}

.comment-content code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
}

.comment-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
}

.comment-content .bbcode-img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 10px 0;
}

.no-comments {
  color: #666;
  font-style: italic;
}

.comment-form-container {
  margin-top: 20px;
}

.comment-form-container h4 {
  font-family: 'Quicksand', sans-serif;
  margin-bottom: 15px;
  color: #2c3e50;
}

/* BBCode Toolbar */
.bbcode-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  padding: 8px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

.bbcode-btn {
  padding: 5px 10px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  min-width: 30px;
  transition: all 0.2s;
}

.bbcode-btn:hover {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
}

.bbcode-separator {
  color: #ccc;
  padding: 0 5px;
  align-self: center;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.comment-form textarea:focus {
  border-color: #e74c3c;
  outline: none;
}

.comment-form-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.comment-login-hint {
  color: #666;
  font-style: italic;
}

.comment-login-hint a {
  color: #e74c3c;
}

/* Load more button */
#load-more-container {
  text-align: center;
  margin: 30px 0;
}

#loading-indicator {
  text-align: center;
  color: #666;
}

/* Mobile blog styles */
@media screen and (max-width: 768px) {
  .blog-card {
    padding: 15px 0;
  }

  .blog-card-title {
    font-size: 1.2em;
  }

  .blog-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-card-meta {
    flex-wrap: wrap;
  }

  .comment-header {
    flex-wrap: wrap;
  }

  .comment-author {
    margin-bottom: 5px;
  }
}

