/* ========== Base Styles ========== */
body {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 1.7;
    color: #222;
    background: #fff;
    margin: 0;
    padding: 0;
}

h1, h2, h3, .post-title, .featured-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    line-height: 1.3;
    color: #111;
}

h1, h2 {
    text-shadow: 1px 1px 0 #eee;
}

/* ========== Header ========== */
header {
    background-color: #000;
    padding: 2rem 1rem 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-img {
    max-height: 160px;
    margin-top: -50px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.logo-link {
    display: inline-block;
}

.main-nav {
    margin-top: 1rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #ffcc00;
}

/* ========== Main Layout ========== */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
    position: relative;
    z-index: 0;
}

/* ========== Footer ========== */
footer {
    background-color: #f1f1f1;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: #555;
    margin: 0 0.3rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ========== Featured + Trending Section ========== */
.top-section {
    margin-bottom: 3rem;
}

.equal-height-wrapper {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.featured-wrapper,
.trending-sidebar {
    display: flex;
    flex-direction: column;
}

.featured-wrapper {
    width: 70%;
}

.trending-sidebar {
    width: 30%;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    justify-content: space-between;
}

.trending-heading {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: Georgia, serif;
    margin-bottom: 1rem;
}

.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #eee;
}

.trending-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    line-height: 1.4;
}

.trending-item a {
    color: #111;
    text-decoration: none;
    display: block;
}

.trending-item a:hover {
    color: #9146ff;
    text-decoration: underline;
}

/* ========== Featured Post Card ========== */
.featured-post {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: #fffbe6;
    padding: 2rem;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.featured-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
}

.featured-details {
    flex: 1;
    min-width: 250px;
}

.featured-title {
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1.5;
    word-break: break-word;
    hyphens: auto;
    text-wrap: balance;
    margin-top: 1rem;
    color: #111;
}

.featured-snippet {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
}

/* ========== Post Grid ========== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.post-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center top;
    border-bottom: 1px solid #eee;
}

.post-details {
    padding: 1rem;
}

.post-title {
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1.5;
    word-break: break-word;
    hyphens: auto;
    text-wrap: balance;
    margin-top: 1rem;
    color: #111;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.post-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.post-meta {
    font-size: 0.85rem;
    color: #777;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-tag a {
    background-color: #6200ea;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-decoration: none;
}

.category-tag a:hover {
    background-color: #3700b3;
}

.post-snippet {
    font-size: 1rem;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== No Posts ========== */
.no-posts {
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
    color: #777;
}

/* ========== Post Detail Page ========== */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.post-detail h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post-detail .post-meta {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
}

.post-detail img {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    height: auto;
}          /* ← close the rule */

    /* ================================================================= */
/* ===  QUIZ PAGES  (landing • questions • e‑mail • results) ======= */
/* ================================================================= */

/* ---------- Shared button variant (inherits .quiz-button colours) */
.quiz-button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  color: #fff;
  background: #007bff;
  transition: transform 0.3s ease, background 0.3s ease;
  text-decoration: none;
}
.quiz-button:hover { background:#0056b3; transform:scale(1.05); }

/* ---------- Landing page (“Can you tell real from fake news?”) --- */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f0f2f5 0%, #e1e6eb 100%);
}

.quiz-container.quiz-intro {
  background: #fff;
  border-radius: 16px;
  padding: 60px 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.07);
  animation: fadeInUp 0.7s ease;
}

.quiz-container__icon  { font-size: 3rem; margin-bottom: 1rem; color:#007bff; }
.quiz-container__title { font-size: 2rem; margin-bottom: 1.2rem; }
.quiz-container__text  { font-size: 1.55rem;  margin-bottom: 2.5rem; color:#555; line-height:1.85; }

/* ---------- Question / e‑mail capture cards ---------------------- */
.quiz-container {
  background:#fff;
  border-radius:16px;
  padding:40px 30px;
  max-width:600px;
  width:100%;
  margin:40px auto;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,.07);
}

.quiz-headline { font-size:1.4rem; margin:30px 0; font-style:italic; color:#333; }
.quiz-input   {
  width:100%; max-width:320px; margin:10px auto; padding:10px;
  border:1px solid #ccc; border-radius:5px; font-size:1rem;
}

/* progress bar (question page) */
.progress-bar { width:100%; height:10px; background:#eee; border-radius:10px; margin-bottom:20px; }
.progress     { height:100%; background:linear-gradient(90deg,#4caf50,#81c784); transition:width .4s; }

/* ---------- Results page ----------------------------------------- */
.result-box {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.07);
}

.result-frame {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.result-heading { font-size:1.75rem; margin-bottom:.5rem; font-weight:700; }
.result-score   { font-size:1.25rem; font-weight:600; }

.certificate-msg,
.result-feedback { font-size:1rem; color:#555; line-height:1.6; }

/* ================================================================= */
/* ===  QUIZ – NAME / EMAIL CAPTURE PAGE =========================== */
/* ================================================================= */

.quiz-container h1 {
  font-size: 2rem;          /* keeps headline on two tidy lines   */
  line-height: 1.3;
  margin-bottom: 1.4rem;
}

.quiz-container p {
  font-size: 1.075rem;      /* readable but compact               */
  line-height: 1.85;
  margin-bottom: 1.3rem;
}

.quiz-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 1.6rem 0 2.2rem;
}

.quiz-input {
  flex: 1 1 260px;          /* grow but never shrink below 260 px */
  min-width: 0;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.quiz-form .quiz-button {
  flex: 0 0 200px;          /* fixed button width                 */
  padding: 12px 18px;
  font-size: 1rem;
  height: 48px;             /* aligns with input height           */
}

.quiz-note {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* Mobile: stack fields */
@media (max-width: 480px) {
  .quiz-form { flex-direction: column; }
  .quiz-form .quiz-button { width: 100%; }
}


/* ---------- Entry animation -------------------------------------- */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}

.social-button {
  display: inline-block;
  background-color: #4267B2; /* Default: Facebook Blue */
  color: white;
  padding: 10px 20px;
  margin: 0 8px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s ease-in-out;
}

.social-button:hover {
  filter: brightness(1.1);
}

.social-button.twitter {
  background-color: #1DA1F2;
}

.social-button.linkedin {
  background-color: #0077B5;
}

.social-button i {
  margin-right: 8px;
}
