:root {
  /* Color System */
  --primary: #2c3e50;
  --primary-light: #34495e;
  --accent: #FFC107;
  --accent-light: #FFD54F;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #ecf0f1;
  --white: #ffffff;
  --black: #2c3e50;
  --gray: #bdc3c7;
  
  /* Typography */
  --font-family: 'Inter', 'Arial', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  
  /* Border Radius */
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 15px;
  
  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Container */
  --container-max-width: 1200px;
  --container-padding: 1.25rem;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-dark);
  font-weight: var(--font-weight-normal);
  overflow-x: hidden;
  background: var(--white);
  transition: background var(--transition-normal), color var(--transition-normal);
}

/* Link Styles */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
}

/* Focus Styles for Accessibility */
*:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible {
  outline: none;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Utility */
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; }

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: var(--space-md) 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(15px);
  background-color: rgba(44, 62, 80, 0.95);
  border-bottom: 1px solid rgba(255, 193, 7, 0.3);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.logo-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.logo-text h1, .logo-text h2, .logo-text h3 {
  font-size: 1.5rem;
  margin-bottom: -5px;
  font-weight: var(--font-weight-bold);
}

.logo-text p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.nav-menu {
  display: flex;
  gap: var(--space-xl);
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: var(--font-weight-medium);
  position: relative;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--accent) !important;
  background: rgba(255, 193, 7, 0.1);
  font-weight: bold;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-xs);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 2px 0;
  transition: var(--transition-normal);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(52, 73, 94, 0.85)),
              url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1600') center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-content h2 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  animation: fadeInUp 0.6s ease;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: var(--space-xl);
  opacity: 0.9;
  max-width: 600px;
  margin-inline: auto;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.cta-btn {
  background: linear-gradient(45deg, var(--accent), var(--accent-light));
  color: var(--text-dark);
  border: none;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-block;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4);
}

/* Sections */
section { padding: var(--space-xxl) 0; }

.section-header { text-align: center; margin-bottom: var(--space-xl); }
.section-header h2 { font-size: clamp(2rem, 4vw, 2.5rem); color: var(--primary); margin-bottom: var(--space-md); }
.section-header p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

.about {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}
.about .section-header h2, .about .section-header p {
  color: var(--white);
}
.about-text p { font-size: 1.1rem; margin-bottom: var(--space-md); line-height: 1.8; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.stat {
  text-align: center;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
  color: var(--white);
}
.stat:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.15); }
.stat h3 { font-size: 2.5rem; color: var(--accent); margin-bottom: var(--space-xs); }

/* Services */
.services {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}
.services .section-header h2, .services .section-header p {
  color: var(--white);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--accent);
  display: flex; flex-direction: column;
  transition: all var(--transition-normal);
  color: var(--white);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); background: rgba(255, 255, 255, 0.15); }
.service-icon { width: 80px; height: 80px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-md); }
.service-icon i { font-size: 2rem; color: var(--accent); }

/* Projects */
.projects {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}
.projects .section-header h2, .projects .section-header p {
  color: var(--white);
}
.projects-grid { display: flex; gap: var(--space-lg); overflow-x: auto; padding: var(--space-md) 0; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--gray) var(--bg-light); }
.projects-grid::-webkit-scrollbar { height: 6px; }
.projects-grid::-webkit-scrollbar-track { background: var(--bg-light); }
.projects-grid::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 3px; }
.project-card { flex: 0 0 300px; background: rgba(255, 255, 255, 0.1); border-radius: var(--radius-md); box-shadow: var(--shadow-md); overflow: hidden; transition: transform var(--transition-normal); scroll-snap-align: start; }
.project-card:hover { transform: translateY(-5px); }
.project-image { width: 100%; height: 200px; object-fit: cover; }

/* Contact */
.contact { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--white); }
.contact .section-header h2, .contact .section-header p { color: var(--white); }

.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xxl); }
.contact-item { display: flex; align-items: center; gap: var(--space-md); }
.contact-icon { width: 60px; height: 60px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.contact-details h3 { color: var(--accent); }

.contact-form {
  background: rgba(255,255,255,0.1);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.form-group { margin-bottom: var(--space-md); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 15px; border: none;
  border-radius: var(--radius-sm); background: rgba(0,0,0,0.2);
  color: var(--white); transition: background var(--transition-fast), border var(--transition-fast);
}
.form-group select option {
  background: rgba(0,0,0,0.8);
  color: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  background: rgba(255,255,255,0.15); border: 1px solid var(--accent);
}

.submit-btn {
  width: 100%; background: linear-gradient(45deg, var(--accent), var(--accent-light));
  color: var(--text-dark); padding: 15px; border: none; border-radius: var(--radius-sm);
  font-weight: bold; cursor: pointer; transition: all var(--transition-normal);
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255,193,7,0.4); }

/* Footer */
.footer { background: var(--black); color: var(--white); padding: var(--space-xl) 0 var(--space-sm); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-lg); }
.footer-section h3 { color: var(--accent); margin-bottom: var(--space-md); }
.footer-section ul { list-style: none; }
.footer-section ul li a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-section ul li a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: var(--space-lg); border-top: 1px solid #333; }

/* WhatsApp Button */
#whatsappBtn {
  position: fixed;
  bottom: 90px;
  right: 30px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  z-index: 1001;
}
#whatsappBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* Back to Top */
#backToTop {
  position: fixed; bottom: 30px; right: 30px;
  background: var(--accent); border: none; border-radius: 50%;
  width: 50px; height: 50px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
#backToTop.show { opacity: 1; visibility: visible; }
#backToTop i { font-size: 1.2rem; color: var(--text-dark); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body { background: #121212; color: #e0e0e0; }
  .about, .projects { background: #1e1e1e; }
  .service-card, .project-card, .stat { background: #2a2a2a; color: #e0e0e0; }
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-menu { position: fixed; left: -100%; top: 0; flex-direction: column; background: rgba(44, 62, 80, 0.98); width: 100%; height: 100vh; text-align: center; transition: var(--transition-normal); padding: var(--space-xxl) 0; gap: var(--space-lg); }
  .nav-menu.active { left: 0; }
  .contact-content { grid-template-columns: 1fr; gap: var(--space-xl); }
  section { padding: var(--space-xl) 0; }

  #whatsappBtn {
    bottom: 80px;
    left: 20px;
    width: 55px;
    height: 55px;
    font-size: 22px;
  }

  #backToTop {
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .logo-text h1 { font-size: 1.2rem; }
  .cta-btn { width: 100%; max-width: 280px; padding: 12px 25px; }
  .about-stats { grid-template-columns: 1fr; }
  .contact-form { padding: var(--space-lg); }
}
