/* Reset */

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  -webkit-overflow-scrolling: touch;
  overflow: hidden;
}

img {
  display: block;
}

.main_container {
  background: #e7f3ff;
  background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(193, 223, 255, 1) 100%);
  overflow: hidden;
}

.main_visual {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
  width: 100%;
  margin: 0 auto;
  max-width: 1000px;
  padding: 20px;
  overflow: hidden;
}

.main_visual_right {
  width: 100%;
}

.visual-swiper {
  width: 100%;
  height: auto;
}

.main_visual_title {
  width: 370px;
}

.content_img_title {
  max-width: 300px;
  width: 60%;
  margin: 100px auto 50px;
}

.content_img {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
  grid-gap: 20px;
  width: 100%;
  margin: 0px auto 50px;
  max-width: 1000px;
  padding: 0 20px;
}

.content_img1 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 50px;
}

.content_img1 img {
  width: 100%;
  max-width: 400px;
}

.content_img2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
  grid-gap: 20px;
  width: 100%;
  margin: 50px auto 0;
  max-width: 1000px;
  padding: 0 20px;
}

.content_img3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
  grid-gap: 20px;
  width: 100%;
  margin: 0 auto;
  max-width: 1000px;
  padding: 0 20px;
}

.content_img2 img,
.content_img3 img,
.content_img4_img {
  width: 100%;
}

.content_img4 {
  width: 100%;
  margin: 0px auto 50px;
  max-width: 1040px;
  padding: 0 20px;
  text-align: center;
}

/* 모바일에서 이미지 표시 변경 */
@media screen and (max-width: 768px) {
}

.last_img {
  width: 100%;
  height: auto;
}
.moreBtn {
  background-color: #0f3187;
  color: #fff;
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

footer {
  display: none;
  text-align: center;
  color: #fff;
  font-size: 14px;
  padding: 15px;
  background-color: #0f3187;
}

.form_section {
  background-color: #0800ae;
  padding: 15px;
  width: 100%;
  /* position: fixed; */
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  color: #fff;
}
.inputForm-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#submitBtn {
  height: 100px;
}

.form_section_logo {
  margin-right: 20px;
}

.form_section_title {
  font-size: 23px;
  font-weight: bold;
}

.form_section_title strong {
  color: #fff55a;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.3;
  }
}

.form_section_title_sub {
  margin-left: 10px;
}

.form_section_title_sub #d-day {
  width: 35px;
  height: 35px;
  border-radius: 5px;
  background-color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #ff4b58;
}

.inputFormInner {
  display: flex;
  gap: 15px;
  align-items: center;
  white-space: nowrap;
}
.form_section #counsel_name {
  width: 100%;
}
.form_section input,
.form_section select {
  height: 40px;
  border-radius: 5px;
  border: none;
  padding: 0 10px;
  font-size: 16px;
  background-color: #fff;
  outline: none;
}

.inputFormInner-item {
  display: flex;
  gap: 15px;
  align-items: center;
  width: 100%;
}

.inputFormInner-item > div {
  display: flex;
  gap: 5px;
  align-items: center;
  position: relative;
  width: 100%;
}

/* 셀렉트 박스 커스텀 화살표 */
.form_section select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23333' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
  padding-right: 35px;
}

/* 셀렉트 박스 포커스 시 화살표 색상 변경 */
.form_section select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23143ca2' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 2px rgba(20, 60, 162, 0.2);
}

/* 셀렉트 박스 첫 번째 옵션 스타일링 */
.form_section select option:first-child {
  color: #999;
  opacity: 0.7;
  font-style: italic;
}

/* 셀렉트 박스 자체의 placeholder 스타일 */
.form_section select:invalid {
  color: #999;
}

/* 실제 옵션들은 정상 색상으로 표시 */
.form_section select option:not(:first-child) {
  color: #000;
  opacity: 1;
  font-style: normal;
}
.num-label-sub {
  font-size: 16px;
  font-weight: bold;
  background-color: #fff55a;
  padding: 0 10px;
  border-radius: 5px 0 0 5px;
  color: #000;
  display: inline-block;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin-left: 5px;
}

