/* === CANVAS CURSOR === */
canvas {  
  cursor: grab;  
}
canvas:active {				
  cursor: grabbing;
}

/* === INFO LAYER === */
.info_leyer {   
  position: absolute;  
  top: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;          
  z-index: 10;
}

#info-white {
  width: 160px;
  height: 30px;  		
  z-index: 999;
}

#info-white p {  
  color: white;  
  text-align: center; 
  font-size: 12px;
  font-weight: 400;		
}

/* === PAGE CONTAINER === */
.page-container {  
  width: 100%;
  height: 86vh;
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;   
  align-items: center;  
}

/* === FULLSCREEN VIDEO CONTAINER === */
.video-container-full { 
  position: absolute;  
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;   
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: -1; /* Behind content */
}

.video-container-full video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === IFRAME FULLSCREEN === */
iframe {
  width: 100%; 
  height: 100vh;  
}

.home-text {  
  width: 70%;
  height: 80vh;
  flex-direction: column; 
  justify-content: space-between;
}

.home-title{ 
  width: 100%;
  margin-left: 0%;
  height: 20%;
  align-items: center;  
}

.home-title h1 {  
  font-style: italic;     
  font-size: 60px;    
  font-weight: 800; 
  line-height: 50px; 
}

.home-title h2 { 
  font-style: italic;            
  font-size: 30px;     
  font-weight: 800; 
  line-height: 30px; 
}

.home-paragraph {
  width: 100%;
  height: 80%;
  display: flex;
  justify-content: center; 
  align-items: center;
}

.home-paragraph p {  
  font-size: 24px;
  line-height: 30px;
}

/* === SCROLLING === */
.scrolling {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  bottom: 106px;
}

/* === BUTTON CONTROLS === */
.button-controls {
  width: 90%;
  position: absolute;
  display: flex;
  bottom: 40px;
  align-items: center;
  justify-content: right;
  z-index: 1;
}

#btn-pause button,
#btn-camera button,
#btn-audio button {
  background-color: rgba(255, 255, 255, 0);
  color: white;
  border: 1px solid white;
  width: 70px;
  height: 20px;
  margin-right: 10px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 100;    
  transition: all 0.2s ease;
}

#btn-pause button:hover,
#btn-camera button:hover,
#btn-audio button:hover {
  cursor: pointer;
  border-color: rgb(162, 255, 0);
  color: rgb(162, 255, 0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .text-container {
    width: 80%;
  }
}

@media (max-width: 724px) {

  .home-text {
    width: 90%;
    height: 80vh;    
  }

  .home-title {
    margin-bottom: 0px;
  }

  .home-title h1 {
    font-size: 40px;
    line-height: 36px;
  }

  .home-title h2 {
    font-size: 20px;
  }

  .home-paragraph {
    height: 90%;
    margin-top: 0px;
  }

  .home-paragraph p {
    font-size: 19px;
    line-height: 21px;
  }

  .text-container {
    width: 100%;
    font-size: 18px;
    line-height: 22px;
  }

  .video-container-full {
    width: 100vw;
    height: 100vh;
  }
}

@media (max-width: 724px) {
  .video-container-full {
    position: absolute;  /* invece di fixed */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: -1;
  }

  .video-container-full video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.menu li {
  position: relative;
}

.menu > li {
  overflow: visible;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: black;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 999;
  min-width: 160px;
}

.submenu li {
  border-bottom: 1px solid #333;
}

.submenu li a {
  background-color: black;
  display: block;
  padding: 10px 15px;
  color: #a2ff00;
  text-decoration: none;
  font-size: 12px;
}

.submenu li a:hover {
  background-color: #222;
}

.menu li:hover .submenu {
  display: block;
}

@media (max-width: 724px) {
  .menu {
    /* background-color: rgba(255, 0, 162, 0.8); */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding-top: 80px;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    display: none;
  }
  #menu-toggle:checked ~ .menu {
    display: flex;
  }

  #menu-toggle ~ .menu > li {
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .menu > li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #222;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.5em 0;
    color: white;
  }

  .menu > li > a {
    display: block;
    width: auto;
    padding: 1em;
    font-weight: 500;
    color: #a2ff00;
    text-decoration: none;
  }

  .menu li:hover .submenu {
    display: block;
  }

  .menu-button-container {
    display: flex;
  }

  /* === SOTTOMENU === */
  .menu li .submenu {
    display: none;
    position: static;
    width: 70%;
    flex-direction: column;
    background-color: #000000;
    margin-left: 90px;
  }

  .menu li.open .submenu {
    
    display: flex;
  }

  .submenu li {
    
    width: 100%;
  }

  .submenu li a {    
    display: block;
    width: 70%;
    padding: 10px;
    font-size: 14px;
    color: #a2ff00;
    background-color: #2a2a2a;
    text-align: center;
    text-decoration: none;
  }

  .submenu li a:hover {
    background-color: #2a2a2a;
  }

  /* === HEADER === */
  header {
    height: 40px;
  }

  header img {
    content: 'images/logo2.jpg';
    width: 40px;
  }
}


@media (max-width: 724px) {

  /* evita il "vuoto" creato da space-between */
  section .home-text{
    justify-content: flex-start !important;
    gap: 20px; /* controlla qui lo spazio fra titolo e testo */
  }

  /* rimuove altezze forzate che generano spazio inutile */
  section .home-title{
    height: auto !important;
    margin-bottom: 0 !important; /* override del margin-bottom:20px di style.css */
  }

  section .home-paragraph{
    height: auto !important;
    margin-top: 0 !important;
  }

  /* opzionale: riduce ulteriormente lo stacco fra h1 e paragrafo */
  section .home-title h1{ margin: 0 0 4px 0; }
  section .home-title h2{ margin: 0; }
}