/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --primary-color: #1a2530; /* Dark Blue */
  --secondary-color: #007bff; /* Engineering Blue */
  --accent-color: #2c3e50; /* Lighter Blue */
  --text-dark: #333333;
  --text-light: #f4f4f4;
  --bg-light: #ffffff;
  --bg-gray: #f8f9fa;
  --border-color: #e0e0e0;
  
  --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  
  --shadow-card: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-hover: 0 10px 15px rgba(0,0,0,0.15);
  
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-light);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================
   2. UTILITIES
   ========================================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title span {
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary-color);
}

/* =========================================
   3. NAVBAR
   ========================================= */
.navbar {
  background-color: var(--primary-color);
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.logo span {
  color: var(--secondary-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #fff;
  transition: var(--transition);
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
  height: 85vh;
  background: linear-gradient(rgba(26, 37, 48, 0.8), rgba(26, 37, 48, 0.8)), 
              url('https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   5. CARDS & GRID
   ========================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-bottom: 3px solid var(--secondary-color);
}

.card-img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* =========================================
   6. ABOUT PAGE SPECIFIC
   ========================================= */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.about-img {
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.team-card {
  text-align: center;
}

.team-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
  border: 4px solid var(--secondary-color);
}

/* =========================================
   7. SERVICES PAGE
   ========================================= */
.service-icon {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* =========================================
   8. PROJECTS & FILTER
   ========================================= */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--primary-color);
  background: transparent;
  cursor: pointer;
  border-radius: 20px;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary-color);
  color: #fff;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 37, 48, 0.8);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.project-item:hover .project-overlay {
  opacity: 1;
}

/* =========================================
   9. CONTACT PAGE
   ========================================= */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  background: var(--bg-gray);
  padding: 2rem;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  outline: 2px solid var(--secondary-color);
  border-color: transparent;
}

.error-msg {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

/* =========================================
   10. TESTIMONIALS
   ========================================= */
.testimonials {
  background-color: var(--bg-gray);
  padding: var(--spacing-lg) 0;
}

.slider-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.slide {
  display: none;
  padding: 2rem;
  animation: fade 1s;
}

.slide.active {
  display: block;
}

.slide blockquote {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.slide cite {
  font-weight: 700;
  color: var(--secondary-color);
}

.slider-nav {
  margin-top: 1rem;
}

.dot {
  height: 12px;
  width: 12px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background-color: var(--primary-color);
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

/* =========================================
   11. FOOTER & CTA
   ========================================= */
.cta-section {
  background-color: var(--secondary-color);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}

footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 3rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.9rem;
}

/* =========================================
   12. MODAL (LIGHTBOX)
   ========================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: 10% auto;
  display: block;
  max-width: 80%;
  max-height: 80vh;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

/* =========================================
   13. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    right: 0px;
    height: 92vh;
    top: 8vh;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
    transform: translateX(100%);
    transition: transform 0.5s ease-in;
    padding-top: 2rem;
  }

  .nav-links.nav-active {
    transform: translateX(0%);
  }

  .hamburger {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .about-intro, .contact-wrapper {
    grid-template-columns: 1fr;
  }
}