/* Terminal-style CSS */

body {
  background-color: #000000;
  color: #0078D4;
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 0;
}

a {
  color: #005a9e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #bdf5bd;
}

h1, h2, h3 {
  color: #0078D4;
  border-bottom: 1px solid #333;
  padding-bottom: 0.3em;
}

.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 200px;
  margin-top: 15px;
  margin-left: 15px;
  text-indent: 10px;
  background: #111;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 1rem;
}

.hero {
  position: relative;
  text-align: center;
  color: white;
}

.hero img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 1px solid #444;
}

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.intro-text {
  width: 100% !important;
  max-width: 100% !important;
  margin: 2rem auto;
  text-align: justify !important;
  line-height: 1.6;
  font-size: 1.1rem;
  color: #005a9e !important;
}

.intro-text p {
  text-align: justify !important;
}

.post-preview {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.post-preview img.thumb {
  width: 50px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.post-content {
  flex: 1;
}

.site-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #aaa;
}

.site-footer a {
  color: #aaa;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================================
   Mobile layout
   ============================================ */
@media (max-width: 768px) {

  /* Nascondi sidebar su mobile */
  .sidebar {
    display: none;
  }

  /* Aggiungi spazio per non far coprire il footer mobile */
  .content,
  .main-content {
    padding-bottom: 60px; /* altezza barra mobile */
  }

  /* Header mobile */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #111;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-right: 10px;
  }

  .mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 10px;
    background: #222;
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
  }

  .mobile-menu.open {
    display: flex;
  }

  .mobile-menu a {
    color: white;
    padding: 5px 0;
    text-decoration: none;
  }

  .mobile-menu a:hover {
    text-decoration: underline;
  }

  /* Ridimensiona titolo su mobile */
  .site-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }

  /* Footer visibile solo su mobile */
  .mobile-footer {
    display: flex;
    justify-content: center;
    padding: 10px;
    background: rgba(17, 17, 17, 0.9); /* leggermente traslucido */
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: slideUp 0.3s ease-in-out;
  }

  .mobile-footer a {
    color: #ccc;
    text-decoration: none;
    padding: 0 8px;
  }

  .mobile-footer a:hover {
    color: white;
    text-decoration: underline;
  }

  /* Effetto comparsa del footer */
  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Nascondi footer desktop su mobile */
  .site-footer {
    display: none;
  }
}


/* ============================================
   Desktop layout
   ============================================ */
@media (min-width: 769px) {
  .mobile-footer {
    display: none;
  }
}
