/* 시설소개 페이지 스타일 */

.facility-wrap {
  width: 100%;
  padding: 40px 20px;
}

.facility-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
}

.facility-header {
  padding: 40px 40px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-align: center;
}

.facility-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.facility-desc {
  font-size: 16px;
  margin: 0;
  opacity: 0.95;
  font-weight: 400;
}

/* 검색 폼 스타일 */
.facility-search-wrap {
  padding: 40px 40px 30px;
  background: #fff;
  border-bottom: 2px solid #f0f2f5;
}

.facility-search-form {
  margin: 0;
}

.search-form-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.search-select {
  flex-shrink: 0;
  padding: 13px 18px;
  font-size: 16px;
  color: #1f2937;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-select:hover {
  border-color: #d1d5db;
  background: #fff;
}

.search-select:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.search-input {
  flex: 1;
  padding: 13px 18px;
  font-size: 16px;
  color: #1f2937;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:hover {
  border-color: #d1d5db;
  background: #fff;
}

.search-input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #0f3d82;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.search-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-btn svg {
  width: 18px;
  height: 18px;
}

.search-reset {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-reset:hover {
  color: #374151;
  border-color: #d1d5db;
  background: #f3f4f6;
}

.search-reset svg {
  width: 14px;
  height: 14px;
}

.search-result-info {
  margin-top: 20px;
  padding: 14px 24px;
  text-align: center;
  font-size: 16px;
  color: #4b5563;
  background: #f0f9ff;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
}

.search-keyword {
  font-weight: 700;
  color: #2563eb;
}

.result-count {
  color: #2563eb;
  font-weight: 700;
}

.facility-table-wrap {
  padding: 40px;
  overflow-x: auto;
}

.facility-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.facility-table thead {
  background: #0f3d82;
}

.facility-table thead tr {
  border-bottom: 2px solid #e5e7eb;
}

.facility-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.facility-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

.facility-table th {
  padding: 18px 16px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.facility-table th:last-child {
  border-right: none;
}

.facility-table .th-name {
  width: 19%;
}

.facility-table .th-type {
  width: 15%;
}

.facility-table .th-products {
  width: 25%;
}

.facility-table .th-location {
  width: 25%;
}

.facility-table .th-link {
  width: 10%;
}

.facility-table tbody tr {
  border-bottom: 2px solid #e5e7eb;
  transition: all 0.2s ease;
  background: #fff;
}

.facility-table tbody tr:last-child {
  border-bottom: none;
}

.facility-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.facility-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

.facility-table tbody tr:hover {
  background: #f9fafb;
}

.facility-table tbody tr.odd {
  background: #fff;
}

.facility-table tbody tr.even {
  background: #fafbfc;
}

.facility-table tbody tr.odd:hover,
.facility-table tbody tr.even:hover {
  background: #f3f4f6;
}

.facility-table td {
  padding: 22px 16px;
  font-size: 16px;
  color: #4b5563;
  text-align: center;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
  line-height: 1.6;
}

.facility-table td:last-child {
  border-right: none;
}

.facility-name {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.facility-director {
  font-size: 15px;
  color: #64748b;
  font-weight: 500;
}

.facility-number {
  font-size: 17px;
  font-weight: 600;
  color: #6366f1;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.facility-type {
  font-size: 14px;
  color: #475569;
  font-weight: 600;
  padding: 5px 12px;
  background: #f1f5f9;
  border-radius: 16px;
  display: inline-block;
  margin-top: 4px;
  letter-spacing: -0.01em;
}

.td-products {
  text-align: left !important;
  line-height: 1.8;
}

.td-address {
  text-align: left !important;
  line-height: 1.6;
}

.homepage-link {
  display: inline-block;
  padding: 9px 22px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.01em;
}

.homepage-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.facility-empty {
  padding: 80px 40px;
  text-align: center;
}

.facility-empty p {
  font-size: 18px;
  color: #6b7280;
  margin: 0 0 8px;
}

.facility-empty .empty-sub {
  font-size: 16px;
  color: #9ca3af;
  margin-bottom: 24px;
}

.facility-empty .empty-link {
  display: inline-block;
  padding: 11px 26px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.facility-empty .empty-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* 반응형 스타일 */

/* 태블릿 가로 (1200px 이하) */
@media (max-width: 1200px) {
  .facility-wrap {
    padding: 30px 15px;
  }

  .facility-search-wrap {
    padding: 30px 30px 25px;
  }

  .facility-table-wrap {
    padding: 30px;
  }

  .facility-table .th-name,
  .facility-table .th-type,
  .facility-table .th-products,
  .facility-table .th-location,
  .facility-table .th-link {
    width: auto;
  }

  .facility-table th,
  .facility-table td {
    padding: 16px 12px;
    font-size: 13px;
  }
}

/* 태블릿 세로 (992px 이하) */
@media (max-width: 992px) {
  .facility-wrap {
    padding: 20px 10px;
  }

  .facility-search-wrap {
    padding: 25px 20px 20px;
  }

  .search-form-inner {
    gap: 10px;
  }

  .facility-table-wrap {
    padding: 25px 20px;
  }

  .facility-table th {
    font-size: 11px;
    padding: 14px 10px;
  }

  .facility-table td {
    padding: 16px 10px;
    font-size: 13px;
  }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
  .facility-wrap {
    padding: 0;
  }

  .facility-container {
    width: 100%;
  }

  .facility-header {
    padding: 30px 20px 20px;
  }

  .facility-title {
    font-size: 24px;
  }

  .facility-desc {
    font-size: 14px;
  }

  .facility-search-wrap {
    padding: 20px 16px 16px;
  }

  .search-form-inner {
    flex-direction: column;
    gap: 10px;
  }

  .search-select,
  .search-input,
  .search-btn,
  .search-reset {
    width: 100%;
    justify-content: center;
  }

  .search-result-info {
    margin-top: 16px;
    padding: 12px 18px;
    font-size: 13px;
  }

  .facility-table-wrap {
    padding: 16px;
  }

  .facility-table {
    display: block;
    border: none;
    border-radius: 0;
  }

  .facility-table thead {
    display: none;
  }

  .facility-table tbody {
    display: block;
  }

  .facility-table tbody tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  }

  .facility-table tbody tr.odd {
    background: #fff;
  }

  .facility-table tbody tr.even {
    background: #fafbfc;
  }

  .facility-table tbody tr:hover,
  .facility-table tbody tr.odd:hover,
  .facility-table tbody tr.even:hover {
    background: inherit;
  }

  .facility-table td {
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    text-align: left !important;
    padding: 14px 16px;
  }

  .facility-table td:last-child {
    border-bottom: none;
  }

  .facility-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 12px;
  }

  .td-name::before {
    content: "시설명";
  }

  .td-contact::before {
    content: "연락처";
  }

  .td-products::before {
    content: "생산물";
  }

  .td-address::before {
    content: "소재지";
  }

  .td-homepage::before {
    content: "홈페이지";
  }

  .facility-name {
    display: block;
    margin: 0 0 4px 0;
  }

  .facility-director {
    display: block;
    margin: 0;
    color: #9ca3af;
    font-size: 12px;
  }

  .facility-director::before {
    content: "";
  }

  .facility-director::after {
    content: "";
  }

  .facility-number {
    display: block;
    margin: 0 0 6px 0;
  }

  .facility-type {
    margin: 0;
    display: inline-block;
  }
}

@media print {
  .facility-wrap {
    background: #fff;
    padding: 0;
  }

  .facility-container {
    box-shadow: none;
  }

  .facility-header {
    background: #6366f1;
    color: #fff;
  }

  .facility-table tbody tr:hover {
    background: transparent;
  }

  .homepage-link {
    color: #6366f1 !important;
    background: transparent;
    text-decoration: underline;
    padding: 0;
    box-shadow: none;
  }
}
