:root {
  --primary-color: #0056b3;
  --secondary-color: #e9ecef;
  --text-color: #333;
  --light-text-color: #666;
  --white-color: #fff;
  --dark-color: #222;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--white-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  color: var(--dark-color);
  margin-bottom: 15px;
}

p {
  margin-bottom: 15px;
}

/* 헤더 */
header {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 20px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
}

header h1 a {
  color: var(--white-color);
  font-size: 28px;
  font-weight: bold;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

header nav ul li {
  margin-left: 30px;
}

header nav ul li a {
  color: var(--white-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

header nav ul li a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* 히어로 섹션 */
.hero-section {
  position: relative;
  height: 100vh;
  background-image: url('./1752474146306.png'); /* 여기에 실제 이미지 URL 또는 로컬 경로를 입력하세요 */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white; /* 기본 텍스트 색상을 흰색으로 설정 */
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-logo {
  font-size: 5.5rem; /* 사이즈 더 키움 */
  font-weight: 900;
  margin-bottom: 15px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.7);
  color: white; /* 흰색으로 명확히 지정 */
}

.hero-subtitle {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white; /* 흰색으로 명확히 지정 */
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.hero-content .btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.hero-content .btn:hover {
  background-color: #004085;
}

/* 일반 섹션 스타일 */
section {
  padding: 30px 0; /* 각 섹션의 상하 패딩을 30px로 설정 */
  text-align: center;
}

section:nth-of-type(even) {
  background-color: var(--secondary-color);
}

section h3 {
  font-size: 36px;
  margin-bottom: 40px;
}

/* 서비스 섹션 */
.service-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 15px;
  margin-top: 40px;
  justify-content: center;
}

.service-item {
  background-color: var(--white-color);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  min-width: 190px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-item:hover {
  transform: translateY(-5px);
}

.service-item h4 {
  color: var(--primary-color);
  font-size: 22px;
  margin-bottom: 10px;
}

.service-item .service-icon {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-bottom: 15px;
  border-radius: 5px;
  object-fit: cover;
}

.service-item p {
  color: var(--light-text-color);
  font-size: 15px;
}

/* 포트폴리오 섹션 공통 스타일 */
.portfolio-section .container {
  overflow: hidden;
}

.portfolio-item {
  background-color: var(--white-color);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

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

.portfolio-item h4 {
  font-size: 22px;
  margin: 15px 15px 5px;
}

.portfolio-item p {
  color: var(--light-text-color);
  font-size: 15px;
  margin: 0 15px 15px;
}

/* 슬라이더 관련 스타일 (index.html 전용) */
.slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 40px;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 30px;
}

.slider-track .portfolio-item {
  flex-shrink: 0;
  width: calc(33.333% - 20px);
}

.slider-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}

.slider-controls button {
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  pointer-events: auto;
  transition: background-color 0.3s ease;
}

.slider-controls button:hover {
  background-color: rgba(0,0,0,0.7);
}

.slider-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 포트폴리오 전체 보기 그리드 (portfolio.html 전용) */
.portfolio-grid-all {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.portfolio-grid-all .portfolio-item {
  width: 100%;
}


/* 의뢰 진행 상황 섹션 */
.inquiry-progress-section {
  background-color: var(--secondary-color);
}

.table-responsive {
  overflow-x: auto;
  margin-top: 40px;
  position: relative; /* 로딩 스피너를 위한 relative 설정 */
}

.inquiry-progress-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background-color: var(--white-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
}

.inquiry-progress-section th,
.inquiry-progress-section td {
  padding: 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.inquiry-progress-section th {
  background-color: var(--primary-color);
  color: var(--white-color);
  font-weight: bold;
  white-space: nowrap;
}

.inquiry-progress-section tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.inquiry-progress-section tbody tr:hover {
  background-color: #f1f1f1;
}

/* 페이지네이션 컨트롤 스타일 */
.pagination-controls {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 10px;
}

.pagination-controls button {
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.pagination-controls button:hover:not(:disabled) {
  background-color: #004085;
}

.pagination-controls button.active {
  background-color: #003d80;
  border: 1px solid #002a5c;
  font-weight: bold;
}

.pagination-controls button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}


/* 문의 섹션 */
.contact-section form {
  max-width: 600px;
  margin: 40px auto 0;
  background-color: var(--white-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: left;
}

/* 이름, 이메일, 연락처, 프로젝트명 필드 간격 줄이기 */
.contact-section form input[type='text'],
.contact-section form input[type='email'],
.contact-section form input[type='tel'] {
  width: calc(100% - 20px);
  padding: 12px 10px;
  margin-bottom: 10px; /* 기존 20px에서 10px로 줄임 */
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

/* 필드 유효성 검사 오류 스타일 */
.contact-section form input.invalid,
.contact-section form textarea.invalid {
    border-color: red;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
}


/* 폼 그룹 및 체크박스 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column; /* 세로 방향으로 아이템 정렬 */
    gap: 5px; /* 세로 간격 */
}

.checkbox-item {
    display: flex; /* 체크박스와 레이블을 가로로 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    gap: 5px; /* 체크박스와 텍스트 사이 간격 */
}

.checkbox-group input[type="checkbox"] {
    vertical-align: middle;
}

.checkbox-group label {
    display: inline-block;
    font-weight: normal;
    margin-bottom: 0;
    color: var(--text-color);
    cursor: pointer;
}

/* 파일 첨부 섹션 스타일 */
.file-upload-group {
    text-align: left;
    margin-bottom: 20px;
}

.file-upload-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color) !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    margin-bottom: 10px;
}

.file-upload-button:hover {
    background-color: #004085;
}

.file-list-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    min-height: 40px;
    background-color: #f9f9f9;
    margin-bottom: 10px;
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
    margin: 5px 0;
}

.file-info-item .remove-file {
    color: #dc3545;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

.file-info-item .remove-file:hover {
    text-decoration: underline;
}

.file-info-note {
    font-size: 13px;
    color: var(--light-text-color);
    text-align: left;
    margin-top: 5px;
}


.contact-section form textarea {
  width: calc(100% - 20px);
  resize: vertical;
  margin-bottom: 20px;
}

.contact-section form .btn {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  text-align: center;
}

/* 로딩 스피너 및 오버레이 (버튼 내 스피너 포함) */
.loading-spinner {
  display: inline-block;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid var(--white-color);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 99;
}

.loading-overlay .spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
}

.loading-overlay p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: bold;
}


/* 폼 제출 피드백 메시지 */
.form-feedback-message {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.form-feedback-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-feedback-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* 회사 정보 섹션 */
.company-info-section {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 50px 0;
  text-align: center;
}

.company-info-section h4 {
  color: var(--white-color);
  margin-bottom: 20px;
  font-size: 24px;
}

.company-info-section p {
  color: var(--white-color);
  margin-bottom: 10px;
  font-size: 16px;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  gap: 40px;
}

.info-left,
.info-right {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  text-align: left;
}

.info-right {
  text-align: right;
}

/* 푸터 */
footer {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 30px 0;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* 포트폴리오 라이트박스 스타일 */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.lightbox-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  max-width: 90%;
  max-height: 90%;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  object-fit: contain;
  margin-bottom: 15px;
}

.lightbox-content h4 {
  font-size: 28px;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.lightbox-content p {
  font-size: 18px;
  color: var(--text-color);
  margin-bottom: 0;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #aaa;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
  color: #333;
}


/* 관리자 페이지에 필요한 추가 스타일 */
#admin-inquiry-table-section {
    padding: 50px 0;
    text-align: center;
    background-color: var(--white-color);
}
#admin-inquiry-table-section h3 {
    margin-bottom: 20px;
}
#admin-inquiry-table-section p {
    margin-bottom: 30px;
    color: var(--light-text-color);
}
#admin-inquiry-table-section .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    margin-top: 30px;
    position: relative;
    min-width: 1000px;
}
#admin-inquiry-table-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background-color: var(--white-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

