/* Table of Contents
- Global Styles
- Layout
- Header + Navs
- Sidebar
- Cards
- Buttons
- Forms
- Images
- Typography
- Chatbot
- Comments
- Misc
- Keyframes
- Media Queries
*/

/* =============
Global Styles
============= */
* {
  font-family: system-ui, Helvetica, Arial, sans-serif;
  font-display: optional;
}

:root {
  --primary-color: #ffcee4; /* Pink background from chebellavita.it */
  --muted-white: #f0f0f0; /* Light gray */
  --secondary-color: #000000; /* Black text */
  --secondary-color-rgb: 0, 0, 0;
  --post-card-hover-background-color: #f0f0f0; /* Light gray hover */
  --border-color: #dc5e9b; /* Pink border */
  --a11-red: #f60d0d; /* Red accent */
  /* Slightly darker than secondary color */
  --action-color: #333333;
  --link-color: #f60d0d; /* Red links */
  --footer-color: #dc5e9b; /* Pink footer */
  --background-hover-color: #ffcee4; /* Pink hover */
  --primary-blue: #f60d0d; /* Red primary */
  --primary-blue-hover: #dc5e9b; /* Darker pink hover */
  --dark-badge-background-color: #dc5e9b; /* Pink badges */

  /* Chatbot colors */
  --primary-box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
  --secondary-box-shadow: 0px -10px 15px rgba(0, 0, 0, 0.1);
  --primary-gradient: linear-gradient(93.12deg, #0d6efd 0.52%, #007bff 100%);
  --secondary-gradient: linear-gradient(268.91deg,
      #0d6efd -2.14%,
      #007bff 99.69%);
}

html {
  scroll-behavior: smooth;
}

body {
  padding: 0;
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: url("../background.57a95aa49b6b.jpg");
  background-color: #ffcee4;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-attachment: fixed;
  min-height: 100vh;
}

input,
.post-card,
.list-group-item {
  background-color: var(--primary-color);
}

/* =============
   Layout
============= */
.content-section {
  margin-bottom: 30px;
}

main {
  width: 100%;
}

.container {
  display: grid;
  grid-template-columns: 0.1fr 0.5fr 2fr 0.1fr;
  flex: 1;
}

header {
  grid-column: 1 / 5;
  grid-row: 1;
}

.sidebar {
  display: none;
}

.post-content {
  grid-column: 1 / 5;
  grid-row: 2;
  background: #fff;
  backdrop-filter: blur(6px);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
}

/* Centered layout when no sidebar (carousel menu) */
.post-content.no-sidebar {
  grid-column: 1 / 5;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  justify-self: center;
}

#main {
  background: transparent;
}

footer {
  grid-column: 1 / 5;
  grid-row: 4;
}

.sml-margin-top-bottom {
  margin: 0.5rem 0;
}

.sml-margin-left-right {
  margin: 0 0.5rem;
}

.sml-margin-bottom {
  margin-bottom: 0.5rem;
}

.lg-margin-top-bottom {
  margin: 2rem 0;
}

/* Status Page */

/* =============
   Header + Navs
============= */
/* Logo color is #0b3b8e */
#blogthedata-logo {
  height: 40px;
  width: 34.4px;
}

/* Navbar */
.navbar-menu.show-menu .navbar-nav {
  padding-left: 20px;
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 24px;
  background-color: transparent;
  border: none;
  color: var(--primary-color);
}

.hamburger:hover {
  background-color: transparent;
  color: var(--link-color);
}

.navbar-menu.show-menu {
  display: flex;
  z-index: 1;
}

.navbar {
  background: linear-gradient(15deg, rgba(220, 94, 155, 0.7), rgba(100, 149, 237, 0.7));
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  overflow: visible;
  z-index: 999999;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: var(--primary-color);
}

.navbar-brand img {
  height: 40px;
  margin-right: 10px;
}

.navbar-menu {
  display: flex !important;
  align-items: center;
  flex-direction: row !important;
  overflow: visible;
}

.navbar-nav {
  display: flex !important;
  padding-left: 0;
  margin: 0;
  list-style: none;
  width: 100%;
  flex-direction: row !important;
  overflow: visible;
}

.nav-item {
  display: flex;
  margin: 10px;
  overflow: visible;
}

.nav-link {
  color: var(--primary-color);
  flex-grow: 1;
  width: 100%;
}

