/* ====== JinYer Balance Website - Shared Components ====== */

/* ====== Carousel System ====== */
.carousel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: #0b0b0d;
    width: 100%;
    height: calc(100vh - var(--nav-h));
}

.carousel-track {
    display: flex;
    gap: 0;
}

.slide {
    position: relative;
    min-width: 100%;
    isolation: isolate;
}

.slide img {
    width: 100%;
    height: calc(100vh - var(--nav-h));
    object-fit: cover;
    border-radius: 0;
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .78) 80%);
    z-index: 1;
}

.slide-content {
    position: absolute;
    inset: auto var(--pad-x) 12% var(--pad-x);
    z-index: 2;
    color: #f7f8fc;
    max-width: min(520px, 60vw);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    align-items: flex-start;
    text-align: left;
}

/* Badge System */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-weight: 600;
    font-size: .84rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
}

.slide h1 {
    font-size: clamp(1.9rem, 4.2vw, 3.2rem);
    line-height: 1.1;
    margin: 0;
}

.slide p {
    font-size: .95rem;
    opacity: .82;
    margin: 0;
}

/* CTA Row Layout */
.cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

/* Primary Button - White Pill / Black Font */
.slide .btn-primary {
    background: #fff !important;
    color: #000 !important;
    font-weight: 800;
    border: none;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slide .btn-primary:hover {
    background: #000 !important;
    color: #fff !important;
    transform: translateY(-2px);
}

/* Linear Pill Buttons - Outline / White Font */
.slide .btn-ghost {
    background: transparent !important;
    color: #fff !important;
    font-weight: 700;
    border: 1.5px solid #fff !important;
    padding: 11px 23px;
    /* Adjusted to account for border thickness */
}

.slide .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px);
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, .46);
    color: #f7f8fc;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 4;
    transition: .2s;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, .7);
}

.nav-btn.prev {
    left: 18px;
}

.nav-btn.next {
    right: 18px;
}

@media (max-width: 768px) {
    .nav-btn {
        display: none;
    }
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    cursor: pointer;
    transition: .2s;
}

.carousel-dots button.is-active {
    background: #6f6f6f;
    transform: scale(1.3);
}

/* Typography Extensions */
.stack-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3em;
    color: #1c2230;
    margin-bottom: 26px;
}

.stack-inline .bottom {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    letter-spacing: .12em;
}

.stack-inline .top {
    font-size: .85rem;
    opacity: .55;
}

/* Desktop/Dark Sections overrides */
.section-dark .stack-inline {
    color: #fff;
}

.section-dark .stack-inline .top {
    color: rgba(255, 255, 255, .75);
}

/* Responsive adjustments */
@media (max-width: 780px) {
    .slide-content {
        inset: auto 20px 40px 20px;
        gap: 12px;
        max-width: 90%;
    }
}

/* ====== Mobile Stacking for Slides (Task B) ====== */