/* =========================================
   M TECH CALIBRATION - PREMIUM REDESIGN 
   ========================================= */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --primary: #0f172a;
  --secondary: #334155;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-gradient: linear-gradient(135deg, #0ea5e9, #3b82f6);
  --warm-gradient: linear-gradient(135deg, #ff6a00, #ff9a57);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-height: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  padding-top: var(--header-height);
  overflow-x: hidden;
}

/* Abstract Background Graphics */
.bg-decor {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: 
    radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 85% 10%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
}

/* Typography */
h1, h2, h3, h4, h5 { font-weight: 800; line-height: 1.2; color: var(--primary); }
p { color: var(--secondary); margin-bottom: 1rem; }
.muted { color: #64748b !important; }
.center { text-align: center; }

/* Button System */
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  padding: 12px 24px; border-radius: var(--radius-md); font-weight: 700;
  text-decoration: none; cursor: pointer; transition: all 0.3s ease;
  border: none; font-family: inherit; font-size: 1rem; text-align: center;
}
.btn-primary {
  background: var(--accent-gradient); color: white !important;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover {
  transform: translateY(-3px); box-shadow: 0 12px 25px rgba(14, 165, 233, 0.35);
}
.btn-accent {
  background: var(--warm-gradient); color: white !important;
  box-shadow: 0 8px 20px rgba(255, 106, 0, 0.25);
}
.btn-accent:hover {
  transform: translateY(-3px); box-shadow: 0 12px 25px rgba(255, 106, 0, 0.35);
}
.btn.secondary {
  background: #f1f5f9; color: var(--primary) !important;
}
.btn.secondary:hover { background: #e2e8f0; }

/* Layout Containers */
main { max-width: 1240px; margin: 0 auto; padding: 20px; position: relative; z-index: 10; }
section {
  background: var(--surface); padding: 40px; border-radius: var(--radius-lg);
  margin-bottom: 40px; box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.02); position: relative;
}
.section-title {
  font-size: 2rem; margin-bottom: 24px; display: flex; align-items: center; gap: 16px;
}
.section-title::before {
  content: ""; width: 8px; height: 32px; background: var(--accent-gradient); border-radius: 10px;
}

/* Header & Navigation */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; padding: 0 30px; justify-content: space-between;
  border-bottom: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); z-index: 1200;
  transition: transform 0.3s ease;
}
.header.hidden { transform: translateY(-100%); }
.brand {
  font-size: 1.4rem; font-weight: 900; letter-spacing: -0.5px;
  background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-nav-desktop { display: flex; gap: 6px; }
.header-nav-desktop a {
  text-decoration: none; color: var(--secondary); font-weight: 600; font-size: 0.95rem;
  padding: 10px 16px; border-radius: 8px; transition: all 0.2s;
}
.header-nav-desktop a:hover { background: #f0f7ff; color: var(--accent); }

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white; text-align: center; padding: 120px 20px 100px;
  border-radius: 0 0 40px 40px; position: relative; overflow: hidden;
  margin-top: calc(var(--header-height) * -1); box-shadow: var(--shadow-lg);
}
.hero .inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; }
.hero img.logo { width: 120px; border-radius: 20px; margin-bottom: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.4); border: 3px solid rgba(255,255,255,0.1); }
.hero h2 { font-size: clamp(2rem, 5vw, 3.5rem); color: white; margin-bottom: 15px; letter-spacing: -1px; }
.hero p.lead { font-size: 1.2rem; color: #cbd5e1; margin-bottom: 30px; font-weight: 400; }
.hero .cta { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* Grids & Cards */
.doc-grid, .instr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.doc-card, .instr-card {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: var(--radius-lg);
  padding: 24px; text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.doc-card:hover, .instr-card:hover {
  transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: #cbd5e1;
}
.instr-card img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 16px; transition: transform 0.3s; }
.instr-card:hover img { transform: scale(1.05); }
.instr-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.instr-card p { font-size: 0.95rem; color: var(--secondary); margin-bottom: 20px; }
.instr-card .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Services / Calibrations List */
.cal-list { display: flex; flex-direction: column; gap: 24px; }
.cal-item {
  display: flex; gap: 30px; align-items: center; padding: 24px;
  background: #ffffff; border-radius: var(--radius-lg); border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm); transition: transform 0.3s;
}
.cal-item:hover { transform: translateX(5px); border-color: var(--accent); }
.cal-item img { width: 300px; max-width: 40%; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-md); }
.cal-item h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--primary); }