.nav-user-section {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-logout-link {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.nav-logout-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.nav-welcome-link {
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.nav-welcome-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Dropdown menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(135deg, #a8d4e6, #dc5e9b);
  min-width: 150px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #dc5e9b;
  padding: 5px 0;
  z-index: 999999;
  list-style: none;
  margin: 0;
  display: none;
  border-radius: 8px;
}

/* Navbar dropdown - ensure it overlays without affecting navbar height */
.navbar .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999999;
}

.navbar .dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

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

.dropdown-item {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 8px 15px;
  white-space: nowrap;
  font-weight: 500;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.dropdown:focus-within .dropdown-menu {
  display: block;
}

.nav-link.dropdown-toggle:after {
  content: "";
  display: inline-block;
  margin-left: 5px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}

/* Search form */
.search-form {
  display: flex;
  margin-left: 15px;
}

/* Guest Comments */
.guest-comment-info {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f0f7fb;
  border-left: 3px solid #5ba3c0;
  border-radius: 4px;
}

.guest-comment-fields .form-group {
  margin-bottom: 1rem;
}

.guest-comment-fields label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: #333;
}

.guest-comment-fields .form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.guest-comment-fields .form-text {
  font-size: 0.8rem;
  color: #888;
}

.guest-badge {
  background: #e0e0e0;
  color: #666;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-left: 5px;
}

.pending-badge {
  background: #ffc107;
  color: #333;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-left: 5px;
}

.comment-pending {
  opacity: 0.7;
  border-left: 3px solid #ffc107;
  padding-left: 10px;
}

.alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
}

/* Admin Notification Badge */
.admin-notification-badge {
  background: #dc3545;
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 5px;
  animation: pulse-badge 2s infinite;
}

.pending-comments-badge {
  background: #dc3545;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Language Switcher */
.language-switcher {
  position: relative;
  margin-left: 15px;
}

.language-dropdown {
  position: relative;
}

.language-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 50px;
}

.language-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.8);
}

.lang-flag {
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: linear-gradient(135deg, #a8d4e6, #dc5e9b);
  min-width: 130px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid #dc5e9b;
  border-radius: 8px;
  padding: 5px 0;
  margin-top: 5px;
  list-style: none;
  display: none;
  z-index: 999999;
}

.language-dropdown:hover .language-menu,
.language-dropdown:focus-within .language-menu {
  display: block;
}

.language-menu li {
  margin: 0;
}

.language-menu button {
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 15px;
  text-align: left;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.language-menu button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.language-menu button.active {
  background: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

/* Github Stars */
.github-icon {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.github-icon svg {
  margin-right: 5px;
}

.github-icon::after {
  content: none !important;
}

/* =============
   Sidebar
============= */

#sidebar-heading {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: #333;
}

aside {
  padding: 15px;
  background-color: #d0e8f2; /* Pale blue */
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.list-group {
  margin-bottom: 0;
}

.list-group-item {
  border: none;
  position: relative;
  display: block;
  padding: 0.5rem 1rem;
  background-color: #a8d4e6; /* Slightly darker pale blue */
  border-radius: 0.25rem;
  margin-bottom: 0.25rem;
}

.list-group-item:hover {
  background-color: #8bc4db; /* Darker blue on hover */
}

.list-group-item.active {
  color: #fff;
  background-color: #5ba3c0; /* Active state blue */
}

.list-group-item span {
  font-size: 0.8rem;
}

.list-group-item-action {
  width: 100%;
  color: var(--link-color);
  text-align: inherit;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  color: var(--link-color);
  background-color: var(--background-hover-color);
}

.list-group-item-action.active {
  color: var(--link-color);
  background-color: var(--background-hover-color);
}

.list-group-item[data-badge]::after {
  content: attr(data-badge);
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  color: rgb(240, 240, 240);
  background-color: var(--dark-badge-background-color);
  border-radius: 1rem;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
}

/* =============
   Footer
============= */

#credit {
  font-size: 0.8rem;
  color: var(--primary-color);
}

footer {
  padding: 20px 0;
  background: linear-gradient(15deg, rgba(220, 94, 155, 0.7), rgba(100, 149, 237, 0.7));
  backdrop-filter: blur(8px);
}

footer .nav-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
}

footer .nav-item {
  margin-bottom: 10px;
}

#credit {
  text-align: center;
}

footer .dropdown-menu {
  position: absolute;
  top: auto;
  bottom: 100%;
}

footer .dropdown:hover .dropdown-menu,
footer .dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

/* =============
   Cards
============= */

/* Post Cards */
.post-card {
  border: 1px solid rgba(var(--secondary-color-rgb), 0.1);
  transition: background-color 0.6s 0s;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
}

.post-card-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
}

.post-card-meta-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

figure {
  margin: 0;
}

.post-card-img {
  width: 100%;
  height: auto;
}

.post-card-content {
  padding: 1rem;
}

.post-header {
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 1.5rem;
  margin: 0;
  padding: 0;
  text-wrap: balance;
}

