/* style.css - 網站主要樣式表 */

/* 基礎樣式設定 */
body {
    font-family: 'Inter', sans-serif; /* 設定網站字體 */
    /* 背景圖片與疊加層，讓頁面看起來更活潑 */
    background-image: url('assets/SmartSelect_20250201_131436_Gallery.png');
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: rgba(224, 242, 247, 0.8);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px; /* 預設最大寬度，適用於平板及較小桌面 */
    margin: 0 auto;
    padding: 1rem;
}

/* 船公司卡片樣式 */
.company-card {
    background-color: #ffffff;
    border: 2px solid #9ca3af; /* ✅ 邊框加上去、顏色較深 */
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}


.company-card:hover {
    transform: translateY(-5px); /* 懸停時卡片稍微上浮 */
}

/* 船公司標題區塊樣式 */
.company-title-block {
    color: rgb(255, 255, 255);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    /* 預設漸層背景，各公司會有自己的顏色 */
    background-image: linear-gradient(to right, #253444, #0056b3);
    flex-shrink: 0;
}

.company-title-block h3 {
    margin: 0; /* 移除標題內建的邊距 */
}

/* 船班時刻表格樣式 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    flex-grow: 1;
}

.schedule-table th, .schedule-table td {
    padding: 0.6rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0; /* 表格底線 */
}

.schedule-table th {
    background-color: #f0f4f8;
    font-weight: 600;
    color: #4a5568;
    border-radius: 0.5rem 0.5rem 0 0; /* 表頭圓角 */
}

.schedule-table tr:last-child td {
    border-bottom: none; /* 最後一行不需要底線 */
}

/* 備註文字樣式 */
.notes {
    font-size: 0.875rem;
    color: #ef4444; /* 醒目的紅色 */
    margin-top: 1rem;
    white-space: pre-wrap; /* 保留換行 */
}

/* 聯絡資訊樣式 */
.contact-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    white-space: pre-wrap;
}

/* 已過時間的班次樣式，會有閃爍效果 */
.passed-time {
    color: #9ca3af;
    text-decoration: line-through;
    transition: opacity 0.3s ease-in-out;
}

/* 下一班船的高亮樣式 */
.next-ferry-time {
    background-color: #d1fae5;
    font-weight: bold;
    color: #065f46;
    border-radius: 0.25rem;
}

/* 頁首圖片容器樣式，包含背景圖和文字疊加 */
.header-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0 0 3rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(70%); /* 讓圖片稍微暗一點，文字更清晰 */
}



/* 關於作者區塊樣式 */
.about-author-section {
    background-color: #ffffff6e;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin: 0 auto 1rem auto;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* 航班照片下載區塊樣式 */
.download-section {
    background-color: #ffffffc2;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.download-section img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin: 0 auto 1.5rem auto;
    display: block;
}

.download-button {
    display: inline-block;
    background-color: #28a745; /* 綠色按鈕 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.download-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Instagram 按鈕樣式 */
.instagram-button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); /* Instagram 經典漸層 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(220, 40, 67, 0.4);
}

.instagram-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 40, 67, 0.6);
}

.instagram-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    fill: currentColor;
}
/* =========================================
   關於作者區塊 - 高質感版
   ========================================= */

.author-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
    padding: 2.5rem 1.5rem;
    margin: 2rem auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 650px;
}

/* 大頭貼圓框優化 */
.author-avatar {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.2rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.author-avatar:hover {
    transform: rotate(5deg) scale(1.05);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 標題與內文 */
.author-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
}

.author-bio {
    font-size: 1rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: justify; /* 讓文字兩端對齊，看起來更整齊 */
    padding: 0 10px;
}

/* 按鈕容器佈局 */
.author-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Instagram 按鈕美化 */
.instagram-button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
}

.instagram-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.5);
}

/* 了解我更多按鈕美化 */
.more-about-me-button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #2ecc71, #00c2cb);
    color: white !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.more-about-me-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

/* 手機版優化 */
@media (max-width: 480px) {
    .author-section {
        padding: 2rem 1.2rem;
        width: 95%;
    }
    
    .author-bio {
        font-size: 0.9rem;
    }

    .author-links a {
        width: 100%; /* 手機版按鈕撐滿寬度，更好點擊 */
        justify-content: center;
    }
}
/* 新增到主畫面按鈕樣式 */
.add-to-home-button {
    display: inline-flex;
    align-items: center;
    background-color: #007bff; /* 藍色按鈕 */
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    margin-bottom: 1.5rem;
}

.add-to-home-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.add-to-home-button svg {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    fill: currentColor;
}

/* Modal 視窗疊加層樣式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal 視窗內容樣式 */
.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

/* Modal 關閉按鈕樣式 */
.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-content ol li {
    margin-bottom: 0.75rem;
    color: #374151;
    line-height: 1.6;
}

.modal-content ol li strong {
    color: #007bff;
}

.modal-content .tip {
    background-color: #e0f2f7;
    border-left: 4px solid #007bff;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    margin-top: 1.5rem;
}

/* =========================================
   最新航班公告：精緻微調版 (標題置頂、文字微縮)
   ========================================= */

.suspension-main-card {
    background-color: #ffffff !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    padding: 1.2rem !important; /* 縮小一點點內距 */
    margin-bottom: 1.5rem !important;
    border-top: 6px solid #e03131 !important; /* 改為紅色更顯眼 */
    text-align: center !important; /* 讓主標題置中 */
}

/* 「最新航班公告」主標題 */
.suspension-main-card h2 {
    color: #c62828 !important;
    margin-top: 0 !important;
    margin-bottom: 1.2rem !important;
    font-size: 1.5rem !important; /* 稍微縮小，更精緻 */
    font-weight: 900 !important;
    letter-spacing: 2px;
}

/* 單個公告卡片內層 */
.suspension-item {
    background-color: #f8fafc !important;
    border-radius: 10px !important;
    padding: 0.8rem 1rem !important; /* 緊湊一點 */
    margin-bottom: 0.8rem !important;
    border: 1px solid #f1f5f9 !important;
    border-left: 4px solid #cbd5e1 !important; /* 左側灰色基底線 */
    text-align: left !important; /* 內容維持靠左閱讀 */
}

/* 公告頭部 (日期與標籤) */
.suspension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.suspension-item .date {
    font-weight: 700 !important;
    color: #94a3b8 !important; /* 日期顏色再淡一點 */
    font-size: 0.85rem !important;
}

/* 【重點改動】公告內容文字微縮 */
.announcement-content {
    font-size: 0.95rem !important; /* 從原本的 1.1 縮小到 0.95 */
    color: #475569 !important; /* 顏色稍微減輕一點點視覺壓力 */
    font-weight: 700 !important;
    line-height: 1.5 !important;
    white-space: pre-wrap;
}
.announcement-content {
    /* 改成 normal，避免瀏覽器強行顯示結尾的空白換行 */
    white-space: normal !important; 
    /* 移除任何可能的底邊距 */
    margin-bottom: 0 !important;
}

