/* =====================================================
   吉祥物區塊 – mascot.css
   電腦 (> 768px): 三欄並排展示
   手機 (≤ 768px): Carousel 輪播
   ===================================================== */

/* ── Wrapper ── */
.mascot-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    user-select: none;
}

/* =====================================================
   ★ 電腦版 (> 768px) – 三欄並排，不用 carousel
   ===================================================== */
@media (min-width: 769px) {

    /* 把 carousel 容器改成 flex 三欄 */
    .mascot-carousel {
        display: flex;
        gap: 1.5rem;
        height: 520px;
        overflow: visible;
        border-radius: 0;
    }

    /* 三張 slide 全部同時顯示 */
    .mascot-slide {
        display: flex !important;   /* 覆蓋 display:none */
        flex: 1;
        height: 100%;
        animation: none;            /* 不需要淡入動畫 */
        opacity: 1;
    }

    /* 隱藏 carousel 控制項 */
    .mascot-nav,
    .mascot-dots {
        display: none !important;
    }

    /* ── Slide 0 Cover ── */
    .mascot-slide-cover {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 20px;
        background: #000;
        box-shadow: 0 16px 60px rgba(0,0,0,0.8),
                    0 0 0 2px rgba(212,175,55,0.35);
        display: flex;
        justify-content: center;
        cursor: pointer;
    }

    .mascot-cover-img {
        width: auto;
        max-width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        display: block;
        transition: transform 0.6s ease;
    }

    .mascot-slide-cover:hover .mascot-cover-img {
        transform: scale(1.04);
    }

    /* ── Slides 1 & 2 Pet Cards ── */
    .mascot-slide-card {
        display: flex;
        flex-direction: column;     /* 上圖下文 in 三欄模式 */
        width: 100%;
        height: 100%;
        border-radius: 20px;
        overflow: hidden;
        background: rgba(15,15,20,0.7);
        border: 1px solid rgba(212,175,55,0.25);
        backdrop-filter: blur(14px);
        box-shadow: 0 12px 48px rgba(0,0,0,0.65);
        transition: transform 0.35s cubic-bezier(0.23,1,0.32,1),
                    box-shadow 0.35s ease;
    }

    .mascot-slide-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 24px 56px rgba(212,175,55,0.18),
                    0 8px 32px rgba(0,0,0,0.7);
        border-color: rgba(212,175,55,0.5);
    }

    .mascot-slide-img-wrap {
        position: relative;
        flex: 0 0 62%;              /* 上方圖片佔 62% 高度 */
        width: 100%;
        overflow: hidden;
        background: #000;
    }

    .mascot-slide-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
        transition: transform 0.55s ease;
    }

    .mascot-slide-card:hover .mascot-slide-img {
        transform: scale(1.07);
    }

    .mascot-slide-info {
        flex: 1;
        padding: 1.2rem 1.4rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
        overflow: hidden;
    }
}

/* =====================================================
   共用樣式（電腦 + 手機都套用）
   ===================================================== */

/* Paw decorations */
.mascot-paw {
    position: absolute;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.35s ease;
    z-index: 3;
    pointer-events: none;
    line-height: 1;
}

.paw-tl {
    top: 10px;
    left: 10px;
    transform: rotate(-20deg) scale(0.7);
}

.paw-br {
    bottom: 10px;
    right: 10px;
    transform: rotate(30deg) scale(0.7);
}

.mascot-slide-card:hover .mascot-paw {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Cover overlay caption */
.cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    display: flex;
    justify-content: center;
}

