/* Universal Reset and Fonts */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f6f9;
  color: #333;
}

/* --- RESPONSIVE LOGIN SCREEN --- */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- RESPONSIVE DASHBOARD LAYOUT --- */
/* Mobile View: Stacks vertically */
.dashboard-wrapper {
  display: flex;
  flex-direction: column;
}

.sidebar {
  background: #1e293b;
  color: #fff;
  padding: 20px;
}

.main-content {
  padding: 20px;
  flex: 1;
}

/* Grid Metrics Container */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr; /* Stacks columns on mobile */
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- RESPONSIVE BLOG LAYOUT --- */
.blog-container {
  display: grid;
  grid-template-columns: 1fr; /* Stacks blog and sidebar on mobile */
  gap: 30px;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.main-story {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

.main-story img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.related-sidebar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

.related-post-item {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  padding-bottom: 15px;
  border-bottom: 1fr solid #eee;
}

.related-post-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

/* --- DESKTOP MEDIA QUERIES (Screes larger than 1024px) --- */
@media (min-width: 1024px) {
  /* Side-by-side split for desktop admin panels */
  .dashboard-wrapper {
    flex-direction: row;
    min-height: 100vh;
  }

  .sidebar {
    width: 260px;
  }

  /* Grid stretches to multi-column cards across the screen */
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Blog takes 70% width, Related section becomes a right-hand sidebar taking 30% */
  .blog-container {
    grid-template-columns: 7fr 3fr;
  }
}

/* Admin dashboard media */
@media (min-width: 1024px) {
  /* ... existing rules ... */

  .desktop-split {
    grid-template-columns: 1fr 1fr !important; /* Forces layout split on large widths */
  }
}
