/* ==========================================================================
   Tech-Sol Services - Core Design System & Global Stylesheet
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;900&display=swap');

/* CSS Variables */
:root {
  /* Colors */
  --primary: #0A69A3;           /* Vibrant Corporate Royal Blue */
  --primary-hover: #085482;
  --accent: #0096EB;            /* Dynamic Blue Accent */
  --accent-glow: rgba(0, 150, 235, 0.1);
  --accent-hover: #0077C0;
  --success: #10B981;
  --warning: #F59E0B;
  
  /* Dark Mode Palette (Metallic Slate - Used selectively in Footer/Banners) */
  --dark-bg: #0F172A;           /* Sleek slate gray */
  --dark-section: #0F172A;
  --dark-card: #1E293B;         
  --dark-card-hover: #334155;
  --dark-border: rgba(255, 255, 255, 0.08);
  --dark-border-hover: rgba(2, 132, 199, 0.3);
  --text-light: #FFFFFF;
  --text-light-muted: #94A3B8;  /* Steel gray text */

  /* Light Mode Palette (Default Primary Theme) */
  --light-bg: #FFFFFF;
  --light-section: #F8FAFC;     /* Off-White Technical Grid */
  --light-card: #FFFFFF;
  --light-card-hover: #F1F5F9;
  --light-border: #E2E8F0;
  --light-border-hover: rgba(0, 92, 138, 0.3);
  --text-dark: #0F172A;
  --text-dark-muted: #475569;

  /* Typography */
  --font-head: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 15px rgba(2, 132, 199, 0.2);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Transitions & Overlays */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --blueprint-overlay: url('../assets/blueprint-bg.svg');
}

/* ==========================================================================
   1. Base Reset & Defaults
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--light-bg);
  color: var(--text-dark-muted);
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--light-section);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ==========================================================================
   2. Layout & Utility Classes
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-dark {
  background-color: var(--light-section);
  color: var(--text-dark);
}

.section-light {
  background-color: var(--light-bg);
  color: var(--text-dark);
}

.section-light-gray {
  background-color: var(--light-section);
  color: var(--text-dark);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .section {
    padding: 4rem 0;
  }
}

/* Blueprint Pattern Overlay Utility */
.blueprint-bg {
  position: relative;
}
.blueprint-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--blueprint-overlay);
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

/* Section Title Highlight style */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
  z-index: 2;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.section-title.left-align {
  text-align: left;
  margin-bottom: 2.5rem;
}

.section-title.left-align h2::after {
  left: 0;
  transform: none;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, var(--primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

/* ==========================================================================
   4. Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition);
  gap: 0.75rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 14px rgba(0, 92, 138, 0.4);
}

.btn-primary:hover {
  background-color: var(--accent);
  color: var(--dark-bg);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 700;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 105, 163, 0.2);
}

.hero .btn-secondary, .page-banner .btn-secondary, .cta-banner .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  border: 1px solid var(--text-light);
  backdrop-filter: blur(10px);
}

.hero .btn-secondary:hover, .page-banner .btn-secondary:hover, .cta-banner .btn-secondary:hover {
  background: #FFFFFF;
  color: var(--text-dark);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-light-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 14px rgba(0, 92, 138, 0.3);
}

.btn-light-primary:hover {
  background-color: var(--text-dark);
  transform: translateY(-2px);
}

.btn-light-secondary {
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--light-border);
}

.btn-light-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 180, 216, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   5. Header & Navigation (Sticky, Responsive Menu)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  height: 75px;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo img {
  height: 48px;
  width: auto;
}

.logo-text {
  font-weight: 900;
  font-family: var(--font-head);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
  text-transform: uppercase;
}

.footer-logo-text {
  font-weight: 900;
  font-family: var(--font-head);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-head);
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-light);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* ==========================================================================
   5.1 Navigation Dropdown Styling
   ========================================================================== */
.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  min-width: 250px;
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light-muted);
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(0, 180, 216, 0.1);
  color: var(--accent);
  padding-left: 1.75rem;
}

