/* Directory Page Specific Styles */

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .header-top .nav {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none;
  }
}

/* Dark Mode Styles */
[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --border-color: #333333;
  --card-bg: #2d2d2d;
  --input-bg: #3a3a3a;
  --hover-bg: #404040;
}

[data-theme="dark"] body {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
}

[data-theme="dark"] html {
  background-color: var(--bg-color) !important;
}

[data-theme="dark"] .search-filters {
  background: var(--bg-color);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .search-container {
  background: var(--card-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-input {
  background: var(--input-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .search-input::placeholder {
  color: #999;
}

[data-theme="dark"] .filter-chips {
  background: var(--bg-color);
}

[data-theme="dark"] .filter-chip {
  background: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .filter-chip:hover,
[data-theme="dark"] .filter-chip.active {
  background: var(--hover-bg);
  color: var(--text-color);
}

[data-theme="dark"] .filter-select {
  background: var(--input-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .toggle-switch {
  background: var(--border-color);
}

[data-theme="dark"] .toggle-switch.active {
  background: #2ec4b6;
}

[data-theme="dark"] .business-card {
  background: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

[data-theme="dark"] .business-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .business-card h3 {
  color: var(--text-color);
}

[data-theme="dark"] .business-card p {
  color: var(--text-color);
  opacity: 0.8;
}

[data-theme="dark"] .business-rating {
  color: #ffd700;
}

[data-theme="dark"] .business-address {
  color: var(--text-color);
  opacity: 0.7;
}

[data-theme="dark"] .business-phone {
  color: var(--text-color);
  opacity: 0.7;
}

[data-theme="dark"] .sidebar {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .sidebar h3 {
  color: var(--text-color);
}

[data-theme="dark"] .sidebar p {
  color: var(--text-color);
  opacity: 0.8;
}

[data-theme="dark"] .map-cta {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .map-cta h3 {
  color: var(--text-color);
}

[data-theme="dark"] .map-cta p {
  color: var(--text-color);
  opacity: 0.8;
}

[data-theme="dark"] .pagination {
  background: var(--bg-color);
}

[data-theme="dark"] .pagination button {
  background: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .pagination button:hover {
  background: var(--hover-bg);
}

[data-theme="dark"] .pagination button.active {
  background: #2ec4b6;
  color: white;
}

[data-theme="dark"] .pagination button:disabled {
  background: var(--border-color);
  color: #666;
  cursor: not-allowed;
}

/* Search & Filters Section */
.search-filters {
  background: #f8f9fa;
  padding: 2rem 0;
  border-bottom: 1px solid #e9ecef;
}

.search-section {
  margin-bottom: 2rem;
}

.search-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #333;
}

.search-input::placeholder {
  color: #999;
}

.search-btn {
  background: #2ec4b6;
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: #26a69a;
}

.filters-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-group h4 {
  color: #1e4da1;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  background: #e9ecef;
  color: #666;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-chip.active,
.filter-chip:hover {
  background: #2ec4b6;
  color: white;
}

.dropdown-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-dropdown {
  padding: 0.5rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #2ec4b6;
}

.toggle-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #666;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 40px;
  height: 20px;
  background: #e9ecef;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: #2ec4b6;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Main Content Layout */
.main-content {
  padding: 2rem 0;
  min-height: 60vh;
}

.content-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h4 {
  color: #1e4da1;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.checkbox-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #666;
  padding: 0.25rem 0;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2ec4b6;
}

.recommended-business {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.recommended-business:hover {
  background: #e9ecef;
}

.recommended-business img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.recommended-info h5 {
  color: #1e4da1;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.recommended-info p {
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.rating {
  color: #ffc107;
  font-size: 0.8rem;
}

/* Business List */
.business-list {
  min-height: 500px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.list-header h2 {
  color: #1e4da1;
  font-size: 1.5rem;
  font-weight: 700;
}

.result-count {
  color: #666;
  font-size: 0.9rem;
}

.business-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.business-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.business-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.business-thumbnail {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

.business-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.business-info {
  flex: 1;
}

.business-name {
  color: #1e4da1;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.business-name-en {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.business-category {
  color: #2ec4b6;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.business-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.rating-stars {
  color: #ffc107;
  font-size: 0.9rem;
}

.rating-text {
  color: #666;
  font-size: 0.8rem;
}

.business-address {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.business-phone {
  color: #666;
  font-size: 0.8rem;
}

.business-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-btn {
  background: #2ec4b6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.action-btn:hover {
  background: #26a69a;
}

.action-btn.secondary {
  background: #e9ecef;
  color: #666;
}

.action-btn.secondary:hover {
  background: #dee2e6;
}

.load-more {
  text-align: center;
  margin-top: 3rem;
}

.load-more-btn {
  background: #1e4da1;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.load-more-btn:hover {
  background: #153a7a;
}

/* Header and Footer full width */
.header,
.footer {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

[data-theme="dark"] .header,
[data-theme="dark"] .footer {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Map CTA Button */
.map-cta-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e4da1;
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(30, 77, 161, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  /* margin-right 제거 - 원래 위치로 */
}

.map-cta-btn:hover {
  background: #153a7a;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(30, 77, 161, 0.4);
}

.map-icon {
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sidebar {
    order: 2;
    padding: 1rem;
  }

  .business-list {
    order: 1;
  }

  .business-card {
    grid-template-columns: 100px 1fr auto;
    gap: 1rem;
    padding: 1rem;
  }

  .business-thumbnail {
    width: 100px;
    height: 75px;
  }
}

@media (max-width: 768px) {
  .search-filters {
    padding: 1rem 0;
  }

  .filters-section {
    gap: 1rem;
  }

  .category-chips {
    gap: 0.25rem;
  }

  .filter-chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .dropdown-filters {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-dropdown {
    width: 100%;
  }

  .business-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }

  .business-thumbnail {
    width: 100%;
    height: 150px;
    margin: 0 auto;
  }

  .business-actions {
    flex-direction: row;
    justify-content: center;
  }

  .action-btn {
    flex: 1;
    max-width: 120px;
  }

  .map-cta-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
    /* margin-right 제거 - 원래 위치로 */
  }

  .map-cta-btn span:last-child {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .search-container {
    flex-direction: column;
  }

  .search-btn {
    border-radius: 0 0 16px 16px;
  }

  .business-card {
    padding: 1rem;
  }

  .business-thumbnail {
    height: 120px;
  }

  .map-cta-btn {
    /* margin-right 제거 - 원래 위치로 */
  }

  .business-actions {
    flex-direction: column;
  }

  .action-btn {
    max-width: none;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Filter States */
.filter-chip.active {
  background: #2ec4b6;
  color: white;
}

.checkbox-label input[type="checkbox"]:checked + span {
  color: #2ec4b6;
  font-weight: 600;
}

/* Business Status Indicators */
.business-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.business-status.open {
  background: #d4edda;
  color: #155724;
}

.business-status.closed {
  background: #f8d7da;
  color: #721c24;
}

.business-status.unknown {
  background: #e2e3e5;
  color: #6c757d;
}
