/* frontend/public/style.css */
body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  background: white;
  color: #333;
  overflow-x: auto; /* allow horizontal scroll */
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  background: white;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 10;
  min-width: 1200px; /* fix header width to match hero */
}

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

.logo {
  height: 36px;
}

.search-bar {
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid #ccc;
  width: 300px;
  font-size: 14px;
}

.nav-menu {
  flex-grow: 1;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 10px;
  color: #666;
  flex-wrap: wrap;
}

.nav-menu a {
  text-decoration: none;
  color: #666;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: #111;
}

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

.btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #00aaff;
  background: white;
  color: #00aaff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn.login {
  background: #00aaff;
  color: white;
}

.btn:hover {
  opacity: 0.9;
}

.currency {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: white;
  font-weight: bold;
  color: #444;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: linear-gradient(90deg, #284c9e, #804b9d);
  color: white;
  gap: 40px;
  min-width: 1200px; /* fix width to preserve layout */
}

.hero-text {
  max-width: 700px;
  flex: 1 1 300px;
}

.hero-text h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-text p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 20px;
  display: inline;
}

.hero-icons {
  display: inline-flex;
  align-items: flex-end; /* adjusted alignment */
  gap: 8px;
  margin-left: 8px;
}

.hero-icons img {
  height: 20px;
  vertical-align: baseline;
  transform: translateY(4px); /* shift icons down slightly */
}

.hero-buttons {
  margin-top: 20px;
}

.primary-btn {
  background: #00aaff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  margin-right: 12px;
  cursor: pointer;
}

.secondary-btn {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.hero-images {
  position: relative;
  width: 500px;
  height: 500px;
  flex-shrink: 0;
}

.avatar {
  position: absolute;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.avatar1 {
  top: 10%;
  left: 5%;
  width: 110px;
  height: 150px;
}
.avatar2 {
  top: -10%;
  left: 30%;
  width: 130px;
  height: 180px;
}
.avatar3 {
  top: 5%;
  left: 60%;
  width: 160px;
  height: 200px;
}
.avatar4 {
  top: 30%;
  left: 30%;
  width: 130px;
  height: 180px;
}
.avatar5 {
  top: 50%;
  left: 65%;
  width: 120px;
  height: 160px;
}
.avatar6 {
  top: 30%;
  left: 95%;
  width: 100px;
  height: 140px;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: center;
  }
  .hero-images {
    width: 100%;
    height: 350px;
    max-width: none;
  }
  .avatar {
    width: 80px !important;
    height: 110px !important;
  }
  .avatar5,
  .avatar6 {
    display: none;
  }
}

/* Featured Tasks */
.featured-section {
  padding: 40px 0; /* 섹션 높이 늘림 */
  background: #fff;
  text-align: left; /* 제목 가운데 정렬 */
}

.featured-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1c2b33;
  margin-bottom: 30px;
  margin-left: 400px; /* ← 이 값으로 살짝 왼쪽 여백 조절 */
}

.task-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* 카드 가운데 정렬 */
}

.task-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  width: 260px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s;
}

.task-card:hover {
  transform: translateY(-4px);
}

.task-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.task-user {
  display: flex;
  align-items: center;
  padding: 10px 12px;
}

.cardavatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 10px;
}

.username {
  font-weight: 600;
  color: #333;
}

.task-desc {
  padding: 0 12px 10px 12px;
  font-size: 14px;
  color: #444;
  height: 50px;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px 14px 12px;
  font-size: 13px;
  color: #666;
}

/* Stats Section */
.stats-section {
  display: flex;
  justify-content: space-around;
  padding: 60px 20px;
  background: linear-gradient(to bottom, #3a5096, #4d5fa3);
  color: white;
  text-align: center;
}
.stat .label {
  font-size: 16px;
  opacity: 0.85;
}
.stat .value {
  font-size: 28px;
  font-weight: 600;
  margin-top: 10px;
}

/* Trusted Section */
.trusted {
  padding: 40px 20px;
}

.trusted h2 {
  margin-left: 400px; /* ← 이 값으로 살짝 왼쪽 여백 조절 */
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #223;
}

.trusted-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.trusted-item {
  width: 160px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  background: #fff;
  transition: transform 0.3s ease; /* 부드러운 확대 */
}

.trusted-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: brightness(50%); /* 이미지 어둡게 */
  opacity: 0.7;
}

