/* --- 1. GLOBAL SETTINGS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-dark: #0f172a;      
    --bg-card: #1e293b;      
    --accent: #3b82f6;       
    --accent-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid #334155;
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 25px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 600; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* --- 2. HOME PAGE ONLY (Engineering Cards) --- */
.home-engineering-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden; 
    aspect-ratio: 4/3; 
    border: 1px solid #334155;
    background-color: var(--bg-card);
}

.home-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.home-image-card:hover img { transform: scale(1.05); }

.home-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.home-card-overlay h3 { color: #ffffff !important; margin-bottom: 5px; font-size: 1.3rem; }
.home-card-overlay p {
    color: #ffffff !important;
    font-size: 0.9rem;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s, transform 0.4s;
}

.home-image-card:hover .home-card-overlay p { opacity: 1; transform: translateY(0); }

/* --- 3. RESTORED ORIGINAL ABOUT/CONTACT STYLES --- */
.team-section { padding: 60px 40px; background: #0b1a2f; color: white; text-align: center; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; }

.team-card {
    background: #12264a;
    padding: 15px;
    border-radius: 10px;
    transition: 0.3s;
    border: 1px solid transparent;
    text-align: center;
}

.team-card:hover {
    transform: translateY(-8px); 
    border-color: #2f6df6;
    box-shadow: 0 0 12px rgba(47,109,246,0.4);
}

.team-card img { width: 100%; height: 250px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.team-card h3 { font-size: 1.1rem; margin-bottom: 5px; }
.team-card .post { color: #4da3ff; font-size: 14px; margin-bottom: 5px; }

.director-card {
    background: linear-gradient(145deg, #12264a, #0d1e3a);
    border: 1px solid #2f6df6;
    padding: 25px;
    border-radius: 15px;
    width: 280px;
    margin: 0 auto 50px;
    box-shadow: 0 0 15px rgba(47,109,246,0.3);
}
.director-card img { width: 100%; border-radius: 10px; margin-bottom: 15px; }

/* Contact Forms & Generic Cards */
.card { background-color: var(--bg-card); padding: 30px; border-radius: 12px; border: 1px solid #334155; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

form input, form textarea {
    width: 100%; padding: 12px; margin-bottom: 20px;
    background-color: #1e293b; border: 1px solid #334155;
    border-radius: 6px; color: white;
}

/* Common Components */
.industry-tag { padding: 10px 25px; border: 1px solid #334155; border-radius: 5px; color: var(--text-muted); }
.btn { display: inline-block; padding: 12px 28px; background-color: var(--accent); color: white; text-decoration: none; border-radius: 6px; font-weight: 600; transition: 0.3s; border: none; cursor: pointer; }
footer { text-align: center; padding: 30px; background-color: var(--bg-card); border-top: 1px solid #334155; margin-top: auto; }

/* --- PRODUCT PAGE SPECIFIC STYLES --- */
.product-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-feature-card {
    position: relative;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-card);
    border: 1px solid #334155;
    cursor: pointer;
}

.product-feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.product-feature-card:hover img {
    transform: scale(1.1);
}

.product-feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 10%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    z-index: 2;
}

.product-feature-overlay h3 {
    color: #ffffff !important;
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-feature-overlay p {
    color: #cbd5e1 !important;
    font-size: 0.95rem;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.product-feature-card:hover .product-feature-overlay p {
    opacity: 1;
    transform: translateY(0);
}

/* --- SERVICES PAGE SPECIFIC STYLES --- */
.service-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-feature-card {
    position: relative;
    height: 300px; 
    border-radius: 15px;
    overflow: hidden;
    background-color: var(--bg-card);
    border: 1px solid #334155;
}

.service-feature-card img {
    width: 100%;
    height: 100%;
    /* FIX: Changed cover to contain to prevent zooming/cropping */
    object-fit: contain; 
    /* Padding prevents the image from touching the edges */
    padding: 20px;
    background-color: #0f172a; 
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.service-feature-card:hover img {
    /* Subtle zoom on hover */
    transform: scale(1.05);
}

.service-feature-overlay {
    position: absolute;
    inset: 0;
    /* Adjusted gradient to ensure icons are fully visible */
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98) 15%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    z-index: 2;
}

.service-feature-overlay h3 {
    color: #ffffff !important;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-hover-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.service-hover-content p {
    color: var(--accent) !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.service-hover-content ul {
    list-style: none;
    padding: 0;
}

.service-hover-content ul li {
    color: #cbd5e1 !important;
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.service-hover-content ul li::before {
    content: "→";
    color: var(--accent);
    margin-right: 8px;
    font-weight: bold;
}

.service-feature-card:hover .service-hover-content {
    opacity: 1;
    transform: translateY(0);
}
/* --- NEW ANIMATED BACKGROUND STYLES --- */

/* 1. Define the panning animation sequence */
@keyframes panBackground {
    0% {
        /* Start at the very top-left corner */
        background-position: 0% 0%;
    }
    50% {
        /* Move to the very bottom-right corner */
        background-position: 100% 100%;
    }
    100% {
        /* Smoothly slide back to the start */
        background-position: 0% 0%;
    }
}

/* 2. Style the top section to handle the animation */
.animated-hero-section {
    /* (You'll add this class to your HTML section tag) */

    position: relative; /* Required for the overlay to work */
    overflow: hidden; /* Important: keeps the 'oversized' image contained */

    /* Ensure minimum height so the section doesn't collapse */
    min-height: 80vh; 
    display: flex; /* Helps center content */
    align-items: center; /* Helps center content */
}

/* 3. Style the pseudo-element that actually holds and moves the image */
.animated-hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Place it furthest back */

    /* --- THE CORE IMAGE SETTINGS --- */
    background-image: url('images/back.jpg'); /* <<< UPDATE IMAGE PATH HERE */
    
    /* Make the image large enough to have 'room' to pan without looping */
    background-size: 150%; 
    background-repeat: no-repeat;
    
    /* Center it initially */
    background-position: center;

    /* --- THE ANIMATION LOOP --- */
    /* Calls 'panBackground' definition from above.
       '40s' = 40 seconds per loop. Slower = subtler.
       'linear' = constant speed.
       'infinite' = never stops. */
    animation: panBackground 40s linear infinite;

    /* (Optional) A very soft background color to prevent jarring pop-in */
    background-color: #0c121e; 
}

/* 4. Style the gradient overlay to ensure content is always readable */
.animated-hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* Place it between the image and the text */

    /* Add a subtle dark gradient to ensure white text pops */
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.4) 0%,   /* Slightly dark at top */
        rgba(15, 23, 42, 0.8) 100% /* Much darker at bottom */
    );
}

/* 5. Ensure the text inside is forced above the background */
.animated-hero-section > * {
    position: relative;
    z-index: 10;
}
/* ================= RESPONSIVE FIX ================= */

/* HERO TEXT */
.hero-title {
  font-size: 4rem;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 800;
}

.hero-subtext {
  max-width: 900px;
  margin: 0 auto 40px;
  font-size: 1.3rem;
  text-align: center;
  color: #cbd5e1;
}

/* BUTTONS */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--accent);
}

/* GLOBAL IMAGE FIX */
img {
  max-width: 100%;
  height: auto;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

  /* HERO */
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtext {
    font-size: 1rem;
    padding: 0 10px;
  }

  /* BUTTON STACK */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 90%;
    text-align: center;
  }

  /* NAVBAR */
  nav {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  /* SECTION SPACING */
  section {
    padding: 50px 5% !important;
  }

  /* GRID FIX */
  .product-feature-grid {
    grid-template-columns: 1fr !important;
  }

  /* TEXT SIZE FIX */
  h2 {
    font-size: 1.8rem !important;
    text-align: center;
  }

  p {
    font-size: 0.95rem !important;
  }
}
//* ===== FINAL PROFESSIONAL FOOTER ===== */

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 35px 5% 15px;
}

/* CENTERED + BALANCED */
.footer-container {
  max-width: 800px; /* keeps both sections near center */
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px; /* perfect spacing between left & right */
}

/* LEFT SIDE */
.footer-left h3 {
  margin-bottom: 10px;
  color: white;
  font-size: 1.1rem;
}

.footer-left ul {
  list-style: none;
}

.footer-left ul li {
  margin-bottom: 6px;
}

.footer-left a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.footer-left a:hover {
  color: #3b82f6;
}

/* RIGHT SIDE */
.footer-right {
  max-width: 320px;
}

.footer-right p {
  margin: 6px 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* BOTTOM */
.footer-bottom {
  text-align: center;
  border-top: 1px solid #334155;
  margin-top: 20px;
  padding-top: 10px;
  font-size: 0.8rem;
}

/* MOBILE */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
}
//* ===== PROFESSIONAL MOBILE NAVBAR ===== */

@media (max-width: 768px) {

  nav {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 1.2rem;
  }

  .nav-links {
    display: flex;
    flex-direction: row !important;
    gap: 15px;
    overflow-x: auto; /* scroll if needed */
    white-space: nowrap;
  }

  .nav-links li {
    flex: none;
  }

  .nav-links a {
    font-size: 0.9rem;
    padding: 5px;
  }

}
//* HAMBURGER BUTTON */
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
}

/* MOBILE NAVBAR */
@media (max-width: 768px) {

  nav {
    position: relative;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
  }

  /* MENU PANEL */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* hidden */
    height: 100vh;
    width: 240px;
    background: #0f172a;
    flex-direction: column;
    padding: 80px 20px;
    gap: 20px;
    transition: 0.3s ease;
    z-index: 999;
  }

  /* WHEN ACTIVE */
  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
    width: 100%;
  }

  /* ===== FIXED HAMBURGER MENU (ONLY) ===== */

.hamburger {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: white;
}

/* MOBILE ONLY */
@media (max-width: 768px) {

  .hamburger {
    display: block;
    position: absolute;
    right: 5%;
    top: 20px;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: #0f172a;
    flex-direction: column;
    padding: 80px 20px;
    gap: 20px;
    transition: 0.3s ease;
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }
}
}
