/* Magsen - Corporate Website (Reference Clone Style) */

:root {
  /* Brand Colors - Light Theme */
  --primary-bg: #ffffff;
  /* Main Background updated to White */
  --secondary-bg: #f9f9f9;
  /* Light Gray for sections */
  --dark-bg: #0a192f;
  /* Deep Navy (Original Primary) for Hero/Footer */
  --accent: #2e8b7b;
  /* Darker Cyan for better contrast on white, was #64ffda */
  --accent-light: #64ffda;
  /* Original Neon Cyan for dark backgrounds */
  --white: #ffffff;
  --text-main: #111111;
  /* Almost Black */
  --text-scod: #555555;
  /* Dark Gray */
  --border: #e0e0e0;


  /* Reference Design Variables */
  --header-h: 90px;
  --container: 1400px;
  /* Wider container like reference */
  --radius: 4px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Animation Utility */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}

.fade-up.active {
  opacity: 1;
  transform: translateY(0);
  transition: 0.8s;
}

/* Typography */
.font-heading {
  font-family: 'Outfit', sans-serif;
}

.fw-bold {
  font-weight: 700;
}

.fw-extra-bold {
  font-weight: 800;
}

.text-white {
  color: var(--white);
}

.text-accent {
  color: var(--accent);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

/* Layout Utilities */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

.section-title {
  font-size: 40px;
  margin-bottom: 15px;
  color: var(--white);
}

.section-desc {
  color: var(--text-scod);
  font-size: 16px;
  margin-top: 10px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  /* Pill shape like reference */
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: 0.3s;
}

/* Zoomable Image for Lightbox */
.zoomable-img {
  cursor: pointer;
  object-fit: contain;
  /* Maintain aspect ratio */
  /* height: 400px;  Adjust as needed */
  transition: transform 0.3s;
}

.zoomable-img:hover {
  transform: scale(1.02);
}

.btn-circle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--white);
  font-size: 16px;
  transition: 0.3s;
  border: none;
}

/* Carousel Control visibility */
.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 1;
  /* Always visible */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5);
  /* Dark background for visibility */
  border-radius: 50%;
  /* Circular */
  padding: 20px;
  /* Size of the circle */
  background-size: 50% 50%;
  /* Icon size inside circle */
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
  background-color: var(--accent);
  /* Theme color on hover */
}

.btn-circle-arrow:hover {
  transform: scale(1.1);
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--primary-bg);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--primary-bg);
}

/* Header (Transparent & Floating) */
header {
  height: var(--header-h);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: 0.4s;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

header.scrolled {
  background-color: rgba(10, 25, 47, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

header .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

/* Navigation */
.gnb {
  display: flex;
  gap: 25px;
  /* Reduced from 40px */
}

.gnb>li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.gnb>li>a {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  /* Reduced from 16px */
  letter-spacing: 0.5px;
  position: relative;
  padding: 10px 0;
  white-space: nowrap;
  /* Prevent wrapping */
}

.gnb>li>a.active,
.gnb>li:hover>a {
  color: var(--accent);
}

/* Underline Effect for Active/Hover */
.gnb>li>a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: 0.3s;
}

.gnb>li>a.active::after,
.gnb>li:hover>a::after {
  width: 100%;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  min-width: 180px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 10;
}

.sub-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

.gnb>li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sub-menu li {
  display: block;
  text-align: center;
}

.sub-menu li a {
  display: block;
  padding: 10px 20px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  transition: 0.2s;
  white-space: nowrap;
}

.sub-menu li a:hover {
  background: #f5f5f5;
  color: var(--accent);
}

.sub-menu li a::after {
  display: none;
  /* Remove underline effect from sub-menu */
}

/* Header Utilities */
.header-util {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.lang-toggle .divider {
  opacity: 0.5;
  font-size: 10px;
}

.lang-toggle a {
  transition: 0.3s;
}

.lang-toggle a:hover,
.lang-toggle a.active {
  color: var(--white);
  font-weight: 700;
  border-bottom: 1px solid var(--accent);
}

/* Hero Section */
.hero {
  height: 100vh;
  /* Parallax Background */
  /* background: url('../images/hero-bg.png') no-repeat center/cover; */
  /* Removed for video */
  /* background-attachment: fixed; */
  position: relative;
  display: flex;
  align-items: center;
  /* Video Parallax Fix */
  clip-path: inset(0);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 20, 38, 0.9) 0%, rgba(8, 20, 38, 0.6) 100%);
  /* Ensure overlay stays on top of background but below text */
  z-index: 1;
}

.hero-video {
  position: fixed;
  /* Parallax Effect */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  /* Behind content */
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  /* Force white text on dark hero */
  max-width: 800px;
}

.hero-desc {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  /* Lighter white for desc */
  margin-bottom: 40px;
  max-width: 600px;
}

/* Badge override for dark hero */
.hero .badge {
  color: var(--accent-light);
  border-color: var(--accent-light);
  background: rgba(100, 255, 218, 0.1);
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 30px;
}

.hero .text-accent {
  color: var(--accent-light);
}

/* Button overrides for Dark Hero to prevent Navy-on-Navy */
.hero .btn-primary {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--dark-bg);
}

