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

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  margin: 0;
  color: #333;
  max-width: 1440px;
  margin: auto;
}

/* General image styling */
img {
  display: block;
  max-width: 100%;
  height: auto; /* Maintain intrinsic aspect ratio */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  color: #222;
  margin: 0 0 10px;
}

a {
  text-decoration: none;
  color: #007bff; /* Example link color */
}

/* General Header Styling */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white; /* Pure white background */
  padding: 20px;
  margin: 40px 0;
  position: relative;
  z-index: 1000;
}

/* Logo Styling */
header .logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .logo img {
  height: 60px; /* Slightly larger for prominence */
  transition: transform 0.3s ease-in-out;
}

header .logo {
  transform: scale(1.1); /* Slight hover effect */
}

header .logo h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 2rem; /* Larger size for emphasis */
  font-weight: 700; /* Bold for impact */
  background: linear-gradient(90deg, #66c18c, #3282b8); /* Gradient colors */
  -webkit-background-clip: text; /* Clip gradient to text */
  -webkit-text-fill-color: transparent; /* Make the text fill transparent */
  text-transform: uppercase; /* Uniform and sleek style */
  margin: 0;
  letter-spacing: 0.05em;
}

nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  font-size: 16px;
  font-weight: 500;
}

nav#menu a {
  font-size: 1.2rem; /* Clean and modern size */
  font-weight: 600;
  color: #333333; /* Neutral color for balance */
  text-transform: capitalize;
  margin-left: 15px;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav#menu a:hover {
  color: #ffffff;
  background-color: #66c18c; /* Matches branding */
}

/* Collapsible Menu for Mobile */
nav.collapsible {
  flex-direction: column;
  display: none; /* Hidden by default */
  background-color: white;
  border-top: solid 1px #a5d8d6;
  margin-top: 65px;
  padding: 10px 0;
}

nav.collapsible a {
  padding: 10px 20px;
  text-align: center;
}

/* Menu Toggle Button */
/* Mobile Hamburger Menu */
.menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  background-color: white; /* Teal background matching logo */
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.menu-toggle:hover {
  color: #ffffff;
  background-color: #66c18c; /* Matches branding */
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px 0;
  transition: all 0.3s ease;
}

.carousel {
  position: relative;
  overflow: hidden;
  height: 600px;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease;
}

.carousel-slide img {
  width: 100%;
  border-radius: 10px;
  height: 100%;
  object-fit: cover; /* Ensures the image covers the area without distortion */
  aspect-ratio: 16 / 9; /* Enforce 16:9 aspect ratio */
}

.carousel-text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 15px;
  border-radius: 8px;
}

.carousel-text h2 {
  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  text-transform: capitalize;
}

.carousel-text p {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  color: #f0f0f0;
  text-transform: initial;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Needed for sliding effect */
  cursor: pointer;
  z-index: 10;
}

.carousel-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%; /* Start outside of view */
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease; /* Slide animation */
  z-index: -1; /* Keep it behind the text */
}

.carousel-btn:hover::before {
  left: 0; /* Slide into view */
}

.carousel-btn.prev {
  left: 15px; /* Position on the left */
}

.carousel-btn.next {
  right: 15px; /* Position on the right */
}

.carousel-btn i {
  font-size: 20px; /* Icon size */
  z-index: 1;
}

.projects {
  padding: 20px;
  margin-top: 20px;
}

.projects h2 {
  font-family: "Poppins", sans-serif;
  font-size: 2.2rem; /* Bigger for more emphasis */
  font-weight: 700; /* Bold and sleek */
  color: #4cafeb; /* Vibrant blue from logo */
  text-transform: uppercase;
  text-align: center;
  margin: 2rem 0;
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
}

.projects h2::after,
#project-modal .modal-content h2::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(
    to right,
    #4caf50,
    #4cafeb
  ); /* Green to blue gradient */
  margin: 1rem auto 0;
  border-radius: 2px;
}

.category {
  margin-bottom: 40px; /* Adds space between categories */
}

.category h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.6rem; /* Smaller than h2 */
  font-weight: 600; /* Slightly lighter than h2 */
  color: #66c18c; /* Vibrant green from logo */
  text-transform: uppercase;
  text-align: left; /* Align to the left for hierarchy */
  margin: 1.5rem 0;
  letter-spacing: 2px;
  position: relative;
}

.category h3::after {
  content: "";
  display: block;
  width: 50px; /* Shorter line to match h3 size */
  height: 3px;
  background: linear-gradient(
    to right,
    #4cafeb,
    #4caf50
  ); /* Blue to green gradient */
  margin: 0.5rem 0 0;
  border-radius: 2px;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-items: center;
}

.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  animation: fadeIn 0.5s ease-out;
}

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

.card img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Prevent distortion */
  aspect-ratio: 1 / 1; /* Enforce square images */
}

.card h4 {
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  color: #333;
  padding: 10px 15px;
  margin: 0;
  text-align: center;
  text-transform: capitalize;
}

