@font-face{font-display:block;font-family:"Montserrat";src:url('../css/Montserrat-Regular.woff2') format('woff2');font-weight:400}
@font-face{font-display:block;font-family:"Montserrat";src:url('../css/Montserrat-Light.woff2') format('woff2');font-weight:300}
@font-face{font-display:block;font-family:"Montserrat";src:url('../css/Montserrat-Bold.woff2') format('woff2');font-weight:700}
@font-face{font-display:block;font-family:"Montserrat";src:url('../css/Montserrat-ExtraLight.woff2') format('woff2');font-weight:200}

:root {
  --brand: #ee8f35;
  --brand-dark: #d6791f;
  --text: #414042;
  --muted: #6b6b6b;
  --border: #e8e8e8;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}
.logo-img { height: 40px; }
.site-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ---------- Blog listing ---------- */
.blog-main { max-width: 1100px; margin: 0 auto; padding: 0 24px 60px; }
.blog-hero { text-align: center; padding: 60px 20px 40px; }
.blog-hero h1 { font-size: 40px; margin: 0 0 10px; }
.blog-hero p { color: var(--muted); font-size: 17px; margin: 0; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.post-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.post-card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #f2f2f2;
}
.post-card-img-placeholder {
  background: linear-gradient(135deg, #fdf1e3, #f7dcb8);
}
.post-card-body { padding: 18px 20px 22px; }
.post-date { color: var(--brand); font-size: 13px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.post-card-body h2 { font-size: 19px; margin: 8px 0 8px; line-height: 1.3; }
.post-card-body p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- Single post ---------- */
.post-article { max-width: 760px; margin: 50px auto 0; }
.post-article h1 { font-size: 34px; margin: 10px 0 24px; line-height: 1.25; }
.post-hero-img { width: 100%; border-radius: 10px; margin-bottom: 24px; max-height: 460px; object-fit: cover; }
.post-content p { font-size: 17px; margin: 0 0 18px; }
.back-link { margin-top: 40px; }
.back-link a { color: var(--brand); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Auth pages ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #faf7f3; }
.auth-box {
  background: #fff;
  padding: 40px 36px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.auth-logo { height: 44px; margin-bottom: 18px; }
.auth-box h1 { font-size: 22px; margin: 0 0 20px; }
.auth-box form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-box label { font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-box input {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}
.error-msg { color: #c0392b; font-size: 14px; margin-bottom: 14px; }
.success-msg { color: #1e8449; font-size: 14px; background: #eafaf1; padding: 10px 14px; border-radius: 8px; }

/* ---------- Admin ---------- */
.admin-body { background: #faf7f3; min-height: 100vh; }
.admin-topbar {
  background: var(--text);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 14px 30px;
  font-size: 14px;
}
.admin-topbar a { color: #f2c391; }
.admin-wrap { max-width: 640px; margin: 0 auto; padding: 40px 20px 80px; }
.admin-wrap h1 { font-size: 26px; margin-bottom: 20px; }
.post-form { display: flex; flex-direction: column; gap: 14px; background: #fff; padding: 26px; border-radius: 12px; border: 1px solid var(--border); }
.post-form label { font-size: 13px; font-weight: 600; color: var(--muted); }
.post-form input[type="text"],
.post-form input[type="file"],
.post-form textarea {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}
.post-form textarea { resize: vertical; }
.publish-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 13px 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.publish-btn:hover { background: var(--brand-dark); }

.recent-heading { margin-top: 40px; font-size: 18px; }
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14.5px;
}
.recent-item span:first-child { flex: 1; font-weight: 500; }
.recent-item a { color: var(--brand); font-weight: 600; }
.muted { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .site-nav { gap: 16px; }
  .blog-hero h1 { font-size: 30px; }
}
