/* ===================================
   KELSO ENGINEERING SOLUTIONS
   Professional CSS Stylesheet
   =================================== */

:root {
  --green: #5A8B5F;
  --lime: #A8BA5C;
  --brown: #7B5C41;
  --charcoal: #343235;
  --off-white: #F8F7F4;
  --white: #FFFFFF;
  --light-gray: #E8E6E2;
  --mid-gray: #E8E6E2;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  background-color: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--charcoal);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  color: #555;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--lime);
}

/* ===================================
   LAYOUT & GRID
   =================================== */

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

/* ===================================
   HEADER
   =================================== */

.header-top {
  background-color: var(--charcoal);
  color: var(--white);
  padding: 0.75rem 0;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.site-header {
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
  border-bottom: 1px solid var(--light-gray);
}

.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}

.logo-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--lime);
  text-transform: uppercase;
}

/* ===================================
   NAVIGATION
   =================================== */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 3px;
  background-color: var(--charcoal);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav ul li a {
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.main-nav ul li a:hover {
  color: var(--green);
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--lime);
  transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 1rem;
}

/* ===================================
   HERO SECTIONS
   =================================== */

.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--brown) 100%);
  color: var(--white);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero h1 {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-block;
  background-color: var(--lime);
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.page-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--brown) 100%);
  color: var(--white);
  padding: 3rem 0;
}

.page-hero h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 0;
}

/* ===================================
   SECTIONS
   =================================== */

.section {
  padding: 4rem 0;
  background-color: var(--white);
}

.section-dark {
  background-color: var(--charcoal);
  color: var(--white);
  padding: 4rem 0;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.85);
}

.section-alt {
  background-color: var(--off-white);
  padding: 4rem 0;
}

