/*
    carousel
*/

.carousel-item {
    height: auto;              /* 높이 제한 제거 */
    min-height: unset;         /* 최소 높이 제거 */
}

.carousel-item img {
    width: 100%;
    height: auto;              /* 이미지 비율 유지하면서 전체 표시 */
    object-fit: contain;       /* 이미지가 잘리지 않도록 전체 표시 */
    object-position: center;   /* 중앙 정렬 */

    _min-height: 575px;
   
}

/* 필요 시 슬라이드 높이 조정 (선택 사항) */
@media (max-width: 767.98px) {
    .carousel-inner .carousel-item img {
        width: 100%;
        max-height: 300vh;      /* 너무 커지지 않도록 제한 */
        object-fit: cover;         /* 이미지를 채우되 잘려도 OK */
        object-position: 47% center; /* 오른쪽을 기준으로 정렬 */    
        transition: object-position 0.5s ease;
        min-height: 270px;
    }
    .carousel-inner .carousel-image {
      height: 30vh; /* 또는 적절한 높이 (ex: 500px) */
      object-fit: cover;
      object-position: right center;      
    }    
}


@media (min-width: 1200px) {
    .carousel-item img {
        max-height: 90vh;      /* 큰 화면에서도 적절히 제한 */
    }
}



/* 
    Slide Caption
*/

.slide_caption {
  position: absolute;
  top: 17%;
  left: 50px;
  width: 100%;
  
  z-index: 10;
  color: white;
  text-align: left;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);

  /* 반응형 폰트 크기 */
  font-size: clamp(14px, 2vw, 28px);
  line-height: 1.4;

  /* 반응형 너비 */
  _max-width: 90%;
  transition: padding 0.3s ease, font-size 0.3s ease;

  opacity: 0;
  transform: translateY(50px);
  animation: slideUp 1s ease-out forwards;
  animation-delay: 0.5s;
}

/* 각 슬라이드가 활성화될 때 애니메이션 다시 적용 */
.carousel-item.active .slide_caption {
  animation: slideUp 1s ease-out forwards;
  animation-delay: 0.3s;
}

/* 애니메이션 정의 */
@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.slide_caption h2 {
  font-size: clamp(24px, 6vw, 50px);
  font-weight: bold;
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 0.2em;
  transition: padding 0.3s ease, font-size 0.3s ease;
}

/* 부제목 (SEASON 2) */
.slide_caption h4 {
  font-size: clamp(14px, 3vw, 30px);
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 0.8em;
}

/* 설명 (The word of life...) */
.slide_caption p {
  font-size: clamp(12px, 2vw, 21px);
  line-height: 1;
  font-weight: 400;
  max-width: 100%;
}


@media (min-width: 1500px) {
  
  .slide_caption h2 {
    font-size: clamp(60px, 5vw, 90px);    
  }
  
}


@media (max-width: 767.98px) {

  .slide_caption {
    position: absolute;
    top: 18%;
    left: 10px;
    width: 100%;
    
    z-index: 10;
    color: white;
    text-align: left;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);

    /* 반응형 폰트 크기 */
    font-size: clamp(14px, 2vw, 28px);
    line-height: 1.4;
  }

  .slide_caption h2 {
    font-size: clamp(34px, 6vw, 50px);
    font-weight: bold;
    line-height: 1;
    letter-spacing: 2px;
    margin-bottom: 0.2em;
  }

  /* 부제목 (SEASON 2) */
  .slide_caption h4 {
    font-size: clamp(18px, 3vw, 30px);
    font-weight: 300;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0.8em;
  }

  /* 설명 (The word of life...) */
  .slide_caption p {
    font-size: clamp(12px, 2vw, 21px);
    line-height: 1;
    font-weight: 400;
    max-width: 100%;
  }

}




/* 
    slide 
*/
.slide-buttons-fixed {
  position: absolute;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(27, 27, 27, 0.4);
  border-radius: 30px;
  z-index: 10;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 0 35px;
  transition: padding 0.3s ease, font-size 0.3s ease;
}

/* 버튼 내부 */
.custom-btn {
  color: white;
  background-color: transparent;
  border: none;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.9rem 2rem;
  transition: font-size 0.3s ease, padding 0.3s ease;
}

.custom-btn img {
  height: 20px;
  margin-right: 0.5rem;
}

.custom-btn:hover {
  color: #f0f0f0;
}

/* Divider */
.btn-divider {
  width: 1px;
  background-color: rgba(255, 255, 255, 0.5);
  align-self: stretch;
  margin: 0;
}

/* 반응형 자동 크기 조절 */
@media (max-width: 1279.98px) {
  .slide-buttons-fixed {
    bottom: 50px;
    padding: 0px 20px;
  }
  .custom-btn {
    font-size: 0.9rem;
    padding: 0.7rem 1.8rem;
  }
}



