/* Modern SaaS Design System for VibeLin */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* App-Coordinated Color Palette - Based on VibeLin Icon */
    --primary-color: #1C3B61;           /* 深海軍藍 - 專業與信任 */
    --primary-dark: #0F2438;            /* 更深海軍藍 */
    --secondary-color: #E7523C;         /* 橘紅色 - 活力與行動 */
    --accent-color: #F5C242;            /* 金黃色 - 亮點強調 */
    
    --background-color: #FDF7EC;        /* 奶油背景 - 溫暖舒適 */
    --surface-color: #F5E1B9;          /* 雲朵奶油色 - 柔和表面 */
    --card-background: #FFFFFF;         /* 純白卡片 - 清潔感 */
    
    --text-primary: #1C3B61;            /* 深海軍藍文字 */
    --text-secondary: #27466E;          /* 海浪陰影文字 */
    --text-muted: #6B7B8C;             /* 靜音藍灰文字 */
    --text-light: #FFFFFF;             /* 白色文字 */
    
    --border-color: #E5D5B7;            /* 淡金邊框 */
    --border-light: #F0E6D2;           /* 極淡金邊框 */
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Typography Scale - Mobile-First */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans CJK TC', sans-serif;
    --font-family-display: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
    
    /* Spacing Scale - Enhanced for Mobile */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
    
    /* Mobile Touch Targets */
    --touch-target-min: 44px;
    --touch-target-comfortable: 48px;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Base Typography */
body {
    font-family: var(--font-family-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* List Styles */
ul {
    margin: 0 0 var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

/* Headings - Enhanced Mobile-First Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.display-1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.display-2 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1, .h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    line-height: 1.25;
}

h2, .h2 {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    line-height: 1.3;
}

h3, .h3 {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    line-height: 1.35;
}

h4, .h4 {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.4;
}

/* Body Text */
.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
}

.text-large {
    font-size: 1.125rem;
}

.text-small {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* Text Colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-light); }
.text-brand { color: var(--primary-color); }
.text-success { color: var(--secondary-color); }

/* Layout Components */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xxl) 0;
}

.section-sm {
    padding: var(--spacing-xl) 0;
}

.section-lg {
    padding: calc(var(--spacing-xxl) * 1.5) 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Card Components */
.card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-simple {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
}

.card-feature {
    text-align: center;
    padding: var(--spacing-xl);
}

.card-testimonial {
    padding: var(--spacing-xl);
    position: relative;
}

.card-testimonial::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-lg);
    opacity: 0.3;
}

/* Button System - Mobile-Optimized Touch Targets */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    min-height: var(--touch-target-min);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-light);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-light);
    border-color: var(--secondary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

.btn-light {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-lg {
    padding: 18px 36px;
    min-height: var(--touch-target-comfortable);
    font-size: 1.125rem;
    border-radius: 14px;
}

.btn-sm {
    padding: 10px 20px;
    min-height: 40px;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    min-height: 64px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

/* Mobile nav styles moved to main responsive section below */

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section - Enhanced with App-Coordinated Colors */
.hero {
    padding: calc(80px + var(--spacing-xxl)) 0 var(--spacing-xxl);
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--background-color) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(28, 59, 97, 0.08) 100%);
    transform: skewX(-15deg);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
}

/* Mobile-first hero adjustments */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
        max-width: 600px;
        margin: 0 auto;
    }
}

.hero-text {
    max-width: 500px;
}

@media (max-width: 1024px) {
    .hero-text {
        max-width: none;
        margin: 0 auto;
    }
}

.hero-image {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-md);
        width: 100%;
        max-width: 320px;
        margin: var(--spacing-lg) auto 0;
    }
}

