/* Base Styles and Layout */
html {
  overflow-y: scroll; /* Ensures scrollbar is always visible */
}

body {
  background: #0d2436; /* Dark background color */
}

.main {
  background: #fcfcfc; /* Light background for main content */
  background-attachment: fixed; /* Fixed background */
  padding: 60px 0 80px; /* Top, right/left, bottom padding */
  position: relative; /* For relative positioning of elements */
}

.site-footer {
  background: #0d2436; /* Dark background for footer */
  min-height: 100px; /* Minimum footer height */
  padding: 20px 0; /* Top, right/left, bottom padding */
}

/* Typography */
h1 {
  font-size: 33px; /* Heading 1 font size */
  margin-top: 0; /* Remove top margin */
  padding-top: 50px; /* Top padding */
}

.post-header h1 {
  padding-top: 0; /* Remove top padding for post header h1 */
}

.post-header {
  padding-top: 50px; /* Top padding for post header */
}

h2 {
  font-size: 21px;
  margin-top: 1em;
  margin-bottom: 1em;
}

h3 {
  font-size: 17px; /* Heading 3 font size */
  margin: 0; /* Remove margins */
  padding: 20px 0 3px; /* Top, right/left, bottom padding */
}

h4 {
  font-size: 15px; /* Heading 4 font size */
  margin: 0; /* Remove margins */
  padding: 20px 0 3px; /* Top, right/left, bottom padding */
}

h3.post-meta {
  padding: 0; /* Remove padding for post meta h3 */
}

p,
pre,
ul,
ol {
  margin-bottom: 18px; /* Bottom margin for paragraphs, pre, lists */
}

code {
  color: #444444; /* Code text color */
  background-color: #f5f5f5; /* Code background color */
}

pre code {
  white-space: pre; /* Preserve whitespace in pre code */
}

/* Navigation */
.navbar-brand > img {
  display: inline; /* Display image inline */
  position: relative; /* Relative positioning */
  vertical-align: top; /* Vertical alignment */
  bottom: 7px; /* Bottom adjustment */
}

.navbar-default {
  border-color: #e5e5e5; /* Navbar border color */
}

.navbar-default svg {
  position: absolute; /* Absolute positioning */
  height: 40px; /* SVG height */
  margin-top: -11px; /* Top margin adjustment */
  margin-left: -4px; /* Left margin adjustment */
  fill: #777; /* SVG fill color */
  border: 12px solid white; /* White border */
  border-left: 0; /* Remove left border */
  border-right: 0; /* Remove right border */
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  background: none; /* Remove background on hover/focus */
}

#togglemenu {
  display: none; /* Hide toggle menu by default */
  cursor: pointer; /* Pointer cursor */
}

/* Buttons */
.btn {
  padding: 5px 10px !important; /* Button padding */
  box-shadow: none !important; /* Remove box shadow */
}

.btn-primary {
  background: #d9230f !important; /* Primary button background */
  border: 1px solid #d9230f !important; /* Primary button border */
  font-weight: bold; /* Bold font weight */
  color: rgba(255, 255, 255, 0.75) !important; /* Primary button text color */
}

.btn-primary:hover {
  color: rgba(255, 255, 255, 0.9) !important; /* Primary button hover text color */
}

.btn-secondary {
  border: 1px solid #d9230f !important; /* Secondary button border */
}

.btn-secondary:hover {
  color: #d9230f; /* Secondary button hover text color */
}

/* Forms */
.form-control {
  height: 37px; /* Form control height */
}

/* Images */
img {
  display: block; /* Display as block */
  max-width: 100%; /* Maximum width */
}

img.poweredby {
  cursor: pointer; /* Pointer cursor */
  display: inline-block; /* Display inline block */
  height: 100px; /* Image height */
  margin-right: 10px; /* Right margin */
  margin-left: -8px; /* Left margin */
  opacity: 0.35; /* Opacity */
}

/* Image Gallery */
.image-gallery a img {
  -webkit-filter: grayscale(100%) brightness(116%) contrast(83%) opacity(70%); /* Webkit filter */
  filter: grayscale(100%) brightness(116%) contrast(83%) opacity(70%); /* Filter */
  -webkit-transition: all 0.3s ease; /* Webkit transition */
  -moz-transition: all 0.3s ease; /* Mozilla transition */
  -o-transition: all 0.3s ease; /* Opera transition */
  -ms-transition: all 0.3s ease; /* Microsoft transition */
  transition: all 0.3s ease; /* Transition */
}

.image-gallery a:hover img {
  -webkit-filter: grayscale(0%) brightness(100%) contrast(100%) opacity(100%); /* Webkit hover filter */
  filter: grayscale(0%) brightness(100%) contrast(100%) opacity(100%); /* Hover filter */
}

/* Footer Links and Breadcrumbs */
.site-footer a,
#breadcrumbs,
#breadcrumbs a {
  color: #777777; /* Link and breadcrumb color */
}

.site-footer h3 {
  color: silver; /* Footer h3 color */
}

/* Sidebar */
.sidebar-personal-info .sidebar-personal-info-section {
  line-height: 1rem; /* Line height */
}

