/* 
  ========================================================
  GONGSABI B2B DATA PLATFORM DESIGN SYSTEM (PHASE 2)
  Brand Colors: Blue (Primary), Green/Yellow (Accent)
  Features: Mega Menu, Subpage Overrides, Form/Table UI
  ========================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Colors (Based on Gongsabi Logo) */
  --b2b-primary: #1E40AF;
  /* Deep Blue */
  --b2b-primary-light: #3B82F6;
  --b2b-primary-dark: #1E3A8A;

  --b2b-accent-green: #10B981;
  /* Logo Green */
  --b2b-accent-yellow: #F59E0B;
  /* Logo Yellow */

  --b2b-bg-main: #F8FAFC;
  /* App Background */
  --b2b-bg-white: #FFFFFF;
  /* Card/Panel Background */
  --b2b-bg-gray: #F1F5F9;
  /* Table Header / Soft Gray */

  --b2b-text-dark: #0F172A;
  --b2b-text-body: #334155;
  --b2b-text-muted: #64748B;

  --b2b-border: #E2E8F0;

  /* Utilities */
  --b2b-radius-lg: 16px;
  --b2b-radius-md: 10px;
  --b2b-radius-sm: 6px;

  --b2b-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --b2b-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --b2b-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);

  --b2b-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================
   GLOBAL & RESET
======================================================== */
body {
  font-family: 'Noto Sans KR', sans-serif !important;
  background-color: var(--b2b-bg-main) !important;
  color: var(--b2b-text-body) !important;
  line-height: 1.6 !important;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--b2b-primary-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--b2b-text-dark);
  font-weight: 700;
}

.b2b-section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 15px;
}

.b2b-section-subtitle {
  font-size: 16px;
  color: var(--b2b-text-muted);
  text-align: center;
  margin-bottom: 50px;
}

/* ========================================================
   BUTTONS
======================================================== */
.b2b-btn-primary,
.b2b-btn-secondary,
.b2b-btn-outline {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--b2b-radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: var(--b2b-transition);
  cursor: pointer;
  border: none;
}

