@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --bg: #030404;
  --sidebar-bg: #0a0b0b;
  --gold: #c8a965;
  --gold-dark: #a08040;
  --white: #ffffff;
  --gray: #888;
  --gray-light: #555;
  --border: #1a1a1a;
  --sidebar-w: 200px;
  --topbar-h: 44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Barlow', sans-serif;
  min-height: 100vh;
  display: flex;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  display: block;
}

.sidebar-logo .logo-line {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--gold);
  margin-top: 10px;
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 8px 24px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #aaa;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
  position: relative;
}

.nav-item:hover { color: var(--white); background: rgba(255,255,255,0.04); }

.nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(200,169,101,0.07);
}

.nav-item svg {
  width: 18px; height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-item.active svg { opacity: 1; }

/* ── TOP BAR ── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 40px;
  z-index: 90;
}

.topbar-breaking {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
}

.topbar-dot {
  color: var(--gold);
  font-size: 0.5rem;
}

.topbar-text {
  font-size: 0.85rem;
  color: var(--white);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-link {
  color: var(--white);
  font-size: 0.85rem;
  margin-left: 4px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #888;
  font-size: 0.85rem;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}
.topbar-search:hover { background: rgba(255,255,255,0.06); }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  flex: 1;
  padding: 60px 80px;
}

/* ── HERO ── */
.hero {
  max-width: 900px;
  padding: 20px 0 60px;
}

.hero-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 32px;
}

.hero-divider {
  width: 220px;
  height: 2px;
  background: var(--gold);
  margin: 28px 0 32px;
}

.hero-sub {
  font-size: 1.15rem;
  font-weight: 400;
  color: #ccc;
  line-height: 1.6;
  max-width: 420px;
}

/* ── FEATURED ARTICLES (Home) ── */
.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.article-card:hover { opacity: 0.85; }

.article-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #111;
  display: block;
}

.article-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 2rem;
}

.article-card-cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.article-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--white);
}

.article-card-date {
  font-size: 0.75rem;
  color: var(--gray);
}

/* ── CATEGORY PAGE ── */
.page-header {
  margin-bottom: 60px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.page-header-cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.page-header-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.page-header-desc {
  margin-top: 20px;
  font-size: 1rem;
  color: #999;
  max-width: 520px;
  line-height: 1.6;
}

/* ── ARTICLE DETAIL ── */
.article-detail {
  max-width: 760px;
}

.article-detail-cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.article-detail-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-detail-meta {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
}

.article-detail-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #111;
  margin-bottom: 36px;
  display: block;
}

.article-detail-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #ddd;
}

.article-detail-body p { margin-bottom: 1.4em; }

/* ── SEARCH ── */
.search-form {
  display: flex;
  gap: 0;
  margin-bottom: 48px;
  max-width: 640px;
}

.search-input {
  flex: 1;
  background: #111;
  border: 1px solid #222;
  border-right: none;
  color: var(--white);
  padding: 14px 20px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: #555; }

.search-btn {
  background: var(--gold);
  border: none;
  color: #000;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--gold-dark); }

.search-results { }
.search-result-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.search-result-item:hover { opacity: 0.8; }

.search-result-cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.search-result-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--white);
}

.search-result-snippet {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.5;
}

.search-no-results {
  color: #555;
  font-size: 1rem;
  padding: 40px 0;
}

/* ── NEWSLETTER ── */
.newsletter-box {
  max-width: 560px;
}

