/*
Theme Name: Astra Child
Theme URI: https://recipes.traditionaltastesofasia.com/
Description: Astra Child Theme with WordPress Native IA for recipes.traditionaltastesofasia.com
Author: Traditional Tastes
Template: astra
Version: 1.1.0
Text Domain: astra-child
*/

/* 基礎版型與分類 / 單篇樣式 (純 CSS，零向量標記) */
.tta-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    box-sizing: border-box;
}

/* 麵包屑導覽 */
.tta-breadcrumbs,
.rank-math-breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}
.tta-breadcrumbs a,
.rank-math-breadcrumb a {
    color: #0274be;
    text-decoration: none;
}
.tta-breadcrumbs a:hover,
.rank-math-breadcrumb a:hover {
    text-decoration: underline;
}
.tta-bc-sep {
    margin: 0 8px;
    color: #999;
}

/* 分類彙整頁頭部 */
.tta-archive-head {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}
.tta-archive-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #222;
}
.tta-archive-desc {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}
.tta-archive-meta {
    font-size: 0.88rem;
    color: #888;
    margin: 0;
}

/* 文章卡片網格 */
.tta-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.tta-post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tta-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.tta-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}
.tta-card-title a {
    color: #1a202c;
    text-decoration: none;
}
.tta-card-title a:hover {
    color: #0274be;
}
.tta-card-meta {
    font-size: 0.82rem;
    color: #718096;
    margin: 0 0 12px;
}
.tta-card-excerpt {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 16px;
}
.tta-card-foot {
    margin-top: auto;
}
.tta-card-more {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0274be;
    text-decoration: none;
}
.tta-card-more:hover {
    text-decoration: underline;
}

/* 分頁導覽列 */
.tta-pagination {
    margin: 40px 0;
    text-align: center;
}
.tta-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}
.tta-pagination .page-numbers li a,
.tta-pagination .page-numbers li span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
}
.tta-pagination .page-numbers li span.current {
    background: #0274be;
    color: #fff;
    border-color: #0274be;
}
.tta-pagination .page-numbers li a:hover {
    background: #edf2f7;
}

/* 單篇文章頁 (Single Post) */
.tta-single-post {
    max-width: 860px;
}
.tta-single-head {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eaeaea;
}
.tta-post-categories {
    margin-bottom: 12px;
}
.tta-cat-badge {
    display: inline-block;
    background: #edf2f7;
    color: #2b6cb0;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 6px;
}
.tta-cat-badge:hover {
    background: #e2e8f0;
}
.tta-single-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a202c;
    margin: 0 0 14px;
}
.tta-single-meta {
    font-size: 0.88rem;
    color: #718096;
    margin: 0;
}
.tta-meta-sep {
    margin: 0 8px;
    color: #cbd5e0;
}
.tta-single-body {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 40px;
}
.tta-single-body p {
    margin-bottom: 1.4em;
}
.tta-single-body h2 {
    font-size: 1.6rem;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}
.tta-single-body h3 {
    font-size: 1.3rem;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}
.tta-single-body ul, .tta-single-body ol {
    margin-bottom: 1.4em;
    padding-left: 24px;
}
.tta-single-foot {
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    margin-bottom: 48px;
}
.tta-post-bottom-cats {
    font-size: 0.95rem;
    color: #718096;
}
.tta-post-bottom-cats a {
    color: #0274be;
    text-decoration: none;
}
.tta-post-bottom-cats a:hover {
    text-decoration: underline;
}

/* 相關文章推薦 (Related Posts) */
.tta-related-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #edf2f7;
}
.tta-related-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a202c;
}
.tta-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.tta-related-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    transition: transform 0.2s ease, background 0.2s ease;
}
.tta-related-card:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tta-related-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
}
.tta-related-title a {
    color: #2d3748;
    text-decoration: none;
}
.tta-related-title a:hover {
    color: #0274be;
}
.tta-related-date {
    font-size: 0.8rem;
    color: #a0aec0;
}

/* 關閉 Astra 自帶 scroll to top 圖示影響 */
.ast-scroll-to-top {
    display: none !important;
}

/* 純 CSS 導覽箭頭 */
.ast-icon.icon-arrow {
    display: inline-block !important;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-top: 4px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}
.ast-icon.icon-arrow > * {
    display: none !important;
}

/* Override legacy Astra icon-font pseudos: empty content, inherit family. */
.ast-icon::before,
.ast-icon::after,
.astra-icon::before,
.astra-icon::after,
.menu-toggle::before,
.menu-toggle::after,
.ast-menu-toggle::before,
.ast-menu-toggle::after,
.dropdown-menu-toggle::before,
.dropdown-menu-toggle::after,
.ast-header-navigation-arrow::before,
.ast-header-navigation-arrow::after,
.ast-mobile-menu-buttons-minimal::before,
.ast-mobile-menu-buttons-minimal::after {
    content: "";
    font-family: inherit;
}

/* CSS-only mobile hamburger: .mobile-menu-toggle-icon three-line fallback. */
.main-header-menu-toggle::before,
.main-header-menu-toggle::after {
    content: "";
    font-family: inherit;
}
.mobile-menu-toggle-icon::before {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    margin: 7px auto;
    background-color: currentColor;
    border-style: solid;
    border-width: 0;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
    font-family: inherit;
}

/* CSS-only submenu disclosure triangles. */
.ast-menu-toggle::before,
.ast-header-navigation-arrow::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: currentColor transparent transparent transparent;
    background-color: transparent;
    vertical-align: middle;
    font-family: inherit;
    transition: transform 0.2s ease;
}

.ast-menu-toggle[aria-expanded="true"]::before,
.ast-menu-toggle[aria-expanded="true"] .ast-header-navigation-arrow::after,
.ast-submenu-expanded > .ast-menu-toggle::before,
.ast-submenu-expanded > .ast-header-navigation-arrow::after {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .tta-single-title {
        font-size: 1.7rem;
    }
    .tta-post-grid {
        grid-template-columns: 1fr;
    }
    .tta-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tta-post-card, .tta-related-card {
        transition: none !important;
        transform: none !important;
    }
    .ast-menu-toggle::before,
    .ast-header-navigation-arrow::after {
        transition: none;
    }
}
