* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding: 2rem;
    
}


:root{
    --white: #F8F9FA;
    --lightGrey1: #E9ECEF;
    --lightGrey2: #DEE2E6;
    --lightGrey3: #CED4DA;
    --lightGrey4: #ADB5BD;
    --black1: #212529;
    --black2: #343A40;
    --black3: #495057;
    --black4: #6C757D;
    --customTransition: all ease-in-out 0.15s;

}


body {
    font-family: "Montserrat", Arial;
    background-color: var(--white);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem;
}

header h1 {
    color: var(--black1);
}


header nav ul {
 display: flex;
 align-items: center;
 justify-content: flex-start;
 gap: 1.2rem;
 list-style-type: none;
}

header nav ul a {
    text-decoration: none;
    color: var(--black1);
    font-size: 1.2rem;
    padding: 0.6rem;
    border-radius: 0.6rem;
     transition: var(--customTransition);
}

header nav ul a:hover  {
opacity: 0.6;
background-color: var(--lightGrey3);
color: var(--white);
}



/* Hamburger menu */

.menu-icon {
    width: 35px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 100%;
    height: 5px;
    background: var(--black1);
    border-radius: 2rem;
    transition: 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--black1);
    transition: 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 200;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-menu ul li {
    padding: 15px;
}

.mobile-menu ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
}

.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.open .bar:nth-child(2) {
    opacity: 0;
}

.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.show {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

hr {
    width: 100%;
    background-color: #212529;
}


@media (min-width: 600px) {
    .menu-icon {
        display: none;
    }

    .mobile-menu {
        display: none;
    }
}








/* MAIN */

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    gap: 3.6rem;
}

.hero-section {
    position: relative;
      width: 100%;
    /* width: 50rem; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 26rem;
background: linear-gradient(to top, #CED4DA, var(--white), var(--white), var(--white));

  

}


.hero-section img:nth-child(1) {
text-align: center;
width: 100%;
width: 35rem;
filter: invert(87%) sepia(8%) saturate(151%) hue-rotate(179deg) brightness(92%) contrast(86%);

}


.hero-section img:nth-child(2) {
position: absolute;
width: 40rem;
top: 6rem;
z-index: 100;
}



.model-name {
    font-size: 2.4rem;
}



/* ANIMACIJE */



@keyframes slideInLeft {

    from {
    transform: translateX(-1000px);
    }
    
    
    to{
    transform: translateX(0);
    }
    
   
    }



.elementDva {

 animation: slideInLeft 1s ease-in-out forwards;

}


@keyframes appear {

from {
    opacity: 0;
}

to {
    opacity: 1;
}

}


.elementJedan {
animation: appear 1.5s ease-in-out forwards;
}




/* SECTION 2 */

#general {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}


.general-text,
.slika-porschea {
    width: 40%;
}


.slika-porschea img {
    width: 40rem;
}



.general-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    line-height: 2rem;
    animation: appear 2s ease-in-out forwards;

}
























/* SECTION 3 */


.details-numbers {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}


.numbers {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
}




.information-numbers-unit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}


.information-numbers-unit span {
    font-size: 4rem;
}

.information-numbers-unit p:nth-child(1) {
    font-weight:  400;
    font-size: 2rem;
}


.information-numbers-unit p:nth-child(2) {
 color: var(--black4);
}


.front-porsche-image {
       width: 40%;
}

.front-porsche-image img {
    width: 40rem;
    flex-shrink: 0;
}

.counter {
  font-size: 2.5em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  width: 12ch;
  text-align: right;
  color: #000;
}






/* SECTION 4 */


.more-informations {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

 details {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 1em 0;
    background: var(--lightGrey3);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
    width: 70%;
  }

  details:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  summary {
    font-size: 1.4rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
  }

  /* Hide the default marker */
  summary::-webkit-details-marker {
    display: none;
  }

  /* Custom pointer icon */
  summary::before {
    content: "▶";
    font-size: 0.8em;
    margin-right: 10px;
    transition: transform 0.3s ease;
  }

  /* Rotate on open */
  details[open] summary::before {
    transform: rotate(90deg);
  }

  /* Smooth open animation */
  details[open] > *:not(summary) {
    animation: fadeIn 0.3s ease forwards;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }



details div {
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.2rem;
}






/* SECTION 5 */

.section-5 {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    padding: 1rem;
}


.info-container {
    position: relative;
    width: 30rem;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
     animation: appear 0.7s linear forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 50%;

}

.info-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
 
}





.info-text {
    color: var(--white);
    position: absolute;
    bottom: 2.4rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}



/* footer */


footer {
    background-color: var(--lightGrey4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 4rem;
}

footer a,
.author-link {
    color: var(--black2);
    text-decoration: none;
    font-weight: bold;
    transition: var(--customTransition);
}

footer a:hover,
.author-link:hover {
    opacity: 0.7;
}





.socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.socials img {
    width: 30px;
    cursor: pointer;
    transition: var(--customTransition);
}

.socials img:hover {
    opacity: 0.7;
}


































@media (min-width: 1000px) {


    .info-container img {
   filter: grayscale(100);
    transition: var(--customTransition);
    }





    .info-container img:hover {
    filter: grayscale(0);
    transform: scale(1.1);
}
}




































@media (max-width: 1000px) {
    .menu-icon {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

      .desktop-menu {
        display: none;
    }

    .hero-section {
        width: 100%;
    }


.hero-section {
     height: 16rem;
}

.hero-section img:nth-child(1) {
text-align: center;
width: 100%;
width: 18rem;
filter: invert(87%) sepia(8%) saturate(151%) hue-rotate(179deg) brightness(92%) contrast(86%);

}


.hero-section img:nth-child(2) {
position: absolute;
width: 24rem;
top: 4rem;
z-index: 100;
}


.model-name {
    font-size: 2rem;
}

#general {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto;
}



.general-text,
.slika-porschea {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.slika-porschea {
    width: 90%;
}

.general-text p {
    line-height: 1.6rem;
}

.slika-porschea img {
    width: 25rem;
}




.details-numbers {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}



/* SECTION 3 */


.numbers {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}



.front-porsche-image {
       width: 100%;
       display: flex;
       align-items: center;
       justify-content: center;
}

.front-porsche-image img {
    width: 20rem;
    flex-shrink: 0;
}

.information-numbers-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



.information-numbers-unit p:nth-child(1) {
    font-weight:  400;
    font-size: 1rem;
}


/* SECTION 4 */

summary {
    font-size: 1.2rem;
}


details div {
     font-size: 1rem;
}


/* SECTION 5 */

.section-5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    padding: 1rem;
}


.info-container {
    position: relative;
    width: 26rem;
    text-align: center;

}

.info-container img {
    width: 90%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.info-text {
    width: 20rem;
    text-align: left;
    bottom: 2rem;
    left: 2rem;
}


/* footer */


footer {
    flex-direction: column;
    gap: 2rem;
}


}
