/* 
 * 教學工具平台首頁樣式
 * index.css
 */

/* ===== Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Main Container ===== */
.tools-hub {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.tools-hub h1 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 8px;
    font-size: 2rem;
}

.tools-hub .subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* ===== Quick Navigation ===== */
.quick-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.quick-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-nav a:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.quick-nav a .nav-icon {
    font-size: 1.1rem;
}

/* ===== Category Sections ===== */
.category-section {
    margin-bottom: 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #1e3a5f;
}

.category-icon {
    font-size: 1.4rem;
}

/* ===== Tool Cards Grid ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 16px;
}

/* ===== Individual Tool Card ===== */
.tool-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tool-card-header {
    background: #f9fafb;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
}

.tool-card-header:hover {
    background: #f3f4f6;
}

.tool-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.tool-title-area {
    flex: 1;
}

.tool-title {
    margin: 0;
    font-size: 1rem;
    color: #1e3a5f;
}

.tool-title a {
    color: inherit;
    text-decoration: none;
}

.tool-title a:hover {
    color: #2563eb;
}

.tool-brief {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #9ca3af;
    transition: transform 0.3s;
    padding: 4px;
}

.toggle-btn.expanded {
    transform: rotate(180deg);
}

/* ===== Tool Details (Expandable) ===== */
.tool-details {
    display: block;
    padding: 16px;
    background: #fff;
    font-size: 0.9rem;
}

.tool-details.hide {
    display: none;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.detail-table th {
    width: 90px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.detail-table td {
    color: #374151;
}

.tech-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin: 2px 4px 2px 0;
}

.tech-badge.local {
    background: #d1fae5;
    color: #065f46;
}

.feature-list {
    margin: 0;
    padding-left: 18px;
}

.feature-list li {
    margin-bottom: 4px;
}

.cost-note {
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

.go-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 12px;
    transition: background 0.2s;
}

.go-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ===== Cost Reference Section ===== */
.cost-section {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
}

.cost-section h3 {
    margin: 0 0 12px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cost-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #92400e;
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cost-table th,
.cost-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #fcd34d;
}

.cost-table th {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.cost-table td {
    background: #fff;
}

.cost-table .service-name {
    font-weight: 500;
    color: #1e3a5f;
}

/* ===== Tech Overview Section ===== */
.tech-section {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
}

.tech-section h3 {
    margin: 0 0 16px;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.tech-group h4 {
    margin: 0 0 10px;
    color: #0c4a6e;
    font-size: 0.95rem;
    border-bottom: 1px solid #bae6fd;
    padding-bottom: 6px;
}

.tech-group ul {
    margin: 0;
    padding-left: 20px;
}

.tech-group li {
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.9rem;
}

.tech-group li strong {
    color: #0369a1;
}

/* ===== Footer Info ===== */
.footer-info {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 0.85rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

.footer-info .version {
    font-weight: 500;
    color: #6b7280;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .cost-table {
        font-size: 0.8rem;
    }
    
    .cost-table th,
    .cost-table td {
        padding: 8px;
    }
}
