/* 상단 헤더 */
#header {
  position: relative;
  padding: 22px 28px 42px 28px;
}
#header:before {
  content: '';
  position: absolute;
  background: linear-gradient(180deg, #ff66cc 0%, #4d3dbf 45%, #4d3dbf 100%) 0%
    0% no-repeat padding-box;
  top: 0;
  left: 0;
  width: 100%;
  height: 180%;
  z-index: -1;
}
#header .logo {
  display: block;
  width: 164px;
  height: 40px;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* 대부업 문구 */
#header .header-top-text {
  font-size: 30px;
  font-weight: 400;
  color: #fff;
}

#header .header-top-text span {
  display: inline-block;
}

#header .header-top-text span:first-child {
  margin-bottom: 4px;
}

#header .logo-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#header .util-box {
  width: auto;
  min-width: 160px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
#header .util-box .auth-buttons {
  display: flex;
  align-items: center;
}
#header .util-box .user-profile-btn {
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 25px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

#header .util-box .user-profile-btn i {
  font-size: 16px;
}

#header .util-box .user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

#header .util-box .logout-btn {
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 25px;
  color: #4d3dbf;
  background: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

#header .util-box .logout-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

#header .util-box .search-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
}
#header .util-box .search-icon-btn .search-icon {
  background-image: url('../img/serach-icon.png');
  width: 23px;
  height: 23px;
  display: inline-block;
}
#header .util-box .login-btn {
  display: inline-block;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 400;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  white-space: nowrap;
  text-align: center;
  border-radius: 59.008px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#header .util-box .signup-btn {
  padding: 12px 24px;
  font-size: 22px;
  font-weight: 500;
  border-radius: 40px;
  color: #4d3dbf;
  background: #fff;
  transition: all 0.3s ease;
}
#header .util-box .login-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
#header .util-box .signup-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* 통합된 로그인/회원가입 버튼 */
#header .util-box .combined-auth-btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.3s ease;
  text-decoration: none;
}

#header .util-box .combined-auth-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 헤더 상단 검색창 */
#header .header-search-con {
  margin-top: 30px;
  width: 100%;
}

#header .header-search-con .header-search-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  font-size: 18px;
  justify-content: center;
}

#header .header-search-con .search-input-con {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

#header .header-search-con .search-input-con:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

#header .header-search-con .search-input-con .search-label {
  font-size: 18px !important;
  color: #666 !important;
  font-weight: 400 !important;
  line-height: 1.4;
  flex-grow: 1;
}

#header .header-search-con .search-input-con .search-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

#header .header-search-con .search-input-con .search-icon i {
  font-size: 16px;
  color: #000;
}

/* 헤더 로그인 페이지용 */
#header.login-header {
  padding: 20px 0;
}

#header.login-header:before {
  height: 100%;
}

#header.login-header .header-search-con {
  display: none;
}

/* 햄버거 메뉴 */
.hamburger-menu {
  margin-right: 15px;
  position: relative;
}

.menu-trigger {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px 0;
}

.menu-trigger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 150px;
  z-index: 10;
}

.hamburger-menu:hover .dropdown-menu {
  display: block;
}

.dropdown-menu ul {
  list-style: none;
}

.dropdown-menu li {
  border-bottom: 1px solid #eee;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
  background: #f7f7f7;
  color: #4d3dbf;
}

/* 모바일/데스크톱 전환 요소 */
.mobile-login {
  display: none;
}

.desktop-login {
  display: block;
}

.mobile-dept-text {
  display: none;
}

.desktop-dept-wrapper {
  display: block;
  width: 100%;
}

/* 대부업 문구 - 데스크탑 */
.desktop-dept-text {
  display: block;
  text-align: left;
  margin-bottom: 30px;
  padding-left: 48px;
}

.desktop-dept-text .header-top-text {
  font-size: 13px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.desktop-dept-text .header-top-text span {
  display: inline;
  margin-right: 3px;  
}

.desktop-dept-text .header-top-text span:last-child {
  margin-right: 0;
}

.desktop-dept-text .header-top-text br {
  display: none;
}

/* (주) 각주 스타일 */
.corp-suffix {
  font-size: 0.7em !important;
  vertical-align: 0.28em;
  line-height: 1 !important;
}

/* 헤더 레이아웃 */
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 48px 0 48px;
}

.header-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.header-top-bar .logo {
  flex-shrink: 0;
}

.header-top-bar .desktop-login,
.header-top-bar .mobile-login {
  flex-shrink: 0;
}

