/*
Theme Name: Legal Docs Portal Pro
Theme URI: https://example.com/legal-docs
Author: Antigravity AI
Author URI: https://example.com/
Description: A premium, SEO-optimized WordPress theme for Legal Document Portals (Thư Viện Pháp Luật), providing a robust interface for searching, categorizing, and reading laws and regulations.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: legaldocs-pro
*/

/* CSS Variables */
:root {
    --primary-color: #0d47a1; /* Strong Blue for Portal */
    --secondary-color: #ff9800; /* Action Orange */
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f5f7fa;
    --bg-white: #FFFFFF;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset and Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--text-main); background-color: var(--bg-light); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--primary-color); margin-bottom: 20px; font-weight: 700; line-height: 1.3; }
a { color: var(--primary-color); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--secondary-color); }
img { max-width: 100%; height: auto; display: block; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background-color: var(--bg-white); padding: 15px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; border-bottom: 3px solid var(--primary-color); }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.site-branding .site-title { font-size: 24px; font-weight: 800; margin: 0; text-transform: uppercase; }
.site-branding .site-title a { color: var(--primary-color); }
/* Navigation Resets */
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation li { position: relative; }
.main-navigation li a { display: block; color: var(--text-main); font-weight: 600; font-size: 15px; padding: 10px 0; text-decoration: none; transition: 0.2s; }
.main-navigation li a:hover { color: var(--secondary-color); }

/* Level 1 Only (Flex Row) */
.main-navigation > ul, .main-navigation > div > ul { display: flex; gap: 20px; align-items: center; }

/* Dropdown Sub-menus (2nd level and beyond) */
.main-navigation ul ul { display: none; position: absolute; top: 100%; left: 0; background: var(--bg-white); min-width: 260px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-radius: 6px; padding: 10px 0; border: 1px solid #e2e8f0; z-index: 99999; flex-direction: column; gap: 0; margin-top: 15px; transition: 0.3s; opacity: 0; visibility: hidden; }
.main-navigation ul li:hover > ul { display: flex; opacity: 1; visibility: visible; margin-top: 5px; }
.main-navigation ul ul li { width: 100%; }
.main-navigation ul ul li a { padding: 12px 20px; font-weight: 500; font-size: 14px; width: 100%; color: #475569; border-bottom: 1px solid #f1f5f9; }
.main-navigation ul ul li:last-child a { border-bottom: none; }
.main-navigation ul ul li a:hover { background: #f8fafc; color: var(--primary-color); padding-left: 25px; }

/* 3rd Lever+ Sub-menus */
.main-navigation ul ul ul { top: 0; left: 100%; margin-top: 0; margin-left: -5px; }

/* Font Awesome Dropdown Identifiers */
.main-navigation li.menu-item-has-children > a::after { content: '\f107'; font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free'; font-weight: 900; margin-left: 6px; font-size: 11px; opacity: 0.7;}
.main-navigation ul ul li.menu-item-has-children > a::after { content: '\f105'; float: right; margin-top: 2px; }

.header-cta { background-color: var(--secondary-color); color: var(--bg-white); padding: 8px 20px; border-radius: 4px; font-weight: 600; font-size: 14px; }
.header-cta:hover { background-color: #e65100; color: var(--bg-white); }

/* Footer */
.site-footer { background-color: #1a1a1a; color: #cccccc; padding: 60px 0 20px; margin-top: 60px; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-widget h4 { color: var(--bg-white); margin-bottom: 20px; font-size: 18px; text-transform: uppercase; border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; display: inline-block; }
.footer-widget p, .footer-widget a { color: #aaaaaa; }
.footer-widget a:hover { color: var(--secondary-color); }
.footer-widget ul { list-style: none; }
.footer-widget ul li { margin-bottom: 10px; display: flex; align-items: center; }
.footer-widget ul li::before { content: "\f105"; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-right: 10px; color: var(--secondary-color); }
.site-info { text-align: center; border-top: 1px solid #333; padding-top: 20px; font-size: 13px; color: #888; }

/* Hero Search Section */
.hero-search-section { background: linear-gradient(to right, #0d47a1, #1976d2); padding: 80px 0 100px; text-align: center; color: var(--bg-white); }
.hero-search-section h1 { font-size: 42px; color: var(--bg-white); margin-bottom: 15px; }
.hero-search-section p { font-size: 18px; margin-bottom: 40px; opacity: 0.9; }
.search-form-container { max-width: 800px; margin: 0 auto; background: var(--bg-white); padding: 10px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; }
.search-form-container input[type="text"] { flex: 1; border: none; padding: 15px 20px; font-size: 16px; outline: none; border-radius: 4px; }
.search-form-container button { background-color: var(--secondary-color); color: var(--bg-white); border: none; padding: 15px 40px; font-size: 16px; font-weight: 600; cursor: pointer; border-radius: 4px; transition: background 0.3s; }
.search-form-container button:hover { background-color: #e65100; }

/* Categories Grid */
.doc-categories { padding: 60px 0; background: var(--bg-white); margin-top: -40px; position: relative; z-index: 10; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.grid-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding: 0 30px; }
.cat-card { text-align: center; padding: 30px 20px; border: 1px solid #eee; border-radius: 8px; transition: all 0.3s; display: block; }
.cat-card:hover { border-color: var(--primary-color); box-shadow: 0 5px 15px rgba(13, 71, 161, 0.1); transform: translateY(-5px); }
.cat-card i { font-size: 36px; color: var(--primary-color); margin-bottom: 15px; }
.cat-card h3 { font-size: 18px; margin: 0; color: var(--text-main); }

/* Document Lists */
.docs-list-section { padding: 60px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-bottom: 30px; }
.section-header h2 { margin: 0; font-size: 24px; text-transform: uppercase; }
.section-header a { font-weight: 600; font-size: 14px; }

.doc-item { background: var(--bg-white); padding: 20px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 15px; display: flex; align-items: flex-start; gap: 20px; transition: transform 0.2s; border-left: 4px solid var(--primary-color); }
.doc-item:hover { transform: translateX(5px); }
.doc-icon { background: #e3f2fd; color: var(--primary-color); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.doc-content h3 { font-size: 18px; margin-bottom: 8px; line-height: 1.4; }
.doc-content h3 a { color: var(--primary-color); }
.doc-content h3 a:hover { color: var(--secondary-color); }
.doc-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 15px; flex-wrap: wrap; }
.doc-meta span i { margin-right: 5px; }

/* Main Content (Pages/Single) */
.page-title { background: #e3f2fd; padding: 40px 0; border-bottom: 1px solid #bbdefb; margin-bottom: 40px; }
.page-title h1 { margin: 0; font-size: 32px; color: var(--primary-color); }
.doc-details-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; background: #fafafa; border: 1px solid #eee; }
.doc-details-table th, .doc-details-table td { padding: 12px 15px; border: 1px solid #eee; text-align: left; }
.doc-details-table th { width: 30%; background: #f0f0f0; font-weight: 600; color: var(--text-main); }
.entry-content { font-size: 16px; line-height: 1.8; color: #222; background: var(--bg-white); padding: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 15px; }
    .hero-search-section h1 { font-size: 28px; }
    .search-form-container { flex-direction: column; }
    .search-form-container button { padding: 15px; }
    .doc-item { flex-direction: column; gap: 10px; }
    .doc-icon { display: none; }
}
