@import url("root.css");

/* ----------------------------------------
   Font personalizzato
-------------------------------------------*/
@font-face {
  font-family: 'MyPixelFont1';
  src: url('../font/PixelatedEleganceRegular-ovyAA.ttf') format('truetype');
}

@font-face {
  font-family: 'MyPixelFont2';
  src: url('../font/CiGamedevRegular-ovq3z.ttf') format('truetype');
}

@font-face {
  font-family: 'MyPixelFont3';
  src: url('../font/PixeloidMono-d94EV.ttf') format('truetype');
}
/*primario*/
@font-face {
  font-family: 'MyPixelFont4';
  src: url('../font/PixeloidSans-mLxMm.ttf') format('truetype');
}

@font-face {
  font-family: 'MyPixelFont5';
  src: url('../font/PressStart2P-vaV7.ttf') format('truetype');
}

@font-face {
  font-family: 'MyPixelFont6';
  src: url('../font/RasterForgeRegular-JpBgm.ttf') format('truetype');
}

@font-face {
  font-family: 'MyPixelFont7';
  src: url('../font/RetroByte.ttf') format('truetype');
}




body, h1, h2, h3, p, a, li {
  font-family: 'MyPixelFont4', cursive;
  line-height: 1.2;
  
  /* Disabilita il font smoothing per un effetto più grezzo --> serve alla pixelart*/
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;

}


/* ----------------------------------------
   Body - Sfondo statico
-------------------------------------------*/
body {
  image-rendering: pixelated; /* Mantiene l'effetto pixel art */
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  margin: 0;
  height: 100vh;
  background: url("../img/Back.png") center fixed;
  background-size: cover;
  overflow: hidden; /* Impedisce lo scrolling dell'intera pagina */
  color : var(--color-7);
}

.tab-container .is-foto > img
{
  image-rendering: auto; /* renderizza le immagini normalmente */
  object-fit: contain;
}

a {
  color: var(--color-5);
  text-decoration: none;
}

a:hover {
  color: var(--color-6);
}

strong {
  color: var(--color-5);
  font-weight: bold; /* opzionale, Bulma già lo imposta */
}


/* ----------------------------------------
   Container centrale (la "tab")
-------------------------------------------*/
.tab-container {
  width: 90%;
  max-width: 800px;
  height: 90vh;
  margin: 5vh auto; /* Centra verticalmente e orizzontalmente */
  background: rgba(240, 234, 210, 0.95); /* Colore di sfondo */
  overflow-y: auto; /* Abilita lo scrolling interno */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  padding: 0px 10px 0 10px;
  image-rendering: pixelated; /* Mantiene l'effetto pixel art */
  
  /* Impostazioni per il bordo SVG */
  border: solid transparent;
  border-width: 36px 4px 8px 4px; /* In alto, destra, basso, sinistra */
  border-image-source: url("../img/tab256.svg") ;
  border-image-slice: 11 1 2 1; /* Adatta questo valore in base al disegno originale */
  border-image-outset: 3px;
  border-image-repeat: round;
}


/* ----------------------------------------
   Sezione
-------------------------------------------*/
.section {
  padding: 0;
  min-height: 50vh;
}

.section.p404{
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ----------------------------------------
   Breadcrumb di navigazione
-------------------------------------------*/
.breadcrumb {
  background-color: var(--color-2);
  border-radius: 4px;
  padding:0.5rem 0 0.5rem 0;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-text-dark);
  transition: color var(--transition-duration);
}

.breadcrumb a:hover {
  color: var(--color-4);
}

.breadcrumb li.is-active a {
  color: var(--color-4) !important;
}

/* ----------------------------------------
   Titoli
-------------------------------------------*/
.title {
  color: var(--color-text-dark) !important;
}

/* ----------------------------------------
   Header: logo e titolo
-------------------------------------------*/
header {
  border-bottom: 2px solid var(--color-3);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* Permette al titolo di andare a capo */
  gap: 0.5rem;
}

header h1 {
  text-rendering: auto;
  color: var(--color-text-dark);
  font-family: 'MyPixelFont7';
  font-size: 4rem;
  transform: translateY(13px);
}

.logoE.image.mr-2 
{
  /* Impostazioni per il bordo SVG */
  border: solid transparent;
  border-width: 30px 15px 3px 15px; /* In alto, destra, basso, sinistra */
  border-image-source: url("../img/iconCornice.svg") ;
  border-image-slice: 7 4 1 4; /* Adatta questo valore in base al disegno originale */
  width: 158px;
}

/* ----------------------------------------
   Icone social e pulsanti
-------------------------------------------*/
.hover-img{
  transform: scale(2);
}
/* Effetto hover specifico per ogni social */
.hover-img.instagram:hover {
  content: url('../img/icone/InstagramHover.png');
}
.hover-img.github:hover {
  content: url('../img/icone/GitHubHover.png');
}
.hover-img.linkedin:hover {
  content: url('../img/icone/LinkedinHover.png');
}

