/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Astra Child Theme
Author: Antigravity
Author URI: https://deepmind.google/
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
*/

/* Custom CSS styles can be added below this line */

/* --- Menu Header Styles --- */
/* Tất cả menu đều in hoa */
body .main-navigation .menu-item > a {
    text-transform: uppercase !important;
}

/* Sửa lỗi chữ menu con (dropdown) và chỉnh nền tối màu */
body .main-navigation .sub-menu {
    background-color: rgba(30, 30, 30, 0.95) !important; /* Nền tối sang trọng */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    border: 1px solid #444;
    width: max-content !important; /* Vừa khít nội dung */
    min-width: 150px !important; /* Độ rộng tối thiểu để không quá nhỏ */
}

/* Áp dụng khoảng cách và hiệu ứng sổ ra mượt mà (Chỉ trên Desktop để không lỗi Mobile) */
@media (min-width: 922px) {
    body .main-navigation .sub-menu {
        top: 100% !important; /* Ép sát vào mép dưới menu cha */
        margin-top: 0 !important;
        
        /* Hiệu ứng */
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
        display: block !important; /* Theme Astra đôi khi dùng left: -999em, ta dùng opacity */
        pointer-events: none;
    }
    
    body .main-navigation .menu-item:hover > .sub-menu,
    body .main-navigation .menu-item.focus > .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto;
    }
}

/* Chỉnh chữ sáng màu và giảm khoảng cách giữa các menu con */
body .main-navigation .sub-menu .menu-item > a {
    color: #ffffff !important;
    padding: 10px 20px !important; /* Căn lề trái phải cho cân đối */
    line-height: 1.4 !important;
    font-size: 0.95em !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Đường kẻ mờ ngăn cách */
}

/* Hiệu ứng khi hover vào menu con */
body .main-navigation .sub-menu .menu-item > a:hover {
    color: #d4af37 !important; /* Màu vàng gold */
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* ==============================================================
   CUSTOM FOOTER STYLES
   ============================================================== */
.baoan-custom-footer {
    background-color: #1a1a1a;
    color: #eaeaea;
    font-family: 'Inter', sans-serif; /* Fallback to theme font */
    padding-top: 60px;
    border-top: 4px solid #d4af37;
}

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

.baoan-footer-col {
    flex: 1 1 22%;
    margin-bottom: 40px;
    padding: 0 15px;
    min-width: 200px;
}

/* Column 1: Logo */
.baoan-footer-logo img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}
.baoan-footer-slogan {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #ccc;
}

/* Headings */
.baoan-footer-heading {
    color: #d4af37;
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}
.baoan-footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #d4af37;
}

/* Column 2 & 4: Menu / Quick Links */
.baoan-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.baoan-footer-menu li {
    margin-bottom: 12px;
}
.baoan-footer-menu li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.baoan-footer-menu li a:hover {
    color: #d4af37;
    padding-left: 5px;
}

/* Column 3: Contact Info */
.baoan-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.baoan-footer-contact li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}
.baoan-footer-contact li i {
    color: #d4af37;
    margin-right: 10px;
    font-size: 1.2rem;
    margin-top: 2px;
}
.baoan-footer-contact li a {
    color: #eaeaea;
    text-decoration: none;
    transition: color 0.3s ease;
}
.baoan-footer-contact li a:hover {
    color: #d4af37;
}

/* Bottom Bar */
.baoan-footer-bottom {
    background-color: #111;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #333;
}
.baoan-footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .baoan-footer-col {
        flex: 1 1 45%; /* 2 columns on tablet */
    }
}

@media (max-width: 576px) {
    .baoan-footer-container {
        flex-direction: column;
    }
    .baoan-footer-col {
        flex: 1 1 100%;
        margin-bottom: 30px;
        padding: 0;
    }
}
