/*about sektion*/

.about,
.about-img{
  overflow: visible;
}

.about{
    display: flex;
    align-items: flex-start;
    gap: 3rem;

    width: min(1300px, 90%);
    margin: 0 auto 5rem;
    max-width: 1300px;

    justify-content: space-between;
    flex-wrap: nowrap;
    padding: clamp(2rem, 5vw, 4rem) 0;
    
}

.about-img{
  flex: 0 0 48%;
  max-width: 48%;
  padding: 0;

  position: relative;
  min-height: clamp(360px, 45vw, 520px);
}

/* fælles */
.img-card{
  position: absolute;
  z-index: 1;
  /* isolation: isolate; */
}


/* billedet */
.img-card img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Billede 1: venstre, stående */
.img-1{
  left: 0;
  top: 70px;

  width: clamp(150px, 17vw, 250px);
  aspect-ratio: 6/7;
}

/* Billede 2: øverst, liggende*/
.img-2{
  left: 58%;
  top: 0;

  width: clamp(200px, 22vw, 400px);
  aspect-ratio: 15/10;

  transform: translateX(-10%);
}

/* Billede 3: nederst, stående */
.img-3{
  left: 46%;
  top: 280px;

  width: clamp(150px, 17vw, 250px);
  aspect-ratio: 6/7;

  transform: translateX(-5%);
}

.photo{
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
  object-fit: cover;

  z-index: 1;
}

/*flip cards-----------------------------*/

.img-card:focus-within .flip-card-inner{
    transform: rotateY(180deg);
}

.img-card .flip-card{
  width: 100%;
  height: 100%;
  perspective: 1000px;
  position: relative;
}

.img-card .flip-card-inner{
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.6s;
}


.img-card:hover .flip-card-inner{
  transform: rotateY(180deg);
}