/* Classe per disabilitare l'hover quando necessario */
.no-hover .hover-img:hover {
  content: none; /* Disattiva il cambio immagine */
}


.columns.is-mobile.is-multiline.is-centered {
  gap: 2rem;
}
.pixel-button {
  display: inline-flex; 
  align-items: center; 
  text-align: center;
  justify-content: center; 
  flex-wrap: wrap; 

  padding: 16px 4ch; /* ch: unità che dipende dalla larghezza dei caratteri  */
  
  background-image: url('../img/Button32x16.png'); 
  background-size: 100% 100%;
  background-repeat: no-repeat;
  
  /*dimesioni di default*/
  min-width: 96px; 
  height: auto; 
  
  font-size: 14px; /* Dimensione testo adattabile */
  color: var(--color-text-dark);
  text-decoration: none;
  text-shadow: 2px 2px var(--color-text-light);
  
  border: none; /* Nessun bordo */
  cursor: pointer; /* Effetto click */
  
  margin: 2rem 0;

  transition: transform 0.2s ease-in-out; /* Animazione fluida */
}

.pixel-button:hover {
  background-image: url('../img/Button32x16Hover.png'); 
}

/* per dimensioni del bottone */
.btn-small {
  max-width: 160px; /* limita la dimensione massima */
}

.btn-medium {
  max-width: 192px;
  min-height: 64px;
}
/* ----------------------------------------
   Icone categorie
-------------------------------------------*/

.categ.tabs.is-centered ul li a{
  gap: 3%;
  color: var(--color-6);
}

.categ.tabs.is-centered ul li a:hover {
  border-bottom-color: var(--color-3);
}

.categ.tabs.is-centered .is-active a{
  color: var(--color-4) !important;
  border-bottom-color: var(--color-3) !important;
}

.sideIcon
{
  transform: translateY(7px);
}

/* ----------------------------------------
   Sezione coppie testo-immagine 
-------------------------------------------*/
/* Ordine normale: testo - immagine */
.project-row {
  flex-direction: row;
}

/* Inversione desktop: immagine - testo */
@media screen and (min-width: 769px) {
  .project-row.reverse {
    flex-direction: row-reverse;
  }
}

/* ----------------------------------------
   Timeline
-------------------------------------------*/
/* Rimuove la necessità di style="height: 100%;" */
.card.has-text-centered.is-flex.is-flex-direction-column.is-justify-content-space-between {
  height: 100%;
  background-color: rgba(240, 234, 210, 0.95);
  border: 3px solid var(--color-5);
}

/* Gestione delle immagini GIF */
.card-content .image img {
  max-width: 100%;
  height: auto;
}

/* Migliore gestione del titolo */
.card .title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  flex-grow: 1;
}


/* ----------------------------------------
Progetti
-------------------------------------------*/
.no-margin{
  margin : 0 !important;
}
.project-container{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1rem));
  gap: 1.5rem;
  padding: 20px;
  justify-content: center;
}

.project-card {
  background-image: url("../img/Frame.png");
  background-size: 100% 100%;
  padding: 55px 15px 15px 15px;
  width: 288px;
  height: 288px;
  position: relative;
}

.project-card .pixel-button {
  position: absolute;
  bottom: 15px;
  margin: 0;
  padding: 16px 2ch;
}

.image.is-3by2 {
  object-fit: contain;
}

.project-card .title {
  margin-bottom : 0.5rem;
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------
   Galleria
-------------------------------------------*/

#gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.thumb {
  cursor: pointer;
  padding: 5px;
}

.thumb img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease-in-out;
}

.thumb img:hover {
  transform: scale(1.1);
}


.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: row;
  z-index: 1000;
}

.lightbox img {
  max-width: 80%;
  max-height: 80%;
}

/* Pulsanti per navigare */
.bottonePop {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
}

#btnPopSX {
  left: 20px;
}

#btnPopDX {
  right: 20px;
}

/* Pulsante di chiusura */
.bottoneChiusura {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}
/* ----------------------------------------
   Profile pixel
-------------------------------------------*/
.profile-pic {
  object-fit: cover !important; 
  }
  
  /* ----------------------------------------
  Card Chi-sono
  -------------------------------------------*/
/* Wrapper layout fisso */
.who-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Riga con due card affiancate */
.who-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

/* Card regolare */
.project-card.who {
  width: 288px;
  height: 288px;
}

/* Card centrale più grande */
.project-card.big-card {
  width: 352px;
  height: 352px;
  padding: 60px 15px 15px 15px;
}

