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

html, body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  background-color: #fafafa;
  line-height: 1.5;
  scroll-behavior: smooth;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

/* Container Utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* -------------------------------------------------------
  HERO SECTION
-------------------------------------------------------- */
.hero-section {
  background: #0066cc; /* Solid blue background */
  text-align: center;
  color: #fff;
  padding: 4rem 0;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo {
  max-width: 250px; /* Size of the logo */
  height: auto;
  filter: invert(1);
}
.hero-tagline {
  font-size: 1.25rem;
  color: #f5f5f5;
  margin-top: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow for readability */
}

/* -------------------------------------------------------
  HEADER (STICKY NAV) - MOBILE IMPROVED
-------------------------------------------------------- */
.main-header {
  background-color: #1f1f1f;
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 0.5rem 1rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  max-height: 40px;
  filter: invert(1);
  width: auto;
  object-fit: contain;
}

.navbar ul {
  list-style: none;
  display: none; /* Hidden by default on mobile */
  flex-direction: column; /* Stack menu items vertically */
  background-color: #1f1f1f;
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  gap: 1rem;
  padding: 1rem;
  text-align: center;
}

.navbar ul.show-menu {
  display: flex; /* Show menu when toggled */
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  padding: 0.5rem;
}

.navbar a:hover {
  opacity: 0.7;
}

/* Mobile menu toggle button */
.navbar-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000; /* Ensure it stays above other elements */
}

/* Horizontal layout for larger screens */
@media (min-width: 768px) {
  .navbar ul {
    display: flex; /* Show menu on larger screens */
    flex-direction: row;
    position: static; /* Inline with the header */
    background: none;
    gap: 1.5rem;
    padding: 0;
  }

  .navbar-toggle {
    display: none;
  }
}

/* -------------------------------------------------------
  ABOUT SECTION - MOBILE IMPROVED
-------------------------------------------------------- */
.about-container {
  display: flex;
  flex-direction: column; /* Stack content vertically on mobile */
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.about-text {
  padding: 0 1rem;
}

.about-text h2 {
  font-size: 1.5rem;
}

.about-photo img {
  width: 150px; /* Smaller image on mobile */
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 5%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .about-container {
    flex-direction: row; /* Side-by-side layout for larger screens */
    text-align: left;
    justify-content: space-between;
  }

  .about-photo img {
    width: 180px; /* Larger image for larger screens */
    height: 180px;
  }
}


/* -------------------------------------------------------
  SERVICES SECTION
-------------------------------------------------------- */
.services-section {
  background-color: #f9f9f9;
  padding: 2rem 0;
  text-align: center;
}

.services-container h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.service-card {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

/* -------------------------------------------------------
  PORTFOLIO SECTION
-------------------------------------------------------- */
.portfolio-section {
  background-color: #fff;
  padding: 3rem 0; /* Spacing above and below */
}

.portfolio-container h2 {
  text-align: center;
  font-size: 2rem; /* Slightly larger for emphasis */
  margin-bottom: 2rem; /* Spacing below the title */
}

.portfolio-grid {
  display: flex;
  justify-content: center; /* Center the items horizontally */
  gap: 2rem; /* Spacing between items */
  flex-wrap: wrap; /* Ensure responsiveness on smaller screens */
  margin-top: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center; /* Center content within the item */
  width: 300px; /* Fixed width for consistent layout */
}

.portfolio-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05); /* Slight zoom effect on hover */
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6); /* Overlay color */
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay-content {
  color: #fff;
}

.portfolio-overlay-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.portfolio-overlay-content p {
  margin-bottom: 1rem;
}

.portfolio-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.portfolio-btn:hover {
  background-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
  .portfolio-grid {
    flex-direction: column; /* Stack items vertically on smaller screens */
    align-items: center; /* Center items */
  }

  .portfolio-item {
    width: 100%; /* Allow items to take full width on mobile */
    max-width: 350px; /* Maintain a max width for better readability */
  }
}


/* CONTACT SECTION */
.contact-section {
  background-color: #f5f5f5;
  padding: 3rem 0;
  text-align: center;
}

.contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-container p {
  margin-bottom: 2rem;
  color: #555;
}

form {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button.btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

button.btn:hover {
  background-color: #0056b3;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #007bff;
}


/* -------------------------------------------------------
  FOOTER
-------------------------------------------------------- */
.main-footer {
  background-color: #1f1f1f;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

/* -------------------------------------------------------
  RESPONSIVE BREAKPOINTS
-------------------------------------------------------- */
@media (min-width: 600px) {
  .about-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .services-grid {
    flex-direction: row;
    justify-content: space-around;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