.suspension-item {
    /* 確保項目內部底部不留過多空間 */
    padding-bottom: 0.8rem !important;
}

/* 針對資料來源標籤的修正 */
.footer-source {
    margin-top: 5px !important;
    padding-top: 5px !important;
}
/* 狀態標籤微調 */
.status-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.75rem; /* 標籤也小一點 */
}

/* 資料來源文字 */
.suspension-main-card .footer-source {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    margin-top: 1rem;
}

/* 5. 狀態標籤樣式：五色映射 */
.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

/* danger -> 紅標 [停班停船] */
.status-tag.danger {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* info -> 綠標 [正常航運] */
.status-tag.info {
    background-color: #dcfce7;
    color: #16a34a;
    border-color: #bbf7d0;
}

/* warning -> 橘標 [船班公告] */
.status-tag.warning {
    background-color: #ffedd5;
    color: #ea580c;
    border-color: #fed7aa;
}

/* adjust -> 紫標 [船班調整] */
.status-tag.adjust {
    background-color: #f3e8ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}

/* resume -> 青標 [恢復船班] */
.status-tag.resume {
    background-color: #ecfeff;
    color: #0891b2;
    border-color: #cffafe;
}

/* 針對電腦螢幕的調整 */
@media (min-width: 1024px) {
    .container {
        max-width: 900px; /* 調整為更適合電腦螢幕的寬度，從 1000px 縮小到 900px */
        padding: 1.5rem 2rem; /* 增加左右內邊距，讓內容不那麼貼邊 */
    }
    .grid-cols-1-lg-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .header-image-container {
        height: 300px; /* 桌面高度調整 */
    }
}

/* 小工具區塊樣式 */
.utility-section {
    background-color: #ffffff; /* 白色背景 */
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.utility-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

/* 了解我更多按鈕樣式 */
.more-about-me-button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #20bf55, #01baef); /* 藍綠色漸層 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(32, 191, 85, 0.4);
}

.more-about-me-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(32, 191, 85, 0.6);
}

/* 新增的警告區塊樣式 */
.warning-section {
    background-color: #fffbeb; /* 淺黃色背景 */
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 2px solid #f59e0b; /* 橘色邊框 */
    color: #d97706; /* 深橘色文字 */
}

.warning-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #d97706; /* 橘色標題 */
    margin-bottom: 1rem;
}

.warning-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* 天氣區塊樣式 */
.weather-section {
    padding: 20px;
    background-color: #ffffffa8;
    border-radius: 1rem; /* 使用 1rem 保持與其他卡片一致 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 使用與其他卡片一致的陰影 */
    display: flex;
    flex-direction: column;
    margin-top: 2rem; /* 與上方區塊的間距 */
    margin-bottom: 1.5rem; /* 與下方區塊的間距 */
}

/* 統一的區塊標題樣式 */
.section-title {
    font-size: 2rem; /* 保持與 utility-section h2 一致 */
    font-weight: 700;
    color: #000000; /* 保持與 utility-section h2 一致 */
    margin-top: 0;
    margin-bottom: 1.5rem; /* 保持與 utility-section h2 一致 */
    padding-bottom: 10px;
    border-bottom: 2px solid; /* 底部邊框 */
    border-image: linear-gradient(to right, transparent, #007bff, transparent) 4; /* 藍色漸層邊框 */
    text-align: center;
    width: 100%;
}

/* 天氣卡片內部樣式 */
.weather-card {
    background-color: #62b6fa;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(216, 212, 212, 0.1);
}

.weather-card-header {
    margin-bottom: 15px;
}

.weather-card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #000000;
}

.temperature {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.weather-icon {
    width: 64px;
    height: 64px;
}

.temperature span {
    font-size: 2.5rem;
    font-weight: bold;
    margin-left: 10px;
}

.weather-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.weather-details span {
    color: #000000;
}

.air-quality {
    color: #000000;
}

/* =========================
🧭 琉急式固定導覽列（新版本）
========================= */
:root {
  --nav-h: 58px; /* 導覽列固定高度 */
}

/* 導覽列主體 */
#nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 10000;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* 滾動後增加陰影與深度 */
#nav-fixed.scrolled {
  background: rgba(0, 40, 80, 0.7);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 導覽內容容器 */
.nav-container {
  width: min(94%, 1080px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.nav-logo {
  height: 50px;
  transition: transform 0.3s ease;
}
.nav-logo:hover {
  transform: scale(1.06);
}

/* 右側選單 - 【修正】按鈕膠囊化 */
.nav-right {
  display: flex;
  gap: 1.5rem;
}

.nav-right a {
  color: #fff;
  font-weight: 700; /* 加粗，更有質感 */
  font-size: 1.05rem;
  text-decoration: none;
  padding: 6px 16px; /* 修正按鈕內邊距 */
  border-radius: 50px; /* 完美膠囊 */
  transition: all 0.2s ease-in-out;
}

/* 【修正】Hover 效果：乾淨的膠囊底色，不再有粗線條 */
.nav-right a:hover {
  background: rgba(255, 255, 255, 0.15); /* 柔和的白色膠囊感 */
  transform: translateY(-1px);
}

/* RWD 手機版 - 保持你的設定 */
@media (max-width: 768px) {
  #nav-fixed {
    height: 75px;
  }
  .nav-logo {
    height: 58px;
  }
  .nav-right {
    gap: 1rem;
  }
  .nav-right a {
    font-size: 1rem;
    padding: 8px 10px;
  }
}

/* 為了避免導覽列蓋到內容 */
body {
  padding-top: var(--nav-h);
}

/* =========================================
   訪問人數統計膠囊
   ========================================= */
#visitor-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: rgba(30, 41, 59, 0.8); /* 深色半透明底 */
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 50px; /* 膠囊形狀 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px); /* 毛玻璃效果 */
    margin: 2rem auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: default;
}

/* 懸停效果：稍微亮一點 */
#visitor-count:hover {
    background: rgba(30, 41, 59, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 數據載入完成後的淡入動畫 */
@keyframes fadeInData {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.visitor-loaded {
    animation: fadeInData 0.5s ease forwards;
}

/* 手機版字體稍微縮小 */
@media (max-width: 480px) {
    #visitor-count {
        font-size: 0.85rem;
        padding: 6px 16px;
    }
}

/** 船票資訊樣式 */
.ticket-info {
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem;
  margin-top: 1rem;
  border-left: 4px solid #1c7ed6;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  color: #1f2937;
  line-height: 1.6;
}

.ticket-info ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.ticket-info li {
  margin-bottom: 0.3rem;
}

.ticket-info strong {
  color: #e03131;
}
.ticket-info {
  margin-top: 10px;
  padding: 8px 12px;
  border-left: 3px solid #d32f2f;
  background: #fff8f8;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
}
.ticket-info p {
  margin: 4px 0;
}
#current-taiwan-time {
  font-family: "Roboto Mono", monospace;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 10px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255,255,255,0.6);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2),
              0 2px 8px rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  display: inline-block;
  margin-top: 10px;
  transition: all 0.3s ease;
}
#current-taiwan-time:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.03);
}
#current-taiwan-time {
  font-family: "Noto Sans TC", sans-serif;
  background: rgba(0,0,0,0.3);
  color: #fff;
  padding: 8px 18px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
