/*========================================
  03-LAYOUT.CSS
  Struttura base del sito (immutabile)
==========================================*/

/*========================================
  SEZIONE: WRAPPER E CONTAINER PRINCIPALE
==========================================*/
#wrapper, #container { 
  max-width: 100% !important; 
  overflow-x: hidden !important; }
/*************** LAYOUT FRONTEND **************/
#wrapper {
    text-align: left;
    margin: 0 auto;
   
    width: 930px; /* MISURA FRONTEND */
    background: #b2a293;
    border: 1px solid #000000;
    border-radius: 10px 10px 0 0;
}

#header {
    height: 70px;
    background: url("../images/logo_ready64.png") no-repeat left center;
    background-size: auto 100%; /* Mantiene l'altezza al 100% del container */
    border-radius: 10px 10px 0 0;
    overflow: hidden; /* Taglia ciò che eccede */
}

#navbar {
    display: flex; 
    justify-content: flex-start;
    align-items: center;
    gap: 20px;

    margin: 0;
    background: var(--brown-900);
    min-height: 24px;
   
    background: linear-gradient(to bottom, #aaa6a7 0%,#8a8586 4%,#6b6466 26%,#5d5658 33%,#4b4345 48%,#2c2225 52%,#2c2225 100%); 
    border-top: 1px solid var(--black);
    border-bottom: 1px solid var(--black);
    font-size: 1.1em;
}


#container {
    display: grid;
    grid-template-columns: 168px 1fr 168px;
    gap: 0 5px; /* 0 verticale, 5px orizzontale */
    padding: 0 5px; /* 5px ai lati del container */
}

#leftcolumn {
    background: transparent;
    padding: 0;
    margin: 1px 0;
}

#centercolumn {
    padding: 0;
    margin: 1px 0;
}

#rightcolumn {
    background: transparent;
    padding: 0;
    margin: 1px 0;
}

#footer {
    background: var(--brown-900);
    padding: 4px;
}
/*  FOOTER  */

div#footer {
  padding: 5px 0 5px 0;
  background: #1c1115 url(../images/bg_noise_brown.png);
  border-top: 1px solid #000000;
  color: var(--brown-300);
  height: 120px;
}

#footer h6 {
  padding: 2px 0 2px 6px;
  margin: 1px 0 1px 0;
  font-size: 1em;
  color:  var(--brown-300);
  text-transform: uppercase;
  text-shadow: #000000 1px 1px 0;
}

div#footer-1 {
  float: left;
  width: 150px;
  height: 110px;
  background: url(../images/logo_footer_blue.png) center center no-repeat;
}
div#footer-2,
div#footer-3,
div#footer-4,
div#footer-5 {
  float: left;
  width: 185px;
  height: 110px;
  text-align: left;
  font-size:.8em;
}
div#footer-2 ul,
div#footer-3 ul,
div#footer-4 ul,
div#footer-5 ul {
  text-indent: 0;
  margin-left: 1em;
  padding-left: 0;
}
div#footer-2 li,
div#footer-3 li,
div#footer-4 li,
div#footer-5 li {
  /*list-style:url(../images/li_arrow_brown.png) !important;*/
  list-style-type: none;
}
#footer-bottom {
  clear: both;
  background: #1c1115 url(../images/bg_noise_brown_sf.png) repeat-x;
  overflow: hidden;
  text-align: center;
  color: #6b525a;
  font-size: 0.8em;
}
#footer-bottom-2 {
  clear: both;
  background: #1c1115 url(../images/bg_noise_brown_sf.png) repeat-x;
  overflow: hidden;
  text-align: center;
  color: #6b525a;
  font-size: 0.8em;
}

/*========================================
  03-LAYOUT.CSS - NAVIGAZIONE
  Tab, Pills Menu, Menu Alfabetico, Navbar, Menu Verticale
  
  NOTA: Questa sezione va AGGIUNTA IN FONDO a 03-layout.css
  dopo le sezioni Wrapper, Container, Colonne
==========================================*/

/*========================================
  SEZIONE: NAVIGAZIONE ORIZZONTALE
==========================================*/

/*========================================
  TAB
==========================================*/

