/* =====================
   MEL3 Digital Solutions - style.css (Enhanced for Hamburger Menu)
   ===================== */

   :root {
    --blue-light: #1e90ff;
    --blue-dark: #3b6af7;
    --light-bg: #ebeae9;
    --text-dark: #222;
    --white: #fff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }

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

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px; /* Adjust this value to match your header's height */
  }

  body {
    font-family: var(--font-main);
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
  }

  .container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
  }

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

  /* ========== Header ========== */
  .header {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }

  .site-title {
    font-size: 2.2rem;
    color: #1e90ff;
    font-weight: 900;
    margin-bottom: 0.25rem;
  }

  .logo img {
    height: 135px;
  }

  /* Desktop Navigation */
  .desktop-nav a {
    margin-left: 1rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--blue-dark);
    transition: color 0.3s ease;
  }

  .desktop-nav a:hover,
  .desktop-nav a:focus {
    color: var(--blue-light);
    outline: none;
  }

  /* Hamburger Icon */
  .hamburger {
    display: none; /* Hidden by default, shown on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000; /* Ensure it's above other elements */
  }

  .hamburger-bar {
    width: 100%;
    height: 3px;
    background: var(--blue-dark);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
  }

  /* Mobile Menu */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen to the right */
    width: 250px; /* Adjust as needed */
    height: 100%;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: right 0.3s ease-in-out;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
  }

  .mobile-menu.active {
    right: 0; /* Slide in when active */
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .mobile-nav-links a {
    text-decoration: none;
    color: var(--blue-dark);
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.3s ease;
  }

  .mobile-nav-links a:hover,
  .mobile-nav-links a:focus {
    color: var(--blue-light);
  }

  .close-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
  }

  /* ========== Intro Section ========== */
  .intro-section {
    /* Positioning to cover the entire screen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* 100% of the viewport height */
    z-index: 10000; /* Extremely high z-index to ensure it's on top of everything */

    /* Centering the content (the logo) */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Background color - using a dark variable for dramatic effect */
    background: var(--text-dark);
  }

  .intro-logo {
    text-align: center; /* This is the new rule that fixes the centering */
  }

  .intro-logo img {
    /* Start with a good size, we can animate this later */
    transform: scale(1);
    max-width: 60%; /* Prevent logo from being too wide on large screens */
    height: auto;
  }

  /* This is an empty container for now, we'll add stars to it with JS */
  .stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Ensures stars don't appear outside the screen */
  }

  /* Styling for the individual stars we will create with JS */
.star {
  position: absolute; /* Allows us to place it anywhere on screen */
  background: white;
  border-radius: 50%; /* Makes it a circle */
  pointer-events: none; /* Stars shouldn't be clickable */
}


  /* ========== Welcome Section (Replaces Old Hero) ========== */
  /* This styles the first section seen AFTER the intro animation */
  .welcome-section {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(to right, var(--blue-light), var(--blue-dark));
    color: var(--white);
  }

  .welcome-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .welcome-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: auto;
    margin-bottom: 2rem;
  }


  /* ========== Button ========== */
  .btn {
    background: var(--white);
    color: var(--blue-dark);
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
  }

  .btn:hover,
  .btn:focus {
    background: #e2e1e1;
    outline: none;
  }

  /* ========== Services Section ========== */
  .services {
    background: var(--light-bg);
    padding: 4rem 2rem;
    text-align: center;
  }

  .services h2 {
    font-size: 2rem;
    color: var(--blue-dark);
    margin-bottom: 2rem;
  }

  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* These new rules will center the content */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    font-size: 2.5rem; /* Makes the icon larger */
    color: var(--blue-light); /* Uses your brand color */
    margin-bottom: 1.5rem; /* Adds space between the icon and the title */
  }
  

  .service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  }

  .service-card h3 {
    color: var(--blue-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }

  .service-card p {
    color: #333;
    font-size: 1rem;
  }

  /* New sections for About and Portfolio */
  .about-us, .portfolio-showcase {
    padding: 4rem 1rem;
    text-align: center;
  }

  .about-us h2, .portfolio-showcase h2 {
    font-size: 2rem;
    color: var(--blue-dark);
    margin-bottom: 1.5rem;
  }

  /* ========== About and Portfolio Sections ========== */

.about-us, .portfolio-showcase {
  padding: 5rem 1rem;
}

.about-us {
  background: var(--white); /* A clean white background to stand out */
}

.portfolio-showcase {
   background: var(--light-bg); /* Matches the services section background */
}

.about-us h2, .portfolio-showcase h2 {
  text-align: center;
  font-size: 2.2rem;
  color: var(--blue-dark);
  margin-bottom: 3rem;
}

.portfolio-showcase p {
  text-align: center;
  font-size: 1.1rem;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.about-image {
  flex-basis: 40%;
}

.about-image img {
  width: 100%; /* Makes the image fill its container's width */
  height: auto; /* Maintains the correct aspect ratio */
  display: block; /* Good practice for layout consistency */
  border-radius: 16px; /* Adds the same rounded corners from the placeholder */
}

.image-placeholder {
  width: 100%;
  padding-top: 100%; /* Creates a perfect square aspect ratio */
  background-color: #e0e0e0;
  border-radius: 16px;
}

.about-text {
  flex-basis: 60%;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--blue-light);
}

.about-text p {
  margin-bottom: 1.5rem;
  color: #444;
  font-size: 1rem;
  line-height: 1.7;
}

/* Add this new CSS to your style.css file */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.portfolio-card {
  position: relative; /* This is crucial for layering the text on top */
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3; /* Gives cards a consistent 4:3 aspect ratio */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: var(--light-bg); /* Dark background for if images are slow to load */
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This makes the image fill the entire card without stretching */
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.05); /* A subtle zoom effect on the image on hover */
}