/** 船班快速選擇區塊 */
.ferry-selector {
  background: rgba(255, 255, 255, 0.623);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  backdrop-filter: blur(6px);
}

.ferry-selector h2 {
  font-size: 1.8rem;
  color: #01103b;
  margin-bottom: 1rem;
  font-weight: 700;
}

.selector-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

/* 基礎按鈕樣式 */
.ferry-btn {
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

/* 漸層背景對應各公司 */
.ferry-btn[data-company="藍白航運"] {
  background: linear-gradient(45deg, #3498db, #2980b9);
}
.ferry-btn[data-company="泰富航運"] {
  background: linear-gradient(45deg, #f39c12, #e67e22);
}
.ferry-btn[data-company="東琉線聯營"] {
  background: linear-gradient(45deg, #7f8c8d, #95a5a6);
}
.ferry-btn[data-company="大福航運"] {
  background: linear-gradient(45deg, #2c3e50, #34495e);
}
.ferry-btn[data-company="琉興公司"] {
  background: linear-gradient(45deg, #6c7a89, #8d9aab);
}

/* hover 效果 */
.ferry-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

/* 點擊時效果 */
.ferry-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
}

/* 響應式 */
@media (max-width: 768px) {
  .ferry-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}
.ferry-btn.active {
  box-shadow: 0 0 12px rgba(255,255,255,0.8), 0 0 6px rgba(0,0,0,0.3);
  transform: scale(1.1);
  filter: brightness(1.2);
}
/* 🌊 改良版：臨時圖片製作中區塊 */
.temp-section {
  position: relative;
  background: linear-gradient(135deg, #cbe7ff 0%, #e3f2fd 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 64, 128, 0.15);
  overflow: hidden;
  margin: 2rem auto;
  max-width: 680px;
  animation: fadeIn 0.8s ease-in-out;
}

/* 背景波浪動畫 */
.temp-section::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 120%;
  background: url('https://liuqiunow.pages.dev/assets/wave-bg.svg') repeat-x;
  background-size: contain;
  animation: waveMove 12s linear infinite;
  opacity: 0.12;
}

/* 標題與文字 */
.temp-section h2 {
  color: #1565c0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.6);
}

.temp-section p {
  font-size: 1.1rem;
  color: #0d47a1;
  margin-bottom: 1rem;
}

/* 藍色亮點動畫 */
.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #42a5f5, #1565c0);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(21, 101, 192, 0.5);
  animation: dotPulse 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* === 動畫 === */
@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes waveMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   1. 基礎設定與佈局 (已修正：手機/電腦不同背景)
   ========================================= */
body {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: rgba(224, 242, 247, 0.8);
    min-height: 100vh;
    padding-top: 65px;
    display: flex;
    flex-direction: column;

    /* 📱 預設：手機版背景圖 (請將檔名換成你的直式照片) */
    background-image: url('assets/IMG_1606.avif'); 
}

/* 💻 電腦版背景圖切換 (當螢幕寬度大於 1024px 時) */
@media (min-width: 1024px) {
    body {
        background-image: url('assets/DSC_1850.avif');
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* =========================================
   2. 導覽列與頁首
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(10, 109, 202, 0.85);
    padding: 0.5rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 0 0 3rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%);
}

.header-content {
    position: absolute;
    text-align: center;
    color: white;
    z-index: 10;
    width: 100%;
}

/* =========================================
   3. 【下班船班】區塊 (核心優化)
   ========================================= */
.next-ferry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.next-ferry-card {
    /* 換顏色：深邃午夜藍漸層 */
    background: linear-gradient(145deg, #345d9e, #0d172e); 
    border-radius: 28px;
    padding: 25px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

/* UX 動畫：急迫提醒 (小於60分鐘) */
@keyframes pulse-urgent {
    0% { box-shadow: 0 0 0 0px rgba(245, 158, 11, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0px rgba(245, 158, 11, 0); }
}

.next-ferry-card.is-urgent {
    border: 2px solid #071c53;
}
.next-ferry-card.is-urgent .countdown-box {
    background: #fffafa; /* 緊急時變紅 */
    animation: pulse-urgent 2s infinite;
}

.next-ferry-label {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* 電腦版：放大出發方向 */
@media (min-width: 1024px) {
    .next-ferry-card .next-ferry-label {
        font-size: 20px !important;
        font-weight: 800 !important;
        line-height: 1.4 !important;
    }
}

/* 手機版 */
@media (max-width: 768px) {
    .next-ferry-card .next-ferry-label {
        font-size: 17px !important;
        font-weight: 800 !important;
    }
}

.next-ferry-label::before {
    content: "";
    width: 4px;
    height: 18px;
    background: #3b82f6;
    border-radius: 10px;
}

.next-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 20px;
}

.time-main {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.countdown-box {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    background: #f59e0b;
    color: #000;
    padding: 4px 12px;
    border-radius: 10px;
    font-weight: 800;
    margin-top: 8px;
}

/* 公司名稱排版：重複班次向下垂直排列 */
.company-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.company-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff; /* 公司名稱變白色 */
}

/* =========================================
   4. 各家船公司時刻表卡片
   ========================================= */
.company-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.company-title-block {
    color: white;
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* 前往 FB 官網按鈕 UIUX 優化 */
.facebook-link {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
    border: 1px solid #1877f2;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.facebook-link:hover {
    background: #1877f2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

/* =========================================
   5. 船票與表格資訊
   ========================================= */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th, .schedule-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.next-ferry-time {
    background-color: #dcfce7;
    font-weight: bold;
    color: #166534;
    border-radius: 8px;
}

.ticket-info {
    margin-top: 15px;
    padding: 12px;
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =========================================
   6. 其他輔助區塊 (天氣、作者、按鈕)
   ========================================= */
.ferry-btn {
    color: white;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ferry-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .time-main { font-size: 2.6rem; }
    .next-ferry-grid { grid-template-columns: 1fr; }
}

/* 時刻表區塊卡片 App 化 */
.company-card-app {
    background: white;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

/* --- 公司卡片底部按鈕統一樣式 --- */
.company-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
}

/* 兩個按鈕統一尺寸 */
/* 強制完整班表與官方 FB 同尺寸 */
.company-action-grid > .btn-primary,
.company-action-grid > .btn-secondary,
.company-action-grid > .facebook-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;

    font-size: 0.9rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;

    border-radius: 10px !important;
}

/* 兩個按鈕都保留相同邊框厚度 */
.company-action-grid > .btn-primary {
    border: 1px solid transparent !important;
}

.company-action-grid > .btn-secondary,
.company-action-grid > .facebook-link {
    border: 1px solid #dbeafe !important;
}

/* 圖示統一 */
.company-action-grid > a i,
.company-action-grid > button i,
.company-action-grid > a svg,
.company-action-grid > button svg {
    width: 14px !important;
    height: 14px !important;
    font-size: 14px !important;
    flex: 0 0 14px !important;
}

/* 完整班表按鈕 */
.company-action-grid .btn-primary {
    color: #ffffff;
    border: 1px solid transparent;
    background: linear-gradient(
        135deg,
        #3b82f6 0%,
        #2563eb 100%
    );
}

/* 官方 FB 按鈕 */
.company-action-grid .btn-secondary,
.company-action-grid .facebook-link {
    height: 52px;
    margin: 0 !important;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    background: #eff6ff;
}

/* 圖示統一尺寸 */
.company-action-grid svg,
.company-action-grid i {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
}

/* 滑鼠移入效果 */
.company-action-grid .btn-primary:hover,
.company-action-grid .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(37, 99, 235, 0.18);
}

/* 手機版 */
@media (max-width: 480px) {
    .company-action-grid {
        gap: 8px;
        margin-top: 14px;
    }

    .company-action-grid .btn-primary,
    .company-action-grid .btn-secondary,
    .company-action-grid .facebook-link {
        height: 48px;
        padding: 0 6px;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .company-action-grid svg,
    .company-action-grid i {
        width: 0.9rem;
        height: 0.9rem;
        font-size: 0.9rem;
    }
}

/* =========================================
   實用小工具區塊 (專為手機版優化)
   ========================================= */

/* 1. 容器設定：背景半透明、圓角、自適應寬度 */
.utility-section {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin: 1.5rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(10px);
    width: 95%; /* 讓它在手機上左右留一點點邊距 */
    max-width: 500px;
}

/* 2. 網格佈局：上下排列 */
.utility-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* 3. 卡片設定：強制橫向排列 (Flex Row) */
.utility-card {
    display: flex;
    flex-direction: row; /* 強制圖示在左，文字在右 */
    align-items: center;
    padding: 0.85rem 1rem;
    background: #f8fafc; /* 淡淡的灰色底 */
    border-radius: 1.25rem;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent; /* 移除手機點擊時的藍色陰影 */
}

/* 4. 點擊回饋：手機按下時會縮小一點點 */
.utility-card:active {
    transform: scale(0.97);
    background-color: #f1f5f9;
}

/* 5. 圖示外框：固定大小，不准變形 */
.utility-icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px; /* 關鍵：防止被擠壓 */
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 6. 文字資訊區塊 */
.utility-info {
    text-align: left; /* 強制文字靠左 */
    flex-grow: 1;
}

.utility-info h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.utility-info p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* 7. 電腦版隱藏邏輯 (大於 1024px) */
@media (min-width: 1024px) {
    .utility-section {
        display: none !important;
    }
}

/* --- 1. 全域 iOS 字體強制校正 --- */
html, body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* --- 2. 手機版 (寬度 480px 以下) 專用縮小設定 --- */
@media (max-width: 480px) {
    /* 容器邊距縮小，騰出更多空間 */
    .container {
        padding: 0.5rem !important;
    }

    /* 下班船班區塊：大幅縮小 */
    .time-main {
        font-size: 1.8rem !important; /* 原本太大了，改為 1.8rem */
        font-weight: 800;
        letter-spacing: -1px;
        white-space: nowrap; /* 禁止換行 */
    }

    .countdown-box {
        padding: 2px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
    }

    .company-tag {
        font-size: 1rem !important; /* 公司名稱縮小 */
        line-height: 1.1;
    }

    .next-item {
        padding: 12px 15px !important; /* 減少內邊距 */
        gap: 10px;
    }

    /* 時刻表卡片：字體縮小 */
    .company-title-block {
        font-size: 1.1rem !important;
        padding: 0.6rem !important;
        border-radius: 0.8rem !important;
    }

    .schedule-table th, 
    .schedule-table td {
        padding: 0.4rem 0.2rem !important;
        font-size: 0.8rem !important; /* 數字變小，確保不換行 */
        font-weight: 500 !important; /* 字體不要太粗，不然會擠在一起 */
    }

    /* 票價、備註、聯絡資訊：極小字 */
    .ticket-info, .contact-info, .notes {
        font-size: 0.7rem !important;
        margin-top: 8px !important;
        line-height: 1.4 !important;
    }

    .ticket-info p {
        margin: 2px 0 !important;
    }

    /* 按鈕縮小 */
    .company-buttons {
        gap: 6px !important;
    }
    
    .open-schedule-btn, .facebook-link {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        border-radius: 10px !important;
    }

    /* 隱藏公告區原本沒讀取到的圖片高度，避免佔位 */
    #announcement-img:not([src]) {
        display: none;
    }
}

/* --- 3. 確保表格兩欄對稱 --- */
.schedule-table th, .schedule-table td {
    width: 50%;
    text-align: center;
}
/* --- 預設先隱藏 (手機版) --- */
.weather-sidebar-card {
    display: none !important;
}

/* --- 電腦版專用樣式 --- */
@media (min-width: 1024px) {
    .weather-sidebar-card {
        display: block !important; /* 電腦版才出現 */
        background: #ffffff;
        border-radius: 1.5rem;
        padding: 1.2rem;
        box-shadow: 0 10px 25px rgba(0,0,0,0.05);
        border: 1px solid #f1f5f9;
        margin-bottom: 20px;
    }

    .sidebar-sub-title { font-size: 1.1rem; font-weight: 800; color: #334155; margin-bottom: 12px; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; }

    /* 主溫度橫向排列 */
    .weather-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
    .weather-big-icon { font-size: 3rem; }
    .current-t { font-size: 2rem; font-weight: 900; color: #1e293b; }
    .feel-t { font-size: 0.85rem; color: #64748b; }
    .desc-pill { display: inline-block; background: #3b82f6; color: white; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; margin-top: 5px; font-weight: 700; }

    /* 預報框樣式 */
    .weather-forecast-box { background: #fdf2f2; padding: 10px; border-radius: 12px; border-left: 4px solid #ef4444; margin-bottom: 15px; }
    .weather-forecast-title { font-size: 0.8rem; font-weight: 800; color: #991b1b; margin-bottom: 4px; display: flex; gap: 5px; }
    .weather-forecast-text { font-size: 0.85rem; line-height: 1.5; color: #7f1d1d; }

    /* 網格系統 (3欄2列) */
    .weather-stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .weather-stats-grid .info { background: #f8fafc; display: flex; flex-direction: column; align-items: center; padding: 6px; border-radius: 10px; border: 1px solid #eef2f6; }
    .weather-stats-grid .info i { font-size: 1rem; margin-bottom: 3px; }
    .stat-val { font-size: 0.9rem; font-weight: 800; color: #0f172a; }
    .weather-stats-grid small { font-size: 0.7rem; color: #64748b; font-weight: 500; }
}

/* =========================================
   頁首：立體橢圓化極限優化 (高感度版)
   ========================================= */

/* 1. 頁首與內容的距離 (縮小下方間距) */
.main-header-box {
    margin-top: 20px !important;
    margin-bottom: 5px !important; /* 【關鍵】縮小與底下的間距 */
}

.header-oval-container {
    width: 100%;
    position: relative;
    border-radius: 1.5rem; /* 手機版圓角 */
    overflow: hidden;
    background: #000;
    border: 4px solid #ffffff; 
    box-sizing: border-box; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* 2. 圖片背景 (加高手機版高度至 220px) */
.header-image-container {
    position: relative;
    width: 100%;
    height: 220px; /* 【手機加高】確保內容不擁擠 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(55%) contrast(110%);
}

/* 3. 文字內容區域 */
.header-content {
    position: absolute;
    width: 100%; /* 增加寬度空間 */
    text-align: center;
    color: white;
    z-index: 10;
}

.header-content h1 {
    font-size: 3.5rem !important; 
    font-weight: 700 !important;
    line-height: 1.25;  
}

.header-content p {
    font-size: 0.95rem !important;
    margin-top: 8px;
    opacity: 0.95;
    line-height: 1.5;
}

/* 4. 即時時間 (鎖定現有灰色樣式) */
#current-taiwan-time {
    display: inline-block;
    background: #3f4043a6; /* 保留灰色透明質感 */
    color: #fff !important;
    padding: 4px 15px !important;
    border-radius: 30px;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* =========================================
   最新航班公告：桌機固定切成三欄
   ========================================= */

@media (min-width: 1024px) {
  main > .suspension-main-card #cloud-announcement-text {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  main > .suspension-main-card #cloud-announcement-text > .suspension-item {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* 平板：一排兩則 */
@media (min-width: 641px) and (max-width: 1023px) {
  #cloud-announcement-text {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  #cloud-announcement-text > .suspension-item {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
}

/* 手機：一排一則 */
@media (max-width: 640px) {
  #cloud-announcement-text {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #cloud-announcement-text > .suspension-item {
    width: 100% !important;
    margin: 0 !important;
  }
}
/* =========================================
   電腦版強力修補：大幅加高 + 完美橢圓
   ========================================= */

@media (min-width: 1024px) {
    .container {
        max-width: 1100px !important;
    }

    .header-oval-container {
        /* 【橢圓感】更大的圓角 */
        border-radius: 120px !important; 
        border-width: 5px; /* 加厚白框更有份量 */
    }

    .header-image-container {
        /* 【電腦版大幅加高】從 290px 增加至 360px 解決切字問題 */
        height: 360px !important; 
    }

    .header-content h1 {
        font-size: 4.5rem !important; 
    }

   .header-content p {
        font-size: 1.2rem !important; /* 從 0.85rem 加大到 1.4rem */
        font-weight: 600 !important;  /* 稍微加粗 */
        opacity: 1 !important;        /* 移除透明度，讓它更亮 */
        margin-top: 15px !important;
        line-height: 1.6 !important;
    }

    /* 讓內容區塊與橢圓頁首緊密銜接 (負 margin 置換) */
    main.container {
        margin-top: 5px !important; 
    }
}

/* 手機版弧度補丁 */
@media (max-width: 768px) {
    .header-oval-container { border-radius: 3.5rem; } /* 增加弧度感 */
    .header-content h1 { font-size: 1.6rem !important; }
}

/* --- 電腦版精細 Dashboard (移除條狀感) --- */
@media (min-width: 1024px) {
    /* 與主容器 max-width 保持一致 */
    .container {
        max-width: 1100px !important;
    }

    .header-oval-container {
        border-radius: 2rem !important; /* 強力圓角：讓它看起來像橢圓膠囊 */
        border: 4px solid white; /* 白框增加控制台質感 */
    }

    .header-image-container {
        height: 230px !important; /* 壓縮高度，變扁變精緻 */
    }

    .header-content h1 {
        font-size: 2.5rem !important; /* 文字縮小到適中 */
    }

    .header-content p {
        font-size: 1.85rem ;
    }
    
    /* 移除之前所有的負 margin 修正，改由 Grid 間距控制 */
    main.container {
        margin-top: 15px !important;
    }
}

/* 手機極小螢幕微調 */
@media (max-width: 480px) {
    .header-content h1 { font-size: 1.5rem !important; }
}

/* =========================================
   電腦版專用：微型控制面板 Dashboard 佈局 (強制緊湊對齊版)
   ========================================= */

@media (min-width: 1024px) {
    /* 1. 全域縮放 */
    html {
        font-size: 13px !important; 
    }

    /* 限制總寬度 */
    .container {
        max-width: 1350px !important; 
        margin: 0 auto !important;
        padding: 0 10px !important;
    }

    /* 2. 頁首變身：橢圓膠囊型 */
    .header-oval-container {
        height: 220px !important;
        border-radius: 4rem !important; 
        border: 4px solid #ffffff !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        overflow: hidden;
        position: relative;
    }

    /* 隱藏手機版專用元素 */
/* 桌機隱藏船公司快速選擇，不影響公告與下一班船標題 */
.company-selector-panel {
    display: none !important;
}

    /* 3. 核心網格：設定細分行高，讓左側可以自由堆疊 */
    main.container {
        display: grid !important;
        grid-template-columns: 280px 1fr !important;
        column-gap: 25px !important;
        row-gap: 20px !important;
        align-items: start !important; /* 關鍵：確保卡片不會被拉長，維持原樣 */
        margin-top: 25px !important; 
        padding-bottom: 3rem !important;
    }

    /* 4. 【核心修補：拉上來】強制調整 Grid 跨行邏輯 */
    
    /* --- 右側區塊定位 (關鍵是跨行) --- */
/* 下一班船放在公告下方，橫跨左右兩欄 */
.ferry-selector {
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
}

    main > section.mb-8 {
        grid-column: 2 / 3 !important;
        grid-row: 3 / span 5 !important; /* 讓時刻表跨更多行 */
    }

    .download-section {
        grid-column: 2 / 3 !important;
        grid-row: 8 !important;
    }

    /* --- 左側區塊定位 (依序緊貼) --- */
/* 只有 main 的直接子項目才放進左欄 */
/* 最新公告放在最上方，橫跨左右兩欄 */
main > .suspension-main-card,
main > #announcement-section {
    grid-column: 1 / 3 !important;
    grid-row: 1 !important;
}

    .weather-sidebar-card {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important; /* 天氣強制在第二行 (會被拉到公告正下方) */
        display: block !important;
    }

    .author-section {
        grid-column: 1 / 2 !important;
        grid-row: 3 !important; /* 作者強制在第三行 */
    }

    /* 5. 卡片質感維持 (內距不縮小) */
    section, .author-section, .weather-sidebar-card, .suspension-main-card {
        padding: 1.5rem !important; 
        margin: 0 !important;
        background: white !important;
        border-radius: 1.2rem !important;
        border: 1px solid #f1f5f9 !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    }

    /* 時刻表細節 */
    #company-schedules-display {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 15px !important;
    }
    
/* ✅ 1. 頂部公司名稱大標題：維持加大加粗 */
.company-title-block { 
    font-size: 1.4rem !important; 
    font-weight: 900 !important;   
    padding: 10px !important; 
}

/* ✅ 2. 票價資訊區塊：縮小字體，增加精緻感 */
.ticket-info {
    font-size: 1rem !important;      /* 電腦版字體改回 1rem (約16px) 比較好讀 */
    font-weight: 500 !important;      /* 內文字不要太粗 */
    background: #f8fafc !important;   /* 淡淡的底色 */
    border-radius: 12px !important;   /* 圓角 */
    padding: 15px !important;         /* 增加內距 */
    margin-bottom: 15px !important;   /* 與下方按鈕保持距離 */
    border-left: 5px solid #3b82f6 !important; /* 左側藍色裝飾條 */
    line-height: 1.7 !important;      /* 增加行高，文字才不會黏在一起 */
    text-align: left !important;      /* 文字靠左對齊 */
    min-height: 180px;                /* 強制設定最小高度，讓三張卡片能齊高 */
}

/* ✅ 3. 票價資訊內的「紅色標題」單獨加粗 */
.ticket-info strong {
    font-size: 1.15rem !important;
    color: #ef4444 !important;        /* 鮮紅色 */
    font-weight: 600 !important;
    display: block;                   /* 讓標題自己佔一行 */
    margin-bottom: 8px;               /* 與內容拉開距離 */
}
    /* 2. 表格內容 (時間數字)：加大加粗 */
    .schedule-table th, 
    .schedule-table td { 
        padding: 8px 4px !important; 
        font-size: 1rem !important;  /* 讓船班時間非常明顯 */
        font-weight: 800 !important;   /* 加粗數字 */
        color: #1e293b !important;
    }
    /* 4. 底部的「完整班表」與「官方FB」按鈕也稍微強化 */
    .btn-primary, .btn-secondary, .open-schedule-btn, .facebook-link {
        font-size: 1rem !important;
        font-weight: 800 !important;
        padding: 12px !important;
    }
    /* 下班船班時間數字 */
    .next-ferry-grid { grid-template-columns: 1fr 1fr !important; gap: 15px !important; }
    .time-main { font-size: 2.2rem !important; letter-spacing: -1px; }

    /* 徹底移除隱藏元素 */
    .desktop-hidden, .selector-buttons, .utility-section {
        display: none !important;
    }
    
    /* 下載圖寬度限制 */
    .download-section img {
        max-width: 850px !important;
        border-radius: 1rem !important;
    }
}

.info-section {
  margin-bottom: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.info-section > h2 {
  margin-bottom: 0.75rem;
  color: #172554;
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  color: #475569;
  font-size: 1rem;
  line-height: 1.8;
  text-align: center;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.info-card {
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.info-card h3 {
  margin-bottom: 0.5rem;
  color: #1e3a8a;
  font-size: 1.15rem;
  font-weight: 800;
}

.info-card p,
.info-card li {
  color: #475569;
  line-height: 1.7;
}

.info-card ul {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}

.info-card a {
  display: inline-flex;
  margin-top: 0.5rem;
  color: #1d4ed8;
  font-weight: 700;
}

.info-notice {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  color: #92400e;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0.75rem;
}

.boarding-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.boarding-steps li {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 1rem;
}

.step-number {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  color: white;
  background: #2563eb;
  border-radius: 50%;
  place-items: center;
  font-weight: 800;
}

.boarding-steps h3 {
  color: #1e293b;
  font-weight: 800;
}

.boarding-steps p {
  margin-top: 0.35rem;
  color: #64748b;
  line-height: 1.6;
}

.faq-list {
  max-width: 850px;
  margin: 0 auto;
}

.faq-list details {
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.faq-list summary {
  color: #1e293b;
  font-weight: 800;
  cursor: pointer;
}

.faq-list details p {
  margin-top: 0.75rem;
  color: #475569;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .info-section {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  .info-section > h2 {
    font-size: 1.4rem;
  }

  .section-intro {
    text-align: left;
  }

  .info-card-grid,
  .boarding-steps {
    grid-template-columns: 1fr;
  }

  .boarding-steps li {
    display: flex;
    gap: 0.875rem;
  }

  .step-number {
    flex: 0 0 2rem;
    margin-bottom: 0;
  }
}
@media (min-width: 1024px) {
  #ports,
  #boarding,
  #faq {
    grid-column: 2 / 3;
  }
}

/* 公告搬進下一班船區後，保留原本外觀 */
.ferry-selector > .suspension-main-card {
  width: 100%;
  margin: 0 0 1.5rem !important;
}

/* 多則公告時，桌機一排最多三則 */
.ferry-selector #cloud-announcement-text {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* 不讓單則公告被拉滿，維持原本卡片比例 */
.ferry-selector #cloud-announcement-text .suspension-item {
  width: 100%;
  margin: 0;
}

/* 平板一排兩則 */
@media (max-width: 900px) {
  .ferry-selector #cloud-announcement-text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 手機一排一則 */
@media (max-width: 640px) {
  .ferry-selector #cloud-announcement-text {
    grid-template-columns: 1fr;
  }
}
/* 手機版導覽列縮小 */
@media (max-width: 640px) {
  :root {
    --nav-height: 54px;
  }

  #nav-fixed {
    height: 54px !important;
  }

  .nav-container {
    width: calc(100% - 28px);
    height: 54px;
  }

  .nav-logo {
    width: auto !important;
    height: 40px !important;
  }

  .nav-right {
    gap: 18px !important;
  }

  .nav-right a {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
  }

  body {
    padding-top: 54px !important;
  }
}
/* =========================================
   依實際公告數量自動填滿整排
   必須放在 style.css 最底部
   ========================================= */
/* =========================================
   公告依數量自動切換版面
   ========================================= */

/* 公告圖片共同設定 */
#cloud-announcement-text .announcement-image-wrap {
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
}

#cloud-announcement-text .announcement-image-wrap img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 12px !important;
}

/* -------------------------
   只有一則：左文字、右圖片
   ------------------------- */

@media (min-width: 901px) {
    #cloud-announcement-text[data-count="1"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    #cloud-announcement-text[data-count="1"] > .suspension-item {
        display: grid !important;
        grid-template-columns: minmax(250px, 0.8fr) minmax(380px, 1.2fr);
        grid-template-rows: auto auto 1fr;
        gap: 0.5rem 1.25rem;

        width: 100% !important;
        margin: 0 !important;
        align-items: start;
    }

    #cloud-announcement-text[data-count="1"] .suspension-header,
    #cloud-announcement-text[data-count="1"] .announcement-title,
    #cloud-announcement-text[data-count="1"] .announcement-content {
        grid-column: 1;
    }

    #cloud-announcement-text[data-count="1"] .announcement-image-wrap {
        grid-column: 2;
        grid-row: 1 / span 3;

        width: 100%;
        height: 260px;
        margin: 0 !important;
    }
}

/* -------------------------
   兩則：兩張並排，每張左文右圖
   ------------------------- */

@media (min-width: 901px) {
    #cloud-announcement-text[data-count="2"] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }

    #cloud-announcement-text[data-count="2"] > .suspension-item {
        display: grid !important;
        grid-template-columns: minmax(150px, 0.9fr) minmax(200px, 1.1fr);
        grid-template-rows: auto auto 1fr;
        gap: 0.45rem 1rem;

        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        align-items: start;
    }

    #cloud-announcement-text[data-count="2"] .suspension-header,
    #cloud-announcement-text[data-count="2"] .announcement-title,
    #cloud-announcement-text[data-count="2"] .announcement-content {
        grid-column: 1;
    }

    #cloud-announcement-text[data-count="2"] .announcement-image-wrap {
        grid-column: 2;
        grid-row: 1 / span 3;

        width: 100%;
        height: 220px;
        margin: 0 !important;
    }
}

/* -------------------------
   三則以上：一排三張，上文下圖
   ------------------------- */

@media (min-width: 901px) {
    #cloud-announcement-text[data-count="3"] {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1rem !important;
        align-items: stretch;
    }

    #cloud-announcement-text[data-count="3"] > .suspension-item {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        margin: 0 !important;
    }

    #cloud-announcement-text[data-count="3"] .announcement-image-wrap {
        width: 100%;
        height: 300px;
        margin: 0.75rem 0 0 !important;
    }
}

/* -------------------------
   沒有圖片：文字自然占滿
   ------------------------- */

#cloud-announcement-text .suspension-item:not(:has(.announcement-image-wrap)) {
    display: block !important;
}

/* -------------------------
   平板、手機：一律上文下圖
   ------------------------- */

@media (max-width: 900px) {
    #cloud-announcement-text {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    #cloud-announcement-text > .suspension-item {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #cloud-announcement-text .announcement-image-wrap {
        width: 100%;
        height: auto;
        margin: 0.75rem 0 0 !important;
    }

    #cloud-announcement-text .announcement-image-wrap img {
        width: 100% !important;
        height: auto !important;
        max-height: 520px;
        object-fit: contain;
    }
}
@media (min-width: 901px) {
  /* 只有一則公告：占滿整排 */
  #cloud-announcement-text:has(
    > .suspension-item:first-child:last-child
  ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem !important;
  }

  /* 剛好兩則公告：平均占滿整排 */
  #cloud-announcement-text:has(
    > .suspension-item:nth-child(2):last-child
  ) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  /* 三則以上：一排三則 */
  #cloud-announcement-text:has(
    > .suspension-item:nth-child(3)
  ) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  /* 每張公告填滿自己的欄位 */
  #cloud-announcement-text > .suspension-item {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}
/* =========================================
   公告圖片完整顯示，不裁切
   ========================================= */

#cloud-announcement-text .announcement-image-wrap {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  background: #eef2f7;
  border-radius: 12px;
}

#cloud-announcement-text .announcement-image-wrap img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;

  /* 完整顯示圖片 */
  object-fit: contain !important;
  object-position: center !important;

  margin: 0 auto !important;
  border-radius: 12px !important;
}

/* =========================================
   每家船公司的尾班船標誌
   ========================================= */
.company-list {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
    text-align: right;
}
/* 公司名稱和尾班船標誌同一列 */
.company-tag {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    max-width: 100%;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: right;
}

.company-name {
    min-width: 0;
    color: #ffffff;
    font-weight: 900;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* 電腦版尾班船標誌放大 */
.company-last-ferry-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-height: 25px;
    padding: 5px 9px;
    box-sizing: border-box;

    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        #ff4d4f 0%,
        #dc2626 55%,
        #b91c1c 100%
    );

    box-shadow:
        0 4px 10px rgba(220, 38, 38, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.company-last-ferry-badge i {
    font-size: 0.82rem;
}

/* 尾班船卡片邊框提醒 */
.next-ferry-card.has-last-ferry {
    box-sizing: border-box;
    border: 4px solid #ef4444 !important;
}

/* 今日所有船班結束 */
.no-more-ferry {
    padding: 24px;
    color: #dbeafe;
    font-weight: 800;
    text-align: center;
}

/* 手機版加強辨識度 */
@media (max-width: 640px) {
    .next-item {
        gap: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(255, 255, 255, 0.07);
    }

    .company-list {
        gap: 8px;
    }

    .company-tag {
        flex-wrap: nowrap;
        gap: 7px;
        font-size: 1.06rem !important;
        line-height: 1.3;
    }

    .company-name {
        white-space: nowrap;
    }

    .company-last-ferry-badge {
        min-height: 23px;
        padding: 4px 7px;
        font-size: 0.92rem !important;
        border-width: 1px;
        box-shadow:
            0 3px 8px rgba(220, 38, 38, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .company-last-ferry-badge i {
        font-size: 0.65rem !important;
    }
}
/* 有公司進入尾班船時，卡片邊框微微提示 */
.next-ferry-card.has-last-ferry {
  border-color: rgba(248, 113, 113, 0.8);
}

/* 今日所有船班結束 */
.no-more-ferry {
  padding: 24px;
  color: #cbd5e1;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 640px) {
  .company-tag {
    gap: 5px;
  }

  .company-last-ferry-badge {
    padding: 3px 6px;
    font-size: 0.62rem;
  }

  .company-last-ferry-badge i {
    font-size: 0.56rem;
  }
}

/* ===== 停航公司：維持原本卡片排版 ===== */

.company-card.is-suspended {
    border-color: #e2e8f0;
}

/* 標題內容 */
.company-card.is-suspended .company-title-block h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 標題旁的小型暫停標籤 */
.suspension-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    background: #fee2e2;
}

.suspension-title-badge i {
    font-size: 9px;
}

/* 時刻表下方的提醒 */
.suspension-table-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    padding: 9px 10px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    border-radius: 9px;
    background: #fff1f2;
}

.suspension-table-note i {
    flex: 0 0 auto;
    margin-top: 3px;
    font-size: 11px;
}

/* 停航時不標示綠色下一班船 */
.company-card.is-suspended .next-ferry-time {
    color: inherit !important;
    font-weight: inherit !important;
    background: transparent !important;
}

@media (max-width: 640px) {
    .suspension-title-badge {
        padding: 3px 7px;
        font-size: 10px;
    }

    .suspension-table-note {
        font-size: 11px;
    }
}
/* ===== 各家船公司票價資訊 ===== */

.fare-card {
    margin-top: 14px;
    padding: 14px;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 14px;
    background: #f8fafc;
}

.fare-card * {
    box-sizing: border-box;
}

/* 票價主標題 */
.fare-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fare-card-icon {
    display: flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    border-radius: 10px;
    background: #3b82f6;
}

.fare-card-header h4 {
    margin: 0;
    color: #172554;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
}

.fare-card-header p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 10px;
}

/* 每一種票價分類 */
.fare-section {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #ffffff;
}

.fare-section + .fare-section {
    margin-top: 9px;
}

.fare-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    border-bottom: 1px solid #e2e8f0;
}

.fare-section-title i {
    width: 14px;
    text-align: center;
}

/* 每一行票價 */
.fare-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 29px;
    padding: 4px 0;
}