#counsel_hp {
  border-radius: 0 5px 5px 0;
}

.num-label {
  display: flex;
  align-items: center;
}

/* Privacy Box */
.privacy_box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.privacy_box label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.agreeText {
  font-size: 15px;
}

#agreeView {
  color: #fff55a;
  text-decoration: underline;
  font-weight: bold;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  width: 80%;
  max-width: 400px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content h3 {
  color: #333;
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.modal-content p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin: 10px 0;
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #666;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #ff2e63;
}

.rollLit-wrapper {
  background: url('../img/rollBg.jpg') no-repeat center top;
  background-size: cover;
  padding: 70px 0;
}

.callTop {
  background: linear-gradient(135deg, rgba(255, 190, 10, 1) 0%, rgba(255, 230, 10, 1) 24%, rgba(255, 190, 10, 1) 49%, rgba(255, 230, 10, 1) 74%, rgba(255, 190, 10, 1) 100%);
  background-size: 200% 200%;
  animation: shineGradient 3s ease-in-out infinite;
  color: #000;
  padding: 10px 20px;
  font-size: 25px;
  font-weight: bold;
  display: block;
  text-decoration: none;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

@keyframes shineGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 200% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.callTop img {
  width: 30px;
  height: 30px;
}

/* .callBtn floating animation */
.callBtn {
  position: fixed;
  bottom: 15px;
  left: 50%;
  width: 300px;
  z-index: 1001;
  display: block;
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
  animation: callBtnFloat 2.4s ease-in-out infinite;
}

/* 숨길 때 자연스럽게 페이드 아웃 */
.callBtn.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease-in-out;
}

.main-visual-video {
  width: 100%;
  height: auto;
  max-width: 530px;
  display: block;
  border-radius: 16px;
  background: #000;
}
@media (max-width: 500px) {
  .main-visual-video {
    max-width: 100vw;
    max-height: 60vw;
  }

  #baegwancare_2 .swiper-button-next:after,
  #baegwancare_2 .swiper-button-prev:after {
    font-size: 23px;
  }
}

.freeText {
  color: red;
  text-shadow:
    -2px 0px #fff,
    0px 2px #fff,
    2px 0px #fff,
    0px -2px #fff;
  font-weight: bold;
  display: inline-block;
  letter-spacing: -2px;
}

/* 글자별 애니메이션을 위해 각 글자를 span으로 감싸고 nth-child로 딜레이 적용 */
.freeText span {
  display: inline-block;
  animation: floatChar 0.8s ease-in-out infinite;
}

.freeText span:nth-child(1) {
  animation-delay: 0s;
}
.freeText span:nth-child(2) {
  animation-delay: 0.1s;
}
.freeText span:nth-child(3) {
  animation-delay: 0.2s;
}
.freeText span:nth-child(4) {
  animation-delay: 0.3s;
}
.freeText span:nth-child(5) {
  animation-delay: 0.4s;
}
.freeText span:nth-child(6) {
  animation-delay: 0.5s;
}
.freeText span:nth-child(7) {
  animation-delay: 0.6s;
}
.freeText span:nth-child(8) {
  animation-delay: 0.7s;
}
.freeText span:nth-child(9) {
  animation-delay: 0.8s;
}
.freeText span:nth-child(10) {
  animation-delay: 0.9s;
}

@keyframes floatChar {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes callBtnFloat {
  0% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -10px);
  }
  100% {
    transform: translate(-50%, 0);
  }
}

.callBtn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Media Queries */
@media screen and (max-width: 768px) {
  .content_img1 {
    flex-direction: column;
    padding: 0 20px;
    margin-bottom: 50px;
  }
  .content_img1 img {
    max-width: 100%;
  }
  .content_img4 {
    margin-bottom: 0;
  }
  .main_visual {
    gap: 20px;
    flex-direction: column;
  }
  .main_visual img {
    width: 100%;
  }

  .content_img,
  .content_img2 {
    gap: 5px;
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    margin-bottom: 20px;
  }

  .content_img2 {
    margin-top: 20px;
  }
  .content_img img,
  .content_img2 img {
    width: 100%;
  }

  .content_img3 {
    gap: 5px;
    grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
  }

  .content_img_title {
    margin: 50px auto 30px;
  }

  .last_img {
    width: 150%;
    transform: translateX(-16%);
  }

  .form_section input,
  .form_section select {
    height: 35px;
    font-size: 14px;
  }

  .form_section_title {
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
  }

  #submitBtn {
    width: 100%;
    height: auto;
  }

  .form_section_logo,
  .form_section_title_sub {
    display: none;
  }

  .form_section {
    flex-direction: column;
    gap: 10px;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.3);
  }

  .inputFormInner {
    flex-direction: column;
    gap: 8px;
  }

  .num-label-sub {
    height: 35px;
    line-height: 35px;
  }

  .agreeText {
    font-size: 13px;
  }
}

/* 실시간 상담 신청 현황 롤링 */

.rollLit {
  position: relative;
  margin: 20px auto;
  max-width: 800px;
  font-size: 16px;
}

.rollLit-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  padding: 0 30px;
  font-size: 18px;
  font-weight: bold;
  color: #143ca2;
  margin-bottom: 10px;
}

.rollLit-title {
  width: 50%;
  padding: 0 20px;
  margin: 0 auto 20px;
}

.rollLit-title img {
  width: 100%;
}

.rollLit-service,
.rollLit-status {
  background-color: #143ca2;
  color: #fff;
  padding: 10px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
}

.rollLit-container {
  background-color: #fff;
  padding: 20px;
  max-height: 400px;
  overflow: hidden;
  border-radius: 10px;
  text-align: center;
}

.rollLit-swiper {
  height: 300px;
}

.rollLit-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 5px 30px;
  color: #333;
  font-size: 16px;
}

.rollLit-date {
  color: #666;
  min-width: 80px;
}

.rollLit-name {
  font-weight: bold;
  color: #143ca2;
}

.rollLit-phone {
  color: #666;
}

/* 모바일에서 롤링 현황 스타일 */
@media screen and (max-width: 768px) {
  .rollLit-wrapper {
    padding: 30px 0 50px;
  }
  .rollLit {
    margin: 10px;
    max-width: none;
  }

  .rollLit-title {
    width: 80%;
  }

  .rollLit-container {
    padding: 10px;
    max-height: 260px;
  }

  .rollLit-swiper {
    height: 180px;
  }

  .rollLit-item,
  .rollLit-header {
    padding: 0px;
    font-size: 12px;
  }

  .rollLit-service,
  .rollLit-status {
    font-size: 12px;
    padding: 5px;
  }

  .rollLit-date {
    min-width: 70px;
  }

  .privacy_box input[type='checkbox'] + span {
    width: 40px;
    height: 20px;
    border-radius: 10px;
  }

  .privacy_box input[type='checkbox'] + span:before {
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
  }

  .privacy_box input[type='checkbox']:checked + span:before {
    transform: translateX(20px);
  }

  .name-warning {
    position: absolute;
    top: -23px;
  }
}

/* 이름 입력 경고 메시지 */
.name-warning {
  display: block;
  color: #ff4444;
  font-size: 12px;
  margin-top: 5px;
  font-weight: bold;
  animation: fadeIn 0.3s ease-in;
}

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

#baegwancare .privacy_box input[type='checkbox'] {
  display: none;
}

#baegwancare .privacy_box input[type='checkbox'] + span {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #9f9f9f;
  border-radius: 13px;
  transition: all 0.3s;
}

#baegwancare .privacy_box input[type='checkbox'] + span:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #143ca2;
  top: 2px;
  left: 2px;
  transition: all 0.3s;
}

#baegwancare .privacy_box input[type='checkbox']:checked + span {
  background-color: #fff;
}

#baegwancare .privacy_box input[type='checkbox']:checked + span:before {
  transform: translateX(20px);
}

/* 고정 하단 버튼 래퍼: 화면 하단에 고정되고 .form_section이 보이면 숨김 처리 */
#baegwancare_2 .btn_wrapper {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: baseline;
  transition:
    opacity 240ms ease-in-out,
    transform 240ms ease-in-out;
  max-width: 1000px;
}

#baegwancare_2 .btn_wrapper.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

#baegwancare_2 .btn_wrapper img {
  display: block;
}

@keyframes titleZoom {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
  }
}

#baegwancare_2 .container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

#baegwancare_2 img {
  width: 100%;
  height: auto;
}

#baegwancare_2 #form_section {
  background-color: #eceaff;
  color: #000;
  box-shadow: none;
}

#baegwancare_2 #form_section h3 {
  text-align: center;
  font-size: 50px;
  font-weight: bold;
  font-family: auto;
  margin-bottom: 25px;
  color: #4335fc;
  font-family: 'Gmarket Sans';
}

#baegwancare_2 .form_section {
  display: block;
  padding: 50px 100px;
}

#baegwancare_2 .form_section input[type='text'] {
  height: 50px;
  font-size: 20px;
}

#baegwancare_2 .form_section input[type='checkbox'] {
  height: 30px;
  width: 30px;
}

#baegwancare_2 #submitBtn {
  margin-top: 15px;
}

#baegwancare_2 .inputFormInner {
  flex-direction: column;
  gap: 10px;
}

.inputFormInner-item > div {
  gap: 20px;
}

#baegwancare_2 .inputFormInner label {
  font-size: 25px;
  font-weight: bold;
}

#baegwancare_2 .num-label,
#baegwancare_2 #counsel_hp {
  width: 100%;
}

#baegwancare_2 .num-label-sub {
  background-color: #4335fc;
  color: #fff;
  height: 50px;
  line-height: 50px;
  font-size: 20px;
  margin-left: 20px;
}

#baegwancare_2 #agreeView {
  color: #4335fc;
}

#baegwancare_2 .rollLit {
  border: 1px solid #333;
  border-radius: 20px;
  overflow: hidden;
}

#baegwancare_2 .rollLit-service,
#baegwancare_2 .rollLit-status {
  background-color: #4335fc;
}
#baegwancare_2 .main-visual {
  position: relative;
  width: 100%;
  overflow: hidden;
}

#baegwancare_2 img.titleImg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  transform-origin: center center;
  will-change: transform;
  animation: titleZoom 1s ease-in-out infinite;
  z-index: 10;
}

/* Make the video fill the container and cover it (object-fit) */
#baegwancare_2 .main-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

#baegwancare_2 .main-visual .main-visual-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay for better text visibility */
  z-index: -1;
}

#baegwancare_2 .main-visual header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
}
#baegwancare_2 .main-visual header img {
  height: 60px;
  width: auto;
}

#baegwancare_2 .rollLit-wrapper_2 {
  margin-bottom: 50px;
}

@media screen and (max-width: 768px) {
  #baegwancare_2 .form_section {
    padding: 30px 20px;
  }
  #baegwancare_2 .form_section input[type='text'] {
    height: 40px;
    font-size: 16px;
  }
  #baegwancare_2 .inputFormInner label {
    font-size: 18px;
    font-weight: bold;
  }
  #baegwancare_2 .num-label-sub {
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    margin-left: 10px;
  }

  #baegwancare_2 #form_section h3 {
    font-size: 30px;
    margin-bottom: 15px;
  }

  #baegwancare_2 .privacy_box input[type='checkbox'] + span {
    width: auto;
  }
  #baegwancare_2 .form_section input[type='checkbox'] {
    height: 20px;
    width: 20px;
  }

  #baegwancare_2 img.titleImg {
    width: 80%;
    top: 53%;
  }
  #baegwancare_2 .main-visual header {
    padding: 15px 5px 15px 20px;
  }
  #baegwancare_2 .main-visual header img {
    height: 30px;
  }
}
