/* ===== Index (home) — optimized ===== */

.py-80 {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

/* Hero (transparent header at top; solid after scroll is handled in base.css) */
body.home {
  padding-top: 0 !important;
}

/* let hero touch the very top */
#hero.bg-hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--navbar-height, 72px));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Specific hero background variants */
.hero-banner-3 { background-image: url('/images/main_banner3.jpg') !important; }

#bg-filter {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .30) 0%, rgba(0, 0, 0, .35) 35%, rgba(0, 0, 0, .55) 65%, rgba(0, 0, 0, .75) 100%);
  z-index: 0;
}

#hero .container,
#hero .row,
#hero .col-12 {
  position: relative;
  z-index: 1;
}

#hero h1 {
  font-family:'SEBANG_Gothic_Bold';
  font-size: 4rem;
  color: var(--white-color);
  font-weight: 800;
  white-space: nowrap; /* 작은 화면에서도 줄바꿈 방지 */
}

#hero .lead {
  font-size: 1.25rem;
  color: var(--secondary-color-light);
}

.hero-ctas {
  display: inline-flex;
  gap: .75rem;
  margin-top: .75rem;
}

#hero .header-cta {
  font-size: 20px;
  font-weight: 200;
  ;
  text-decoration: none !important;
  padding: 12px 36px !important;
  background-color: rgba(255, 255, 255, .05) !important;
  color: var(--white-color);
  border: 0.2px solid var(--white-color) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
}

#hero .header-cta:hover,
#hero .header-cta:focus {
  background: rgba(255, 255, 255, .06);
  transform: translateY(-1px);
}

#intro-home {
  background-color: var(--primary-color);
}

/* 기본: 모바일은 화면 가로 꽉 채우기 */
.video-embed {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* PC(예: ≥992px)에서는 더 크게 — 원하는 값으로 조절 */
@media (min-width: 992px) {
  .video-embed {
    max-width: 960px;
    /* 1280px, 1024px 등으로 변경 가능 */
    margin: 0 auto;
  }
}



/* Mentors carousel (row-based slider; JS controls widths) */
#trainerCarousel {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#trainerCarousel .carousel-inner {
  height: auto;
  overflow: hidden;
}

#trainerCarousel .row.flex-nowrap {
  transition: transform 400ms ease;
  will-change: transform;
}

#trainerCarousel .row.flex-nowrap.no-anim {
  transition: none !important;
}

.trainer-card {
  width: 100%;
  text-align: center;
  padding: .3rem;
}

.trainer-card .rounded-circle {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}

.trainer-card h5 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white-color);
  margin-bottom: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trainer-card h6 {
  font-size: .95rem;
  font-weight: 500;
  color: var(--secondary-color-light);
  margin: .35rem 0 0;
  padding-top: .5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trainer-card p {
  font-size: .8rem;
  line-height: 1.4;
  margin: 0;
  color: #b6b6b6;
}

.trainer-card p.bio-2lines { min-height: calc(1.4em * 2); }
.trainer-card p.bio-2lines span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover overlay (search icon) */
.trainer-card .trainer-photo {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
}

.trainer-card .trainer-photo img {
  display: block;
}

.trainer-card .trainer-photo .photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  color: var(--white-color);
  opacity: 0;
  transition: opacity .18s ease-in-out;
  border-radius: inherit;
}

.trainer-card .trainer-photo:hover .photo-overlay,
.trainer-card .trainer-photo:focus-visible .photo-overlay {
  opacity: 1;
}

.trainer-carousel-buttons svg {
  stroke: var(--white-color);
  fill: none;
  stroke-width: 2px;
  width: 32px;
  height: 32px;
}

/* Mentors section theme */
#mentors { background-color: #252525; }

#mentors .title-margin { color: #fff; }

/* Map container in home */
#kakao-map-container {
  width: 100%;
  max-width: 420px;
  height: 180px;
  background: #f0f0f0;
}

@media (max-width: 768px) {
  #kakao-map-container {
    height: 200px;
    margin-top: 20px;
  }

  .trainer-card .rounded-circle {
    width: 80px;
    height: 80px;
  }

  .trainer-card h5 {
    font-size: 1rem;
  }

  .trainer-card h6 {
    font-size: .75rem;
  }

  .trainer-card p {
    font-size: .65rem;
  }

  .trainer-carousel-buttons svg {
    width: 28px;
    height: 28px;
  }
}

/* Full-bleed carousel row when needed */
#trainerCarousel.fullbleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* Scroll Down indicator */
.scroll-down {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  margin: 16px 0 0;
  cursor: pointer;
  color: #6b7280;
  user-select: none;
  text-decoration: none;
}

.scroll-down:hover {
  color: #4b5563;
}

.scroll-down span {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* chevron drop animation */
.scroll-down svg {
  width: 22px;
  height: 22px;
}

.scroll-down .chev {
  animation: sd-drop 1.4s infinite;
}

.scroll-down .chev:nth-child(2) {
  animation-delay: .15s;
}

.scroll-down .chev:nth-child(3) {
  animation-delay: .30s;
}

@keyframes sd-drop {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* 접근성: 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
  .scroll-down .chev {
    animation: none;
  }
}

/* 공통: 왜곡 없이 채우기 */
.alternating-page-layout-home img.img-fluid.rounded-3 {
  display: block;
  object-fit: cover;
  object-position: center;
  max-width: 100%;
  width: 100%;
  height: auto;
}

.alternating-page-layout-home .col-md-6 {
  overflow: hidden;
}

/* PC (>=992px) — 정확히 픽셀 고정 */
@media (min-width: 992px) {
  .alternating-page-layout-home img.img-fluid.rounded-3 {
    width: var(--feature-img-pc-w);
    height: var(--feature-img-pc-h) !important;
    max-width: none;
  }
}

/* Tablet (768px ~ 991px) — iPad Pro 등 태블릿 대응 */
@media (min-width: 768px) and (max-width: 991.98px) {
  .alternating-page-layout-home img.img-fluid.rounded-3 {
    width: 100% !important;
    max-width: 100% !important;
    height: 350px !important;
    object-fit: cover;
    object-position: center;
  }
  
  .alternating-page-layout-home .col-md-6 {
    overflow: hidden;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .alternating-page-layout-home .row.m-auto {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100%;
  }
}

/* Mobile (<768px) — 원하는 값으로 고정(또는 100%×auto로 바꿔도 됨) */
@media (max-width: 767.98px) {

  #hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
  }

  #hero .lead {
    font-size: 1rem;
  }

  .alternating-page-layout-home img.img-fluid.rounded-3 {
    width: var(--feature-img-m-w);
    height: var(--feature-img-m-h) !important;
  }
  
  .alternating-page-layout-home .col-md-6 {
    overflow: hidden;
  }
}