.b2b-btn-primary {
  background-color: var(--b2b-primary);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

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

.b2b-btn-secondary {
  background-color: var(--b2b-accent-green);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.b2b-btn-secondary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.b2b-btn-outline {
  background-color: transparent;
  color: var(--b2b-primary) !important;
  border: 1px solid var(--b2b-primary);
}

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

/* ========================================================
   B2B HEADER (Mega Menu)
======================================================== */
.b2b-header {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

/* TRANSPARENT HEADER MODE (For Main Page Hero Overlap) */
.b2b-header.b2b-transparent-header {
  position: absolute;
  top: 0;
  left: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

/* When hovering over the transparent header, it turns white */
.b2b-header.b2b-transparent-header:hover,
.b2b-header.b2b-transparent-header.b2b-scrolled,
.b2b-header.b2b-transparent-header.megamenu-open {
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.b2b-header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 40px;
}

/* Logo styling */
.b2b-logo img {
  height: 40px;
  transition: filter 0.3s ease;
}

/* Turn logo white in transparent mode, revert on hover */
.b2b-header.b2b-transparent-header:not(:hover):not(.b2b-scrolled):not(.megamenu-open) .b2b-logo img {
  filter: brightness(0) invert(1);
}

.b2b-nav {
  display: flex !important;
  flex-direction: row !important;
  gap: 40px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
}

.b2b-nav-item {
  position: static !important;
  /* Changed to static so megamenu spans full width relative to header */
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--b2b-text-dark) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 0 10px !important;
  transition: color 0.3s ease !important;
  white-space: nowrap;
  /* 글자 세로 깨짐 방지 핵심 */
}

/* Turn text white in transparent mode */
.b2b-header.b2b-transparent-header:not(:hover):not(.b2b-scrolled):not(.megamenu-open) .b2b-nav-item {
  color: #ffffff;
}

.b2b-nav-item:hover {
  color: var(--b2b-primary);
}

/* Mega Menu Global Panel */
.b2b-megamenu {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  background: var(--b2b-bg-white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-top: 1px solid var(--b2b-border);
  opacity: 0;
  visibility: hidden;
  transition: var(--b2b-transition);
  transform: translateY(-10px);
  z-index: 9998;
}

/* Header 영역 어디든 Hover하면 전체 메가메뉴가 내려옴 */
.b2b-header:hover .b2b-megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.b2b-megamenu-inner {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 15px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
}

.b2b-mega-col h4 {
  font-size: 16px;
  color: var(--b2b-primary);
  border-bottom: 2px solid var(--b2b-border);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.b2b-mega-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.b2b-mega-col li {
  margin-bottom: 10px;
}

.b2b-mega-col a {
  display: block;
  font-size: 14px;
  color: var(--b2b-text-body);
  font-weight: 500;
}

.b2b-mega-col a:hover {
  color: var(--b2b-primary);
  padding-left: 5px;
}

.b2b-mega-desc {
  font-size: 12px;
  color: var(--b2b-text-muted);
  margin-top: 2px;
  display: block;
}

.b2b-header-utils {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* ========================================================
   HERO SLIDER
======================================================== */
.b2b-hero-slider {
  position: relative;
  width: 100%;
  background: #000;
}

.b2b-hero-carousel .carousel-item {
  height: 800px;
  /* PC기준 영웅 슬라이드 대폭 확장 */
}

.b2b-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
}

.b2b-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* 원본 이미지가 밝게 보이도록 전체 암전을 줄이고, 좌측 텍스트 영역에만 부드러운 그라데이션 부여 */
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.05) 60%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

.b2b-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  padding-bottom: 120px;
  /* 하단 퀵서치 카드(플로팅)에 글씨가 안 가리도록 넉넉한 여백 확보 */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.b2b-slide-label {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--b2b-accent-yellow);
}

.b2b-slide-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.b2b-slide-desc {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 30px;
}

.b2b-hero-carousel .carousel-indicators li {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid transparent;
}

.b2b-hero-carousel .carousel-indicators .active {
  background-color: var(--b2b-accent-green);
  border-color: #fff;
}

/* ========================================================
   QUICK SEARCH (Floating Card)
======================================================== */
.b2b-quick-search-wrapper {
  max-width: 1200px;
  margin: 20px auto 40px;
  /* Hero 배너 아래로 배치 (기존 -100px 제거) */
  position: relative;
  z-index: 10;
  padding: 0 20px;
}

.b2b-quick-search {
  background: var(--b2b-bg-white);
  border-radius: var(--b2b-radius-lg);
  box-shadow: var(--b2b-shadow-lg);
  padding: 30px 40px;
  border: 1px solid var(--b2b-border);
}

.b2b-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--b2b-border);
  padding-bottom: 15px;
}

.b2b-search-header h3 {
  font-size: 18px;
  margin: 0;
  color: var(--b2b-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.b2b-search-header span {
  font-size: 13px;
  background: #EEF2FF;
  color: var(--b2b-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.b2b-search-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 20px;
  align-items: end;
}

.b2b-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.b2b-field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--b2b-text-body);
}

.b2b-field-group select,
.b2b-field-group input {
  padding: 12px 16px;
  border: 1px solid var(--b2b-border);
  border-radius: var(--b2b-radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--b2b-transition);
  width: 100%;
}

.b2b-field-group select:focus,
.b2b-field-group input:focus {
  border-color: var(--b2b-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.b2b-search-btn {
  height: 46px;
  width: 140px;
}

/* ========================================================
   GLOBAL SUBPAGE COMPONENTS (Overrides)
======================================================== */
.b2b-page-header {
  background: var(--b2b-bg-white);
  padding: 60px 20px;
  text-align: center;
  border-bottom: 1px solid var(--b2b-border);
  margin-bottom: 40px;
}

.b2b-page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--b2b-text-dark);
  margin-bottom: 10px;
}

.b2b-breadcrumb {
  font-size: 13px;
  color: var(--b2b-text-muted);
}

.b2b-breadcrumb span {
  margin: 0 5px;
}

/* Override legacy tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background: #fff;
  border-radius: var(--b2b-radius-sm);
  overflow: hidden;
  box-shadow: var(--b2b-shadow-sm);
}

table th {
  background: var(--b2b-bg-gray);
  color: var(--b2b-text-dark);
  font-weight: 600;
  padding: 15px;
  text-align: center;
  border-bottom: 2px solid var(--b2b-border);
  font-size: 14px;
}

table td {
  padding: 15px;
  border-bottom: 1px solid var(--b2b-border);
  color: var(--b2b-text-body);
  font-size: 14px;
  vertical-align: middle;
}

table tr:hover td {
  background-color: #F8FAFC;
}

/* Form inputs global override */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  border: 1px solid var(--b2b-border);
  border-radius: var(--b2b-radius-sm);
  padding: 10px 15px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: var(--b2b-transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--b2b-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  outline: none;
}

/* Badges */
.b2b-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.b2b-badge.blue {
  background: #EEF2FF;
  color: var(--b2b-primary);
}

.b2b-badge.green {
  background: #ECFDF5;
  color: var(--b2b-accent-green);
}

.b2b-badge.yellow {
  background: #FEF3C7;
  color: var(--b2b-accent-yellow);
}

/* Common Card Layout for Subpages */
.b2b-card {
  background: var(--b2b-bg-white);
  border: 1px solid var(--b2b-border);
  border-radius: var(--b2b-radius-md);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--b2b-shadow-sm);
}

/* ========================================================
   RESPONSIVE
======================================================== */
.b2b-mobile-menu-btn {
  display: none;
  font-size: 24px;
  color: var(--b2b-text-dark);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .b2b-header {
    position: sticky;
    top: 0;
    z-index: 9999;
  }

  .b2b-header-container {
    padding: 0 20px;
  }

  .b2b-nav,
  .b2b-header-utils {
    display: none !important;
  }

  .b2b-mobile-menu-btn {
    display: block;
    position: absolute;
    right: 20px;
    top: 28px;
  }

  .b2b-search-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .b2b-search-btn {
    grid-column: span 2;
    width: 100%;
  }

  .b2b-header.mobile-open .b2b-megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: #fff;
  }

  .b2b-header.mobile-open .b2b-megamenu-inner {
    grid-template-columns: 1fr !important;
    padding: 20px !important;
  }

  .b2b-header:not(.mobile-open):hover .b2b-megamenu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }

  /* Mobile Accordion Menu */
  .b2b-mega-col ul {
    display: none;
    margin-bottom: 20px;
  }

  .b2b-mega-col.open ul {
    display: block;
  }

  .b2b-mega-col h4 {
    cursor: pointer;
    position: relative;
  }

  .b2b-mega-col h4::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    font-size: 14px;
    transition: transform 0.3s ease;
  }

  .b2b-mega-col.open h4::after {
    transform: rotate(180deg);
  }
}

