/* styles.css */
body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 100;
    font-style: italic;
    line-height: 1.6;
    color: #333;
    margin-top: 56px;
    /* Adjust for fixed navbar height */
}

.transparent-navbar {
    background-color: rgba(248, 249, 250, 0.8);
    /* Light grey with transparency */
}

.content {
    transition: margin-left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    margin-left: 0; /* Default to no margin */
}

.pl-0 {
    padding-left: 0 !important;
}

.pl-3 {
    padding-left: 1rem !important;
}

.pl-5 {
    padding-left: 1.5rem !important;
}

.pl-7 {
    padding-left: 2rem !important;
}

/* Override Bootstrap primary color */
.btn-primary {
    background-color: grey;
    border-color: grey;
}

.btn-primary:hover {
    background-color: darkgrey;
    border-color: darkgrey;
}

.navbar-light .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .show>.nav-link {
    color: grey;
}

.navbar-light .navbar-nav .nav-link {
    color: grey;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: darkgrey;
}

.dropdown-menu {
    background-color: rgba(223, 223, 223, 0.95);
    border-radius: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: grey;
    color: white;
}

.content {
    margin-left: 200px;
    /* Same as #page-menu width */
    padding-top: 40px;
    /* Increased padding-top for more space */
}

.navbar-nav .nav-item {
    margin-left: 40px;
}

/* Ensure the navbar doesn't overflow */
.navbar-nav {
    flex-wrap: nowrap;
}

/* Adjust scroll position for headings to account for fixed navbar */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    font-family: 'Open Sans', sans-serif; /* Ensure consistent font family */
    font-weight: 100 !important; /* Match body font weight */
    font-style: italic; /* Restore italic */
    scroll-margin-top: 70px;
    /* Adjust this value as needed */
}

/* styles.css */

/* ... existing styles ... */

/* Increase right padding of the content container */
.content-container {
    padding-right: 50px;
    /* Increase this value as needed */
}

/* Increase right padding on larger screens */
@media (min-width: 1200px) {
    .content-container {
        padding-right: 150px;
    }
}

@media (min-width: 1400px) {
    .content-container {
        padding-right: 200px;
    }
}

@media (min-width: 1600px) {
    .content-container {
        padding-right: 250px;
    }
}

.navbar-nav .nav-link .bi {
    font-size: 1.6em;
    /* Increase font size by 60% */
    vertical-align: middle;
    /* Adjust vertical alignment if necessary */
}

/* Increase the size of the page TOC icon (#menu-icon) */
#menu-icon .bi {
    font-size: 1.6em;
    /* Increase font size by 60% */
    vertical-align: middle;
    /* Adjust vertical alignment if necessary */
}

/* Increase the width of #page-menu on larger screens */
@media (min-width: 992px) {
    #page-menu {
        width: 380px;
        /* New width (200px + 60%) */
    }

    /* Adjust the left margin of .content to match the new #page-menu width */
    .content {
        margin-left: 380px;
        /* Same as #page-menu width */
    }
}

table {
    font-size: 0.8em;
    /* Adjust the value as needed */
}

.effectLinks {
    overflow: hidden;
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: white;
    /* Set the default text color to white */
    background: rgba(150, 150, 151, 0.5);
    padding: 10px;
    width: 100%;
}

.effectLinks::after {
    content: attr(data-replace);
    position: absolute;
    left: 0;
    padding-left: 10px;
    transform-origin: 100% 50%;
    transform: translate3d(200%, 0, 0);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.3s ease;
    color: white;
    background: rgba(21, 23, 26, 1);
    opacity: 0;
}

