/*
Theme Name: DKBong88
Theme URI: https://dkbong88.com
Author: DKBong88
Author URI: https://dkbong88.com
Description: Theme tùy chỉnh cho DKBong88 - Giao diện hiện đại, responsive, tối ưu SEO.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dkbong88
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout
*/

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #ff6f00;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1200px;
    --radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-branding .custom-logo {
    max-height: 50px;
    width: auto;
}

.site-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo-img {
    height: 45px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--dark);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary);
}

.site-description {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0;
}

/* === NAVIGATION === */



.btn-outline-cta {
    display: inline-block;
    padding: 8px 22px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
}

.btn-outline-cta:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-primary-cta {
    display: inline-block;
    padding: 8px 22px;
    background: var(--secondary);
    color: var(--white);
    border: 2px solid var(--secondary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
}

.btn-primary-cta:hover {
    background: #e56200;
    border-color: #e56200;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.35);
}

/* Floating CTA - sticky buttons */
.floating-cta {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 9999;
    display: flex;
    gap: 10px;
}

.floating-cta .btn-outline-cta,
.floating-cta .btn-primary-cta {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.main-navigation ul {
    display: flex;
    gap: 5px;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 8px 16px;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--primary);
    background: rgba(26, 115, 232, 0.08);
}

/* Dropdown */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 8px 0;
    flex-direction: column;
    z-index: 100;
}

.main-navigation li:hover > .sub-menu {
    display: flex;
}

.main-navigation .sub-menu a {
    padding: 10px 20px;
    border-radius: 0;
    font-size: 0.9rem;
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--dark);
}

/* === HERO / BANNER === */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: #e56200;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.4);
}

/* === MAIN CONTENT === */
.site-content {
    padding: 40px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.content-area.full-width {
    grid-template-columns: 1fr;
}

.site-main article {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
    transition: var(--transition);
}

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

.post-thumbnail {
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

article:hover .post-thumbnail img {
    transform: scale(1.05);
}

.entry-content-wrap {
    padding: 25px;
}

.entry-category {
    display: inline-block;
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.entry-title a {
    color: var(--dark);
}

.entry-title a:hover {
    color: var(--primary);
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.entry-meta .meta-icon {
    margin-right: 4px;
}

.entry-summary p,
.entry-content p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 15px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    gap: 10px;
}

/* Single Post */
.single .entry-content-wrap {
    padding: 35px;
}

.single .entry-title {
    font-size: 2rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 30px 0 15px;
    font-weight: 700;
}

.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }

.entry-content ul,
.entry-content ol {
    margin: 15px 0;
    padding-left: 30px;
    list-style: disc;
}

.entry-content ol { list-style: decimal; }

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    background: rgba(26, 115, 232, 0.05);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.entry-content pre {
    background: var(--dark);
    color: #e0e0e0;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 20px 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.entry-content th,
.entry-content td {
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    text-align: left;
}

.entry-content th {
    background: var(--light);
    font-weight: 600;
}

/* Tags */
.entry-tags {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.entry-tags a {
    display: inline-block;
    background: var(--light);
    color: var(--gray);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.entry-tags a:hover {
    background: var(--primary);
    color: var(--white);
}

/* === SIDEBAR === */
.widget-area .widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    position: relative;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--dark);
    font-size: 0.95rem;
}

.widget ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Recent Posts in Sidebar */
.recent-post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0 !important;
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recent-post-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-title:hover {
    color: var(--primary);
}

.recent-post-date {
    font-size: 0.78rem;
    color: var(--gray);
}

/* Search Widget */
.search-form {
    display: flex;
}

.search-form .search-field {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-form .search-field:focus {
    border-color: var(--primary);
}

.search-form .search-submit {
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.search-form .search-submit:hover {
    background: var(--primary-dark);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--primary);
    color: var(--white);
}

/* === COMMENTS === */
.comments-area {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 30px;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
}

.comment-list {
    list-style: none;
}

.comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author img {
    border-radius: 50%;
    float: left;
    margin-right: 15px;
}

.comment-content p {
    margin-top: 8px;
}

.comment-respond {
    margin-top: 30px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 0.95rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.comment-form .submit {
    background: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form .submit:hover {
    background: var(--primary-dark);
}

/* === FOOTER === */
.site-footer {
    background: var(--dark);
    color: #ccc;
    margin-top: 60px;
}

.footer-widgets {
    padding: 50px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col .widget-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary);
}

.footer-about .footer-logo {
    display: inline-block;
    margin-bottom: 15px;
}

.footer-about .footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #aaa;
}

.footer-col ul li {
    padding: 6px 0;
}

.footer-col ul li a {
    color: #aaa;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-disclaimer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 15px 0;
    text-align: center;
}

.footer-disclaimer p {
    color: var(--secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
    color: #888;
}

.footer-bottom a {
    color: var(--secondary);
}

/* === HOMEPAGE === */
.homepage-intro {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.homepage-intro .entry-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 20px;
}

.homepage-latest {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .homepage-intro .entry-title {
        font-size: 1.4rem;
    }
}

/* === 404 PAGE === */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary);
    font-weight: 800;
}

.error-404 h2 {
    font-size: 1.5rem;
    margin: 15px 0 25px;
}

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    border: none;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* === RESPONSIVE === */

/* Screen reader text (accessibility) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--light);
    clip: auto !important;
    clip-path: none;
    color: var(--dark);
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--white);
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--gray);
}

.breadcrumbs a {
    color: var(--primary);
}

.breadcrumbs .sep {
    margin: 0 6px;
    color: #ccc;
}

.breadcrumbs .current {
    color: var(--dark);
    font-weight: 500;
}

/* Page Header (archive/search) */
.page-header {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px 30px;
    margin-bottom: 30px;
}

.page-header .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-header .archive-description {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Post Navigation (single) */
.post-navigation {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 25px;
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--dark);
}

@media (max-width: 992px) {
    .content-area {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .header-inner {
        position: relative;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 15px;
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section {
        padding: 50px 20px;
    }

    .site-logo-img {
        height: 35px;
    }

    .floating-cta {
        top: auto;
        bottom: 15px;
        right: 10px;
        left: 10px;
        justify-content: center;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .single .entry-title {
        font-size: 1.5rem;
    }

    .error-404 h1 {
        font-size: 4rem;
    }

    .comments-area {
        padding: 20px;
    }

    .post-navigation {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 10px 15px;
    }

    .site-logo-img {
        height: 30px;
    }

    .entry-content-wrap {
        padding: 18px;
    }

    .floating-cta .btn-outline-cta,
    .floating-cta .btn-primary-cta {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .widget-area .widget {
        padding: 18px;
    }

    .page-header {
        padding: 18px 20px;
    }
}
