:root {
  --bg-color: #131314;
  --text-color: #e3e3e3;
  --nav-bg: #0a2e1c; /* Changed to PCB dark green */
  --link-hover: #ffffff;
  --footer-bg: #0a2e1c; /* Changed to PCB dark green */
  --border-color: #145233; /* Changed to PCB light green */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  
  /* PCB Specific Colors */
  --pcb-dark-green: #0a2e1c;
  --pcb-light-green: #145233;
  --circuit-color: rgba(255, 215, 0, 0.15); /* Static gold circuit */
  --beam-color: #ffe600; /* Yellow beam */
  --beam-glow: rgba(255, 230, 0, 0.6);
  --primary-action: #ff9900;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header/Nav Styles */
header {
  background-color: var(--nav-bg);
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden; /* Important for SVG overflow */
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* Clear shadow for sticky bar */
}

.header-container-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-left img {
  height: 48px; /* Increased from 32px by 50% */
  margin-right: 15px;
}

.nav-left span {
  font-size: 1.5rem; /* Slightly larger to match the logo */
  font-weight: 500;
  color: #fff;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  text-decoration: none;
}

.footer-logo img {
  height: 48px;
  margin-right: 12px;
}

.footer-logo span {
  font-size: 1.8rem; /* Increased from 1.5rem */
  font-weight: 600;
  color: #fff;
}

.footer-logo span span {
  color: var(--primary-action);
}

.nav-left span span {
  color: var(--primary-action);
}

.nav-right ul {
  list-style: none;
  display: flex;
  gap: 30px; /* Increased gap */
}

.nav-right a {
  text-decoration: none;
  color: #c4c7c5;
  font-size: 1.1rem; /* Increased from 0.95rem */
  transition: color 0.3s;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-right a:hover {
  color: var(--primary-action);
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-title {
  color: #c4c7c5;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: default;
  padding-bottom: 5px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-title::after {
  content: '▼';
  font-size: 0.7rem;
  transition: transform 0.3s;
}

.dropdown:hover .dropdown-title {
  color: var(--primary-action);
}

.dropdown:hover .dropdown-title::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--nav-bg);
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  padding: 10px 0;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  flex-direction: column !important; /* Force column in dropdown */
  gap: 0 !important;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  padding: 12px 20px;
  display: block;
  font-size: 0.95rem !important;
  text-transform: none !important;
  letter-spacing: 0.5px !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: var(--pcb-light-green);
  padding-left: 25px;
}

/* Footer Styles */
footer {
  background-color: var(--footer-bg);
  padding: 80px 30px 40px; /* Increased padding */
  border-top: 4px solid var(--pcb-light-green);
  text-align: center;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.footer-content-inner {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px; /* Added gap for better spacing */
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 40px; /* Increased gap between links */
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #fff; /* Brighter color */
  text-decoration: none;
  font-size: 1.1rem; /* Increased font size */
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 5px 10px;
}

.footer-links a:hover {
  color: var(--primary-action);
  text-decoration: none;
  transform: translateY(-2px);
}

.copyright {
  color: #8e918f;
  font-size: 1rem; /* Increased from 0.8rem */
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  width: 100%;
}

.footer-info {
  margin-bottom: 10px;
  color: #e3e3e3; /* Brighter text */
  font-size: 1.1rem; /* Increased from 0.9rem */
  line-height: 2; /* Increased line height */
  max-width: 800px;
}

.footer-info p {
  margin-bottom: 5px;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.contact-card {
  background: var(--nav-bg);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  border-color: var(--primary-action);
}

.contact-card h3 {
  color: var(--primary-action);
  font-size: 1.3rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-color);
}

.contact-item strong {
  color: #fff;
  min-width: 80px;
}

.contact-item a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: var(--primary-action);
}

.map-placeholder {
  width: 100%;
  height: 200px;
  background: #222;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  border: 1px dashed #444;
}

/* PCB Background Animation Styles */
.pcb-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.circuit-track {
  fill: none;
  stroke: var(--circuit-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.circuit-pad {
  fill: none;
  stroke: var(--circuit-color);
  stroke-width: 2;
}

.beam {
  fill: none;
  stroke: var(--beam-color);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--beam-glow));
  stroke-dasharray: 150 2000;
  stroke-dashoffset: 2150;
}

.beam-1 {
  animation: flow 8s linear infinite;
}

.beam-2 {
  animation: flow 12s linear infinite 1.5s;
  stroke-dasharray: 100 2000;
}

.beam-3 {
  animation: flow 10s linear infinite 0.5s;
}

@keyframes flow {
  0% {
    stroke-dashoffset: 2150;
  }
  100% {
    stroke-dashoffset: -150;
  }
}

/* Hero Section Styles */
.hero {
  text-align: center;
  padding: 120px 20px;
  background: linear-gradient(rgba(10, 46, 28, 0.85), rgba(10, 46, 28, 0.95)), url('https://xfpcb.com/img/xf-logo.png') center/cover;
  color: #fff;
  margin-bottom: 60px;
  border-bottom: 2px solid var(--primary-action);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.4rem;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #e3e3e3;
}

.cta-btn {
  display: inline-block;
  padding: 18px 40px;
  background-color: var(--primary-action);
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 153, 0, 0.4);
}

/* Service Grid Styles */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.service-card {
  background: var(--nav-bg);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-action);
}

