/* ========================================================
   Sub Page Common Styles
   - 서브페이지 인덱스 스타일
======================================================== */

/* ════════════════════════════════════════
       ① 금주의 인기글
    ════════════════════════════════════════ */
.hot-section {
  padding: 28px 24px 32px;
  margin-bottom: 20px;
  background: #0e2a5f;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

/* ::after — 심볼 이미지 */
.hot-section::after {
  content: "";
  position: absolute;
  right: -40px;
  top: 80px;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: url("/image/home/print-symbol.png") no-repeat center / contain;
  opacity: 0.15;
  pointer-events: none;
}

.hot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #c8005f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.hot-badge-dot {
  width: 6px;
  height: 6px;
  background: #ffb3d0;
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.hot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hot-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 20px 18px 18px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  position: relative;
}
.hot-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hot-category {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
  letter-spacing: 0.2px;
}
.cat--talk {
  background: rgba(163, 111, 255, 0.25);
  color: #c9a8ff;
}
.cat--info {
  background: rgba(0, 200, 130, 0.2);
  color: #5dedb8;
}
.cat--voyage {
  background: rgba(255, 165, 50, 0.2);
  color: #ffc06a;
}

.hot-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
  display: -webkit-box;
  /* 표준 */
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.hot-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hot-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.hot-meta-dot {
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.hot-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.hot-card:hover .hot-arrow {
  background: #c8005f;
  border-color: #c8005f;
  color: #fff;
}
.meta-comment {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.meta-comment img {
  width: 13px;
  height: 13px;
}
/* ════════════════════════════════════════
       ② 게시판 섹션 공통 (해기사익명Talk / 정보공유 / 승선후기)
    ════════════════════════════════════════ */
.sec-board-section {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 20px 20px 16px;
  margin-bottom: 12px;
}
.com-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f8;
}
.com-sec-title {
  font-size: 20px;
  color: #1a1d2e;
  letter-spacing: -0.3px;
}
.com-sec-title em {
  color: #c8005f;
  font-style: normal;
}
.com-sec-more {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: color 0.15s;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #eef0f6;
  background: #f8f9fc;
}
.com-sec-more:hover {
  color: #1a4fa0;
  border-color: #c5d5ee;
  background: #eef3fb;
}

/* 리스트형 게시판 */
.sec-board-list {
  display: flex;
  flex-direction: column;
}
.sec-board-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f4f5f9;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 6px;
  margin: 0 -4px;
  padding-left: 8px;
  padding-right: 8px;
}
.sec-board-item:last-child {
  border-bottom: none;
}
.sec-board-item:hover {
  background: #f5f7fd;
}

.sec-board-nick {
  font-size: 12px;
  font-weight: 700;
  color: #1a4fa0;
  background: #eef3fb;
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
}
.sec-board-title {
  font-size: 14px;
  color: #333;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
  line-height: 1.4;
}
.sec-board-item:hover .sec-board-title {
  color: #1a4fa0;
}
.sec-board-date {
  font-size: 12px;
  color: #bbb;
  flex-shrink: 0;
  white-space: nowrap;
}
.new-badge {
  font-size: 10px;
  font-weight: 700;
  color: #c8005f;
  background: #fff0f5;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}
.sec-board-comment {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #bbb;
  flex-shrink: 0;
}
.sec-board-comment img {
  width: 13px;
  height: 13px;
  stroke: #bbb;
}

/* ════════════════════════════════════════
       ① 마이페이지 - 회원 정보 상단 박스
    ════════════════════════════════════════ */
.member-hero {
  display: grid;
  grid-template-columns: 360px 1fr 350px;
  gap: 0;
  background: #ddeeff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
  position: relative;
}

/* 왼쪽: 인사말 + 직급 */
.member-hero-left {
  padding: 25px 25px 22px;
  position: relative;
  background: linear-gradient(135deg, #c8dff8 0%, #b0ccf0 100%);
}
/* KMOA 엠블럼 워터마크 */
.member-hero-left::before {
  content: "KMOA";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  font-weight: 900;
  color: rgba(0, 48, 135, 0.08);
  letter-spacing: -3px;
  pointer-events: none;
}
.member-hero-greeting {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.member-hero-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: #18045d;
}
/******회원등급별표시******/
.member-hero-grade {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  line-height: 1;
}
.member-hero-grade::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
/* 정회원 */
.member-hero-grade.regular {
  background: #1a4fa0;
}
.member-hero-grade.regular::before {
  background-image: url("/image/home/ic_crown.svg");
}
/* 특별회원(명예회원) */
.member-hero-grade.special {
  background: #7a4bc2;
}
.member-hero-grade.special::before {
  background-image: url("/image/home/ic_medal.svg");
}
/* 예비회원(학생회원) */
.member-hero-grade.student {
  background: #0f9d7a;
}
.member-hero-grade.student::before {
  background-image: url("/image/home/ic_book.svg");
}
/* 홈페이지회원(가족회원) */
.member-hero-grade.family {
  background: #666;
}
.member-hero-grade.family::before {
  background-image: url("/image/home/ic_home.svg");
}

.member-hero-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: #18045d;
  font-weight: 600;
}
.member-hero-rank {
  display: flex;
  align-items: center;
  gap: 5px;
}
.member-hero-rank::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a4fa0;
  opacity: 0.6;
}
.member-hero-edit {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #1a4fa0;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.member-hero-edit:hover {
  opacity: 0.7;
}
.member-hero-edit svg {
  width: 13px;
  height: 13px;
  stroke: #1a4fa0;
  fill: none;
  stroke-width: 2;
}

