/* ============================================
   XÂY NHÀ MỚI - MAIN.CSS
   Additional component styles
============================================ */

/* ========================================
   HERO SECTION (Homepage)
======================================== */
.hero-section { padding: 24px 0; background: var(--bg); }

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    min-height: 420px;
}

.hero-slider-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
}

.hero-slider { position: relative; width: 100%; height: 100%; min-height: 380px; }

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.hero-slide.active { opacity: 1; }

.hero-slide a { display: block; height: 100%; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

.hero-slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 24px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}
.slide-cat {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-decoration: none;
}
.slide-title { font-size: 1.2rem; color: #fff; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.slide-title a { color: inherit; }
.slide-title a:hover { color: var(--primary); }
.slide-excerpt { font-size: 13px; color: #ddd; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide-meta { display: flex; gap: 14px; font-size: 12px; color: #bbb; flex-wrap: wrap; }
.slide-meta span { display: flex; align-items: center; gap: 5px; }

.hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    transition: background var(--transition);
    backdrop-filter: blur(4px);
}
.hero-btn:hover { background: var(--primary); }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }

.hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.hero-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}
.hero-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }

/* Side posts */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.hero-side-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item:hover { background: var(--bg-light); }
.side-cat { margin-bottom: 5px; }
.side-cat a { font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.side-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 7px; color: var(--dark); }
.side-title a:hover { color: var(--primary); }
.side-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

/* ========================================
   CATEGORY ICONS SECTION
======================================== */
.cat-icons-section { background: var(--bg); }

/* ========================================
   TRUST BAR
======================================== */
.trust-bar { background: var(--bg-light); padding: 24px 0; border-top: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--bg);
    border-radius: var(--radius); border: 1px solid var(--border);
}
.trust-item div { display: flex; flex-direction: column; }
.trust-item strong { font-size: 14px; color: var(--dark); }
.trust-item span { font-size: 12px; color: var(--text-muted); }

/* ========================================
   BUTTON STYLES
======================================== */
.btn-viewall {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
    transition: all var(--transition);
}
.btn-viewall:hover { background: var(--primary); color: #fff; }

/* ========================================
   SINGLE POST STYLES
======================================== */
.single-cat-label {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    text-decoration: none;
}
.single-title { font-size: 1.9rem; line-height: 1.25; margin-bottom: 16px; color: var(--dark); }
.single-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
    font-size: 13px; color: var(--text-muted);
}
.meta-author { display: flex; align-items: center; gap: 8px; }
.meta-author .author-avatar { width: 36px; height: 36px; border-radius: 50%; }
.meta-items { display: flex; gap: 14px; flex-wrap: wrap; }
.meta-items span { display: flex; align-items: center; gap: 4px; }
.single-share { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.share-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg);
    text-decoration: none;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); }
.share-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-fb:hover { background: #1565c0; border-color: #1565c0; color: #fff; }

.single-featured-img {
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
}
.single-featured-img img { width: 100%; }

/* TOC */
.toc-box {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-gray);
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
}
.toc-body { padding: 12px 16px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.toc-body::-webkit-scrollbar { width: 4px; }
.toc-body::-webkit-scrollbar-track { background: transparent; }
.toc-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.toc-body ol { list-style: decimal; padding-left: 20px; }
.toc-body ol li { font-size: 13px; color: var(--text); padding: 4px 0; line-height: 1.5; }
.toc-body ol li a { color: var(--text); }
.toc-body ol li a:hover { color: var(--primary); }
.toc-body .toc-sub { list-style: lower-alpha; padding-left: 16px; margin-top: 4px; }
.toc-body .toc-sub li { font-size: 12px; }

.toc-sidebar { position: sticky; top: 80px; }

/* Entry content */
.entry-content h2 { font-size: 1.3rem; margin: 28px 0 14px; }
.entry-content h3 { font-size: 1.1rem; margin: 20px 0 10px; }
.entry-content h4 { font-size: 1rem; margin: 16px 0 8px; }
.entry-content p { font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 16px; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 16px; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { font-size: 15px; line-height: 1.7; margin-bottom: 6px; }
.entry-content img { border-radius: var(--radius); margin: 16px 0; max-width: 100%; }
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 20px 0;
    padding: 14px 18px;
    background: var(--bg-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-light);
}
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.entry-content th { background: var(--bg-gray); padding: 10px 12px; font-weight: 700; border: 1px solid var(--border); text-align: left; }
.entry-content td { padding: 9px 12px; border: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--bg-light); }