/* 데스크탑에서만 보임 */
@media (min-width: 768px) {
  .slide-buttons-fixed {
    display: flex !important;
  }
  .slide-buttons-mobile {
    display: none !important;
  }
}

/* 모바일 - 슬라이드 아래 위치, 화면 너비 100% */
.slide-buttons-mobile {
  width: 100%;
  padding: 0px 25px;
  background: rgba(0, 0, 0, 0.4); /* 반투명 배경 */
  gap: 12px;
  box-sizing: border-box;
  margin-top: 0px;
  margin-bottom: 50px;
}

.custom-btn-mobile {
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: transparent;
  border: none;
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  _padding: 0rem 1.0rem;
   white-space: nowrap;
}

.custom-btn-mobile:hover {
  color: #f0f0f0; /* 흰색보다 약간 밝은 회색으로 변경 */
}

.btn-divider-mobile {
  width: 1px;
  height: 50px;
  background-color: #fff;
  align-self: stretch; /* 부모 높이에 맞춤 */
  opacity: 0.5;
  margin: 0 8px;
}





/*
    banner image, text
*/
.overlay-text-top {
  position: absolute;
  top: clamp(10px, 3vw, 40px);   /* 최소 10px ~ 최대 40px */
  left: clamp(10px, 3vw, 40px);  /* 화면 크기에 따라 자연스럽게 위치 이동 */  
  color: white;
  z-index: 2;
}

.overlay-text-top .title {
  margin: 0;
  font-size: clamp(16px, 2.5vw, 29px); /* 화면 크기에 따라 자동 조절 */
  font-weight: 700;
}

.overlay-text-top .subtitle {
  margin: 6px 0 0 0;
  font-size: clamp(10px, 1.3vw, 16px); /* 더 작고 부드럽게 조절 */
  font-weight: 400;
}

.overlay-text-top .subtitle .youtube-icon {
  width: clamp(14px, 5vw, 30px);   /* 화면 크기에 따라 크기 조절 */
  height: auto;
  margin-top: 6px;
  display: inline-block;
}

@media (min-width: 768px) {
  .overlay-text-top .subtitle .youtube-icon {
      width: 40px;
  }
}

@media (min-width: 1200px) {
  .overlay-text-top .subtitle .youtube-icon {
      width: 50px;
  }
}



/* 
  모바일 화면 (예: 768px 이하) 
  1vw = 5px
*/
@media (max-width: 767.98px) {
  .overlay-text-top {
    position: absolute;
    _top: clamp(26px, 3vw, 46px);   /* 최소 10px ~ 최대 40px */
    _left: clamp(26px, 3vw, 46px);  /* 화면 크기에 따라 자연스럽게 위치 이동 */  
    top: clamp(7vw, 3vw, 20vw);   /* 최소 10px ~ 최대 40px */
    left: clamp(7vw, 3vw, 20vw);  /* 화면 크기에 따라 자연스럽게 위치 이동 */      
  }

  .overlay-text-top .title {
    _font-size: clamp(30px, 2.5vw, 33px); /* 화면 크기에 따라 자동 조절 */
    font-size: clamp(7vw, 2.5vw, 10vw); /* 약 20~45px 정도 유연하게 */
  }

  .overlay-text-top .subtitle {
    _font-size: clamp(10px, 1.3vw, 16px); /* 더 작고 부드럽게 조절 */
    _font-size: clamp(1vw, 1.5vw, 1.8vw);  /* 약 14~26px 정도 */
    font-size: clamp(3vw, 1.5vw, 3.8vw);  /* 약 14~26px 정도 */
  }

  .overlay-text-top .subtitle .youtube-icon {
    _width: clamp(35px, 5vw, 40px);   /* 화면 크기에 따라 크기 조절 */
    width: clamp(8.5vw, 2vw, 11.8vw);
    height: auto;
    margin-top: 6px;
  }

}


.text-tight {
  line-height: 1.4; /* 필요에 따라 1.1, 1.0 등 조정 */
}

.align-fix {
  transform: translateY(-2px); /* 또는 margin-top: -2px */
}


@media (max-width: 767.98px) {
  .row-custom-gap {
    margin-top: 1px; /* 원하는 값으로 조절 가능 */
  }
}


