/* -------------------------------------------------------------------------- */
/* 1. Global Reset & Base Styles */
/* -------------------------------------------------------------------------- */
* {
  font-family: "GmarketSansMedium", sans-serif;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden; /* PC 기본: 전체 스크롤 방지 */
  margin: 0;
  padding: 0;
}

p,
span,
strong,
a {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 배경 이미지 (블러 효과) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/assets/img/bg/g90_2_M.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -2;
  filter: blur(5px) brightness(0.8);
  transform: scale(1.05);
}

/* -------------------------------------------------------------------------- */
/* 2. Main Layout (Desktop Default) */
/* -------------------------------------------------------------------------- */
.main-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

.left-container,
.right-container {
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 좌측 영역 (기본 60%) */
.left-container {
  width: 60%;
  align-items: flex-start;
  padding-top: 20px;
  padding-bottom: 20px;
}

.left-section {
  width: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

/* Hero 섹션 고정 높이 */
.left-section.hero {
  flex: 0 0 400px;
  height: 400px;
  margin-bottom: 0px;
}

/* 콘텐츠 섹션 자동 높이 */
.left-section.view-content {
  flex: 1;
  height: auto;
}

/* 우측 영역 (기본 40%) */
.right-container {
  width: 40%;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0;
}

/* 우측 내부 박스 */
.right-box {
  height: 100%;
  color: #fff;
  border-radius: 8px;
  background-color: #ffffff;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;

  /* 반응형 컨테이너 쿼리 설정 */
  container-type: inline-size;
  container-name: rightbox;
}

/* ✅ [복구] 컨테이너 쿼리 적용: right-box 너비가 550px 이상일 때 */
@container rightbox (min-width: 550px) {
  /* 반응형 그리드: col-6(50%) -> col-3(25%) 효과로 변경 */
  /* .responsive-action-grid > div {
    width: 50% !important;
    flex: 0 0 auto;
  } */
}

/* PC 스크롤바 커스텀 */
.right-box::-webkit-scrollbar {
  width: 8px;
}
.right-box::-webkit-scrollbar-track {
  background: #333;
  border-radius: 8px;
}
.right-box::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 8px;
}

/* -------------------------------------------------------------------------- */
/* 3. Responsive Media Queries (Optimized) */
/* -------------------------------------------------------------------------- */

/* ✅ [구간 1] 모바일 & 태블릿 (< 1200px) */
/* - 동작: 앱 스타일 해제, 전체 스크롤(Pull-to-Refresh) 허용 */
@media (max-width: 1199.98px) {
  html,
  body {
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }

  body::before {
    display: none;
  } /* 배경 제거 */

  .main-container {
    height: auto !important;
    display: block;
  }

  .left-container {
    display: none;
  }

  .right-container,
  .right-box {
    width: 100%;
    height: auto !important;
    border-radius: 0;
    overflow: visible !important;
  }

  .content-area {
    height: auto !important;
    overflow: visible !important;
    flex: none !important;
  }

  .content-area::-webkit-scrollbar {
    display: none;
  }

  .top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  /* ✅ [수정] 모바일에서는 스크롤 유도 아이콘 숨김 */
  .scroll-downs {
    display: none !important;
  }

  /* ✅ [수정] 모바일에서는 스크롤 아이콘 위치 조정 및 고정 (Fixed) */
  .scroll-downs {
    position: fixed !important; /* 스크롤과 무관하게 화면에 고정 */
    bottom: 20px !important; /* 하단에서 적당히 띄움 */
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important; /* 최상위 레이어 */
    pointer-events: none; /* 터치 통과 */
  }
}

/* ✅ [구간 2] 중간 PC (1200px ~ 1649px) - "레이아웃 깨짐 방지 구간" */
/* - 이슈 해결: 플로팅 메뉴 잘림 방지(안쪽 배치), 버튼 줄바꿈 방지(너비 확보) */
@media (min-width: 1200px) and (max-width: 1649.98px) {
  /* 50:50 비율로 변경하여 우측 공간 확보 */
  .left-container {
    width: 50%;
    padding-left: max(20px, calc(50vw - 590px));
  }

  .right-container {
    width: 50%;
    padding: 20px;
    padding-left: clamp(20px, 4vw, 40px);
  }

  .right-box {
    width: 100%;
    /* 최소 너비를 보장하여 내부 버튼이 찌그러지지 않게 함 */
    min-width: 500px;
    max-width: 580px;
  }
}

/* ✅ [구간 3] 대형 PC (1650px ~) - "여유 구간" */
/* - 동작: 넓은 레이아웃 (1650px부터 적용) */
@media (min-width: 1650px) {
  .right-box {
    /* 화면이 커지면 박스도 비율에 맞춰 커지되, 너무 크지 않게 제한 */
    width: 28.646vw;
    min-width: 580px;
    max-width: 700px;
  }

  .left-container {
    /* 박스 위치에 따른 대칭 여백 계산 */
    padding-left: calc(11.354vw - 80px);
    padding-right: 80px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .right-container {
    padding-left: 0;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

/* 초대형 화면 보정 (약 2444px 이상) */
@media (min-width: 2444px) {
  .left-container {
    padding-left: calc(40vw - 780px);
  }
}

/* -------------------------------------------------------------------------- */
/* 4. Component Styles */
/* -------------------------------------------------------------------------- */

/* Hero Section (Glassmorphism) */
.blur-box-dark {
  position: relative;
  width: 100%;
  padding: 50px 45px 30px 45px;
  margin-top: 0px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(30, 41, 59, 0.85) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: left;
}

.hero-head {
  font-family: "GmarketSansBold", sans-serif;
  font-size: 32px;
  line-height: 1.35;
  margin-bottom: 24px;
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-body {
  font-family: "GmarketSansLight", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 40px;
  word-break: keep-all;
}

.hero-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-contact-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}
.hero-contact-number {
  font-family: "GmarketSansBold", sans-serif;
  font-size: 28px;
  color: #ffce00;
  letter-spacing: -0.5px;
}

/* ✅ [추가] 좌측 히어로 반응형 이미지 */
.hero-floating-img {
  position: absolute;
  z-index: 10;
  bottom: 120px;
  right: 60px;
  width: 45%; /* 기본값 (대형 화면) */
  transition: width 0.3s ease, right 0.3s ease;
}

/* ✅ [수정] 1600px 이하에서는 이미지 숨김 (텍스트 겹침 방지) */
@media (max-width: 1600px) {
  .hero-floating-img {
    display: none;
  }
}

/* ✅ [수정] 패딩 조정 (하단 패딩 제거) */
.view-content {
  padding: 30px 0 0 0;
  overflow: hidden;
}

/* Top Bar */
.top-bar {
  width: 100%;
  height: 60px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  flex-shrink: 0;
}

/* Content Area */
.content-area {
  position: relative;
  flex: 1;
  height: auto;
  overflow-y: auto;
  background-color: #fff;
  scroll-behavior: smooth;
  border-radius: 0 0 8px 8px;
}
.content-area::-webkit-scrollbar {
  width: 8px;
}
.content-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.content-area::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.content-area::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Footer */
.footer-section {
  margin-top: 0px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
  color: #4b5563;
  padding-bottom: 20px;
}
.footer-group {
  margin-bottom: 24px;
}
.footer-title {
  font-family: "GmarketSansBold", sans-serif;
  font-size: 15px;
  color: #111827;
  margin-bottom: 6px;
}
.footer-desc {
  font-family: "GmarketSansLight", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
  word-break: keep-all;
}

/* Modern Tabs */
.modern-tabs-container {
  display: flex;
  flex-wrap: nowrap;
  background-color: #ffbc00;
  padding: 5px;
  border-radius: 14px;
  gap: 5px;
  margin-top: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.modern-tabs-container::-webkit-scrollbar {
  display: none;
}

.modern-tab-btn {
  flex: 1;
  min-width: fit-content;
  white-space: nowrap;
  padding: 12px 6px;
  border: none;
  border-radius: 10px;
  background-color: transparent;
  color: #495057;
  font-family: "GmarketSansMedium", sans-serif;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}
.modern-tab-btn:hover:not(.active) {
  color: #212529;
  background-color: rgba(255, 255, 255, 0.2);
}
.modern-tab-btn.active {
  background-color: #ffffff;
  color: #002f6c;
  font-family: "GmarketSansBold", sans-serif;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(0);
}
.modern-tab-btn i {
  font-size: 1.1em;
  margin-bottom: 1px;
}

@media (max-width: 420px) {
  .modern-tab-btn {
    font-size: 16px;
    padding: 12px 4px;
    gap: 0;
  }
  .modern-tab-btn i {
    display: none;
  }
}

/* ✅ [수정] 우측 히어로 배너 스타일 (정적 이미지) */
.right-hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #f3f4f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  /* 높이 250px 고정 */
  height: 250px;
  object-fit: cover;
  width: 100%;
  transition: opacity 0.2s ease;
}

.consult-banner {
  /* 기존 쨍한 노란색에서 조금 더 부드럽고 깊이감 있는 그라데이션으로 변경 */
  background: linear-gradient(95deg, #ffce00 0%, #ffeb3b 100%);
  box-shadow: 0 4px 15px rgba(255, 206, 0, 0.25); /* 그림자 부드럽게 */
  border-radius: 12px;
  color: #3b1e1e; /* 텍스트 색상을 짙은 갈색/검정으로 하여 가독성 확보 */
  border: 1px solid rgba(255, 255, 255, 0.4); /* 미세한 테두리로 퀄리티 업 */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

/* 호버 시 인터랙션 강화 */
.consult-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 206, 0, 0.35);
}

/* ==========================================================
   ✅ [추가] 상담 배너 텍스트/아이콘 반응형 처리
   ========================================================== */
.consult-icon-box {
  width: 48px;
  height: 48px;
  background: #3c1e1e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* 아이콘 박스 찌그러짐 방지 */
}

.consult-icon {
  color: #ffe812;
  font-size: 24px;
}

.consult-text-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.consult-title {
  font-family: "GmarketSansBold";
  font-size: 17px;
  letter-spacing: -0.5px;
  white-space: nowrap; /* 줄바꿈 방지 */
}

/* ✅ [수정] 폰트 및 스타일을 Title과 동일하게 변경 */
.consult-desc {
  font-family: "GmarketSansBold"; /* Title 폰트로 변경 */
  font-size: 17px; /* Title 사이즈로 변경 (기존 13px) */
  opacity: 1; /* 투명도 제거 */
  margin-top: 2px;
  white-space: nowrap; /* 줄바꿈 방지 */
}

/* 모바일 화면(480px 이하)에서 사이즈 축소 */
@media (max-width: 480px) {
  .consult-banner {
    padding-left: 15px !important;
    padding-right: 15px !important;
    height: 70px !important; /* 높이도 살짝 조정 */
  }

  /* 아이콘 박스 축소 */
  .consult-icon-box {
    width: 40px;
    height: 40px;
  }
  .consult-icon {
    font-size: 20px;
  }

  /* 텍스트 크기 축소 */
  .consult-title {
    font-size: 14px; /* 17px -> 14px */
  }

  /* ✅ [수정] 모바일에서도 Desc 크기를 Title과 동일하게 */
  .consult-desc {
    font-size: 14px; /* 11px -> 14px */
    margin-top: 0;
  }

  /* 간격 조정 (gap-3 클래스 덮어쓰기 어려울 경우 대비) */
  .consult-banner .gap-3 {
    gap: 0.75rem !important; /* 약간 줄임 */
  }
}

/* -------------------------------------------------------------------------- */
/* 5. Floating Action Buttons (Logic Optimized) */
/* -------------------------------------------------------------------------- */
.floating-container {
  position: absolute;
  /* 기본값: PC 대형 화면 기준 (바깥쪽 배치 - 1440px 이상 포함) */
  right: -70px;
  bottom: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));

  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* ✅ [수정] 1200px ~ 1439px 구간 (좁은 PC): 메뉴 잘림 방지 (안쪽 배치) */
/* 1440px부터는 기본값(-70px)을 따르도록 max-width 조정 */
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .floating-container {
    right: 20px; /* 박스 안쪽으로 이동 */
    bottom: 30px;
  }
}

/* ✅ [수정] 모바일: 화면 고정 (Fixed) */
@media (max-width: 1199.98px) {
  .floating-container {
    position: fixed;
    right: 20px;
    bottom: 30px;
  }
}

.floating-btn {
  /* ✅ [수정] 메뉴 아이템과 동일한 크기(45px)로 변경 */
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 20px;
}
.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.floating-btn:active {
  transform: scale(0.95);
}

/* Top 버튼: 부드러운 표시 전환 */
.btn-top {
  background-color: #fff;
  color: #002f6c;
  border: 1px solid #dee2e6;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease; /* 애니메이션 추가 */
}

/* 메뉴 토글 버튼: 회전 애니메이션 */
.btn-menu-toggle {
  background-color: #ffbc00;
  color: #000;
  font-size: 24px;
  z-index: 2;
}
.btn-menu-toggle i {
  transition: transform 0.3s ease;
} /* 아이콘 자체에 트랜지션 */
.btn-menu-toggle.active i {
  transform: rotate(90deg);
} /* 클릭 시 회전 */

.btn-event {
  background-color: #ff5252;
  color: #fff;
  font-size: 20px;
}

.floating-menu-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  /* ✅ [수정] 겹침 방지: 버튼 크기 45px 기준으로 위치 재조정 */
  /* Top(45) + Gap(12) + Menu(45) + Gap(12) + Event(45) + 여유분 */
  bottom: 175px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: center;
}
.floating-menu-items.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.menu-item {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: "GmarketSansBold", sans-serif;
  color: #333;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s;
  cursor: pointer;
}
.menu-item:hover {
  transform: scale(1.1);
}
.menu-item span {
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.menu-kb {
  border-color: #ffbc00;
  color: #5a4b00;
}
.menu-db {
  border-color: #00b050;
  color: #00602b;
}
.menu-hi {
  border-color: #003674;
  color: #003674;
}
.menu-review {
  border-color: #e83e8c;
  color: #e83e8c;
  font-weight: bold;
}

/* Modal */
.custom-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.custom-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}
.modal-title {
  font-family: "GmarketSansBold", sans-serif;
  font-size: 18px;
  color: #333;
}
.btn-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* -------------------------------------------------------------------------- */
/* 6. Scroll Down Mouse Animation (New) */
/* -------------------------------------------------------------------------- */
.scroll-downs {
  /* [수정] PC는 absolute로 우측 박스 하단 고정, 모바일은 fixed로 뷰포트 고정 */
  position: absolute;
  /* [수정] 50px 더 내려서 -50px */
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
  /* ✅ [추가] 바운스 애니메이션 적용 */
  animation: bounce 2s infinite;
}

.arrows-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -5px;
}

