/* Unified Engineering Solutions — site styles */

:root {
  --brand: #14742C;
  --brand-light: #3D8C5A;
  --brand-dark: #0F5621;
  --gray: #6D6E71;
  --gray-text: #777;
  --dark: #0F1215;
  --black: #000;
  --white: #fff;
  --bg-hero: #f1f1f1;
  --bg-light: #f5f5f5;
  --container: 1200px;
  --header-h: 90px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Jost", Arial, Tahoma, sans-serif;
  font-size: 16px;
  color: var(--gray-text);
  line-height: 1.6;
  background: var(--white);
}

body::-webkit-scrollbar { width: 7px; }
body::-webkit-scrollbar-track { background: #3C3C3C; }
body::-webkit-scrollbar-thumb { background: var(--brand); }

h1, h2, h3, h4, h5, h6 {
  font-family: "Jost", Arial, Tahoma, sans-serif;
  font-weight: 700;
  color: var(--black);
}

a { color: var(--brand); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--gray); }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.container.narrow { max-width: 860px; }

/* ===== HEADER ===== */
#Header { position: relative; z-index: 1000; }

.header-placeholder { height: var(--header-h); }

#Top_bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
  z-index: 1001;
  transition: box-shadow 0.3s ease;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

#logo img {
  height: 50px;
  width: auto;
}

.logo-sticky { display: none; }

#Top_bar.is-sticky .logo-main { display: none; }
#Top_bar.is-sticky .logo-sticky { display: block; }

.menu-wrapper {
  display: flex;
  align-items: center;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.menu li { position: relative; }

.menu li a {
  display: block;
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 10px 12px;
  position: relative;
  text-decoration: none;
}

.menu li a::before {
  position: absolute;
  content: '';
  bottom: 0;
  left: 0;
  width: 0;
  height: 5px;
  background: var(--brand);
  transition: width 0.2s ease 0.2s;
}

.menu li a:hover::before,
.menu li.current a::before { width: 100%; }

.menu li a:hover { color: var(--black); }

.responsive-menu-toggle {
  display: none;
  color: var(--brand);
  font-size: 24px;
  padding: 8px;
}

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section-white { background: var(--white); }
.section-gray { background: var(--bg-hero); }
.section-light { background: var(--bg-light); }

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h1,
.section-title h2 {
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 10px;
}

.section-title h4 {
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin: 0;
}

.section-title p {
  font-size: 17px;
  max-width: 800px;
  margin: 15px auto 20px;
  text-align: center;
}

.section-title h2 + p em {
  font-style: italic;
  color: var(--black);
}

/* ===== HERO ===== */
.motion-header {
  background: var(--bg-hero);
  padding: 100px 0 80px;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.motion-header-text h1 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1;
  margin: 0 0 30px;
  text-transform: none;
}

.motion-header-text p {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.4;
  margin: 0 0 15px;
  color: var(--gray-text);
}

.btn-link {
  color: var(--brand);
  font-size: 20px;
  margin-top: 20px;
  display: inline-block;
  text-decoration: none;
}

.btn-link i {
  vertical-align: middle;
  color: var(--gray);
  transition: margin-left 0.3s ease;
}

.btn-link:hover i { margin-left: 10px; }
.btn-link:hover { color: var(--brand); }

/* Hero logo animation */
.motion-header-logo {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}

.logo-ring {
  position: absolute;
  border: 3px dashed var(--gray);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-ring-outer {
  width: 280px;
  height: 280px;
  animation: rotation-outer 40s infinite linear;
  border-color: var(--brand);
  opacity: 0.4;
}

.logo-ring-inner {
  width: 220px;
  height: 220px;
  animation: rotation-inner 25s infinite linear;
  border-style: solid;
  border-color: var(--gray);
  opacity: 0.6;
}

.logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  background: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.1);
  padding: 0;
  overflow: hidden;
}

.logo-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes rotation-inner {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(359deg); }
}

