:root {

    --primary-color: #2c3e50;

    --secondary-color: #34495e;

    --accent-color: #3498db;

    --text-color: #333;

    --light-gray: #ecf0f1;

    --sidebar-width: 250px;

}



* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



body {

    font-family: Arial, sans-serif;

    line-height: 1.6;

    color: var(--text-color);

    background-color: white;

}



.container {

    display: flex;

    min-height: 100vh;

}



/* Sidebar Styles */

.sidebar {

    width: var(--sidebar-width);

    background-color: #070720;

    padding: 20px 0;

    height: calc(100vh - 60px);

    position: fixed;

    top: 60px;

    left: 0;

    transition: transform 0.3s ease;

    z-index: 90;

    display: flex;

    flex-direction: column;

}



.sidebar.hidden {

    transform: translateX(-100%);

}



.content.full-width {

    margin-left: 0;

}



.main-header.full-width {

    padding-left: 20px;

}



.footer.full-width {

    padding-left: 20px;

}



.nav-header {

    color: white;

    font-size: 1.2rem;

    padding: 15px 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

}



.sidebar ul {

    list-style: none;

    flex-shrink: 0;

}



.sidebar ul li a {

    display: block;

    padding: 15px 20px;

    color: white;

    text-decoration: none;

    transition: background-color 0.3s;

}



.sidebar ul li a:hover,

.sidebar ul li a.active {

    background-color: var(--secondary-color);

}



/* Header Styles */

.main-header {

    background-color:#070720;

    padding: 10px 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    position: fixed;

    width: 100%;

    left: 0;

    top: 0;

    z-index: 100;

    height: 60px;

}



.logo-area {

    width: 150px; /* Define el ancho del área */

    height: 40px; /* Define la altura del área */

    background-color: rgba(255, 255, 255, 0.1); /* Fondo con transparencia */

    border-radius: 4px; /* Bordes redondeados */

    display: flex; /* Flexbox para centrar el contenido */

    align-items: center; /* Centra el logo verticalmente */

    justify-content: center; /* Centra el logo horizontalmente */

    color: white; /* Texto blanco (en caso de texto) */

    margin-left: 0; /* Sin margen izquierdo */

}



.logo {

    max-width: 100%; /* Hace que el logo se ajuste al contenedor en ancho */

    max-height: 100%; /* Ajusta la altura del logo según el contenedor */

    height: auto; /* Mantiene la relación de aspecto del logo */

}





.header-buttons {

    display: flex;

    gap: 10px;

}



.header-button {

    padding: 8px 15px;

    background-color: var(--accent-color);

    color: white;

    border: none;

    border-radius: 4px;

    cursor: pointer;

    transition: background-color 0.3s;

}



.header-button:hover {

    background-color: #2980b9;

}



#toggleSidebar {

    background-color: var(--secondary-color);

    margin-right: 10px;

}



/* Main Content Styles */

.content {

    flex: 1;

    margin-left: var(--sidebar-width);

    margin-top: 60px;

    margin-bottom: 60px;

    padding: 20px;

    background-color: white;

    transition: all 0.3s ease;

    min-height: calc(100vh - 120px);

}



.content-header {

    background-color: rgba(255, 255, 255, 0.1);

    padding: 15px 20px;

    border-radius: 5px;

    box-shadow: 0 1px 3px rgba(0,0,0,0.2);

    margin-bottom: 20px;

}



.breadcrumb {

    color: #ff5e00;

    font-size: 0.9rem;

}

.breadcrumb a {

    color: inherit; /* Hereda el color del texto del contenedor */

    text-decoration: none; /* Elimina el subrayado */

}



.viewer-container {

    background-color: rgba(255, 255, 255, 0.05);

    border-radius: 5px;

    box-shadow: 0 2px 4px rgba(0,0,0,0.2);

    overflow: hidden;

}



.document-info {

    position: sticky;

    top: 0;

    background-color: white;

    z-index: 10;

    padding: 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.document-info h1 {

    font-size: 1.0rem;

    color: #ff5e00;

    margin: 0;

}



.controls {

    display: flex;

    gap: 20px;

    align-items: center;

    justify-content: space-between;

    width: 100%;

}



.left-controls, .right-controls {

    display: flex;

    gap: 10px;

    align-items: center;

}



.left-controls #download {

    display: none;

}



