/* Mobile-first base styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #232323;
  --accent: #f59e0b;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #232323;
  --text-light: #64748b;
  --success: #22c55e;
  --error: #ef4444;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius-sm: 0.5rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --container-padding: 1rem;
  --primary-color: #2563eb;
  --secondary-color: #f59e0b;
  --accent-color: #232323;
  --text-color: #232323;
  --light-text: #ecf0f1;
  --border-radius: 4px;
  --transition: all 0.3s ease;
  --dark-mode-bg: #1a1a1a;
  --dark-mode-text: #ffffff;
  --focus-outline: 3px solid var(--secondary-color);
  --carousel-transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  padding-top: 56px; /* Add padding to prevent navbar overlap */
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  box-sizing: border-box;
}

/* Reset margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--secondary);
  letter-spacing: -0.02em;
}

h1 { 
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
}

h2 { 
  font-size: 2rem;
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

h3 { 
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

p {
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
}

/* Navigation */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  padding: 0.25rem 0 0.25rem 0;
  min-height: 56px;
  display: flex;
  align-items: center;
}

.navbar .container {
  position: relative;
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Changed to space-between */
  padding-left: 0 !important;
  padding-right: var(--spacing-md);
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0 !important;
  display: flex;
  align-items: center;
  z-index: 2;
  height: 56px;
}

.logo img {
  height: 56px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  opacity: 1;
  position: static;
  transform: none;
  left: unset;
  top: unset;
}

.nav-links a {
  color: #222;
  font-size: 1.1rem;
  font-weight: 500;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--primary);
  background: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}

/* CTA Button */
.navbar .btn {
  background-color: var(--secondary-color);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  margin-left: 2rem;
  transition: background 0.2s, box-shadow 0.2s;
}
.navbar .btn:hover {
  background-color: #e08a00;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

/* Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 6rem 0 4rem 0;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(37, 99, 235, 0.3) 0%,
    rgba(15, 23, 42, 0.3) 50%,
    rgba(37, 99, 235, 0.3) 100%
  );
  z-index: 1;
  animation: gradientShift 15s ease infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero-content {
  max-width: 600px;
  margin-left: 4vw;
  z-index: 2;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.hero h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.hero p {
  font-size: 1.25rem;
  color: #e0e7ef;
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn {
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
}

.hero .btn:hover {
  background: #d97706;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.hero .btn:active {
  transform: translateY(0);
}

.hero .btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: white;
}

.hero .btn-secondary:hover {
  background-color: rgba(37, 99, 235, 0.1);
}

/* Services Section */
.services {
  background: #fff;
  padding: 4rem 0 3rem 0;
}

.section-title {
  color: #222;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: center;
}

.services-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.service {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 2.5rem 2rem 2rem 2rem;
  text-align: center;
  flex: 1 1 0;
  min-width: 220px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.service:hover {
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.10);
  transform: translateY(-4px) scale(1.03);
}

.service i {
  font-size: 2.8rem;
  color: #f59e0b;
  margin-bottom: 1.2rem;
}

.service h3 {
  color: #222;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.service p {
  color: #444;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Gallery Section */
.gallery {
  background: #fff;
  padding: 4rem 0 3rem 0;
}

.gallery .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gallery h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--text);
}

.gallery-carousel {
  margin: 0 auto;
  max-width: 900px;
}

.gallery-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  padding: 0 var(--spacing-md);
  font-size: 1.25rem;
  color: var(--text);
}

.gallery-track {
  display: flex;
  transition: var(--carousel-transition);
  gap: var(--spacing-md);
}

.gallery-item {
  max-height: 320px;
  aspect-ratio: 4/3;
  min-height: 180px;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  margin: 0 0.5rem;
}

.gallery-item img {
  max-height: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 1.25rem 1.25rem 0 0;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  padding: 1rem 1.2rem 0.7rem 1.2rem;
  min-height: unset;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
  border-radius: 0 0 1.25rem 1.25rem;
}

.gallery-overlay h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  color: #f59e0b;
  font-weight: 700;
}

.gallery-overlay p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #e0e7ef;
}

