* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: #1a1a1a;
  color: white;
  padding: 2rem 0;
  text-align: center;
  flex-shrink: 0;
}

header .logo {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin: 0 auto 1rem auto;
  display: block;
}

header .tagline {
  font-size: 1.1rem;
  color: #ccc;
}

/* Main wrapper - flex layout for sidebar + content */
.main-wrapper {
  display: flex;
  align-items: stretch;
  flex: 1;
}

/* Sidebar Navigation */
.sidebar {
  width: 220px;
  background: #2c3e50;
  padding: 2rem 0;
  flex-shrink: 0;
  border-right: 2px solid #34495e;
  position: sticky;  /* Make sidebar sticky */
  top: 0;            /* Stick to top */
  height: fit-content; /* Only take up space it needs */
  z-index: 100;      /* Keep above content */
}

.tree-menu ul {
  list-style: none;
}

.tree-menu li {
  margin: 0.5rem 0;
}

.nav-button {
  width: 100%;
  padding: 1rem 1.5rem;
  background: transparent;
  color: #bdc3c7;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border-left: 4px solid transparent;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: #4CAF50;
}

.nav-button.active {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  border-left-color: #4CAF50;
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: white;
}

.content-section {
  display: none;
  padding: 4rem 0;
  animation: fadeIn 0.3s ease-in;
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Home/Hero Section */
#home {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  text-align: center;
  padding: 6rem 0 !important;
}

/* Only apply flex layout when #home is the active section */
#home.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

#home h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#home p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Call to Action Button */
.cta-button {
  display: inline-block;
  background: #4CAF50;
  color: white;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cta-button:hover {
  background: #45a049;
}

/* Services Section */
#services h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: #1a1a1a;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-card p {
  color: #666;
  line-height: 1.8;
}

/* About Section */
#about h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

#about > .container > p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #555;
}

#about h3 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

#about ul {
  list-style: none;
  columns: 2;
  gap: 2rem;
}

#about li {
  background: #f0f0f0;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 5px;
  border-left: 4px solid #4CAF50;
}

/* Contact Section */
#contact {
  background: #2c3e50;
  color: white;
  text-align: center;
}

#contact h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#contact > .container > p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: left;
  display: inline-block;
}

.contact-info p {
  margin-bottom: 0.75rem;
}

/* Footer */
footer {
  background: #1a1a1a;
  color: #999;
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #333;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;  /* Full width */
    padding: 0;
    border-right: none;
    border-bottom: 2px solid #34495e;
    position: sticky;
    top: 0;
    height: fit-content;
    z-index: 100;
  }

  .tree-menu ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
  }

  .nav-button {
    flex: 1;
    min-width: 0;  /* Allow buttons to shrink */
    padding: 1rem;  /* Increase padding for larger buttons */
    text-align: center;
    border-left: none;
    border-bottom: 4px solid transparent;
    font-size: 1rem;  /* Larger font */
    white-space: nowrap;  /* Keep text on one line */
  }

  .nav-button:hover,
  .nav-button.active {
    border-bottom-color: #4CAF50;
    border-left: none;
  }

  #home h2 {
    font-size: 1.8rem;
  }

  #about ul {
    columns: 1;
  }
}

/* Desktop enhancements */
@media (min-width: 769px) {
  /* Service card improvements */
  .sidebar {
  width: 280px;
  background: linear-gradient(180deg, #2c3e50 0%, #1a2332 100%);
  padding: 2rem 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  border-right: 2px solid #34495e;
  overflow-y: auto;
  position: sticky;

  /* These two lines fix the white space: */
  position: static;    /* Remove sticky so flexbox controls height */
  height: auto;        /* Let flexbox stretch it full height */
  align-self: stretch; /* Stretch to fill the full .main-wrapper height */
}
  .service-card {
    background: white;
    border-top: 4px solid #4CAF50;  /* Add colored top border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
  }

  .service-card:hover {
    transform: translateY(-8px);  /* Bigger lift on hover */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-top-color: #3498db;  /* Color change on hover */
  }

  .service-card h3 {
    color: #2c3e50;
    transition: color 0.3s;
  }

  .service-card:hover h3 {
    color: #4CAF50;  /* Heading color changes on hover */
  }
    /* Main content improvements */
  .main-content {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
  }

  .content-section {
    padding: 5rem 0;
  }

  #home {
    padding: 7rem 0 !important;
  }

  #home h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
  }

  #home p {
    font-size: 1.2rem;
    line-height: 1.8;
  }

  /* Services section background */
  #services {
    background: white;
  }

  #services h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
  }

  /* About section styling */
  #about {
    background: #f8f9fa;
    padding: 5rem 0;
  }

  #about h2 {
    font-size: 2.5rem;
  }

  /* Improve about list */
  #about ul {
    columns: 2;
    gap: 3rem;
  }

  #about li {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #4CAF50;
    padding: 1rem 1.25rem;
  }

  #about li:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
    transition: all 0.3s;
  }
  /* Button improvements */
  .cta-button {
    padding: 14px 40px;
    font-size: 1.05rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  }

  .cta-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  }

  /* Improve header on desktop */
  header {
    border-bottom: 3px solid #4CAF50;
  }

  /* Footer improvements */
  footer {
    border-top: 3px solid #4CAF50;
  }
}