/* Show Dropdown Menu on Desktop Hover */
@media (min-width: 1025px) {
  .nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

/* Menu Toggle Button (Mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-light);
  position: absolute;
  left: 0;
  transition: var(--transition);
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #0B0F19;
    border-left: 1px solid var(--dark-border);
    flex-direction: column;
    padding: 8rem 2.5rem 3rem;
    gap: 1.5rem;
    align-items: flex-start;
    transition: var(--transition);
    z-index: 1050;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    display: block;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 100%;
    padding: 0.5rem 0 0 1rem;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dropdown-item {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light-muted);
    border-bottom: none;
  }
  
  .dropdown-item:hover {
    padding-left: 0.5rem;
  }
}

/* ==========================================================================
   6. Hero & Banners
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  background-color: #F8FAFC;
  background-image: linear-gradient(to right, rgba(11, 15, 25, 0.65) 20%, rgba(11, 15, 25, 0.4) 60%, rgba(11, 15, 25, 0.25) 100%), url('../assets/images/home_hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Background overlay image placeholder generated or color grids */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 75% 30%, rgba(0, 180, 216, 0.12) 0%, transparent 60%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to right, rgba(11, 15, 25, 0.55) 20%, rgba(11, 15, 25, 0.25) 100%),
    url('../assets/blueprint-bg.svg');
  opacity: 0.5;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 750px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-tag span {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Inner Pages Hero Banner */
.page-banner {
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--dark-border);
}

.page-banner.calibration-banner-bg {
  background-image: linear-gradient(135deg, rgba(11, 15, 25, 0.7) 0%, rgba(11, 15, 25, 0.4) 100%), url('../assets/images/calibration_hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-banner.engineering-banner-bg {
  background-image: linear-gradient(135deg, rgba(11, 15, 25, 0.7) 0%, rgba(11, 15, 25, 0.4) 100%), url('../assets/images/engineering_hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-banner.general-banner-bg {
  background-image: linear-gradient(135deg, rgba(11, 15, 25, 0.7) 0%, rgba(11, 15, 25, 0.4) 100%), url('../assets/images/industries_hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--blueprint-overlay);
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

.page-banner-glow {
  position: absolute;
  bottom: -150px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-banner .container {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   7. Card Components & Hover Effects
   ========================================================================== */
/* Premium Industrial Cards (Generic for lists/services) */
.premium-card {
  background: #FFFFFF;
  border: 1px solid #D2E4F1;
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  z-index: 1;
  color: var(--text-dark-muted);
  box-shadow: 0 8px 24px rgba(10, 105, 163, 0.03);
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.premium-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 16px 32px rgba(10, 105, 163, 0.08);
  background: #F4F9FD;
}

.premium-card:hover::before {
  transform: scaleX(1);
}

/* Light Card Version */
.premium-card-light {
  background: #FFFFFF;
  border: 1px solid #D2E4F1;
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(10, 105, 163, 0.03);
}

.premium-card-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.premium-card-light:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 16px 32px rgba(10, 105, 163, 0.08);
  background: #F4F9FD;
}

.premium-card-light .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border: 1px solid var(--text-light);
}

.premium-card-light .btn-secondary:hover {
  background: #FFFFFF;
  color: var(--primary);
  border-color: #FFFFFF;
}

.premium-card-light:hover::before {
  transform: scaleX(1);
}

/* Big Interactive Division Cards */
.division-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F4F9FD 100%);
  border: 2px solid #D2E4F1;
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  color: var(--text-dark-muted);
  box-shadow: 0 8px 30px rgba(10, 105, 163, 0.05);
}

.division-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--blueprint-overlay);
  opacity: 0.2;
  pointer-events: none;
  transition: var(--transition);
}

.division-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px -15px rgba(0, 92, 138, 0.12);
}

.division-card:hover::after {
  opacity: 0.4;
}

.division-card .icon-box {
  width: 70px;
  height: 70px;
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: var(--accent);
}

.division-card .icon-box svg {
  width: 32px;
  height: 32px;
}

.division-card:hover .icon-box {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 0 15px rgba(0, 92, 138, 0.3);
}

.division-card-links {
  margin-top: 2rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.link-arrow:hover svg {
  transform: translateX(5px);
}

/* Checklist items */
.tech-list {
  margin-top: 1.5rem;
}

.tech-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: inherit;
}

.tech-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.tech-list-light li::before {
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* ==========================================================================
   8. Project Methodology Timeline (Dynamic Horizontal Layout)
   ========================================================================== */
.timeline-container {
  position: relative;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--dark-border);
  z-index: 1;
}