.project-details {
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.gallery-overlay .view-project {
  margin-top: 0.5rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  background: #f59e0b;
  color: #fff;
  border-radius: 8px;
  border: none;
}

.gallery-overlay .view-project:hover {
  background: #d97706;
}

/* About Section */
.about {
  background: #fff;
  padding: 4rem 0 3rem 0;
}

.about .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.about-content {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 2.5rem 2rem 2rem 2rem;
  margin: 0 auto;
}

.about h2 {
  color: #222;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: center;
}

.about-features, .about-stats, .about-certifications, .about-cta {
  margin-top: 2.5rem;
}

.about-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.feature {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 2rem 1.5rem;
  text-align: center;
  flex: 1 1 0;
  min-width: 180px;
}

.feature i {
  font-size: 2.2rem;
  color: #f59e0b;
  margin-bottom: 1rem;
}

.feature h4 {
  color: #222;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature p {
  color: #444;
  font-size: 1rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.stat-item {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 1.5rem 1rem;
  text-align: center;
  flex: 1 1 0;
  min-width: 120px;
}

.stat-number {
  color: #f59e0b;
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  color: #222;
  font-size: 1rem;
}

.certifications-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.certification {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 1.5rem 1rem;
  text-align: center;
  flex: 1 1 0;
  min-width: 180px;
}

.certification i {
  font-size: 2rem;
  color: #f59e0b;
  margin-bottom: 1rem;
}

.certification h4 {
  color: #222;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.certification p {
  color: #444;
  font-size: 1rem;
}

.about-cta {
  background: #f59e0b;
  color: #fff;
  border-radius: 1.25rem;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 2.5rem;
}

.about-cta .btn {
  background: #fff;
  color: #f59e0b;
  font-weight: 700;
  border-radius: 8px;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border: none;
  margin-top: 1.5rem;
}

.about-cta .btn:hover {
  background: #ffe0b2;
}

/* FAQ Section */
.faq {
  background: #fff;
  padding: 4rem 0 3rem 0;
}

.faq .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 1.5rem 1rem;
}

.faq-question {
  cursor: pointer;
  user-select: none;
  position: relative;
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #f59e0b;
  font-size: 1.3rem;
  transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
  content: '−';
  transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  margin-top: 0;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  opacity: 1;
  margin-top: 1rem;
  padding: 0.5rem 0 0 0;
}

/* Contact Section */
.contact {
  background: #fff;
  padding: 4rem 0 3rem 0;
}

.contact .container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.contact-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
  padding: 0 var(--spacing-md);
  font-size: 1.125rem;
  color: var(--text);
}

.contact-form {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 2.5rem 2rem 2rem 2rem;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-sm);
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #222;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9fafb;
  color: var(--text);
}

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

.btn {
  display: inline-block;
  width: 100%;
  padding: 1rem 2.5rem;
  background-color: var(--secondary-color);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  height: 40px;
  line-height: 1;
}

