/* Aethera 브랜드 색상 - 세련된 디자인 */
:root {
  --aethera-primary: #667eea;
  --aethera-primary-dark: #764ba2;
  --aethera-accent: #10b981;
  --aethera-text-primary: #1a1a1a;
  --aethera-text-secondary: #4a5568;
  --aethera-border: #e2e8f0;
  --aethera-bg-light: #f8f9fa;
  --aethera-white: #ffffff;
  --aethera-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --aethera-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --aethera-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
  --aethera-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* 전체 레이아웃 */
* {
  font-family: 'Inter', 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin: 0;
  padding: 0;
}

.marketplace-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 60px; /* 상단 패딩 제거 (body padding-top 사용) */
}

/* 히어로 섹션 */
.hero-section {
  text-align: center;
  margin-bottom: 16px;
  margin-top: 0; /* 최소화 */
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--aethera-text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
  letter-spacing: -0.2px;
}

/* 광고 배너 섹션 */
.ad-banner-section {
  margin: 0 0 5px 0; /* 상단 마진 제거 */
  width: 100%;
}

.ad-banner-container {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.ad-banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
}

.ad-banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: #6b7280;
  min-height: 200px;
}

.ad-banner-placeholder p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.ad-dimensions {
  font-size: 0.875rem;
  color: #9ca3af;
}

/* 검색 및 필터 바 */
.search-filter-bar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

.search-main {
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 400;
  transition: all 0.2s;
  background: #ffffff;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
  padding: 12px 28px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.search-btn:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.search-btn:active {
  transform: translateY(0);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

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

.filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.filter-select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select:hover {
  border-color: #9ca3af;
}

/* 추천 파트너 섹션 */
.featured-section {
  margin-bottom: 32px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Spoqa Han Sans Neo', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  font-size: 1.25rem; /* 20px */
  font-weight: 700;
  color: var(--aethera-text-primary);
  margin-top: 5px;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.title-icon {
  font-size: 1.75rem;
}

.banner-slider {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--aethera-shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: 320px;
  background: white;
}

.banner-item {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  cursor: pointer;
}

.banner-item.active {
  opacity: 1;
  z-index: 1;
}

.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 8px 40px 100px;
  gap: 32px;
  background: linear-gradient(135deg, #667eea22 0%, #764ba222 100%);
}

.banner-content.placeholder-banner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
  padding-top: 18px;
  gap: 12px;
}

.placeholder-banner h3 {
  font-size: 2rem;
  color: var(--aethera-primary);
  margin: 12px 0 12px;
}

.placeholder-banner p {
  font-size: 1.1rem;
  color: var(--aethera-text-secondary);
  margin-bottom: 18px;
  max-width: 600px;
}

.banner-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}

.banner-logo {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--aethera-primary);
}

.banner-company-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--aethera-text-primary);
  margin: 0;
}

.banner-tagline {
  font-size: 1.1rem;
  color: var(--aethera-text-secondary);
  margin: 0;
}

.banner-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.service-tag {
  padding: 8px 16px;
  background: white;
  border: 2px solid var(--aethera-border);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--aethera-text-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.banner-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.contact-item {
  font-size: 0.95rem;
  color: var(--aethera-text-secondary);
  font-weight: 500;
}

.banner-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.banner-badge {
  padding: 8px 20px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.banner-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--aethera-text-secondary);
  margin: 0;
}

.banner-description strong {
  color: var(--aethera-primary);
  font-weight: 700;
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
}

.banner-cta {
  padding: 14px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  margin-top: 8px;
}

.banner-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.banner-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  padding: 1.25px 20px; /* 현재 2.5px의 1/2 */
  border-radius: 3.75px; /* 현재 7.5px의 1/2 */
  z-index: 5;
}

.banner-controls button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 8px;
  transition: all 0.3s;
}

.banner-controls button:hover {
  color: var(--aethera-accent);
  transform: scale(1.2);
}