.card p {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  color: #555;
  text-align: center;
  text-transform: initial;
  padding: 0 10px 10px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* About Section */
#about-section {
  background: linear-gradient(135deg, #66c18c, #4da877); /* Vibrant gradient */
  color: #fff;
  padding: 60px 20px;
  text-align: center;
  position: relative;
}

#about-section h2 {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  margin-bottom: 20px;
}

#about-section p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 20px;
}

/* Footer */
footer {
  background-color: #f8f9fa;
  color: #333;
  font-family: "Poppins", sans-serif;
  padding: 20px 15px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-content h4 {
  font-size: 1.4rem;
}

.footer-content p {
  margin: 5px 0;
  font-size: 1rem;
  line-height: 1.5;
}

.footer-content .social-links {
  display: flex;
  gap: 15px;
}

.footer-content .social-links a {
  color: #333; /* Use logo's color for links */
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer-content .social-links a:hover {
  color: #007f7e; /* Darker shade for hover */
}

.footer-bottom {
  margin-top: 20px;
  font-size: 0.9rem;
  border-top: 1px solid #e0e0e0; /* Subtle divider */
  padding-top: 10px;
  text-align: center;
}

footer p i {
  margin-right: 8px; /* Space between icon and text */
}
/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8); /* Darker overlay for contrast */
  justify-content: center;
  align-items: center;
  overflow: auto;
  z-index: 1000;
  padding: 20px;
  animation: fade-in 0.4s ease; /* Smooth modal fade-in */
}

/* Modal fade-in animation */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Class added when the modal is shown */
#project-modal.show-modal {
  display: flex; /* Display modal */
  opacity: 1; /* Fully visible */
}

/* Close button styling */
.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(
    135deg,
    #66c18c,
    #3282b8
  ); /* Matches the brand theme */
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

#project-modal .close-button:hover {
  transform: scale(1.1); /* Slightly enlarge on hover */
  background: linear-gradient(135deg, #3282b8, #66c18c); /* Reverse gradient */
}

/* Additional modal content styles */
.modal-content {
  background: #ffffff;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* More prominent shadow for depth */
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

#project-modal .modal-content h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #66c18c;
  text-align: center;
  background: linear-gradient(90deg, #66c18c, #3282b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; /* Gradient text */
  margin-bottom: 15px;
  text-transform: capitalize;
}

#project-modal .modal-content p {
  text-transform: initial;
}

.scroll-indicator {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: #66c18c;
  cursor: pointer;
  animation: bounce 1.5s infinite; /* Subtle bounce animation */
  z-index: 10;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, 10px);
  }
  60% {
    transform: translate(-50%, 5px);
  }
}

/* Hide the scrollbar */
.modal-content::-webkit-scrollbar {
  display: none; /* For WebKit browsers (Chrome, Safari) */
}

.modal-content {
  -ms-overflow-style: none; /* For Internet Explorer and Edge */
  scrollbar-width: none; /* For Firefox */
}

.image-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#main-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

#main-image {
  max-width: 100%;
  border-radius: 8px;
  object-fit: cover; /* Ensures consistent image display */
}

#thumbnail-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

#thumbnail-container img {
  width: 80px;
  height: 80px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#thumbnail-container img:hover {
  transform: scale(1.1); /* Slight enlargement on hover */
}

.project-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 10px;
  background: #f8f8f8; /* Subtle background */
  border-radius: 10px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(
    135deg,
    #f9f9f9,
    #eaeaea
  ); /* Soft gradient background */
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); /* Subtle depth */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-item:hover {
  transform: translateY(-3px);
  box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow */
}

.detail-item i {
  font-size: 28px;
  color: #3282b8; /* Icon emphasis */
}

.detail-item span {
  font-weight: 600;
  color: #66c18c; /* Matches theme */
}

.detail-item p {
  margin: 0;
  font-size: 14px;
  color: #555;
}

/* Modal Description */
#project-description {
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  max-width: 900px;
  color: #555;
  padding: 0 10px 10px 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav {
    display: none;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 15px 0;
  }

  nav.collapsible {
    display: flex;
  }

  nav a {
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }

  header {
    margin: 20px 0px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  .projects {
    margin-top: 0;
  }

  header .logo h1 {
    font-size: 1.6rem;
  }

  header .logo img {
    height: 45px;
  }

  nav.collapsible {
    margin-top: 40px;
  }

  .carousel-slide img {
    border-radius: 0;
  }

  .carousel-text h2 {
    font-size: 1.6rem;
  }

  .carousel-text p {
    font-size: 0.9rem;
  }

  .projects h2 {
    font-size: 1.8rem;
  }

  .category h3 {
    font-size: 1.5rem;
  }

  .categories {
    flex-direction: column;
  }

  .category {
    width: 100%;
  }

  .modal-content {
    padding: 15px;
    width: 100%;
  }

  #main-image {
    max-width: 100%;
  }

  .project-details {
    width: 90%;
  }

  #project-details,
  #project-description {
    font-size: 0.9rem;
  }

  #image-gallery {
    flex-direction: column;
    align-items: center;
  }

  #thumbnail-container img {
    width: 60px;
    height: 60px;
  }

  #project-modal .modal-content {
    width: 95%;
  }
}

/* Keyframes for Modal Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