.hero .btn-primary:hover {
  background-color: transparent;
  color: var(--accent-light);
}

.btn-group {
  display: flex;
  gap: 15px;
}

/* About Section */
.about-wrap {
  display: flex;
  align-items: center;
  gap: 50px;
  background: #fff;
}

.about-img {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.about-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.img-frame img {
  width: 70% !important;
  height: auto !important;
  object-fit: contain;
  margin: 0 auto;
}

.about-text {
  flex: 1;
  text-align: left;
}

.section-label {
  color: var(--accent);
  font-weight: 700;
  font-size: 28px;
  /* Increased from 14px */
  margin-bottom: 15px;
  display: block;
  letter-spacing: 1px;
}

.about-head {
  font-size: 42px;
  color: var(--dark-bg);
  margin-bottom: 25px;
  line-height: 1.2;
  font-weight: 800;
}

.about-desc {
  color: #555;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.7;
}

.check-list li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 25px;
  color: #333;
  font-weight: 500;
}

.check-list li::before {
  content: '✔';
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 2px;
  font-weight: bold;
}

/* Service Grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-item {
  background: #f9f9f9;
  /* Fallback */
  background-size: cover;
  background-position: center;
  padding: 48px 24px;
  border-radius: 20px;
  text-align: center;
  /* Point Color Update: Navy */
  --accent: #0a192f;
  /* Deep Navy for buttons/icons on light bg */
  --accent-light: #64ffda;
  /* Original Neon Cyan for dark backgrounds */
  --white: #ffffff;
  --text-main: #000000;
  /* Pure Black */
  --text-scod: #555555;
  /* Dark Gray */
  --border: #e0e0e0;
  transition: 0.3s;
  border: none;
  box-shadow: none;
  /* Flexbox for Button Alignment */
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Overlay for background images */
.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10, 25, 47, 0.4) 0%, rgba(10, 25, 47, 0.8) 100%);
  z-index: -1;
  transition: 0.3s;
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-item:hover::before {
  background: linear-gradient(180deg, rgba(10, 25, 47, 0.6) 0%, rgba(10, 25, 47, 0.8) 100%);
}

.service-icon {
  font-size: 48px;
  color: var(--white);
  /* White Icon */
  margin-bottom: 30px;
}

.service-title {
  font-size: 22px;
  color: var(--white);
  /* White text */
  margin-bottom: 15px;
  font-weight: 700;
}

.service-desc {
  color: rgba(255, 255, 255, 0.8);
  /* Lighter white */
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.service-link {
  color: var(--white);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  /* Glassy effect */
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: 0.3s;
  justify-content: center;
  margin-top: auto;
  /* Push button to bottom */
  width: fit-content;
  /* Ensure distinct width */
  margin-left: auto;
  /* Center button horizontally */
  margin-right: auto;
}

/* Service Backgrounds */
.service-item.bg-measurement {
  background-image: url('../images/magnetic%20dignosis.png');
  /* Oscilloscope/Signal Display */
}

.service-item.bg-pcb {
  background-image: url('../images/service_pcb.jpg');
}

.service-item.bg-sensor {
  background-image: url('../images/service_sensor.jpg');
}

.service-link:hover {
  background: var(--accent-light);
  color: var(--dark-bg);
  border-color: var(--accent-light);
}

.service-link::after {
  content: '→';
  transition: 0.3s;
}

/* Parallax Strip */
.parallax-strip {
  background: #0a192f;
  /* Fallback color */
  height: 250px;
  /* Reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* Added to contain video */
  text-align: center;
  color: var(--white);
  padding: 0;
  /* Video Parallax Fix */
  clip-path: inset(0);
}

.parallax-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.5);
  z-index: 1;
}

.parallax-video {
  position: fixed;
  /* Parallax Effect */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  /* Behind content */
  pointer-events: none;
}

