/* assets/css/modules.css */

/* --- 1. LOGO HEADER & FOOTER (STYLE MỚI - PLAYFAIR DISPLAY) --- */
.site-title a, .footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;  
    font-weight: 700;
    font-style: italic; 
    text-transform: none; 
    letter-spacing: -0.5px; 
    color: #fff;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2); 
    transition: 0.3s;
    text-decoration: none;
}

.site-title a:hover {
    text-shadow: 2px 2px 10px rgba(212, 175, 55, 0.6); 
}

/* Tô điểm đuôi .org */
.site-title a span, .footer-logo span {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-color);
    margin-left: 5px;
    position: relative;
    top: -5px; 
}

/* --- 2. STYLE CHO MẠNG XÃ HỘI (SOCIAL ICONS) --- */
.social-icons-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1); 
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%; 
    color: #fff;
    transition: 0.4s;
    text-decoration: none;
}

.social-item svg { width: 22px; height: 22px; }

/* Hiệu ứng hover từng mạng xã hội */
.social-item:hover { transform: translateY(-3px); border-color: transparent; }
.social-item.fb:hover { background: #1877F2; box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4); }
.social-item.ins:hover { background: #E4405F; box-shadow: 0 5px 15px rgba(228, 64, 95, 0.4); }
.social-item.yt:hover { background: #FF0000; box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4); }

/* --- 3. BLOG CARDS --- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.blog-card { background: #fff; border: 1px solid #eee; border-radius: 15px; overflow: hidden; transition: 0.3s; }
.blog-title { font-family: var(--title-font); font-size: 1.6rem; font-weight: 700; padding: 15px; margin: 0; color: var(--bg-dark); }
.entry-excerpt { font-family: var(--reading-font); font-size: 1rem; color: #666; padding: 0 15px 15px; }

/* =========================================================
   FIX CỨNG BỐ CỤC 2x2 CHO NGUYÊN TỐ & HIỆU ỨNG KÍNH MỜ
   ========================================================= */

/* 1. BẮT BUỘC CHIA 2 CỘT (Cho cả Desktop & Mobile) */
.elements-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Luôn chia 2 cột đều nhau */
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

/* 2. STYLE TỪNG Ô (KÍNH MỜ & MÀU SẮC) */
.element-item {
    text-align: center;
    padding: 30px 20px;
    border-radius: 20px;
    
    /* Hiệu ứng Kính Mờ (Glassmorphism) */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Hiệu ứng khi di chuột */
.element-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.elem-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.elem-content h3 {
    font-family: var(--title-font, serif);
    font-size: 1.3rem;
    margin: 10px 0 5px;
    font-weight: bold;
    color: #333;
}
.elem-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* 3. MÀU SẮC RIÊNG (Set cứng màu nền nhạt cho từng cái) */
.element-item:nth-child(1) { background: linear-gradient(135deg, rgba(255,245,230,0.8), rgba(255,255,255,0.6)); border-color: #ffcc00; } /* Lửa */
.element-item:nth-child(2) { background: linear-gradient(135deg, rgba(230,245,255,0.8), rgba(255,255,255,0.6)); border-color: #0099ff; } /* Nước */
.element-item:nth-child(3) { background: linear-gradient(135deg, rgba(235,250,235,0.8), rgba(255,255,255,0.6)); border-color: #4caf50; } /* Đất */
.element-item:nth-child(4) { background: linear-gradient(135deg, rgba(245,248,255,0.8), rgba(255,255,255,0.6)); border-color: #90a4ae; } /* Khí */

/* 4. ĐIỀU CHỈNH MOBILE (Vẫn giữ 2 cột nhưng thu nhỏ khoảng cách) */
@media (max-width: 768px) {
    .elements-grid {
        gap: 15px !important; /* Thu hẹp khoảng cách */
        margin-top: 20px;
    }
    
    .element-item {
        padding: 20px 10px; /* Thu nhỏ padding */
    }
    
    .elem-icon { font-size: 2.5rem; margin-bottom: 10px; }
    .elem-content h3 { font-size: 1.1rem; }
    .elem-content p { font-size: 0.8rem; display: none; /* Ẩn mô tả trên mobile cho gọn nếu muốn, hoặc để lại */ }
}

/* 5. CÁC PHẦN KHÁC (FIX LỖI CŨ) */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr !important; } }