/* Premium UX Features CSS */

/* 1. Off-canvas Menu */
.off-canvas-wrapper {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 1000001;
    transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.1);
    visibility: hidden;
}

.off-canvas-wrapper.active {
    left: 0;
    visibility: visible;
}

.off-canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(3px);
}

.off-canvas-wrapper.active+.off-canvas-overlay,
.off-canvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.off-canvas-content {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.off-canvas-nav li {
    margin-bottom: 15px;
}

.off-canvas-nav li a {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
}

.off-canvas-nav li a:hover {
    color: var(--primary-color, #fc4a00);
}

/* 2. Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color, #fc4a00), #ff8a05);
    z-index: 1000002;
    transition: width 0.1s ease;
}

/* 3. Dark Mode Overrides (Refined) */
.dark-mode .off-canvas-wrapper {
    background: #151b28;
}

.dark-mode .off-canvas-nav li a {
    color: #fff;
}

.dark-mode .off-canvas-close {
    color: #fff !important;
}

/* 4. Breadcrumbs */
.global-breadcrumbs {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
    font-size: 14px;
}

.dark-mode .global-breadcrumbs {
    background: rgba(255, 255, 255, 0.03);
    color: #aaa;
}

.global-breadcrumbs a {
    color: var(--primary-color, #fc4a00);
    text-decoration: none;
}

.global-breadcrumbs .separator {
    margin: 0 10px;
    opacity: 0.5;
}

/* 5. Premium Search Modal */
.search-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 20, 0.95);
    /* Deep navy tint */
    z-index: 1000050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal-wrapper.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-close {
    position: absolute;
    top: 40px;
    right: 50px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: #007bff;
}

.search-modal-inner {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.3, 1, 0.3, 1);
}

.search-modal-wrapper.active .search-modal-inner {
    transform: translateY(0);
}

.search-modal-label {
    color: #007bff;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
}

.search-input-group {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
    position: relative;
}

.search-input-group::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width 0.4s ease;
}

.search-input-group:focus-within::after {
    width: 100%;
}

.search-modal-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    padding: 0;
    outline: none;
}

.search-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-modal-submit {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.3s;
}

.search-modal-submit:hover {
    color: #007bff;
}

.search-modal-help {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    margin-top: 20px;
    font-style: italic;
}