.parallax-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.parallax-text {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 0;
  /* 영상 배경 위 가독성 */
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}



/* Stats Counter */
.stats-section {
  /* Parallax Background */
  background: url('../images/bg_stats.jpg') no-repeat center/cover;
  background-attachment: fixed;
  padding: 80px 0;
  margin-top: 0;
  position: relative;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.85);
  /* Overlay to make text readable */
  z-index: 1;
}

.stats-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 60px;
  /* Increased from 48px */
  color: var(--white);
  margin-bottom: 10px;
}

.stat-unit {
  font-size: 24px;
  /* Much smaller */
  margin-left: 2px;
  font-weight: 500;
  vertical-align: middle;
}

.stat-item p {
  color: var(--accent);
  font-weight: 600;
}

/* FAQ Section (Split Layout) */
.faq-section {
  background-color: #f9f9f9;
}

.faq-wrapper {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

/* Left: Info */
.faq-info {
  flex: 0 0 350px;
  /* Fixed width for info */
}

.sub-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.faq-title {
  font-size: 42px;
  color: var(--dark-bg);
  margin-bottom: 20px;
  line-height: 1.2;
}

.faq-desc {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--dark-bg);
  border-color: var(--dark-bg);
  padding: 15px 30px;
  border-radius: 50px;
}

.btn-contact:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* Right: Accordion List */
.faq-list {
  flex: 1;
  margin: 0;
  /* Reset margin */
}

.faq-item {
  background: transparent;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.faq-item:first-child {
  border-top: 1px solid #e0e0e0;
}

.faq-question {
  padding: 25px 0;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dark-bg);
  transition: 0.3s;
}

.faq-question:hover {
  color: var(--accent);
  background: transparent;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  /* Removed padding/border from here to collapse cleanly */
}

.faq-item.active .faq-answer {
  max-height: 2000px;
  /* Increased for safety */
}

.answer-inner {
  padding-bottom: 25px;
  line-height: 1.6;
  color: #666;
  font-size: 16px;
}

.toggle-icon {
  font-size: 14px;
  color: #ccc;
  transition: 0.3s;
}