.header-bottom-bar {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-search-wrap {
  flex: 1;
  display: flex;
}

.search-input-con {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 4px 24px;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  margin-top: 6px;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-input-con:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.search-input-con .search-label {
  font-size: 18px !important;
  color: #666 !important;
  font-weight: 400 !important;
  line-height: 1.4;
  flex-grow: 1;
}

.search-input-con .search-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.search-input-con .search-icon i {
  font-size: 16px;
  color: #4d3dbf;
}

.util-box .login-btn {
  background: #c7b6e5;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 12px 32px;
  margin-left: 16px;
  transition: background 0.2s;
}

.util-box .login-btn:hover {
  background: #a18cd1;
}

/* 반응형 헤더 */
@media screen and (max-width: 1400px) {
  .header-inner {
    max-width: 1100px;
    padding: 30px 30px 0 30px;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box .login-btn {
    padding: 16px 22px;
  }

  #header .logo {
    width: 160px;
    height: 40px;
  }

  .desktop-dept-text {
    padding-left: 30px;
  }

  .desktop-dept-text .header-top-text {
    font-size: 13px;
  }
  .desktop-dept-text .header-top-text span {
    margin-right: 8px; /* 문장간 마진 축소 */
  }
}

@media screen and (max-width: 1199px) {
  .header-inner {
    padding: 25px 20px 0 20px;
  }

  #header .logo {
    width: 155px;
    height: 38px;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box {
    min-width: 140px;
  }

  .util-box .login-btn {
    font-size: 1rem;
    padding: 6px 20px;
  }

  .search-input-con {
    padding: 6px 20px;
  }

  .search-input-con .search-label {
    font-size: 17px !important;
  }

  .search-input-con .search-icon {
    width: 32px;
    height: 32px;
  }

  .desktop-dept-text {
    padding-left: 20px;
  }

  .desktop-dept-text .header-top-text {
    font-size: 12px;
  }
  .desktop-dept-text .header-top-text span {
    margin-right: 6px;
  }
}

@media screen and (max-width: 1100px) {
  .desktop-dept-text {
    padding-left: 20px;
  }

  .desktop-dept-text .header-top-text {
    font-size: 11px;
  }
  .desktop-dept-text .header-top-text span {
    margin-right: 5px;
  }

  #header .util-box .login-btn {
    font-size: 0.95rem;
  }
}

/* 모바일 레이아웃 전환 */
@media screen and (max-width: 990px) {
  #header {
    padding: 42px 20px 28px;
  }

  .header-inner {
    padding: 20px 15px 0 15px;
  }

  #header .logo {
    width: 140px;
    height: 34px;
  }

  .header-top-bar {
    margin-bottom: 20px;
    justify-content: space-between;
  }

  .header-bottom-bar {
    justify-content: center;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box {
    min-width: 120px;
  }

  .util-box .login-btn {
    font-size: 0.95rem;
    padding: 5px 16px;
  }

  .search-input-con {
    padding: 4px 24px;
  }

  .search-input-con .search-label {
    font-size: 17px !important;
  }

  .mobile-login {
    display: block;
  }

  .desktop-login {
    display: none;
  }

  .mobile-dept-text {
    display: block;
    margin-bottom: 20px;
    width: 100%;
  }

  .desktop-dept-text {
    display: none;
  }

  .mobile-dept-text .header-top-text {
    font-size: 28px !important;
    width: 100%;
    text-align: left;
    display: block;
    font-weight: 400;
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.4;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.9rem;
    padding: 9px 16px;
    min-width: 120px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    border: none;
  }
}

@media screen and (max-width: 880px) {
  .mobile-dept-text .header-top-text {
    font-size: 26px !important;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.85rem;
    padding: 8px 14px;
    min-width: 115px;
  }

  #header .logo {
    width: 130px;
    height: 32px;
  }
}

@media screen and (max-width: 767px) {
  #header {
    padding: 35px 15px 20px;
  }

  .header-inner {
    padding: 15px 12px 0 12px;
  }

  #header .logo {
    width: 120px;
    height: 30px;
  }

  .header-top-bar {
    margin-bottom: 15px;
    justify-content: space-between;
  }

  .header-top-text {
    font-size: 0.65rem;
  }

  .header-bottom-bar {
    justify-content: center;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box {
    min-width: 110px;
  }

  .search-input-con {
    padding: 4px 24px;
  }

  .search-input-con .search-label {
    font-size: 15px !important;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.8rem;
    padding: 7px 12px;
    min-width: 110px;
  }

  .mobile-dept-text .header-top-text {
    font-size: 24px !important;
  }
}

@media screen and (max-width: 640px) {
  .mobile-dept-text .header-top-text {
    font-size: 22px !important;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.75rem;
    padding: 7px 12px;
    min-width: 105px;
  }

  #header .logo {
    width: 110px;
    height: 27px;
  }
}

@media screen and (max-width: 600px) {
  #header {
    padding: 30px 12px 18px;
  }

  #header .logo {
    width: 110px;
    height: 27px;
  }

  .header-top-text {
    font-size: 0.6rem;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box {
    min-width: 100px;
  }

  .search-input-con .search-label {
    font-size: 16px !important;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
    min-width: 105px;
  }
}

@media screen and (max-width: 480px) {
  #header {
    padding: 25px 10px 15px;
  }

  #header .logo {
    width: 100px;
    height: 24px;
  }

  .header-top-bar {
    margin-bottom: 12px;
  }

  .header-top-text {
    font-size: 0.55rem;
    line-height: 1.2;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box {
    min-width: 90px;
  }

  .search-input-con {
    padding: 4px 24px;
  }

  .search-input-con .search-label {
    font-size: 14px !important;
  }

  .search-input-con .search-icon {
    width: 36px;
    height: 36px;
  }

  .search-input-con .search-icon i {
    font-size: 16px;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.7rem;
    padding: 5px 9px;
    min-width: 95px;
  }

  .mobile-dept-text .header-top-text {
    font-size: 20px !important;
    line-height: 1.3;
  }

  .header-inner {
    padding: 10px 10px 0 10px;
  }

  #header .header-inner {
    padding: 0 6px;
  }
}

@media screen and (max-width: 420px) {
  .mobile-dept-text .header-top-text {
    font-size: 18px !important;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.65rem;
    padding: 7px 12px;
    min-width: 95px;
  }

  #header .logo {
    width: 120px;
    height: 30px;
  }

  #header .header-inner {
    padding: 0 6px;
  }
}

@media screen and (max-width: 380px) {
  #header {
    padding: 20px 8px 12px;
  }

  #header .logo {
    width: 90px;
    height: 22px;
  }

  .header-search-wrap {
    flex: 1;
  }

  .util-box {
    min-width: 80px;
  }

  .search-input-con .search-label {
    font-size: 13px !important;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.65rem;
    padding: 4px 8px;
    letter-spacing: -0.5px;
  }

  .header-top-text {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .search-input-con .search-label {
    font-size: 12px !important;
  }

  .mobile-login .util-box .login-btn {
    min-width: 130px;
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}

@media screen and (max-width: 375px) {
  .mobile-dept-text {
    margin-bottom: 10px;
  }

  .mobile-dept-text .header-top-text {
    font-size: 16px !important;
    line-height: 1.2;
  }

  .mobile-login .util-box .login-btn {
    font-size: 0.6rem;
    padding: 7px 12px;
    min-width: 80px;
    letter-spacing: -0.5px;
  }

  #header .logo {
    width: 120px;
    height: 30px;
  }

  #header .header-search-con .search-input-con,
  .search-input-con {
    padding: 2px 14px;
  }

  #header .header-inner {
    padding: 0 6px;
  }
}

/* 마이페이지 전용 사용자 프로필 및 로그아웃 버튼 */
.mypage .auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mypage .auth-buttons .user-profile-btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mypage .auth-buttons .user-profile-btn i {
  font-size: 16px;
}

.mypage .auth-buttons .user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.mypage .auth-buttons .logout-btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  color: #4d3dbf;
  background: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mypage .auth-buttons .logout-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 모바일에서 마이페이지 버튼 스타일 */
@media screen and (max-width: 990px) {
  .mypage .mobile-login .auth-buttons {
    gap: 8px;
  }

  .mypage .mobile-login .user-profile-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 30px;
  }

  .mypage .mobile-login .logout-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 30px;
  }
}

@media screen and (max-width: 767px) {
  .mypage .mobile-login .auth-buttons {
    gap: 6px;
  }

  .mypage .mobile-login .user-profile-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .mypage .mobile-login .logout-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

@media screen and (max-width: 480px) {
  .mypage .mobile-login .auth-buttons {
    gap: 4px;
    align-items: flex-end;
  }

  .mypage .mobile-login .user-profile-btn {
    padding: 7px 12px;
    font-size: 0.7rem;
    min-width: 105px;
  }

  .mypage .mobile-login .logout-btn {
    padding: 7px 12px;
    font-size: 0.7rem;
    min-width: auto;
  }
}

@media screen and (max-width: 380px) {
  .mypage .mobile-login .user-profile-btn {
    padding: 6px 10px;
    font-size: 0.65rem;
    min-width: 95px;
    letter-spacing: -0.5px;
  }

  .mypage .mobile-login .logout-btn {
    padding: 6px 10px;
    font-size: 0.65rem;
    letter-spacing: -0.5px;
  }
}

/* 기존 로그인 버튼 스타일에 마이페이지 제외 조건 추가 */
.auth-buttons .login-btn {
  background: rgba(255, 255, 255, 0.1);
}

.auth-buttons .login-btn:not(.mypage .auth-buttons .login-btn) {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}