.fare-row + .fare-row {
    border-top: 1px dashed #e2e8f0;
}

.fare-row-label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.fare-row-label small {
    padding: 2px 5px;
    color: #9a3412;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
    border-radius: 999px;
    background: #ffedd5;
}

.fare-row-price {
    display: flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 2px;
    color: #64748b;
    font-size: 9px;
}

.fare-row-price strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

/* 不提供機車載運 */
.fare-unavailable {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    padding: 10px;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #ffffff;
}

.fare-unavailable > i {
    color: #ef4444;
    font-size: 16px;
}

.fare-unavailable div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fare-unavailable strong {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.fare-unavailable span {
    color: #94a3b8;
    font-size: 9px;
    line-height: 1.4;
}

/* 底部提醒 */
.fare-card-reminder {
    margin: 9px 0 0;
    color: #94a3b8;
    font-size: 9px;
    line-height: 1.5;
}

/* 手機版 */
@media (max-width: 640px) {
    .fare-card {
        padding: 12px;
    }

    .fare-section {
        padding: 9px;
    }

    .fare-row-label {
        font-size: 11px;
    }

    .fare-row-price strong {
        font-size: 13px;
    }
}
/* 電腦版：放大單程、來回標籤 */
@media (min-width: 1024px) {
    .fare-row-label small {
        padding: 3px 7px !important;
        color: #9a3412 !important;
        font-size: 0.92rem !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
        border-radius: 999px;
        background: #ffedd5 !important;
    }
}
/* ===== 琉興航運穩定橫向排版 ===== */
@media (min-width: 1024px) {
    #company-schedules-display {
        align-items: stretch !important;
    }

    #company-schedules-display > .company-card {
        margin-bottom: 0 !important;
        box-sizing: border-box;
    }

    /* 大福按鈕固定在卡片底部 */
    #company-schedules-display
    > .company-card:not(.company-card--liuxing)
    .company-action-grid {
        margin-top: auto !important;
    }

    /* 琉興占用兩欄 */
    #company-schedules-display > .company-card--liuxing {
        grid-column: span 2 !important;

        display: flex !important;
        flex-direction: column;

        align-self: stretch !important;
        height: 100% !important;
    }

    /* 琉興標題維持整排 */
    .company-card--liuxing .company-title-block {
        flex: 0 0 auto;
        width: 100%;
    }

    /* 標題下方的左右欄 */
    .liuxing-card-layout {
        display: grid;
        flex: 1;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(260px, 0.9fr);

        align-items: stretch;
        gap: 16px;

        width: 100%;
        min-height: 0;
    }

    /* 左側內容 */
    .liuxing-main-column {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .liuxing-main-column .suspension-table-note {
        flex: 0 0 auto;
        width: 100%;
        margin: 0 0 12px;
    }

    .liuxing-main-column .schedule-table {
        flex: 0 0 auto !important;
        width: 100%;
        height: auto !important;
        margin: 0;
    }

    .liuxing-main-column .notes {
        flex: 0 0 auto;
        width: 100%;
        margin: 14px 0 0 !important;
        text-align: left;
    }

    .liuxing-main-column .contact-info {
        flex: 0 0 auto;
        width: 100%;
        margin: 8px 0 0 !important;
        text-align: left;
    }

    /* 右側內容 */
    .liuxing-fare-column {
        display: flex;
        flex-direction: column;
        min-width: 0;
        height: 100%;
    }

    .liuxing-fare-column .fare-card {
        flex: 0 0 auto;
        width: 100%;
        height: auto !important;
        margin: 0 !important;
    }

    /* 右側按鈕固定在底部 */
    .liuxing-fare-column .company-action-grid {
        flex: 0 0 auto;
        width: 100%;
        margin-top: auto !important;
        padding-top: 14px !important;
    }
}