@media (max-width: 768px) {
  .b2b-hero-carousel .carousel-item {
    height: 580px;
  }

  .b2b-slide-title {
    font-size: 28px;
  }

  .b2b-slide-desc {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .b2b-hero-content {
    padding: 0 20px;
    padding-bottom: 60px;
  }

  .b2b-search-fields {
    grid-template-columns: 1fr;
  }

  .b2b-search-btn {
    grid-column: 1;
  }

  .b2b-megamenu-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 15px;
    width: 100%;
  }
}

@media(max-width:769px) {
  .company_ceo_info_wrapper .company_ceo_message {
    padding-left: 0 !important;
  }

  .company_ceo_table_wrapper {
    padding: 0px 20px;
  }
}

/* ========================================================
   SCROLL REVEAL ANIMATIONS
======================================================== */
.b2b-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ========================================================
   NEW MAIN PAGE SECTIONS
======================================================== */
.b2b-section {
  padding: 80px 20px;
  background: #ffffff;
}

.b2b-section.bg-gray {
  background: var(--b2b-bg-gray);
}

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

.b2b-section-header h2 {
  font-size: 32px;
  color: var(--b2b-text-dark);
  font-weight: 800;
  margin-bottom: 10px;
}

.b2b-section-header p {
  font-size: 16px;
  color: var(--b2b-text-muted);
}