.controls button {

    padding: 8px 15px;

    background-color: var(--accent-color);

    color: white;

    border: none;

    border-radius: 4px;

    cursor: pointer;

    transition: background-color 0.3s;

}



.controls button:hover {

    background-color: #2980b9;

}



.document-viewer {

    padding: 20px;

    background-color: rgba(255, 255, 255, 0.02);

    display: flex;

    justify-content: center;

    align-items: flex-start;

    transition: padding 0.3s ease;

    overflow: auto;

    max-height: calc(100vh - 300px);

    overflow-x: auto;

    white-space: nowrap;

}



#viewer {

    width: 100%;

    min-height: 600px;

    display: flex;

    justify-content: center;

    align-items: flex-start;

    transition: max-width 0.3s ease;

    min-width: min-content;

}



#viewer.canvas,

#viewer img,

#pdfViewer {

    max-width: 100%;

    height: auto;

    transition: transform 0.3s ease;

    transform-origin: top center;

}



.document-image {

    max-width: 100%;

    height: auto;

    transition: transform 0.3s ease;

    transform-origin: top center;

}



#svgViewer {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

#svgViewer svg, 
#svgViewer img {
  max-width: none !important;
  max-height: none !important;
  width: auto;
  height: auto;
  display: block;
  transform-origin: 0 0;
  will-change: transform; /* Mejora rendimiento de animaciones */
}

.svg-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}




#pageInfo {

    padding: 8px 15px;

    background-color: rgba(255, 255, 255, 0.1);

    border-radius: 4px;

    color: black;

}



/* Ad Banner Styles */

.ad-banner {

    display: none;

    margin-top: 20px;

    padding: 15px;

}



.ad-placeholder {

    background: rgba(255, 255, 255, 0.1);

    width: 160px;

    height: 600px;

    border-radius: 4px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: rgba(255, 255, 255, 0.7);

    font-style: italic;

    border: 1px dashed rgba(255, 255, 255, 0.3);

}



/* Ocultar banner en móviles */

@media (max-width: 768px) {

    .ad-banner {

        display: none;

    }

}





/* Footer Styles */

.footer {

    background-color:#070720;

    color: white;

    padding: 20px;

    text-align: center;

    position: fixed;

    bottom: 0;

    left: 0;

    width: 100%;

    height: 60px;

    z-index: 100;

}



.footer.full-width {

    padding-left: 20px;

}



@media (max-width: 768px) {

    .container {

        flex-direction: column;

    }

    

    .sidebar {

        width: 100%;

        height: auto;

        position: static;

        top: 0;

        z-index: 110;

    }

    

    .content {

        margin-left: 0;

        padding: 20px;

        margin-top: 60px;

    }

    

    .main-header {

        width: 100%;

        padding: 10px;

    }



    .logo-area {

        width: 120px;

        font-size: 14px;

    }



    .header-buttons {

        gap: 5px;

    }



    .header-button {

        padding: 6px 10px;

        font-size: 14px;

    }

    

    .content.full-width,

    .main-header.full-width,

    .footer.full-width {

        margin-left: 0;

        padding-left: 20px;

    }

    

    .document-info {

        flex-direction: column;

        gap: 15px;

        padding: 15px;

    }

    .document-info h1 {

        font-size: 1.2rem;

        text-align: center;

    }



    .controls {

        flex-direction: column;

        gap: 10px;

    }



    .left-controls, .right-controls {

        width: 100%;

        justify-content: center;

    }



    .controls button {

        padding: 6px 10px;

        font-size: 14px;

        min-width: 80px;

    }



    #pageInfo {

        padding: 6px 10px;

        font-size: 14px;

        width: 100%;

        text-align: center;

    }



    .document-viewer {

        padding: 10px;

        max-height: calc(100vh - 350px);

    }



    .ad-placeholder {

        width: 100%;

        height: 100px;

        margin: 10px 0;

    }



    .sidebar ul li a {

        padding: 12px 15px;

        font-size: 14px;

    }

}



@media (max-width: 480px) {

    .main-header {

        flex-direction: column;

        height: auto;

        padding: 10px;

        gap: 10px;

    }



    .header-buttons {

        width: 100%;

        justify-content: center;

    }



    .content {

        margin-top: 90px;

    }



    .document-info .controls button {

        font-size: 12px;

        padding: 5px 8px;

        min-width: 70px;

    }

}





  

























