/* ---------- GLOBAL RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #fff;
  color: #333;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- HEADER ---------- */
:root {
  --primary: #540863;
  --accent: #92487A;
  --highlight: #E49BA6;
  --light: #FFD3D5;
}

/* ---------- FLOATING HEADER ---------- */
header {
  width: 90%;
  margin: 20px auto;
  /* Restored gradient background */
  background: linear-gradient(90deg, var(--primary), var(--accent)); 
  color: var(--light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: 0.3s ease;
}

header.scrolled {
  width: 100%;
  margin: 0;
  top: 0;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: var(--primary); /* Solid color when scrolled */
}

header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--light);
}

/* Nav Links */
nav {
  display: flex;
  gap: 25px;
}

nav a {
  color: var(--light);
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: var(--highlight);
}

/* ---------- HAMBURGER ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: var(--light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---------- MOBILE MENU ---------- */
#nav-menu {
  transition: all 0.4s ease;
}

@media (max-width: 900px) {
  header { 
    padding: 15px 25px;
  }

  header .logo {
    justify-content: center;
    text-align: center;
  }

  .menu-toggle {
    display: flex;
  }

  #nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100vh;
    background: var(--primary);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding-left: 40px;
    z-index: 999;
  }

  #nav-menu a {
    color: var(--light);
    font-size: 18px;
    font-weight: 500;
  }

  #nav-menu.active {
    left: 0;
  }

  /* Hamburger animation */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 90vh;
  background: url('https://placehold.co/1920x1080/540863/FFD3D5?text=TechYug+Banner+Image') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  padding-top: 100px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 20px;
  color: var(--light);
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: var(--light);
}

.hero-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #ffffff;
}

