/* CSS Reset and Base Styles */
:root {
  --primary-color: #ffffff;
  --secondary-color: #f8f9fa;
  --accent-color-1: #007bff;
  --accent-color-2: #6f42c1;
  --text-color: #212529;
  --text-color-secondary: #6c757d;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.8);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--primary-color);
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-weight: 600;
  color: var(--text-color);
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.8rem;
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
  color: #fff;
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color-2), var(--accent-color-1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.btn:hover::before {
  opacity: 1;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease, border-bottom 0.3s ease;
  padding: 15px 0;
  background-color: #FFF;
}

.header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

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

.nav-logo img {
  display: block;
  max-width: 100%;
  height: auto;
  width: 225px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav-item {
  margin-left: 40px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color-secondary);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color-1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-btn a {
  padding: 8px 22px;
  border: 1px solid var(--accent-color-1);
  color: var(--accent-color-1);
  border-radius: 50px;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-btn a:hover {
  background: var(--accent-color-1);
  color: #fff;
}

.nav-btn .nav-link::after {
  display: none;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 2px;
  margin: 6px auto;
  background-color: var(--text-color);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Hero Section */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: 80px;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content .subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--accent-color-1);
  margin-bottom: 1rem;
  background-color: #FFF;
  padding: 8px 16px;
  border-radius: 24px;
}

.hero-content p {
  font-size: 1.2rem;
  /* FIX: Changed color for better contrast and readability */
  color: var(--text-color);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Services Section */
#services {
  background-color: var(--secondary-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 4rem;
}

.service-card {
  background: var(--primary-color);
  padding: 40px 30px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color-1);
  box-shadow: var(--shadow);
}

.service-card .icon {
  margin-bottom: 1.5rem;
  display: inline-block;
  color: var(--accent-color-1);
}

.service-card .icon svg {
  width: 50px;
  height: 50px;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-color-secondary);
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 4rem;
}

.portfolio-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.8));
  color: var(--text-color);
  padding: 40px 25px 25px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.portfolio-overlay p {
  font-size: 0.9rem;
  color: var(--text-color-secondary);
}

/* About Section */
#about {
  background: var(--secondary-color);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-image {
  flex: 1;
  max-width: 500px;
}

.about-image img {
  width: 100%;
  height: auto;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-color-secondary);
}

/* Contact Section */
.contact-wrapper {
  display: flex;
  gap: 50px;
  margin-top: 4rem;
  background: var(--primary-color);
  padding: 50px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.contact-info,
.contact-form {
  flex: 1;
}

.contact-info h3 {
  margin-bottom: 2rem;
}

.contact-info p {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  color: var(--text-color-secondary);
}

.contact-info p svg {
  width: 24px;
  height: 24px;
  margin-right: 15px;
  color: var(--accent-color-1);
}

.form-group {
  position: relative;
  margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ced4da;
  font-size: 1rem;
  background: var(--secondary-color);
  color: var(--text-color);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color-1);
  background: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.form-group textarea {
  resize: vertical;
  height: 150px;
}

.btn-submit {
  width: 100%;
  cursor: pointer;
  font-size: 1rem;
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: var(--text-color);
  padding: 80px 0 20px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-about,
.footer-links,
.footer-contact {
  flex: 1;
  min-width: 250px;
}

.footer-content h3 {
  color: var(--text-color);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  font-size: 1.2rem;
}

.footer-content h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
}

.footer-about .logo-footer img {
  display: block;
  max-width: 100%;
  height: auto;
  width: 225px;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  /* FIX: Changed color for better contrast */
  color: var(--text-color);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
  transition: color 0.3s, transform 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color-1);
  transform: translateX(5px);
}

.social-links {
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: #e9ecef;
  /* FIX: Changed color for better contrast */
  color: var(--text-color);
  border-radius: 50%;
  text-align: center;
  margin-right: 10px;
  transition: background-color 0.3s, color 0.3s;
}

.social-links a:hover {
  background: var(--accent-color-1);
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-color-secondary);
}

.footer-legal {
  margin-bottom: 15px;
}

.footer-legal a {
  /* FIX: Changed color for better contrast */
  color: var(--text-color);
  text-decoration: none;
  margin: 0 10px;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--accent-color-1);
  text-decoration: underline;
}

.all-rights-reserved {
  color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 992px) {
  h1 {
    font-size: 2.8rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  section {
    padding: 80px 0;
  }

  .about-content,
  .contact-wrapper {
    flex-direction: column;
  }

  .about-text h2 {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    flex-direction: column;
    background-color: var(--secondary-color);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    justify-content: center;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 20px 0;
  }

  .nav-btn {
    margin-top: 15px;
  }

  .hamburger {
    display: block;
    z-index: 1001;
  }

  .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);
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}