/* App Screenshot Styles - Enhanced Mobile Experience */
.app-screenshot {
    max-width: 300px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(28, 59, 97, 0.12);
    transition: transform var(--transition-base);
    border: 1px solid var(--border-light);
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .app-screenshot {
        max-width: 280px;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .app-screenshot {
        max-width: 240px;
        border-radius: 18px;
    }
}

.app-screenshot:hover {
    transform: scale(1.02);
}

.app-screenshots {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.screenshot-feature {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-xl);
    align-items: center;
    margin: var(--spacing-xxl) auto;
    max-width: 1200px;
    width: 100%;
    padding: var(--spacing-xl);
    border-radius: 24px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

/* 功能區塊樣式 - 使用特定的 class 選擇器 */
/* 第一個功能區塊 - 奶油色背景 (AI 智能對話生成) */
.screenshot-feature.feature-1 {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
    border-left: 4px solid var(--primary-color);
}

.screenshot-feature.feature-1 h3 {
    color: var(--primary-color);
}

/* 第二個功能區塊 - 純白背景 (雙角色語音播放) */
.screenshot-feature.feature-2 {
    background: linear-gradient(135deg, #FFFFFF 0%, #FEFEFE 100%);
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 4px 24px rgba(28, 59, 97, 0.08);
    grid-template-columns: 300px 1fr;
}

.screenshot-feature.feature-2 .feature-content {
    order: 2;
}

.screenshot-feature.feature-2 .feature-image {
    order: 1;
}

.screenshot-feature.feature-2 h3 {
    color: var(--secondary-color);
}

/* 第三個功能區塊 - 淺藍灰背景 (一鍵詞彙解析) */
.screenshot-feature.feature-3 {
    background: linear-gradient(135deg, #F8FAFE 0%, #F0F6FF 100%);
    border-left: 4px solid #E6A91F;  /* 更深的金色，提高對比度 */
}

.screenshot-feature.feature-3 h3 {
    color: #E6A91F;  /* 使用更深的金色確保可讀性 */
}


/* Hover 效果增強 */
.screenshot-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(28, 59, 97, 0.12);
}

.screenshot-feature:nth-child(2):hover {
    box-shadow: 0 8px 32px rgba(28, 59, 97, 0.15);
}

/* Feature Sections */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--spacing-md);
    color: white;
    box-shadow: 0 4px 16px rgba(28, 59, 97, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* Stats Section - Enhanced with App Colors */
.stats {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    text-align: center;
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu - Enhanced Touch Target */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 12px;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 8px;
    transition: background-color var(--transition-fast);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle:hover {
    background-color: var(--surface-color);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 1024px) {
    .hero-grid,
    .screenshot-feature {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
        max-width: 600px;
        margin: var(--spacing-xxl) auto;
    }
    
    .screenshot-feature.feature-2 {
        grid-template-columns: 1fr;
    }
    
    .screenshot-feature.feature-2 .feature-content,
    .screenshot-feature.feature-2 .feature-image {
        order: initial;
    }
    
    .app-screenshot {
        max-width: 280px;
    }
    
    .hero-text {
        max-width: none;
    }
    
    .grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xxl: 48px;
        --spacing-xl: 32px;
        --spacing-lg: 24px;
        --container-width: 100%;
        /* Enhanced mobile spacing */
        --mobile-padding: 20px;
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 64px; /* navbar height */
        left: 0;
        width: 100%;
        background: rgba(253, 247, 236, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        transition: all var(--transition-base);
        border-bottom: 1px solid var(--border-color);
        z-index: 999;
        display: flex !important; /* Override desktop display */
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-link {
        padding: var(--spacing-sm) 0;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--border-light);
        min-height: var(--touch-target-min);
        display: flex;
        align-items: center;
        font-weight: 500;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        font-size: 1.05rem;
        padding: 16px 24px;
        min-height: var(--touch-target-comfortable);
    }
    
    .app-screenshots {
        gap: var(--spacing-sm);
        justify-content: center;
    }
    
    .app-screenshot {
        max-width: 220px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .card-feature {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xxl: 32px;
        --spacing-xl: 24px;
        --spacing-lg: 20px;
        --spacing-md: 16px;
        /* Enhanced mobile padding */
        --mobile-padding: 16px;
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    /* Better mobile typography and spacing */
    ul {
        padding-left: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    li {
        margin-bottom: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
    
    .feature-content ul {
        padding-left: var(--spacing-lg);
    }
    
    .feature-content li {
        padding-right: var(--spacing-md);
        margin-bottom: var(--spacing-sm);
    }
    
    .card {
        padding: var(--spacing-lg);
    }
    
    .card-simple {
        padding: var(--spacing-md);
    }
    
    .app-screenshot {
        max-width: 180px;
    }
    
    .hero {
        padding: calc(80px + var(--spacing-lg)) 0 var(--spacing-lg);
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-sm {
        padding: var(--spacing-lg) 0;
    }
    
    .display-1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .display-2 {
        font-size: clamp(1.75rem, 6vw, 2rem);
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    .btn {
        max-width: 300px;
        padding: 16px 24px;
        font-size: 1rem;
        min-height: var(--touch-target-comfortable);
    }
    
    .btn-lg {
        padding: 18px 32px;
        font-size: 1.05rem;
        min-height: 52px;
    }
    
    .card {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .card-feature {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .nav-content {
        padding: var(--spacing-xs) 0;
    }
    
    .grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }
    
    .hero-grid {
        gap: var(--spacing-md);
    }
    
    .screenshot-feature {
        gap: var(--spacing-md);
        margin: var(--spacing-lg) auto;
        padding: var(--spacing-md);
        border-radius: 16px;
        /* max-width: 90%; */
    }
    
    /* 手機版本的邊框調整 */
    .screenshot-feature.feature-1,
    .screenshot-feature.feature-2,
    .screenshot-feature.feature-3 {
        border-left-width: 3px;
    }
}

/* ================================
   FOOTER STYLES (Production-ready)
   ================================ */

/* Ensure footer has proper navy background in production when Tailwind isn't loaded */
.bg-navy-600,
footer.bg-navy-600 {
    background-color: var(--primary-color) !important;
}

.bg-navy-50 {
    background-color: rgba(28, 59, 97, 0.05) !important;
}

.text-navy-600 {
    color: var(--primary-color) !important;
}

.text-navy-200 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.border-navy-500 {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.hover\:text-coral-300:hover {
    color: var(--accent-color) !important;
}

/* ================================
   BLOG CONTENT COMPONENTS
   ================================ */

/* Enhanced Typography for Blog Content */
.article-content {
    line-height: 1.75;
    color: var(--text-primary);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2em;
    margin-bottom: 0.75em;
    scroll-margin-top: 140px; /* For anchor links - account for H2 background */
}

.article-content h1:first-child,
.article-content h2:first-child,
.article-content h3:first-child {
    margin-top: 0;
}

/* Enhanced Blog-specific heading styles for better visual hierarchy */
.article-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    line-height: 1.2;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    padding: 0.75em 1.25em 0.75em 1.5em;
    margin: 1.5em -1.25em 1em -1.25em;
    background: linear-gradient(135deg, var(--surface-color), rgba(28, 59, 97, 0.05));
    border-left: 4px solid var(--accent-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    line-height: 1.3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.article-content h2::before {
    content: "📝";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9em;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 650;
    color: var(--text-primary);
    margin-top: 1.75em;
    line-height: 1.35;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.article-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.25em;
    margin-bottom: 0.5em;
}

.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* Enhanced paragraph and text styles */
.article-content p {
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 1.25em;
    color: var(--text-primary);
}

.article-content strong {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.05em;
}

.article-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Quote and Citation Styles */
.article-content blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(135deg, var(--surface-color), #f9f6f0);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 3em;
    color: var(--accent-color);
    position: absolute;
    top: -0.2em;
    left: 0.5em;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.article-content blockquote p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Dialogue Boxes */
.dialogue-box {
    margin: 2em 0;
    padding: 1.5em;
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
}

.dialogue-correct {
    background: linear-gradient(135deg, #e8f5e8, #f0f9f0);
    border-left: 4px solid #22c55e;
}

.dialogue-incorrect {
    background: linear-gradient(135deg, #fef2f2, #fdf8f8);
    border-left: 4px solid #ef4444;
}

.dialogue-box::before {
    position: absolute;
    top: 1em;
    left: 1em;
    font-size: 1.2em;
    font-weight: bold;
}

.dialogue-correct::before {
    content: "✅ 正確示範";
    color: #16a34a;
}

.dialogue-incorrect::before {
    content: "❌ 錯誤示範";
    color: #dc2626;
}

.dialogue-box > *:first-child {
    margin-top: 2.5em;
}

/* Tags and Labels */
.tag {
    display: inline-block;
    padding: 0.25em 0.75em;
    background: var(--surface-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875em;
    font-weight: 500;
    margin: 0.25em 0.5em 0.25em 0;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Content Highlight Boxes */
.highlight-box {
    margin: 2em 0;
    padding: 1.5em 2em;
    border-radius: var(--border-radius-lg);
    position: relative;
}

.highlight-tip {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-left: 4px solid #3b82f6;
}

.highlight-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-left: 4px solid #f59e0b;
}

.highlight-important {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
}

.highlight-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-left: 4px solid #22c55e;
}

.highlight-box .highlight-title {
    font-weight: 600;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.highlight-tip .highlight-title::before {
    content: "💡";
}

.highlight-warning .highlight-title::before {
    content: "⚠️";
}

.highlight-important .highlight-title::before {
    content: "❗";
}

.highlight-success .highlight-title::before {
    content: "✅";
}

/* Code Blocks Enhancement */
.article-content pre {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.article-content code {
    background: var(--surface-color);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #374151;
}

/* Lists Enhancement */
.article-content ul,
.article-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.article-content ul li {
    position: relative;
}

.article-content ul li::marker {
    color: var(--accent-color);
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-content th,
.article-content td {
    padding: 1em 1.5em;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.article-content th {
    background: var(--surface-color);
    font-weight: 600;
    color: var(--primary-color);
}

.article-content tr:nth-child(even) {
    background: #fafafa;
}

.article-content tr:hover {
    background: var(--surface-color);
}

/* Images and Media */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
}

.image-caption {
    text-align: center;
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: 0.5em;
    font-style: italic;
}

/* VibeLin Specific Components */
.vibelin-tip {
    background: linear-gradient(135deg, #f0f4f9, #e1e8f3);
    border: 1px solid #c3d1e7;
    border-radius: var(--border-radius-lg);
    padding: 1.5em;
    margin: 2em 0;
    position: relative;
}

.vibelin-tip::before {
    content: "🤖 VibeLin 助力提醒";
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75em;
    font-size: 0.9em;
}

.vibelin-tip p {
    margin: 0;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Comparison Components */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin: 2em 0;
}

.comparison-item {
    padding: 1.5em;
    border-radius: var(--border-radius-lg);
    border: 2px solid;
}

.comparison-good {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #22c55e;
}

.comparison-bad {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #ef4444;
}

.comparison-item .comparison-label {
    font-weight: 600;
    margin-bottom: 0.75em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.comparison-good .comparison-label::before {
    content: "✅";
}

.comparison-bad .comparison-label::before {
    content: "❌";
}

/* Reading Progress and Meta */
.article-meta {
    color: var(--text-muted);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--surface-color);
    z-index: 1001;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.1s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 {
        font-size: 2rem;
        font-weight: 800;
    }
    
    .article-content h2 {
        font-size: 1.7rem;
        font-weight: 700;
        padding: 0.6em 1em 0.6em 1.2em;
        margin: 1.25em -1em 0.8em -1em;
        border-radius: 0 var(--border-radius) var(--border-radius) 0;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
        font-weight: 650;
    }
    
    .article-content h4 {
        font-size: 1.15rem;
        font-weight: 600;
    }
    
    .article-content h5 {
        font-size: 1.05rem;
        font-weight: 600;
    }
    
    .article-content h6 {
        font-size: 0.95rem;
        font-weight: 600;
    }
    
    .article-content p {
        font-size: 1rem;
    }
    
    .article-content strong {
        font-weight: 700;
        font-size: 1.03em;
    }
    
    .article-content h2::before {
        font-size: 0.8em;
    }
    
    .article-content blockquote,
    .highlight-box,
    .dialogue-box {
        margin-left: -1em;
        margin-right: -1em;
        padding: 1.25em 1em;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1em;
    }
    
    .article-content table {
        font-size: 0.9em;
    }
    
    .article-content th,
    .article-content td {
        padding: 0.75em 1em;
    }
}

/* Enhanced Blog Layout and Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.9em;
    color: var(--text-muted);
}

.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Article Layout System - Two column layout (TOC + Content) */
.article-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2em;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.article-content {
    min-width: 0; /* Prevents overflow */
    line-height: 1.75;
}

/* Table of Contents */
.desktop-toc {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.toc-sticky {
    background: var(--card-background);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1em;
}

.toc-title {
    font-size: 0.9em;
    font-weight: 600;
    margin: 0 0 0.75em 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5em;
}

.toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85em;
}

.toc-content li {
    margin: 0.25em 0;
}

.toc-content a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.25em 0;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.toc-content a:hover {
    color: var(--primary-color);
    background: var(--surface-color);
    padding-left: 0.5em;
}

/* Mobile TOC */
.mobile-toc {
    display: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 0 0 2em 0;
}

.mobile-toc-summary {
    padding: 1em;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
}

.mobile-toc-content {
    padding: 0 1em 1em 1em;
    border-top: 1px solid var(--border-light);
}

.mobile-toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0.5em 0 0 0;
    font-size: 0.9em;
}

.mobile-toc-content li {
    margin: 0.5em 0;
}

.mobile-toc-content a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.25em 0;
}

/* Article Actions Sidebar - REMOVED to save space */
/*
.article-actions {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
}
*/

.actions-sticky {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

/* Share Buttons */
.share-buttons {
    background: var(--card-background);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1em;
}

.share-title {
    font-size: 0.85em;
    font-weight: 600;
    margin: 0 0 0.75em 0;
    color: var(--primary-color);
    text-align: center;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5em;
    width: 100%;
    padding: 0.5em;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.8em;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 0.5em;
}

.share-btn:last-child {
    margin-bottom: 0;
}

.share-btn:hover {
    background: var(--surface-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.share-icon {
    font-size: 1.1em;
}

/* Quick Actions */
.quick-actions {
    background: var(--card-background);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1em;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5em;
    width: 100%;
    padding: 0.5em;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.8em;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 0.5em;
}

.action-btn:last-child {
    margin-bottom: 0;
}

.action-btn:hover {
    background: var(--surface-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Enhanced Article Meta */
.article-meta-top {
    color: var(--text-muted);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.article-meta-separator {
    opacity: 0.5;
}

.article-description {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.article-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5em;
}

/* Article Featured Image */
.article-featured-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2em 0;
    padding: 1.5em;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.featured-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.featured-image:hover {
    transform: scale(1.02);
}

.image-caption {
    margin-top: 1em;
    font-size: 0.9em;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .desktop-toc {
        display: none;
    }
    
    .mobile-toc {
        display: block;
    }
    
    /* .article-actions removed */
    /*
    .article-actions {
        position: fixed;
        bottom: 2em;
        right: 2em;
        width: auto;
        z-index: 100;
    }
    
    .actions-sticky {
        flex-direction: row;
        gap: 0.5em;
    }
    
    .share-buttons,
    .quick-actions {
        padding: 0.75em;
    }
    
    .share-title {
        display: none;
    }
    
    .share-btn,
    .action-btn {
        flex-direction: column;
        gap: 0.25em;
        padding: 0.5em;
        min-width: 50px;
    }
    
    .share-text,
    .action-text {
        display: none;
    }
    
    .share-icon,
    .action-icon {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .article-meta-top {
        flex-direction: column;
        gap: 0.25em;
    }
    
    .article-featured-image {
        margin: 1.5em -1em;
        padding: 1em;
    }
    
    .featured-image {
        border-radius: 8px;
    }
    
    .image-caption {
        font-size: 0.85em;
        margin-top: 0.75em;
    }
    
    .breadcrumb {
        font-size: 0.8em;
        margin-bottom: 1em;
    }
    
    /*
    .article-actions {
        bottom: 1em;
        right: 1em;
    }
    */
}

/* Touch and Mobile Optimizations - Enhanced for Better UX */
@media (hover: none) and (pointer: coarse) {
    /* Touch-friendly interactions with app-coordinated feedback */
    .btn {
        min-height: var(--touch-target-comfortable);
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(28, 59, 97, 0.1);
    }
    
    .btn:active {
        transform: scale(0.98);
        background-color: var(--primary-dark);
    }
    
    .nav-link {
        min-height: var(--touch-target-min);
        display: flex;
        align-items: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(28, 59, 97, 0.1);
    }
    
    .mobile-menu-toggle {
        min-height: var(--touch-target-min);
        min-width: var(--touch-target-min);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-menu-toggle:active {
        background-color: var(--surface-color);
        transform: scale(0.95);
    }
    
    /* Disable hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .app-screenshot:hover {
        transform: none;
    }
    
    /* Enhanced touch feedback for cards */
    .card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-sm);
    }
}

/* Enhanced Accessibility and Focus States */
.keyboard-navigation .btn:focus,
.keyboard-navigation .nav-link:focus,
.keyboard-navigation .mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(28, 59, 97, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
        --surface-color: #FFFFFF;
    }
    
    .card {
        border: 2px solid var(--border-color);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-menu-toggle,
    .btn,
    .hero::before {
        display: none;
    }
    
    .hero {
        padding-top: var(--spacing-lg);
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
    
    * {
        box-shadow: none !important;
        background: white !important;
        color: black !important;
    }
}

/* Performance Optimizations */
.app-screenshot,
.card,
.btn {
    will-change: transform;
}

/* Enhanced Mobile Typography */
@media (max-width: 768px) {
    .lead {
        font-size: 1.125rem;
        line-height: 1.6;
    }
    
    .text-large {
        font-size: 1.05rem;
        line-height: 1.65;
    }
    
    /* Improved content spacing for mobile */
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-sm {
        padding: var(--spacing-lg) 0;
    }
    
    .mb-xxl { margin-bottom: var(--spacing-xl); }
    .mt-xxl { margin-top: var(--spacing-xl); }
}

/* Ultra-wide mobile devices */
@media (max-width: 480px) {
    .lead {
        font-size: 1.05rem;
        line-height: 1.55;
    }
    
    .text-large {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .display-1 {
        line-height: 1.1;
        margin-bottom: var(--spacing-md);
    }
    
    .display-2 {
        line-height: 1.15;
        margin-bottom: var(--spacing-md);
    }
    
    /* Better list spacing on mobile */
    ul {
        padding-left: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    li {
        margin-bottom: var(--spacing-xs);
        line-height: 1.6;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        transform: none;
        opacity: 1;
    }
}