/*
  Developed by Janni (Ioannis Toptsis).
  You can find the website's source code on my GitHub,
  available under https://github.com/Ioannis-Toptsis
*/

@media (max-width: 1570px), (max-height: 800px) {
  html, body {
    overflow: hidden; /* kein Scrollen auf Mobile */
    touch-action: none; /* keine Touch-Gesten */
  }
}

.mobile-warning {
  display: none;
}

@media (max-width: 1570px), (max-height: 800px) {
  .mobile-warning {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #121212;
    color: white;
    font-size: 1.5rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 9999;
  }

  body > *:not(.mobile-warning) {
    display: none;
  }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    color: white;
}

.screen, .section {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
    background: #121212;
}

h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    font-weight: 600;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.card {
    background: #181818;
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(160, 0, 0, 0.4);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card p {
    color: #aaa;
    font-size: 1.1rem;
}

.card-no-hover {
    background: #181818;
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: left;
    color: inherit;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 500px; /* oder z.B. 400px, wie du magst */
    overflow-y: auto;
    scroll-behavior: smooth;
}

.card-no-hover h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-no-hover p {
    color: #aaa;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-no-hover::-webkit-scrollbar {
    width: 8px;
}

.card-no-hover::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 1rem;
}

.card-no-hover::-webkit-scrollbar-thumb {
    background-color: #e24a4a;
    border-radius: 1rem;
    border: 2px solid #1a1a1a;
    transition: background 0.3s ease;
}

.card-no-hover::-webkit-scrollbar-thumb:hover {
    background-color: #ff5a5a;
}

.section-content {
    max-width: 800px;
    text-align: center;
    max-width: 100vw;
}

.section h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.sidebar {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translate(-100%, -50%);
    flex-direction: column;
    gap: 1rem;
    z-index: 10;
    background: rgba(30,30,30,0.95);
    padding: 1rem;
    border-radius: 0 1rem 1rem 0;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
}

.show-sidebar .sidebar {
    transform: translate(0, -50%);
}

.sidebar a {
    background: #1e1e1e;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background 0.3s, box-shadow 0.3s;
    user-select: none;
}

.sidebar a:hover {
    background: #333;
}

.sidebar a.active {
    background: #e24a4a;
    color: white;
    font-weight: 700;
    box-shadow: 0 0 10px #e24a4a;
}

.language-dropdown {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  user-select: none;
  font-family: 'Inter', sans-serif;
}

.language-btn {
  background: #1e1e1e;
  color: white;
  border: none;
  padding: 0.6rem 2.5rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: large;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

.language-btn:hover {
  background: #e24a4a;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.language-menu {
  display: none;
  flex-direction: column;
  background: #181818;
  margin-top: 0.4rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.language-menu a {
  padding: 0.8rem 1.5rem;
  color: #aaa;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  text-align: center;
}

.language-menu a:hover {
  background: #333;
  color: white;
}

.language-menu.show {
  display: flex;
}

.hub-image {
    max-width: 350px;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.table-container {
  max-height: 400px;  /* maximale Höhe */
  overflow-y: auto;   /* vertikales Scrollen */
  overflow-x: auto;   /* horizontal scroll falls nötig */
  max-width: 1200px;  /* max Breite */
  margin: 0 auto 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  background: #181818;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch; /* für smooth scroll auf iOS */
}

.projectside-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto; /* dynamische Breite */
}

.projectside-table th, .projectside-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.projectside-table thead {
  background: #222;
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 1.0rem;
}

.projectside-table tbody tr:hover {
  background: #333;
  cursor: pointer;
}

/* scrollbar styling wie gehabt */
.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 1rem;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: #e24a4a;
  border-radius: 1rem;
  border: 2px solid #1a1a1a;
  transition: background 0.3s ease;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background-color: #ff5a5a;
}


.status-online {
    color: #4CAF50; /* grün */
    font-weight: 700;
}

.status-offline {
    color: #e24a4a; /* rot */
    font-weight: 700;
}

/* Auslastungsbalken */
.load-bar {
    background: #333;
    border-radius: 1rem;
    overflow: hidden;
    height: 15px;
    width: 100px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.load-bar-fill {
    height: 100%;
    background: #e24a4a;
    transition: width 0.5s ease;
}

.project-search {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 1rem;
    border: none;
    margin-bottom: 2rem;
    background: #1e1e1e;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.linkcard {
  display: inline-block;
  background: #181818;
  border-radius: 1.5rem;
  padding: 1.5rem 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 120px;
  max-width: 100%;
}

.linkcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(160, 0, 0, 0.4);
}

.linkcard h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.linkgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/*
  Developed by Janni (Ioannis Toptsis).
  You can find the website's source code on my GitHub,
  available under https://github.com/Ioannis-Toptsis
*/