/* 
  배너 위에 색을 살짝 입히는 부분
*/
.image-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.image-link::after {
  content: "";
  position: absolute;
  inset: 0; /* top, right, bottom, left 전부 0 */
  background: rgba(68, 68, 68, 0.1); /* 어두운 반투명 색상 */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.image-link:hover::after {
  opacity: 1;
}



/* 
    latest sermons 
*/
.sermon-section {
  width: 100%;
  background-color: #f0f0f0;
  padding: 73px 20px;
  margin-top: 40px;    /* 위 여백 */
  margin-bottom: 40px; /* 아래 여백 */  
  transition: font-size 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}


/* 데스크탑에서만 보이는 텍스트 */
.desktop-text {
  position: relative;
  display: none;
  padding: 19.2px 36px 16px 65px;
  text-align: left;
}

.sermon-section .sermon-title {
  font-size: 33px;
  font-weight: bold;
  color:#3a3f47;
}

.sermon-section .sermon-subtitle {
  color: #4c5054;
  font-size: 20px;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 4; /* 최대 3줄로 제한 */  
  max-height: calc(1.9rem * 4); /* 3줄 기준 높이 제한 */

}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  max-width: 100vw;
}



/* 반응형 자동 크기 조절 */
@media (max-width: 1279.98px) {
  .sermon-section {
    padding: 40px 20px;
  }

  .desktop-text {
    display: none;
    padding: 16px 26px 16px 35px;
    text-align: left;
  }

  .sermon-section .sermon-title {
    font-size: 25px;
  }  

  .sermon-section .sermon-subtitle {
    color: #4c5054;
    font-size: 15px;
  }  

}


@media (max-width: 991.98px) {
  .sermon-section .sermon-subtitle {
    display: -webkit-box; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-height: 1.5rem;
    max-height: calc(1.5rem * 2);
  }
}

@media (max-width: 767.98px) {
  .sermon-section {
    margin-bottom: 37px;
  }
}




/* 모바일에서만 보이는 제목 */
.mobile-title {
  display: block;
  margin-bottom: 1rem;
}

.mobile-text {
  display: block;
  text-align: left;
  padding: 1rem 0;
}

@media (min-width: 768px) {
  .mobile-title {
    display: none;
  }  
  .desktop-text {
    display: block;
  }
  .mobile-text {
        display: none;
  }  
}

@media (max-width: 767.98px) {

  .sermon-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .sermon-section {
    background-color: #fff;
    padding: 20px 0;
  }

  .sermon-section .container {
    padding: 0;
  }

  .sermon-section .col-md-6 {
    width: 100%;
    padding: 0;
  }

  .sermon-section .video-wrapper {
    background-color: #fff;
  }

  .sermon-section .mobile-title {
    padding: 0 1rem;
  }

  .sermon-section .mobile-text {
    background-color: #f0f0f0; /* 회색 배경 */
    padding: 1rem 1.7rem 2.5rem 1.7rem;
    
  }

}

   
.sermon-btn {
  display: inline-block;
  padding: 0.4rem 1.4rem;
  background-color: #fff;
  color: #4c5054;
  border-radius: 999px; /* 좌우 둥근 버튼 */
  text-decoration: none;
  transition: background-color 0.3s ease;
  border:1px solid #9D9FA2;
}

.sermon-btn:hover {
  background-color: #DDF7EF;
}






/* 
    Member registration 
*/
.member-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  margin-bottom: clamp(0.5rem, 2vw, 1.2rem); /* 반응형 간격 */
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(41, 41, 41, 0.15);  
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.member-thumb {
  width: 60px;         /* 원하는 너비 */
  height: auto;         /* 고정 높이로 비율 맞춤 */
  object-fit: cover;    /* 잘리더라도 꽉 차게 */
  border-radius: 6px;
  margin-right: 10px;
  flex-shrink: 0; /* 이미지가 줄어들지 않도록 */
}

.member-text {
  display: flex;
  flex-direction: column;
  justify-content: center; /* 세로 가운데 정렬 */
  margin-left: 0;
}

.member-text p {
  font-size: 21px;
  color: #3a3f47;
  font-weight: bold;
}


/* 모바일 대응 */
/* 모바일(768px 이하)에서 세로 정렬, 텍스트는 왼쪽 정렬 + 약간의 여백 */
@media (max-width: 767.98px) {
  .member-card {
    justify-content: flex-start;
    text-align: left;
  }
  
  .member-thumb {
    _width: 60px; 
    width: clamp(60px, 15%, 70px);
    margin-bottom:0;
    _margin-left: 17px;
    margin-left: clamp(20px, 4vw, 25px);
  }
  
  .member-text {
    _padding-left: 10px;
    padding-left: clamp(8px, 4vw, 10px);
  }

  /* ✅ 텍스트를 더 크고 굵게 */
  .member-text p {
    _font-size: 1.2rem;     /* 기존보다 크게 */
    font-size: clamp(5vw, 1.3vw, 7vw);
    font-weight: 700;      /* 더 굵게 */
  }

}