.banner-indicators {
  display: flex;
  gap: 8px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.indicator.active {
  background: white;
  width: 24px;
  height: 10px; /* 원래대로 복구 */
  border-radius: 5px; /* 원래대로 복구 */
}

/* 업체 리스트 섹션 */
.companies-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.result-count {
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 500;
}

.result-count span {
  font-weight: 700;
  color: #667eea;
}

.view-options {
  display: flex;
  gap: 4px;
  background: white;
  padding: 4px;
  border-radius: 8px;
  box-shadow: var(--aethera-shadow);
}

.view-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--aethera-text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.view-btn:hover {
  background: var(--aethera-bg-light);
  color: var(--aethera-primary);
}

.view-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 업체 그리드 */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* 업체 카드 */
.company-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.company-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.company-image {
  width: 100%;
  height: 140px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #e5e7eb;
}

.company-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.company-info {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.company-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #667eea;
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
  width: fit-content;
}

.company-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  line-height: 1.4;
}

.company-location {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.company-description {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.company-stats {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 12px;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

.company-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: auto;
}

.company-verified {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--aethera-accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.view-profile-btn {
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.view-profile-btn:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.view-profile-btn:active {
  transform: translateY(0);
}

/* 더 보기 버튼 */
.load-more-container {
  text-align: center;
  margin-top: 32px;
}

.load-more-btn {
  padding: 12px 32px;
  background: #ffffff;
  border: 1px solid #667eea;
  color: #667eea;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.load-more-btn:active {
  transform: translateY(0);
}

/* 리스트 뷰 */
.companies-grid.list-view {
  grid-template-columns: 1fr;
}

.companies-grid.list-view .company-card {
  display: flex;
}

.companies-grid.list-view .company-image {
  width: 240px;
  height: auto;
  flex-shrink: 0;
}

.companies-grid.list-view .company-info {
  flex: 1;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .marketplace-container {
    padding: 0 16px 24px; /* 상단 패딩 제거 */
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .ad-banner-section {
    margin: 0 0 5px 0; /* 상단 마진 제거 */
  }

  .ad-banner-container {
    min-height: 150px;
  }

  .ad-banner-placeholder {
    min-height: 150px;
    padding: 24px;
  }

  .ad-banner-placeholder p {
    font-size: 0.95rem;
  }

  .search-filter-bar {
    padding: 16px;
  }

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

  .search-box {
    flex: 1;
  }

  .companies-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .view-options {
    width: 100%;
    justify-content: space-between;
  }

  .view-btn {
    flex: 1;
  }

  .section-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  .marketplace-container {
    padding: 0 12px 20px; /* 상단 패딩 제거 */
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .ad-banner-section {
    margin: 0 0 5px 0; /* 상단 마진 제거 */
  }

  .ad-banner-container {
    min-height: 120px;
  }

  .ad-banner-placeholder {
    min-height: 120px;
    padding: 20px;
  }

  .ad-banner-placeholder p {
    font-size: 0.875rem;
  }

  .ad-dimensions {
    font-size: 0.75rem;
  }

  .search-filter-bar {
    padding: 12px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .search-input {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .search-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .companies-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .companies-grid.list-view .company-card {
    flex-direction: column;
  }

  .companies-grid.list-view .company-image {
    width: 100%;
    height: 200px;
  }

  .company-card {
    border-radius: 12px;
  }

  .company-info {
    padding: 16px;
  }

  .company-name {
    font-size: 1.125rem;
  }

  .company-description {
    font-size: 0.813rem;
  }

  .company-stats {
    gap: 12px;
    padding: 12px;
  }

  .stat-value {
    font-size: 1.125rem;
  }

  .stat-label {
    font-size: 0.688rem;
  }

  .banner-controls {
    display: none;
  }

  .section-title {
    font-size: 1.125rem;
  }

  .load-more-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