.sidebar-personal-info .sidebar-personal-info-section:not(:first-of-type) {
  margin-top: 0.75rem; /* Top margin for non-first section */
}

.sidebar-personal-info .sidebar-personal-info-section a,
.sidebar-personal-info .sidebar-personal-info-section strong {
  color: $green; /* Sidebar link and strong color */
  text-decoration: none; /* Remove text decoration */
}

/* Blockquotes */
#bq,
#bqi {
  background: #f9f9f9; /* Blockquote background */
  border-left: 10px solid; /* Left border */
  margin: 1.5em 10px; /* Margin */
  padding: 0.5em 10px; /* Padding */
  quotes: "\201C" "\201D" "\2018" "\2019"; /* Quotes */
  text-align: justify; /* Justify text */
}

#bq {
  border-left-color: #1a4464; /* Blockquote 1 left border color */
}

#bqi {
  border-left-color: #777777; /* Blockquote 2 left border color */
}

#bq:before,
#bqi:before {
  font-size: 4em; /* Blockquote before font size */
  line-height: 0.1em; /* Line height */
  margin-right: 0.25em; /* Right margin */
  vertical-align: -0.4em; /* Vertical alignment */
  content: open-quote; /* Open quote content */
}

#bq:before {
  color: #1a4464; /* Blockquote 1 before color */
}

#bqi:before {
  color: #777777; /* Blockquote 2 before color */
}

#bq p,
#bqi p {
  display: inline; /* Display inline */
}

/* Changing Keywords */
.rs-changing-keywords {
  color: #1a4464 !important; /* Changing keyword color */
}

/* Blog Content */
#post-content-blog {
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; /* Font family */
  font-size: 16px; /* Font size */
  line-height: 1.42857143; /* Line height */
  color: #777777; /* Text color */
  background-color: #fcfcfc; /* Background color */
}

/* Post Navigation */
.post-navigation-bottom {
  display: flex; /* Flex display */
  justify-content: space-between; /* Space between elements */
  flex-wrap: wrap; /* Wrap elements */
}

.post-navigation-bottom p {
  flex: 1 1 0; /* Flex properties */
  width: 45%; /* Width */
}

.post-navigation-bottom p:first-child {
  padding-right: 0.5em; /* Right padding for first child */
}

.post-navigation-bottom p:last-child {
  padding-left: 0.5em; /* Left padding for last child */
  text-align: right; /* Right align text */
}

/* Download Button */
.download {
  float: right; /* Float right */
  margin-top: 5px; /* Top margin */
}

/* Spotify Embed */
.embed-spotify {
  position: relative; /* Relative positioning */
  padding-bottom: 100%; /* Padding bottom */
  height: 0; /* Height */
  overflow: hidden; /* Hide overflow */
  max-width: 100%; /* Maximum width */
}

.embed-spotify iframe,
.embed-spotify object,
.embed-spotify embed {
  position: absolute; /* Absolute positioning */
  top: 0; /* Top position */
  left: 0; /* Left position */
  width: 100%; /* Width */
  height: 100%; /* Height */
}

/* Facebook Comments */
.fb_iframe_widget_fluid_desktop,
.fb_iframe_widget_fluid_desktop span,
.fb_iframe_widget_fluid_desktop iframe {
  max-width: 100% !important; /* Maximum width */
  width: 100% !important; /* Width */
}

/* No Select */
.noselect {
  -webkit-touch-callout: none; /* Disable webkit touch callout */
  -webkit-user-select: none; /* Disable webkit user select */
  -khtml-user-select: none; /* Disable konqueror user select */
  -moz-user-select: none; /* Disable mozilla user select */
  -ms-user-select: none; /* Disable microsoft user select */
  user-select: none; /* Disable user select */
}

/* Responsive Styles */
@media (max-width: 1000px) {
  #togglemenu {
    display: block; /* Show toggle menu on smaller screens */
  }

  #menu ul {
    display: none; /* Hide menu list by default */
  }

  .menuopen #menu ul {
    display: block; /* Show menu list when menu is open */
  }
}

@media (max-width: 767px) {
  .download {
    margin-bottom: 12px; /* Bottom margin for download button */
    margin-top: -20px; /* Top margin for download button */
  }

  .navbar-default svg {
    margin-left: 0; /* Remove left margin for navbar svg */
  }
}

.mermaid {
            background-color: #fcfcfc;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            width: 90%;
            max-width: 1200px;
}
.mermaid svg {
                width: 100%;
                height: auto;
                font-size: 14px;
}

/* Style for the button container */
.code-header {
    display: flex; /* Aligns items */
    justify-content: flex-end; /* Pushes button to the right */
    background: #444; /* Dark background to match code block themes */
    padding: 5px 10px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    margin-top: 1em; /* Space above the code block */
}

/* Style for the Copy button itself */
.copy-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8em;
    transition: background 0.3s ease;
}

.copy-button:hover {
    background: #0056b3;
}

/* Adjust the margin of the code block so it fits snuggly below the header */
.highlight {
    margin-top: 0;
}