/* 중간: 유효기간 알림 */
.member-hero-mid {
  padding: 22px 24px 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
}
.member-mid-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #18045d;
  margin-bottom: 12px;
}
.member-mid-title::before {
  content: "●";
  color: #1a4fa0;
  font-size: 8px;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.expire-list {
  display: flex;
  margin-left: 15px;
  flex-direction: column;
}
.expire-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.expire-item-label {
  width: 50px;
  font-weight: 600;
  color: #555;
  flex-shrink: 0;
}
.expire-item-range {
  color: #444;
}
.expire-item-dday {
  font-size: 12px;
  font-weight: 600;
  color: #e8000d;
}

/* 오른쪽: 면허·자격·교육 현황 */
.member-hero-right {
  padding: 22px 24px 20px;
}
.member-right-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #18045d;
  margin-bottom: 10px;
}
.member-right-title::before {
  content: "●";
  color: #1a4fa0;
  font-size: 8px;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.license-stats {
  display: flex;
  align-items: flex-end;
  gap: 0;
}
.license-stat {
  flex: 1;
  text-align: center;
  padding: 0 6px;
  border-right: 1px solid #e2e5ee;
}
.license-stat:last-child {
  border-right: none;
}
.license-stat-num {
  font-size: 26px;
  font-weight: 900;
  color: #18045d;
  line-height: 1;
  margin-bottom: 4px;
}
.license-stat-num--accent {
  color: #1a4fa0;
}
.license-stat-label {
  font-size: 12px;
  color: #888;
}
/*추천채용공고*/
.recommend-job-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommend-job-count {
  flex-shrink: 0;
  min-width: 70px;

  padding: 7px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #dbe7ff;
}

.recommend-job-count strong {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: #1a4fa0;
}

.recommend-job-count span {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.recommend-job-info {
  flex: 1;
}

.recommend-job-info p {
  font-size: 13px;
  line-height: 1.4;
  color: #444;
}

.recommend-job-info a {
  font-size: 12px;
  font-weight: 600;
  color: #1a4fa0;
  text-decoration: none;
}

.recommend-job-info a:hover {
  text-decoration: underline;
}
/* ════════════════════════════════════════
       ② 메인 탭 (내가 쓴 글 / 회비납부내역 / 닉네임관리)
    ════════════════════════════════════════ */

.my-main-tabs {
  display: inline-flex;
  padding: 4px;
  background: #f3f6fb;
  border-radius: 12px;
  margin-bottom: 20px;
}
.my-main-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  border-radius: 8px;
  transition: background-color 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease;
}

.my-main-tab.active {
  background: #fff;
  color: #18045d;
  box-shadow: 0 2px 8px rgba(24, 4, 93, 0.08);
}

.my-main-tab:hover {
  color: #18045d;
  transform: translateY(-1px);
}

/* 기존 구분선 제거 */
.my-main-tab + .my-main-tab::before {
  display: none;
}
.my-main-tab.active {
  animation: tabActive 0.3s ease;
}

@keyframes tabActive {
  from {
    opacity: 0.6;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.my-sub-tabs {
  display: none;
}

.my-sub-tabs.active {
  display: flex;
}
/* ════════════════════════════════════════
       ③ 서브탭 (해기사전등록 / 해기사정보공유 / 승선후기)
    ════════════════════════════════════════ */
.my-sub-tab {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #d7dde8;
  background: #f9feff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.my-sub-tabs.active {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
}

.my-sub-tab:hover:not(.active) {
  border-color: #1a4fa0;
  color: #1a4fa0;
  background: #f8fbff;
}

.my-sub-tab.active {
  background: #1a4fa0;
  border-color: #1a4fa0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 79, 160, 0.15);
}
.my-sub-tab span {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dbe4f0;
  color: #4b5563;
  font-size: 11px;
  font-weight: 700;
}
.my-sub-tab.active span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
/*닉네임관리*/
.nickname-header p {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  margin-left: 15px;
}
/* 현재 닉네임 */
.nickname-current {
  display: flex;
  width: calc(100% - 30px);
  margin: 0 auto 20px;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  align-items: center;
  gap: 15px;
}
.nickname-current .label {
  color: #000;
  font-weight: 600;
}
.nickname-current .value {
  font-weight: 700;
  color: #18045d;
}
/* 규칙 박스 */
.nickname-rule-box {
  width: calc(100% - 30px);
  margin: 0 auto 20px;
  background: #f5f7fb;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.nickname-rule-box h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  margin-left: 15px;
  color: #333;
}

.nickname-rule-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}
/* 입력 */
.nickname-form {
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef1f8;
  padding: 25px 20px 25px 20px;
  margin-bottom: 25px;
  width: calc(100% - 30px);
  margin: 0 auto 20px;
}

.nickname-form label {
  display: flex;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.nickname-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nickname-label {
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
}
.nickname-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.nickname-input:focus {
  outline: none;
  border-color: #1a4fa0;
}

/* 중복확인 버튼 */
.nickname-btn-check {
  flex-shrink: 0;
  padding: 10px 14px;
  background: #1a4fa0;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.nickname-btn-check:hover {
  background: #163e82;
}

/* 메시지 */
.nickname-msg {
  font-size: 12px;
  margin-top: 8px;
  margin-left: 65px;
}

.nickname-msg.success {
  color: #0f9d7a;
}

.nickname-msg.error {
  color: #e8000d;
}

/* 버튼 */
.nickname-btn-area {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  margin-bottom: 25px;
}
.nickname-btn-save,
.nickname-btn-cancel {
  flex: 1;
  max-width: 120px;
  padding: 12px 0;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.nickname-btn-save {
  background: #18045d;
  color: #fff;
  border: none;
}
.nickname-btn-cancel {
  background: #eee;
  color: #333;
  border: none;
}

/* ════════════════════════════════════════
   반응형 Responsive
════════════════════════════════════════ */

/* ─── 1280px 이하 ─── */
@media (max-width: 1280px) {
  .top-layout {
    grid-template-columns: 1fr 300px;
    gap: 28px;
  }
  .news-career-wrap {
    grid-template-columns: 1fr 300px;
    gap: 28px;
  }
  .newsletter {
    grid-template-columns: 210px 1fr;
  }
  .magazine-thumb img {
    width: 130px;
    height: 185px;
  }
  .promo-grid {
    gap: 24px;
    padding: 10px 0;
  }
  .promo-thumb img {
    width: 100%;
    height: 110px;
  }
  .photo-news-grid {
    gap: 20px;
  }
  .photo-card-thumb {
    height: 150px;
  }
}

/* ─── 1024px 이하 ─── */
@media (max-width: 1024px) {
  .top-layout {
    grid-template-columns: 1fr 240px;
    gap: 20px;
  }

  /*커뮤니티*/
  .sec-board-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /*마이페이지*/
  .member-hero {
    grid-template-columns: 1fr;
  }

  /* 중간/오른쪽 구분선 제거 + 세로로 쌓이게 */
  .member-hero-mid {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
  }

  .member-hero-right {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
  }
  .member-hero-left,
  .member-hero-mid,
  .member-hero-right {
    padding: 18px 20px;
  }
}

@media (max-width: 768px) {
  /* 공지 + 사이드 1열 */
  .top-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /*커뮤니티*/
  .hot-badge {
    font-size: 18px;
  }
  .hot-grid {
    grid-template-columns: 1fr;
  }
  .sec-board-grid {
    grid-template-columns: 1fr;
  }
  .sec-title {
    font-size: 16px;
  }
}

@media (max-width: 540px) {
  /*커뮤니티*/
  .hot-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .sec-board-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}