.cover-caption {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #f0d78c;
    letter-spacing: 0.1em;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* Badge */
.mascot-badge {
    display: inline-block;
    background: linear-gradient(135deg, #c8a84b, #f0d78c, #c8a84b);
    color: #1a1208;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(200,168,75,0.4);
    align-self: flex-start;
}

.mascot-name {
    font-family: var(--font-serif-cn, 'Noto Serif TC', serif);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--gold-300, #f0d78c);
    margin: 0;
    line-height: 1.15;
    letter-spacing: 0.06em;
}

.mascot-species {
    font-size: 0.82rem;
    color: var(--gold-500, #c8a84b);
    margin: 0;
    letter-spacing: 0.05em;
}

.mascot-bio {
    font-size: clamp(0.78rem, 1.3vw, 0.88rem);
    color: var(--text-secondary, #b0b0b0);
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.mascot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.mascot-tag {
    font-size: 0.68rem;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.05em;
    color: var(--gold-400, #d4af37);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 20px;
    padding: 2px 10px;
    background: rgba(212,175,55,0.07);
    transition: background 0.2s, border-color 0.2s;
    cursor: default;
}

.mascot-tag:hover {
    background: rgba(212,175,55,0.18);
    border-color: rgba(212,175,55,0.7);
}

/* Navigation Arrows（手機用） */
.mascot-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10,10,15,0.65);
    border: 1px solid rgba(212,175,55,0.45);
    color: #d4af37;
    font-size: 1.7rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
    z-index: 10;
}

.mascot-nav:hover {
    background: rgba(212,175,55,0.2);
    border-color: #d4af37;
    transform: translateY(-50%) scale(1.1);
}

.mascot-prev { left: -20px; }
.mascot-next { right: -20px; }

/* Dot Indicators（手機用） */
.mascot-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.2rem;
}

.mascot-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    padding: 0;
}

.mascot-dot.active {
    background: #d4af37;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(212,175,55,0.6);
}

/* =====================================================
   ★ 手機版 (≤ 768px) – Carousel 輪播
   ===================================================== */
@keyframes mascotFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .mascot-carousel-wrapper {
        max-width: 100%;
    }

    /* ── Carousel track ── */
    .mascot-carousel {
        display: block;
        position: relative;
        width: 100%;
        height: auto;
        overflow: hidden;
        border-radius: 16px;
    }

    /* 手機 slides：一次只顯示一張 */
    .mascot-slide {
        display: none;
        height: auto;
        animation: mascotFadeIn 0.5s ease forwards;
    }

    .mascot-slide.active {
        display: block;
    }

    /* 封面 slide */
    .mascot-slide-cover {
        position: relative;
        width: 100%;
        height: 500px;
        overflow: hidden;
        border-radius: 16px;
        background: #000;
        box-shadow: 0 12px 40px rgba(0,0,0,0.7),
                    0 0 0 1px rgba(212,175,55,0.3);
        display: flex;
        justify-content: center;
    }

    .mascot-cover-img {
        width: auto;
        max-width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        display: block;
    }

    /* 介紹卡：上圖下文 */
    .mascot-slide-card {
        display: flex;
        flex-direction: column;
        border-radius: 16px;
        overflow: hidden;
        background: rgba(15,15,20,0.75);
        border: 1px solid rgba(212,175,55,0.25);
        backdrop-filter: blur(12px);
        box-shadow: 0 8px 32px rgba(0,0,0,0.65);
        height: auto;
    }

    .mascot-slide-img-wrap {
        position: relative;
        flex: none;
        width: 100%;
        height: 260px;
        overflow: hidden;
        background: #000;
    }

    .mascot-slide-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 15%;
        display: block;
    }

    .mascot-slide-info {
        flex: 1;
        padding: 1.4rem 1.2rem;
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }

    .mascot-name {
        font-size: clamp(1.5rem, 6vw, 1.9rem);
    }

    .mascot-bio {
        font-size: 0.87rem;
        line-height: 1.78;
    }
}

@media (max-width: 450px) {
    .mascot-slide-cover {
        height: 400px;
    }

    .mascot-slide-img-wrap {
        height: 220px;
    }

    .mascot-slide-info {
        padding: 1.1rem 1rem;
    }

    .mascot-name {
        font-size: 1.4rem;
    }

    .mascot-prev { left: -12px; }
    .mascot-next { right: -12px; }
}