#admin-inquiry-table-section th,
#admin-inquiry-table-section td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
/* 각 컬럼 너비 지정 (예시, 필요에 따라 조정) */
#admin-inquiry-table-section th:nth-child(1), /* ID */
#admin-inquiry-table-section td:nth-child(1) {
    width: 5%;
}
#admin-inquiry-table-section th:nth-child(2), /* 이름 */
#admin-inquiry-table-section td:nth-child(2) {
    width: 8%;
}
#admin-inquiry-table-section th:nth-child(3), /* 이메일 */
#admin-inquiry-table-section td:nth-child(3) {
    width: 12%;
}
#admin-inquiry-table-section th:nth-child(4), /* 연락처 */
#admin-inquiry-table-section td:nth-child(4) {
    width: 10%;
}
#admin-inquiry-table-section th:nth-child(5), /* 프로젝트명 */
#admin-inquiry-table-section td:nth-child(5) {
    width: 12%;
}
#admin-inquiry-table-section th:nth-child(6), /* 의뢰 분야 */
#admin-inquiry-table-section td:nth-child(6) {
    width: 10%;
}
#admin-inquiry-table-section th:nth-child(7), /* 요구사항 */
#admin-inquiry-table-section td:nth-child(7) {
    width: 18%; /* 요구사항 컬럼 너비 충분히 확보 */
    white-space: normal; /* 요구사항은 줄바꿈 허용 */
}
#admin-inquiry-table-section th:nth-child(8), /* 파일 정보 */
#admin-inquiry-table-section td:nth-child(8) {
    width: 10%;
}
#admin-inquiry-table-section th:nth-child(9), /* 진행 상태 */
#admin-inquiry-table-section td:nth-child(9) {
    width: 8%;
}
#admin-inquiry-table-section th:nth-child(10), /* 접수일 */
#admin-inquiry-table-section td:nth-child(10) {
    width: 8%;
}
#admin-inquiry-table-section th:nth-child(11), /* 최근 업데이트 */
#admin-inquiry-table-section td:nth-child(11) {
    width: 8%;
}
#admin-inquiry-table-section th:nth-child(12), /* 삭제 */
#admin-inquiry-table-section td:nth-child(12) {
    width: 7%; /* 삭제 버튼 컬럼 너비 */
}