.effectLinks:hover::after {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.effectLinks:hover {
    background: rgba(21, 23, 26, 1);
    color: rgb(215, 215, 215);
}

.effectLinks span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.effectLinks:hover span {
    transform: translate3d(-200%, 0, 0);
}

.effectLinksTable {
    overflow: hidden;
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: rgb(57, 56, 56);
    /* Changed from white to black */
    background: none;
    /* Removed background color */
    padding: 0px;
    width: 100%;
}

.effectLinksTable::after {
    content: attr(data-replace);
    position: absolute;
    left: 0;
    padding-left: 10px;
    transform-origin: 100% 50%;
    transform: translate3d(200%, 0, 0);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.3s ease;
    /* added opacity transition */
    color: black;
    background: none;
    opacity: 0;
    /* added this line */
}

.effectLinksTable:hover::after {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    /* added this line */
}

.effectLinksTable:hover {
    background: none;
    /* Removed background color */
    /* color: rgb(43, 150, 226) */
    color: white;
}

.effectLinksTable::after {
    content: attr(data-replace);
    transform-origin: 100% 50%;
    transform: translate3d(200%, 0, 0);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.effectLinksTable:hover::after {
    transform: translate3d(0, 0, 0);
    /* color: rgb(43, 150, 226) */
    color: white;
}

.effectLinksTable span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.effectLinksTable:hover span {
    transform: translate3d(-200%, 0, 0);
}

kbd23 {
    font-style: italic;
    font-family: inherit;
    /* This makes the <kbd> tag inherit the body's font */
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    color: #333;
}

kbd {
    background-color: #f0f0f0;
    border: 1px solid #bbb;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: "Courier New", monospace;
    color: #333;
}

.no-rounded-corners {
    border-radius: 0 !important;
}

.no-rounded-corners .card-body {
    border-radius: 0 !important;
}

.no-rounded-corners img {
    border-radius: 0 !important;
}

.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #f7aa0e;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 !important; /* No rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover */
}

.info-box:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

.example-box {
    background-color: #f8f9fa;
    border-left: 4px solid #b3b3b3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 !important; /* No rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover */
}

.example-box:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

/* Style for negative examples in tables */
.bad-example td {
    background-color: #dc3545; /* Bootstrap danger color */
    color: white;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, .05);
}

.table th,
.table td {
    padding: .75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

/* Custom styles for square corners on cards */
.card,
.card-body {
    border-radius: 0 !important; /* Override default Bootstrap/MDB styles */
}

.table,
.table th,
.table td {
    border-radius: 0 !important;
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 600px;
    overflow: hidden;
    margin: 20px 0; /* Match info-box margin */
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover-wrapper video,
.book-cover-wrapper img {
    width: 100%;
    object-fit: cover;
    max-height: 600px;
}

.cover-text-overlay {
    font-family: 'IBM Plex Mono', monospace; /* IBM Plex Mono font */
    position: absolute;
    font-size: 4rem;
    font-weight: 400; /* Regular font weight for better readability */
    color: black; /* Black color */
    text-shadow: none; /* Remove text shadow */
    font-style: normal; /* No italics */
    z-index: 2;
    opacity: 0;
    transform: translateY(0); /* Keep it vertically centered */
    transition: all 0.6s ease;
    letter-spacing: -0.02em;
    text-align: center;
    width: 100%;
}

.animate-cover-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: currentColor;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
/* Left-aligned TOC sidebar */
#left-aligned-sidebar {
    position: fixed;
    top: 56px; /* Adjust for navbar height */
    left: -300px; /* Start off-screen */
    width: 300px;
    height: calc(100% - 56px);
    background-color: rgba(248, 249, 250, 0.95);
    border-right: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
    transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1029; /* Below navbar (1030) */
}

#left-aligned-sidebar.open {
    left: 0;
}

.content.sidebar-open {
    margin-left: 300px;
}


#left-aligned-sidebar h4 {
    margin-top: 0;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
}

#left-aligned-sidebar ul {
    list-style: none;
    padding: 0;
}

#left-aligned-sidebar ul li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 5px 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 300; /* Lighter font weight */
    transition: font-weight 0.2s ease;
}

#left-aligned-sidebar ul li a:hover,
#left-aligned-sidebar ul li a:focus {
    font-weight: 700; /* Bolder on hover/focus */
}

/* Sidebar Toggle Button */
#sidebar-toggle-button {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 1032;
    background: transparent; /* Default to transparent */
    color: white;
    border: 2px solid transparent; /* Default to transparent border */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    line-height: 0; /* Reset line-height for centering */
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#sidebar-toggle-button:hover,
#sidebar-toggle-button:focus { /* Add focus for keyboard navigation */
    background: #fd7e14; /* Orange on hover/focus */
    border: 2px solid #fd7e14; /* Orange border on hover/focus */
    transform: translateY(-50%) scale(1.1);
    outline: none; /* Remove blue outline on focus */
}

/* Default state for the button when not hovered or focused */
#sidebar-toggle-button:not(:hover):not(:focus) {
    background: #868e96; /* Modern grey */
    border: 2px solid #868e96; /* Modern grey border */
}

#sidebar-toggle-button.open {
    left: 320px; /* Move button with sidebar */
}


#sidebar-toggle-button .icon-open,
#sidebar-toggle-button .icon-close {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#sidebar-toggle-button .icon-close {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

#sidebar-toggle-button.open .icon-open {
    transform: scale(0);
    opacity: 0;
}

#sidebar-toggle-button.open .icon-close {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

