/* Base reset */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, sans-serif; }
body { background: #f5f7fa; color: #222; line-height: 1.5; }

/* 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: 6px; 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: 0.95rem;
}
nav a:hover { background: rgba(255,255,255,0.06); }

/* Page container */
.container { max-width: 1100px; margin: 28px auto; padding: 0 16px; }

/* Hero */
.hero {
  background: linear-gradient(90deg, rgba(17,24,39,0.85), rgba(17,24,39,0.65));
  color: #fff;
  padding: 28px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items:center;
  background-image: url('https://via.placeholder.com/1200x300?text=Football+Hero');
  background-size: cover;
  background-position: center;
}
.hero .overlay {
  background: rgba(0,0,0,0.45);
  padding: 18px;
  border-radius: 8px;
}
.hero h2 { font-size: 1.6rem; margin-bottom: 8px; }
.hero p { color: #e6eef8; }

/* Controls row */
.controls {
  display:flex;
  justify-content: space-between;
  align-items:center;
  margin: 18px 0;
  gap: 12px;
  flex-wrap:wrap;
}
.controls .left { font-weight:700; color:#111827; }
.controls input[type="search"] {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  width: 220px;
}

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

/* Individual Card — Compact, modern look */
.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: 200px; /* same height as home page */
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

/* 🧾 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;
}


/* Back link / footer small */
.back {
  margin-top: 20px;
  text-align: left;
}
.back a {
  color: #0f1724;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  text-decoration: none;
  font-weight:700;
}

/* Responsive tweaks */
@media (max-width:560px){
  .hero { padding: 18px; }
  header h1 { font-size:1.6rem; }
  nav a { padding:8px 10px; font-size:0.9rem; }
}

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

/* 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 */
}

/* 📰 Article Details Page Styling */
.article-details {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 24px;
  line-height: 1.6;
}

.article-details h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #111827;
}

.article-details .meta {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.article-details img {
  display: block;
  width: 100%;
  max-width: 700px; /* 🖼️ make the image slightly smaller */
  height: auto;
  margin: 0 auto 20px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-details p {
  color: #374151;
  font-size: 1rem;
  white-space: pre-line; /* ✅ keeps paragraph breaks from backend */
}

/* 💬 Comments Section */
.comments-section {
  margin-top: 40px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.comment {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.comment p {
  margin-bottom: 5px;
}

#comment-form {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
}

#comment-text {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: none;
  margin-bottom: 10px;
}

#comment-form button {
  align-self: flex-end;
  background: #111827;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#comment-form button:hover {
  background: #1f2937;
}

/* Meta info for articles */
.meta {
  color: #555;
  font-size: 0.9rem;
}

.meta span {
  margin-right: 4px;
}

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