/* -------------------------------------------------------------------------------- */
/* ! BASE */
/* -------------------------------------------------------------------------------- */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  background-color: var(--dark);
  scroll-behavior: smooth;
}

/* PALETTE */
:root {
  --light: #ffffff;
  --dark: #131126;
  --accent: #dcabec;
  --accent-secondary: #7f7c9fa6;
  --text: #ffffffb3;
  --text-secondary: #54535b;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Funnel Sans", sans-serif;
  color: var(--light);
}

p, span, a, li, button {
  font-family: "Work Sans", sans-serif;
  color: var(--text);
}

a {
  text-decoration: none;
}


/* ------------------------------------------------ */
/* HEADER */

header {
  position: fixed;
  margin-top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  border-radius: 50px;
  box-shadow: 0 8px 16px rgba(19, 17, 38, 0.7);
  padding: 20px 30px;
  z-index: 1000;
  transition: top 0.3s ease-in-out;
}

nav {
  display: flex;
  justify-content: center;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 1.2em;
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0 10px;
}

nav a:hover {
  color: var(--dark);
}

.headerhome {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 2px; 
  text-decoration-color: var(--text-secondary);
  transition: color 0.2s;
}

.headerhome:hover {
  text-decoration-color: var(--dark);
}


/* -------------------------------------------------------------------------------- */
/* ! PROJECTS PAGE */
/* -------------------------------------------------------------------------------- */
.projects-container {
  max-width: 1400px;
  margin: 8% auto;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  }
  
.project-card {
  width: 48%;
  margin-bottom: 50px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
} 

.project-card a {
  width: 48%;
}

.project-image-container {
  width: 700px;
  height: 500px;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
  transition: border-radius 0.3s ease;
}

.project-image-container img {
  display: inline-block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card span {
  margin-top: 30px;
  font-size: 25px;
  color: var(--text);
  font-family: "Work Sans", sans-serif;
  text-decoration: none;
}

.project-card a:hover img{
  transform: scale(1.03);
}

.project-card a:hover .project-image-container{
  border-radius: 20px;
  transition: border-radius 0.3s ease;
}

/* -------------------------------------------------------------------------------- */
/* ! PROJECT HEADER */
/* -------------------------------------------------------------------------------- */

.project-header {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-image {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  color: var(--light);
}

.back-button img {
  width: 60px;
  height: 60px;
  transition: transform 0.3s ease;
}

.back-button:hover {
  transform: rotate(35deg);
}

.project-title {
  font-size: 84px;
  font-weight: 600;
  margin-bottom: 30px;
}

.project-hero {
  width: 100%;
  height: 80vh;
  position: relative;
  overflow: hidden;

}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------------------------------------------------------------------- */
/* ! PROJECT SECTIONS NAVBAR (integrato) */
/* -------------------------------------------------------------------------------- */

.sections-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* NAVBAR PILL STYLE */
.projects_tags {
  display: flex;
  padding: 20px 0;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.projects_tags button{
  display: flex;
  padding: 12px 20px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

button.nav-btn {
  appearance: none;
  border-radius: 14px;
  border-radius: 14px;
  background-color: #131126;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

button.nav-btn:hover {
  border-color: var(--dark);
  color: var(--accent);
}

button.nav-btn[aria-selected="true"] {
  border-radius: 14px;
  border: 1px solid var(--accent);
  background: rgba(127, 124, 159, 0.65);
  color: var(--accent);
}



/* SECTIONS AREA */
.sections_container {
  margin: 5% 0;
}

.projects_section {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.projects_section.active {
  display: block;
  opacity: 1;
}

/* CONTENUTO A DUE COLONNE */
.projects_section .content {
  justify-self: center;
  width: 1200px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.projects_section .text p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}


/* RESPONSIVE */
@media (max-width: 800px) {
  .section .content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .section .media {
    aspect-ratio: 4 / 3;
  }
}


/* -------------------------------------------------------------------------------- */
/* ! PROJECT CONTENT */
/* -------------------------------------------------------------------------------- */

.project-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}
/* -------------------------------------------------------------------------------- */
/* ! RESPONSIVE */
/* -------------------------------------------------------------------------------- */

@media (max-width: 1200px) {

  .project-title {
    font-size: 64px;
  }

  .projects-container {
    flex-direction: column;
    align-items: center;
    margin-top: 120px;
  }

  .project-card {
    width: 90% !important; 
  }

  .project-image-container {
    width: 100%;
    height: 300px;
    border-radius: 20px;
  }


}

@media (max-width: 768px) {
  .project-header {
    padding: 20px;
  }

  .project-title {
    font-size: 48px;
  }

  .back-button {
    top: 20px;
    left: 20px;
  }

  .project-nav {
    padding: 15px 20px;
  }

  .nav-links {
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
  }

  .project-content {
    padding: 40px 20px;
  }

  .project-intro p {
    font-size: 18px;
  }

  .project-timeline {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .project-title {
    font-size: 36px;
  }

  .project-intro p {
    font-size: 16px;
  }
}
