/* ===================================
   學車貼士頁面專用樣式
   =================================== */

/* 頁面頭部 */
.page-header {
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-50px, -50px) rotate(180deg); }
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-header h1 span {
    display: inline-block;
    animation: titleWave 2s ease-in-out infinite;
}

@keyframes titleWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 漂浮裝飾元素 */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    font-size: 40px;
    animation: float-shape 20s infinite ease-in-out;
}

.shape-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

.shape-4 {
    top: 40%;
    right: 10%;
    animation-delay: 15s;
}

@keyframes float-shape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(90deg);
    }
    50% {
        transform: translateY(0) rotate(180deg);
    }
    75% {
        transform: translateY(30px) rotate(270deg);
    }
}

.page-header p {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 1;
}

/* 文章區域 */
.articles-section {
    padding: 80px 0;
    background: #f8f9fa;
    position: relative;
}

.articles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(102,126,234,0.05) 0%, transparent 100%);
    pointer-events: none;
}

/* SEO 介紹文字 */
.tips-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    border-radius: 20px;
    position: relative;
}

.tips-intro::before {
    content: '💡';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.tips-intro p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
}

/* 文章網格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

/* 文章卡片 */
.article-card {
    background: white;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    transform-origin: center bottom;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102,126,234,0.15);
}

.article-card:hover::before {
    transform: scaleX(1);
}

/* 為每個文章卡片添加不同的顏色主題 */
.article-card:nth-child(1) .article-category { background: #FFE5E5; color: #FF4757; }
.article-card:nth-child(2) .article-category { background: #E5F3FF; color: #3742FA; }
.article-card:nth-child(3) .article-category { background: #E5FFE5; color: #2ED573; }
.article-card:nth-child(4) .article-category { background: #FFF3E5; color: #FF6348; }
.article-card:nth-child(5) .article-category { background: #F3E5FF; color: #5F27CD; }
.article-card:nth-child(6) .article-category { background: #FFEBE5; color: #EE5A24; }
.article-card:nth-child(7) .article-category { background: #E5FFFC; color: #00D2D3; }
.article-card:nth-child(8) .article-category { background: #FFF5E5; color: #FFA502; }
.article-card:nth-child(9) .article-category { background: #E5E5FF; color: #5352ED; }
.article-card:nth-child(10) .article-category { background: #FFE5F7; color: #FF006E; }

/* 為每個文章圖片添加不同的漸變背景 */
.article-card:nth-child(1) .article-image { background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%); }
.article-card:nth-child(2) .article-image { background: linear-gradient(135deg, #4e73df 0%, #667eea 100%); }
.article-card:nth-child(3) .article-image { background: linear-gradient(135deg, #1cc88a 0%, #2ed573 100%); }
.article-card:nth-child(4) .article-image { background: linear-gradient(135deg, #f6c23e 0%, #ffa502 100%); }
.article-card:nth-child(5) .article-image { background: linear-gradient(135deg, #5a5cd8 0%, #764ba2 100%); }
.article-card:nth-child(6) .article-image { background: linear-gradient(135deg, #e74a3b 0%, #ff6348 100%); }
.article-card:nth-child(7) .article-image { background: linear-gradient(135deg, #36b9cc 0%, #00d2d3 100%); }
.article-card:nth-child(8) .article-image { background: linear-gradient(135deg, #f6a23e 0%, #ffa502 100%); }
.article-card:nth-child(9) .article-image { background: linear-gradient(135deg, #858796 0%, #5352ed 100%); }
.article-card:nth-child(10) .article-image { background: linear-gradient(135deg, #e83e8c 0%, #ff006e 100%); }

.article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 文章圖片 */
.article-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

/* 文章標題文字顯示在圖片區域 */
.article-image-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.4;
    max-width: 80%;
    z-index: 2;
}

.article-image img {
    display: none; /* 隱藏實際圖片 */
}

/* 新增標籤 - 已刪除 */

/* 文章內容 */
.article-content {
    padding: 25px;
}

.article-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: var(--dark-gray);
}

.article-card:hover .article-title {
    -webkit-text-fill-color: transparent;
}

.article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章元資料 */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.article-category {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.article-card:hover .article-category {
    transform: scale(1.05);
}

/* SEO Footer Text */
.tips-seo-footer {
    max-width: 800px;
    margin: 60px auto 0;
    padding: 60px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102,126,234,0.1);
    position: relative;
    overflow: hidden;
}

.tips-seo-footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102,126,234,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.tips-seo-footer h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 20px;
    text-align: center;
}

.tips-seo-footer h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 30px 0 15px;
}

.tips-seo-footer p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

.tips-seo-footer ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.tips-seo-footer ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
}

.tips-seo-footer ul li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 3px;
    color: #667eea;
    background: rgba(102,126,234,0.1);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

/* Emoji 圖標 - 已刪除 */
.article-emoji {
    display: none;
}

/* 為缺失的圖片添加占位符 */
.article-image:not(:has(img)) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-image:not(:has(img))::before {
    content: "\f1ea";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 48px;
    color: rgba(255,255,255,0.8);
}

/* 數字標記 - 已刪除 */

/* 響應式設計 */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .articles-section {
        padding: 60px 0;
    }
    
    .tips-intro {
        margin-bottom: 40px;
    }
    
    .tips-intro p {
        font-size: 16px;
    }
    
    .articles-grid {
        gap: 20px;
        margin-bottom: 60px;
    }
    
    .article-image {
        height: 200px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-excerpt {
        font-size: 14px;
    }
    
    .article-meta {
        font-size: 13px;
    }
    
    .tips-seo-footer {
        padding: 40px 20px 0;
    }
    
    .tips-seo-footer h2 {
        font-size: 28px;
    }
    
    .tips-seo-footer h3 {
        font-size: 20px;
    }
    
    .tips-seo-footer p,
    .tips-seo-footer ul li {
        font-size: 15px;
    }
}

/* 文章標籤樣式 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.article-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    background: #f0f0f0;
    color: #666;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: var(--primary-red);
    color: white;
}

/* 熱門文章標記 */
.article-card.featured {
    position: relative;
}

.article-card.featured::before {
    content: '熱門';
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}