@keyframes rotation-outer {
  from { transform: translate(-50%, -50%) rotate(359deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

/* ===== WAVE ===== */
.wave-wrapper {
  position: relative;
  width: 100%;
  height: 80px;
  background: var(--bg-hero);
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 6400px;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 100' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,50 C200,100 400,0 600,50 C800,100 1000,0 1200,50 C1400,100 1600,0 1600,50 L1600,100 L0,100 Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 1600px 100px;
}

.wave1 { animation: waves-reverse 10s linear infinite; opacity: 0.8; }
.wave2 { animation: waves 10s linear infinite; }

@keyframes waves {
  0% { background-position: 0; }
  100% { background-position: 1600px; }
}

@keyframes waves-reverse {
  0% { background-position: 1600px; }
  100% { background-position: 0; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 40px;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--dark);
  border-color: var(--brand-dark);
  color: var(--white);
  text-decoration: none;
}

.btn-secondary {
  background: var(--brand-light);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--gray);
  border-color: #282828;
  color: var(--white);
  text-decoration: none;
}

/* ===== SERVICE CARDS ===== */
.services-card {
  position: relative;
  overflow: hidden;
  max-width: 370px;
  margin: 0 auto;
  color: var(--gray-text);
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  background: var(--white);
}

.services-img {
  display: block;
  overflow: hidden;
  height: 200px;
}

.services-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.1);
  transition: transform 0.25s ease;
}

.services-card:hover .services-img img { transform: scale(1); }

.services-caption {
  padding: 18% 15px 30px;
  position: relative;
  z-index: 1;
  margin-top: -11%;
}

.services-caption::before {
  position: absolute;
  content: '';
  inset: 0;
  background: var(--white);
  transform-origin: 100% 50%;
  transform: skewY(-6deg);
  transition: transform 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.services-card:hover .services-caption::before { transform: none; }

.services-caption h5 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--black);
}

.services-caption p {
  font-size: 15px;
  text-align: justify;
  margin: 0;
  min-height: 120px;
}

.services-caption span {
  position: absolute;
  background: var(--gray);
  color: var(--white);
  width: 70px;
  height: 70px;
  top: 0;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 28px;
  transform: translate3d(105%, -50%, 0);
  transition: all 0.3s ease;
}

.services-card:hover .services-caption span {
  transform: translate3d(-50%, -50%, 0);
  background: var(--brand);
}

/* ===== CAROUSEL ===== */
.carousel {
  position: relative;
  overflow: hidden;
  padding-bottom: 50px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  padding: 0 10px;
}

@media (min-width: 768px) {
  .carousel-slide { flex: 0 0 33.333%; }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.carousel-dot {
  width: 50px;
  height: 4px;
  background: #CFD1D2;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot.active { background: var(--brand); }
.carousel-dot:hover:not(.active) { background: var(--gray); }

/* ===== CALLOUT ===== */
.callout-after {
  position: relative;
  padding: 100px 0;
  background: var(--white);
}

.callout-after::before,
.callout-after::after {
  position: absolute;
  top: 0;
  width: 25%;
  height: 100%;
  content: '';
  opacity: 0.06;
  background: linear-gradient(135deg, var(--brand) 0%, transparent 60%);
  pointer-events: none;
}

.callout-after::before { left: 0; }
.callout-after::after { right: 0; transform: scaleX(-1); }

/* ===== VALUE BOXES ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 20px;
}

.value-box {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.value-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  margin-right: 15px;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
  border: 2px solid var(--gray);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gray);
  transition: all 0.3s ease;
}

.value-box:hover .value-icon {
  border-color: var(--brand);
  color: var(--brand);
}

.value-content p {
  font-size: 15px;
  text-align: justify;
  margin: 0;
}

.value-content p.lead {
  color: var(--black);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 8px;
}

/* ===== PROCESS ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-card {
  background: var(--white);
  padding: 30px 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  position: relative;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.process-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  content: '';
  background: var(--brand-dark);
  clip-path: polygon(100% 0, 80% 0, 100% 30%);
  pointer-events: none;
}

.process-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.process-card h5 {
  font-size: 18px;
  margin: 0 0 10px;
  position: relative;
}

.process-card p {
  font-size: 14px;
  margin: 0;
  color: var(--gray-text);
  position: relative;
}

/* ===== NEWS ===== */
.section-news {
  background: var(--bg-light);
  background-image: linear-gradient(rgba(245,245,245,0.95), rgba(245,245,245,0.95)),
    url('https://images.unsplash.com/photo-1509391366360-2e959784a276?w=1600&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  background: var(--white);
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.news-card:hover { transform: translateY(-5px); }

.news-image {
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img { transform: scale(1.05); }

.news-body { padding: 25px 20px; }

.news-date {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand);
  font-weight: 600;
}

.news-body h3 {
  font-size: 18px;
  margin: 10px 0;
  line-height: 1.3;
}

.news-body p {
  font-size: 14px;
  margin: 0 0 15px;
}

.read-more {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.read-more i { transition: margin-left 0.3s ease; }
.read-more:hover i { margin-left: 5px; }

/* ===== COVERAGE ===== */
.coverage-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.coverage-col h5 {
  text-transform: uppercase;
  font-size: 16px;
  margin: 0 0 15px;
  color: var(--black);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid #ddd;
  font-size: 13px;
  color: var(--gray-text);
  transition: all 0.3s ease;
}

.tag-cloud span:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ===== CLIENTS ===== */
.client-logo-item {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.client-logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter 0.3s ease;
}

.client-logo-item:hover img { filter: grayscale(0); }

.client-logo-item.client-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray);
  filter: grayscale(1);
}

.client-logo-item.client-name:hover { filter: grayscale(0); color: var(--brand); }

.testimonials-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.testimonial-mini {
  margin: 0;
  padding: 25px;
  background: var(--bg-light);
  border-left: 4px solid var(--brand);
}

.testimonial-mini p {
  font-style: italic;
  font-size: 14px;
  margin: 0 0 12px;
}

.testimonial-mini footer {
  font-size: 13px;
  color: var(--gray-text);
}

.testimonial-mini footer strong { color: var(--black); }

/* ===== CTA ===== */
.section-cta {
  position: relative;
  padding: 80px 0;
  background: url('https://images.unsplash.com/photo-1508514177221-188b1cf16e8d?w=1600&q=80') center/cover no-repeat;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 21, 0.82);
}

.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  gap: 30px;
}

.cta-content h3 {
  color: var(--white);
  max-width: 600px;
  text-transform: uppercase;
  line-height: 1.4;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin: 0;
}

/* ===== FOOTER ===== */
#Footer { background: var(--dark); color: rgba(255,255,255,0.7); }

.widgets-wrapper { padding: 60px 0; position: relative; }

.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  text-transform: uppercase;
  font-size: 18px;
  color: var(--white);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin: 0 0 20px;
}