/* Service Cards */
.b2b-service-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.b2b-service-card {
  background: #fff;
  border: 1px solid var(--b2b-border);
  border-radius: var(--b2b-radius-md);
  padding: 30px 20px;
  text-align: center;
  transition: var(--b2b-transition);
  box-shadow: var(--b2b-shadow-sm);
}

.b2b-service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--b2b-shadow-md);
  border-color: var(--b2b-primary-light);
}

.b2b-service-icon {
  font-size: 36px;
  color: var(--b2b-primary);
  margin-bottom: 15px;
}

.b2b-service-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--b2b-text-dark);
}

.b2b-service-card p {
  font-size: 14px;
  color: var(--b2b-text-muted);
  line-height: 1.5;
  margin-bottom: 15px;
}

/* Data Platform Banner */
.b2b-data-banner {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--b2b-primary-dark);
  border-radius: var(--b2b-radius-lg);
  padding: 60px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.b2b-data-banner::before {
  content: '\f1c0';
  /* Database icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-size: 250px;
  color: rgba(255, 255, 255, 0.05);
  transform: rotate(-15deg);
}

.b2b-data-text h3 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 15px;
}

.b2b-data-text p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.b2b-data-stats {
  display: flex;
  gap: 40px;
  z-index: 2;
}

.b2b-stat-item {
  text-align: center;
}

.b2b-stat-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--b2b-accent-yellow);
  display: block;
  line-height: 1;
  margin-bottom: 5px;
}

.b2b-stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

/* Education / Community Cards (3 Column) */
.b2b-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.b2b-edu-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--b2b-shadow-md);
}

.b2b-edu-thumb {
  width: 100%;
  height: 200px;
  background-color: var(--b2b-bg-gray);
  background-size: cover;
  background-position: center;
  position: relative;
}

.b2b-edu-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--b2b-accent-green);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.b2b-edu-info {
  padding: 25px;
}

.b2b-edu-info h4 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.b2b-edu-info p {
  font-size: 14px;
  color: var(--b2b-text-muted);
  margin-bottom: 0;
}

/* ========================================================
   FOOTER (Restored)
======================================================== */
.b2b-footer {
  background: #111827;
  /* Dark Gray/Charcoal */
  color: #9CA3AF;
  padding: 60px 20px 40px;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0 !important;
}

.b2b-footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.b2b-footer-top {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 30px;
}

.b2b-footer-links {
  display: flex;
  gap: 20px;
}

.b2b-footer-links a {
  color: #E5E7EB;
  font-weight: 500;
  letter-spacing: 0 !important;
}

.b2b-footer-links a:hover {
  color: var(--b2b-primary-light);
}

.b2b-footer-sns {
  display: flex;
  gap: 15px;
}

.b2b-footer-sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
}

.b2b-footer-sns a:hover {
  background: var(--b2b-primary);
}

.b2b-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.b2b-footer-info strong {
  color: #D1D5DB;
  font-weight: 500;
  display: inline-block;
  width: 120px;
}

.b2b-footer-info p {
  margin-bottom: 5px;
  color: #9CA3AF !important;
  letter-spacing: 0 !important;
}