.trusted-item:hover {
  transform: scale(1.06);
}

.trusted-item span {
  position: absolute;
  top: 10px;
  left: 12px;
  color: white;
  font-size: 24px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

/* Business Services Section */
.business-services {
  background: linear-gradient(90deg, #324c8b, #5b639f);
  color: white;
  text-align: center;
  padding: 60px 30px;
}

.business-services h2 {
  font-size: 26px;
  margin-bottom: 40px;
  font-weight: 700;
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
}

.service-item i {
  font-size: 32px;
  margin-bottom: 10px;
}

.service-item p {
  font-size: 14px;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: center; /* ← 가운데 정렬로 밀집도 증가 */
  gap: 80px; /* ← 열 사이 간격 조정 (기존보다 작게) */
  padding: 40px 20px;
  background-color: #f9f9f9;
  flex-wrap: wrap;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 160px;
  margin-bottom: 40px;
}

.footer-columns h4 {
  font-size: 14px;
  margin-bottom: 16px;
}

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-columns ul li {
  margin-bottom: 8px;
  font-size: 12px;
}

.social-icons span,
.payment-icons span {
  display: inline-block;
  margin-right: 10px;
  background: #eee;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* 모달 배경 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* 모달 콘텐츠 */
.modal-content {
  position: relative;
  width: 960px;
  height: 600px;
  max-width: 95%;
  margin: 5% auto;
  display: flex;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

/* 왼쪽 영역 */
.modal-left {
  width: 50%;
  background: linear-gradient(to bottom, #3d4db3, #6a42b5);
  color: white;
  padding: 0px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-left h2 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  padding: 0 20px;
}

.modal-left ul {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.modal-left li {
  text-align: left;
  margin-bottom: 20px;
  font-size: 20px;
  padding-left: 20%;
}

.modal-left img {
  width: 85%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* 오른쪽 영역 */
.modal-right {
  width: 50%;
}

.modal-right h2 {
  text-align: center;
  margin-top: 85px;
  margin-bottom: 40px;
  font-size: 28px;
  font-weight: bold;
}

.modal-right input {
  width: 70%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin: 0 auto 12px auto; /* 위 0, 좌우 auto, 아래 12px */
  display: block;
}

.modal-right .forgot {
  display: block;
  padding-left: 70%;
  font-size: 13px;
  margin-top: 20px;
  margin-bottom: 25px;
  color: #269;
}

.login-btn {
  width: 60%;
  padding: 12px;
  background: #29a4e0;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 18px;
  margin-bottom: 20px;
  margin: 0 auto 12px auto; /* 위 0, 좌우 auto, 아래 12px */
  display: block;
}

.login-etn {
  background: #002841;
  color: white;
  padding: 12px;
  width: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: bold;
  border: none;
}

.signup {
  margin-top: 60px;
  text-align: center;
  font-size: 16px;
  color: #444;
}

.signup-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 28px;
  background-color: #f5821f;
  color: white;
  border-radius: 24px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.signup-btn:hover {
  background-color: #e07010;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
}

#user-profile {
  position: relative;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

#user-profile {
  position: relative;
  display: inline-block;
  cursor: pointer;
  font-weight: 600;
  color: #333;
  user-select: none;
}

#user-name {
  font-weight: 600;
  color: #333;
  padding: 8px 12px;
}

/* 드롭다운 메뉴 */
.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* hover 시 메뉴 표시 */
#user-profile:hover .profile-menu {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 드롭다운 항목 */
.profile-menu a {
  width: 100%;
  padding: 12px 18px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  background-color: #fff;
  transition: background 0.2s ease;
  text-align: center;
}

/* 첫 번째 항목 (상단만 둥글게) */
.profile-menu a:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* 마지막 항목 (하단만 둥글게) */
.profile-menu a:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.profile-menu a:hover {
  background-color: #f0f2f5;
}

/* 강조용 (원하는 경우에만 클래스에 적용) */
.profile-menu-link {
  color: #111;
  background-color: #f2f2f2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: grid;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/*사용자 프로필 컨테이너*/
.profile-menu-link:hover {
  background-color: #111;
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*dashboard page*/
#dash-body {
  background-color: #fafdff;
  color: #f0f0f0; /* 기본 텍스트도 밝게 */
}

/* ========== HEADER ========== */
.dash-header {
  display: flex;
  justify-content: space-between;
  background: #fff;
  color: black;
  padding: 12px 24px;
  align-items: center;
}

.dash-header-right {
  margin-right: 40px;
}

.dash-logo {
  height: 36px;
}

.dash-nav-menu a {
  margin: 0 14px;
  color: black;
  text-decoration: none;
  font-weight: 500;
}

.dash-nav-menu a:hover {
  text-decoration: underline;
}

/* ========== MAIN ========== */
.dash-main {
  padding: 40px 20px;
  max-width: 900px;
  margin: auto;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background-color: #ffffff;
}

/* ========== WELCOME BOX ========== */
.dash-welcome-box {
  background-color: #003c66; /* 진한 남색 */
  color: #f0f0f0;
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 50px;
}

.dash-welcome-box h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.dash-welcome-box p {
  font-size: 16px;
  margin-bottom: 20px;
}

/* 사용자 이름 텍스트 */
#dash-user-name {
  font-weight: 600;
  color: #fff;
  padding: 8px 12px;
}

#create-task-btn {
  background-color: #66ccff;
  color: white;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#create-task-btn:hover {
  background-color: #33bbff;
}

/* ========== TASK FORM (MODAL CONTENT) ========== */
.dash-task-form {
  width: 100%;
  max-width: 100%;
  background-color: #f0f8ff;
  padding: 32px 40px;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 128, 255, 0.15);
  color: #0b3d91;
}

.dash-task-form h3 {
  font-size: 30px;
  margin-bottom: 45px;
  text-align: center;
  color: #064789;
}

.dash-task-form label {
  font-weight: 600;
  font-size: 16px;
  text-align: left;
  margin-bottom: 15px;
  display: block;
}

.dash-task-form input[type="text"],
.dash-task-form textarea {
  width: 100%;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #a7d3f4;
  background-color: #fff;
  box-sizing: border-box;
  transition: 0.2s ease;
}

.dash-task-form textarea {
  resize: none; /* ← 크기 조절 막기 */
  min-height: 120px;
  max-height: 120px;
}

.dash-task-form input:focus,
.dash-task-form textarea:focus {
  border-color: #00aaff;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.2);
  outline: none;
}

.dash-btn-submit {
  background-color: #00bfff;
  color: white;
  font-size: 15px;
  font-weight: bold;
  padding: 12px 0;
  margin-top: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease;
}

.dash-btn-submit:hover {
  background-color: #009edb;
}

#taskMessage {
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
  color: #0077b6;
}

/* ========== TASK LIST ========== */
#taskList {
  max-width: 700px;
  margin: 0 auto;
}

#taskList h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #0b3d91;
}

#taskItems {
  padding-left: 0;
}

#taskItems li {
  background-color: #f0f8ff;
  padding: 14px 20px;
  margin-bottom: 12px;
  border-radius: 12px;
  list-style: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 15px;
  color: #333;
  word-break: break-word;
}

#dash-admin-panel h3 {
  color: #005fa3; /* 중간 톤 블루 */
}

.admin-data-box {
  background-color: #f4f8ff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px;
  margin-top: 15px;
  color: #222;
}

#admin-result {
  margin-top: 10px;
  font-family: "Courier New", monospace;
  background-color: #f5fbff;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #d0d4d7;
  white-space: pre-wrap;
  color: #222;
}