.footer-logo-watermark {
  position: absolute;
  left: -5%;
  top: 55%;
  opacity: 0.08;
  filter: grayscale(100%);
  height: 120px;
  width: auto;
  pointer-events: none;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.footer-links-grid a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 2;
  display: inline-block;
}

.footer-links-grid a:hover { color: var(--brand); }

.footer-col p { margin: 0 0 10px; }

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.footer-col a:hover { color: var(--brand); }

.footer-col a i { margin-right: 8px; width: 16px; }

.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}

.footer-copy p {
  margin: 0 0 5px;
  font-size: 13px;
  opacity: 0.6;
}

/* ===== ANIMATIONS ===== */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left { transform: translateX(-30px); }
.fade-in-left.visible { transform: translateX(0); }

.fade-in-right { transform: translateX(30px); }
.fade-in-right.visible { transform: translateX(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-row { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --header-h: 70px; }

  html, body { overflow-x: hidden; }

  .responsive-menu-toggle {
    display: block;
    position: relative;
    z-index: 1003;
  }

  .menu-wrapper { position: static; }

  #menu {
    position: static;
  }

  /* Hidden by default — !important beats any leftover flex rules */
  .menu,
  .menu:not(.open) {
    display: none !important;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0 16px;
    z-index: 1002;
    margin: 0;
  }

  .menu.open {
    display: flex !important;
  }

  .menu li a {
    padding: 14px 24px;
    border-bottom: 1px solid #eee;
  }

  .menu li a::before { display: none; }

  .hero-split { grid-template-columns: 1fr; text-align: center; }

  .motion-header { min-height: auto; padding: 60px 0 40px; }

  .motion-header-logo { width: 200px; height: 200px; }
  .logo-ring-outer { width: 180px; height: 180px; }
  .logo-ring-inner { width: 140px; height: 140px; }
  .logo-center { width: 110px; height: 110px; padding: 0; }

  .values-grid,
  .process-grid,
  .news-grid,
  .coverage-columns,
  .footer-widgets,
  .footer-links-grid {
    grid-template-columns: 1fr;
  }

  .value-box { margin: 10px 0; }

  .cta-content {
    flex-direction: column;
    text-align: center;
  }

  .services-caption p { min-height: auto; }

  .section-news { background-attachment: scroll; }
}

@media (max-width: 480px) {
  .value-box {
    flex-direction: column;
    text-align: center;
  }

  .value-icon { margin: 0 auto 15px; }
}