.b2b-footer-copyright {
  margin-top: 40px;
  color: #6B7280;
}

/* ========================================================
   LEGACY HEADER/FOOTER PURGE (Overlap Fix)
   Completely removes the old DOM from view without breaking it
======================================================== */
header:not(.b2b-header),
footer:not(.b2b-footer),
.gnb_area,
.header_wrapper,
.sub_header_wrapper,
.sub_nav_wrapper,
.sub_title_wrapper,
.footer_wrapper {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  z-index: -9999 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Responsive Overrides for New Sections */
@media (max-width: 1024px) {
  .b2b-service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .b2b-data-banner {
    flex-direction: column;
    text-align: center;
    padding: 40px;
  }

  .b2b-data-text {
    margin-bottom: 30px;
  }

  .b2b-data-stats {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .b2b-service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .b2b-grid-3 {
    grid-template-columns: 1fr;
  }

  .b2b-footer-grid {
    grid-template-columns: 1fr;
  }

  .b2b-footer-top {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .b2b-service-grid {
    grid-template-columns: 1fr;
  }
}


/* Fix Table Width in Subpages */
table.table,
.gongsabi-table,
.company_ceo_table {
  width: 100% !important;
  display: table !important;
  table-layout: auto;
}

.table-responsive {
  display: table !important;
}

/* =========================================
   SUBPAGE PREMIUM UI UPGRADES 
========================================= */

/* 1. Global Header & Hero Blocks */
.b2b-page-header {
  background: linear-gradient(135deg, var(--b2b-primary) 0%, #1e3a8a 100%) !important;
  position: relative;
  padding: 60px 0 !important;
  color: #fff !important;
  border-bottom: none !important;
  box-shadow: 0 10px 30px rgba(13, 31, 88, 0.1);
}

.classy-hero-blocks {
  background: transparent !important;
  padding: 20px 0 50px !important;
  color: inherit !important;
}

.classy-hero-blocks .background-overlay-white::before {
  display: none !important;
  /* Remove old white overlay */
}

.b2b-page-header h1,
.b2b-page-header .b2b-page-title {
  color: #fff !important;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.classy-hero-blocks h2 {
  color: var(--b2b-text-dark) !important;
  font-weight: 800;
}

.b2b-page-header .b2b-breadcrumb {
  color: rgba(255, 255, 255, 0.8) !important;
}

.classy-hero-blocks p {
  color: #475569 !important;
}

.b2b-page-header .b2b-breadcrumb {
  background: rgba(255, 255, 255, 0.1);
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  margin-bottom: 20px;
}

.underline-mc::after {
  background-color: var(--b2b-accent-yellow) !important;
}

/* 2. Modern Form Controls & Search */
.search_wrapper {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-top: -30px;
  position: relative;
  z-index: 10;
  border: 1px solid #E2E8F0;
}

.form-control,
.dropdown-title {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.3s ease;
  height: 48px !important;
  display: flex;
  align-items: center;
}

.form-control:focus,
.dropdown-title:hover {
  border-color: var(--b2b-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.search_wrapper .btn-default {
  background: linear-gradient(135deg, var(--b2b-primary) 0%, #1e3a8a 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  height: 48px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

.search_wrapper .btn-default:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* 3. Premium Data Tables */
.classy-table.table-bordered {
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-top: 20px;
}

.classy-table th,
.classy-table td {
  border: 1px solid #E2E8F0 !important;
  vertical-align: middle !important;
}

.classy-table thead th,
.classy-table thead tr {
  background-color: #F8FAFC !important;
  color: var(--b2b-text-dark) !important;
  font-weight: 700;
  padding: 15px !important;
  border-bottom: 2px solid #CBD5E1 !important;
}

.classy-table tbody tr {
  transition: background-color 0.2s ease;
}

.classy-table tbody tr:hover {
  background-color: #F1F5F9 !important;
}

/* 4. Alert & Info Text Box */
.hero-block-content p.fsxs {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  border-left: 4px solid var(--b2b-accent-yellow) !important;
  padding: 15px;
  border-radius: 0 8px 8px 0;
  display: inline-block;
  text-align: left;
  margin-top: 30px !important;
  line-height: 1.6;
  color: #475569 !important;
}

/* =========================================================================
   Global Content Responsive Overrides (For Company, Data, Report, etc.)
   ========================================================================= */
@media (max-width: 1024px) {

  /* Override fixed width wrappers */
  div[class*="_wrapper"],
  .sub_header_wrapper,
  .main_content_ready_wrapper,
  .company_wrapper,
  .faq_category_wrapper,
  .partners_category_wrapper,
  .education_book_wrapper,
  .book_complete_wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }

  /* Reset float and fixed width columns */
  .company_map_wrapper .company_map,
  .company_map_wrapper .company_info,
  .company_ceo_info_wrapper .company_ceo_image,
  .company_ceo_info_wrapper .company_ceo_message {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    float: none !important;
    margin-bottom: 20px !important;
  }

  /* Make tables responsive via horizontal scroll */
  .company_ceo_table_wrapper,
  .board_list_wrapper,
  .table_wrapper,
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure images shrink to fit */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Prevent logo from blowing up due to height: auto */
  .b2b-logo img {
    height: 40px !important;
    max-width: none !important;
  }

  /* Make category tabs scrollable horizontally if too many */
  .faq_category_wrapper .faq_category_list,
  .partners_category_wrapper .partners_category_list {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  .faq_category_wrapper .faq_category_list li,
  .partners_category_wrapper .partners_category_list li {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 0 15px !important;
  }

  /* Fix Company2 Circle Points on Mobile */
  .b2b-mobile-point-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    margin-top: 20px !important;
  }

  .b2b-mobile-point-list .company_info_point {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    height: auto !important;
    margin-bottom: 30px !important;
  }

  .b2b-mobile-point-list .company_info_point span:nth-child(2) {
    width: 100% !important;
    padding: 0 !important;
  }

  .b2b-mobile-point-list .company_info_point span.circle {
    margin: 0 auto 15px auto !important;
    /* Overrides the weird margin-left offsets on PC */
    width: 140px !important;
    height: 140px !important;
    min-width: 140px !important;
    min-height: 140px !important;
    flex: 0 0 140px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }

  .b2b-mobile-point-list .company_info_point span.desc {
    width: 100% !important;
    padding: 0 15px !important;
    text-align: center !important;
    word-break: keep-all;
  }

  /* Fix Company Info Slogan Overflow */
  .company_info_slogan_wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  .company_info_slogan_wrapper .company_info_slogan {
    width: 100% !important;
    max-width: 100vw !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
  }

  .company_info_slogan_wrapper .company_info_slogan .slogan_num {
    right: 15px !important;
    bottom: -15px !important;
    font-size: 100px !important;
  }

  /* Fix Timeline text overlap on Mobile */
  .company_history_wrapper .timeline_text_content p {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .even-item .timeline_text_content p {
    justify-content: flex-end !important;
  }
  .odd-item .timeline_text_content p {
    justify-content: flex-start !important;
  }
  .company_history_wrapper .timeline_text_content p > span.desc {
    width: auto !important;
    flex: 1 1 0% !important; /* Allow shrinking and taking all available space properly */
    text-align: left !important;
    word-break: break-word !important; /* Fixes text overflowing out of the box */
    white-space: normal !important;
  }
  .company_history_wrapper .timeline_text_content p > span.month {
    width: auto !important;
    flex: 0 0 auto !important;
    line-height: 1.2 !important; /* Adjust line-height to match first line of text roughly */
  }
}

/* ========================================================
   MODAL - MEMBERSHIP INFO REDESIGN
======================================================== */
#membership_info .modal-dialog {
  max-width: 800px !important;
  width: 95% !important;
  margin: 1.75rem auto !important;
}

#membership_info .modal-content {
  border-radius: 16px !important;
  border: none !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
  overflow: hidden;
}

#membership_info .membership_info_wrapper {
  display: flex !important;
  gap: 20px !important;
  padding: 30px !important;
  width: 100% !important;
  background: #F8FAFC !important;
  box-sizing: border-box !important;
}

#membership_info .membership_info {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  flex: 1 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #fff !important;
  margin: 0 !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
}

#membership_info .membership_info_title {
  height: auto !important;
  padding: 30px 20px !important;
  text-align: center !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 140px !important;
}

#membership_info .membership_info.type1 .membership_info_title {
  background-color: #CBD5E1 !important;
}

#membership_info .membership_info.type2 .membership_info_title {
  background-color: #1E40AF !important; /* B2B Primary Blue */
}

#membership_info .membership_info_title .title {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin-bottom: 5px !important;
}

