/*
Theme Name: Ngoc Nguyen Modern Blog
Theme URI: https://ngocnguyen.com.vn/
Author: Ngoc Nguyen
Author URI: https://ngocnguyen.com.vn/
Description: Giao diện WordPress hiện đại, chuẩn cấu trúc SEO 100%, tốc độ cao dành cho blog cá nhân về thiết kế website, thủ thuật WordPress và dịch vụ web.
Version: 2.1.1
Tested up to: 6.7
Requires at least: 5.9
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: ngocnguyen
Tags: blog, clean, responsive, seo-optimized, fast-loading, web-design, modern
*/

/* ==========================================================================
   TÍNH NĂNG TÙY BIẾN TỪ CHILD THEME (PRESERVED & ENHANCED)
   ========================================================================== */

/* 1. Header border cho h2 trong bài viết đơn */
.single .entry-content h2:not(.cta-title):not([class*="cta"]) {
    font-family: var(--font-heading, 'Quicksand', sans-serif) !important;
    border-left: solid 6px #0b2545 !important;
    border-bottom: solid 1px rgba(136, 19, 55, 0.25) !important;
    padding-left: 15px !important;
    padding-bottom: 8px !important;
    margin-top: 2rem !important;
    margin-bottom: 1.25rem !important;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: #0b2545 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em !important;
}

/* 2. Hiệu ứng rung lắc (Shake) */
.shake {
    animation: shake 1.5s ease infinite alternate;
}
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* 3. Lưới dự án (Dự án Grid) */
.duan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) {
    .duan-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 767px) {
    .duan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .duan-grid {
        grid-template-columns: 1fr;
    }
}

/* 4. Form Đăng Nhập Frontend [custom_login_form] */
#custom-login-form {
    max-width: 440px;
    margin: 50px auto;
    padding: 40px 32px 35px 32px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(11, 37, 69, 0.08);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}
#custom-login-form .login-username {
    margin-bottom: 22px !important;
}
#custom-login-form .login-password {
    margin-bottom: 0px !important;
}
#custom-login-form .login-username label,
#custom-login-form .login-password label {
    display: block !important;
    font-size: 14px;
    font-weight: 700;
    color: #0b2545;
    margin-bottom: 8px !important;
    line-height: 1.4;
}
#custom-login-form .login-username input[type="text"],
#custom-login-form .login-password input[type="password"] {
    width: 100% !important;
    height: 46px !important;
    padding: 0 14px;
    font-size: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
    display: block;
}
#custom-login-form .login-username input[type="text"]:focus,
#custom-login-form .login-password input[type="password"]:focus {
    border-color: #881337;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(136, 19, 55, 0.15);
}
#custom-login-form .login-options-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin: 18px 0 24px 0 !important;
    box-sizing: border-box;
}
#custom-login-form .remember-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #475569 !important;
    cursor: pointer !important;
    font-weight: normal !important;
    line-height: 1 !important;
}
#custom-login-form .remember-label input[type="checkbox"] {
    accent-color: #881337;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    cursor: pointer;
}
#custom-login-form .link-lostpassword {
    font-size: 13.5px !important;
    color: #881337 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    margin: 0 !important;
    transition: color 0.2s ease;
}
#custom-login-form .link-lostpassword:hover {
    color: #be123c !important;
    text-decoration: underline !important;
}
#custom-login-form .login-submit {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    clear: both !important;
}
#custom-login-form .login-submit input[type="submit"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    line-height: 46px !important;
    background: linear-gradient(135deg, #881337 0%, #be123c 60%, #e11d48 100%) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(136, 19, 55, 0.35);
    display: block !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    float: none !important;
}
#custom-login-form .login-submit input[type="submit"]:hover {
    box-shadow: 0 8px 22px rgba(225, 29, 72, 0.5);
    transform: translateY(-1px);
}
#custom-login-form .login-extra-links {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid #f1f5f9 !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}
#custom-login-form .login-extra-links a {
    color: #881337;
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease;
}
#custom-login-form .login-extra-links a:hover {
    color: #be123c;
    text-decoration: underline;
}

/* 5. Form Đăng Ký Frontend [custom_register_form] */
#custom-register-form {
    max-width: 440px;
    margin: 50px auto;
    padding: 40px 32px 35px 32px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(11, 37, 69, 0.08);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}
#custom-register-form .form-row {
    margin-bottom: 22px;
}
#custom-register-form label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0b2545;
    margin-bottom: 8px;
    line-height: 1.4;
}
#custom-register-form input[type="text"],
#custom-register-form input[type="email"] {
    width: 100% !important;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
}
#custom-register-form input[type="text"]:focus,
#custom-register-form input[type="email"]:focus {
    border-color: #881337;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(136, 19, 55, 0.15);
}
#custom-register-form .field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: #64748b;
}
#custom-register-form .form-submit-row input[type="submit"] {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #881337 0%, #be123c 60%, #e11d48 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(136, 19, 55, 0.35);
    margin-top: 10px;
}
#custom-register-form .form-submit-row input[type="submit"]:hover {
    box-shadow: 0 8px 22px rgba(225, 29, 72, 0.5);
    transform: translateY(-1px);
}

.auth-alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}
.auth-alert p {
    margin: 4px 0;
}
.auth-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.auth-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* 6. Hỗ trợ Landing Page Full-Width tự động */
body:has(.speed-opt-page) #page #content,
body:has(.malware-pro-page) #page #content,
body:has(.nn-hosting-page) #page #content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