/* Tags */
.single-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0; padding-top: 16px; border-top: 1px solid var(--border); }
.single-tags > span { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.single-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    transition: all var(--transition);
}
.single-tags a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Related posts */
.related-posts { margin: 28px 0; padding-top: 24px; border-top: 2px solid var(--border); }

/* ========================================
   COMMENTS
======================================== */
.comments-section { margin-top: 30px; padding-top: 24px; border-top: 2px solid var(--border); }
.comments-section .comment-form-title { font-size: 1.1rem; margin-bottom: 16px; }
.comments-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition);
}
.comments-section textarea:focus { border-color: var(--primary); }
.btn-submit {
    background: var(--primary);
    color: #fff;
    padding: 11px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
}
.btn-submit:hover { background: var(--primary-dark); }

.comment-list { list-style: none; margin-bottom: 28px; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.comment-list .comment .comment-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.comment-list .comment .comment-author { display: flex; align-items: center; gap: 10px; }
.comment-list .comment .comment-author img { width: 36px; height: 36px; border-radius: 50%; }
.comment-list .comment .fn { font-weight: 700; font-size: 14px; }
.comment-list .comment .comment-date { font-size: 12px; color: var(--text-muted); }
.comment-list .comment .comment-content p { font-size: 14px; color: var(--text); margin: 0; }

/* ========================================
   SEARCH PAGE
======================================== */
.search-header { margin-bottom: 24px; }
.search-heading { font-size: 1.6rem; margin-bottom: 16px; }
.search-bar-big { margin-bottom: 12px; }
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    background: var(--bg);
}
.search-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,160,32,0.1); }
.search-input-wrap input { flex: 1; border: none; outline: none; font-size: 16px; color: var(--text); }
.search-clear { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; }
.search-info { font-size: 14px; color: var(--text-muted); }
.search-info strong { color: var(--text); }
.search-keyword { color: var(--primary); font-weight: 700; }

.search-results-list { display: flex; flex-direction: column; gap: 0; }
.search-result-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}
.result-thumb { width: 180px; height: 120px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-body { flex: 1; min-width: 0; }
.result-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: 0.5px; margin-bottom: 6px; }
.result-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.result-title a:hover { color: var(--primary); }
.result-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); }
.result-meta span { display: flex; align-items: center; gap: 4px; }
mark.hl { background: rgba(232,160,32,0.25); color: inherit; font-weight: 700; border-radius: 2px; }

.no-results { text-align: center; padding: 60px 0; color: var(--text-muted); }
.no-results svg { margin: 0 auto 16px; }
.no-results h2 { font-size: 1.3rem; margin-bottom: 8px; }
.suggest-tag {
    display: inline-block; margin: 4px;
    padding: 5px 14px; background: var(--bg-gray);
    border: 1px solid var(--border); border-radius: 20px;
    font-size: 13px; color: var(--text-light);
    transition: all var(--transition);
}
.suggest-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========================================
   HOUSE CARD SPECIAL
======================================== */
.house-card .card-thumb img { aspect-ratio: 4/3; object-fit: cover; }
.house-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    font-size: 20px;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition);
}
.house-carousel-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.house-carousel-btn.prev { left: -18px; }
.house-carousel-btn.next { right: -18px; }

/* ========================================
   HOUSE GALLERY (Single)
======================================== */
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-track { background: #f0f0f0; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .hero-layout { grid-template-columns: 1fr; }
    .hero-side { display: none; }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .single-title { font-size: 1.4rem; }
    .single-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
    .single-share { margin-left: 0; }
    .result-thumb { width: 110px; height: 80px; }
    .result-title { font-size: 14px; }
    .trust-grid { grid-template-columns: 1fr; }
    .search-heading { font-size: 1.2rem; }
    .hero-slide-info { padding: 16px 14px 12px; }
    .slide-title { font-size: 1rem; }
}