#membership_info .membership_info_title .price {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin-top: 10px !important;
  text-align: center !important;
}

#membership_info .membership_info_title .price_small {
  font-size: 13px !important;
  color: rgba(255,255,255,0.8) !important;
  text-align: center !important;
}

#membership_info .membership_info_desc {
  padding: 30px 20px !important;
  border: none !important;
  min-height: 250px !important;
  flex: 1 !important;
  background: #fff !important;
}

#membership_info .membership_info_desc .desc_lead {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  text-align: center !important;
  margin-bottom: 25px !important;
}

#membership_info .membership_info_desc .desc_lead span.point {
  color: #1E40AF !important;
}

#membership_info .membership_info_desc .desc_list {
  padding: 0 10px !important;
  margin: 0 !important;
  list-style: none !important;
}

#membership_info .membership_info_desc .desc_list li {
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: #475569 !important;
  padding-left: 28px !important;
  margin-bottom: 12px !important;
  background-size: 16px !important;
  background-position: left 4px !important;
}

#membership_info .membership_info_button {
  padding: 0 30px 30px !important;
  border: none !important;
  background: #fff !important;
  text-align: center !important;
  border-radius: 0 !important;
  margin-top: auto !important;
}

#membership_info .membership_info_button > p {
  font-size: 14px !important;
  color: #64748B !important;
  margin-bottom: 15px !important;
}

#membership_info .membership_info_button a.btn {
  height: 48px !important;
  line-height: 48px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  transition: all 0.3s !important;
}

#membership_info .membership_info.type1 .membership_info_button a.btn {
  background-color: #CBD5E1 !important;
  color: #fff !important;
}
#membership_info .membership_info.type1 .membership_info_button a.btn:hover {
  background-color: #94A3B8 !important;
}

#membership_info .membership_info.type2 .membership_info_button a.btn {
  background-color: #1E40AF !important;
  color: #fff !important;
}
#membership_info .membership_info.type2 .membership_info_button a.btn:hover {
  background-color: #1E3A8A !important;
}

#membership_info a.more {
  color: #94A3B8 !important;
  font-size: 14px !important;
}

@media (max-width: 768px) {
  #membership_info .membership_info_wrapper {
    flex-direction: column !important;
    padding: 20px !important;
  }
  
  #membership_info .membership_info_desc {
    min-height: 180px !important;
  }
  
  #membership_info .modal-dialog {
    margin: 1rem auto !important;
  }
}

/* ========================================================
   GONGSABI SEARCH PAGE COMPONENTS
======================================================== */
.b2b-page-banner {
    background: var(--b2b-primary);
    padding: 80px 0 100px;
    text-align: center;
}
.b2b-search-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}
.b2b-search-breadcrumb {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 20px;
}
.b2b-search-breadcrumb span {
    color: #fff;
    font-weight: 700;
}
.b2b-search-title {
    color: #fff;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 25px;
    font-family: 'Nanum Gothic', sans-serif;
    letter-spacing: -1px;
}
.b2b-search-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}
.b2b-search-link {
    color: var(--b2b-accent-green);
    font-weight: 700;
}
.b2b-search-note {
    color: #64748B;
    font-size: 12px;
    margin-top: 20px;
}

.b2b-search-area {
    background: #F1F5F9;
    padding: 60px 0 100px;
}
.b2b-search-area-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}
.b2b-search-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: -100px;
    position: relative;
    z-index: 10;
}
.b2b-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.b2b-form-group {
    display: flex;
    flex-direction: column;
}
.b2b-form-label {
    font-size: 13px;
    color: #64748B;
    font-weight: 700;
    margin-bottom: 8px;
}
.b2b-form-select {
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 15px;
    color: #334155;
    outline: none;
    cursor: pointer;
    background: #F8FAFC;
}
.b2b-form-search-row {
    margin-top: 20px;
    border-top: 1px solid #E2E8F0;
    padding-top: 20px;
    display: flex;
    gap: 15px;
}
.b2b-form-input {
    flex: 1;
    padding: 15px 20px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #F8FAFC;
}
.b2b-btn-search {
    padding: 0 50px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    border: none;
    cursor: pointer;
}

.b2b-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 50px;
    margin-bottom: 20px;
}
.b2b-result-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: #0F172A;
}
.b2b-result-count {
    color: var(--b2b-primary);
}

.b2b-empty-state {
    background: #fff;
    border-radius: 16px;
    padding: 80px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #E2E8F0;
}
.b2b-empty-icon {
    width: 80px;
    height: 80px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.b2b-empty-icon i {
    font-size: 32px;
    color: #94A3B8;
}
.b2b-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
}
.b2b-empty-desc {
    color: #64748B;
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
}
.b2b-btn-reset {
    padding: 10px 24px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    display: inline-block;
    border: 1px solid #CBD5E1;
    color: #475569;
    background: transparent;
}

.b2b-table-wrapper {
    margin-top: 20px;
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.b2b-table {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    min-width: 1000px;
}
.b2b-table thead {
    background: #F8FAFC;
    border-bottom: 2px solid #E2E8F0;
}
.b2b-table th {
    padding: 15px;
    color: #475569;
    font-size: 14px;
}
.b2b-table tbody tr {
    border-bottom: 1px solid #E2E8F0;
    transition: background 0.2s;
}
.b2b-table tbody tr:hover {
    background: #F8FAFC;
}
.b2b-table td {
    padding: 15px;
    font-size: 14px;
    color: #334155;
}
.b2b-table td a.b2b-link-bold {
    color: var(--b2b-primary);
  font-weight: 600;
}

/* =========================================
   Login Form Fixes (Override Global Inputs)
========================================= */
.login_wrapper .login_form_wrapper .login_form_item {
    display: flex;
    align-items: center;
}
.login_wrapper .login_form_wrapper .login_form_item .login_form_input input {
    border: 0 none !important;
    padding: 0 !important;
    box-shadow: none !important;
    height: 100%;
}
.b2b-table td .b2b-locked-text {
    font-weight: 700;
    color: var(--b2b-primary);
}
.b2b-btn-view {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    border: none;
    cursor: pointer;
}
.b2b-pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}
.b2b-more-container {
    margin-top: 30px;
    text-align: center;
}
.b2b-btn-more {
    padding: 10px 30px !important;
    background: transparent;
    cursor: pointer;
    border: 1px solid #CBD5E1;
    color: #475569;
    border-radius: 8px !important;
}

@media (max-width: 768px) {
    .b2b-form-grid {
        grid-template-columns: 1fr;
    }
    .b2b-search-card {
        padding: 20px;
    }
    .b2b-form-search-row {
        flex-direction: column;
    }
    .b2b-btn-search {
        padding: 15px 20px !important;
    }
}