:root {
  --primary-color: #ffd700;
  --background-color: #0a0a0a;
  --card-color: #1a1a1a;
  --text-color: #ffffff;
  --text-secondary-color: #b0b0b0;
  --font-family: "Poppins", sans-serif;
  --hover-duration: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
}

/* Header & Navigation */
.header {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #333;
  padding: 1rem 5%;
  position: fixed;
  width: 100%;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  }

  50% {
    transform: scale(1.03);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
  }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  transition: color var(--hover-duration) ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--hover-duration) ease-out;
}

.nav-link:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5%;
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at center,
    rgba(26, 26, 26, 0.8) 0%,
    rgba(10, 10, 10, 1) 100%
  );
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  opacity: 0;
  /* Keep hidden initially for JS */
  white-space: pre-line;
}

.hero-content h1 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: textReveal 0.6s forwards;
  margin-right: 0.1ch;
}

.hero-content h1 span:last-child {
  margin-right: 0;
}

@keyframes textReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary-color);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s forwards 0.8s;
}

.cta-button {
  background-color: var(--primary-color);
  color: var(--background-color);
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--hover-duration) ease,
    box-shadow var(--hover-duration) ease,
    background-color var(--hover-duration) ease;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s forwards 1.2s;
}

.cta-button:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.6);
  background-color: #ffc400;
}

/* General Section Styling */
section {
  padding: 100px 5%;
  background-color: var(--background-color);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  font-weight: 600;
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--card-color);
  padding: 2.5rem;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #333;
  transition: transform var(--hover-duration) ease,
    box-shadow var(--hover-duration) ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 18px 35px rgba(255, 215, 0, 0.15),
    0 0 25px rgba(255, 215, 0, 0.3);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Why Choose Us Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--card-color);
  padding: 2rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid #333;
  transition: transform var(--hover-duration) ease,
    box-shadow var(--hover-duration) ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Stats Section */
.stats-section {
  background-color: var(--card-color);
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--primary-color);
}

.stat-item p {
  color: var(--text-secondary-color);
}

/* Testimonials Section */
.testimonials-section {
  padding-top: 130px;
  /* Extra padding to make space for avatars */
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 5rem 2rem;
  /* Increased row gap further */
}

.testimonial-card {
  background-color: var(--card-color);
  padding: 4.5rem 2rem 2rem;
  /* Adjusted padding-top to push text down */
  border-radius: 10px;
  border-top: 4px solid var(--primary-color);
  /* Swapped border */
  text-align: center;
  position: relative;
  /* For avatar positioning */
  transition: transform var(--hover-duration) ease,
    box-shadow var(--hover-duration) ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.15);
}

.testimonial-avatar {
  width: 100px;
  /* Increased size */
  height: 100px;
  /* Increased size */
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  object-fit: cover;
  position: absolute;
  top: -40px;
  /* Adjusted TOP value HERE */
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  /* Added subtle shadow */
}

.testimonial-card p {
  font-style: italic;
  color: var(--text-secondary-color);
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--text-color);
  transition: color var(--hover-duration) ease,
    text-shadow var(--hover-duration) ease;
}

.testimonial-author:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

/* Internships Section */
.internships-section {
  display: flex;
  align-items: center;
  gap: 4rem;
  background-color: var(--card-color);
}

.internship-content {
  flex: 1;
}

.internship-image {
  flex: 1;
}

.internship-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Contact Section */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #444;
  background-color: var(--card-color);
  color: var(--text-color);
  font-family: var(--font-family);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  /* Dark semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--card-color);
  padding: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.modal-content p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.modal-button {
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-family);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.modal-button.confirm {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.modal-button.confirm:hover {
  background-color: #ffc400;
}

.modal-button.cancel {
  background-color: var(--text-secondary-color);
  color: var(--background-color);
}

.modal-button.cancel:hover {
  background-color: #888;
}

/* Footer */
.footer {
  background-color: var(--card-color);
  border-top: 1px solid #333;
  padding: 4rem 5% 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: left;
}

.footer-col h4 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-col a {
  color: var(--text-secondary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color var(--hover-duration) ease;
}

.footer-col a:hover {
  color: var(--primary-color);
}

/* *** UPDATED: Style for contact details container *** */
.contact-details {
  display: flex;
  /* Use flexbox for alignment */
  flex-direction: column;
  /* Stack items vertically */
  align-items: flex-start;
  /* Align items to the start */
  gap: 0.8rem;
  /* Space between lines */
  margin-top: 0.5rem;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  /* Space between icon and number */
}

/* Style for phone number/email link in footer */
.contact-line a {
  color: var(--text-secondary-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--hover-duration) ease,
    text-shadow var(--hover-duration) ease;
  display: inline;
  /* Keep 'a' tag inline */
  margin-bottom: 0;
  /* Override block styles */
}

.contact-line a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

.contact-line i {
  color: var(--primary-color);
  /* Icon color */
  width: 1.5em;
  /* Ensure icons align nicely */
  text-align: center;
}

.footer-bottom {
  text-align: center;
  color: var(--text-secondary-color);
  padding-top: 2rem;
  border-top: 1px solid #333;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: var(--background-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: scale(1.1);
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.is-visible:nth-child(2) {
  transition-delay: 0.1s;
}

.animate-on-scroll.is-visible:nth-child(3) {
  transition-delay: 0.2s;
}

.animate-on-scroll.is-visible:nth-child(4) {
  transition-delay: 0.3s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bold Text Hover Effect */
strong {
  transition: color var(--hover-duration) ease,
    text-shadow var(--hover-duration) ease;
}

strong:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 5rem;
    flex-direction: column;
    background-color: var(--card-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    gap: 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #333;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .internships-section {
    flex-direction: column;
  }

  .footer-grid {
    text-align: center;
    /* Center align columns on mobile */
  }

  /* *** NEW: Center align contact details on mobile *** */
  .contact-details {
    align-items: center;
    /* Center align items in the flex container */
    justify-content: center;
    /* Center the whole block if needed */
  }

  .footer-col .contact-line {
    justify-content: center;
    /* Center icon and number within the line */
  }

  .testimonials-section {
    padding-top: 100px;
    /* Adjust for mobile */
  }

  .testimonial-avatar {
    top: -40px;
    /* Adjust for smaller screens if needed */
    width: 80px;
    height: 80px;
  }

  .testimonial-card {
    padding-top: 4rem;
    /* Adjust padding-top for smaller avatar on mobile */
  }
}
