/* Applus+ Laboratories Korea - Main Stylesheet */
:root {
  --primary: #FF6900;
  --primary-dark: #1a1a1a;
  --primary-light: #ff8533;
  --accent: #FF6900;
  --accent-hover: #e55e00;
  --text: #222;
  --text-light: #555;
  --text-muted: #777;
  --bg: #ffffff;
  --bg-light: #f5f7fa;
  --bg-dark: #0a1628;
  --border: #e0e5eb;
  --success: #28a745;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent);
}

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

ul, ol {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== HEADER ========== */
.header {
  background: var(--bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top a {
  color: rgba(255,255,255,0.9);
}

.header-top a:hover {
  color: #fff;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary);
}

.logo span {
  color: var(--accent);
}

.logo-img-wrap { display:flex; align-items:center; }
.logo-img {
  height: 42px;
  width: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: transparent;
  border-radius: 0;
}

.logo-img img {
  height: 42px;
  width: auto;
  display: block;
}

.logo-img svg {
  height: 42px;
  width: auto;
}

.card-icon svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav > a,
.nav .dropdown > a {
  padding: 10px 16px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: var(--radius);
}

.nav > a:hover,
.nav .dropdown > a:hover,
.nav > a.active,
.nav .dropdown > a.active {
  background: var(--bg-light);
  color: var(--primary);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227,28,35,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
}

.btn-white:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  padding: 8px;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, rgba(26,26,26,0.78) 0%, rgba(44,44,49,0.72) 100%),
              url('../images/hero-home.png') center center / cover no-repeat;
  color: #fff;
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  max-width: 700px;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== SECTION ========== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #fff;
}

.card-body {
  padding: 32px;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.card-link {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link:hover {
  gap: 10px;
}

/* ========== FEATURES ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.feature-item h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--primary);
}

.feature-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========== PAGE HERO ========== */
.page-hero {
  background: linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(44,44,49,0.8) 100%),
              url('../images/medical-device.jpg') center center / cover no-repeat;
  color: #fff;
  padding: 60px 0;
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.05rem;
  max-width: 600px;
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 16px;
  opacity: 0.8;
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
  color: #fff;
}

/* ========== CONTENT ========== */
.content-block {
  margin-bottom: 48px;
}

.content-block h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.content-block h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 28px 0 12px;
}

.content-block p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.content-block ul {
  margin: 16px 0;
  padding-left: 0;
}

.content-block ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--text-light);
}

.content-block ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.service-box {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.service-box h4 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.service-box p,
.service-box ul {
  font-size: 0.9rem;
  color: var(--text-light);
}

.service-box ul li {
  padding-left: 18px;
  margin-bottom: 4px;
}

.service-box ul li::before {
  content: '•';
  color: var(--primary);
}

/* ========== CTA ========== */
.cta {
  background: linear-gradient(135deg, #1a1a1a, #2c2c31);
  color: #fff;
  padding: 72px 0;
  text-align: center;
}

.cta h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 10px;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 16px;
}

.footer-logo span {
  color: var(--accent);
}

/* ========== CONTACT FORM ========== */
.contact-form {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ========== TABLE ========== */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

tr:hover td {
  background: var(--bg-light);
}

/* ========== ACCORDION ========== */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  padding: 18px 24px;
  background: var(--bg-light);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary);
}

.accordion-header:hover {
  background: #eef1f5;
}

.accordion-body {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.active .accordion-body {
  padding: 18px 24px;
  max-height: 500px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    gap: 0;
  }
  .nav.open {
    display: flex;
  }
  .nav > a,
  .nav .dropdown > a {
    width: 100%;
    padding: 14px 16px;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 16px;
    display: none;
  }
  .dropdown.open .dropdown-menu {
    display: block;
  }
  .mobile-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero {
    padding: 60px 0 80px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .header-main {
    position: relative;
  }
}

/* ========== UTILS ========== */
.bg-light {
  background: var(--bg-light);
}

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

.mt-4 {
  margin-top: 32px;
}

.mb-4 {
  margin-bottom: 32px;
}

.highlight-box {
  background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
  border-left: 4px solid var(--primary);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}

.highlight-box p {
  margin: 0;
  color: var(--text);
}

/* Medical sub-nav cards in hero */
.hero-subnav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
  max-width: 720px;
}
.hero-subnav a {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.hero-subnav a:hover,
.hero-subnav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.hero-subnav a span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 4px;
}