.timeline-line-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px var(--accent);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.timeline-step {
  text-align: center;
}

.timeline-node {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--light-border);
  margin: 30px auto 1.5rem;
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-light-muted);
}

.timeline-step:hover .timeline-node,
.timeline-step.active .timeline-node {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--dark-bg);
  box-shadow: var(--shadow-glow);
}

.timeline-step.active .timeline-node::before {
  content: '';
  position: absolute;
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.timeline-step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.timeline-step p {
  font-size: 0.875rem;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .timeline-line {
    display: none;
  }
  
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .timeline-node {
    margin: 0 auto 1rem;
  }
  
  .timeline-step {
    padding: 1.5rem;
    background: #FFFFFF;
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
  }
}

/* ==========================================================================
   9. Statistics Counter Section
   ========================================================================== */
.stat-item {
  text-align: center;
  padding: 2rem;
  background: #FFFFFF;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.04);
}

.stat-item:hover {
  border-color: var(--primary);
  background: var(--light-section);
  box-shadow: 0 16px 32px -10px rgba(0, 92, 138, 0.08);
}

.stat-number {
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light-muted);
}

/* ==========================================================================
   10. Form Controls & Floating Premium Styling
   ========================================================================== */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light-muted);
  margin-bottom: 0.5rem;
}

.form-label-dark {
  color: var(--text-dark-muted);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.15);
}

/* Light form versions */
.form-control-light {
  background-color: #F8FAFC;
  border: 1px solid var(--light-border);
  color: var(--text-dark);
}

.form-control-light:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(0, 92, 138, 0.1);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

select.form-control option {
  background-color: var(--dark-card);
  color: var(--text-light);
}

select.form-control-light {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%230F172A' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

select.form-control-light option {
  background-color: #FFFFFF;
  color: var(--text-dark);
}

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

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

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Form success message */
.form-response {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.95rem;
  display: none;
}

.form-response.success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
  display: block;
}

.form-response.error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid #EF4444;
  color: #EF4444;
  display: block;
}

/* ==========================================================================
   11. Dynamic Project Filtering UI
   ========================================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1.5rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text-light-muted);
  font-family: var(--font-head);
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-light);
}

.portfolio-item {
  display: block;
  opacity: 1;
  transform: scale(1);
  transition: all 0.4s ease;
}

.portfolio-item.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.8);
}

/* Portfolio Hover Details */
.project-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--dark-border);
  transition: var(--transition);
}

.project-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-img img {
  transform: scale(1.08);
}

.project-content {
  padding: 1.5rem;
  background: #FFFFFF;
  border-top: 1px solid var(--light-border);
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

/* ==========================================================================
   12. Testimonials (Client Feedback)
   ========================================================================== */
.testimonial-card {
  background-color: #FFFFFF;
  border: 1px solid #D2E4F1;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(10, 105, 163, 0.03);
}
.testimonial-card:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  box-shadow: 0 16px 32px rgba(10, 105, 163, 0.08);
  transform: translateY(-2px);
}

.testimonial-card::after {
  content: '”';
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 6rem;
  font-family: var(--font-head);
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
}

.testimonial-quote {
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 2rem;
  color: var(--text-dark-muted);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-light);
  font-size: 1.1rem;
  border: 2px solid var(--accent);
}

.author-info h4 {
  font-size: 1rem;
  color: var(--text-light);
}

.author-info p {
  font-size: 0.8rem;
  color: var(--text-light-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   13. Footer Styling
   ========================================================================== */
.footer {
  background-color: #050810;
  border-top: 1px solid var(--dark-border);
  padding: 6rem 0 2rem;
  color: var(--text-light-muted);
}

.footer-top {
  margin-bottom: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.5fr;
  gap: 3rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 45px;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--dark-card);
  border: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light-muted);
}

