/**
 * RS 遊學團展示系統樣式
 *
 * 完全對應 Figma 設計稿要求
 * 桌面版 (≥767px) 和手機版 (<767px) 響應式設計
 *
 * @package RSStudytour
 * @since 1.0.0
 */

/* ========================================
   分類導航樣式
   ======================================== */

.rsstudytour-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 40px;
}

.rsstudytour-nav-item {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 18px;
    line-height: 28.8px;
    letter-spacing: 1.8px;
    border-radius: 25px;
    padding: 10px 60px;
    background: #F8F8F8;
    color: #333333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.rsstudytour-nav-item:hover,
.rsstudytour-nav-item.active {
    background: #F29345;
    color: white;
}

.rsstudytour-nav-image {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 2px;
}

.rsstudytour-nav-text {
    white-space: nowrap;
}

/* ========================================
   文章列表容器
   ======================================== */

.rsstudytour-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* ========================================
   桌面版分類區塊 (≥767px)
   ======================================== */

.rsstudytour-category {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rsstudytour-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.rsstudytour-category-flag {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.rsstudytour-category-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.rsstudytour-category-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

/* ========================================
   桌面版表格樣式
   ======================================== */

.rsstudytour-table-container {
    overflow-x: auto;
    box-shadow: 1px 4px 20px rgba(156, 156, 156, 0.25);
    border-radius: 10px;
    background: white;
}

.rsstudytour-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px; /* 確保桌面版表格寬度 */
}

/* 表格標頭 - 重要: 橙色背景 */
.rsstudytour-table-header {
    background: #F29345;
}

.rsstudytour-table-header th {
    padding: 16px 12px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-align: center;
    border: none;
    white-space: nowrap;
}

/* 表格內容行 */
.rsstudytour-table-row {
    border-bottom: 1px solid #E5E5E5;
    transition: background-color 0.3s ease;
}

.rsstudytour-table-row:hover {
    background-color: #FFF9EA;
}

.rsstudytour-table-row:last-child {
    border-bottom: none;
}

.rsstudytour-table-row td {
    padding: 16px 12px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    color: #333333;
    text-align: center;
    border: none;
    vertical-align: middle;
}

/* 桌面版標題容器 */
.rsstudytour-list td .rsstudytour-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

/* 額滿標籤預留位置 */
.rsstudytour-full-placeholder {
    display: flex;
    justify-content: center;
    flex-shrink: 0; /* 不允許收縮 */
}

/* 文章標題連結 */
.rsstudytour-post-link {
    color: #333333;
    text-decoration: none;
    cursor: pointer;
}

.rsstudytour-post-link:hover {
    color: #F29345;
    text-decoration: underline;
}

/* 額滿標籤 */
.rsstudytour-full {
    background: #F97066;
    color: white;
    padding: 4px 6px;
    border-radius: 2px;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    pointer-events: none;
    display: inline-block;
}

/* 隱藏的假額滿標籤 */
.rsstudytour-full-hidden {
    background: transparent !important;
    color: transparent !important;
    user-select: none; /* 不可複製 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* 不可點擊 */
}


/* ========================================
   手機版樣式 (<767px)
   ======================================== */

/* 手機版隱藏桌面版表格 */
@media (max-width: 766px) {
    .rsstudytour-table-container {
        display: none;
    }

    .rsstudytour-category {
        display: none;
    }
}

/* 手機版分類容器 */
.rsstudytour-category-mobile {
    display: none;
}

@media (max-width: 766px) {
    .rsstudytour-category-mobile {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 40px;
    }
}

/* 手機版分類標頭 */
.rsstudytour-category-header-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rsstudytour-category-icon-mobile {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

.rsstudytour-category-title-mobile {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

/* 手機版文章容器 */
.rsstudytour-posts-mobile {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 手機版卡片 - 按照 Figma 設計 */
.rsstudytour-mobile-card {
    width: 361px;
    padding: 20px;
    background: #FFF9EA;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    display: inline-flex;
    margin: 0 auto;
}

/* 手機版上方區域 - 國旗+分類+團號 */
.rsstudytour-mobile-top {
    align-self: stretch;
    justify-content: space-between;
    align-items: center;
    display: inline-flex;
}

/* 手機版左側 - 國旗+分類 */
.rsstudytour-mobile-left {
    justify-content: flex-start;
    align-items: flex-end;
    gap: 2px;
    display: flex;
}

/* 手機版固定MAP圖示 */
.rsstudytour-mobile-map-icon {
    width: 17px;
    height: 18px;
}

/* 手機版分類名稱 */
.rsstudytour-mobile-category {
    width: 29px;
    justify-content: center;
    display: flex;
    flex-direction: column;
    color: #333333;
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 22.40px;
    letter-spacing: 0.70px;
    word-wrap: break-word;
}

/* 手機版團號 */
.rsstudytour-mobile-number {
    text-align: center;
    color: #333333;
    font-size: 16px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.80px;
    word-wrap: break-word;
}

/* 手機版內容區域 */
.rsstudytour-mobile-content {
    width: 279px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    display: flex;
}

/* 手機版標題行 - 額滿+團名 */
.rsstudytour-mobile-title-row {
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    display: inline-flex;
}

/* 手機版額滿標籤 */
.rsstudytour-mobile-full {
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 4px;
    padding-bottom: 4px;
    background: #F97066;
    border-radius: 2px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    display: flex;
}

.rsstudytour-mobile-full-text {
    text-align: center;
    color: white;
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 22.40px;
    letter-spacing: 0.70px;
    word-wrap: break-word;
}

/* 手機版隱藏的假額滿標籤 */
.rsstudytour-mobile-full-hidden {
    background: transparent !important;
    user-select: none; /* 不可複製 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* 不可點擊 */
}

.rsstudytour-mobile-full-hidden .rsstudytour-mobile-full-text {
    color: transparent !important;
}

/* 手機版團名連結 */
.rsstudytour-mobile-link {
    text-align: center;
    color: #333333;
    font-size: 16px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    text-decoration: none;
    line-height: 24px;
    letter-spacing: 0.80px;
    word-wrap: break-word;
    cursor: pointer;
}

.rsstudytour-mobile-link:hover {
    color: #F29345;
    text-decoration: underline;
}

/* 手機版資訊區域 */
.rsstudytour-mobile-info {
    align-self: stretch;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    display: flex;
}

/* 手機版資訊行 */
.rsstudytour-mobile-field {
    align-self: stretch;
    justify-content: flex-start;
    align-items: center;
    gap: 13px;
    display: inline-flex;
}

/* 手機版標籤 */
.rsstudytour-mobile-label {
    text-align: center;
    color: #333333;
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 22.40px;
    letter-spacing: 0.70px;
    word-wrap: break-word;
}

/* 手機版分隔線 */
.rsstudytour-mobile-separator {
    width: 1px;
    height: 10px;
    background: #A1A1A1;
}

/* 手機版數值 */
.rsstudytour-mobile-value {
    text-align: center;
    color: #333333;
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 22.40px;
    letter-spacing: 0.70px;
    word-wrap: break-word;
}

/* 手機版日期等重要數值 */
.rsstudytour-mobile-value-large {
    text-align: center;
    color: #333333;
    font-size: 16px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.80px;
    word-wrap: break-word;
}

/* ========================================
   響應式調整
   ======================================== */

@media (max-width: 766px) {
    .rsstudytour-nav {
        gap: 12px;
        margin-bottom: 30px;
    }

    .rsstudytour-nav-item {
        font-size: 16px;
        letter-spacing: 1.2px;
        padding: 8px 30px;
    }

    .rsstudytour-list {
        gap: 40px;
    }

    /* 手機版卡片響應式調整 */
    .rsstudytour-mobile-card {
        width: 100%;
        max-width: 361px;
        min-width: 280px;
    }

    .rsstudytour-mobile-content {
        width: 100%;
        max-width: 279px;
    }
}

/* ========================================
   列印樣式
   ======================================== */

@media print {
    .rsstudytour-nav {
        display: none;
    }

    .rsstudytour-mobile-card,
    .rsstudytour-category-mobile {
        display: none;
    }

    .rsstudytour-category {
        display: block !important;
        page-break-inside: avoid;
    }

    .rsstudytour-table-container {
        display: block !important;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .rsstudytour-table {
        min-width: auto;
    }

    .rsstudytour-full {
        background: #ccc !important;
        color: #000 !important;
    }
}