/*
Theme Name: Teapoz Unicode Child
Description: Child theme của Teapoz với hỗ trợ Unicode
Template: teapoz
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../teapoz/style.css");

/* CSS cho Teapoz Posts Block Shortcode với nhiều tùy chọn */
.teapoz-posts-block {
    margin: 20px 0;
    padding: 0;
}

/* Grid layout mặc định - responsive tự động */
.teapoz-posts-block .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
}

/* Grid layout với số cột cố định */
.teapoz-posts-block.columns-1 .posts-grid {
    grid-template-columns: 1fr;
}

.teapoz-posts-block.columns-2 .posts-grid {
    grid-template-columns: repeat(2, 1fr);
}

.teapoz-posts-block.columns-3 .posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

.teapoz-posts-block.columns-4 .posts-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Post item styling */
.teapoz-posts-block .post-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.teapoz-posts-block .post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.teapoz-posts-block .post-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail styling */
.teapoz-posts-block .post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f5f5f5;
}

.teapoz-posts-block .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teapoz-posts-block .post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.teapoz-posts-block .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Content area */
.teapoz-posts-block .post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category styling */
.teapoz-posts-block .entry-category {
    margin-bottom: 8px;
}

.teapoz-posts-block .entry-category a {
    display: inline-block;
    background: #0066FF;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

.teapoz-posts-block .entry-category a:hover {
    background: #0052CC;
}

/* Meta information */
.teapoz-posts-block .entry-meta {
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.teapoz-posts-block .entry-date,
.teapoz-posts-block .entry-author {
    display: inline-block;
}

.teapoz-posts-block .entry-author a {
    color: #0066FF;
    text-decoration: none;
}

.teapoz-posts-block .entry-author a:hover {
    text-decoration: underline;
}

/* Title styling */
.teapoz-posts-block .entry-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.teapoz-posts-block .entry-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.teapoz-posts-block .entry-title a:hover {
    color: #0066FF;
}

/* Excerpt styling */
.teapoz-posts-block .entry-excerpt {
    margin-bottom: 16px;
    flex: 1;
}

.teapoz-posts-block .entry-excerpt p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Read more link */
.teapoz-posts-block .more-link-wrap {
    margin-top: auto;
}

.teapoz-posts-block .more-link {
    display: inline-flex;
    align-items: center;
    color: #0066FF;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.teapoz-posts-block .more-link:hover {
    color: #0052CC;
}

.teapoz-posts-block .more-link::after {
    content: '→';
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.teapoz-posts-block .more-link:hover::after {
    transform: translateX(4px);
}

/* No posts message */
.teapoz-posts-block.no-posts {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.teapoz-posts-block.no-posts p {
    margin: 0;
    color: #666;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .teapoz-posts-block.columns-3 .posts-grid,
    .teapoz-posts-block.columns-4 .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .teapoz-posts-block .post-content {
        padding: 16px;
    }
    
    .teapoz-posts-block .entry-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .teapoz-posts-block .posts-grid,
    .teapoz-posts-block.columns-2 .posts-grid,
    .teapoz-posts-block.columns-3 .posts-grid,
    .teapoz-posts-block.columns-4 .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .teapoz-posts-block .entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Override CSS Variables cho fonts mới */
:root {
    /* Unicode fonts với fallback tốt */
    --unicode-primary-font: 'Be Vietnam Pro', 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --unicode-secondary-font: 'Inter', 'Noto Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --unicode-body-font: 'Noto Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Override parent theme fonts */
    --e-global-typography-text-font-family: var(--unicode-primary-font) !important;
    --e-global-typography-accent-font-family: var(--unicode-secondary-font) !important;
}

/* ===========================================
   Các tùy chỉnh CSS của bạn bắt đầu từ đây
   =========================================== */

/* ===========================================
   VÔ HIỆU HÓA STICKY SIDEBAR
   =========================================== */

/* 
 * HƯỚNG DẪN BẬT LẠI STICKY SIDEBAR:
 * 1. Comment lại (thêm dấu comment) các CSS rules dưới đây
 * 2. Hoặc xóa toàn bộ section này
 * 3. Uncomment JavaScript trong custom.js nếu cần
 */

/* Vô hiệu hóa sticky cho sidebar chính */
#secondary {
    position: static !important;
    top: auto !important;
    transform: none !important;
}

/* Đảm bảo sidebar không bị sticky trên mọi breakpoint */
@media (min-width: 992px) {
    #secondary {
        position: static !important;
        top: auto !important;
        transform: none !important;
    }
}

/* Vô hiệu hóa sticky cho các widget trong sidebar */
#secondary .widget {
    position: static !important;
    top: auto !important;
    transform: none !important;
}

/* Reset các thuộc tính có thể bị ảnh hưởng bởi sticky-kit */
#secondary.is_stuck {
    position: static !important;
    top: auto !important;
    transform: none !important;
}

/* ===========================================
   KẾT THÚC VÔ HIỆU HÓA STICKY SIDEBAR
   =========================================== */

/* ==========================================================================
   TEAPOZ POSTS BLOCK SHORTCODE STYLES
   ========================================================================== */

/**
 * Shortcode hiển thị block bài viết cho trang chủ
 * Dựa theo phong cách thiết kế của theme Teapoz gốc
 * Responsive design với grid layout
 * CSS với priority cao để override theme styles
 */

body .teapoz-posts-block {
    margin: 40px 0 !important;
    overflow: hidden !important;
    clear: both !important;
}

body .teapoz-posts-block .posts-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Post Item Styling */
body .teapoz-posts-block .post-item {
    background: #ffffff !important;
    border: 1px solid var(--border, #e5e5e5) !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

body .teapoz-posts-block .post-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary, #007cba) !important;
}

/* Post Inner Container */
body .teapoz-posts-block .post-inner {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Post Thumbnail */
body .teapoz-posts-block .post-thumbnail {
    position: relative !important;
    padding-top: 60% !important; /* 5:3 aspect ratio */
    overflow: hidden !important;
    border-radius: 5px 5px 0 0 !important;
    background-color: #f8f9fa !important;
}

body .teapoz-posts-block .post-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.teapoz-posts-block .post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Post Content */
.teapoz-posts-block .post-content {
    padding: 25px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Entry Header */
.teapoz-posts-block .entry-header {
    margin-bottom: 15px;
}

/* Entry Meta */
.teapoz-posts-block .entry-meta {
    font-size: 13px;
    color: var(--text-light, #666666);
    margin-bottom: 10px;
    font-weight: 400;
}

.teapoz-posts-block .entry-meta .entry-date {
    color: var(--primary, #007cba);
    font-weight: 500;
}

.teapoz-posts-block .entry-meta .entry-author a {
    color: var(--text-light, #666666);
    text-decoration: none;
    transition: color 0.3s ease;
}

.teapoz-posts-block .entry-meta .entry-author a:hover {
    color: var(--primary, #007cba);
}

/* Entry Title */
.teapoz-posts-block .entry-title {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 15px 0;
    font-weight: 600;
    color: var(--text-dark, #333333);
}

.teapoz-posts-block .entry-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.teapoz-posts-block .entry-title a:hover {
    color: var(--primary, #007cba);
}

/* Entry Excerpt */
.teapoz-posts-block .entry-excerpt {
    flex: 1;
    margin-bottom: 20px;
}

.teapoz-posts-block .entry-excerpt p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text, #555555);
    margin: 0;
}

/* More Link */
.teapoz-posts-block .more-link-wrap {
    margin-top: auto;
}

.teapoz-posts-block .more-link {
    display: inline-block;
    color: var(--primary, #007cba);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    transition: all 0.3s ease;
    padding-right: 15px;
}

.teapoz-posts-block .more-link:before {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 0;
    width: calc(100% - 15px);
    height: 1px;
    background-color: var(--primary, #007cba);
    transition: all 0.3s ease;
}

.teapoz-posts-block .more-link:after {
    content: "→";
    position: absolute;
    right: 0;
    top: 0;
    transition: transform 0.3s ease;
}

.teapoz-posts-block .more-link:hover {
    color: var(--text-dark, #333333);
}

.teapoz-posts-block .more-link:hover:before {
    width: 0;
}

.teapoz-posts-block .more-link:hover:after {
    transform: translateX(3px);
}

/* Featured Post (First Item) */
.teapoz-posts-block .featured-post {
    grid-column: span 2;
}

.teapoz-posts-block .featured-post .post-inner {
    flex-direction: row;
    min-height: 300px;
}

.teapoz-posts-block .featured-post .post-thumbnail {
    flex: 1;
    padding-top: 0;
    height: auto;
    border-radius: 5px 0 0 5px;
}

.teapoz-posts-block .featured-post .post-content {
    flex: 1;
    padding: 30px;
}

.teapoz-posts-block .featured-post .entry-title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.teapoz-posts-block .featured-post .entry-excerpt p {
    font-size: 16px;
    line-height: 1.7;
}

/* No Posts Message */
.teapoz-posts-block.no-posts {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid var(--border, #e5e5e5);
}

.teapoz-posts-block.no-posts p {
    font-size: 16px;
    color: var(--text-light, #666666);
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .teapoz-posts-block .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .teapoz-posts-block .featured-post {
        grid-column: span 1;
    }
    
    .teapoz-posts-block .featured-post .post-inner {
        flex-direction: column;
    }
    
    .teapoz-posts-block .featured-post .post-thumbnail {
        padding-top: 60%;
        border-radius: 5px 5px 0 0;
    }
    
    .teapoz-posts-block .featured-post .entry-title {
        font-size: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .teapoz-posts-block {
        margin: 30px 0;
    }
    
    .teapoz-posts-block .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .teapoz-posts-block .post-content {
        padding: 20px 15px 15px;
    }
    
    .teapoz-posts-block .featured-post .post-content {
        padding: 25px 20px 20px;
    }
    
    .teapoz-posts-block .entry-title {
        font-size: 18px;
    }
    
    .teapoz-posts-block .featured-post .entry-title {
        font-size: 22px;
    }
    
    .teapoz-posts-block .entry-excerpt p {
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .teapoz-posts-block .post-content {
        padding: 15px 12px 12px;
    }
    
    .teapoz-posts-block .entry-title {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .teapoz-posts-block .featured-post .entry-title {
        font-size: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .teapoz-posts-block .post-item {
        background: #1a1a1a;
        border-color: #333333;
    }
    
    .teapoz-posts-block .entry-title {
        color: #ffffff;
    }
    
    .teapoz-posts-block .entry-excerpt p {
        color: #cccccc;
    }
    
    .teapoz-posts-block .entry-meta {
        color: #999999;
    }
    
    .teapoz-posts-block.no-posts {
        background-color: #1a1a1a;
        border-color: #333333;
    }
    
    .teapoz-posts-block.no-posts p {
        color: #cccccc;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .teapoz-posts-block .post-item {
        border-width: 2px;
    }
    
    .teapoz-posts-block .post-item:hover {
        border-width: 3px;
    }
    
    .teapoz-posts-block .more-link:before {
        height: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .teapoz-posts-block .post-item,
    .teapoz-posts-block .post-thumbnail img,
    .teapoz-posts-block .more-link,
    .teapoz-posts-block .more-link:before,
    .teapoz-posts-block .more-link:after,
    .teapoz-posts-block .entry-title a,
    .teapoz-posts-block .entry-meta .entry-author a {
        transition: none;
    }
    
    .teapoz-posts-block .post-item:hover {
        transform: none;
    }
    
    .teapoz-posts-block .post-item:hover .post-thumbnail img {
        transform: none;
    }
    
    .teapoz-posts-block .more-link:hover:after {
        transform: none;
    }
}

/* Ví dụ: Tùy chỉnh màu primary */
/*
:root {
    --primary: #your-custom-color;
}
*/

/* Ví dụ: Tùy chỉnh header */
/*
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
*/

/* Ví dụ: Tùy chỉnh typography */
/*
body {
    font-family: 'Your Custom Font', sans-serif;
}
*/

/* Ví dụ: Tùy chỉnh button */
/*
.button, .btn {
    border-radius: 25px;
    transition: all 0.3s ease;
}
*/

/* ===========================================
   FONT OVERRIDE - ÁP DỤNG FONT UNICODE
   =========================================== */

/* Override tất cả elements với font Unicode */
body,
button,
input,
select,
textarea {
    font-family: var(--unicode-primary-font) !important;
}

/* Headings sử dụng font secondary */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title {
    font-family: var(--unicode-secondary-font) !important;
}

/* Navigation menu */
.main-navigation ul.menu > li.menu-item > a,
.mobile-navigation ul > li.menu-item > a {
    font-family: var(--unicode-secondary-font) !important;
}

/* WooCommerce elements */
.woocommerce .product .woocommerce-loop-product__title,
.woocommerce div.product .product_title,
.woocommerce .price {
    font-family: var(--unicode-primary-font) !important;
}

/* Form elements */
.woocommerce form .form-row label,
.woocommerce-form label,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    font-family: var(--unicode-body-font) !important;
}

/* Buttons */
.btn, .button,
button[type="submit"],
.woocommerce a.button,
.woocommerce button.button {
    font-family: var(--unicode-secondary-font) !important;
}

/* Widget titles */
.widget-title,
.widgettitle {
    font-family: var(--unicode-secondary-font) !important;
}

/* Post content */
.entry-content,
.entry-summary,
.post-content {
    font-family: var(--unicode-body-font) !important;
}

/* Meta information */
.entry-meta,
.post-meta,
.comment-meta {
    font-family: var(--unicode-body-font) !important;
}