.section-header {
  font-size: 2.5rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-dark .section-header {
  color: var(--white);
}

.section-subtitle {
  font-size: 1rem;
  color: #666;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Inter', sans-serif;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   CARDS & GRIDS
   =================================== */

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

.card {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--lime);
}

.card-icon {
  width: 60px;
  height: 60px;
  background-color: var(--lime);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 1.5rem;
}

.card-link {
  color: var(--green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.card-link:hover {
  gap: 1rem;
}

/* ===================================
   CASE CARDS
   =================================== */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.case-card {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.case-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.case-card-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--green) 0%, var(--lime) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
}

.case-card-body {
  padding: 1.5rem;
}

.case-tag {
  display: inline-block;
  background-color: var(--lime);
  color: var(--charcoal);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.case-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.case-card p {
  margin-bottom: 1rem;
  color: #666;
}

/* ===================================
   BLOG CARDS
   =================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.blog-card-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--green) 0%, var(--brown) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2.5rem;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-date {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.blog-card p {
  margin-bottom: 1rem;
  color: #666;
}

/* ===================================
   BLOG INDEX PAGE
   =================================== */

.blog-index-card {
  background-color: var(--white);
  border-left: 4px solid var(--green);
  border-radius: 4px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-index-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-left-color: var(--lime);
}

.blog-index-card-date {
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-index-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-index-card p {
  color: #666;
  margin-bottom: 1rem;
}

.blog-index-card-link {
  color: var(--green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===================================
   STATS
   =================================== */

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

.stat-item {
  text-align: center;
}

.stat-item .stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.stat-item .stat-label {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

/* ===================================
   SERVICE DETAIL
   =================================== */

.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.service-detail.reverse {
  grid-template-columns: 1fr 1fr;
}

.service-detail.reverse > :first-child {
  order: 2;
}

.service-detail.reverse > :last-child {
  order: 1;
}

.service-detail h2 {
  font-size: 2rem;
}

.service-detail p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.service-detail-img {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--green) 0%, var(--lime) 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 4rem;
}

/* ===================================
   SERVICE LIST
   =================================== */

.service-list {
  list-style: none;
}

.service-list li {
  padding: 1rem 0;
  padding-left: 2.5rem;
  position: relative;
  color: #555;
}

.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--lime);
  font-weight: bold;
  font-size: 1.2rem;
}

/* ===================================
   LOCATIONS
   =================================== */

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.location-card {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.location-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--lime);
}

.location-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.location-primary {
  background-color: var(--green);
  color: var(--white);
}

.location-primary h3 {
  color: var(--white);
}

.location-primary p {
  color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   CONTACT
   =================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  background-color: var(--off-white);
  padding: 2rem;
  border-radius: 6px;
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-card {
  background-color: var(--off-white);
  padding: 1.5rem;
  border-radius: 6px;
}

.contact-info-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.contact-info-item {
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  background-color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

/* ===================================
   FORMS
   =================================== */

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.95rem;
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--charcoal);
  transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(90, 139, 95, 0.1);
}

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

/* ===================================
   BUTTONS
   =================================== */

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #4a7350;
}

.btn-white {
  background-color: var(--white);
  color: var(--charcoal);
  border: 2px solid var(--white);
}

.btn-white:hover {
  background-color: transparent;
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-outline:hover {
  background-color: var(--green);
  color: var(--white);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===================================
   CTA BANNER
   =================================== */

.cta-banner {
  background: linear-gradient(135deg, var(--green) 0%, var(--lime) 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
  margin-top: 4rem;
}

.cta-banner h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
  background-color: var(--charcoal);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

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

.footer-brand h3 {
  color: var(--lime);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.footer-credentials {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.footer-credentials p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ===================================
   BLOG ARTICLE
   =================================== */

.blog-full {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-full img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 6px;
  margin: 2rem 0;
}

.blog-full h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.blog-full h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-full h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-full ul,
.blog-full ol {
  margin-bottom: 1.5rem;
  margin-left: 2rem;
}

.blog-full li {
  margin-bottom: 0.5rem;
  color: #555;
}

.blog-meta {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: #666;
}

.blog-meta-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.blog-divider {
  border-top: 2px solid var(--light-gray);
  margin: 2rem 0;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  .header-top .container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .header-main {
    padding: 1rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 99;
    padding: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    max-height: 400px;
    padding: 1.5rem 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
  }

  .main-nav ul li a::after {
    display: none;
  }

  .nav-cta {
    margin-left: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-gray);
  }

  .hero {
    padding: 3rem 0;
  }

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

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

  .page-hero h1 {
    font-size: 1.8rem;
  }

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

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

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

  .stats-row {
    grid-template-columns: 1fr;
  }

  .service-detail,
  .service-detail.reverse {
    grid-template-columns: 1fr;
  }

  .service-detail.reverse > :first-child {
    order: initial;
  }

  .service-detail.reverse > :last-child {
    order: initial;
  }

  .service-detail-img {
    height: 200px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .section {
    padding: 2rem 0;
  }

  .section-header {
    font-size: 1.8rem;
  }

  .cta-banner {
    padding: 2rem 0;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .blog-full {
    padding: 1rem 0;
  }

  .blog-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

  .section-header {
    font-size: 1.5rem;
  }

  .stat-item .stat-number {
    font-size: 2rem;
  }

  .service-detail h2 {
    font-size: 1.5rem;
  }

  .blog-full h1 {
    font-size: 1.8rem;
  }

  .blog-full h2 {
    font-size: 1.3rem;
  }

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

  .header-top-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .header-flex {
    flex-wrap: wrap;
  }
}

/* ===================================
   ADDITIONAL LAYOUT STYLES
   =================================== */

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

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-top-item a {
  color: var(--white);
  text-decoration: none;
}

.header-top-item a:hover {
  color: var(--lime);
}

.header-top-item .label {
  font-weight: 600;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

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

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

.footer-col p {
  color: rgba(255, 255, 255, 0.8);
}

.footer-col li {
  color: rgba(255, 255, 255, 0.8);
}
