/* TripXFun 攻略頁面樣式 - 紫色主題 */

/* 與主題色彩系統保持一致 */
:root {
    --guide-primary: #948ae7;
    --guide-secondary: #667eea;
    --guide-accent: #f093fb;
    --guide-text: #1a1a1a;
    --guide-text-light: #6b7280;
    --guide-bg: #ffffff;
    --guide-bg-light: #f8fafc;
    --guide-shadow: 0 4px 15px rgba(118, 75, 162, 0.1);
    --guide-border-radius: 12px;
    --guide-transition: all 0.3s ease;
}

/* 確保與TripXFun主題的一致性 */
.guide-page-container {
    background: var(--guide-bg);
    color: var(--guide-text);
}

/* 圖標字體支持 */
.icon-location::before { content: "📍"; }
.icon-user::before { content: "👤"; }
.icon-calendar::before { content: "📅"; }
.icon-guide::before { content: "🗺️"; }
.icon-star::before { content: "⭐"; }
.icon-lightbulb::before { content: "💡"; }

/* 響應式圖片 */
.guide-page-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--guide-border-radius);
}

/* 文字排版優化 */
.guide-text h2,
.guide-text h3,
.guide-text h4 {
    color: var(--guide-primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.guide-text h2 {
    font-size: 24px;
    border-bottom: 2px solid var(--guide-accent);
    padding-bottom: 10px;
}

.guide-text h3 {
    font-size: 20px;
}

.guide-text h4 {
    font-size: 18px;
}

/* 引用樣式 */
.guide-text blockquote {
    background: var(--guide-bg-light);
    border-left: 4px solid var(--guide-primary);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 var(--guide-border-radius) var(--guide-border-radius) 0;
    font-style: italic;
    color: var(--guide-text-light);
}

/* 列表樣式 */
.guide-text ul,
.guide-text ol {
    padding-left: 30px;
    margin: 20px 0;
}

.guide-text li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 代碼樣式 */
.guide-text code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.guide-text pre {
    background: #f1f1f1;
    padding: 15px;
    border-radius: var(--guide-border-radius);
    overflow-x: auto;
    margin: 20px 0;
}

/* 表格樣式 */
.guide-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: var(--guide-border-radius);
    overflow: hidden;
    box-shadow: var(--guide-shadow);
}

.guide-text th,
.guide-text td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.guide-text th {
    background: var(--guide-primary);
    color: white;
    font-weight: 600;
}

.guide-text tr:hover {
    background: var(--guide-bg-light);
}

/* 圖片畫廊樣式 */
.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.wp-block-image {
    border-radius: var(--guide-border-radius);
    overflow: hidden;
    box-shadow: var(--guide-shadow);
    transition: var(--guide-transition);
}

.wp-block-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.15);
}

/* 按鈕樣式 */
.wp-block-button .wp-block-button__link,
.guide-text .button {
    background: linear-gradient(135deg, var(--guide-primary) 0%, var(--guide-secondary) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: var(--guide-transition);
    border: 2px solid var(--guide-primary);
}

.wp-block-button .wp-block-button__link:hover,
.guide-text .button:hover {
    background: transparent;
    color: var(--guide-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* 注意事項樣式 */
.guide-text .notice,
.guide-text .warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fef7e3 100%);
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--guide-accent);
    padding: 15px;
    border-radius: var(--guide-border-radius);
    margin: 20px 0;
}

.guide-text .notice::before {
    content: "⚠️ ";
    font-weight: bold;
}

/* 成功提示樣式 */
.guide-text .success {
    background: linear-gradient(135deg, #d4edda 0%, #e2f5e6 100%);
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: var(--guide-border-radius);
    margin: 20px 0;
}

.guide-text .success::before {
    content: "✅ ";
    font-weight: bold;
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(118, 75, 162, 0.3);
    border-radius: 50%;
    border-top-color: var(--guide-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滾動條樣式 */
.guide-page-container *::-webkit-scrollbar {
    width: 8px;
}

.guide-page-container *::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.guide-page-container *::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--guide-primary) 0%, var(--guide-secondary) 100%);
    border-radius: 4px;
}

.guide-page-container *::-webkit-scrollbar-thumb:hover {
    background: var(--guide-accent);
}

/* 打印樣式 */
@media print {
    .guide-hero,
    .content-tabs,
    .related-guides {
        display: none;
    }
    
    .guide-content-section {
        padding: 0;
    }
    
    .tab-content {
        display: block !important;
    }
    
    .guide-page-container {
        background: white;
        color: black;
    }
}

/* 高對比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --guide-primary: #5a3c82;
        --guide-text: #000000;
        --guide-bg: #ffffff;
    }
    
    .guide-card,
    .highlight-card {
        border: 2px solid #000;
    }
}

/* 影片容器樣式 */
.guide-videos {
    margin: 30px 0;
}

.guide-video-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: var(--guide-border-radius);
    overflow: hidden;
    box-shadow: var(--guide-shadow);
    transition: var(--guide-transition);
}

.guide-video-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.15);
}

.guide-video-container iframe,
.guide-video-container video {
    border-radius: var(--guide-border-radius);
}

.guide-video-link {
    margin-bottom: 20px;
    transition: var(--guide-transition);
}

/* 攻略特定樣式 */
.guide-hero {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.8), rgba(102, 126, 234, 0.8));
}

.guide-nav-item.active {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    color: var(--guide-primary) !important;
}

.guide-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.15);
}

.guide-highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(118, 75, 162, 0.2);
}

.guide-tips-category:hover {
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.15);
}

/* 攻略專用邊框和強調色 */
.guide-content-area .section-header h2 {
    border-bottom: 3px solid var(--guide-primary);
}

.guide-content-area .guide-section h3 {
    border-left: 4px solid var(--guide-primary);
}

.guide-content-area .tips-category .category-header {
    border-bottom: 2px solid var(--guide-primary);
}

.guide-content-area .tip-item {
    border-left: 4px solid var(--guide-primary);
}

/* 攻略卡片漸變背景 */
.guide-highlight-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(118, 75, 162, 0.1);
}

/* 攻略標籤樣式 */
.guide-tag {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.2) 0%, rgba(102, 126, 234, 0.2) 100%);
    backdrop-filter: blur(10px);
}

/* 攻略元數據卡片 */
.guide-meta .meta-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.1) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* 響應式設計增強 */
@media (max-width: 768px) {
    .guide-hero {
        min-height: 50vh !important;
    }
    
    .guide-content-area {
        padding: 20px 0;
    }
    
    .guide-section {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .guide-highlight-card {
        padding: 20px !important;
    }
    
    .tips-category {
        padding: 20px !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --guide-bg: #1a1a1a;
        --guide-bg-light: #2d2d2d;
        --guide-text: #ffffff;
        --guide-text-light: #b0b0b0;
    }
    
    .guide-section,
    .guide-highlight-card,
    .tips-category {
        background: var(--guide-bg-light);
        color: var(--guide-text);
    }
}

/* 動畫效果增強 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.guide-section,
.guide-highlight-card,
.tips-category {
    animation: fadeInScale 0.6s ease forwards;
}

/* 特殊效果 */
.guide-page-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 攻略內容區域的特殊樣式 */
.guide-content-area {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.guide-content-area .content-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.7);
}

.guide-content-area .content-section:nth-child(odd) {
    background: rgba(248, 249, 250, 0.7);
}