.newsletter-box h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.newsletter-box p {
  color: #999;
  line-height: 1.6;
  margin-bottom: 36px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nl-input {
  background: #111;
  border: 1px solid #222;
  color: var(--white);
  padding: 14px 20px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.nl-input:focus { border-color: var(--gold); }
.nl-input::placeholder { color: #555; }

.nl-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
}

.nl-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.nl-toggle input {
  opacity: 0;
  width: 0; height: 0;
}

.nl-slider {
  position: absolute;
  inset: 0;
  background: #222;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s;
}

.nl-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #555;
  top: 3px; left: 3px;
  transition: transform 0.3s, background 0.3s;
}

.nl-toggle input:checked + .nl-slider { background: rgba(200,169,101,0.25); }
.nl-toggle input:checked + .nl-slider::before {
  transform: translateX(20px);
  background: var(--gold);
}

.nl-toggle-label { font-size: 0.9rem; color: #aaa; }

.btn-primary {
  background: var(--gold);
  border: none;
  color: #000;
  padding: 14px 32px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
  align-self: flex-start;
}
.btn-primary:hover { background: var(--gold-dark); }
.btn-primary:active { transform: scale(0.98); }

.success-msg {
  display: none;
  background: rgba(200,169,101,0.12);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 16px 20px;
  font-size: 0.9rem;
  margin-top: 16px;
}
.success-msg.show { display: block; }

/* ── PROFIL / LOGIN ── */
.login-box {
  max-width: 400px;
}

.login-box h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.login-box p {
  color: #777;
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.form-input {
  background: #111;
  border: 1px solid #222;
  color: var(--white);
  padding: 12px 16px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus { border-color: var(--gold); }

.login-error {
  color: #e55;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}
.login-error.show { display: block; }

.profile-box { max-width: 520px; }

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: #000;
  margin-bottom: 24px;
}

.profile-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.profile-email {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 36px;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: #ccc;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.profile-link:hover { color: var(--gold); }

.profile-link svg {
  width: 18px; height: 18px;
  opacity: 0.6;
}

.btn-outline {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 10px 24px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: #e55; color: #e55; }

/* ── ADMIN ── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-card {
  background: #0d0e0e;
  border: 1px solid var(--border);
  padding: 28px;
}

.admin-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-input, .admin-textarea {
  background: #111;
  border: 1px solid #222;
  color: var(--white);
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.admin-input:focus, .admin-textarea:focus { border-color: var(--gold); }
.admin-textarea { resize: vertical; min-height: 80px; }

.admin-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-btn {
  padding: 9px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  transition: opacity 0.2s;
}
.admin-btn:hover { opacity: 0.85; }
.admin-btn.save { background: var(--gold); color: #000; }
.admin-btn.reset { background: #222; color: #aaa; }
.admin-btn.export { background: #1a2a1a; color: #4a4; }
.admin-btn.import { background: #1a1a2a; color: #66a; }

.admin-access-denied {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 60px 0;
}

.admin-access-denied h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  text-transform: uppercase;
  color: #e55;
}

/* ── ARTICLE LIST ── */
.admin-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.admin-article-item {
  background: #111;
  border: 1px solid #1a1a1a;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-article-title {
  font-size: 0.85rem;
  color: #ccc;
  flex: 1;
}

.admin-article-cat {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-btn-sm {
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border: none;
  background: #222;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-btn-sm:hover { background: #333; }
.admin-btn-sm.del { background: #2a1111; color: #e55; }
.admin-btn-sm.del:hover { background: #3a1111; }

/* ── FOOTER ── */
.footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.footer-copy {
  color: #444;
  font-size: 0.8rem;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: #555;
  font-size: 0.8rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .main-content { padding: 40px 40px; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-200px);
    transition: transform 0.3s;
    width: 200px;
  }
  .sidebar.open { transform: translateX(0); }

  .topbar { left: 0; }

  .main-content { padding: 24px 20px; margin-left: 0; }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    margin-right: 8px;
    flex-shrink: 0;
  }

  .hero-headline { font-size: 4rem; }
}

@media (min-width: 769px) {
  .hamburger { display: none; }
}

/* ── UTILITIES ── */
.text-gold { color: var(--gold); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }

/* ── HIGHLIGHT ── */
mark {
  background: rgba(200,169,101,0.3);
  color: var(--gold);
  padding: 0 2px;
}

/* ── OVERLAY for mobile ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }
