@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ============================================================
   global-new.css — Prestige Solutions Shared Styles
   ============================================================ */

/* --- 1. CSS Variables --- */
:root {
  /* Brand */
  --primary-blue: #02a0e1;
  --primary-blue-dark: #0178B4;
  --primary-blue-light: #E8F6FD;
  --primary-gradient: linear-gradient(135deg, #02a0e1 0%, #0264C8 100%);

  /* Shadows */
  --shadow-card: 0 4px 20px rgba(2, 100, 200, 0.08);
  --shadow-card-hover: 0 12px 32px rgba(2, 100, 200, 0.15);
  --shadow-btn: 0 8px 24px rgba(2, 160, 225, 0.28);

  /* Neutral */
  --dark-bg: #11151c;
  --text-main: #222222;
  --text-dark: #1a1a1a;
  --text-gray: #777777;
  --bg-light: #f8f9fb;
}

/* --- 2. Body Reset --- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 3. Layout Override (overrides style.css fixed 1200px width) --- */
.layout {
  width: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* --- 4. Section Title & Divider --- */
.section_title { text-align: center; margin-bottom: 50px; }
.section_title h2 { font-size: 36px; font-weight: 800; color: var(--text-main); text-transform: uppercase; letter-spacing: -0.01em; }
.section_title p { font-size: 16px; color: var(--text-gray); margin-top: 15px; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.title_divider { width: 60px; height: 4px; background: var(--primary-blue); margin: 20px auto 0; border-radius: 2px; }

/* --- 5. Display Utilities --- */
.pc_only_element { display: block; }
.mobile_only_element { display: none; }
@media (max-width: 768px) {
  .pc_only_element { display: none !important; }
  .mobile_only_element { display: block !important; }
}

/* --- 6. Back to Top Button --- */
#back_to_top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(2, 160, 225, 0.9);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: var(--shadow-btn);
  transition: 0.3s;
}
#back_to_top:hover { background: #02a0e1; transform: translateY(-5px); }
#back_to_top i { font-size: 24px; }
@media (max-width: 768px) {
  #back_to_top { bottom: 20px; right: 16px; width: 44px; height: 44px; }
}

/* ============================================================
   HEADER
   ============================================================ */
.web_head { width: 100%; background: #fff; position: relative; }
.main_navigation_bar { border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 9999; background: #fff; transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.main_navigation_bar.nav_scrolled { background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(255, 255, 255, 0.6); box-shadow: 0 2px 20px rgba(2, 100, 200, 0.08); }
.header_flex_container { display: flex; align-items: center; justify-content: space-between; height: 80px; position: relative; }
.header_logo img { max-height: 50px; width: auto; display: block; }
.breadcrumb, .crumbs, .current_location { display: none !important; }

/* PC Nav (≥992px) */
@media (min-width: 992px) {
  .nav_list { display: flex; list-style: none; margin: 0; padding: 0; height: 80px; }
  .nav_main_item { margin: 0 15px; position: relative; height: 80px; }
  .nav_main_item > a { line-height: 80px; display: block; color: #333; font-weight: 700; font-size: 14px; text-transform: uppercase; text-decoration: none; transition: 0.3s; }
  .nav_main_item:hover > a,
  .nav_main_item.active > a { color: #02a0e1; }
  /* Vertical dropdown — left-aligned below nav item */
  .mega_menu_panel.adaptive_panel {
    position: absolute; top: 100%; left: 0; transform: none;
    width: 220px; min-width: 220px; max-width: 280px;
    background: #fff; box-shadow: 0 15px 40px rgba(2, 100, 200, 0.12);
    display: none; padding: 6px 0; z-index: 10000;
    border-top: 3px solid var(--primary-blue);
    border-radius: 0 8px 8px 8px; white-space: normal;
  }
  /* Invisible bridge: prevents dropdown from closing while cursor moves from nav link down into panel */
  .mega_menu_panel::before { content: ""; position: absolute; top: -10px; left: 0; width: 100%; height: 10px; background: transparent; }
  .nav_has_mega:hover > .mega_menu_panel { display: block !important; }
  .mega_inner_flex { display: flex; flex-direction: column; align-items: stretch; }
  .mega_col { padding: 0; border-right: none; text-align: left; }
  .mega_col:not(:last-child) { border-bottom: 1px solid #f5f5f7; }
  .mega_title { display: block; font-weight: 700; color: #1a1a1a; font-size: 14px; padding: 11px 18px; margin-bottom: 0; text-decoration: none; transition: 0.15s; }
  .mega_title:hover { color: var(--primary-blue); background: var(--primary-blue-light); }
  .mega_sub_list { list-style: none; padding: 0 0 6px; margin: 0; display: flex; flex-direction: column; gap: 0; }
  .mega_sub_list li a { display: block; padding: 8px 18px 8px 30px; color: #555; font-size: 13px; text-decoration: none; border: none; border-radius: 0; background: none; transition: 0.15s; }
  .mega_sub_list li a:hover { color: var(--primary-blue); background: var(--primary-blue-light); }
  .mobile_toggle { display: none; }
}

/* Search Box */
.header_right_tool { display: flex; align-items: center; }
.header_search_box { position: relative; width: 180px; margin-left: 20px; }
.modern_search_input { width: 100%; height: 36px; border-radius: 18px; border: 1px solid #eee; padding: 0 40px 0 15px; background: #f8f9fa; outline: none; font-size: 13px; }
.modern_search_btn { position: absolute; right: 0; top: 0; width: 40px; height: 36px; background: none; border: none; color: #02a0e1; cursor: pointer; }

/* Mobile Nav (≤991px) */
@media (max-width: 991px) {
  .head_top { display: none; }
  .header_flex_container { position: relative; display: flex; align-items: center; justify-content: space-between; }
  .header_logo img { max-height: 40px; }
  .header_search_box { display: none; }
  .mobile_toggle {
    display: block !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%);
    font-size: 26px;
    color: #333;
    cursor: pointer;
    z-index: 10001;
  }
  .header_nav_menu {
    position: fixed; top: 60px; left: -100%;
    width: 280px; height: calc(100vh - 60px);
    background: #fff; z-index: 10000;
    transition: 0.3s; overflow-y: auto;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
  }
  .header_nav_menu.active { left: 0; }
  .nav_list { flex-direction: column; padding: 20px 0; }
  .nav_main_item { height: auto; margin: 0; border-bottom: 1px solid #f5f5f5; }
  .nav_main_item > a { line-height: 50px; padding: 0 20px; text-transform: none; }
  .mega_menu_panel.adaptive_panel { display: none; background: #f9f9f9; padding: 10px 20px; white-space: normal; box-shadow: none; border-top: none; }
  .nav_has_mega.is_open > .mega_menu_panel { display: block !important; }
  .mega_inner_flex { flex-direction: column; }
  .mega_col { padding: 10px 0; border-right: none; border-bottom: 1px dotted #eee; }
  .mega_sub_list { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
}

/* ============================================================
   INNER PAGE — HERO BANNER
   ============================================================ */
.inner_hero { position: relative; height: 160px; background: #0f141a; overflow: hidden; }
.inner_hero_bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: grayscale(100%); }

/* Breadcrumb bar — light strip below hero */
.breadcrumb_bar { background: #f8f9fa; border-bottom: 1px solid #eee; padding: 11px 0; font-size: 13px; color: #888; }
.breadcrumb_bar a { color: #555; text-decoration: none; transition: 0.2s; }
.breadcrumb_bar a:hover { color: var(--primary-blue); }
.breadcrumb_bar i { margin-right: 4px; color: #bbb; }

@media (max-width: 991px) {
  .inner_hero { height: 100px; }
}

/* ============================================================
   INNER PAGE — SIDEBAR LAYOUT
   ============================================================ */
.inner_page_container { padding: 60px 0; display: flex; gap: 40px; }
.aside_sticky { width: 280px; flex-shrink: 0; position: sticky; top: 100px; height: fit-content; }
.main_content { flex: 1; min-width: 0; }

@media (max-width: 991px) {
  .inner_page_container { padding: 25px 0; display: block; }
  .aside_sticky { display: none !important; }
  .main_content { width: 100% !important; }
}

/* --- Sidebar Widgets --- */
.side_widget_card { background: #fff; border-radius: 12px; padding: 25px; box-shadow: var(--shadow-card); margin-bottom: 30px; border: 1px solid #f0f0f5; }
.side_tit { font-size: 18px; font-weight: 800; border-left: 4px solid var(--primary-blue); padding-left: 15px; margin-bottom: 20px; color: var(--text-dark); }
.side_nav_list { list-style: none; padding: 0; margin: 0; }
.side_nav_list > li { margin-bottom: 5px; }
.side_nav_list > li > a { display: block; padding: 12px 15px; color: #555; text-decoration: none; border-radius: 8px; transition: 0.3s; font-weight: 600; font-size: 14px; }
.side_nav_list > li:hover > a,
.side_nav_list > li.active > a { background: rgba(2, 160, 225, 0.08); color: var(--primary-blue); }

/* --- Pagination --- */
.pagination_wrap { margin-top: 50px; text-align: center; }
.pagination_wrap a,
.pagination_wrap span { display: inline-block; padding: 10px 18px; background: #fff; border: 1px solid #eee; border-radius: 6px; margin: 0 3px; color: #666; text-decoration: none; }
.pagination_wrap .current { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); }

/* ============================================================
   FOOTER
   ============================================================ */
.web_footer { background: #fff; border-top: 1px solid #f1f5f9; position: relative; z-index: 1; }

/* Partners Bar */
.foot_partners_bar { background: #fafbfc; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.partner_flex { display: flex; align-items: center; gap: 30px; }
.partner_label { font-size: 10px; font-weight: 800; color: #94a3b8; letter-spacing: 2px; flex-shrink: 0; }
.partner_links { display: flex; gap: 25px; flex-wrap: wrap; }
.p-flink { font-size: 13px; color: #94a3b8; text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.p-flink:hover { color: #02a0e1; transform: translateY(-2px); }

/* Main Footer Content */
.foot_main_content { padding: 50px 0; }
.foot_flex_container { display: flex; justify-content: space-between; align-items: center; }
.foot_logo { font-size: 22px; font-weight: 900; color: #111827; }
.foot_logo span { color: #02a0e1; }
.foot_sns_icons { display: flex; gap: 20px; margin-top: 15px; }
.system_pills { display: flex; gap: 12px; }
.p-sns { color: #cbd5e1; font-size: 18px; transition: all 0.3s ease; text-decoration: none; }
.p-sns:hover { color: #02a0e1; transform: scale(1.2); }
.p-pill { padding: 8px 20px; border: 1px solid #e2e8f0; border-radius: 30px; font-size: 12px; font-weight: 700; color: #475569; text-decoration: none; transition: all 0.3s ease; }
.p-pill:hover { border-color: #02a0e1; color: #02a0e1; background: #f0f9ff; transform: translateY(-3px); box-shadow: 0 4px 12px rgba(2,160,225,0.1); }
.p-tel { font-size: 20px; font-weight: 900; color: #111827; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.p-tel i { color: #02a0e1; }
.p-tel:hover { color: #02a0e1; }

/* Copyright Bar */
.foot_copyright_slim { padding: 20px 0; background: #fff; border-top: 1px solid #f1f5f9; font-size: 11px; color: #94a3b8; }
.slim_flex { display: flex; justify-content: space-between; }
.copy_status { color: #10b981; font-weight: 800; letter-spacing: 1px; }

/* Footer Mobile */
@media (max-width: 768px) {
  .foot_flex_container { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .foot_sns_icons { justify-content: center; }
  .system_pills { flex-wrap: wrap; justify-content: center; }
  .slim_flex { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
}

/* ============================================================
   AI CHAT WIDGET
   ============================================================ */
.ps-ai-context { --ps-main: #02a0e1; position: fixed; bottom: 100px; right: 30px; z-index: 999999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

#ps-ai-trigger {
  padding: 0 24px; height: 52px; border-radius: 30px;
  background: var(--ps-main); color: #fff; border: none;
  cursor: pointer; box-shadow: var(--shadow-btn);
  font-weight: 700; font-size: 14px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#ps-ai-trigger:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 30px rgba(2, 160, 225, 0.4); }
#ps-ai-trigger:active { transform: scale(0.92); }
.ps-trigger-inner { display: flex; align-items: center; gap: 8px; }

#ps-ai-box {
  display: none; width: 350px; height: 500px; background: #fff;
  border-radius: 18px; box-shadow: 0 20px 60px rgba(2, 100, 200, 0.18);
  flex-direction: column; overflow: hidden;
  border: 1px solid #f1f5f9; margin-bottom: 15px;
  transform-origin: bottom right;
  animation: psPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes psPopIn {
  0% { opacity: 0; transform: scale(0.6) translateY(50px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.ps-msg-ai, .ps-msg-user { animation: psSlideUp 0.3s ease-out; margin-bottom: 8px; }
@keyframes psSlideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

#ps-ai-welcome {
  position: absolute; bottom: 75px; right: 0; width: 200px;
  background: #fff; padding: 12px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid #f1f5f9;
  cursor: pointer; animation: psFloat 3s infinite ease-in-out;
}
@keyframes psFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.ps-bubble-content { font-size: 13px; color: #333; line-height: 1.5; }
.ps-highlight { display: block; color: var(--ps-main); font-weight: 700; margin-top: 5px; }
.ps-bubble-arrow { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #fff; position: absolute; bottom: -10px; right: 20px; }

.ps-ai-header { background: #111827; color: #fff; padding: 18px; display: flex; justify-content: space-between; align-items: center; }
.ps-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; display: inline-block; margin-right: 5px; box-shadow: 0 0 8px #10b981; }
.ps-ai-title { display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.ps-ai-close { cursor: pointer; font-size: 22px; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.ps-ai-close:hover { opacity: 1; }
#ps-ai-logs { flex: 1; overflow-y: auto; padding: 15px; background: #fcfdfe; display: flex; flex-direction: column; }
.ps-msg-ai { background: #f1f5f9; color: #111827; align-self: flex-start; padding: 10px 14px; border-radius: 12px; font-size: 13px; border-bottom-left-radius: 2px; max-width: 85%; line-height: 1.5; }
.ps-msg-user { background: var(--ps-main); color: #fff; align-self: flex-end; padding: 10px 14px; border-radius: 12px; font-size: 13px; border-bottom-right-radius: 2px; max-width: 85%; }
.ps-ai-input-bar { padding: 15px; border-top: 1px solid #f1f5f9; display: flex; gap: 8px; background: #fff; }
.ps-ai-input-bar input { flex: 1; border: 1px solid #e2e8f0; padding: 10px 15px; border-radius: 20px; outline: none; font-size: 13px; height: auto !important; transition: all 0.2s; }
.ps-ai-input-bar input:focus { border-color: var(--ps-main) !important; box-shadow: 0 0 0 3px rgba(2, 160, 225, 0.1) !important; background: #fff !important; }
.ps-ai-input-bar button { background: var(--ps-main); color: #fff; border: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; transition: 0.3s; flex-shrink: 0; }
.ps-ai-input-bar button:active { transform: scale(0.8); }

@media (max-width: 768px) {
  .ps-ai-context { bottom: 160px; right: 16px; }
  #ps-ai-box { position: fixed; bottom: 230px; right: 16px; left: 16px; width: auto; height: 55vh; max-height: 480px; }
  #ps-ai-welcome { display: none; }
}

/* ============================================================
   FORM MODAL
   ============================================================ */
.form_modal_overlay {
  position: fixed; inset: 0;
  background: rgba(10, 14, 23, 0.65);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999999;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.form_modal_overlay.active { opacity: 1; pointer-events: all; }

.form_modal_box {
  background: #fff; border-radius: 20px; padding: 50px 40px;
  max-width: 440px; width: 90%; text-align: center;
  transform: scale(0.92) translateY(12px); transition: transform 0.25s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}
.form_modal_overlay.active .form_modal_box { transform: scale(1) translateY(0); }

.fm_icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.fm_icon_success { background: #ecfdf5; color: #22c55e; }
.fm_icon_error   { background: #fef2f2; color: #ef4444; }

.fm_title { font-size: 24px; font-weight: 800; color: var(--text-dark); margin-bottom: 10px; }
.fm_desc  { font-size: 15px; color: #777; line-height: 1.6; margin-bottom: 30px; }

.fm_close_btn {
  padding: 14px 45px; background: var(--primary-gradient); color: #fff;
  border: none; border-radius: 10px; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: 0.25s; box-shadow: var(--shadow-btn); font-family: inherit;
}
.fm_close_btn:hover { filter: brightness(1.08); transform: translateY(-2px); }

@media (max-width: 480px) {
  .form_modal_box { padding: 36px 22px; }
  .fm_title { font-size: 20px; }
}