/* Accordion with image for testing categories */
.test-cat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  background: #fff;
}
.test-cat-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  cursor: pointer;
  background: var(--bg-light);
  transition: var(--transition);
}
.test-cat-header:hover {
  background: #eee;
}
.test-cat-header img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
}
.test-cat-header .cat-title {
  flex: 1;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
  padding: 16px 8px;
}
.test-cat-header .cat-toggle {
  padding: 0 24px;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 300;
}
.test-cat-body {
  display: none;
  padding: 24px 28px;
  border-top: 1px solid var(--border);
}
.test-cat.open .test-cat-body {
  display: block;
}
.test-cat.open .cat-toggle::before {
  content: '−';
}
.test-cat:not(.open) .cat-toggle::before {
  content: '+';
}
.test-cat-body ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin: 12px 0 0;
}
.test-cat-body ul li {
  position: relative;
  padding-left: 20px;
  color: var(--text-light);
  font-size: 0.95rem;
}
.test-cat-body ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 768px) {
  .hero-subnav { grid-template-columns: 1fr; }
  .test-cat-header img { width: 90px; height: 70px; }
  .test-cat-body ul { grid-template-columns: 1fr; }
}

/* Hero with background image */
.hero {
  background: linear-gradient(135deg, rgba(26,26,26,0.82) 0%, rgba(44,44,49,0.75) 100%),
              url('../images/hero-home.png') center/cover no-repeat !important;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.page-hero {
  background: linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(44,44,49,0.8) 100%),
              url('../images/medical-device.jpg') center/cover no-repeat !important;
}
.page-hero.hero-sustain {
  background: linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(44,44,49,0.8) 100%),
              url('../images/hero-imageLabs2.png') center/cover no-repeat !important;
}
.page-hero.hero-cyber {
  background: linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(44,44,49,0.8) 100%),
              url('../images/hero-imageLabs10.png') center/cover no-repeat !important;
}
.page-hero.hero-medical {
  background: linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(44,44,49,0.8) 100%),
              url('../images/medical-device.jpg') center/cover no-repeat !important;
}

/* Image cards */
.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.card-with-img {
  overflow: hidden;
}
.card-with-img .card-body {
  padding: 24px;
}

/* Logo fallback */
.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-dark);
  line-height: 1.2;
}
.logo-text span { color: var(--accent); }
.logo img {
  max-height: 42px;
  width: auto;
  display: block;
}

/* Service cards - full image + whole card clickable */
a.card-link-wrap {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
}
a.card-link-wrap:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
a.card-link-wrap:hover .card-link {
  color: var(--accent);
}
.card-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
}
.card-img-wrap .card-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* show full image, not cropped center */
  object-position: center;
  display: block;
  background: #fff;
}
.cards-service {
  align-items: stretch;
}
.cards-service .card {
  min-height: 340px;
}
.cards-service .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cards-service .card-body .card-link {
  margin-top: auto;
}
@media (max-width: 768px) {
  .card-img-wrap { height: 160px; }
}

/* Prominent Korea MDR banner */
.korea-mdr-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c31 100%);
  color: #fff;
  padding: 36px 40px;
  border-radius: 12px;
  border-left: 6px solid var(--accent);
  margin: 0 0 40px;
  position: relative;
  overflow: hidden;
}
.korea-mdr-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,105,0,0.25), transparent 70%);
  border-radius: 50%;
}
.korea-mdr-banner h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.korea-mdr-banner p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.korea-mdr-banner .banner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.korea-mdr-banner .banner-tags span {
  background: rgba(255,105,0,0.2);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}
