/* ---- Body/Hintergrund: bleibt wie gehabt ---- */
body {
    background-image: url('pictures/projektehintergrundrechtsoben.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    animation: parallaxEffect 30s infinite linear;
  }
  
  .filter-bar {
    top: 4rem;
    z-index: 50;
    backdrop-filter: blur(6px);
  }
  
  .filter-tabs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
  
  .filter-btn {
    position: relative;
    appearance: none;
    border: none;
    background: transparent;
    padding: 0.5rem 0.25rem;
    font: inherit;
    cursor: pointer;
    color: #4a4a4a;
    transition: color 180ms ease;
  }
  
  .filter-btn,
  .filter-btn:visited,
  .filter-btn:hover,
  .filter-btn:focus {
    text-decoration: none; /* entfernt die Standard-Unterstreichung bei Links */
  }

  .filter-btn:hover { color: #000; }
  
  .filter-btn.active {
    color: #000;
  }
  
  .filter-btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 3px;
    width: 0%;
    background-color: #fe82f0;
    transition: width 220ms ease;
  }
  
  .filter-btn.active::after {
    width: 100%;
  }
  
  /* ---- Projekte-Grid ---- */
  .projects-wrap {
    max-width: 1200px;
    margin: 2rem auto 4rem auto;
    padding: 0 1rem;
  }
  
  .projects-grid {
    display: grid;
    gap: 1.25rem;
    /* Desktop 4 Spalten */
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Tablet/kleinere Screens */
  @media (max-width: 1100px) {
    .projects-grid { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 800px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 520px) {
    .projects-grid { grid-template-columns: 1fr; }
  }
  
  /* ---- Karte ---- */
  .project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    transition: opacity 180ms ease;
    opacity: 1;
  }
  
  .project-card:hover .card-media img {
    transform: scale(1.05); /* leichtes Vergrößern */
  }
  
  /* Media 3:4 */
  .card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 5;  
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    background: linear-gradient(135deg, #f6f7f9, #eceff3);
  }
  
  .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 220ms ease;
  }

  /* Titel */
  .card-title {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 400;
    margin: 0;
    padding: 0.85rem 0.95rem 1rem 0.95rem;
    color: #222;
  }
  
  /* ---- Ein-/Ausblenden fürs Filtern ---- */
  .project-card.hidden-by-filter {
    display: none !important; /* nimmt die Karte komplett aus dem Grid, überstimmt AOS inline styles */
  }
  
  /* optional „reveal“ Kick beim Einblenden */
  .project-card.reveal {
    animation: revealIn 220ms ease-out;
  }
  @keyframes revealIn {
    from { opacity: 0; transform: translateY(4px) scale(0.99);}
    to   { opacity: 1; transform: translateY(0) scale(1);}
  }
  
  /* ---- AOS: etwas softer ---- */
  [data-aos] {
    transition-property: transform, opacity !important;
  }

  /* ===== NEU: animierter/aktiver Unterstrich bei Projekt-Titeln ===== */
  .project-card .card-title {
    position: relative;
    display: inline-block;          /* Strich richtet sich nach Textbreite */
    text-decoration: none;
  }

  .project-card .card-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;                       /* Start ohne Strich */
    background-color: #fe82f0;      /* Pink wie Navbar */
    transition: width 180ms ease;   /* schnelle, saubere Animation */
  }

  /* Hover: fährt den Strich ein */
  .project-card:hover .card-title::after {
    width: 100%;
  }

  /* Aktiv (dauerhaft unterstrichen) – via Klasse oder aria-current */
  .project-card.active .card-title::after,
  .project-card[aria-current="page"] .card-title::after {
    width: 100%;
  }
/* Kategorien oben: animierter Unterstrich wie im Beispiel */
.filter-tabs .filter-btn {
    position: relative;
    display: inline-block;
    text-decoration: none;        /* Standard-Unterstreichung aus */
  }
  
  .filter-tabs .filter-btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;                 /* Abstand unter dem Text */
    height: 2px;
    width: 0;                     /* Start: kein Strich */
    background-color: #fe82f0;
    transition: width 0.4s ease;  /* wie dein Beispiel */
  }
  
  /* Hover: Strich fährt ein */
  .filter-tabs .filter-btn:hover::after {
    width: 100%;
  }
  
  /* Aktiv: Strich dauerhaft, mit kurzer Einfahr-Animation beim Laden */
  @keyframes filterTabsUnderlineGrow {
    from { width: 0; }
    to   { width: 100%; }
  }
  .filter-tabs .filter-btn.active::after,
  .filter-tabs .filter-btn[aria-current="page"]::after {
    animation: filterTabsUnderlineGrow 0.4s ease forwards;
  }
  

  