.post-draft {
  font-weight: normal;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.post-pinned-badge {
  display: inline-block;
  background-color: #ffc107;
  color: #212529;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.post-info {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.post-readtime {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.post-readtime-icon {
  width: 10px;
  height: 10px;
  margin-right: 0.2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.comment-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
  color: var(--secondary-color);
}

.comment-details {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

/* About Me Card */
.about-me-image {
  height: auto;
  max-height: 100%;
  max-width: 100%;
}

.social-links {
  font-size: 0.875rem;
  list-style-type: none;
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.social-links li {
  display: inline;
  margin-right: 0.5rem;
}

.social-links li::after {
  content: "|";
  margin-left: 0.5rem;
}

.social-links li:last-child::after {
  content: "";
}

/* =============
   Buttons
============= */
/* Load More Posts Button */
.load-more {
  text-align: center;
  margin-bottom: 5rem;
}

.load-more__btn {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  background-color: transparent;
  padding: 1rem 2rem;
  border-radius: 2rem;
  font-size: 1.25rem;
  transition: background-color 0.3s, color 0.3s;
}

.load-more__btn:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  cursor: pointer;
}

/* Edit and Delete Buttons */
.buttons-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 5px;
  padding: 0.5rem 1rem;
}

.btn-red {
  color: var(--muted-white);
  background-color: #dc3545;
  border: 1px solid #dc3545;
}

.btn-red:hover {
  background-color: #c82333;
  border-color: #c82333;
}

.btn-dark {
  color: var(--muted-white);
  background-color: #6c757d;
  border: 1px solid #6c757d;
}

.btn-dark:hover {
  background-color: #5c636a;
  border-color: #5c636a;
}

.btn-dark-outline {
  color: #000;
  background-color: var(--muted-white);
  border: 1px solid #6c757d;
}

.btn-dark-outline:hover {
  background-color: #000;
  color: var(--muted-white);
}

.btn-warning {
  color: #212529;
  background-color: #ffc107;
  border: 1px solid #ffc107;
}

.btn-warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

.btn-secondary {
  color: var(--muted-white);
  background-color: #5ba3c0;
  border: 1px solid #5ba3c0;
}

.btn-secondary:hover {
  background-color: #4a8fa8;
  border-color: #4a8fa8;
}

.btn-primary {
  color: var(--muted-white);
  background-color: var(--primary-blue);
  border-color: #5c636a;
}

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
  border-color: #0056b3;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-help {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  background-color: #5ba3c0;
  border: 1px solid #5ba3c0;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-help:hover {
  background-color: #4a8fa8;
  border-color: #4a8fa8;
}

.btn-help span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: #fff;
  color: #5ba3c0;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.85rem;
}

/* print button */
#print-icon {
  margin-right: 0.5rem;
}

/* Post Submit Button */
.post-submit-button {
  display: block;
  margin-left: auto;
  border: 1px solid #17a2b8;
  color: #17a2b8;
  background-color: transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.post-submit-button:hover {
  color: var(--muted-white);
  background-color: #17a2b8;
  border-color: #17a2b8;
  cursor: pointer;
}

/* Social Share Buttons */
.social-share-container {
  max-width: 100%;
  overflow-x: auto;
}

.social-share {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  list-style: none;
}

.social-share li {
  margin: 0 1rem;
}

.resp-sharing-button__link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted-white);
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  transition: background-color 0.25s ease-out;
}

.resp-sharing-button__icon {
  margin-right: 0.5rem;
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--muted-white);
  transition: fill 0.25s ease-out;
}

.resp-sharing-button__link.x {
  background-color: #333333;
}

.resp-sharing-button__link.reddit {
  background-color: #5f99cf;
}

.resp-sharing-button__link.linkedin {
  background-color: #0077b5;
}

.resp-sharing-button__link.facebook {
  background-color: #1877f2;
}

.resp-sharing-button__link:hover {
  background-color: #0069d9;
}

.resp-sharing-button__link.linkedin:hover .resp-sharing-button__icon {
  fill: #0077b5;
}

.resp-sharing-button__link.x:hover {
  background-color: #4d4d4d;
}

.social-share-btn {
  width: 24px;
  height: 24px;
}

/* =============
   Forms
============= */
input,
select,
textarea {
  padding: 0.5rem;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
  background-color: var(--primary-color) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--secondary-color);
}

/* Profile form inputs */
.content-section input,
.content-section select,
.content-section textarea {
  background-color: #a8d4e6 !important;  /* Darker pale blue */
  border: 1px solid #8bc4db !important;  /* Blue border */
  color: #333 !important;
}

/* CKEditor styling */
.ck.ck-editor__editable,
.ck.ck-editor__editable.ck-editor__editable_inline {
  background-color: #a8d4e6 !important;  /* Pale blue background */
  border: 1px solid #8bc4db !important;  /* Blue border */
  color: #000 !important;  /* Black text */
}

.ck.ck-editor__editable p,
.ck.ck-editor__editable span,
.ck.ck-editor__editable div,
.ck.ck-content p,
.ck.ck-content span,
.ck.ck-content div {
  color: #000 !important;  /* Black text */
}

input[type="search"] {
  margin-right: 0.5rem;
  width: 200px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

/* Image Upload Section */
.image-upload-section {
  margin-top: 2rem;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background-color: rgba(255, 206, 228, 0.3);
}

.image-upload-section legend {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0 0.5rem;
}

.image-upload-section .help-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.image-form-row {
  padding: 1rem 0;
}

.image-form-row .current-image img {
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.more-images-toggle {
  cursor: pointer;
  padding: 0.75rem 1rem;
  background-color: var(--border-color);
  color: #fff;
  border-radius: 5px;
  font-weight: bold;
  margin: 1rem 0;
  display: inline-block;
}

.more-images-toggle:hover {
  background-color: var(--primary-blue);
}

#more-images-arrow {
  margin-right: 0.5rem;
}

button {
  display: inline-block;
  background-color: var(--primary-blue);
  color: var(--muted-white);
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button:hover {
  background-color: var(--primary-blue-hover);
}

label[for="id_draft"] {
  display: inline-block;
  margin-right: 10px;
}

#id_draft {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  position: relative;
}

/* =============
   Images
============= */

.meta-img-container {
  display: flex;
  margin-top: 1rem;
}

.meta-img-container > img {
  height: 20vh;
  width: auto;
  object-fit: contain;
}

/* Post Image Carousel */
#postImageCarousel {
  width: 50%;
  max-width: 400px;
  margin: 0 auto;
}

