/* style.css */
:root {
    --primary-color: #ff5722;
    --bg-body: #ffffff;
    --text-main: #1a1a1a;
    --space: 8px; /* 8-point grid base */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* Admin Bar */
.admin-bar { background: #111; color: #fff; padding: calc(var(--space) * 1) calc(var(--space) * 3); display: flex; justify-content: flex-end; gap: calc(var(--space) * 2); font-size: 0.85rem; }
.admin-bar a { color: #ccc; transition: color 0.2s; }
.admin-bar a:hover { color: #fff; }

header { padding: calc(var(--space) * 3) 0; border-bottom: 1px solid #eee; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 calc(var(--space) * 3); }
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: calc(var(--space) * 2); }

.logo { font-size: 2rem; font-weight: 900; letter-spacing: -1px; text-transform: uppercase; color: #000; }
.nav-links { display: flex; gap: calc(var(--space) * 3); align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.9rem; text-transform: uppercase; color: #555; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
.btn-primary { background: var(--primary-color); color: #fff !important; padding: 8px 16px; border-radius: 4px; }

/* Grid Layout */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: calc(var(--space) * 4); padding: calc(var(--space) * 5) 0; }
.visual-card { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: #000; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.05); display: block; }
.visual-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.5s ease, opacity 0.3s ease; }
.visual-card:hover img { transform: scale(1.05); opacity: 0.6; }

.badge { position: absolute; top: calc(var(--space) * 2); left: calc(var(--space) * 2); background: var(--primary-color); color: #fff; padding: 4px 12px; font-size: 0.75rem; font-weight: bold; border-radius: 20px; text-transform: uppercase; z-index: 2; }
.visual-content { position: absolute; bottom: 0; left: 0; right: 0; padding: calc(var(--space) * 4); background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); color: #fff; z-index: 1; }
.visual-content h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.visual-content p { font-size: 0.9rem; color: #e0e0e0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Articles & Forms */
.article-detail { max-width: 800px; margin: calc(var(--space) * 6) auto; }
.article-detail h1 { font-size: 3rem; line-height: 1.1; margin-bottom: calc(var(--space) * 2); }
.meta-detail { font-size: 0.95rem; color: #777; margin-bottom: calc(var(--space) * 4); padding-bottom: calc(var(--space) * 2); border-bottom: 1px solid #eee; display: flex; gap: 16px; align-items: center; }
.article-detail img { width: 100%; border-radius: 12px; margin-bottom: calc(var(--space) * 4); }
.article-detail .content { font-size: 1.15rem; line-height: 1.8; color: #333; }

.dashboard-container { max-width: 1000px; margin: calc(var(--space) * 6) auto; }
.panel { background: #f9f9f9; padding: calc(var(--space) * 4); border-radius: 8px; border: 1px solid #eee; margin-bottom: calc(var(--space) * 4); }
.panel h2 { margin-bottom: calc(var(--space) * 3); padding-bottom: 8px; border-bottom: 2px solid #ddd; }

.form-group { margin-bottom: calc(var(--space) * 2); }
.form-group label { display: block; font-weight: bold; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
.btn-submit { background: #000; color: #fff; padding: 10px 20px; border: none; font-weight: bold; cursor: pointer; border-radius: 4px; }
.btn-submit:hover { background: var(--primary-color); }

table { width: 100%; border-collapse: collapse; margin-top: calc(var(--space) * 2); background: #fff; }
th, td { padding: 12px; border: 1px solid #eee; text-align: left; }
th { background: #f1f1f1; font-weight: bold; }

footer { text-align: center; padding: calc(var(--space) * 6) 0; color: #888; font-size: 0.9rem; }