/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
}

/* Header */
header {
  background-color: #111827; /* dark */
  color: #fff;
  padding: 22px 16px;
  text-align: center;
}
header h1 { font-size: 2.2rem; letter-spacing: 0.5px; }
header p { margin-top: 10px; color: #cbd5e1; }

/* Nav */
nav {
  display:flex;
  justify-content:center;
  gap: 12px;
  background:#0f1724;
  padding: 8px 10px;
  flex-wrap:wrap;
}
nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
}
nav a:hover { background: rgba(255,255,255,0.06); }

/* Main content */
main {
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card-content {
  padding: 15px;
}

.card-content h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.card-content p {
  font-size: 0.9rem;
  color: #666;
}

/* Login and Sign Up links */
.auth-links {
  position: absolute;
  top: 20px;
  right: 30px;
}

.auth-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 15px;
  font-weight: bold;
  transition: color 0.3s;
}

.auth-links a:hover {
  color: #ffcc00; /* a gold-like hover color for contrast */
}

/* Make the header title link white and remove underline */
header h1 a {
  color: white;
  text-decoration: none;
}

.auth-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 15px;
  font-weight: bold;
  transition: color 0.3s;
}

.auth-links a:hover {
  color: #ffcc00; /* gold hover accent */
}

/* 📰 Latest Articles Section */
.latest-articles {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.latest-articles h2 {
  text-align: center;
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.latest-articles .subtitle {
  text-align: center;
  color: #666;
  font-size: 1rem;
  margin-bottom: 30px;
}

/* 🧩 Cards Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 10px;
}

/* 🎴 Individual Card */
.card {
  display: block;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* 🖼️ Image */
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* 🧾 Card Body */
.card-content {
  padding: 15px;
}

.card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #222;
}

.card-content p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 🕓 Meta Info */
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px 15px;
  font-size: 0.85rem;
  color: #777;
  border-top: 1px solid #eee;
}

/* Article Image Styling */
.card img {
  width: 100%;
  height: 200px; /* adjust as needed */
  object-fit: cover; /* ensures consistent crop without distortion */
  border-bottom: 1px solid #eee;
}

/* Hide mobile-only links on desktop */
.mobile-only {
  display: none;
}