ul.tabnav {
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: var(--white);
  position: relative;
  z-index: 10;
}

ul.tabnav li {
  float: left;
  margin: 0 5px 0 0;
  padding: 0;
  list-style: none !important;
}

ul.tabnav a {
  float: left;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  text-decoration: none;
  color: var(--tan);
}

ul.tabnav span {
  float: left;
  padding: 0.6em 12px;
  cursor: pointer;
  color: var(--gray-200);
  width: auto;
  min-width: 145px;
  height: 15px;
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  margin-bottom: -1px;
  display: block;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    #aaa6a7 0%,
    #8a8586 4%,
    #6b6466 26%,
    #5d5658 33%,
    #4b4345 48%,
    #2c2225 52%,
    #2c2225 100%
  );
}

ul.tabnav a.active,
ul.tabnav a:hover {
  background: transparent;
}

ul.tabnav a.active span,
ul.tabnav a:hover span {
  color: var(--white);
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--black);
  border-bottom: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 15;
  background: linear-gradient(
    to bottom,
    #6d4f55 0%,
    #5a4046 4%,
    #483237 26%,
    #3a262b 33%,
    #2e1b20 48%,
    #180f12 52%,
    #180f12 100%
  );
}

.r64-sel-tab {
  width: auto;
  display: inline-block;
  font-size: 14px;
}

.r64-sel-tab span {
  min-height: 35px;
}

.tab {
  position: relative;
  z-index: 5;
  margin-top: -1px;
}

/*========================================
  PILLS MENU
==========================================*/

.r64-pills-menu {
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 5px 0;
  padding: 8px 5px;
  display: flex;
  justify-content: center;
  gap: 5px;
  background: var(--brown-500);
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--black);
  border-top: none;
}

.r64-pills-menu li {
  display: flex;
  align-items: center;
}

.r64-pills-menu a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--brown-700);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease;
}

.r64-pills-menu a:hover {
  background: var(--brown-900);
  color: wheat;
  box-shadow: 0 0 6px #886ce4;
  border: 1px solid var(--black);
}

/*========================================
  MENU ALFABETICO
==========================================*/

.mainbox-alfa {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.alpha-nav {
  display: grid;
  grid-template-columns: repeat(27, 1fr);
  background-color: var(--black);
  border-left: 1px solid var(--black);
  border-right: 1px solid var(--black);
  gap: 1px;
}

.alpha-item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  font-family: Inter, "Courier New", monospace;
  font-size: 14px;
  border-bottom: 1px solid var(--black);
  background-color: var(--brown-700);
  color: #fff !important;
}

.alpha-item:hover {
  background-color: var(--tan);
  color: var(--brown-900);
  text-decoration: none;
}

.alpha-item.active {
  background-color: var(--brown-500);
  color: var(--white);
  font-weight: bold;
}

/*========================================
  NAVBAR
==========================================*/

#navbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  margin: 0;
  min-height: 28px;
  padding: 0;
  background: linear-gradient(
    to bottom,
    #aaa6a7 0%,
    #8a8586 4%,
    #6b6466 26%,
    #5d5658 33%,
    #4b4345 48%,
    #2c2225 52%,
    #2c2225 100%
  );
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 0.9em;
}

.head-title {
  background: url(../../images/gradation_titolo_brown.png) #1c1115;
  padding: 0 0 0 8px;
  text-align: left;
  font-weight: normal;
  height: 28px;
  line-height: 28px;
  flex: 1;
  min-width: 200px;
  border-right: 0;
  white-space: nowrap;
  overflow: hidden;
}

.top-link {
  display: block;
  flex: 0 1 auto;
  min-width: fit-content;
  padding: 0 12px;
  background: linear-gradient(
    to bottom,
    #7f7f7f 0%,
    #555555 4%,
    #2a2a2a 33%,
    #1e1e1e 48%,
    #101010 52%,
    #101010 100%
  );
  text-align: center;
  font-weight: normal;
  height: 28px;
  line-height: 28px;
  color: #fff !important;
  border-left: 1px solid #000;
  white-space: nowrap;
}