.img-card .flip-card-front,
.img-card .flip-card-back{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* front */
.img-card .flip-card-front{
  background: var(--color-surface);
}


.img-card .flip-card-front .photo{
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* back */
.img-card .flip-card-back{
  transform: rotateY(180deg);
  background: var(--color-surface);
  padding: clamp(0.4rem, 0.25rem + 0.8vw, 0.9rem);
  text-align: center;
}

.img-card .flip-card-back p{
  margin: 0;
  color: #fff;
  font-size: clamp(0.72rem, 0.45rem + 0.7vw, 1rem);
  line-height: clamp(1rem, 0.8rem + 0.6vw, 1.4rem);
  padding: clamp(0.45rem, 0.3rem + 0.6vw, 0.9rem);
}

/* Flip når kortet har klassen is-flipped */
.img-card.is-flipped .flip-card-inner{
    transform: rotateY(180deg);
}

/* Hover flip kun på devices med “rigtig” hover (desktop, touchpad) */
@media (hover: hover) and (pointer: fine){
    .img-card:hover .flip-card-inner{
        transform: rotateY(180deg);
    }
}

/*about indholdet til højre*/

.about-content{
    flex: 0 1 40%;
    padding: 0;
    max-width: none;
    min-width: 0;
}

.about-content h2{
    margin-bottom: 4rem;
}

.about-content p{
    margin-top: 1rem;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.6;
}

.about-values{
    display: flex;
    gap: 2rem;
    padding-top: 4rem;
    justify-content: space-between;
}

.about-values p{
    color: var(--color-surface);
}

.value{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
}

.value img{
    width: 60px;
    height: 60px;
    object-fit: contain;
}



@media (max-width: 920px){
  .about{
    gap: 2rem;
    width: 90%;
    }

  .about-img{
    flex: 0 0 50%;
    max-width: 50%;
    min-height: 420px;
    }


  .img-1{ top: 60px; }
  .img-2{ left: 60%; }
  .img-3{ top: 240px; left: 48%; }

  .about-content h2{
    margin-bottom: 2rem;
    }

    .img-card{
        border-radius: 16px;
    }

    .img-card .flip-card-back{
        padding: 0.5rem;
    }

    

  .about-values{
    flex-wrap: wrap;
    justify-content: flex-start;
    }
}

@media (max-width: 600px){
    .about{
        flex-direction: column;
        align-items: center;
        width: 90%;
        gap: 2rem;
        padding: 2rem 0;
    }

    .about-img{
        width: 100%;
        max-width: 420px;
        min-height: 360px;
    }

    .about-content{
        width: 90%;
    }

    .about-values{
        justify-content: center;
        padding-top: 2rem;
    }

    .img-card{
        border-radius: 16px;
    }

    .img-card .flip-card-back{
        padding: 0.5rem;
    }

    

  /* Collage: centrér og gør det mere samlet */
    .img-1{
        left: 0;
        top: 150px;
        width: clamp(140px, 40vw, 190px);
    }

    .img-2{
        left: 55%;
        top: 0;
        width: clamp(200px, 55vw, 320px);
        transform: translateX(-50%);
    }

    .img-3{
        left: 70%;
        top: 210px;
        width: clamp(140px, 40vw, 190px);
        transform: translateX(-50%);
    }
}



/*--------------------om mig side---------------------*/


.about-section{
    width: min(1100px, 90%);
    margin: 2rem auto 4rem;
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 3vw, 2rem);
}

.about-item{
    display: grid;
    grid-template-columns: clamp(260px, 30%, 360px) 1fr;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;

    padding: clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 18px;

    background: var(--color-card);
    border: 1px solid var(--color-text-primary) 12%, transparent;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.about-media{
    display: grid;
    place-items: center;
    padding: 0.75rem;
    border-radius: 16px;
}

.about-media img{
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.about-text h2{
    margin: 0 0 0.6rem 0;
    color: var(--color-text-secondary);
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
}

.about-text p{
    margin: 0.6rem 0 0 0;
    color: var(--color-text-primary);
}

/* Skifte side på hvert andet kort (giver dynamik men stadig roligt) */
.about-item:nth-child(even){
    grid-template-columns: 1fr 320px;
}
.about-item:nth-child(even) .about-media{
    order: 2;
}




/* Mobil */
@media (max-width: 750px){
  .about-item,
  .about-item:nth-child(even){
    grid-template-columns: 1fr;
  }
  .about-item:nth-child(even) .about-media{
    order: 0;
  }
  .about-media img{
    max-height: 160px;
  }
}



/* Mobil: stack (samme rækkefølge, bare én kolonne) */
@media (max-width: 900px){
  .about-split{
    grid-template-columns: 1fr;
  }

  .about-visual{
    position: sticky;
    top: 10vh;
    height: 35vh;
    order: -1;
  }

  .visual-stack{
    width: min(320px, 80%);
  }

  .about-step{
    min-height: auto;
  }
}


/*--------------------------------------------------------------*/

.about-lamp-section{
    width: 80%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    top: 0;
    transform: translateY(-50px);
}

.about-lamp-section img{
    width: 15%;
}

.timeline{
    position: relative;
    width: min(1100px, 80%);
    margin: 0 auto 15rem;
}

.timeline-plant{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    z-index: 1;
}
.timeline-plant svg{
  width: clamp(100px, 12vw, 170px);
  height: auto;
}


.timeline-content{
    display: flex;
    flex-direction: column;
    margin: 2rem auto;
}

.timeline-left{
    width: 100%;
    text-align: left;
    margin-bottom: 2rem;
}

.timeline-right{
    width: 100%;
    text-align: right;
    margin-bottom: 2rem;
}


/* ========== PLANT ANIMATION SETUP ========== */

.timeline-plant svg {
  overflow: visible;
}

/* --- Hele planten (uden potten) --- */
.timeline-plant svg #growth-plant{
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: plant-sway 6s ease-in-out infinite;
  will-change: transform;
}

/* --- Blade --- */
.timeline-plant svg g[id^="leaf"]{
  transform-box: fill-box;
  transform-origin: left center;
  animation: leaf-sway 3.8s ease-in-out infinite;
  will-change: transform;
}

/* Små variationer så det ser naturligt ud */
.timeline-plant svg #leaf_2 { animation-duration: 4.2s; animation-delay: -1.2s; }
.timeline-plant svg #leaf_3 { animation-duration: 3.6s; animation-delay: -2s; }
.timeline-plant svg #leaf_4 { animation-duration: 4.5s; animation-delay: -0.7s; }
.timeline-plant svg #leaf_5 { animation-duration: 3.9s; animation-delay: -1.6s; }
.timeline-plant svg #leaf_6 { animation-duration: 4.3s; animation-delay: -2.4s; }

/* --- Keyframes --- */

@keyframes plant-sway{
  0%, 100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1.2deg); }
}

@keyframes leaf-sway{
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(2deg); }
}

.fritid-project-link{
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.fritid-project-link a{
    text-decoration: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
}
.fritid-project-link a:hover{
    text-decoration: underline;
}


/*-------------------lille skærm------------------------------*/

@media screen and (max-width: 600px) {
    .about-lamp-section{
        transform: translateY(-15px);
    }

    .timeline{
        width: 90%;
        margin: 0 auto 9rem;
    }
    .timeline-plant{
        z-index: 1;
    }

    .timeline-left, .timeline-right{
        z-index: 2;
        margin-bottom: 0.5rem;
    }
    .timeline-left h2, .timeline-right h2{
        font-size: 1.3rem;
    }
}



/* --- Respect user motion preference --- */
@media (prefers-reduced-motion: reduce){
  .timeline-plant svg #growth-plant,
  .timeline-plant svg g[id^="leaf"]{
    animation: none;
  }

  /* .overlay *{
    animation: none;
    transition: none;
  } */
  .img-card:hover .flip-card-inner,
  .img-card:focus-within .flip-card-inner{
    transform: none;
  }
}