.arrow-down {
  display: block;
  font-size: 16px;
  color: #333;
  opacity: 0;
  line-height: 0.8;
  animation: scroll-fade 2s infinite;
}

/* 각 화살표 딜레이 설정 */
.arrow-down:nth-child(1) {
  animation-delay: 0s;
}
.arrow-down:nth-child(2) {
  animation-delay: 0.2s;
}
.arrow-down:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes scroll-fade {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(5px);
  }
}

/* ✅ [추가] 바운스 애니메이션 정의 */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ==========================================================
   ✅ [추가] 모바일 전용 히어로 섹션 스타일
   ========================================================== */
.mobile-hero-wrapper {
  display: none;
}

@media (max-width: 1199.98px) {
  .mobile-hero-wrapper {
    display: block;
    width: 100%;
    background-color: #f8f9fa;
  }

  /* Reuse blur-box-dark but override for mobile */
  .mobile-hero-wrapper .blur-box-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 25px 20px;
    border-radius: 0; /* Full width */
    box-shadow: none;
    margin: 0;
    border: none;
  }

  .mobile-hero-wrapper .hero-head {
    font-size: 20px !important;
    margin-bottom: 10px;
  }

  .mobile-hero-wrapper .hero-body {
    font-size: 13px !important;
    margin-bottom: 0 !important; /* ✅ [수정] 하단 여백 제거 (상하 간격 균형 맞춤) */
    color: #e2e8f0;
  }
}