/* 手機與平板恢復上下排列 */
@media (max-width: 1023px) {
    #company-schedules-display > .company-card--liuxing {
        grid-column: auto !important;
        display: flex !important;
        flex-direction: column;
        height: auto !important;
    }

    .liuxing-card-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .liuxing-fare-column {
        margin-top: 14px;
    }

    .liuxing-fare-column .fare-card {
        width: 100%;
        margin: 0 !important;
    }

    .liuxing-fare-column .company-action-grid {
        margin-top: 14px !important;
        padding-top: 0 !important;
    }
}
.sea-condition-warning {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fffaf0;
}

.sea-condition-warning p {
    margin: 5px 0;
    line-height: 1.65;
}

.sea-info-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    color: #0369a1;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    background: #f0f9ff;
}

.sea-info-link:hover {
    color: #ffffff;
    background: #0284c7;
}

.sea-info-link .fa-arrow-up-right-from-square {
    font-size: 9px;
}

.faq-reminder {
    color: #64748b;
    font-size: 0.9rem;
}

/* 頁面錨點平滑移動 */
html {
    scroll-behavior: smooth;
}

/* FAQ 返回上方按鈕 */
.faq-top-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin-top: 10px;
    padding: 10px 14px;

    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;

    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    transition: 0.2s ease;
}

.faq-top-button:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(37, 99, 235, 0.28);
}

.faq-top-button .fa-arrow-up {
    font-size: 0.75rem;
}