.btn:hover {
  background-color: #e08a00;
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
  .contact-form {
    padding: var(--spacing-lg);
  }

  .form-group {
    margin-bottom: var(--spacing-md);
  }

  .form-group label {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .form-group input {
    height: 40px;
  }

  .form-group textarea {
    min-height: 120px;
  }

  .btn {
    width: auto;
    min-width: 160px;
    height: 40px;
    font-size: 1rem;
    padding: 0.75rem var(--spacing-lg);
  }

  .gallery-item {
    flex: 0 0 calc(50% - var(--spacing-md));
  }

  .gallery-caption {
    transform: translateY(0);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  }

  .gallery-caption h3 {
    font-size: 1.5rem;
  }

  .gallery-caption p {
    font-size: 1rem;
  }

  .modal-content {
    padding: var(--spacing-lg);
  }

  .project-images {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-title {
    font-size: 2rem;
  }

  .image-nav button {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  :root {
    --container-padding: 4rem;
  }

  .services-grid,
  .gallery-track {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .contact-form {
    max-width: 600px;
  }

  .navbar .container {
    padding: 0 var(--spacing-xl);
  }

  .nav-links {
    display: flex;
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
    flex-direction: row;
    padding: 0;
    opacity: 1;
    transform: none;
    gap: var(--spacing-md);
  }

  .nav-links a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    max-width: none;
    width: auto;
  }

  .nav-links a::before {
    display: none;
  }

  .nav-links a:hover {
    color: var(--primary);
    transform: none;
    background: rgba(37, 99, 235, 0.1);
  }

  .menu-toggle {
    display: none;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero h1::after {
    width: 160px;
  }

  .hero p {
    font-size: 1.5rem;
  }

  .project-images {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-content {
    padding: var(--spacing-xl);
  }

  .gallery-item {
    flex: 0 0 calc(33.333% - var(--spacing-md));
  }

  .gallery-carousel {
    padding: 0;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate {
  animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Focus States */
:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}

/* Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.loading-placeholder {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.1) 25%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--dark-mode-bg);
    --text-color: var(--dark-mode-text);
  }
}

/* Accessibility improvements */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles */
:focus {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Cookie consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-consent.visible {
  transform: translateY(0);
}

/* Loading indicators */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid var(--secondary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery improvements */
.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-modal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gallery-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Form improvements */
.form-group {
  position: relative;
}

.form-group .error-message {
  color: var(--accent-color);
  font-size: 0.875rem;
  margin-top: 4px;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--accent-color);
}

/* Success/Error messages */
.message {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  display: none;
}

.message.success {
  background: #2ecc71;
  color: white;
}

.message.error {
  background: var(--accent-color);
  color: white;
}

/* Dark mode toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
}

/* Search functionality */
.search-container {
  position: relative;
  margin: var(--spacing-md) 0;
}

.search-input {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  margin-top: 4px;
  display: none;
}

.search-results.active {
  display: block;
}

/* Responsive improvements */
@media (max-width: 900px) {
  .about-features, .about-stats, .certifications-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
  .services-grid {
    flex-direction: column;
    gap: 2rem;
  }
  .gallery-item {
    max-height: 220px;
    min-height: 120px;
  }
  .gallery-item img {
    max-height: 120px;
    height: 120px;
  }
  .navbar .container {
    padding-left: 0 !important;
    padding-right: 1rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .back-to-top,
  .cookie-consent,
  .theme-toggle {
    display: none;
  }
  
  body {
    color: black;
    background: white;
  }
  
  a {
    text-decoration: none;
    color: black;
  }
}

/* Project Modal */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  margin: auto;
  background: var(--background);
  border-radius: var(--border-radius);
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.project-modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  padding: var(--spacing-xs);
}

.modal-body {
  padding: var(--spacing-md);
}

.project-gallery {
  margin-bottom: var(--spacing-lg);
}

.main-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-list {
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.thumbnail.active {
  opacity: 1;
  border: 2px solid var(--primary-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  display: grid;
  gap: var(--spacing-lg);
}

.project-header {
  margin-bottom: var(--spacing-md);
}

.project-meta {
  display: flex;
  gap: var(--spacing-md);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: var(--bg-light);
  border-radius: var(--border-radius-sm);
}

.spec-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.performance-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.metric {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--bg-light);
  border-radius: var(--border-radius-sm);
}

.metric i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  margin: var(--spacing-xs) 0;
}

.project-testimonial {
  background: var(--bg-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin: var(--spacing-md) 0;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: var(--spacing-sm);
}

.testimonial-author {
  font-weight: bold;
  color: var(--text-muted);
}

.project-cta {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .main-image {
    height: 300px;
  }

  .project-cta {
    flex-direction: column;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .services-grid {
    flex-direction: column;
    gap: 2rem;
  }
  .hero-content {
    margin-left: 0;
    max-width: 100%;
  }
  .hero {
    padding: 4rem 0 2rem 0;
  }
}

/* Service Details Modal */
.service-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}
.service-modal.active {
  display: flex;
  opacity: 1;
}
.service-modal-content {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: 400px;
  width: 90vw;
  padding: 2.5rem 2rem 2rem 2rem;
  position: relative;
  animation: fadeInUp 0.3s;
}
.service-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #f59e0b;
  cursor: pointer;
  transition: color 0.2s;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-modal-close:hover {
  color: #d97706;
  background: #f9fafb;
}
.service-modal-title {
  color: #f59e0b;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}
.service-modal-description {
  color: #444;
  font-size: 1.08rem;
  line-height: 1.6;
  text-align: center;
}
@media (max-width: 600px) {
  .service-modal-content {
    padding: 1.5rem 0.7rem 1.2rem 0.7rem;
    max-width: 95vw;
  }
}

@media (max-width: 700px) {
  /* Navbar: stack logo and nav, add hamburger */
  .navbar .container {
    padding: 0 1rem;
  }
  .logo {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    margin-right: 0;
    white-space: nowrap;
  }
  .nav-links {
    display: none !important;
    position: fixed;
    top: 56px; /* Match navbar height */
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    z-index: 1001;
    padding: 0.5rem 0;
  }
  .nav-links.active {
    display: flex !important;
  }
  .nav-links a {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 0;
    border-bottom: 1px solid #f3f4f6;
    margin: 0;
  }
  .menu-toggle {
    display: block !important; /* Force display on mobile */
    margin-left: auto; /* Push to the right */
  }
  .navbar .btn {
    display: none;
  }

  /* Hero Section */
  .hero {
    padding-top: 6rem; /* Add more padding to prevent overlap */
  }
  .hero-content {
    margin-left: 0;
    max-width: 100%;
    padding: 0 0.5rem;
  }
  .hero h1 {
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 1rem;
    word-break: break-word;
  }
  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .hero .btn {
    width: 90%;
    max-width: 320px;
    min-width: 0;
    margin: 0 auto 1.2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
    font-size: 1rem;
    border-radius: 8px;
    box-sizing: border-box;
  }

  /* Services Section */
  .services {
    padding: 2.5rem 0 1.5rem 0;
  }
  .services-grid {
    flex-direction: column;
    gap: 1.2rem;
    padding: 0 0.5rem;
  }
  .service {
    min-width: 0;
    padding: 1.2rem 0.7rem;
  }
  .service i {
    font-size: 2rem;
    margin-bottom: 0.7rem;
  }
  .service h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }
  .service p {
    font-size: 0.95rem;
  }

  /* General section padding */
  .about .container,
  .gallery .container,
  .faq .container,
  .contact .container {
    padding: 0 0.7rem;
  }
  .about-content, .contact-form {
    padding: 1.2rem 0.7rem;
  }
  .gallery-carousel {
    max-width: 100vw;
  }
  .gallery-item {
    max-height: 140px;
    min-height: 80px;
  }
  .gallery-item img {
    max-height: 80px;
    height: 80px;
  }
  .gallery-overlay {
    padding: 0.5rem 0.7rem 0.3rem 0.7rem;
  }
  .gallery-overlay h3 {
    font-size: 0.95rem;
  }
  .gallery-overlay p {
    font-size: 0.85rem;
  }
  .gallery-overlay .view-project {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  .faq-item {
    padding: 1rem 0.5rem;
  }
  .faq-question {
    font-size: 1rem;
  }
  .contact-form input,
  .contact-form textarea {
    font-size: 0.98rem;
    padding: 0.7rem 0.7rem;
  }
  .contact-form button {
    font-size: 1rem;
    padding: 0.8rem 0;
    width: 100%;
  }
}

/* Center button text on desktop/laptop */
.hero .btn, .navbar .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Project Modal Enhancements */
.project-modal-image-container {
  width: 100%;
  text-align: center;
}
.project-modal-image {
  width: 100%;
  max-width: 100%;
  border-radius: 1rem;
  max-height: 220px;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: #f3f4f6;
}
.project-modal-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
}
.project-modal-prev, .project-modal-next {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}
.project-modal-prev:hover, .project-modal-next:hover {
  background: #d97706;
}
.service-modal-content {
  animation: fadeInUp 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bigger Project Modal */
@media (min-width: 700px) {
  .service-modal-content {
    max-width: 650px;
    padding: 3.5rem 2.5rem 2.5rem 2.5rem;
  }
  .project-modal-image {
    max-height: 320px;
  }
  .service-modal-title {
    font-size: 2rem;
    margin-bottom: 1.2rem;
  }
  .project-modal-description, .project-modal-details {
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
  }
}