#postImageCarousel .carousel-inner {
  border-radius: 10px;
  overflow: hidden;
}

#postImageCarousel .carousel-item img {
  height: 50vh;
  object-fit: contain;
  background-color: #f8f8f8;
}

#postImageCarousel .carousel-control-prev,
#postImageCarousel .carousel-control-next {
  width: 10%;
}

#postImageCarousel .carousel-control-prev-icon,
#postImageCarousel .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 20px;
}

#postImageCarousel .carousel-indicators button {
  background-color: var(--border-color);
}

.carousel-image-caption {
  text-align: center;
  font-style: italic;
  color: #1a3a6b !important;  /* Dark blue */
  margin-top: 0.5rem;
  font-size: 1.8rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

img {
  max-width: 100%;
}

/* Make sure images maintain aspect ration on small screens */
figure img {
  max-width: 100%;
  height: auto;
}

/* =============
   Typography
============= */

p>code {
  color: #e76f51;
  font-family: monospace;
  font-size: 0.95em;
}

.category-title {
  font-weight: 300;
  letter-spacing: -0.025em;
  margin-bottom: 0;
}

.category-description {
  font-weight: 300;
  margin-top: 0;
}

a[href^="http"]::after {
  content: "↗";
  vertical-align: middle;
}

.screenreader-text {
  position: absolute;
  left: -999px;
  width: 1px;
  height: 1px;
  top: auto;
}

.screenreader-text:focus {
  color: var(--secondary-color);
  display: inline-block;
  height: auto;
  width: auto;
  position: static;
  margin: auto;
}

.errorlist li {
  color: var(--a11-red);
  list-style-type: none;
}

.fieldWrapper {
  margin-bottom: 1.5rem;
}

.checkbox-field .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-field .checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.checkbox-field .checkbox-row label {
  margin: 0;
  cursor: pointer;
  font-weight: bold;
}

.field-help-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
  margin-bottom: 0;
  font-style: italic;
}

a.hidden-link {
  position: absolute;
  left: -9999px;
}

:is(h1, h2, h3) {
  line-height: 1;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  letter-spacing: -0.025em;
}

h2 {
  font-weight: normal;
}

:is(p) {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

:is(h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  strong,
  .list-group-item,
  svg,
  table,
  p,
  blockquote,
  li,
  legend,
  small,
  .word-count,
  label,
  input,
  form,

) {
  color: var(--secondary-color);
}

hr {
  border-color: #e0e0e0;
  opacity: 0.25;
}

.post-content>p:first-of-type::first-letter {
  font-size: 2rem;
  font-weight: 700;
}

.caption {
  font-size: 0.6rem;
}

.no-white-space {
  white-space: nowrap;
}

h1 {
  letter-spacing: -0.025em;
  font-size: 2em;
}

a {
  text-decoration: none;
  color: var(--link-color);
}

.card-body {
  color: var(--secondary-color);
}

a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
  transition: text-decoration-color 0.3s ease;
}


button a,
button a:hover {
  color: inherit;
}

/* ============= Chatbot ============= */

#chatbox-container button svg {
  transition: fill 0.3s ease;
}

#chatbox-container button:hover svg path {
  fill: white !important;
}

#chatbox-container button:hover,
#chatbox-container button {
  background-color: transparent !important;
}

#chatbox-icon {
  width: 50px;
  height: 50px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  margin: 10px;
}

.chatbox {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 123456;
}

.chatbox__support {
  display: none;
  flex-direction: column;
  background: #f9f9f9;
  width: 350px;
  height: 550px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.chatbox__time--header {
  font-size: 0.6em;
  color: white;
  margin-top: 1px;
}

/* CONTENT IS OPEN */
.chatbox--active {
  display: flex;
  transform: translateY(-20px);
  z-index: 123456;
}

.send__button {
  cursor: pointer;
  flex: 0 0 auto;
}

.send__button:hover {
  size: 1.1rem;
}

/* MESSAGES */
textarea {
  background-color: var(--primary-color);
  color: #333333;
  resize: none;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--border-color);
  font-family: "Arial", sans-serif;
  font-size: 0.9rem;
}

textarea::placeholder {
  color: #999999;
}

/* Profile Bio Textarea */
#id_bio {
  resize: vertical;
  min-height: 150px;
  max-height: 500px;
}

.chatbox__messages {
  margin-top: auto;
  display: flex;
  overflow-y: auto;
  flex-direction: column-reverse;
  color: #333333;
  padding: 20px;
  height: 400px;
  background: #f5f5f5;
}

.messages__item--user {
  margin-left: auto;
}

.messages__item--bot {
  margin-right: auto;
}