/* Contenuto interno */
.project-card.who .card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  height: 100%;
  padding: 0;
  text-align: center;
}

.project-card.who .card-content .image img {
  width: 64px;
  height: auto;
}

.who .title {
  flex-grow: 0;
}

/* ----------------------------------------
   Form di Contatto con Sfondo Pixel Art
-------------------------------------------*/
/*bulma automaticamente imposta il border-radius degli input*/
/* Contenitore del form con uno sfondo personalizzato */
.contact-form-box {
  background: url("../img/bgForm.png") no-repeat center center;
  background-size: 100% 100%;
  min-width: 384px;
  min-height: 608px;
  padding: 64px 20px;
}

.contact-form-box * {
  color: var(--color-text-dark) !important;
}
/* Input personalizzati con sfondi pixel art */
.custom-input {
  background-color: var( --color-text-light);
  border: 2px solid var(--color-5);
  border-radius: 0px;
  padding: 10px;
}

/* // format per specificare un solo campo
.custom-input[name="email"] {
  background: url("../assets/img/bg-email.png") no-repeat center center;
  background-size: cover;
  border: 2px solid var(--color-5);
  font-family: 'MyPixelFont4', cursive;
  padding: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}*/

/* Textarea con uno sfondo diverso */
.custom-textarea {
  
  background-color: var( --color-text-light);
  border: 2px solid var(--color-6);
  border-radius: 0px;
  padding: 10px;
}

.custom-input, .custom-textarea {
  font-family: 'MyPixelFont4' ;
  font-size: 1.3rem;
}

.custom-input::placeholder, .custom-textarea::placeholder{
  color : var(--color-6) !important;
}

::placeholder {
  color: var(--color-6);
  opacity: 0.5;
}

/* Focus sugli input */
.custom-input:focus,
.custom-textarea:focus {
  border-color: var(--color-6);
  box-shadow: 0 0 5px var(--color-6);
  outline: none;
}

/* Pulsanti personalizzati */
.custom-button {
  background-color: var(--color-3);
  border: 2px solid var(--color-5);
  color: var(--color-text-light);
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-family: 'MyPixelFont4';
  padding: 8px 20px;
  border-radius: 4px;
}

/* Hover sui pulsanti */
.custom-button:hover {
  background-color: var(--color-4);
  cursor: pointer;
}
/* ----------------------------------------
   Footer
-------------------------------------------*/
footer {
  background-color: var(--color-2);
  border-top: 2px solid var(--color-3);
  padding: 1rem;
  margin-top: 2rem;
  text-align: center;
  color: var(--color-text-dark);
  font-size: 0.9rem;
}

footer a {
  color: var(--color-4);
  transition: color var(--transition-duration);
}

footer a:hover {
  color: var(--color-3);
}

/* Footer */
.site-footer {
  padding: 1rem 0;
  font-size: 0.9em;
  border-top: 2px solid var(--color-3);
}

.footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

footer p {
  margin-bottom: 0 !important;
}

.footer-row p {
  margin: 0 !important;
}

.coffee-icon img {
  height: 4em;
  transform: translateY(-5px);
}

.credit-link a {
  font-size: 0.85em;
  display: inline-block;
}


/* ----------------------------------------
   Nasconde la scrollbar in Chrome, Safari e Opera
-------------------------------------------*/
.tab-container::-webkit-scrollbar {
  display: none;
}

/* ----------------------------------------
   Media Query per Mobile View
-------------------------------------------*/
@media screen and (max-width: 768px) {

  .tab-container{
    border-image-source: url("../img/tab128.svg") ;
  }

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header h1 {
    line-height: 1; /* Spazio verticale ridotto tra le parole */
    font-size: 3rem; 
    transform: translateY(0px);
  }

  .logoE.image.mr-2 {
    margin-right: 0; /* Rimuovi margine se non serve in colonna */
    margin-bottom: 0.5rem;
  }

  /* ----------------------------------------
   Sezione coppie testo-immagine 
  -------------------------------------------*/
  .project-row {
    flex-direction: column;
  }
  .project-row.reverse {
    flex-direction: column;
  }


  .contact-form-box {
    min-width: 320px;
  }

  .custom-button {
    width: 100%;
    margin-bottom: 10px;
  }

  .project-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 20px;
  
  }

  .pixel-button {
   margin: 1rem 0;
  }

  .project-card {
    width: 288px;
    height: 288px;
  }

  /* Card responsive chi-sono su mobile */
  /* Responsive layout per la sezione Chi Sono */
  .who-row {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .project-card.who {
    width: 100%;
    max-width: 320px;
    height: auto;
    min-height: 320px;
  }

  .project-card.big-card {
    width: 100%;
    max-width: 320px;
    height: auto;
    min-height: 320px;
  }

  .project-card .card-content {
    padding: 1rem;
  }


}