.banner-container {
    height: auto;
    padding-top: 150px;
    background: linear-gradient(135deg, var(--primary-color), #006b87);
    color: white;
}

.document-container {
    padding: 0 0 20px 0;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), #006b87);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: var(--font-roboto);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 69, 94, 0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 69, 94, 0.3);
    background: linear-gradient(
        135deg,
        #006b87,
        var(--background-button-white)
    );
}

.document-reader {
    background: #fafafa;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #efefef;
    box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.07);
}

.document-pdf {
    width: 100%;
    height: 100%;
    padding: 6px;
    position: relative;
}

.document-pdf canvas {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
}

.btn-fullscreen {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.btn-fullscreen:hover {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.title-document {
    font-weight: 600;
    font-size: 24px;
    line-height: 130%;
    letter-spacing: 0.5px;
    text-align: center;
    color: #00455e;
    margin-bottom: 1.5rem;
}

/* PDF Navigation Controls */
#pdf-canvas {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-controls {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.pdf-controls .btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-controls .btn:hover {
    background: #006b87;
}

.pdf-controls .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Purchase Section */
.purchase-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.price-display {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

/* Document Description */
#document-description {
    padding: 1.25rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    line-height: 1.6;
}

#document-description strong {
    color: var(--primary-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* Similar Documents */
.similar-documents {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.similar-documents img {
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.similar-documents img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modal Enhancements */
.modal-xl {
    max-width: 95vw;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Large tablets and small desktops (1199.98px and down) */
@media (max-width: 1199.98px) {
    .banner-container {
        padding-top: 120px;
    }

    .document-reader {
        padding: 25px;
    }

    .title-document {
        font-size: 22px;
    }

    .price-display {
        font-size: 1.4rem;
    }
}

/* Tablets (991.98px and down) */
@media (max-width: 991.98px) {
    .banner-container {
        padding-top: 100px;
        text-align: center;
    }

    .banner-container h2 {
        font-size: 1.75rem;
    }

    .document-reader {
        padding: 20px;
    }

    .title-document {
        font-size: 20px;
        margin-bottom: 1rem;
    }

    /* Stack PDF and description vertically on tablets */
    .document-pdf {
        margin-bottom: 1.5rem;
    }

    #document-description {
        margin-top: 0;
    }

    /* Similar documents adjustment */
    .similar-documents {
        margin-top: 2rem;
    }

    /* Modal adjustments */
    .modal-xl {
        max-width: 90vw;
    }

    .modal-content iframe {
        height: 70vh !important;
    }
}

/* Mobile landscape and small tablets (767.98px and down) */
@media (max-width: 767.98px) {
    .banner-container {
        margin: 1.25rem auto;
    }

    .banner-container h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .document-container {
        padding: 20px 0;
    }

    /* Document reader mobile */
    .document-reader {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 1.5rem;
    }

    /* PDF viewer mobile */
    .document-pdf {
        padding: 0;
        margin-bottom: 1rem;
    }

    .document-pdf canvas {
        border-radius: 6px;
    }

    /* PDF controls mobile */
    .pdf-controls {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .pdf-controls .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .page {
        order: -1;
        font-size: 1rem;
        padding: 8px 16px;
        background: var(--bg-light);
        border-radius: 6px;
        text-align: center;
    }

    /* Purchase section mobile */
    .purchase-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .price-display {
        font-size: 1.75rem;
    }

    .btn-primary-custom {
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
        min-height: 50px;
    }

    /* Description mobile */
    #document-description {
        padding: 1rem;
        margin-top: 1rem;
        font-size: 0.95rem;
    }

    #document-description strong {
        font-size: 1rem;
    }

    /* Similar documents mobile */
    .title-document {
        font-size: 18px;
        text-align: left;
        margin-bottom: 1rem;
    }

    .similar-documents {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .similar-documents .row {
        margin: 0 -8px;
    }

    .similar-documents .col-6 {
        padding: 0 8px;
        margin-bottom: 1rem;
    }

    .similar-documents img {
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

    .similar-documents .nav-link {
        margin-top: 1rem;
        font-size: 0.9rem;
    }

    /* Fullscreen button mobile */
    .btn-fullscreen {
        bottom: 5px;
        right: 5px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    /* Modal mobile */
    .modal-xl {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-content iframe {
        height: 60vh !important;
    }
}

/* Mobile portrait (575.98px and down) */
@media (max-width: 575.98px) {
    .banner-container {
        margin: 1.25rem auto;
    }

    .banner-container h2 {
        font-size: 1.3rem;
    }

    .document-container {
        padding: 15px 0;
    }

    /* Ultra compact document reader */
    .document-reader {
        padding: 12px;
        margin-bottom: 1rem;
    }

    /* PDF controls ultra mobile */
    .pdf-controls {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .pdf-controls .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .page {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    /* Purchase section ultra mobile */
    .purchase-section {
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .price-display {
        font-size: 1.5rem;
    }

    .btn-primary-custom {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Description ultra mobile */
    #document-description {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    #document-description strong {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    /* Similar documents ultra mobile */
    .title-document {
        font-size: 16px;
        margin-bottom: 0.75rem;
    }

    .similar-documents {
        padding: 0.875rem;
        margin-top: 1rem;
    }

    .similar-documents .col-6 {
        margin-bottom: 0.75rem;
    }

    .similar-documents .nav-link {
        font-size: 0.85rem;
    }

    /* Modal ultra mobile */
    .modal-xl {
        margin: 5px;
        max-width: calc(100vw - 10px);
    }

    .modal-content iframe {
        height: 50vh !important;
    }

    /* Fullscreen button smaller */
    .btn-fullscreen {
        padding: 4px 8px;
        font-size: 0.8rem;
        bottom: 3px;
        right: 3px;
        z-index: 0;
    }
}

/* ========== PDF VIEWER ENHANCEMENTS ========== */

/* PDF Canvas responsive scaling */
@media (max-width: 767.98px) {
    .document-pdf canvas {
        max-height: 400px;
        object-fit: contain;
    }
}

@media (max-width: 575.98px) {
    .document-pdf canvas {
        max-height: 300px;
    }
}

/* PDF loading state */
.pdf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    color: var(--text-secondary);
}

.pdf-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* ========== TOUCH OPTIMIZATIONS ========== */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn-primary-custom:hover,
    .btn-fullscreen:hover,
    .pdf-controls .btn:hover,
    .similar-documents img:hover {
        transform: none;
        box-shadow: none;
    }

    .btn-primary-custom:hover {
        background: linear-gradient(135deg, var(--primary-color), #006b87);
    }

    .btn-fullscreen:hover {
        background-color: rgba(255, 255, 255, 0.9);
    }

    /* Better touch feedback */
    .pdf-controls .btn:active,
    .btn-primary-custom:active,
    .btn-fullscreen:active {
        transform: scale(0.98);
    }

    /* Touch-friendly similar document images */
    .similar-documents a {
        display: block;
        padding: 4px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

    .similar-documents a:active {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

/* ========== ACCESSIBILITY IMPROVEMENTS ========== */

/* Focus states */
.btn-primary-custom:focus,
.pdf-controls .btn:focus,
.btn-fullscreen:focus,
.similar-documents a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link for PDF viewer */
.skip-to-pdf {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.3s;
}

.skip-to-pdf:focus {
    top: 6px;
}

/* Screen reader text for PDF controls */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .document-reader,
    .purchase-section,
    #document-description,
    .similar-documents {
        border-width: 2px;
    }

    .btn-primary-custom {
        border: 2px solid var(--primary-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn-primary-custom,
    .pdf-controls .btn,
    .similar-documents img,
    .btn-fullscreen {
        transition: none;
    }

    .pdf-loading::after {
        animation: none;
    }
}

/* ========== LANDSCAPE ORIENTATION ========== */

@media (max-height: 500px) and (orientation: landscape) {
    .banner-container {
        margin: 1.25rem auto;
    }

    .document-container {
        padding: 10px 0;
    }

    .document-reader {
        padding: 10px;
    }

    .pdf-controls {
        flex-direction: row;
        padding: 0.5rem;
    }

    .page {
        order: 0;
    }

    .modal-content iframe {
        height: 80vh !important;
    }
}

/* ========== UTILITIES ========== */

/* Hide elements when needed */
@media (max-width: 767.98px) {
    .d-mobile-none {
        display: none !important;
    }

    .d-mobile-block {
        display: block !important;
    }

    .d-mobile-flex {
        display: flex !important;
    }
}

/* Loading states */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

/* Error states */
.pdf-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}

.pdf-error i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

#prev,
#next {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    transition: all 0.2s;
}
#prev:disabled,
#next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.text-secondary {
    color: #6c757d !important;
}