.chatbox__support {
  background: #f5f5f5;
  height: 550px;
  width: 400px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* HEADER */
.chatbox__header {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.chatbox__image--header {
  margin-right: 10px;
}

.chatbox__heading--header {
  font-size: 1.2rem;
  color: white;
  margin-bottom: 0;
}

.chatbox__description--header {
  font-size: 0.9rem;
  color: white;
}

/* Messages */
.chatbox__messages {
  padding: 20px;
}

.messages__item {
  margin-top: 10px;
  background: #e6e6e8;
  padding: 8px 12px;
  max-width: 70%;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.messages__item--bot {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  color: black;
}

.messages__item--user {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-left-radius: 20px;
  background: #0d6efd;
  color: white;
}

.messages__item::after {
  content: attr(data-time);
  position: absolute;
  bottom: -20px;
  right: 10px;
  font-size: 0.75rem;
  color: #888;
  opacity: 0.3;
  transition: opacity 0.3s;
}

.messages__item:hover::after {
  opacity: 1;
}

/* FOOTER */
.chatbox__footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, #0a58ca, #0d6efd);
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.chatbox__input-container {
  display: flex;
  width: 380px;
}

.chatbox__footer textarea {
  width: 90%;
  border: none;
  padding: 10px 10px;
  border-radius: 10px;
  text-align: left;
}

.chatbox__button button,
.chatbox__button button:focus,
.chatbox__button button:visited {
  padding: 10px;
  background: white;
  border: none;
  outline: none;
  border-radius: 50px;
  box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.chatbox__close--header {
  margin-left: auto;
}

.chatbox__close--header button {
  border: none;
  border-radius: 50%;
  padding: 5px;
  cursor: pointer;
}

.chatbox__footer--small {
  font-size: 0.7rem;
  text-align: center;
  padding: 5px;
  background: #f5f5f5;
}

.chatbox__footer--small a {
  color: #0d6efd;
  text-decoration: none;
}

/* =============
   Comments
============= */

.comment {
  list-style-type: none;
}

.comment-delete-form {
  display: inline;
}

.comment-btn {
  padding: 3px 8px;
  font-size: 8px;
}

#comments-section {
  background-color: #d0e8f2; /* Pale blue */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin-bottom: 1rem;
}

#comments-section textarea {
  background-color: #a8d4e6 !important; /* Slightly darker pale blue */
  color: #333333 !important;
}

/* Menu Guide Section */
.menu-guide {
  background-color: #d0e8f2;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.menu-guide h2 {
  color: #333;
  margin-bottom: 1rem;
}

.menu-guide h3 {
  color: #5ba3c0;
  margin-bottom: 0.5rem;
}

.menu-guide p {
  color: #555;
  line-height: 1.6;
}

.guide-section {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.guide-image {
  margin-top: 1rem;
  text-align: center;
}

.guide-image img {
  max-width: 100%;
  height: auto;
  border: 2px solid #a8d4e6;
}

/* =============
   Status Page
============= */
.title {
  grid-area: title;
  text-align: center;
}

.status-section {
  grid-area: status-section;
}

.postgres-metrics {
  grid-area: postgres-metrics;
}

.system-metrics {
  grid-area: system-metrics;
}

.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 75%;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
}

/* =============
   Misc Styles
============= */

/* Override Ckeditor */
.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items {
  flex-wrap: wrap !important;
}

iframe {
  max-width: 100%;
}

.code-toolbar {
  max-width: 90vw !important;
}

code {
  padding: 1rem !important;
}

#draft {
  color: var(--a11-red);
}

video {
  max-width: 100%;
  border-radius: 0.25rem;
}

#breadcrumbs {
  color: #6c757d;
}

#scroll-to-top {
  display: flex;
  align-items: center;
  color: var(--a11-red);
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  font-size: 2rem;
}

#scroll-to-top-icon {
  width: 45px;
  height: 45px;
  margin-right: 5px;
}

/* p {
  max-width: 70ch;
} */

/* =============
   Keyframes
============= */
@keyframes button-shake {
  from {
    rotate: 2deg;
  }

  to {
    rotate: -2deg;
  }
}

/* =============
   Media Queries
============= */
@media (prefers-reduced-motion: reduce) {
  .navbar-nav>li:hover:not(.dropdown) {
    animation: none;
  }

  .dropdown-item:hover {
    animation: none;
  }
}