/* Workflow Steps */
.workflow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step {
  padding: 30px 20px; text-align: center; background: #f8fafc;
  border-radius: var(--radius-lg); border: 1px solid #e2e8f0; position: relative;
  transition: all 0.3s ease;
}
.step:hover { background: #ffffff; box-shadow: var(--shadow-md); transform: translateY(-5px); }
.step div:first-child {
  font-size: 3rem; font-weight: 900; color: rgba(14, 165, 233, 0.1);
  position: absolute; top: 10px; right: 20px; line-height: 1;
}

/* Showcase Window */
.showcase-banner {
  background: var(--surface); 
  padding: 30px; 
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); 
  border: 1px solid #e2e8f0; 
  max-width: 1000px; 
  margin: 0 auto 50px;
}

.showcase-header {
  font-size: 0.9rem; 
  font-weight: 800; 
  text-transform: uppercase; 
  letter-spacing: 1.5px;
  color: var(--secondary); 
  margin-bottom: 20px; 
  display: flex; 
  align-items: center; 
  gap: 10px;
}

.showcase-header::before {
  content: ''; 
  width: 12px; 
  height: 12px; 
  background: #10b981; 
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.showcase-track { 
  height: 400px; /* Default desktop height */
  background: #f8fafc; 
  border-radius: 16px; 
  position: relative; 
  overflow: hidden; 
}

.banner { 
  position: absolute; 
  inset: 0; /* Keeps all banners pinned to the container edges */
  opacity: 0; 
  visibility: hidden; /* Prevents hidden banners from blocking clicks */
  transition: opacity 0.8s ease, visibility 0.8s; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
}

.banner.active { 
  opacity: 1; 
  visibility: visible;
  z-index: 2; /* Ensures the active banner stays on top without changing position logic */
}

.banner img { 
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain; 
  border-radius: 12px; 
}

/* Mobile Overrides for Showcase */
@media (max-width: 900px) {
  .showcase-track {
    height: 300px; /* Shrinks height for tablets */
  }
}

@media (max-width: 600px) {
  .showcase-banner {
    padding: 20px 15px; /* Tighter padding for phones */
  }
  .showcase-track {
    height: 200px; /* Perfect height for small mobile screens */
  }
}

/* FAQ Accordion */
.faq-list { display: grid; gap: 16px; }
.faq-item {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: var(--radius-md);
  overflow: hidden; transition: all 0.3s ease;
}
.faq-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.faq-q {
  padding: 20px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 700; color: var(--primary); font-size: 1.1rem;
}
.faq-icon.q {
  width: 40px; height: 40px; background: var(--accent-gradient); color: white;
  border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 15px; font-weight: 900;
}
.faq-a { padding: 0 20px 20px 75px; display: none; color: var(--secondary); }
.faq-item.active .faq-a { display: block; animation: fadeIn 0.3s ease; }

/* Carousels */
.carousel, .review-carousel { text-align: center; padding: 20px 0; }
.carousel-track, .review-track { height: 180px; position: relative; margin-bottom: 20px; }
.carousel-track img, .review-card {
  position: absolute; top: 0; left: 0; width: 100%; opacity: 0; transition: opacity 0.6s ease;
}
.carousel-track img.active, .review-card.active { opacity: 1; }
.review-card {
  background: white; padding: 30px; border-radius: var(--radius-lg); border: 1px solid #e2e8f0; box-shadow: var(--shadow-md);
}
.carousel-btn, .review-btn {
  background: white; border: 1px solid #cbd5e1; padding: 10px 20px; border-radius: 30px; font-weight: 700; cursor: pointer; transition: 0.2s; color: var(--primary);
}

/* Update these specific lines in your existing CSS */
.carousel-track { 
  height: 120px; /* Reduced from 180px to make them smaller */
  position: relative; 
  margin-bottom: 20px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.carousel-track img {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); /* Centers the image */
  max-width: 250px; /* Limits the width */
  max-height: 100px; /* Limits the height */
  width: auto; 
  height: auto; 
  object-fit: contain; /* Ensures logo isn't stretched */
  opacity: 0; 
  transition: opacity 0.6s ease;
}

.carousel-btn:hover, .review-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Tables & Map */
.sitemap-table { width: 100%; border-collapse: collapse; margin-top: 20px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.sitemap-table th { background: var(--primary); color: white; padding: 15px; text-align: left; }
.sitemap-table td { padding: 15px; background: white; border-bottom: 1px solid #e2e8f0; }
.map-container { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); margin-top: 20px; border: 1px solid #e2e8f0; }

/* Footer */
footer { background: #0f172a; color: #cbd5e1; padding: 60px 20px; text-align: center; border-radius: 40px 40px 0 0; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: 1200px; margin: 0 auto; gap: 30px; text-align: left; align-items: center; }
footer a { color: var(--accent); text-decoration: none; font-weight: 600; transition: 0.2s; }
footer a:hover { color: white; }
.carousel-track img { 
  max-width: 200px; /* Smaller logos for mobile screens */
  max-height: 80px; 
}

/* Mobile Overrides */
@media (max-width: 900px) {
  .header-nav-desktop { display: none; }
  .cal-item { flex-direction: column; text-align: center; }
  .cal-item img { max-width: 100%; width: 100%; }
  .faq-a { padding: 0 20px 20px 20px; }
  .footer-grid { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  section { padding: 25px 15px; }
  .hero { padding: 100px 15px 60px; border-radius: 0 0 25px 25px; }
  .section-title { font-size: 1.6rem; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Utilities converted from inline */
.styled-inline-btn {
  display: inline-block; padding: 14px 28px; border-radius: 12px; font-weight: 800; text-decoration: none;
  color: white; background: var(--accent-gradient); box-shadow: var(--shadow-md); transition: transform 0.3s;
  margin: 20px auto;
}
.styled-inline-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.banner-img { width: 100%; max-width: 800px; display: block; margin: 0 auto 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

#global-loader {
  position: fixed; inset: 0; background: #0f172a; 
  z-index: 9999999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

/* New Particle Decoration */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particle {
  position: absolute; bottom: -10px; width: 4px; height: 4px;
  background: #0ea5e9; border-radius: 50%;
  box-shadow: 0 0 12px 3px rgba(14, 165, 233, 0.8);
  animation: floatUp linear infinite; opacity: 0;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

.loader-grid {
  position: absolute; inset: -50%;
  background-image: linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
  background-size: 40px 40px; animation: panGrid 15s linear infinite; z-index: 1; pointer-events: none;
}
@keyframes panGrid { 0% { transform: translateY(0) } 100% { transform: translateY(40px) } }

#loader-data {
  position: relative; z-index: 2; color: #0ea5e9; font-family: monospace;
  font-size: 1.6rem; font-weight: 900; letter-spacing: 2px; margin-bottom: 25px;
  text-shadow: 0 0 15px rgba(14, 165, 233, 0.9);
}

.loader-content { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; z-index: 2; }

.loader-logo {
  position: absolute; font-size: 36px; font-weight: 900; color: white;
  background: linear-gradient(135deg, #0f172a, #1e293b); width: 65px; height: 65px;
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #0ea5e9; box-shadow: 0 0 30px rgba(14, 165, 233, 0.6), inset 0 0 20px rgba(14, 165, 233, 0.4); overflow: hidden;
}

.laser-scan {
  position: absolute; top: -10px; left: 0; width: 100%; height: 2px;
  background: #22d3ee; box-shadow: 0 0 15px 3px rgba(34, 211, 238, 0.9);
  animation: scanLaser 1.2s ease-in-out infinite alternate;
}
@keyframes scanLaser { 0% { transform: translateY(0); } 100% { transform: translateY(85px); } }

.loader-ring { position: absolute; border-radius: 50%; border: 3px solid transparent; }
.outer-ring { width: 120px; height: 120px; border-top-color: #0ea5e9; border-bottom-color: #3b82f6; animation: spinRing 2s linear infinite; }
.inner-ring { width: 95px; height: 95px; border-left-color: #8b5cf6; border-right-color: #ec4899; animation: spinRing 1.2s linear infinite reverse; }
@keyframes spinRing { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loader-text { color: #cbd5e1; font-size: 0.95rem; font-weight: 800; letter-spacing: 5px; text-transform: uppercase; z-index: 2; animation: pulseText 1s infinite alternate; }
.progress-container { width: 220px; height: 5px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; margin-top: 15px; z-index: 2; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--accent-gradient); box-shadow: 0 0 15px rgba(14, 165, 233, 0.9); transition: width 0.1s linear; }

@keyframes pulseText { 0% { opacity: 0.5; text-shadow: 0 0 0px transparent; } 100% { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.5); } }
.loader-hidden { opacity: 0; visibility: hidden; transform: scale(1.05); }

/* Notification System */
#notification-container {
  position: fixed;
  bottom: 100px;
  left: 25px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* Allows clicking through empty space */
}

.mtech-toast {
  pointer-events: auto;
  width: 320px;
  background: white;
  border-left: 5px solid #0ea5e9;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 12px;
  align-items: start;
  position: relative;
  overflow: hidden;
  transform: translateX(-120%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mtech-toast.show { transform: translateX(0); }

.toast-icon {
  width: 35px;
  height: 35px;
  background: #f0f9ff;
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.toast-body h4 {
  font-size: 0.95rem;
  margin: 0 0 4px 0;
  color: var(--primary);
}

.toast-body p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--secondary);
  line-height: 1.4;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  width: 100%;
  transform-origin: left;
}

@keyframes toastTimer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Color Variants for Notifications */
.mtech-toast.info { border-left-color: #0ea5e9; }
.mtech-toast.success { border-left-color: #10b981; }
.mtech-toast.warning { border-left-color: #f59e0b; }
.mtech-toast.promo { border-left-color: #8b5cf6; }

/* Test Panel Styles */
#notif-test-panel {
  position: fixed;
  top: 100px;
  right: -250px;
  width: 240px;
  background: white;
  padding: 20px;
  border-radius: 20px 0 0 20px;
  box-shadow: var(--shadow-lg);
  z-index: 100000;
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #e2e8f0;
}
#notif-test-panel.open { right: 0; }

.test-panel-toggle {
  position: absolute;
  left: -50px;
  top: 20px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 12px 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  border-right: none;
  font-size: 20px;
}

.test-btn {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: opacity 0.2s;
}
.test-btn:hover { opacity: 0.8; }
.copy-btn {
  background: white;
  border: 1px solid #cbd5e1;
  color: var(--primary);
  width: 35px;
  height: 35px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
}

/* The squish animation when clicked */
.copy-btn:active {
  transform: scale(0.85) !important;
}

/* --- SWIPEABLE MOBILE NAVIGATION --- */
@media (max-width: 1000px) {
  .header nav, .nav-links {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: nowrap !important;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      gap: 15px; 
      padding-bottom: 5px; 
      scrollbar-width: none;
      -ms-overflow-style: none;
  }
  .header nav::-webkit-scrollbar, .nav-links::-webkit-scrollbar {
      display: none; 
  }
  .header nav a, .nav-links a {
      white-space: nowrap; 
      flex-shrink: 0; 
  }
}

/* Contact Section Styles */
.contact-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
.contact-card:hover { transform: translateY(-5px); }

.card-icon { font-size: 32px; margin-bottom: 15px; }
.contact-card h4 { color: #1e293b; margin-bottom: 15px; font-weight: 800; }

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 12px 15px;
  border-radius: 12px;
}

.link-text {
  font-weight: 700;
  color: #0ea5e9;
  cursor: pointer;
  text-decoration: underline;
}

.card-note { font-size: 12px; color: #64748b; margin-top: 12px; font-weight: 600; }

/* Email Choice GUI Overlay */
#email-choice-gui {
  display: none; 
  position: absolute; 
  inset: 0; 
  background: rgba(255,255,255,0.98); 
  z-index: 50; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.choice-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  color: white;
  transition: 0.2s;
}
.choice-btn.gmail { background: #ef4444; }
.choice-btn.website { background: #1e293b; }
.choice-btn:active { transform: scale(0.95); }

.close-choice {
  background: none;
  border: none;
  color: #94a3b8;
  font-weight: 800;
  cursor: pointer;
  font-size: 11px;
  margin-top: 5px;
}