nav, nav ul {
	flex-direction: column;
}

@media (min-width: 576px) {
	nav, nav ul {
		flex-direction: row;
	}
}

.container_burger {
    display: inline-block;
    cursor: pointer;
}

.bar1, .bar2, .bar3 {
    width: 35px;
    height: 5px;
    background-color: #333;
    margin: 6px 0;
    transition: 0.4s;
}

.change .bar1 {
    transform: translate(0, 11px) rotate(-45deg);
}

.change .bar2 {opacity: 0;}

.change .bar3 {
    transform: translate(0, -11px) rotate(45deg);
}

.member_card {
  display: flex;
  gap: 1rem; /* space between img and div */
}

.member_card .img_container {
  width: 20vh; 
  height: 20vh; /* max height relative to viewport height */
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.member_card .img_container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius:10vh;
}

.member_card > div.description {
  border-left: 3px solid var(--pico-primary);
  margin: 0 2% 0 2%;
  width: 80%;
  padding-left: 10px;
}

.member_card > div.description > h1 {
    color: var(--pico-contrast);
}
/* Smooth disappearing thumbs */
/* Hide thumbs on mobile */
@media (max-width: 600px) {
    .member-thumbs {
        display: none !important;
    }
}

/* Smooth disappearing thumbs (desktop only) */
.member-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.member-thumbs img {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--pico-primary);
    flex-shrink: 0;
    filter: grayscale(100%);
    transition: filter 0.2s ease;
}

/* Fade OUT when opening */
details[open] .member-thumbs {
    opacity: 0 !important;
    visibility: hidden; /* Prevents interaction during fade */
    transition: opacity 0.3s ease-out, visibility 0.3s;
}
/* Fade IN when closing */
details:not([open]) .member-thumbs {
    opacity: 1 !important;
    visibility: visible !important;
}

/* end thumbs*/


.flip-container {
  width: 100%;
  height: 100%;
  perspective: 800px;
}

.flipper {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}

.flip-container input {
  display: none;
}

.front, .back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 10vh;
  backface-visibility: hidden;
  object-fit: cover;
}

.back {
  transform: rotateY(180deg);
}

.flip-container input:checked + .flipper {
  transform: rotateY(180deg);
}

details > summary {
    cursor: pointer;
}

details[open] summary {
    margin-bottom: 1rem;
}


details > summary {
    list-style: none;          /* remove default marker */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
details > summary > h1{
    /*list-style: none;          !* remove default marker *!*/
    margin:0;
}

/* Responsive: stack image and description vertically on small devices */
@media (max-width: 600px) {
  .member_card {
    flex-direction: column;
    align-items: center; /* center contents horizontally */
  }
  .member_card .img_container {
    width: 20vh; 
    max-height: 20vh; /* max height relative to viewport height */
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    /* Remove align-content; it's not applicable here */
  }
  .member_card > div.description {
	  border-left: 3px solid var(--pico-primary);
	  margin: 0 2% 0 2%;
	  width: 80%;
	  padding-left: 10px;
	}
}

/* Base layout */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

/* MOBILE */
@media (max-width: 576px) {
    nav {
        flex-wrap: wrap;
        align-items: center;
    }

    #nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 1rem;
    }

    #nav-menu.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }
    #logo {
        display: block;
        margin: 0 auto;
    }
}

/* DESKTOP */
@media (min-width: 577px) {
    #nav-menu {
        display: flex;
        gap: 1rem;
    }
}
/* PRojects*/

/* Remove default disclosure marker */
.project-card summary,
.prize-card summary{
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}
details[name="members"] summary {
    display: flex;
    align-items: center;
    cursor: pointer;
}

details[name="members"] .member-thumbs {
    margin-left: auto;
}



