/* Modern Variables */
:root {
  --primary-color: #2a2a72;
  --secondary-color: #009ffd;
  --accent-color: #00ff88;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --dark-bg: #1a1a2e;
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden;
}

/* Modern Header */
header {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  color: white;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(42, 42, 114, 0.9), rgba(0, 159, 253, 0.8));
  z-index: 1;
}

header > * {
  position: relative;
  z-index: 2;
}

header img {
  height: 120px;
  width: auto;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  object-fit: contain;
}

header img:hover {
  transform: scale(1.05);
}

header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modern Navigation */
nav {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

nav a:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

/* Sections */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--primary-color);
}

/* Services Section */
#services ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0;
}

#services li {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#services li:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

#services img {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  object-fit: cover;
  transition: var(--transition);
}

.service-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Contact Section */
#contact {
  text-align: center;
}

#contact p {
  max-width: 600px;
  margin: 0 auto 2rem auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

#contact a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

#contact a:hover {
  color: var(--secondary-color);
}

form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

input, textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #eee;
  border-radius: 8px;
  transition: var(--transition);
}

input:focus, textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
}

button {
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

button:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* WhatsApp Button */
.whatsapp-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #25d366;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
  z-index: 1000;
}

.whatsapp-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.visible {
  opacity: 1;
  transform: translate(0);
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
  }

  section {
    padding: 3rem 1rem;
  }

  #services ul {
    grid-template-columns: 1fr;
  }

  .whatsapp-button {
    bottom: 1rem;
    right: 1rem;
    padding: 0.8rem 1.5rem;
  }

  .about-content img {
    max-height: 300px;
  }

  #services img {
    height: 200px;
  }

  header img {
    height: 100px;
  }
}

/* Loading Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Image Optimizations */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* About Section Image */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.about-content img {
  width: 100%;
  max-height: 400px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Fix for image glitch during scroll */
section {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}