/* ========================================
   第二區塊：認識加密貨幣學習即上手
   ======================================== */

/* 主區塊容器 */
.crypto-learning-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-margin-top: 100px;
}

/* ========================================
   Fixed 側邊欄裝飾元素（固定在螢幕左邊垂直置中）
   ======================================== */
.fixed-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.fixed-sidebar.visible {
    opacity: 1;
    pointer-events: auto;
}

.fixed-sidebar img {
    display: block;
    height: auto;
    max-height: 80vh;
    width: auto;
}

/* ========================================
   手機版懸浮 CTA 按鈕（固定在畫面最下方）
   ======================================== */
.mobile-floating-cta {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-decoration: none;
    width: 90%;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.mobile-floating-cta:hover {
    transform: translateX(-50%) scale(1.05);
}

.mobile-floating-cta img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   背景層
   ======================================== */
.crypto-learning-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* 背景圖片 */
.crypto-learning-background .bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.crypto-learning-background .bg-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   主要內容容器 (75vw)
   ======================================== */
.crypto-learning-section .main-container {
    position: relative;
    width: 75vw;
    margin: 0 auto;
    z-index: 10;
    height: 100%;
}

.crypto-learning-section .container-fluid {
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.crypto-learning-section .container-fluid .row {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* ========================================
   左側區塊：標題 (佔5格)
   ======================================== */
.crypto-learning-section .left-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 12px;
    height: 100%;
    align-self: center;
}

.section-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section2-title {
    font-family: 'AR FangXinShuH7B5Std', 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', 'Heiti TC', sans-serif;
    font-weight: 900;
    font-size: 64px;
    line-height: 1.3;
    color: #0b5b7c;
    letter-spacing: 1.4px;
    margin: 0;
}

.section-subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 26px;
    line-height: 1.6;
    color: #161616;
    margin: 0;
}

/* ========================================
   右側區塊：4張卡片 (佔7格)
   ======================================== */
.crypto-learning-section .right-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 12px;
    padding-right: 40px;
    height: 100%;
}

/* 2x2 Grid 佈局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 35px;
    width: 100%;
}

/* 卡片樣式 */
.crypto-card {
    border-radius: 12px;
    padding: 40px 25px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 卡片類型 1 背景（卡片1、4） */
.crypto-card.card-type-1 {
    background-image: url('https://cdn.chainee.io/camp/section2_card_1.png');
}

/* 卡片類型 2 背景（卡片2、3） */
.crypto-card.card-type-2 {
    background-image: url('https://cdn.chainee.io/camp/section2_card_2.png');
}

/* 卡片內容 */
.card-inner {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section2-card-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.5;
    color: white;
    letter-spacing: 0.6px;
    margin: 0;
    margin-top: 10px;
}

.card-description {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.8;
    color: white;
    letter-spacing: 0.42px;
    opacity: 0.95;
    margin: 0;
}

/* ========================================
   響應式設計 (RWD)
   ======================================== */

/* 平板尺寸 (768px ~ 1290px) */
@media (max-width: 1290px) and (min-width: 768px) {
    .crypto-learning-section .main-container {
        width: 90vw;
    }


    /* 左側標題區塊 */
    .crypto-learning-section .left-content {
        padding-right: 0px;
    }

    .section2-title {
        font-size: 45px;
        letter-spacing: 1px;
    }

    .section-subtitle {
        font-size: 18px;
    }

    /* 右側卡片區塊 */
    .crypto-learning-section .right-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cards-grid {
        gap: 10px;
    }

    .crypto-card {
        padding: 20px 15px;
        min-height: 160px;
    }

    .section2-card-title {
        font-size: 20px;
        letter-spacing: 0.4px;
    }

    .card-description {
        font-size: 14px;
        letter-spacing: 0.28px;
        line-height: 1.5;
    }
}

/* 平板及以下尺寸 (≤ 1290px) */
@media (max-width: 1290px) {
    /* 平板及以下尺寸直接隱藏左側懸浮按鈕 */
    .fixed-sidebar {
        display: none !important;
    }

    .crypto-learning-section .main-container {
        width: 90vw;
    }
}

/* 手機尺寸 (< 768px) */
@media (max-width: 767px) {
    /* 區塊高度改為 auto，因為內容變為垂直排列 */
    .crypto-learning-section {
        height: auto;
        min-height: 100vh;
        padding: 80px 0 100px 0;
        align-items: flex-start;
    }

    .crypto-learning-section .container-fluid {
        height: auto;
        align-items: flex-start;
    }

    .crypto-learning-section .container-fluid .row {
        height: auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-left: 0px;
        margin-right: 0PX;
    }

    .crypto-learning-section .main-container {
        width: 95vw;
        height: auto;
        margin: 0 auto;
    }

    /* 顯示手機版懸浮 CTA 按鈕 */
    .mobile-floating-cta {
        display: block;
    }

    /* 標題調整 */
    .crypto-learning-section .left-content {
        padding-right: 0;
        margin-bottom: 40px;
        height: auto;
        text-align: center;
    }

    .section-title-wrapper {
        width: 100%;
    }

    .section2-title {
        font-size: 36px;
        letter-spacing: 0.8px;
        text-align: center;
    }

    .section-subtitle {
        font-size: 18px;
        text-align: center;
    }

    /* 卡片改為 2x2 網格（兩張一排） */
    .crypto-learning-section .right-content {
        padding-left: 0;
        padding-right: 0;
        height: auto;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .crypto-card {
        padding: 25px 20px;
        min-height: 160px;
    }

    .section2-card-title {
        font-size: 22px;
    }

    .card-description {
        font-size: 16px;
    }

}

/* 小手機尺寸 (< 576px) */
@media (max-width: 575px) {
    .section2-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .section2-card-title {
        font-size: 20px;
    }

    .card-description {
        font-size: 15px;
    }
}
