/* ===== Main page (index) ===== */

.main-page {
  background-color: #ffffff;
  overflow-x: hidden;
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center right;
  padding: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 1) 36%,
    rgba(244, 251, 255, 0.4) 100%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 1;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 64px;
}

.hero-badge {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  color: #004ea2;
  background: #ffffff;
  border: 1px solid #d6e3f3;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 28px;
  word-break: keep-all;
}

.hero-title .text-primary {
  color: #004ea2 !important;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: #475569;
  margin: 0;
}

/* ---------- Hero quick menu (overlapping bottom) ---------- */
.hero-quickmenu {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 12px;
  min-height: 130px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: #0f172a;
  transition: all 0.25s ease;
  border: 1px solid #e6ecf3;
}

.quick-card:hover {
  text-decoration: none;
  background: #004ea2;
  border-color: #004ea2;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 78, 162, 0.25);
}

.quick-card .quick-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #eef2f7;
  color: #94a3b8;
  font-size: 22px;
  transition: all 0.25s ease;
}

.quick-card:hover .quick-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.quick-card .quick-label {
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 700;
  color: #334155;
  text-align: center;
  word-break: keep-all;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.quick-card:hover .quick-label {
  color: #ffffff;
}

/* ---------- Intro section ---------- */
.intro-section {
  padding: 80px 0 100px;
  background: #ffffff;
}

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

.section-eyebrow {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #004ea2;
  margin-bottom: 12px;
}

.section-title-break {
  display: none;
}

.main-page .section-title {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: #004ea2 !important;
  background: transparent !important;
  background-color: transparent !important;
  padding: 0;
  margin: 0 0 14px;
  text-align: center;
}

.section-desc {
  font-size: 17px;
  color: #64748b;
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f4f7fb;
  border-radius: 14px;
  padding: 22px 24px;
}

.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #e1ebf7;
  color: #004ea2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.feature-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
  word-break: keep-all;
}

.feature-text p {
  font-size: 17px;
  color: #64748b;
  margin: 0;
  word-break: keep-all;
}

/* ---------- Step row ---------- */
.step-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}

.step-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px 16px 24px;
  text-align: center;
}

.step-card + .step-card::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 16px;
  height: 0;
  border-top: 1px dashed #cbd5e1;
  transform: translateY(-50%);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  font-size: 17px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 14px;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  word-break: keep-all;
}

.step-desc {
  font-size: 17px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  min-height: calc(17px * 1.55 * 2);
}

/* ---------- Notice + Quick service ---------- */
.notice-section {
  background: #fbfcfe;
  padding: 80px 0 100px;
}

.notice-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.notice-board {
  min-width: 0;
}

.notice-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-left: 4px solid #004ea2;
  padding-left: 14px;
  margin-bottom: 20px;
}

.notice-board-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.notice-board-header h3 i {
  color: #004ea2;
}

.notice-more {
  flex-shrink: 0;
  font-size: 17px;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}

.notice-more:hover {
  color: #004ea2;
  text-decoration: none;
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid #eef2f7;
  min-width: 0;
}

.notice-row:last-child {
  border-bottom: none;
}

.notice-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-title:hover {
  color: #004ea2;
  text-decoration: none;
}

.notice-date {
  flex-shrink: 0;
  font-size: 17px;
  color: #94a3b8;
  white-space: nowrap;
}

.quick-service {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.quick-service-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  border-left: 4px solid #004ea2;
  padding-left: 12px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  border-radius: 16px;
  padding: 28px 32px 32px;
  min-height: 132px;
  text-decoration: none;
  background: linear-gradient(135deg, #f4f9ff 0%, #e3edfa 100%);
  color: #0f3a72;
  border: 1px solid rgba(0, 78, 162, 0.12);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1),
              box-shadow 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 78, 162, 0.18), rgba(0, 78, 162, 0) 70%);
  z-index: -1;
  transition: transform 0.5s ease, background 0.4s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1769c8 0%, #004ea2 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.service-card:hover,
.service-card:focus {
  text-decoration: none;
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 78, 162, 0.28);
}

.service-card:hover::after,
.service-card:focus::after {
  opacity: 1;
}

.service-card:hover::before,
.service-card:focus::before {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 70%);
  transform: scale(1.15);
}

.service-card .service-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #4a78b5;
  transition: color 0.25s ease;
}

.service-card:hover .service-eyebrow,
.service-card:focus .service-eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.service-card .service-name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
  padding-right: 56px;
  word-break: keep-all;
}

.service-card .service-arrow {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 78, 162, 0.1);
  color: #004ea2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s ease;
}

.service-card:hover .service-arrow,
.service-card:focus .service-arrow {
  background: #ffffff;
  color: #004ea2;
  transform: translateY(-50%) translateX(4px);
}

/* 태블릿~좁은 데스크탑 (어중간한 뷰포트) */
@media (max-width: 1199px) {
  .feature-grid {
    gap: 16px;
  }
  .feature-card {
    padding: 18px 18px;
    gap: 14px;
  }
  .feature-text h3 {
    font-size: 16px;
  }
  .feature-text p {
    font-size: 15px;
  }
  .step-grid {
    gap: 12px;
  }
  .step-card {
    padding: 22px 10px 20px;
  }
  .step-title {
    font-size: 17px;
  }
  .step-desc {
    font-size: 14px;
  }
  .notice-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
  }
  .service-card {
    padding: 22px 22px 24px;
    min-height: 130px;
  }
  .service-card .service-name {
    font-size: 18px;
  }
}

@media (max-width: 991px) {
  .notice-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid .feature-card:last-child {
    grid-column: 1 / -1;
  }
  .step-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .step-card + .step-card::before {
    display: none;
  }
}

@media (max-width: 767px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid .feature-card:last-child {
    grid-column: auto;
  }
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .notice-section {
    padding: 50px 0 60px;
  }
  .notice-board-header h3 {
    font-size: 17px;
  }
  .notice-more {
    font-size: 14px;
  }
  .notice-row {
    padding: 14px 0;
    gap: 12px;
  }
  .notice-title {
    font-size: 15px;
  }
  .notice-date {
    font-size: 13px;
  }
  .quick-service-title {
    font-size: 16px;
  }
  .service-card {
    padding: 22px 24px 24px;
    min-height: 110px;
    border-radius: 14px;
  }
  .service-card .service-eyebrow {
    font-size: 12px;
  }
  .service-card .service-name {
    font-size: 18px;
    padding-right: 48px;
  }
  .service-card .service-arrow {
    width: 32px;
    height: 32px;
    right: 16px;
    font-size: 14px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .hero-quickmenu {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .quick-card {
    padding: 22px 8px;
    min-height: 110px;
  }
}

@media (max-width: 991px) {
  .hero-title {
    font-size: 40px;
  }
  .hero-text {
    margin: 0 auto 48px;
    text-align: center;
  }
  .hero-quickmenu {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .step-card + .step-card::before {
    display: none;
  }
}

@media (max-width: 575px) {
  .hero-container {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-desc {
    font-size: 17px;
  }
  .hero-desc br {
    display: none;
  }
  .hero-quickmenu {
    grid-template-columns: repeat(2, 1fr);
  }
  .intro-section {
    padding: 60px 0 60px;
  }
  .section-title {
    font-size: 26px;
  }
  .section-title-break {
    display: inline;
  }
  .step-grid {
    grid-template-columns: 1fr;
  }
}

/* Main page: footer flush against last section */
.main-page + #page-footer {
  margin-top: 0;
}

/* ---------- Popup ---------- */
.main-popup .popup-container {
  max-width: 100%;
}