@media (hover: hover) {
  .dropdown-item:hover {
    animation: button-shake 0.3s linear;
  }

  a:not(#scroll-to-top, .post a, .list-group-item):hover {
    text-decoration-color: var(--link-color);
  }

  .post-card:not(#aboutMe):hover {
    background-color: var(--post-card-hover-background-color);
    scale: 1.005;
  }

  tr:hover {
    background-color: #ddd;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: rgb(24 24 26);
    --secondary-color: rgb(161, 161, 170);
    --secondary-color-rgb: 161, 161, 170;
    --post-card-hover-background-color: hsl(0, 0%, 100%, 0.05);
    --background-hover-color: hsl(0, 0%, 100%, 0.05);
    --link-color: rgb(108, 159, 242);
    --input-background-color: #ffcee4;
  }

  input,
  select,
  textarea {
    background-color: #ffcee4 !important;
    color: #000 !important;
  }

  .comment-icon path {
    fill: #ffffff;
  }

  .github-icon svg {
    fill: black;
  }

  p>code {
    color: #a626a4;
  }

  header {
    background-color: var(--secondary-color);
  }

  footer {
    background-color: var(--secondary-color);
  }

  hr {
    border-color: rgb(128, 128, 128);
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }

  img {
    filter: brightness(0.8) contrast(1.2);
  }

  .testimonial-quote::before {
    color: hsla(229, 100%, 88%, 0.6);
  }

  .testimonial-quote::after {
    color: hsla(229, 100%, 88%, 0.6);
  }

  .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%0d6dfd' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E") !important;
  }

  .carousel-control-next-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%0d6dfd' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E") !important;
  }

  /* Dark mode carousel */
  #category-carousel {
    background: linear-gradient(135deg, rgba(60, 30, 50, 0.95) 0%, rgba(80, 40, 70, 0.9) 25%, rgba(100, 50, 85, 0.85) 50%, rgba(120, 60, 100, 0.8) 75%, rgba(80, 35, 65, 0.75) 100%);
    border: 3px solid rgba(255, 150, 200, 0.3);
    box-shadow:
      0 8px 32px rgba(200, 100, 150, 0.3),
      0 4px 16px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 200, 220, 0.2);
  }

  #category-carousel::before {
    background: linear-gradient(180deg, rgba(255, 200, 220, 0.1) 0%, transparent 50%, rgba(0, 0, 0, 0.2) 100%);
  }

  #category-carousel .carousel-item .category-card {
    background: linear-gradient(135deg, rgba(255, 200, 220, 0.15) 0%, rgba(200, 100, 150, 0.2) 50%, rgba(150, 70, 120, 0.25) 100%);
    border: 2px solid rgba(255, 180, 210, 0.3);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 200, 220, 0.3);
  }

  #category-carousel .carousel-item .category-card h5 {
    color: rgba(255, 220, 235, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  #category-carousel .carousel-item .category-card p {
    color: rgba(255, 200, 220, 0.8);
  }

  #category-carousel .carousel-item .category-card .btn-explore {
    background: linear-gradient(135deg, rgba(255, 200, 220, 0.9), rgba(200, 100, 150, 0.85));
    color: rgba(40, 20, 30, 1);
    border: 2px solid rgba(255, 180, 210, 0.6);
  }

  #category-carousel .carousel-item .category-card .btn-explore:hover {
    background: linear-gradient(135deg, #ffcee4, #f896bf);
    box-shadow: 0 6px 20px rgba(255, 150, 200, 0.5);
  }

  #category-carousel .carousel-control-prev,
  #category-carousel .carousel-control-next {
    background: linear-gradient(135deg, rgba(200, 100, 150, 0.8), rgba(150, 70, 120, 0.85));
    border: 2px solid rgba(255, 180, 210, 0.5);
  }

  #category-carousel .carousel-control-prev:hover,
  #category-carousel .carousel-control-next:hover {
    background: linear-gradient(135deg, rgba(255, 150, 200, 0.9), rgba(200, 100, 150, 0.95));
    box-shadow: 0 6px 25px rgba(255, 150, 200, 0.5);
  }

  #category-carousel .carousel-control-prev-icon,
  #category-carousel .carousel-control-next-icon {
    filter: brightness(0) saturate(100%) invert(90%) sepia(20%) saturate(500%) hue-rotate(280deg) !important;
  }

  #category-carousel .carousel-indicators {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 180, 210, 0.3);
  }

  #category-carousel .carousel-indicators button {
    background: linear-gradient(135deg, rgba(255, 180, 210, 0.5), rgba(200, 100, 150, 0.6)) !important;
    border-color: rgba(255, 200, 220, 0.5) !important;
  }

  #category-carousel .carousel-indicators button.active {
    background: linear-gradient(135deg, #ffcee4, #f896bf) !important;
    box-shadow: 0 3px 12px rgba(255, 150, 200, 0.6), 0 0 20px rgba(255, 150, 200, 0.4) !important;
  }

  /* Chatbot */
  .messages__item--bot {
    background: #222125;
    color: var(--secondary-color);
  }
}

@media print {

  /* @page
{
    size: Letter portrait;
    margin: 0;
} */
  html,
  body {
    background-color: white !important;
  }

  header {
    display: none !important;
  }

  nav {
    display: none !important;
  }

  .header-link {
    display: none !important;
  }

  #scroll-to-top-container {
    display: none !important;
  }

  #print-container {
    display: none !important;
  }

  .btn {
    display: none !important;
  }

  .social-share-container {
    display: none !important;
  }

  footer {
    display: none !important;
  }

  #chatbox-container {
    display: none !important;
  }

  #comments-section {
    display: none !important;
  }

  #create-comments-section {
    display: none !important;
  }

  #related-posts-section {
    display: none !important;
  }

  #aboutMe {
    display: none !important;
  }
}