.top-link:hover {
  color: #fff !important;
  background: linear-gradient(
    to bottom,
    #dc5c5c 0%,
    #c42a2a 4%,
    #aa2525 15%,
    #911f1f 22%,
    #8b1e1e 26%,
    #6d1818 37%,
    #5b1414 48%,
    #310b0b 52%,
    #310b0b 100%
  );
  text-decoration: none;
}

.top-link-gear {
  position: relative;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    #7f7f7f 0%,
    #555555 4%,
    #2a2a2a 33%,
    #1e1e1e 48%,
    #101010 52%,
    #101010 100%
  );
  height: 28px;
  color: #fff !important;
  border-left: 1px solid #000;
  font-size: 20px;
  cursor: pointer;
}

.top-link-gear:hover {
  background: linear-gradient(
    to bottom,
    #dc5c5c 0%,
    #c42a2a 4%,
    #aa2525 15%,
    #911f1f 22%,
    #8b1e1e 26%,
    #6d1818 37%,
    #5b1414 48%,
    #310b0b 52%,
    #310b0b 100%
  );
}

.top-link-gear-cont {
  display: none;
  position: absolute;
  background-color: #1c1115;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  min-height: 60px;
  min-width: 140px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  right: 0;
  top: 28px;
  text-align: right;
  font-size: 70%;
  padding: 5px;
}

.top-link-gear:hover .top-link-gear-cont {
  display: block;
}

.top-link-gear-cont .hr1 {
  margin: 0;
  border-top: 1px solid;
  color: var(--brown-500);
}

.top-link-gear-cont img {
  vertical-align: middle;
  opacity: 0.8;
}

.top-link-gear-cont img:hover {
  opacity: 1;
}

.top-link::after {
  clear: both;
}

div.mature_toolbar .top-link {
  width: 92px;
}

div.mainbox_mature .top-link-hide,
div.mature_toolbar .top-link-hide {
  display: none;
}

div.mature_toolbar .top-link-mature {
  float: left;
  background: transparent;
  text-align: center;
  font-weight: normal;
  border-left: 1px solid #000000;
  background: linear-gradient(
    to bottom,
    #7f7f7f 0%,
    #555555 4%,
    #2a2a2a 33%,
    #1e1e1e 48%,
    #101010 52%,
    #101010 100%
  );
  height: 28px;
  width: 31px;
  color: #ffffff !important;
  line-height: 26px;
}

div.mature_toolbar .top-link-mature:hover {
  color: #ffffff !important;
  background: url("../../images/gradation_titolo_rosso.png");
  text-decoration: none;
}

div.mature_toolbar .top-link-mature::after {
  clear: both;
}

/*========================================
  MENU VERTICALE SX
==========================================*/

.menu {
  padding: 0;
  margin: 0;
  list-style-type: none;
  width: 100%;
}

.menu li {
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
}

.menu li a {
  display: block;
  text-decoration: none;
  padding: 4px;
  border: 1px solid #000;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--brown-900);
  box-shadow: inset 0 1px 0 0 var(--brown-700);
  border-top: 0;
}

.menu li a:hover {
  background-color: var(--brown-700);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
  color: var(--white);
}

/* Menu admin */
.menu-admin .menu {
  margin: 0 0 0 0 !important;
  z-index: 1;
}

.menu-admin .menu li a {
  width: 100% !important;
  box-sizing: border-box;
}

/* Stile per i titoli dei gruppi (es. News, Libri, Utenti) */
.menu-admin .menu-title {
  font-weight: bold;
  font-size: 0.9em;
  color: var(--brown-300);
  padding: 8px 4px 4px 4px;
  border-bottom: 1px solid var(--brown-700);
  cursor: default;
}

.menu-admin .menu-title:first-child {
  margin-top: 0;
}

.menu-admin .menu-title:hover {
  background: none;
  box-shadow: none;
}

.menu-admin .menu-title {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9em;
  font-weight: bold;
  padding: 8px 4px;
  display: block;
  border-bottom: 1px solid var(--black);
  border-left: 1px solid var(--black);
  border-right: 1px solid var(--black);
  background: var(--brown-500);
  color: var(--white);
  font-size: 1.2em;
}

.menu-admin .menu-title:hover {
  background: var(--brown-500);
}

.menu-admin li:first-child.menu-title {
  margin-top: 0;
}