#admin-inquiry-table-section tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
#admin-inquiry-table-section tbody tr:hover {
    background-color: #f1f1f1;
}

/* 관리자 상세 보기 모달 스타일 */
.admin-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.admin-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: left;
}

.admin-modal-content h4 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 26px;
    color: var(--dark-color);
}

.admin-modal-item {
    margin-bottom: 15px;
    line-height: 1.5;
}
.admin-modal-item strong {
    color: var(--primary-color);
    margin-right: 10px;
    display: inline-block;
    min-width: 80px;
}

.admin-modal-message-box {
    background-color: #f2f2f2;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    min-height: 80px;
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 10px;
    color: var(--text-color);
}

.admin-modal-files-list {
    margin-top: 10px;
    padding-left: 0;
    list-style: none;
}
.admin-modal-files-list li {
    font-size: 14px;
    margin-bottom: 5px;
}
.admin-modal-files-list li a {
    color: var(--primary-color);
    text-decoration: underline;
}

.admin-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.admin-modal-close-btn:hover {
    color: #333;
}

/* 삭제 버튼 스타일 */
.delete-btn {
  background-color: #dc3545; /* 빨간색 */
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.delete-btn:hover {
  background-color: #c82333; /* 더 진한 빨간색 */
}


@media (max-width: 768px) {
  #admin-inquiry-table-section {
    padding: 20px 0;
  }
  #admin-inquiry-table-section table,
  #admin-inquiry-table-section thead,
  #admin-inquiry-table-section tbody,
  #admin-inquiry-table-section th,
  #admin-inquiry-table-section td,
  #admin-inquiry-table-section tr {
    display: block;
  }
  #admin-inquiry-table-section thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  #admin-inquiry-table-section tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
  }
  #admin-inquiry-table-section td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }
  #admin-inquiry-table-section td:before {
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    text-align: left;
    content: attr(data-label);
  }
  #admin-inquiry-table-section td:nth-of-type(3):before { /* 의뢰 분야 */
    content: "의뢰 분야";
  }
  #admin-inquiry-table-section td:nth-of-type(5):before { /* 프로젝트명 (5번째 셀이므로) */
    content: "프로젝트명";
  }
  #admin-inquiry-table-section td:nth-of-type(6):before { /* 의뢰 분야 (6번째 셀이므로) */
    content: "의뢰 분야";
  }
  #admin-inquiry-table-section td:nth-of-type(7):before { /* 요구사항 (7번째 셀이므로) */
    content: "요구사항";
  }
  #admin-inquiry-table-section td:nth-of-type(8):before { /* 파일 정보 (8번째 셀이므로) */
    content: "파일 정보";
  }
  #admin-inquiry-table-section td:nth-of-type(9):before { /* 진행 상태 (9번째 셀이므로) */
    content: "진행 상태";
  }
  #admin-inquiry-table-section td:nth-of-type(10):before { /* 접수일 (10번째 셀이므로) */
    content: "접수일";
  }
  #admin-inquiry-table-section td:nth-of-type(11):before { /* 최근 업데이트 (11번째 셀이므로) */
    content: "최근 업데이트";
  }
  #admin-inquiry-table-section td:nth-of-type(12):before { /* 삭제 (12번째 셀이므로) */
    content: "삭제";
  }

  .admin-modal-content {
      padding: 20px;
      width: 95%;
  }
  .admin-modal-item strong {
      min-width: 60px;
  }
}