/* Responsive Styles*/
@media (max-width: 900px) {

  /* 
  Changes the layout of the container to a single column grid
  with the header, sidebar, post-content, and footer taking up
  one row each
  */
  .container {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }

  header {
    grid-row: 1;
    grid-column: 1;
  }

  .sidebar {
    display: none;
  }

  .post-content {
    grid-row: 3;
    grid-column: 1;
    margin-left: 10px;
    margin-right: 10px;
    width: auto;
    max-width: calc(100% - 20px);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }

  .footer {
    grid-row: 4;
    grid-column: 1;
  }

  .post-card-row {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .post-card-meta-img-container {
    width: 100%;
    margin-bottom: 1rem;
  }

  .post-card-img {
    max-width: 100%;
  }

  .post-card-meta-img-container img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Navbar */
  .navbar-menu.show-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-menu {
    display: none !important;
    background-color: var(--secondary-color);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px;
    flex-direction: column;
  }

  .navbar-menu.show-menu {
    display: flex !important;
  }

  .navbar-nav {
    flex-direction: column;
    margin: 0;
    padding-left: 0;
  }

  .nav-item,
  .dropdown {
    margin: 10px 0;
  }

  .hamburger {
    display: block;
  }

  /* Language Switcher Mobile */
  .language-switcher {
    margin: 10px 0;
    margin-left: 20px;
  }

  .language-menu {
    left: 0;
    right: auto;
  }

  /* Post Detail */
  .social-share {
    flex-direction: column;
    align-items: center;
  }

  .social-share li {
    margin: 0.5rem 0;
  }
}

@media (min-width: 800px) and (max-width: 900px) {
  .post-card-row {
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
  }
}

@media screen and (min-width: 1240px) {

  /*
  Changes the layout of the container to a 4 column grid.
  The Sidebar and post-content occupy the middle two columns,
  and the header and footer now span the entire width of the
  container. The first and last columns are for padding.
  */
  .container {
    grid-template-columns: 0.2fr 1fr 2.5fr 0.2fr;
  }

  header {
    grid-column: 1 / 5;
    grid-row: 1;
  }

  .sidebar {
    display: block;
    grid-column: 2;
    grid-row: 2;
  }

  .post-content {
    grid-column: 3;
    grid-row: 2;
  }

  /* Centered layout when no sidebar (carousel menu) */
  .post-content.no-sidebar {
    grid-column: 1 / 5;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  footer {
    grid-column: 1 / 5;
    grid-row: 3;
  }
}

@media screen and (min-width: 1400px) {
  #main {
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 1700px) {
  .container {
    grid-template-columns: 0.3fr 1fr 1200px 0.3fr;
  }

  .sidebar {
    display: block;
    grid-column: 2;
  }

  .post-content {
    grid-column: 3;
  }

  .post-content.no-sidebar {
    grid-column: 1 / 5;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (min-width: 2000px) {
  .container {
    grid-template-columns: 0.4fr 1fr 1200px 0.4fr;
  }

  .sidebar {
    display: block;
    grid-column: 2;
  }

  .post-content {
    grid-column: 3;
  }

  .post-content.no-sidebar {
    grid-column: 1 / 5;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (min-width: 2500px) {
  .container {
    grid-template-columns: 0.5fr 1fr 1200px 0.5fr;
  }

  .sidebar {
    display: block;
    grid-column: 2;
  }

  .post-content {
    grid-column: 3;
  }

  .post-content.no-sidebar {
    grid-column: 1 / 5;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 992px) {
  .navbar-nav>li:hover:not(.dropdown) {
    animation: button-shake 0.3s linear;
  }

  .nav-categories {
    display: none;
  }
}

/* Add specific handling for very small screens */
/* =============
   Carousel Styles
============= */
#category-carousel {
  margin: 20px auto;
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(255, 206, 228, 0.95) 0%, rgba(255, 182, 212, 0.9) 25%, rgba(248, 150, 191, 0.85) 50%, rgba(220, 130, 170, 0.8) 75%, rgba(180, 100, 140, 0.75) 100%);
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 32px rgba(255, 150, 200, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  padding: 20px 20px 50px 20px;
  min-height: 260px;
}

#category-carousel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  z-index: 0;
  border-radius: 17px;
}

#category-carousel .carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  z-index: 1;
}

/* Force proper carousel item visibility */
#category-carousel .carousel-inner .carousel-item {
  display: none !important;
  width: 100%;
}

#category-carousel .carousel-inner .carousel-item.active {
  display: block !important;
}

/* Support sliding transitions */
#category-carousel .carousel-inner .carousel-item.carousel-item-next,
#category-carousel .carousel-inner .carousel-item.carousel-item-prev,
#category-carousel .carousel-inner .carousel-item.carousel-item-start,
#category-carousel .carousel-inner .carousel-item.carousel-item-end {
  display: block !important;
}

/* Ensure Bootstrap carousel transitions work */
#category-carousel.carousel.slide .carousel-item {
  transition: transform 0.6s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  #category-carousel.carousel.slide .carousel-item {
    transition: none;
  }
}

/* Indicators Container */
#category-carousel .carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  margin: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#category-carousel .carousel-indicators button {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 200, 220, 0.8)) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  margin: 0 6px !important;
  opacity: 0.7 !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(200, 100, 150, 0.3);
  pointer-events: auto !important;
  position: relative;
}

#category-carousel .carousel-indicators button:hover {
  opacity: 0.9 !important;
  transform: scale(1.15) !important;
}

#category-carousel .carousel-indicators button.active {
  opacity: 1 !important;
  background: linear-gradient(135deg, #ffffff, #ffcee4) !important;
  transform: scale(1.3) !important;
  box-shadow: 0 3px 12px rgba(255, 150, 200, 0.5), 0 0 20px rgba(255, 200, 220, 0.4) !important;
  border-color: #fff !important;
}

/* Navigation Controls */
#category-carousel .carousel-control-prev,
#category-carousel .carousel-control-next {
  position: absolute;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(255, 206, 228, 0.95), rgba(248, 150, 191, 0.9));
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.9;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(200, 100, 150, 0.4);
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
}