.hero-content button {
  background: var(--highlight);
  color: var(--primary);
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-content button:hover {
  background: var(--light);
  color: var(--primary);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .hero {
    height: 75vh;
    background-position: top;
  }

  .hero-content h2 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content button {
    font-size: 0.9rem;
    padding: 10px 24px;
  }
}
.hero a {
  background-color: var(--primary);
  color: var(--light);
  padding: 12px 30px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

/* ---------- SERVICES ---------- */
.services {
  padding: 80px 60px;
  text-align: center;
  background: #fff;
}

.services h3 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

/* Styles for dynamically added cards (used by script.js) */
.service-grid .card {
    background: #fdf4f7;
    border-radius: 15px;
    padding: 30px;
    transition: 0.3s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.service-grid .card h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.25rem;
}

/* Styles for service-card class (if used directly in HTML) */
.service-card {
  background: #fdf4f7;
  border-radius: 15px;
  padding: 30px;
  transition: 0.3s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.service-card i {
  font-size: 30px;
  color: var(--accent);
  margin-bottom: 15px;
}

/* === Services Hover: Ensure purple text on pink hover background === */
.service-card:hover, .service-grid .card:hover {
  background: var(--highlight); /* Pink background on hover */
  color: var(--primary); /* Keeps body text explicitly purple on hover */
  transform: translateY(-8px);
}

.service-card:hover h4, .service-grid .card:hover h4 {
    color: var(--primary); /* Keeps title text explicitly purple on hover */
}
/* ========================================================== */


/* ---------- WHY CHOOSE US ---------- */
.why-us {
  background-color: #fdf4f7;
  padding: 80px 60px;
  text-align: center;
}

.why-us h3 {
  color: var(--primary);
  margin-bottom: 40px;
  font-size: 28px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

/* --- WHY CHOOSE US CARD STYLING --- */
.why-card {
  /* Normal State: White Tile */
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 200px; /* Consistent height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #333; /* Default text color */
}

/* Normal State: Purple Icon and Title */
.why-card i {
  font-size: 30px;
  color: var(--primary); /* Primary purple icon color */
  margin-bottom: 10px;
  transition: color 0.3s ease;
}
.why-card h4 {
  color: var(--primary); /* Primary purple title color */
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

/* Hover State: Pink Tile, Purple Content */
.why-card:hover {
  background: var(--highlight); /* Pink tile on hover */
  color: var(--primary); /* Ensures body text is purple */
  transform: translateY(-8px) scale(1.02); /* Lift and slight scale */
  box-shadow: 0 10px 25px rgba(84, 8, 99, 0.4);
}

/* Ensure content stays purple (or changes explicitly to primary) on hover */
.why-card:hover i,
.why-card:hover h4,
.why-card:hover p {
    color: var(--primary);
}


/* ---------- TESTIMONIALS ---------- */
.testimonials {
  background: linear-gradient(120deg, var(--accent), var(--primary));
  color: var(--light);
  text-align: center;
  padding: 80px 60px;
}

.testimonials h3 {
  font-size: 28px;
  margin-bottom: 30px;
}

.testimonial-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.testimonial {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 25px;
  font-style: italic;
}

.testimonial h5 {
  margin-top: 15px;
  color: var(--light);
  font-weight: 500;
}

/* ---------- CTA SECTION ---------- */
.cta {
  text-align: center;
  padding: 100px 20px;
  background: #fdf4f7;
}

.cta h2 {
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 15px;
}

.cta p {
  color: var(--accent);
  font-size: 16px;
  margin-bottom: 25px;
}

.cta a {
  background-color: var(--primary);
  color: var(--light);
  padding: 12px 30px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

.cta button:hover {
  background-color: var(--accent);
}

/* ---------- FOOTER ---------- */
.main-footer {
  background-color: #1a1a1a;
  color: var(--light);
  padding: 60px 80px 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer-title {
  color: var(--highlight);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-subtitle {
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 15px;
  color: var(--light);
}

.social-icons a {
  display: inline-block;
  background: var(--accent);
  color: white;
  width: 35px;
  height: 35px;
  line-height: 35px;
  border-radius: 50%;
  text-align: center;
  margin-right: 10px;
  transition: 0.3s;
}

.social-icons a:hover {
  background: var(--highlight);
  color: var(--primary);
}

.footer-col h3 {
  color: var(--highlight);
  font-size: 16px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--light);
}

.footer-col p, .footer-col a {
  font-size: 14px;
  color: var(--light);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--highlight);
}

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  font-size: 14px;
  color: var(--highlight);
  border-top: 1px solid var(--accent);
  padding-top: 15px;
}

/* ---------- RESPONSIVE GLOBAL ---------- */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 14px;
  }

  .services, .why-us, .testimonials, .cta {
    padding: 60px 20px;
  }

  .main-footer {
    padding: 40px 20px;
  }
}

/* ---------- 1. MOVING BANNER STYLES ---------- */

/* Define the animation for the moving text */
@keyframes moveLeft {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.moving-banner-wrapper {
  background-color: var(--light); /* Light pink background */
  overflow: hidden; /* Crucial: Hides the text when it's off-screen */
  padding: 10px 0;
  border-top: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
}

.moving-banner {
  white-space: nowrap;
  animation: moveLeft 20s linear infinite; /* Adjust speed (20s) as needed */
  display: inline-block;
  will-change: transform; /* Performance optimization */
}

.moving-banner p {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary); /* Purple color for the company name */
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
  padding-right: 50px; /* Space between repeated text */
}

/* Pause animation on hover */
.moving-banner-wrapper:hover .moving-banner {
  animation-play-state: paused;
}


/* ---------- 2. PORTFOLIO SECTION STYLES (OVERLAY APPEARS ON HOVER) ---------- */

.portfolio-section {
  padding: 80px 60px;
  text-align: center;
  background: #fff;
}

.portfolio-section h3 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 40px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.portfolio-item {
  position: relative;
  height: 250px; /* Fixed height for visual consistency */
  background: url('https://via.placeholder.com/400x250/92487A/FFD3D5?text=Project+Placeholder') center/cover no-repeat; /* Placeholder image */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.portfolio-item:nth-child(2) {
  background: url('https://via.placeholder.com/400x250/540863/FFD3D5?text=App+Design') center/cover no-repeat;
}
.portfolio-item:nth-child(3) {
  background: url('https://via.placeholder.co/400x250/E49BA6/540863?text=CRM+System') center/cover no-repeat;
}

/* --- PORTFOLIO OVERLAY: Hidden by default, appears on hover --- */
/* This is the code you provided, already correctly implemented */
.item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Semi-transparent Dark Purple overlay to let background image show through */
  /* background: rgba(84, 8, 99, 0.85);  */
  color: var(--light); /* Light text for contrast over dark background */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 1; /* Hidden by default */
  transition: opacity 0.3s ease; 
  color: black;
}

/* Hover effect: Show the overlay */
.portfolio-item:hover .item-overlay {
  opacity: 1;
  color: var(--light); /* Light text for contrast over dark background */
  background: rgba(84, 8, 99, 0.85); 

}

.item-overlay h4 {
  font-size: 20px;
  margin-bottom: 5px;
}

.item-overlay p {
  font-size: 14px;
  text-align: center;
}

/* View More Button */
.view-more-container {
  margin-top: 20px;
}

.view-more-btn {
  display: inline-block;
  background: var(--highlight);
  color: var(--primary);
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.3s;
  text-decoration: none;
}

.view-more-btn:hover {
  background: var(--accent);
  color: var(--light);
  transform: translateY(-3px);
}


/* ---------- RESPONSIVE ADJUSTMENTS (Existing section update) ---------- */

@media (max-width: 768px) {
  .portfolio-section {
    padding: 60px 20px;
  }
  .moving-banner p {
    font-size: 1.2rem;
  }
}
.cta button {
  background-color: var(--primary);
  color: var(--light);
  padding: 12px 30px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}
.apply-whatsapp-btn {
  display: inline-block;
  background-color: #25D366;
  color: white;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  transition: 0.3s ease;
}

.apply-whatsapp-btn:hover {
  background-color: #1eb15a;
  transform: translateY(-3px);
}
