/* ==========================================================================
   Happy School Center - Document, PDF & Ebook Stylesheet
   Modern, Ultra-Premium, Interactive PDF Reader & E-Commerce Module
   ========================================================================== */

/* 1. Header Banner & Search Section */
.hsc-doc-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #172554 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}

.hsc-doc-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hsc-doc-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #facc15;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hsc-doc-banner-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 14px;
}

.hsc-doc-banner-desc {
    font-size: 1.12rem;
    color: #cbd5e1;
    max-width: 680px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Search Bar in Banner */
.hsc-doc-search-box {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

.hsc-doc-search-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 10px 6px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.hsc-doc-search-input-wrap:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.35);
}

.hsc-doc-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #0f172a;
    background: transparent;
    padding: 10px 0;
}

.hsc-doc-search-btn {
    background: linear-gradient(135deg, #ff6b00, #ea580c);
    color: #ffffff;
    border: none;
    border-radius: 40px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hsc-doc-search-btn:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

/* 2. Stats Summary Strip */
.hsc-doc-stats-strip {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
    margin-bottom: 35px;
}

.hsc-doc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hsc-doc-stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
}

.hsc-doc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.hsc-doc-stat-info h4 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.hsc-doc-stat-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* 3. Filter & Sort Bar */
.hsc-doc-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    background: #ffffff;
    padding: 16px 22px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.hsc-doc-filter-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hsc-doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.hsc-doc-pill:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.hsc-doc-pill.is-active {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.hsc-doc-pill-free.is-active {
    background: #16a34a;
    border-color: #16a34a;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

.hsc-doc-pill-paid.is-active {
    background: #ea580c;
    border-color: #ea580c;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

.hsc-doc-sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hsc-doc-sort-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.88rem;
    color: #334155;
    background: #ffffff;
    outline: none;
    cursor: pointer;
}

/* 4. Document Grid & Cards */
.hsc-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
    margin-bottom: 40px;
}

.hsc-doc-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.hsc-doc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}

/* Document Cover / Thumbnail */
.hsc-doc-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hsc-doc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hsc-doc-card:hover .hsc-doc-cover img {
    transform: scale(1.05);
}

.hsc-doc-cover-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a, #0284c7);
}

.hsc-doc-cover-fallback .icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

/* Badges on cover */
.hsc-doc-badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.hsc-doc-badge-free {
    background: #10b981;
    color: #ffffff;
}

.hsc-doc-badge-paid {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
}

.hsc-doc-badge-format {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Card Body */
.hsc-doc-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hsc-doc-category-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: inline-block;
}

.hsc-doc-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.hsc-doc-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.hsc-doc-card-title a:hover {
    color: #2563eb;
}

/* Meta info: pages, level, downloads */
.hsc-doc-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hsc-doc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Pricing box inside card */
.hsc-doc-card-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    margin-bottom: 16px;
}

.hsc-doc-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ea580c;
}

.hsc-doc-card-price-free {
    font-size: 1.15rem;
    font-weight: 800;
    color: #16a34a;
}

.hsc-doc-card-orig-price {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 6px;
}

.hsc-doc-save-badge {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

/* Card Actions */
.hsc-doc-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hsc-btn-preview-doc {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hsc-btn-preview-doc:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.hsc-btn-action-doc {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hsc-btn-action-doc:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.hsc-btn-action-buy {
    background: linear-gradient(135deg, #ff6b00, #ea580c);
}

.hsc-btn-action-buy:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
}

/* 5. Interactive PDF Viewer Component */
.hsc-pdf-viewer-wrap {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #334155;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 820px;
    max-height: 85vh;
}

.hsc-pdf-toolbar {
    background: #0f172a;
    color: #f1f5f9;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #334155;
    z-index: 10;
    flex-shrink: 0;
}

.hsc-pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hsc-pdf-btn {
    background: #334155;
    color: #f8fafc;
    border: 1px solid #475569;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hsc-pdf-btn:hover:not(:disabled) {
    background: #475569;
    color: #ffffff;
}

.hsc-pdf-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.hsc-pdf-page-indicator {
    font-size: 0.88rem;
    font-weight: 600;
    color: #cbd5e1;
    min-width: 90px;
    text-align: center;
}

.hsc-pdf-viewport {
    flex: 1 1 0%;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    background: #334155;
    padding: 24px 16px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-sizing: border-box;
}

.hsc-pdf-page-container {
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: #ffffff;
    border-radius: 4px;
    position: relative;
    max-width: 100%;
}

.hsc-pdf-page-container:last-child {
    margin-bottom: 40px;
}

.hsc-pdf-page-canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}

/* Fullscreen Viewer Styles - Fix full height display across all browsers without prefix selector collision */
.hsc-pdf-viewer-wrap.is-fullscreen,
.hsc-pdf-viewer-wrap:fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 9999999 !important;
    background: #1e293b !important;
    display: flex !important;
    flex-direction: column !important;
}

.hsc-pdf-viewer-wrap:-webkit-full-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 9999999 !important;
    background: #1e293b !important;
    display: flex !important;
    flex-direction: column !important;
}

