/* ========================================
   NEARBY - Sub Pages Style
   ======================================== */

/* --- Page Hero Banner --- */
.page-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  overflow: hidden;
  padding-top: 80px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(10, 207, 131, 0.08) 0%, transparent 70%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.page-hero .section-tag {
  margin-bottom: 16px;
}

.page-hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.page-hero-desc {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-light-gray);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Color variants for page heroes */
.page-hero.green::before {
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(10, 207, 131, 0.12) 0%, transparent 70%);
}

.page-hero.amber::before {
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
}

.page-hero.blue::before {
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
}

/* --- Page Body --- */
.page-body {
  padding: 80px 0;
  background: var(--bg-white);
}

.page-body.alt {
  background: var(--bg-light);
}

.page-body.dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

/* --- Content Layout --- */
.content-block {
  max-width: 800px;
  margin: 0 auto 64px;
}

.content-block:last-child {
  margin-bottom: 0;
}

.content-block h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-black);
}

.content-block h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-black);
}

.content-block p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 16px;
}

/* --- Steps (이용방법) --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.06);
  border-color: transparent;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 20px;
}

.step-number.amber {
  background: var(--accent-amber);
}

.step-number.blue {
  background: var(--accent-blue);
  color: #fff;
}

.step h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-black);
}

.step p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-black);
  text-align: left;
  font-family: inherit;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary-dark);
}

.faq-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--text-gray);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding-bottom: 24px;
  font-size: 15px;
  color: #666;
  line-height: 1.7;
}

/* --- Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(10, 207, 131, 0.08);
}

.feature-card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-black);
}

.feature-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* --- Terms / Legal Text --- */
.legal-text {
  max-width: 800px;
  margin: 0 auto;
}

.legal-text h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 48px 0 16px;
  color: var(--text-black);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.legal-text h2:first-child {
  margin-top: 0;
}

.legal-text h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-black);
}

.legal-text p {
  font-size: 15px;
  line-height: 1.9;
  color: #555;
  margin-bottom: 12px;
}

.legal-text ul, .legal-text ol {
  margin: 12px 0 20px 24px;
  font-size: 15px;
  line-height: 1.9;
  color: #555;
}

.legal-text li {
  margin-bottom: 4px;
}

.legal-text .effective-date {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-gray);
  font-weight: 600;
  margin-bottom: 32px;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 48px auto 0;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #eee;
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-white);
}

.timeline-year {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.team-card {
  text-align: center;
  padding: 32px 16px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  color: #fff;
  font-weight: 800;
}

.team-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 4px;
}

.team-role {
  font-size: 13px;
  color: var(--text-gray);
  font-weight: 500;
}

/* --- News List (Full page) --- */
.news-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.news-list-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.news-list-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  border-color: transparent;
}

.news-list-thumb {
  width: 120px;
  height: 90px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.news-list-body {
  flex: 1;
}

.news-list-body time {
  font-size: 13px;
  color: var(--text-gray);
}

.news-list-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 6px 0;
  line-height: 1.4;
  color: var(--text-black);
}

.news-list-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* --- Job Cards --- */
.job-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.job-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.job-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(10, 207, 131, 0.08);
}

.job-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.job-badge.engineering {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
}

.job-badge.design {
  background: rgba(10, 207, 131, 0.1);
  color: var(--primary-dark);
}

.job-badge.business {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.job-badge.marketing {
  background: rgba(168, 85, 247, 0.1);
  color: #A855F7;
}

.job-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-black);
}

.job-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
}

.job-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-gray);
}

/* --- Benefits --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.benefit-card {
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  text-align: center;
}

.benefit-card .icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.benefit-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-black);
}

.benefit-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* --- Code Cards (NearCode) --- */
.code-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.code-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.code-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.08);
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.code-card-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-black);
}

.code-card-count {
  font-size: 12px;
  color: var(--text-gray);
}

.code-card-code {
  display: block;
  padding: 12px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--accent-blue);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.code-card-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* --- Partner Grid (NearDeal) --- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.partner-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  text-align: center;
  transition: all var(--transition);
}

.partner-card:hover {
  border-color: var(--accent-amber);
}

.partner-card .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.partner-card h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-black);
}

.partner-card p {
  font-size: 12px;
  color: var(--text-gray);
}

/* --- Demo Page Styles --- */
.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-light);
  border-bottom: 1px solid #eee;
}

.demo-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-black);
}

.demo-location .pin {
  color: var(--primary);
}

.demo-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-light);
  border-bottom: 2px solid #eee;
  overflow-x: auto;
}

.demo-tab {
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-gray);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  font-family: inherit;
  transition: color var(--transition);
}

.demo-tab:hover {
  color: var(--text-black);
}

.demo-tab.active {
  color: var(--primary-dark);
}

.demo-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.demo-section {
  display: none;
  padding: 40px 0;
}

.demo-section.active {
  display: block;
}

/* Swap Items */
.swap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.swap-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.swap-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.swap-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}

.swap-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 4px;
}

.swap-info .swap-user {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 6px;
}

.swap-info .swap-want {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
}

.swap-info .swap-distance {
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 4px;
}

/* Deal Items */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.deal-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.deal-card:hover {
  border-color: var(--accent-amber);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.deal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.deal-store {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deal-store-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.deal-store-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-black);
}

.deal-store-dist {
  font-size: 12px;
  color: var(--text-gray);
}

.deal-discount {
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  font-size: 14px;
  font-weight: 700;
}

.deal-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.deal-time {
  font-size: 12px;
  color: #E53E3E;
  font-weight: 600;
}

/* Code Share Items */
.share-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.share-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eee;
  transition: all var(--transition);
}

.share-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.share-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.share-platform {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-black);
}

.share-reward {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
}

.share-code {
  display: block;
  padding: 10px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--accent-blue);
  margin-bottom: 10px;
}

.share-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-gray);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-gray);
}

.breadcrumb a {
  color: var(--text-gray);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 8px;
  color: #ddd;
}

/* --- Back to home link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  transition: all var(--transition);
}

.back-link:hover {
  gap: 12px;
}

/* --- Responsive for sub pages --- */
@media (max-width: 1024px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .feature-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .swap-grid,
  .deal-grid,
  .share-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 30vh;
    padding-top: 64px;
  }

  .page-body {
    padding: 48px 0;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .news-list {
    grid-template-columns: 1fr;
  }

  .news-list-card {
    flex-direction: column;
  }

  .news-list-thumb {
    width: 100%;
    height: 140px;
  }

  .job-grid {
    grid-template-columns: 1fr;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

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

  .demo-tab {
    padding: 14px 20px;
    font-size: 14px;
  }
}

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

  .partner-grid {
    grid-template-columns: 1fr;
  }
}
