:root {
  --bg: #fafafa;
  --bg-abt: #f0f0f0;
  --bg-form: #efefef;
  --bg-alt: #121821;
  --accent: #f0b429;
  --text: #fc2020;
  --text2: #202020;
  --muted: #202020;
  --card-bg: #1c2430;
  --modal-bg:#cfcfcf;
  --overlay-gray: rgba(230, 233, 238, 0.8); /* 80% transparent light-gray */
  --transition-fast: 0.3s ease;
  --max-width: 1200px;
  --nav-height: 64px;
  --border-radius-lg: 18px;
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Utility */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95); /*(11,15,20, 0.9)*/
  backdrop-filter: blur(10px);
}

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

.logo img {
  height: 50px;
}

/* Desktop nav */
.primary-nav {
  display: flex;
}

.primary-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1.15rem;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-fast);
}

.primary-nav a:hover {
  color: var(--text);
}

.primary-nav a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  border: none;
  background: none;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* HERO */
.hero-section {
  position: relative;
  height: calc(100vh - var(--nav-height));
  min-height: 440px;
  max-height: 720px;
  overflow: hidden;
  background: #000;
}

.hero-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

/* HERO overlay: 80% transparent light-gray.
   Desktop: left 50% width.
   Mobile: 100% width, full height. */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--overlay-gray);
  padding: 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #111722;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: #343a45;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: #111722;
  color: #fff;
  border: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Hero dots */
.hero-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent);
}

/* CARD GRID (services/products/engineering) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 62%;
  overflow: hidden;
}

.card-image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hover overlay:
   Starts below the card, moves up so that ~80% of the card is covered,
   stopping around top 20%. */
.card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -100%;
  height: 80%;
  background: var(--overlay-gray);
  color: #111722;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), bottom var(--transition-fast);
}

.card:hover .card-overlay {
  bottom: 20%;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.35rem 0 0.15rem;
  padding: 0 1.1rem 0.75rem;
}

.card-brief {
  font-size: 0.9rem;
  color: #343a45;
  margin-bottom: 0.75rem;
}

.card-read-more {
  align-self: flex-start;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #111722;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ABOUT */
.section-about {
  background: var(--bg-abt);
}

.about-container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.about-text p {
  color: var(--text2);
  line-height: 1.6;
}

.about-more p {
  margin-top: 0.9rem;
  color: #d7dbe3;
  line-height: 1.7;
}

.about-readmore {
  margin-top: 1rem;
  display: inline-flex;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
/* Testimonials carousel (simple) */
.testimonial-carousel {
  position: relative;
  min-height: 150px;
}

.testimonial-item {
  color: black;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.testimonial-item.is-active {
  opacity: 1;
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: 0.75rem;
}

.testimonial-author {
  font-size: 1.3rem;
  color: var(--muted);
}

.testimonial-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.testimonial-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.testimonial-dot.is-active {
  background: var(--accent);
}
.about-text{
  position: relative;
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.about-testimonials {
  position: relative;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #f0f0f0; /* solid background instead of image */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Image area takes bottom half */
.testimonial-image-wrapper {
  position: relative;
  width: 100%;
  height: 40%;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.testimonial-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Dark overlay so text is readable */
.about-text::before,
.about-testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(240, 240, 240, 0.25);
  z-index: 0;
  pointer-events: none; 
}

.about-text {
  background-image: url("assets/images/about-bg.jpg");
}
.history-gallery {
  position: relative;
  width: 100%;
  height: 220px;            /* “half height” feeling; adjust as you like */
  border-radius: 14px;
  overflow: hidden;
  margin-top: 0.75rem;
  background: #000;
}

.history-track {
  height: 100%;
  display: flex;
  transform: translateX(0);
  transition: transform 0.45s ease;
}

.history-slide {
  min-width: 100%;
  height: 100%;
}

.history-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* arrows */
.history-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.history-nav.prev { left: 10px; }
.history-nav.next { right: 10px; }

/* dots */
.history-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 2;
}

.history-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
}

.history-dot.is-active {
  background: var(--accent);
}
/* CONTACT */
.section-contact {
  background: var(--bg);
}

.contact-container {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
}

.contact-info p {
  color: var(--muted);
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-form {
  background: var(--bg-form);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.95rem;
  color: var(--text);
}

.form-row input,
.form-row textarea {
  border-radius: 10px;
  border: 1px solid #2a3647;
  background: #Fafafa;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form button {
  margin-top: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #111722;
  font-weight: 600;
  cursor: pointer;
}

.form-success {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #7ddc88;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid #1f2935;
  padding: 1.5rem 0;
  background: #05070a;
}

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

.footer-container p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/*Keep dialog within viewport and allow internal scrolling */
.modal-dialog {
  position: relative;
  max-width: 520px;         /* adjust if you want */
  width: calc(100% - 2rem);
  margin: 8vh auto;
  max-height: 84vh;         /* IMPORTANT */
  overflow: auto;           /* IMPORTANT */
  background: var(--modal-bg);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-soft);

  /* Optional: nicer scroll on iOS */
  -webkit-overflow-scrolling: touch;
}
.modal-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.modal-desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 0.25rem 0 0.75rem;
}

.modal-bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.modal-bullets li {
  margin: 0.35rem 0;
  color: var(--muted);
}
body.modal-open {
  overflow: hidden;
}
/* Keep close button visible even when scrolling (optional but very nice) */
.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  z-index: 1;
  background: rgba(0,0,0,0.0);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .hero-overlay {
    width: 100%;
    height: 100%;
    padding: 2.2rem 1.8rem;
    background: var(--overlay-gray); /* still 80% transparent */
  }

  .hero-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  /* mobile nav */
  .primary-nav {
    position: absolute;
    top: var(--nav-height);
    right: 0;
    left: 0;
    background: #05070a;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav ul {
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.1rem;
  }

  .nav-toggle {
    display: flex;
  }

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

  .hero-section {
    max-height: none;
    height: 70vh;
  }
}