.portfolio-info {
  /* This is the text overlay */
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0; /* Stretches the overlay across the full width */
  color: var(--white);
  padding: 3rem 1.5rem 1.5rem; /* More padding at the top for the gradient */

  /* The gradient makes text readable over any image */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);

  /* Prepare for hover animation */
  transform: translateY(20%); /* Start slightly hidden */
  opacity: 0;
  transition: all 0.4s ease;
}

.portfolio-card:hover .portfolio-info {
  transform: translateY(0); /* Slide up into view */
  opacity: 1; /* Fade into view */
}

.portfolio-info h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.portfolio-info p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-tags span {
  /* A semi-transparent background looks great on the overlay */
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px); /* A cool "glassmorphism" effect */
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Responsive Design for the About section */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }
}

  /* ========== Contact Section ========== */
  .contact {
    padding: 4rem 1rem;
    text-align: center;
  }

  .contact form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column; /* This typo is now fixed */
    gap: 1rem;
    align-items: center;
  }

  .contact input,
  textarea {
    padding: 0.75rem 1rem;
    width: 100%;
    max-width: 400px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    transition: border 0.3s, box-shadow 0.3s;
  }

  .contact input:focus,
  textarea:focus {
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 2px rgba(59, 106, 247, 0.2);
    outline: none;
  }

  .note {
    font-size: 0.85rem;
    color: #555;
    margin-top: 1rem;
  }

  #wordCount {
    font-size: 0.85rem;
    color: #555;
    margin-top: -0.5rem; /* Adjust this to pull it closer to the textarea */
    margin-bottom: 1rem;
  }

  /* ========== Footer ========== */
  .footer {
    background: var(--white);
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
  }

  /* ========== Responsive Design ========== */
  @media (max-width: 768px) {
    .desktop-nav {
      display: none; /* Hide desktop nav on small screens */
    }

    .hamburger {
      display: flex; /* Show hamburger on small screens */
    }

    .header .container {
      /* Re-evaluate header layout for mobile */
      flex-direction: row; /* Keep elements in a row */
      justify-content: space-between; /* Space out logo and hamburger */
      align-items: center;
    }

    .logo {
      /* No longer need margin: auto; - let flex handle it */
      margin: 0;
    }

    .welcome-section h1, .hero h1 {
      font-size: 2rem; /* Adjust for smaller screens */
    }

    .welcome-section p, .hero p {
      font-size: 1rem; /* Adjust for smaller screens */
    }
  }


  @media (max-width: 480px) {
    .btn {
      width: 100%;
      max-width: 300px;
    }

    .mobile-menu {
      width: 100%; /* Full width on very small screens */
    }

    .welcome-section h1, .hero h1 {
      font-size: 1.8rem;
    }

    .welcome-section p, .hero p {
      font-size: 0.9rem;
    }
  }

  /*
  @media (max-width: 380px) {
    .hero h2 { // This was h2 before, adjust to h1 if using this
      font-size: 1.5rem;
    }

    .hero p {
      font-size: 0.95rem;
    }
  }
  */