/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body { background-color: #f0f4f7; color: #333; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
.container { width: 95%; max-width: 1200px; margin: 0 auto; }
.hidden { display: none !important; }

/* HEADER */
.top-bar { background: #004d40; color: #fff; padding: 6px 0; font-size: 0.85em; }
.top-bar .container { display: flex; justify-content: space-between; }
.header-layout { display: flex; width: 100%; height: 200px; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin: 10px auto; overflow: hidden; border-radius: 8px; position: relative; }
.header-left { width: 200px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 15px; border-right: 1px solid #eee; background: #fff; z-index: 2; }
.header-left img { max-width: 100%; max-height: 100%; object-fit: contain; }
.header-right { flex-grow: 1; position: relative; }
#site-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.header-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.35); display: flex; flex-direction: column; justify-content: center; padding-left: 40px; color: white; }
.site-title h1 { font-size: 3.3rem; font-weight: 800; text-shadow: 2px 2px 5px rgba(0,0,0,0.7); line-height: 1.2; }
.site-title p { font-size: 1.1rem; font-weight: 600; margin-bottom: 5px; }

/* MOBILE MENU BUTTON */
.mobile-menu-btn { display: none; background: #004d40; color: white; border: none; padding: 8px 15px; border-radius: 4px; font-size: 1.2rem; cursor: pointer; position: absolute; right: 10px; bottom: 10px; z-index: 10; }

/* MENU */
.main-menu { background: #00796b; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.main-menu ul { list-style: none; display: flex; flex-wrap: wrap; }
.main-menu a { display: block; padding: 15px 20px; color: white; font-weight: 600; text-decoration: none; transition: 0.3s; }
.main-menu a:hover, .main-menu a.active { background: #004d40; }
.login-item { margin-left: auto; background: #b71c1c; }

/* CONTENT BOXES */
.main-content { padding: 20px 0; flex: 1; }
.content-box { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); margin-bottom: 25px; }
.section-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 3px solid #00796b; padding-bottom: 10px; }
.section-heading { color: #004d40; font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }

/* GRID SYSTEMS */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border: 1px solid #eee; cursor: pointer; transition: 0.3s; }
.post-card:hover { transform: translateY(-5px); }
.post-card img { width: 100%; height: 200px; object-fit: cover; }
.post-content { padding: 15px; }
.post-actions-admin { margin-top: 10px; border-top: 1px dashed #ddd; padding-top: 10px; display: flex; gap: 8px; }

.staff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.staff-row-break { flex-basis: 100%; height: 0; }
.staff-card { background: white; padding: 20px; text-align: center; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); border-top: 5px solid #00796b; width: 250px; }

/* ẢNH NHÂN SỰ */
.staff-avatar { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    object-position: top center; 
    margin-bottom: 15px; 
    border-radius: 8px; 
    border: 1px solid #eee; 
}

/* BUTTONS */
.btn-primary { background: #00796b; color: white; padding: 10px 18px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: #004d40; }
.btn-secondary { background: #607d8b; color: white; padding: 10px 18px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-edit-post { background: #fbc02d; color: #333; padding: 5px 10px; border-radius: 4px; font-weight: bold; border: none; cursor: pointer; font-size: 12px; }
.btn-delete-item { background: #d32f2f; color: white; padding: 5px 10px; border-radius: 4px; border: none; cursor: pointer; font-size: 12px; }

/* ADMIN */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.admin-card { background: white; padding: 20px; border-radius: 10px; border-top: 5px solid #00796b; height: 100%; }
input, select, textarea { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; }

/* MODAL */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 10px; }
.modal-content { background: white; padding: 25px; width: 100%; max-width: 650px; border-radius: 12px; max-height: 90vh; overflow-y: auto; }

/* FOOTER */
.site-footer { background: #263238; color: #cfd8dc; padding: 30px 0; border-top: 6px solid #00796b; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .header-layout { height: auto; flex-direction: column; }
    .header-left { display: none; }
    .header-right { height: 150px; width: 100%; }
    .header-overlay { padding-left: 20px; }
    .site-title h1 { font-size: 1.68rem; }
    .mobile-menu-btn { display: block; }
    
    .main-menu ul { display: none; flex-direction: column; width: 100%; background: #00796b; }
    .main-menu ul.show { display: flex; }
    .main-menu li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .login-item { margin-left: 0; }

    .news-grid { grid-template-columns: 1fr; }
    
    .staff-card { width: 100%; max-width: 250px; margin: 0 auto; } 
    
    .section-header-flex { flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-heading { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .header-right { height: 120px; }
    .site-title h1 { font-size: 1.44rem; }
    .top-bar .desktop-only { display: none; }
    .content-box { padding: 15px; }
}