/* ==========================================
   1. GLOBAL & FONTS
   ========================================== */
/* Đã đổi từ Be Vietnam Pro sang Inter (kèm Playfair Display cho Tiêu đề) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: #121212;
    background-color: #F4F4F4;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: #121212;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   2. HEADER & NAVIGATION STYLING
   ========================================== */
.site-header {
    background-color: #121212; 
    border-bottom: 3px solid #C26731; 
    padding: 15px 0;
    position: relative;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.custom-logo:hover {
    opacity: 0.8;
}

/* --- Menu Toggle (Hamburger) --- */
.menu-toggle {
    display: none; 
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    display: block;
    background-color: #F4F4F4;
    height: 3px;
    width: 25px;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon {
    position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

/* Hamburger Animation Active State */
.menu-toggle.is-active .hamburger-icon {
    background-color: transparent;
}
.menu-toggle.is-active .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
    background-color: #C26731;
}
.menu-toggle.is-active .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
    background-color: #C26731;
}

/* --- Desktop Navigation --- */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-navigation a {
    color: #F4F4F4;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #C26731; 
}

/* ==========================================
   3. FOOTER STYLING
   ========================================== */
.site-footer {
    background-color: #121212;
    color: #F4F4F4;
    padding: 50px 0 20px;
    border-top: 1px solid #333;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 250px;
}

.footer-widget h3 {
    color: #C26731; 
    font-size: 18px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-widget p, 
.footer-widget a {
    color: #888888;
    font-size: 14px;
    line-height: 1.8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: #C26731; 
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.site-info {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 13px;
    color: #888888;
}

/* ==========================================
   4. RESPONSIVE / MOBILE MENU
   ========================================== */
@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .menu-toggle {
        display: block; 
    }
    
    /* Đưa thẻ nav ra khỏi dòng chảy flexbox để không chiếm chỗ chia giữa */
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 999;
    }
    
    .main-navigation ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        background-color: #121212;
        border-top: 1px solid #333;
        padding: 0;
        margin: 0;
        
        /* Hiệu ứng trượt */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    }

    .main-navigation.toggled ul {
        max-height: 300px; 
    }

    .main-navigation ul li {
        text-align: center;
        border-bottom: 1px solid #222;
        width: 100%;
    }

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

    .main-navigation a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
    }
}

/* ==========================================
   FRONT PAGE: DYNAMIC POST LISTS & HERO
   ========================================== */
.front-hero {
    background-color: #121212;
    padding: 0; 
}
.front-hero .container {
    max-width: 100%;
    padding: 0;
}
.hero-image {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.front-intro {
    background-color: #F4F4F4;
    padding: 0 0 60px 0;
}
.intro-container {
    max-width: 800px;
    background: #ffffff;
    padding: 50px;
    margin: -80px auto 0;
    position: relative;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 4px solid #C26731; 
}
.intro-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}
.intro-content p {
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}
.intro-signature {
    text-align: right;
    margin: 40px 0 30px 0;
}
.intro-signature p {
    margin: 5px 0;
}
.inline-favicon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 5px;
    display: inline-block;
}

.btn-profile {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    color: #F4F4F4;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 350px;
    margin: 0 auto;
}
.btn-profile svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-right: 10px;
}
.btn-profile:hover {
    background-color: #C26731; 
    color: #ffffff;
}

.front-content-grid {
    padding: 0 0 100px 0;
    background-color: #F4F4F4;
}
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.grid-column {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.grid-column h2 {
    font-size: 26px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}
.section-banner {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}
.grid-column > p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.front-post-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}
.front-post-list li {
    padding: 15px 0;
    border-bottom: 1px dashed #e0e0e0;
    display: flex;
    flex-direction: column;
}
.front-post-list li:last-child {
    border-bottom: none;
}
.front-post-list a {
    font-size: 1.1rem;
    color: #121212;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.2s ease;
    margin-bottom: 5px;
    /* Cập nhật font Inter cho các link tiêu đề bài viết */
    font-family: 'Inter', sans-serif;
}
.front-post-list a:hover {
    color: #C26731; 
}
.front-post-list .post-date {
    font-size: 0.85rem;
    color: #888888;
}

.btn-readmore {
    display: inline-block;
    color: #C26731; 
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}
.btn-readmore:hover {
    color: #121212;
}

/* Responsive Overrides Front Page */
@media screen and (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .intro-container {
        margin-top: -40px;
        padding: 30px 20px;
    }
    .hero-image {
        max-height: 400px;
    }
}

/* --- Core Overflows --- */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}
* {
    box-sizing: border-box;
}
img, iframe, video, object {
    max-width: 100%;
    height: auto;
}

.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
    border-radius: 8px; /* Thêm dòng này để bo góc */
    overflow: hidden; /* Đảm bảo hình ảnh không bị tràn ra ngoài viền bo */
}

/* ==========================================================================
   Author Biography Section
   ========================================================================== */

.author-biography {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    align-items: center;
    text-align: center;
    gap: 2rem;
    background-color: #ffffff;
    padding: 2.5rem 1.5rem;
    margin: 2rem auto 4rem auto;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    max-width: 1200px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-biography:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.author-avatar {
    flex-shrink: 0;
}

/* Target the img generated by get_avatar() */
.author-avatar img {
    border-radius: 50%;
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid #f4f4f4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-bio-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    color: #111;
    letter-spacing: -0.01em;
}

.author-bio-content .bio-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
    margin: 0 0 1rem 0;
    max-width: 800px;
}

.author-bio-content .bio-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Desktop / Tablet Layout
   ========================================================================== */
@media (min-width: 768px) {
    .author-biography {
        flex-direction: row; /* Side-by-side on larger screens */
        text-align: left;
        align-items: flex-start;
        padding: 3.5rem;
        gap: 3rem;
    }
    
    .author-avatar img {
        width: 150px;
        height: 150px;
    }
}
