/* --- 1. VARIABLES (GROUNDED EARTH THEME) --- */
:root {
    --brown: #795548;
    --brown-light: #EFEBE9;
    --brown-dark: #4E342E;
    --yellow-ochre: #FBC02D;
    --terracotta: #D84315;
    --gray-dark: #263238;
    --gray-light: #F5F5F5;
    --white: #FFFFFF;
    --pk-red: #D62828;
    --shadow-card: 0 10px 30px rgba(121, 85, 72, 0.08);
    --shadow-hover: 0 20px 40px rgba(121, 85, 72, 0.15);
    --container: 1200px;
    --header-h: 80px;

    --gradient-earth: linear-gradient(135deg, #D7CCC8 0%, #8D6E63 100%);
}

/* --- 3. HERO SECTION --- */
.hub-hero {
    position: relative; padding: 80px 0; text-align: center; overflow: hidden;
    background: linear-gradient(to bottom, #fff, #efebe9);
}
.hero-bg-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 40rem; color: rgba(121, 85, 72, 0.05); z-index: 0;
    animation: pulse 6s infinite ease-in-out;
}
@keyframes pulse { 0% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.02); } 100% { transform: translate(-50%, -50%) scale(1); } }

.hero-content { position: relative; z-index: 2; }
.element-symbol {
    width: 100px; height: 100px; border-radius: 50%; background: var(--gradient-earth);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
    font-size: 3rem; color: white; box-shadow: 0 10px 30px rgba(141, 110, 99, 0.4);
}
.hero-title { font-size: 4rem; color: var(--gray-dark); margin-bottom: 15px; font-weight: 800; }
.hero-subtitle { font-size: 1.2rem; color: #555; max-width: 700px; margin: 0 auto 40px; }
.hero-desc { font-size: 1.1rem; color: #666; max-width: 700px; margin: 0 auto; }

.cheat-sheet { margin-top: -50px; position: relative; z-index: 3; padding-bottom: 80px; }
.cs-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    background: white; padding: 40px; border-radius: 20px;
    box-shadow: var(--shadow-card); border: 1px solid rgba(121, 85, 72, 0.2);
}
.cs-item { 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    padding: 0 20px; border-right: 1px solid #eee;
}
.cs-item:last-child { border-right: none; }
.cs-icon { font-size: 2rem; color: var(--brown); margin-bottom: 15px; }
.cs-label { font-size: 0.9rem; text-transform: uppercase; color: #999; letter-spacing: 1px; margin-bottom: 5px; }
.cs-value { font-size: 1.1rem; font-weight: 700; color: var(--gray-dark); }
.color-dots { display: flex; gap: 5px; justify-content: center; margin-top: 5px; }
.dot { width: 15px; height: 15px; border-radius: 50%; border: 1px solid #ddd; }

/* --- 4. YEAR LOOKUP (Bảng Tra Cứu Năm Sinh) --- */
.year-lookup-sec { margin-top: -50px; position: relative; z-index: 3; padding-bottom: 80px; }
.year-check-box {
    background: white; padding: 40px; border-radius: 16px;
    box-shadow: var(--shadow-card); border: 1px solid rgba(121, 85, 72, 0.2);
}
.ycb-title { text-align: center; font-size: 1.8rem; margin-bottom: 30px; color: var(--gray-dark); }
.ycb-title i { color: var(--brown); margin-right: 10px; }

/* Grid Layout for Years */
.year-lookup-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.year-card {
    background: var(--brown-light); border-radius: 12px; padding: 25px 20px;
    text-align: center; transition: 0.3s; cursor: pointer; border: 1px solid transparent;
    display: flex; flex-direction: column; justify-content: center;
}
.year-card:hover { 
    background: white; border-color: var(--brown); box-shadow: var(--shadow-card); transform: translateY(-5px);
}

.yc-year { 
    font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; 
    color: var(--gray-dark); line-height: 1; margin-bottom: 5px; 
}
.yc-canchi { font-size: 0.9rem; font-weight: 700; color: var(--brown-dark); text-transform: uppercase; margin-bottom: 5px; }
.yc-napam { font-size: 0.85rem; color: #666; }

.yc-action {
    margin-top: 15px; font-size: 0.8rem; font-weight: 600; color: var(--brown);
    opacity: 0; transform: translateY(10px); transition: 0.3s;
}
.year-card:hover .yc-action { opacity: 1; transform: translateY(0); }

/* --- 5. TOPIC CLUSTER NAVIGATION (GRID) --- */
.topic-section { padding: 60px 0; }
.topic-header { text-align: center; margin-bottom: 50px; }
.topic-header h2 { font-size: 2.5rem; color: var(--gray-dark); margin-bottom: 10px; position: relative; display: inline-block; }
.topic-header h2::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 3px; background: var(--brown);
}

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

.topic-card {
    background: white; border-radius: 16px; padding: 25px;
    border: 1px solid rgba(0,0,0,0.05); transition: 0.4s;
    display: flex; flex-direction: column; height: 100%;
    position: relative; overflow: hidden;
}
.topic-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-hover); 
    border-color: var(--brown); 
}

.topic-icon {
    width: 50px; height: 50px; background: var(--brown-light); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--brown-dark); font-size: 1.5rem; margin-bottom: 20px;
    transition: 0.4s;
}
.topic-card:hover .topic-icon { background: var(--brown); color: white; }

.topic-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 15px; color: var(--gray-dark); }