.service-card h3 {
  color: var(--primary-action);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* Capability Table Styles */
.capability-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 60px;
  background: var(--nav-bg);
  border-radius: 8px;
  overflow: hidden;
}

.capability-table th, .capability-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.capability-table th {
  background: var(--pcb-light-green);
  color: #fff;
  font-weight: 600;
}

.capability-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Advantage Section Styles */
.advantage-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 80px;
}

.advantage-item {
  text-align: center;
}

.advantage-item h4 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.advantage-item p {
  font-size: 0.95rem;
  color: #c4c7c5;
}

/* Industries Grid */
.industry-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 80px;
}

.industry-tag {
  padding: 10px 25px;
  background: var(--border-color);
  color: #fff;
  border-radius: 30px;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: all 0.3s;
}

.industry-tag:hover {
  border-color: var(--primary-action);
  color: var(--primary-action);
  background: transparent;
}

/* Process Steps */
.process-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 80px;
  gap: 20px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 150px;
  text-align: center;
  position: relative;
}

.step-num {
  width: 50px;
  height: 50px;
  background: var(--primary-action);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 15px;
}

.step h4 {
  color: #fff;
  margin-bottom: 10px;
}

/* Accordion Styles */
.accordion {
  margin: 40px 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: 20px;
  background: var(--nav-bg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: var(--pcb-light-green);
}

.accordion-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.3s;
}

.accordion-icon::before, .accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--primary-action);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-icon::before { width: 14px; height: 2px; }
.accordion-icon::after { width: 2px; height: 14px; transition: opacity 0.3s; }

.accordion-item.active .accordion-icon { transform: rotate(90deg); }
.accordion-item.active .accordion-icon::after { opacity: 0; }

.accordion-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s;
  background: rgba(255, 255, 255, 0.02);
}

.accordion-item.active .accordion-content {
  padding: 20px;
  max-height: 1000px;
}

/* Media Modules */
.media-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 40px 0;
  align-items: center;
}

.media-placeholder {
  background: #222;
  border-radius: 12px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  border: 2px dashed #444;
  position: relative;
  overflow: hidden;
}

.video-placeholder::after {
  content: '▶';
  font-size: 3rem;
  color: var(--primary-action);
  opacity: 0.8;
}

.image-placeholder::after {
  content: '🖼️';
  font-size: 3rem;
  opacity: 0.6;
}

/* Product Interlink List */
.product-interlink {
  margin-top: 80px;
  padding: 40px;
  background: var(--nav-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.product-interlink h2 {
  text-align: center;
  margin-top: 0;
}

.interlink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.interlink-grid a {
  display: block;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: #e3e3e3;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.interlink-grid a:hover {
  background: var(--pcb-light-green);
  border-left-color: var(--primary-action);
  color: #fff;
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .media-module {
    grid-template-columns: 1fr;
  }
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #fff;
}

h2 {
  font-size: 1.8rem;
  margin: 40px 0 20px;
  color: #e3e3e3;
}

p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #c4c7c5;
}

section {
  margin-bottom: 50px;
}

img[data-lazyloaded] {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

img[data-lazyloaded].loaded {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }

  header {
    padding: 20px 15px;
  }

  .header-container-inner {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-right ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0,0,0,0.1);
    min-width: 100%;
    display: none !important;
    border: none;
    border-left: 2px solid var(--primary-action);
    margin-top: 10px;
  }

  .dropdown:hover .dropdown-menu {
    display: flex !important;
  }

  .dropdown-title {
    justify-content: center;
  }

  .beam {
    filter: drop-shadow(0 0 3px rgba(255,230,0,0.4));
  }
}
