
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-y: hidden;
    background-color: #ffffff;
}

.main-table {
    padding-top: 20px;
    width: 90%;
    margin: 0 auto;
    height: 100%;
}

.image-cell {
    position: relative;
    padding-bottom: 15% !important;
}

#pic {
    max-width: 100%;
    max-height: calc(80vh - 100px);
    object-fit: contain;
    padding: 30px;
    border: 2px solid #000000;
    transition: transform 0.2s ease;
    transform-origin: center;
}

#pic2 {
    max-width: 100%;
    max-height: calc(80vh - 100px);
    object-fit: contain;
    padding: 30px;
    border: 2px solid #000000;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.info-box {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 1;
    position: relative;
    z-index: 2;
}

p.n1 { 
    font-size: 24px; 
    font-family: arial; 
    font-weight: bold; 
    padding-top: 0px; 
    padding-bottom: 0px; 
}

p.n2 { 
    font-size: 24px; 
    font-family: arial; 
    font-style: italic; 
    padding-top: 0px; 
    padding-bottom: 0px; 
}
p { 
    margin-top: 0.1em; 
    margin-bottom: 0.1em; 
}

.cross-buttons {
    position: fixed;
    right: 15px;
    top: 160px; 
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 10px;
}

.button-top { grid-column: 2; grid-row: 1; }
.button-bottom { grid-column: 2; grid-row: 3; }
.button-left { grid-column: 1; grid-row: 2; }
.button-right { grid-column: 3; grid-row: 2; }
.button-center { grid-column: 2; grid-row: 2; }

.button:hover,
.nav-button:hover,
.info-button:hover,
.view-mode-button:hover,
.control-button:hover,
.exit-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

#pic2.fullscreen {
    max-width: 100%; 
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 0;
    border: none;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}

.zoom-indicator {
    min-width: 50px;
    text-align: center;
    color: white;
}

.nav-controls {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 10px;
}

.nav-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:first-child {
    left: 10px;
}

.nav-button:last-child {
    right: 10px;
}

.top-right-controls {
    position: fixed;
    top: 20px;
    right: 120px;
    display: flex;
    gap: 10px;
    z-index: 20;
    align-items: center;
}

.top-right-controls::before {
    content: "ZOOM PANORÀMIC";
    color: white;
    font-size: 14px;
    margin-right: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
}

.button,
.nav-button,
.info-button,
.view-mode-button,
.control-button,
.exit-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.info-button, 
.exit-button {
    margin-left: auto;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.view-mode-controls {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.info-panel {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 30px;
    border-radius: 8px;
    color: black;
    max-width: 400px;
}

.info-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.info-panel ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.fullscreen-image,
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    justify-content: center;
    align-items: center;
}

.fullscreen-image.visible,
.fullscreen-overlay.visible {
    opacity: 1;
}

#pic2.fullscreen {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#pic2.fullscreen.visible {
    opacity: 1;
}

.black-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.black-overlay.visible {
    opacity: 1;
}

.view-mode-buttons {
    position: absolute;
    bottom: 20px;
    right: 80px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.control-panel {
    position: fixed;
    top: 20px;
    right: 0px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 8px;
    color: white;
    gap: 5px;
}

.control-panel .control-buttons-group:not(:last-child) {
    margin-bottom: 5px;
}

.control-panel::before {
    content: "ZOOM PANORÀMIC";
    color: white;
    font-size: 14px;
    text-align: right;
    display: block;
    margin-bottom: 10px;
    width: 100%;
}

.control-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.control-panel-title {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.control-row {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.control-buttons-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-nav-buttons {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 20;
}

.side-nav-left {
    left: 15px;
}

.side-nav-right {
    right: 15px;
}

.black-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out; 
}

.black-overlay.visible {
    opacity: 1;
}

.fullscreen-image {
    background-color: black;
    z-index: 10;
}

.fullscreen-overlay {
    background-color: rgba(0, 0, 0, 0);
    z-index: 15;
}