.faq-item.active .toggle-icon {
  transform: rotate(180deg);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
  .faq-wrapper {
    flex-direction: column;
    gap: 40px;
  }

  .faq-info {
    flex: auto;
    width: 100%;
    text-align: center;
  }

  .faq-list {
    width: 100%;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 48px;
  }

  .about-wrap {
    flex-direction: column;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gnb {
    display: none;
  }

  /* Mobile Menu implementation needed later */
}

/* Footer Redesign */
footer {
  background-color: #fff;
  padding: 60px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
  color: #666;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-bg);
  margin-bottom: 20px;
  /* display: block; removed to allow flex behavior if needed, or keep block */
  display: inline-block;
}

.footer-logo img {
  height: 35px;
  width: auto;
}


.footer-right {
  flex: 1;
}

.footer-links {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.footer-links li {
  position: relative;
  padding-right: 20px;
  margin-right: 20px;
}

.footer-links li:last-child {
  padding-right: 0;
  margin-right: 0;
}

.footer-links li:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: 0;
  color: #ddd;
  font-size: 12px;
  top: 2px;
}

.footer-links a {
  color: #555;
  font-weight: 500;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a.text-bold {
  font-weight: 700;
  color: #333;
}

.footer-info {
  margin-bottom: 20px;
}

.footer-info p {
  margin-bottom: 5px;
  color: #888;
  line-height: 1.5;
}

.footer-copy {
  color: #aaa;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 500;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 30px;
  }
}

/* Mobile Menu Integration */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-container {
  position: fixed;
  top: 0;
  right: -100%;
  /* Off-canvas initially */
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 1000;
  padding: 20px;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.mobile-menu-container.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.mobile-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

.mobile-gnb {
  flex: 1;
  overflow-y: auto;
}

.mobile-gnb>li>a {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.mobile-sub {
  padding-left: 15px;
  background: #f9f9f9;
  border-radius: 4px;
  margin-bottom: 10px;
}

.mobile-sub li a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  color: #666;
  border-bottom: none;
}

.mobile-util {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.mobile-lang {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.mobile-lang a.active {
  color: var(--accent);
}

/* Responsive Media Query for Menu Toggle */
@media (max-width: 991px) {

  .gnb,
  .btn-inquiry {
    display: none !important;
  }

  .mobile-toggle {
    display: block;
  }
}

/* Page Header (Subpages) */
/* Page Header (Subpages) */
.page-header {
  padding-top: 100px;
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2a40 100%);
  color: var(--white);
  text-align: center;
  margin-top: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 85% 15%, rgba(100, 255, 218, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 15% 85%, rgba(100, 255, 218, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.page-title {
  font-size: 36px;
  margin-bottom: 20px;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #aaa;
}

.breadcrumb span:last-child {
  color: var(--accent);
  font-weight: 600;
}

/* =========================================
   Company Page Redesign Styles
   ========================================= */

/* 1. CEO Greeting Section */
.img-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 20px 20px 0px var(--accent-light);
  /* Offset solid shadow */
}

.img-frame img {
  border-radius: 20px;
  transition: 0.3s;
  width: 100%;
}

.img-frame:hover img {
  transform: scale(1.03);
}

/* 2. Vertical Timeline (History) */
.history-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Central vertical line */
.history-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  /* Align with dots */
  height: 100%;
  width: 2px;
  background: #ddd;
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 50px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Timeline Dot */
.timeline-dot {
  position: absolute;
  left: 17px;
  /* Center on line */
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border: 4px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
  transition: 0.3s;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  transform: scale(1.3);
}

.timeline-content {
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition: 0.3s;
}

.timeline-item:hover .timeline-content {
  transform: translateX(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.timeline-year {
  display: block;
  font-size: 24px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 5px;
}

.timeline-event {
  font-size: 18px;
  color: #555;
  font-weight: 500;
  margin: 0;
}

/* 3. Location Styling */
.location-wrap {
  display: flex;
  gap: 30px;
  align-items: stretch;
}

.map-area {
  flex: 2;
  background-color: #f4f6f8;
  border-radius: 15px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #eee;
}

.map-placeholder-content {
  text-align: center;
  color: #aaa;
}

.map-placeholder-content i {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

.location-info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition: 0.3s;
}

.info-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.info-item i {
  color: var(--accent);
  font-size: 24px;
  margin-top: 3px;
}

.info-item strong {
  display: block;
  font-size: 14px;
  color: #888;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.info-item p {
  margin: 0;
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

/* Responsive for Company Page */
@media (max-width: 768px) {
  .location-wrap {
    flex-direction: column;
  }

  .map-area {
    min-height: 300px;
  }
}

/* =========================================
   Services Page Redesign Styles (Flashy & Tech)
   ========================================= */

/* Card Container */
.service-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  /* Soft premium shadow */
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Glass border */
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(13, 226, 219, 0.15);
  /* Accent glowing shadow */
}

/* Background Number Decoration */
.card-bg-num {
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 200px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.03);
  /* Extremely subtle */
  line-height: 1;
  pointer-events: none;
  font-family: 'Outfit', sans-serif;
  z-index: -1;
  transition: 0.4s;
}

.service-card:hover .card-bg-num {
  color: rgba(13, 226, 219, 0.08);
  /* Glows on hover */
  transform: scale(1.1);
}

/* Flex Layout */
.service-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.service-card.reverse .service-content {
  flex-direction: row-reverse;
}

/* Text Column */
.service-text-col {
  flex: 1;
}

.service-head {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 10px;
}

.service-label {
  display: block;
  font-size: 16px;
  color: #888;
  margin-bottom: 25px;
  font-weight: 500;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  padding: 15px;
  border-radius: 12px;
  transition: 0.3s;
}

.feature-item:hover {
  background: var(--white);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transform: translateX(5px);
}

.feature-item i {
  color: var(--accent);
  font-size: 18px;
}

.feature-item span {
  font-size: 15px;
  font-weight: 600;
  color: #555;
}

/* Image Column */
.service-img-col {
  flex: 1;
}

.img-wrapper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 15px 15px 0 var(--dark-bg);
  /* Offset solid shadow */
  position: relative;
  /* Removed fixed aspect ratio to allow natural image size */
  background: #f8fafb;
  /* Light background for potential letterboxing */
}

.img-wrapper img {
  width: 100%;
  height: auto;
  /* Natural height */
  object-fit: contain;
  /* Ensure full image is visible */
  transition: 0.5s;
  display: block;
}

.service-card:hover .img-wrapper img {
  transform: scale(1.1);
}

/* Enforce Aspect Ratio for Single Service Images (PCB & Sensor) */
#pcb .img-wrapper,
#sensor .img-wrapper {
  aspect-ratio: 4 / 3;
}

#pcb .img-wrapper img,
#sensor .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 991px) {

  .service-content,
  .service-card.reverse .service-content {
    flex-direction: column-reverse;
    /* Text on bottom for mobile usually better, or Image top */
    gap: 30px;
  }

  .service-card.reverse .service-content {
    flex-direction: column-reverse;
  }

  .card-bg-num {
    font-size: 120px;
    top: 0;
    right: 0;
  }
}

/* ========================================
   Lab Page Header (Now inherits global styles)
   ======================================== */
.page-header.lab-header {
  /* No overrides needed */
}

.lab-header .page-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  display: block;
  /* Changed from inline-block to block */
  width: 100%;
  color: var(--white);
}



.lab-header .page-desc {
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-weight: 400;
}

/* ========================================
   Blog Cards (Lab Page)
   ======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.1);
}

.blog-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.blog-card-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-date {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  display: block;
}

.blog-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 15px;
  color: var(--dark-bg);
  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 2.8em;
}

.blog-title a {
  color: inherit;
  transition: color 0.3s ease;
}

.blog-title a:hover {
  color: var(--accent);
}

.blog-excerpt {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
  /* Limit to 5 lines */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.blog-read-more:hover {
  gap: 12px;
}

.blog-read-more i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.blog-read-more:hover i {
  transform: translateX(4px);
}

/* Responsive Blog Grid */
/* ========================================
   Blog Post Detail
   ======================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  margin-bottom: 30px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.back-link:hover {
  gap: 12px;
  color: var(--white);
  opacity: 0.8;
}

.post-title {
  font-size: 42px;
  line-height: 1.3;
  margin-bottom: 24px;
  color: var(--white);
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  margin-bottom: 40px;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-featured-wrapper {
  margin-top: -80px;
  /* Overlap header */
  position: relative;
  z-index: 10;
  margin-bottom: 60px;
}

.post-featured-image {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-content {
  padding-top: 50px;
  padding-bottom: 100px;
}

.post-body {
  max-width: 800px;
  margin: 0 auto;
}

.content-wrapper {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3 {
  margin-top: 50px;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--dark-bg);
  line-height: 1.4;
}

.content-wrapper p {
  margin-bottom: 24px;
}

.content-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 30px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.content-wrapper blockquote {
  border-left: 4px solid var(--accent);
  padding: 20px 30px;
  background: #f9f9f9;
  margin: 40px 0;
  font-size: 20px;
  font-style: italic;
  color: #555;
  border-radius: 0 8px 8px 0;
}

.content-wrapper ul,
.content-wrapper ol {
  margin-bottom: 30px;
  padding-left: 20px;
}

.content-wrapper li {
  margin-bottom: 10px;
}

.post-footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid #eee;
  text-align: center;
}

@media (max-width: 768px) {
  .post-title {
    font-size: 32px;
  }

  .post-featured-wrapper {
    margin-top: -40px;
  }
}

/* Modal Centering Fix */
.modal-dialog {
  display: flex !important;
  align-items: center;
  justify-content: center;
  max-width: 90% !important;
  /* Ensure it doesn't overflow horizontally */
  margin: 0 auto !important;
  /* Force horizontal centering */
}

.modal-content {
  width: auto !important;
  /* Allow content to dictate width */
  max-height: 90vh;
  justify-content: center;
  /* Center internal content */
}

.modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-body img {
  max-height: 85vh;
  /* Prevent image from being too tall */
  width: auto;
  /* Maintain aspect ratio */
  max-width: 100%;
  object-fit: contain;
}

/* Lightbox Close Button Visibility */
/* Lightbox Close Button Visibility */
.lightbox-close {
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.3);
  /* Semi-transparent Black 30% */
  color: #fff;
  /* White Icon */
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 1;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover {
  background-color: var(--accent);
  /* Brand color on hover */
  color: #fff;
  transform: rotate(90deg);
  /* Nice interaction effect */
}

/* Fix Hero Button Hover Color */
.btn-outline:hover {
  color: var(--dark-bg) !important;
  background: #fff;
}

/* Fix Service Arrow Button Distortion */
.btn-circle-arrow {
  flex-shrink: 0;
  /* Prevent squishing */
  width: 45px;
  height: 45px;
  min-width: 45px;
  /* Ensure minimum width */
  min-height: 45px;
  /* Ensure minimum height */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  transition: 0.3s;
  text-decoration: none;
  border: 1px solid var(--accent);
}

.btn-circle-arrow:hover {
  background: #fff;
  color: var(--accent);
  transform: translateX(5px);
  border-color: var(--accent);
}