/*
 Theme Name: GeneratePress Child
 Theme URI: https://yourwebsite.com
 Description: GeneratePress 的子主題，用來加 PWA 功能
 Author: 你自己
 Template: generatepress
 Version: 1.0
*/
@import url("../generatepress/style.css");

/* 你以後的自訂 CSS 可以加在這裡 */
.newbie-card-section {
  padding: 40px 20px;
  text-align: center;
}
.newbie-card-section h1 {
  font-size: 2em;
  margin-bottom: 10px;
}
.newbie-card-section p {
  color: #555;
  margin-bottom: 30px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  width: 250px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.card-icon {
  font-size: 40px;
  margin-bottom: 15px;
}
.card h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.95em;
  color: #666;
}

/* 首頁類型卡片 */
.lms-type-card {
    transition: transform 0.3s, box-shadow 0.3s;
}
.lms-type-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.lms-type-card ul li {
    margin-bottom: 8px;
}
.lms-type-card ul li a {
    transition: color 0.2s;
}
.lms-type-card ul li a:hover {
    color: #000 !important;
}

/* 4 欄優勢區塊 */
.advantages-section .advantages-grid {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
    .advantages-section .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .advantages-section .advantages-grid {
        grid-template-columns: 1fr;
    }
}

/* CTA 按鈕置中 */
.cta-section a {
    margin: 0 auto;
    display: block;
    max-width: 300px;
}

.lms-badge-sticky {
    font-size: 12px;
    padding: 2px 8px;
    background: #dc2626; /* 紅色 */
    color: #fff;
    border-radius: 10px;
    margin-right: 6px;
}
.lms-badge-hot-reply {
    font-size: 12px;
    padding: 2px 8px;
    background: #f59e0b; /* 橘色 */
    color: #fff;
    border-radius: 10px;
    margin-right: 6px;
}
.lms-badge-hot-view {
    font-size: 12px;
    padding: 2px 8px;
    background: #3b82f6; /* 藍色 */
    color: #fff;
    border-radius: 10px;
    margin-right: 6px;
}

/* 標題連結 */
.lms-forum-link {
    font-size: 15px;
    color: #111827;
    text-decoration: none;
}
.lms-forum-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* LMS 會員中心 - 地區選擇折疊 accordion */
.accordion-toggle {
    display: none;
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s;
    font-weight: bold;
    color: #0073aa;
    border-bottom: 1px solid #e0e0e0;
}
.accordion-header:hover {
    background: #f0f8ff;
}
.accordion-toggle:checked + .accordion-header {
    background: #e6f2ff !important;
}
.accordion-toggle:checked + .accordion-header .accordion-icon {
    transform: rotate(180deg);
}
/* 關鍵修正：用 + 只選緊接的下一個 content */
.accordion-toggle:checked + .accordion-header + .accordion-content {
    max-height: 600px; /* 或更大 */
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: white;
}

/* === 我要放款 / 我要借款 按鈕 === */
.lms-post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 38px;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}
.lms-post-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s ease;
}
.lms-post-btn:hover::before {
    left: 100%;
}
.lms-post-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
/* 金主方 */
.lms-post-btn.lender {
    background: linear-gradient(135deg, #0073aa 0%, #0091d9 100%);
    border: 1px solid #006699;
}
.lms-post-btn.lender:hover {
    background: linear-gradient(135deg, #006699 0%, #0073aa 100%);
}
/* 借款方 */
.lms-post-btn.borrower {
    background: linear-gradient(135deg, #d63638 0%, #e74c3c 100%);
    border: 1px solid #b02a2c;
}
.lms-post-btn.borrower:hover {
    background: linear-gradient(135deg, #b02a2c 0%, #d63638 100%);
}
/* 未登入狀態 */
.lms-post-btn.login {
    background: #6c757d;
}
.lms-post-btn.login:hover {
    background: #5a6268;
}

/* 讓每個類型卡片有統一的最大寬度，不隨文字變動 */
@media (min-width: 768px) {
    .lms-home-types {
        justify-content: center;
        grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    }
}
.lms-type-card {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    box-sizing: border-box;
}
.lms-type-card > div:first-child {
    width: 100% !important;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 15px;
}
.lms-type-card h3 {
    margin: 0 auto;
    width: fit-content;
    max-width: 90%;
    word-break: break-word;
    text-align: center;
}
.lms-type-card p {
    margin: 8px auto 0;
    text-align: center;
}
/* 強制標題區塊內文字全部置中 */
.lms-type-card > div:first-child {
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 25px 15px !important;
}
.lms-type-card h3 {
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 95% !important;
    text-align: center !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
}
.lms-type-card > div:first-child p {
    margin: 8px auto 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 95% !important;
    text-align: center !important;
    font-size: 0.95rem !important;
}

/* 通用跑馬燈容器 */
.global-marquee {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
  margin: 0;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border-radius: 0 0 16px 16px; /* 底部圓角 */
  position: relative;
  z-index: 999;
}

/* 跑馬燈文字 */
.global-marquee marquee {
  display: block;
}

/* 隨機樣式變體（JS 會加 class） */
.marquee-style-1 { background: linear-gradient(90deg, #B22222, #FF4500); color: white; } /* 紅橘警示 */
.marquee-style-2 { background: linear-gradient(90deg, #1E90FF, #00BFFF); color: white; } /* 藍色專業 */
.marquee-style-3 { background: linear-gradient(90deg, #32CD32, #90EE90); color: #333; } /* 綠色安全 */
.marquee-style-4 { background: linear-gradient(90deg, #FFD700, #FFA500); color: #222; } /* 金黃活力 */
.marquee-style-5 { background: #2F4F4F; color: #FFD700; border: 2px solid #FFD700; } /* 深灰金邊 */
.marquee-style-6 { background: linear-gradient(90deg, #8A2BE2, #FF69B4); color: white; } /* 紫粉潮流 */

/* hover 暫停（更好用體驗） */
.global-marquee:hover marquee {
  animation-play-state: paused; /* 如果用 CSS animation 版 */
}