#fullImageModal {

    display: none;

    position: fixed;

    z-index: 9999;

    top: 0;

    left: 0;

    width: 100vw;

    height: 100vh;

    background: rgba(0, 0, 0, 0.95);

    justify-content: center;

    align-items: center;

}



#fullImageModal img {

    width: 100vw;

    height: 100vh;

    object-fit: contain;

    display: block;

}







.modal-close {

    position: absolute;

    top: 10px; /* Ajuste para que no quede pegado al borde */

    right: 50px; /* Un poco de margen a la derecha */

    font-size: 2.5rem; /* Tamaño más grande */

    color: white;

    background: transparent;

    border: none;

    cursor: pointer;

    z-index: 10001;

    transition: color 0.2s ease;

}



/* Efecto hover para hacerla más visible */

.modal-close:hover {

    color: #ccc;

}



/* Estilo para pantallas móviles */

@media (max-width: 768px) {

    .modal-close {

        top: 15px; /* Más margen arriba en pantallas pequeñas */

        right: 15px; /* Más margen a la derecha */

        font-size: 2.5rem; /* Un poco más grande en pantallas pequeñas */

    }

}







.modal-nav {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    background: rgba(255, 255, 255, 0.15);

    border: none;

    color: white;

    font-size: 2.5rem; /* Tamaño mayor para mayor visibilidad */

    width: 64px;

    height: 64px;

    cursor: pointer;

    border-radius: 12px; /* Cambia a 50% si prefieres un círculo */

    z-index: 10000;

    transition: background 0.3s ease, transform 0.2s ease;

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

}



.modal-nav:hover {

    background: rgba(255, 255, 255, 0.25);

    transform: translateY(-50%) scale(1.05);

}



.modal-nav:active {

    transform: translateY(-50%) scale(0.95);

}



/* Izquierda y derecha */

#prevModalImage {

    left: 2vw; /* Más cerca del borde, pero no pegado */

}



#nextModalImage {

    right: 2vw;

}



.modal-nav:hover {

    background: rgba(255, 255, 255, 0.4);

}

























/* Scrollbar para WebKit (Chrome, Edge, Safari) */

/* Scrollbars personalizados */

#viewer::-webkit-scrollbar,

#svgViewer::-webkit-scrollbar,

.document-viewer::-webkit-scrollbar {

    width: 12px;

    height: 12px;

}



#viewer::-webkit-scrollbar-track,

#svgViewer::-webkit-scrollbar-track,

.document-viewer::-webkit-scrollbar-track {

    background: #ddd; /* Más visible */

}



#viewer::-webkit-scrollbar-thumb,

#svgViewer::-webkit-scrollbar-thumb,

.document-viewer::-webkit-scrollbar-thumb {

    background-color: #ff5e00; /* Naranja vibrante */

    border-radius: 10px;

    border: 3px solid #ddd;

}



/* Firefox support */

#viewer,

#svgViewer,

.document-viewer {

    scrollbar-width: auto;

    scrollbar-color: #ff0400 #ddd;

}



















@media (max-width: 768px) {

    .modal-nav {

        position: absolute;

        top: 50%;

        transform: translateY(-50%);

        width: 35px;

        height: 35px;

        background: rgba(0, 0, 0, 0.5);

        color: white;

        font-size: 1.5rem;

        display: flex;

        align-items: center;

        justify-content: center;

        cursor: pointer;

        border: none;

        z-index: 20;

        transition: background 0.3s ease;

    }



    #prevModalImage {

        left: 5px;

    }



    #nextModalImage {

        right: 5px;

    }



    .modal-nav:hover {

        background: rgba(0, 0, 0, 0.8);

    }



    .modal-body {

        display: flex;

        justify-content: center;

        align-items: center;

        height: 100%;

        padding: 0 40px; /* Espacio para las flechas */

    }



    #fullImageContent {

        max-width: 100%;

        max-height: 80vh;

        width: auto;

        height: auto;

        object-fit: contain;

        margin: 0 auto;

    }

}



/* Solo aplica a SVG grandes */
.svg-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
}

.svg-wrapper > svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  transform-origin: center center;
}
