
:root{
    scroll-behavior: unset;
    --primary-color: #081e3c;
    --default-font-size: 18px;
    --text-base-font: 'Sarabun', sans-serif;
    --fl-header-h: 140px;  /* altezza della zona sopra il box */
    --fl-footer-h: 105px;  /* altezza della zona sotto il box */
    color-scheme: dark;
}

body { min-height: 100vh; font-size: var(--default-font-size); background-color: #050505; background-image: radial-gradient(ellipse 65% 75% at 78% 30%,#00408a 0%,#003070 30%,#001b45 55%, rgba(0, 10, 30, 0) 80%), linear-gradient(90deg, #050505 0%, #03070f 35%, #001533 100%); background-repeat: no-repeat; background-attachment: fixed; background-size: cover;  font-family: var(--text-base-font) !important; }
body::before { content: ""; display: block; position: absolute; left: 0; top: 50%; width: 500px; height: 500px; opacity: 0.6; background-image: url('../img/fgp_logo_vector_white.svg'); background-size: contain; background-repeat: no-repeat; transform: translate(-15%, -50%); z-index: 0; }
body #home-container::after { content: ""; display: block; position: absolute; right: 0; top: 50%; width: 500px; height: 336px; opacity: 1; background-image: url('../img/deco-computer.png'); background-size: contain; background-repeat: no-repeat; transform: translate(0, -50%); z-index: 0; }
body #contacts-container::after { content: ""; display: block; position: absolute; right: 0; top: 50%; width: 500px; height: 532px; opacity: 1; background-image: url('../img/deco-meeting.jpg'); background-size: contain; background-repeat: no-repeat; transform: translate(0, -50%); z-index: 0; }

body #home-container, body #contacts-container, body #archive-container { padding-top: 8rem; }
body .form-control, body .btn { font-family: var(--text-base-font) !important; }

.text-small { font-size: 0.8rem; }
.text-smaller { font-size: 0.6rem; }
.public-footer { position: fixed; bottom: 0; left: 0; right: 0;  width: 100%; }
.public-footer p.info { margin: 0; padding: 1rem; color: #fff; font-size: 0.7rem; }
.public-footer p.links { position: absolute; right: 0; margin: 0; top: 0; padding: 0 1rem 0.5rem 1rem; color: #fff; font-size: 0.8rem; }
.public-footer p.links a { color: #fff !important; }

/*Home*/
#home-header { display: flex; align-items: end; justify-content: space-between; height: 76px; padding: 0 2rem; }
#home-header .logo { height: 56px; width: auto; display: block; }
#home-header .menu { display: flex; align-items: center; gap: 4rem; margin: 0; padding: 0; list-style: none; }
#home-header .menu-wrapper { flex: 1; display: flex; justify-content: center; }
#home-header .menu .button.btn.btn-primary { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; padding: 0.5rem 0.5rem; background-color: #fff; border: 1px solid #fff; border-radius: 8px; color: #0b1f4b; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; font-size: 0.8rem; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
#home-header .menu .button.btn.btn-primary:hover, #home-header .menu .button.btn.btn-primary:focus { background-color: #dce6f5; border-color: #dce6f5; color: #003a80; }

#file { max-height: 450px; }
.basic-list { padding: 0; list-style: none; }
.view-container { position: absolute; left: 5em; right: 5em; top: 50%; transform: translateY(-50%); }

.nav-main-submenu { padding: 0 1.25rem 0 1.25rem; font-size: 0.8rem; }
.nav-main-submenu input, .nav-main-submenu .form-control { font-size: 0.8rem; }

.scrollable-checkbox-list { max-height: 200px; overflow: auto; padding: 1rem; background-color: #171e28; border-radius: var(--bs-border-radius); }

/*PDF Viewer*/
.reader #home-header { position: fixed; top: 0; left: 0; right: 0; height: 80px; width: 100%; }
.reader .content-header { justify-self: end; }

.pdf-viewer { width: 100%; }
.pdf-viewer #main-container { background-color: #fafafa; padding-top: 0 !important; }
.pdf-viewer-container-wrapper { position: relative; }
.pdf-viewer-container { width: 100%; height: 100%; overflow-y: auto; background-color: transparent; padding: 30px 10px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; scroll-behavior: auto; overflow-y: auto; }
.page-container { position: relative; margin-bottom: 30px; background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: block; }
.pdf-canvas { display: block; z-index: 1; }
.pdf-wrapper { position: relative; }

/*Floating*/
.floating-content-wrapper { min-height: 88vh; display: flex; flex-direction: column; padding: 0 2rem; }
.floating-content { position: relative; width: 100%; max-width: 1600px; margin: auto; height: 78vh; transform: translateZ(0); }
.floating-content #page-container { height: 100%; min-height: 0; overflow: clip; }
.floating-content #main-container { height: 100%; min-height: 0; overflow: clip; }

.floating-sidebar-toggle { position: absolute; top: 0.5rem; right: 0.75rem; z-index: 1040; }

/*PDF Viewer Text layer*/
.textLayer { position: absolute; text-align: start; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; line-height: 1; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; z-index: 2; }
.textLayer span { position: absolute !important; white-space: pre !important; cursor: pointer !important; -webkit-user-select: none; -ms-user-select: none; user-select: none; pointer-events: none; transform-origin: 0% 0% !important; line-height: 1 !important;  font-size: calc(var(--font-height) * var(--scale-factor)) !important; transform: scaleX(var(--scale-x)) !important; color: transparent !important; }
.textLayer br { position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; color: transparent; }
.textLayer ::selection { background: rgba(0, 0, 255, 0.25) !important; }

/*PDF Viewer Page label*/
.pdf-viewer-page-label { position: fixed; top: 0; left: 0; right: 250px; padding: 0.5rem 0; text-align: center; color: var(--bs-body-color); background-color: var(--bs-body-bg); border-bottom: 1px solid var(--bs-body-color); }
.pdf-viewer-page-label p { margin-bottom: 0; }

/*PDF Viewer Fabs and zoom*/
.fab { width: 2.5em; height: 2.5em; position: sticky; z-index: 10; border-radius: 50%; background-color: #007bff; color: #ffffff; border: none; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); transition: background-color 0.3s, transform 0.2s; display: flex; align-items: center;  justify-content: center; }
.fab:hover { background-color: #0056b3; transform: scale(1.05); }
.fab-icon { font-size: 24px; }
.fab.btn-zoom-in { bottom: 6em; }

.zoom-label { visibility: hidden; opacity: 0; color: #171e28; }
.pdf-viewer-controls { text-align: center; position: absolute; bottom: 2em; right: 2em; }
.pdf-viewer-controls:hover .zoom-label { visibility: visible; opacity: 1; }

.search-result-item { padding: 1rem 0; border-bottom: 1px solid var(--bs-primary-border-subtle); }
.search-result-item .search-result-link p { margin-bottom: 0; }
.search-result-item .search-result-link p.search-result-page { margin-bottom: 0.5rem; }

.pdf-page-list-item a { display: block; padding: 0.2rem 0; }

/*PDF Viewer index*/
.index-list { list-style: none; padding: 0; }
.index-list, .index-sublist { list-style: none; }
.index-sublist { padding-left: .75rem; }
.index-item { margin: 2px 0; min-width: 0; }
.index-row { display: flex; align-items: flex-end; padding: 0.2rem 0; min-width: 0; }
.index-title { flex: 0 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; text-decoration: none; color: inherit; }
.index-dots { flex: 1 1 .75rem; min-width: .75rem; border-bottom: 1px dotted #999; margin: 0 6px .3em; }
.index-page { flex: 0 0 auto; white-space: nowrap; min-width: 2.2em; text-align: right; }

.choose-option { position: absolute; top: 50%; left: calc(250px + 4rem); right: 4rem; text-align: center; }


/*ONEUI OVERRIDES*/
html.dark, html.dark #page-container, html.dark #page-loader, html.dark #side-overlay, html.dark #page-container #page-header, html.light, html.light #page-container, html.light #page-loader, html.light #side-overlay, html.light #page-container #page-header { background: transparent; }
#main-container { z-index: 1; }

#page-container { background-color: transparent; color: #fff; }
html.dark, html.dark #page-container, html.dark #page-loader, html.dark #side-overlay { color: #fff; }

.block.block-rounded { border: none; position: relative; z-index: 1; background-color: transparent !important; box-shadow: none !important; background: rgba(2, 12, 37, 0.76) !important; background-image: none !important; border-radius: 28px; backdrop-filter: blur(6px); box-shadow: none; }
#page-container.sidebar-dark #sidebar .content-header, html.dark #page-container #sidebar .content-header, #page-container #sidebar .content-header, .content-header { background-color: var(--primary-color); }
.nav-main-dark .nav-main-link, .page-header-dark #page-header .nav-main-link, .sidebar-dark #sidebar .nav-main-link, html.dark #main-container .nav-main-link, html.dark #page-header .nav-main-link, html.dark #side-overlay .nav-main-link, html.dark #sidebar .nav-main-link { color: #fff; }
.simplebar-scrollable-y, .block-header-default { background-color: var(--primary-color); }
.form-select { font-size: 0.8rem; }


/*MISC*/
.spinner-border { color: var(--primary-color); }
body #check-container { padding-top: 10rem; }
.check-avatar { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); width: 128px; height: 128px; border-radius: 50%; background: #1c2340; color: #fff; font-size: 2.8rem; display: flex; align-items: center; justify-content: center; z-index: 2; }
#page-container.main-content-narrow > #page-header .content-header { width: 100%; background-color: var(--primary-color); }

.block-content { color: #ffffff; }
button.index-modal { background: none; border: none; color: #fff; }

@media (max-width: 1200px) {
  body::before { opacity: 0; }
  body #home-container::after { display: none; }
  body #contacts-container::after { display: none; }
  .public-footer p.info { display: block; position: relative ; padding: 1rem 1rem 0 1rem;}
  .public-footer p.links { display: block; position: relative; }
}

@media screen and (max-width: 991px) {
  body #home-container, body #contacts-container, body #archive-container { padding-top: 2rem; }

  #home-header { flex-direction: column; height: auto; padding: 1rem; gap: 1rem; }
  #home-header .menu-wrapper { margin-left: 0; }
  #home-header .menu { flex-wrap: wrap; justify-content: center; gap: 0.75rem; } 

  .pdf-viewer-page-label { right: 0; }
  .floating-content { margin: 3vh 0; height: 70vh; overflow: clip; }

  #home-header { align-items: center; }

  body #check-container { padding-top: 6rem; }

  .check-avatar { width: 72px; height: 72px; font-size: 1.5rem; }

  #page-container.sidebar-dark #sidebar .content-header, html.dark #page-container #sidebar .content-header, .content-header { justify-content: start; }

  #page-container { min-height: auto; }
  .pdf-viewer-container { overflow: auto; align-items: flex-start; scroll-behavior: auto; }
  .page-container { margin: 0 auto 30px auto; }
  .choose-option { left: 4rem; }
}