.hsc-pdf-viewer-wrap.is-fullscreen .hsc-pdf-toolbar,
.hsc-pdf-viewer-wrap:fullscreen .hsc-pdf-toolbar {
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.hsc-pdf-viewer-wrap:-webkit-full-screen .hsc-pdf-toolbar {
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.hsc-pdf-viewer-wrap.is-fullscreen .hsc-pdf-viewport,
.hsc-pdf-viewer-wrap:fullscreen .hsc-pdf-viewport {
    flex: 1 1 auto !important;
    height: calc(100vh - 54px) !important;
    max-height: calc(100vh - 54px) !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
    padding: 24px 16px 60px !important;
}

.hsc-pdf-viewer-wrap:-webkit-full-screen .hsc-pdf-viewport {
    flex: 1 1 auto !important;
    height: calc(100vh - 54px) !important;
    max-height: calc(100vh - 54px) !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
    padding: 24px 16px 60px !important;
}

.hsc-pdf-page-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
}

/* Loading Spinner */
.hsc-pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #cbd5e1;
}

.hsc-pdf-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: hsc-spin 0.8s linear infinite;
    margin-bottom: 14px;
}

@keyframes hsc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Lock Screen Overlay (Preview Limit Reached) */
.hsc-pdf-lock-screen {
    width: 100%;
    max-width: 700px;
    margin: 10px auto 30px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, #0f172a 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 146, 60, 0.4);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

.hsc-pdf-lock-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px;
    box-shadow: 0 0 25px rgba(234, 88, 12, 0.5);
    animation: hsc-pulse-lock 2s infinite;
}

@keyframes hsc-pulse-lock {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(234, 88, 12, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(234, 88, 12, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(234, 88, 12, 0.4);
    }
}

.hsc-pdf-lock-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fed7aa;
    margin-bottom: 10px;
}

.hsc-pdf-lock-desc {
    font-size: 0.98rem;
    color: #e2e8f0;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 24px;
}

.hsc-pdf-lock-btn {
    background: linear-gradient(135deg, #ff6b00, #ea580c);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.45);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hsc-pdf-lock-btn:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.6);
}

/* 6. Quick Preview Modal */
.hsc-doc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hsc-doc-modal-backdrop.is-open {
    display: flex;
}

.hsc-doc-preview-modal-content {
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 960px;
    height: 90vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: hscModalFadeIn 0.25s ease-out;
}

@keyframes hscModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hsc-doc-modal-header {
    padding: 16px 22px;
    background: #0f172a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.hsc-doc-modal-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hsc-doc-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.hsc-doc-modal-close:hover {
    color: #ffffff;
}

.hsc-doc-preview-modal-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #334155;
    position: relative;
}

.hsc-doc-preview-modal-body .hsc-pdf-viewer-wrap {
    flex: 1 1 0%;
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.hsc-doc-preview-modal-body .hsc-pdf-viewport {
    flex: 1 1 0% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
}

/* 7. Single Document Details Page Layout */
.hsc-doc-single-wrap {
    padding: 40px 0 60px;
}

.hsc-doc-single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.hsc-doc-single-main {
    min-width: 0;
}

.hsc-doc-single-sidebar {
    position: sticky;
    top: 90px;
}

.hsc-doc-card-sticky {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.hsc-doc-info-table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
}

.hsc-doc-info-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.hsc-doc-info-table td:first-child {
    color: #64748b;
    font-weight: 500;
}

.hsc-doc-info-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: #0f172a;
}

/* 8. Responsive Breakpoints */
@media (max-width: 991px) {
    .hsc-doc-banner-title {
        font-size: 2.1rem;
    }

    .hsc-doc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hsc-doc-single-layout {
        grid-template-columns: 1fr;
    }

    .hsc-doc-single-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .hsc-doc-banner {
        padding: 40px 0 35px;
    }

    .hsc-doc-banner-title {
        font-size: 1.7rem;
    }

    .hsc-doc-search-input-wrap {
        flex-direction: column;
        border-radius: 14px;
        padding: 10px;
    }

    .hsc-doc-search-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .hsc-doc-stats-grid {
        grid-template-columns: 1fr;
    }

    .hsc-doc-grid {
        grid-template-columns: 1fr;
    }

    .hsc-pdf-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hsc-pdf-toolbar-group {
        justify-content: space-between;
    }

    .hsc-pdf-viewport {
        min-height: 420px;
    }
}