@import url("https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@400;500;600&display=swap");

:root {
  --accent: #007aff;
  --bg-1: #eef3f9;
  --bg-2: #fdfdfd;
  --card-bg: #ffffff;
  --muted: #666;
}

/* ######TEMPORÄRE LÖSUNG####### */
.card-footer button{
  display: none;
}
/* ######TEMPORÄRE LÖSUNG####### */

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  margin: 0;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 40;
}
h1 {
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
}
#datetime {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  color: var(--muted);
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: flex-end;
}
#time {
  font-size: 1.15rem;
  font-weight: 600;
  color: #222;
}
#date {
  font-size: 0.9rem;
}

/* Controls */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 0.8rem 2rem;
  gap: 1rem;
}

.controls-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.controls-right {
  display: flex;
  align-items: center;
}

/* Mobile Suche oben */
.mobile-search {
  display: none;
}

.mobile-search input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

/* Checkbox Filters */
.language-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.lang-item:hover {
  background: #f2f2f2;
}
.lang-item input {
  width: 16px;
  height: 16px;
}

/* Suchleiste */
#search,
#search-desktop {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border 0.2s;
  min-width: 180px;
  font-size: 1.1rem;
}
#search:focus,
#search-desktop:focus {
  border-color: var(--accent);
}

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-toggle {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s;
}
.dropdown-toggle:hover {
  background: #f2f2f2;
}
.dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #333;
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s;
}
.dropdown.open .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  min-width: 160px;
  z-index: 10;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-menu li {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.dropdown-menu li:hover {
  background: #f2f2f2;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

main .project-grid {
  padding-bottom: 5.5rem;
}

/* Card */
.project-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.image-container {
  width: 100%;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: filter 0.28s ease;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #111;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.project-card:hover .overlay {
  opacity: 1;
}
.project-card:hover img {
  filter: blur(4px);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
}

.mobile-info-btn{
  display: none;
}

.project-card h2 {
  margin: 0;
  font-weight: 500;
  font-size: 1rem;
}

/* Buttons */
.mobile-info-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.mobile-info-btn:active,
.mobile-info-btn.active {
  background: #005cd6;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 1);
  /* background: rgba(255, 255, 255, 0.92); */
  /* backdrop-filter: blur(6px); */
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
  z-index: 50;
}

/* Responsive Layouts */
@media (max-width: 1300px) {
  .project-grid {
    grid-template-columns: repeat(4, 1fr);
    margin: 0 2rem;
  }
}

@media (max-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-card-link:hover{
    transition: inherit;
  }
}

@media (max-width: 800px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-card img {
    aspect-ratio: 3 / 2; /* 600x400 */
    height: auto;
  }
  .project-card:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  }
  .desktop-only {
    display: none;
  }
  .mobile-search {
    display: block;
    width: 100%;
  }
}
@media (max-width: 1250px) {
  .desktop-only {
    display: none;
  }
  .mobile-search {
    display: block;
    width: 100%;
  }
  .mobile-info-btn{
    display: block;
  }

  .project-card:hover {
    transform: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04) !important;
  }

  .project-card:hover .overlay {
    opacity: 0 !important;
  }

  .project-card:hover img {
    filter: none !important;
  }

  footer .right{
    display: none;
  }
}

@media (max-width: 700px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  #search {
    font-size: 1.1rem;
  }
  footer .right {
    display: none;
  }
}