@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --primary-color: rgb(4, 117, 0);;
  --primary-color-dark: #000000;
  --secondary-color: rgb(4, 117, 0);
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --extra-light: #faf5ff;
  --max-width: 1200px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

header {
  margin-top: 100px;
  margin-left: 15px;
  margin-right: 15px;
}

a {
  text-decoration: none;
}

body {
  font-family: "Poppins", sans-serif;
}

nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #ffffff;
  z-index: 99;
}

.nav__content {
  max-width: var(--max-width);
  margin: auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: 0.3s;
}
nav .logo a:hover {
  color: var(--primary-color-dark);
}

nav .checkbox {
  display: none;
}

nav input {
  display: none;
}
nav .checkbox i {
  font-size: 2rem;
  color: var(--primary-color);
  cursor: pointer;
}

ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  transition: left 0.3s;
}

ul li a {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-dark);
  transition: 0.3s;
}

ul li a:hover {
  border-top-color: var(--secondary-color);
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
}

@media (width < 750px) {
  nav .checkbox {
    display: block;
  }

  ul {
    position: absolute;
    width: 100%;
    height: calc(100vh - 85px);
    left: -100%;
    top: 85px;
    background-color: var(--extra-light);
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
  }

  nav #check:checked ~ ul {
    left: 0;
  }

  ul li a {
    font-size: 1.25rem;
  }

  .section__container {
    padding: 10rem 1rem 5rem 1rem;
    text-align: center;
    grid-template-columns: repeat(1, 1fr);
  }

  .image {
    grid-area: 1/1/2/2;
  }

  .action__btns {
    margin: auto;
  }
}

.portfolio-section {
  padding: 60px 20px;
  text-align: center;
  background-color: #fff;
  margin: 20px 0;
  margin-top: -50px;
}

.portfolio-section h1 {
  font-size: 40px;
  margin-bottom: 30px;
  color: #333;
  font-weight: 700;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    justify-content: center;
}

.project-category {
  margin-bottom: 60px;
}

.category-title {
  font-size: 36px;
  margin-bottom: 20px;
  color: rgb(4, 117, 0);
  text-align: center;
  font-weight: 600;
}

.folder {
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    /* The fixed width is removed, as the grid will handle the sizing */
}

.folder:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.folder-cover {
  background-color: rgb(255, 255, 255);
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 3px solid #fff;
  text-align: center; /* Adds horizontal alignment */
}

.folder-cover img {
  width: 70px;
  height: auto;
  margin-bottom: 15px;
}

.folder-cover h3 {
  color: #000000;
  font-size: 26px;
  margin: 0;
}

/* Folder Content */
.folder-content {
  padding: 20px;
  display: none;
  transition: all 0.3s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 10;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.folder-content.show {
  display: block;
}

/* Project Images */
.project-images {
  display: flex;
  justify-content: center;
  gap: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding: 10px 0;
}

.project-images img {
  width: 120px;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-images img:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.project-details {
  text-align: center; /* This ensures the text inside project details is centered */
}

.project-details h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
  font-weight: 700;
}

.project-details p {
  font-size: 18px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-link {
  display: inline-block;
  padding: 14px 30px;
  background-color: #f0a500;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 18px;
  transition: background-color 0.3s, transform 0.3s;
}

.project-link:hover {
  background-color: #333;
  transform: scale(1.05);
}

@media (max-width: 750px) {
    nav .checkbox {
        display: block; /* Shows the hamburger menu icon */
    }

    ul {
        position: absolute;
        width: 100%;
        height: calc(100vh - 85px);
        left: -100%;
        top: 85px;
        background-color: var(--extra-light);
        flex-direction: column;
        justify-content: center;
        gap: 3rem;
        transition: left 0.3s;
    }

    nav #check:checked ~ ul {
        left: 0;
    }
}

/* Image Gallery Responsiveness */
@media (max-width: 600px) {
    .container .image-container .image {
        flex-basis: 100%; /* Overrides the layout for small screens */
    }
    
    .container .popup-image img {
        width: 90%; /* Adjusts the popup image for mobile */
    }
}