/**
 * TopKursus — responsive extras for newer homepage/author features.
 * Loaded after style.css so media queries can tame admin-controlled sizes.
 */

/* ---------- Homepage hero (CMS sizes) ---------- */
.tk-home-banner-img {
  max-width: var(--tk-banner-max, 750px);
  background-image: var(--tk-banner-bg, none);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: var(--tk-banner-size, contain);
}

.tk-home-banner-img .tk-home-hero-img {
  max-width: var(--tk-hero-img-max, 100%);
  width: 100%;
  height: auto;
}

@media (max-width: 1399.98px) {
  .tk-home-banner-img {
    max-width: min(var(--tk-banner-max, 750px), 650px) !important;
  }
}

@media (max-width: 1199.98px) {
  .tk-home-banner-img {
    max-width: min(var(--tk-banner-max, 750px), 560px) !important;
  }
}

@media (max-width: 991.98px) {
  .tk-home-banner-img {
    display: none !important;
  }

  .hero-section .hero-content h1 {
    font-size: clamp(1.55rem, 5.2vw, 2.15rem);
    line-height: 1.25;
    word-break: break-word;
  }

  .hero-section .banner-info {
    margin-top: 12px;
  }

  .hero-section .banner-info > div {
    margin-right: 1rem !important;
  }

  .hero-section .banner-info img {
    max-width: 40px;
    height: auto;
  }
}

@media (max-width: 575.98px) {
  .hero-section .banner-form .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-section .badge {
    white-space: normal;
    text-align: left;
  }
}

/* ---------- Work / Cara Reservasi ---------- */
@media (max-width: 991.98px) {
  .work-section .work-bg1,
  .work-section .work-bg2 {
    opacity: 0.35;
    pointer-events: none;
    max-width: 120px;
  }

  .work-section .work-bg1 img,
  .work-section .work-bg2 img {
    max-width: 100%;
    height: auto;
  }

  .work-item {
    padding: 0 12px 8px;
  }

  .work-item img {
    max-width: 64px;
    height: auto;
  }

  .work-section .section-header h2 {
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    line-height: 1.3;
  }
}

@media (max-width: 767.98px) {
  .work-section {
    padding: 28px 16px !important;
    margin: 24px 0 !important;
  }

  .work-section .work-bg1,
  .work-section .work-bg2 {
    display: none;
  }

  .work-item {
    padding: 0 4px 16px;
  }

  .work-item h6 {
    font-size: 1rem;
  }

  .work-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
}

/* ---------- Business / Jadi Mentor ---------- */
.tk-business-img {
  max-width: var(--tk-business-img-max, 100%);
  width: 100%;
  height: auto;
  display: inline-block;
}

.business-section .tk-business-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  padding: 0.7rem 1.1rem;
}

@media (max-width: 991.98px) {
  .business-section .display-4 {
    font-size: clamp(1.6rem, 5vw, 2.4rem) !important;
    line-height: 1.25;
  }

  .business-img {
    margin-left: 0 !important;
    margin-top: 1rem;
    text-align: center;
  }

  .tk-business-img {
    max-width: min(var(--tk-business-img-max, 100%), 100%) !important;
  }
}

@media (max-width: 767.98px) {
  .business-section .col-md-6 {
    text-align: center;
  }

  .business-section .section-header {
    text-align: center;
  }

  .business-section .tk-business-cta {
    width: 100%;
  }
}

/* ---------- Authors list ---------- */
.tk-authors-page .section-header h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.tk-authors-page .author-card a {
  padding: 1.25rem;
}

.tk-authors-page .author-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.tk-authors-page .author-card-copy {
  min-width: 0;
  flex: 1;
}

.tk-authors-page .author-photo {
  flex-shrink: 0;
}

.tk-authors-page .author-meta {
  word-break: break-word;
}

@media (max-width: 575.98px) {
  .tk-authors-page .author-card a {
    padding: 1rem;
  }

  .tk-authors-page .author-photo {
    width: 56px;
    height: 56px;
  }

  .tk-authors-page .author-name {
    font-size: 1rem;
  }

  .tk-authors-page .author-meta .text-muted {
    display: block;
    margin-top: 0.15rem;
  }
}

@media (hover: none) {
  .tk-authors-page .author-card:hover,
  .tk-author-detail .writing-card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ---------- Author detail ---------- */
.tk-author-detail .profile-panel {
  padding: 1.5rem;
}

.tk-author-detail .profile-name {
  font-size: clamp(1.4rem, 4.5vw, 1.75rem);
  word-break: break-word;
}

.tk-author-detail .writing-card h5 {
  font-size: 1.05rem;
  line-height: 1.35;
  word-break: break-word;
}

@media (max-width: 767.98px) {
  .tk-author-detail .profile-panel {
    padding: 1.15rem;
    text-align: center;
  }

  .tk-author-detail .profile-photo {
    width: 96px;
    height: 96px;
  }

  .tk-author-detail .author-socials {
    justify-content: center;
  }

  .tk-author-detail .section-header {
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .tk-author-detail .writing-card .p-3 {
    padding: 0.9rem !important;
  }
}

/* ---------- Author box (post/academy detail) ---------- */
.content-author-box .author-main {
  align-items: flex-start;
  min-width: 0;
}

.content-author-box .author-main > div {
  min-width: 0;
  flex: 1;
}

.content-author-box .author-bio {
  word-break: break-word;
}

@media (max-width: 575.98px) {
  .content-author-box .author-main {
    gap: 0.75rem;
  }

  .content-author-box .author-main img {
    width: 52px;
    height: 52px;
  }

  .content-author-box .author-name {
    font-size: 1rem;
  }

  .content-author-box .author-socials a {
    width: 34px;
    height: 34px;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tk-authors-page .author-card,
  .tk-author-detail .writing-card,
  .animation-float {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
