/*
 * 品牌课程 小部件样式
 * 1:1 复刻 meizhuan/Luckilyring.html 中「品牌课程」区块
 */

.gt-bc,
.gt-bc * {
    box-sizing: border-box;
    border-radius: 0 !important;
}

.gt-bc {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gt-bc .gt-serif {
    font-family: 'Noto Serif SC', serif;
}

/* ---------- 顶部标题栏 ---------- */
.gt-bc-head {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem; /* mb-10 */
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
    padding-bottom: 1.25rem; /* pb-5 */
}

@media (min-width: 768px) {
    .gt-bc-head {
        flex-direction: row;
        align-items: flex-end;
    }
}

.gt-bc-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.875rem; /* text-3xl */
    line-height: 2.25rem;
    color: #000;
    letter-spacing: 0.15em;
    margin: 0;
}

.gt-bc-subtitle {
    color: #9ca3af; /* text-gray-400 */
    font-size: 0.75rem; /* text-xs */
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* ---------- 筛选（Tab） ---------- */
.gt-bc-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem; /* gap-6 */
    font-size: 0.875rem;
    color: #6b7280;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
}

.gt-bc-filters::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .gt-bc-filters {
        margin-top: 0;
        flex-wrap: wrap;
    }
}

.gt-bc-filters a {
    color: inherit;
    text-decoration: none;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.gt-bc-filters a:hover {
    color: #000;
    border-bottom-color: currentColor;
}

.gt-bc-filters a.is-active {
    color: #000;
    font-weight: 500;
    border-bottom-color: #000;
}

/* ---------- Tab 面板切换 ---------- */
.gt-bc-panel {
    display: none;
}

.gt-bc-panel.is-active {
    display: block;
    animation: gt-bc-fade 0.25s ease;
}

@keyframes gt-bc-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 卡片网格 ---------- */
.gt-bc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .gt-bc-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .gt-bc-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .gt-bc-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 单卡片 ---------- */
.gt-bc-card {
    display: block;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

.gt-bc-card-img {
    background: #f3f4f6; /* bg-gray-100 */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.gt-bc-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gt-bc-card:hover .gt-bc-card-img img {
    transform: scale(1.05);
}

/* ---------- 图片左上角分类徽章 ---------- */
.gt-bc-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #000;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 0.375rem 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

/* ---------- Swiper 轮播 ---------- */
.gt-bc-swiper {
    position: relative;
    padding-bottom: 3rem; /* 给分页器留空间 */
}

.gt-bc-swiper .swiper-slide {
    height: auto;
}

.gt-bc-swiper .swiper-slide .gt-bc-card {
    height: 100%;
}

.gt-bc-swiper .swiper-button-prev,
.gt-bc-swiper .swiper-button-next {
    color: #000;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease;
    top: calc(50% - 2rem);
}

.gt-bc-swiper .swiper-button-prev:hover,
.gt-bc-swiper .swiper-button-next:hover {
    background: #000;
    color: #fff;
}

.gt-bc-swiper .swiper-button-prev::after,
.gt-bc-swiper .swiper-button-next::after {
    font-size: 1rem;
    font-weight: 700;
}

.gt-bc-swiper .swiper-pagination {
    bottom: 0;
}

.gt-bc-swiper .swiper-pagination-bullet {
    background: #d1d5db;
    opacity: 1;
    width: 8px;
    height: 8px;
    transition: background 0.2s ease, width 0.2s ease;
}

.gt-bc-swiper .swiper-pagination-bullet-active {
    background: #000;
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .gt-bc-swiper .swiper-button-prev,
    .gt-bc-swiper .swiper-button-next {
        display: none;
    }
}

.gt-bc-card-body {
    padding-top: 1.5rem; /* pt-6 */
    padding-bottom: 1rem; /* pb-4 */
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.gt-bc-card:hover .gt-bc-card-body {
    border-bottom-color: #e5e7eb;
}

.gt-bc-card-meta {
    font-size: 10px;
    color: #9ca3af;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.gt-bc-card-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.25rem; /* text-xl */
    line-height: 1.75rem;
    color: #000;
    letter-spacing: 0.1em;
    margin: 0 0 0.75rem;
    transition: color 0.2s ease;
}

.gt-bc-card:hover .gt-bc-card-title {
    color: #4b5563; /* group-hover:text-gray-600 */
}

.gt-bc-card-desc {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.625;
    letter-spacing: 0.025em;
    margin: 0;
}