#category-carousel .carousel-control-prev:hover,
#category-carousel .carousel-control-next:hover {
  background: linear-gradient(135deg, rgba(255, 220, 235, 1), rgba(255, 180, 210, 1));
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 150, 200, 0.6), 0 0 30px rgba(255, 200, 220, 0.4);
  border-color: #fff;
}

#category-carousel .carousel-control-prev {
  left: 15px;
}

#category-carousel .carousel-control-next {
  right: 15px;
}

#category-carousel .carousel-control-prev-icon,
#category-carousel .carousel-control-next-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(20%) sepia(50%) saturate(500%) hue-rotate(300deg);
}

/* Category Card Styling */
#category-carousel .carousel-item .category-card {
  min-height: 180px;
  padding: 10px 20px 20px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 220, 235, 0.3) 50%, rgba(255, 200, 220, 0.35) 100%);
  border-radius: 15px;
  margin: 10px 60px;
  box-shadow:
    0 8px 32px rgba(200, 100, 150, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: visible;
}

#category-carousel .carousel-item .category-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { transform: translate(-30%, -30%); }
  50% { transform: translate(30%, 30%); }
}

#category-carousel .carousel-item .category-card .emoji-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#category-carousel .carousel-item .category-card h5 {
  font-weight: 700;
  color: rgba(80, 40, 60, 0.95);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
  font-size: 1.2rem;
}

#category-carousel .carousel-item .category-card p {
  color: rgba(100, 60, 80, 0.85);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

#category-carousel .carousel-item .category-card .btn-explore {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 230, 240, 0.95));
  color: rgba(150, 80, 120, 1);
  border: 2px solid rgba(255, 200, 220, 0.8);
  padding: 8px 18px;
  border-radius: 22px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(200, 100, 150, 0.2);
  text-decoration: none;
  margin-top: auto;
  flex-shrink: 0;
}

#category-carousel .carousel-item .category-card .btn-explore:hover {
  background: linear-gradient(135deg, #fff, #ffcee4);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 150, 200, 0.4);
  color: rgba(120, 50, 90, 1);
  border-color: rgba(255, 180, 210, 1);
}

/* Mobile responsiveness for carousel */
@media (max-width: 768px) {
  #category-carousel {
    margin: 15px 10px;
    padding: 8px 8px 45px 8px;
    border-radius: 15px;
  }

  #category-carousel .carousel-item .category-card {
    min-height: 140px;
    margin: 15px 50px;
    border-radius: 12px;
    padding: 8px 15px 15px 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    box-shadow:
      0 6px 24px rgba(0, 0, 0, 0.12),
      0 3px 12px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    overflow: visible;
  }

  #category-carousel .carousel-item .category-card .emoji-icon {
    font-size: 2rem;
  }

  #category-carousel .carousel-item .category-card h5 {
    font-size: 1rem;
  }

  #category-carousel .carousel-item .category-card p {
    font-size: 0.8rem;
    display: none;
  }

  #category-carousel .carousel-control-prev,
  #category-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
  }

  #category-carousel .carousel-control-prev {
    left: 8px;
  }

  #category-carousel .carousel-control-next {
    right: 8px;
  }

  #category-carousel .carousel-control-prev-icon,
  #category-carousel .carousel-control-next-icon {
    width: 14px;
    height: 14px;
  }

  #category-carousel .carousel-indicators {
    bottom: 12px;
    padding: 5px 12px;
  }

  #category-carousel .carousel-indicators button {
    width: 10px !important;
    height: 10px !important;
    margin: 0 4px !important;
  }
}

@media (max-width: 480px) {
  #category-carousel {
    margin: 10px 5px;
    padding: 6px 6px 45px 6px;
  }

  #category-carousel .carousel-item .category-card {
    min-height: 170px;
    margin: 10px 45px;
    border-radius: 15px;
    padding: 10px 15px 15px 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.1),
      0 4px 16px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: visible;
}

#category-carousel .carousel-item .category-card .emoji-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

#category-carousel .carousel-item .category-card h5 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--secondary-color);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  line-height: 1.3;
  flex-shrink: 0;
}

#category-carousel .carousel-item .category-card p {
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.3;
  max-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex-shrink: 0;
}

#category-carousel .carousel-item .category-card h5 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--secondary-color);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  line-height: 1.2;
}

#category-carousel .carousel-item .category-card p {
  font-size: 0.75rem;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.2;
  max-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

  #category-carousel .carousel-item .category-card h5 {
    font-size: 0.9rem;
  }

  #category-carousel .carousel-item .category-card .btn-explore {
    padding: 4px 14px;
    font-size: 0.75rem;
  }

  #category-carousel .carousel-control-prev,
  #category-carousel .carousel-control-next {
    width: 32px;
    height: 32px;
  }

  #category-carousel .carousel-control-prev {
    left: 5px;
  }

  #category-carousel .carousel-control-next {
    right: 5px;
  }
}

@media (max-width: 480px) {
  .post-content {
    margin-left: 5px;
    margin-right: 5px;
    max-width: calc(100% - 10px);
  }

  /* Further reduce any paddings */
  .container>* {
    padding-left: 5px;
    padding-right: 5px;
  }
}