.social-link:hover {
  background-color: var(--accent);
  color: var(--dark-bg);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.footer-title {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.contact-info-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.contact-info-list svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   14. Scroll Reveal Animations (CSS Classes controlled by JS)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Call-to-action Banner Specific (Home page CTA) */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #064064 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--blueprint-overlay);
  opacity: 0.3;
  pointer-events: none;
}

.cta-banner h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   15. Global Banner Contrasts & Responsive Media Queries
   ========================================================================== */

/* Subtitle and lead contrasts for all heroes and page-banners */
.hero p, 
.hero .lead, 
.page-banner p, 
.page-banner .lead,
.page-banner #engineering-banner-lead,
.page-banner #about-banner-lead,
.page-banner #calibration-banner-lead,
.page-banner #certifications-banner-lead,
.page-banner #contact-banner-lead,
.page-banner #industries-banner-lead,
.page-banner #projects-banner-lead {
  color: #FFFFFF !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

/* Translucent Glass-Navy hero tag styling */
.hero-tag {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-tag span {
  background-color: var(--accent) !important;
  box-shadow: 0 0 8px var(--accent);
}

/* Mobile View Typography & Alignment Adjustments */
@media (max-width: 768px) {
  /* Fluid Responsive Typography Sizing */
  h1 {
    font-size: 2.2rem !important;
    line-height: 1.2 !important;
  }
  h2 {
    font-size: 1.7rem !important;
    line-height: 1.25 !important;
  }
  h3 {
    font-size: 1.35rem !important;
  }
  .lead {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
  .hero-tag {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.8rem !important;
  }
  
  /* Home Page Hero Mobile Content Centering */
  .hero-content {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .hero-tag {
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Side-by-Side Mobile CTA buttons */
  .hero-actions {
    justify-content: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    width: 100%;
    margin-top: 1rem;
  }
  
  .hero-actions .btn {
    padding: 0.75rem 0.85rem !important;
    font-size: 0.75rem !important;
    flex: 1 1 50%;
    white-space: nowrap !important;
    letter-spacing: 0.02em !important;
  }
}

/* Dynamic Scroll Highlight class for Mobile Viewport */
.premium-card.viewed-highlight,
.premium-card-light.viewed-highlight {
  background-color: #F4F9FD !important;
  border-color: var(--accent) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(10, 105, 163, 0.06);
}
.premium-card.viewed-highlight::before,
.premium-card-light.viewed-highlight::before {
  transform: scaleX(1) !important;
}
/* Parent Company Note Bar Styles */
.parent-company-note {
  background-color: #070b14; /* Darker slate/black to blend with the footer */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem 0;
  color: var(--text-light-muted);
  font-size: 0.875rem;
  text-align: center;
  font-family: var(--font-body);
}

.parent-company-note p {
  margin: 0;
  padding: 0 1.5rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* ==========================================================================
   15. Advanced Mobile Responsiveness & Overflow Protection
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal animations from shifting layouts and causing overflow */
  .reveal-left, .reveal-right {
    transform: translateY(20px) !important;
  }

  /* Clip horizontal overflow at section, footer and banner level */
  .section, .footer, .parent-company-note, .hero, .page-banner, .cta-banner {
    overflow: hidden !important;
    width: 100% !important;
  }

  /* Scale down large inline and class paddings to fit narrow mobile screens */
  .premium-card-light, 
  .premium-card,
  .division-card,
  .testimonial-card,
  #overview-badge-panel,
  #compliance-standards-box,
  #process-visual,
  #utility-diagram,
  #about-visual-container,
  #contact-form-card .premium-card-light {
    padding: 1.5rem !important;
  }
  
  .division-card {
    padding: 2rem 1.5rem !important;
    min-height: auto !important;
  }

  /* Fix text color visibility on the white cards of the mobile timeline */
  .timeline-step {
    background: #FFFFFF !important;
    border: 1px solid var(--light-border) !important;
  }
  .timeline-step h3 {
    color: var(--text-dark) !important;
  }
  .timeline-step p {
    color: var(--text-dark-muted) !important;
    padding: 0 !important;
  }

  /* Fix label text visibility in light statistics block */
  #company-statistics .stat-label {
    color: var(--text-dark-muted) !important;
  }
}

/* Optimize header branding text sizes on narrow viewports to prevent wrapping / spillover */
@media (max-width: 480px) {
  .logo-text {
    font-size: 1.05rem !important;
    letter-spacing: 0.02em !important;
  }
  .footer-logo-text {
    font-size: 1.15rem !important;
  }
}
@media (max-width: 360px) {
  .logo-text {
    font-size: 0.9rem !important;
    letter-spacing: 0.01em !important;
  }
}