.link-list { list-style: none; padding-left: 0; }
.link-list li { margin-bottom: 10px; }
.link-list a { 
    display: flex; align-items: center; color: #555; font-size: 0.95rem; 
    transition: 0.2s; padding: 5px 0;
}
.link-list a:hover { color: var(--brown-dark); transform: translateX(5px); }
.link-list a::before {
    content: '•'; color: var(--brown); margin-right: 10px; font-size: 1.2rem;
}

/* --- 6. WORKSHOP INTEGRATION --- */
.workshop-banner {
    background: linear-gradient(rgba(78, 52, 46, 0.9), rgba(78, 52, 46, 0.8)), url('https://images.unsplash.com/photo-1618331835717-801e976710b2?q=80&w=1200&auto=format&fit=crop') center/cover fixed;
    padding: 100px 0; text-align: center; color: white; position: relative;
}
.wb-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.wb-title { font-size: 3rem; margin-bottom: 20px; font-family: 'Playfair Display', serif; }
.wb-desc { font-size: 1.1rem; margin-bottom: 40px; opacity: 0.9; }
.wb-btn {
    display: inline-block; padding: 15px 40px; background: var(--brown); color: white;
    font-weight: 700; text-transform: uppercase; border-radius: 50px; transition: 0.3s;
}
.wb-btn:hover { background: white; color: var(--brown-dark); transform: translateY(-3px); }

/* --- 7. NAP AM SECTION --- */
.detail-sec { padding: 80px 0; border-bottom: 1px solid #eee; }
.nap-am-sec { background: #fff; }
.nap-am-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.na-card {
    background: var(--bg-body); border-radius: 12px; padding: 30px;
    text-align: center; transition: 0.3s; border: 1px solid transparent;
    display: flex; flex-direction: column; height: 100%;
}
.na-card:hover { background: white; border-color: var(--brown); box-shadow: var(--shadow-card); }
.na-year { display: inline-block; background: var(--brown-light); color: var(--brown); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; margin-bottom: 15px; }
.na-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.na-desc { font-size: 0.9rem; color: #666; margin-bottom: 20px; line-height: 1.6; flex-grow: 1; }
.btn-outline {
    display: inline-block; padding: 8px 25px; border: 1px solid var(--brown);
    color: var(--brown-dark); border-radius: 20px; font-weight: 600; font-size: 0.9rem;
    margin-top: auto; transition: 0.3s;
}
.na-card:hover .btn-outline { background: var(--brown); color: white; }

/* --- 8. LIFESTYLE GRID --- */
.lifestyle-sec { background: var(--gray-light); }
.ls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 80px; }
.ls-grid.reverse { direction: rtl; }
.ls-grid.reverse .ls-content { direction: ltr; }
.ls-img { width: 100%; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); height: 400px; object-fit: cover; }
.ls-content h3 { font-size: 2rem; margin-bottom: 20px; color: var(--gray-dark); }
.ls-list li { margin-bottom: 15px; display: flex; gap: 15px; align-items: flex-start; }
.ls-list i { color: var(--brown); margin-top: 5px; }
.ls-btn {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 20px;
    padding: 10px 25px; background: var(--gray-dark); color: white; 
    border-radius: 5px; font-weight: 600; font-size: 0.95rem; transition: 0.3s;
}
.ls-btn:hover { background: var(--brown); transform: translateX(5px); }

/* --- 9. SHOP GRID --- */
.shop-sec { background: white; }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.item-card { border: 1px solid #eee; border-radius: 12px; overflow: hidden; transition: 0.3s; text-align: center; background: white; }
.item-card:hover { border-color: var(--brown); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.item-img { width: 100%; height: 250px; object-fit: cover; background: #f9f9f9; }
.item-info { padding: 20px; }
.item-name { font-weight: 700; color: var(--gray-dark); margin-bottom: 5px; display: block; }
.item-btn { display: inline-block; padding: 8px 20px; border: 1px solid var(--brown); color: var(--brown); border-radius: 20px; font-size: 0.9rem; font-weight: 600; margin-top: 10px; }
.item-card:hover .item-btn { background: var(--brown); color: white; }

/* --- 10. FAQ SECTION --- */
.faq-sec { background: var(--brown-light); }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { 
    background: white; border-radius: 12px; margin-bottom: 15px; overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.faq-head { 
    padding: 20px; cursor: pointer; font-weight: 700; color: var(--gray-dark);
    display: flex; justify-content: space-between; align-items: center;
}
.faq-head:hover { color: var(--brown-dark); }
.faq-body { 
    padding: 0 20px; max-height: 0; overflow: hidden; transition: 0.4s ease; color: #666; 
}
.faq-item.active .faq-body { padding-bottom: 20px; max-height: 200px; }
.faq-item.active .faq-head i { transform: rotate(180deg); }

/* --- 11. FOOTER --- */
footer { background: var(--gray-dark); color: #ccc; padding: 60px 0 30px; text-align: center; }
.f-links { margin-bottom: 30px; }
.f-links a { color: white; margin: 0 15px; opacity: 0.8; }
.f-links a:hover { opacity: 1; color: var(--brown); }

/* Responsive */
@media (max-width: 1200px) {
    .topic-grid { grid-template-columns: repeat(2, 1fr); }
    .year-lookup-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .topic-grid { grid-template-columns: 1fr; }
    .nap-am-grid { grid-template-columns: 1fr; }
    .ls-grid { grid-template-columns: 1fr; gap: 30px; }
    .ls-grid.reverse { direction: ltr; }
    .shop-grid { grid-template-columns: 1fr; }
    .year-lookup-grid { grid-template-columns: 1fr; }
}